/* MIG · Editorial Concierge Design System (Variant 1) */
:root {
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --surface-2: #F0EFE9;
  --ink: #111827;
  --muted: #5B6678;
  --border: #E5E3DC;
  --border-strong: #CCC9BE;
  --accent: #E85D3F;
  --accent-hover: #D24D30;
  --accent-soft: #FDF0EC;
  --escrow: #16805C;
  --escrow-soft: #E8F5F0;
  --gold: #C89B3C;
  --hero-bg: #141E2B;
  --hero-ink: #FFFFFF;
  --hero-muted: #B8C4D0;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 2px 10px rgba(17, 24, 39, 0.04), 0 1px 2px rgba(17, 24, 39, 0.03);
  --shadow-hover: 0 10px 26px rgba(17, 24, 39, 0.07);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.55 "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.03em; color: var(--ink); }
p { text-wrap: pretty; }
.nums { font-variant-numeric: tabular-nums; }
img, video {
  display: block;
  max-width: 100%;
  outline: 1px solid rgba(0, 0, 0, 0.08);
  outline-offset: -1px;
}
code {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  word-break: break-all;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px clamp(16px, 3vw, 28px);
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 850;
  font-size: 19px;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid #fff;
}
.brand-copy { display: flex; flex-direction: column; }
.brand-word { font-size: 22px; font-weight: 850; line-height: 1; letter-spacing: -0.05em; }
.brand-word span { color: var(--accent); }
.brand-sub { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 3px; }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; flex-wrap: wrap; }
.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition-property: background-color, color;
  transition-duration: 150ms;
}
.main-nav a:hover, .main-nav a.active { background: var(--surface-2); color: var(--ink); }
.main-nav a.active { font-weight: 700; }
.nav-badge {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* Buttons */
button, .btn-primary, .btn-secondary, .btn-ghost, .btn-hero-ghost {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--r-sm);
  padding: 10px 16px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition-property: background-color, border-color, color, transform, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
button:active, .btn-primary:active, .btn-secondary:active { transform: scale(0.97); }
button, .btn-primary { background: var(--accent); color: #fff; }
button:hover, .btn-primary:hover { background: var(--accent-hover); }
.btn-secondary, .secondary-form button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover, .secondary-form button:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-hero-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}
.btn-hero-ghost:hover { background: rgba(255, 255, 255, 0.18); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(232, 93, 63, 0.45);
  outline-offset: 2px;
}

/* Main Layout */
.page-main {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 28px) 64px;
  flex: 1;
  overflow-wrap: anywhere;
}
.page-head { margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: clamp(1.75rem, 3.2vw, 2.35rem); line-height: 1.12; }
.section-title { font-size: 1.25rem; margin: 28px 0 12px; }

/* Hero */
.hero-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: center;
  background: var(--hero-bg);
  color: var(--hero-ink);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
}
.eyebrow {
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F4B393;
  background: rgba(255, 255, 255, 0.08);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hero-copy h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.12; margin: 0 0 10px; }
.hero-copy p { color: var(--hero-muted); font-size: 14.5px; margin: 0 0 18px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12.5px;
  color: var(--hero-muted);
}
.hero-stats strong { color: #fff; font-weight: 800; }
.chip-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition-property: background-color, border-color, color;
  transition-duration: 140ms;
}
.chip:hover { border-color: var(--border-strong); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.price-block small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.share-row { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.share-row input { margin-top: 0; flex: 1; }
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.preset-btn {
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border);
  min-height: 38px;
  padding: 6px 12px;
  font-size: 13px;
}
.preset-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* Quick Hero Prompt */
.hero-prompt {
  display: flex;
  gap: 8px;
  background: #FFFFFF;
  padding: 6px;
  border-radius: 14px;
  margin-bottom: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}
.hero-prompt input {
  margin-top: 0;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
}
.hero-prompt input:focus-visible { outline: none; }
.hero-prompt button { flex: none; white-space: nowrap; }
.prefill-note {
  background: var(--escrow-soft);
  color: var(--escrow);
  border-radius: var(--r-md);
  padding: 12px 15px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* Favorite Button */
.card-actions-inline { display: flex; align-items: center; gap: 8px; }
.fav-form { margin: 0; }
.fav-btn {
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 16px;
}
.fav-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: rgba(232, 93, 63, 0.3); }
.fav-btn.saved { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.reel-fav-btn {
  background: rgba(17, 24, 39, 0.55);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.reel-fav-btn.saved { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Author Link & Public Profile */
.author-link { color: inherit; font-weight: 650; text-decoration: none; }
.author-link:hover { color: var(--accent); text-decoration: underline; }
.profile-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.profile-id { display: flex; align-items: center; gap: 16px; }
.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 850;
  flex: none;
}
.profile-id h2 { margin: 0 0 4px; font-size: 1.4rem; }
.profile-id p { margin: 0; font-size: 13.5px; color: var(--muted); }
.profile-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-box {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 12px 16px;
  min-width: 108px;
}
.stat-box strong { display: block; font-size: 1.25rem; color: var(--ink); }
.stat-box span { font-size: 11.5px; color: var(--muted); }

@media (max-width: 680px) {
  .hero-prompt { flex-direction: column; }
  .hero-prompt button { width: 100%; }
}
.hero-visual { border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 10; background: rgba(255, 255, 255, 0.06); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; outline-color: rgba(255, 255, 255, 0.14); }

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.filters label { flex: 1 1 200px; margin: 0; }
.filters button { flex: none; }

/* Cards Grid */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.auction-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition-property: transform, border-color, box-shadow;
  transition-duration: 160ms;
}
.auction-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-hover); }
.card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; outline: none; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h2 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.card-body h2 a { color: var(--ink); text-decoration: none; }
.card-body h2 a:hover { color: var(--accent); }
.card-desc { margin: 0; font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.card-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.price { font-size: 1.2rem; font-weight: 850; letter-spacing: -0.03em; color: var(--ink); }
.price-lg { font-size: 1.6rem; font-weight: 850; letter-spacing: -0.03em; color: var(--ink); }

/* Pills */
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: 999px;
}
.pill-sell { background: #E8F5F0; color: #146C4E; }
.pill-buy { background: #FEF4E6; color: #9A5B13; }
.pill-service { background: #ECF2FE; color: #2451B2; }
.pill-ads { background: #F4EEFD; color: #6B39B8; }
.pill-escrow { background: var(--escrow-soft); color: var(--escrow); }
.status-open { background: var(--accent-soft); color: var(--accent); }
.status-closed { background: var(--surface-2); color: var(--muted); }

/* Reels */
.reels {
  display: grid;
  gap: 20px;
  max-width: 480px;
  margin: 0 auto;
  scroll-snap-type: y proximity;
}
.reel-card { scroll-snap-align: start; }
.reel-stage {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  min-height: 540px;
  background: var(--hero-bg);
  box-shadow: 0 20px 44px rgba(17, 24, 39, 0.18);
}
.reel-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; outline: none; }
.reel-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 22, 33, 0.35) 0%, rgba(14, 22, 33, 0.1) 40%, rgba(14, 22, 33, 0.92) 100%);
  pointer-events: none;
}
.reel-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  color: #fff;
  display: grid;
  gap: 10px;
}
.reel-overlay h2 { margin: 0; font-size: 1.4rem; }
.reel-overlay h2 a { color: #fff; text-decoration: none; }
.reel-overlay p { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, 0.84); }
.reel-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.reel-foot .price { color: #fff; }
.reel-loc { font-size: 12px; color: rgba(255, 255, 255, 0.78); }

/* Detail, Bids, Escrow, Forms */
.detail-card, .card-form, .bid-card, .list-card, .deal-panel, .review-card, .report-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.detail-media { margin: 16px 0; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.detail-media img, .detail-media video { width: 100%; max-height: 460px; object-fit: cover; }
.detail-media-art img { max-height: 300px; }
.detail-body { font-size: 15.5px; line-height: 1.65; margin: 14px 0; }
.detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin: 16px 0;
}
.detail-summary small { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.escrow-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--escrow-soft);
  color: var(--escrow);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin: 14px 0;
}
.escrow-callout img { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; flex: none; }
.escrow-callout h2 { margin: 4px 0; font-size: 1.15rem; }
.escrow-callout p { margin: 3px 0 0; font-size: 13px; color: #265947; }
.contact-line { padding: 12px 14px; background: var(--surface-2); border-radius: var(--r-sm); }
.share-box { margin: 14px 0 0; }

.action-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.inline-form { margin: 0; }
.bid-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rating-pill {
  display: inline-flex;
  padding: 7px 14px;
  border-radius: 999px;
  background: #FBF4E4;
  color: #8A6418;
  font-weight: 700;
  font-size: 13.5px;
}
.notice-banner {
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.muted-note { color: var(--muted); font-size: 14px; }

/* Inputs */
label { display: block; font-size: 13px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
input, textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.auth-shell { max-width: 460px; }
.auth-links { font-size: 14px; color: var(--muted); }
.editor-form { max-width: 720px; }

/* Inbox & Chat */
.stack-list { display: grid; gap: 8px; margin-bottom: 18px; }
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--ink);
  text-decoration: none;
  transition-property: border-color, background-color;
  transition-duration: 140ms;
}
.list-row:hover { border-color: var(--border-strong); background: var(--surface-2); }
.list-row.unread { border-color: var(--accent); background: var(--accent-soft); }
.unread-dot { color: var(--accent); }
.chat-stream { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.chat-bubble {
  max-width: 78%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  padding: 12px 15px;
  box-shadow: var(--shadow);
}
.chat-bubble.mine {
  align-self: flex-end;
  background: var(--accent-soft);
  border-color: rgba(232, 93, 63, 0.28);
  border-radius: 16px 16px 4px 16px;
}
.chat-bubble small { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.chat-bubble p { margin: 0; }
.timeline { display: grid; gap: 10px; padding-left: 20px; }
.timeline li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; }

/* Empty state & Pager */
.empty-card {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 20px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.empty-card img { width: min(320px, 100%); border-radius: 14px; }
.empty-card h3 { margin: 4px 0 0; }
.empty-card p { margin: 0 0 6px; color: var(--muted); max-width: 440px; }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }

/* Footer & Mobile Bar */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13px; }
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px clamp(16px, 3vw, 28px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mobile-bar { display: none; }

@media (max-width: 820px) {
  .hero-card { grid-template-columns: 1fr; padding: 20px; }
  .feed-grid { grid-template-columns: 1fr; }
  .detail-summary { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .main-nav { display: none; }
  .header-inner { justify-content: space-between; }
  .page-main { padding-bottom: 92px; }
  .site-footer { padding-bottom: 72px; }
  .filters button { width: 100%; }
  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    gap: 4px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
  }
  .mob-tab {
    flex: 1;
    min-height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
  }
  .mob-tab.active { background: var(--accent-soft); color: var(--accent); }
  .mob-create { background: var(--accent); color: #fff; }
}
