/* ============ MarketMedia Design System — Light only ============ */

:root {
  --bg: #F7F5F0;
  --bg-elevated: #FFFFFF;
  --bg-sunken: #EFEBE3;
  --bg-tint: #FBFAF6;

  --fg: #0E1A2B;
  --fg-muted: #5A6478;
  --fg-subtle: #8B93A3;
  --fg-faint: #C7CCD4;

  --border: #E4DFD3;
  --border-strong: #D2CCBC;
  --border-faint: #ECE7DA;

  --accent: #7CC4FF;
  --accent-deep: #2B7FD9;
  --accent-tint: #E6F2FF;
  --accent-fg: #0A2540;

  --success: #2E7D5B;
  --success-tint: #E1F0E8;
  --warn: #C77A2B;
  --danger: #C7423E;

  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(14, 26, 43, 0.04), 0 1px 1px rgba(14, 26, 43, 0.03);
  --shadow-md: 0 2px 8px rgba(14, 26, 43, 0.06), 0 1px 2px rgba(14, 26, 43, 0.04);
  --shadow-lg: 0 12px 32px rgba(14, 26, 43, 0.10), 0 2px 6px rgba(14, 26, 43, 0.05);

  --page-max: 1440px;
}

[data-theme="dark"] {
  --bg: #0B1220;
  --bg-elevated: #131C2E;
  --bg-sunken: #070C16;
  --bg-tint: #0F1828;

  --fg: #F2F4F8;
  --fg-muted: #98A2B5;
  --fg-subtle: #6A7589;
  --fg-faint: #3A4458;

  --border: #1F2A3F;
  --border-strong: #2C3A52;
  --border-faint: #182238;

  --accent: #7CC4FF;
  --accent-deep: #4FA3F0;
  --accent-tint: #1A2D45;
  --accent-fg: #DCEEFF;

  --success: #5EBC8C;
  --success-tint: #15301F;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.35);
  --shadow-lg: 0 18px 48px rgba(0,0,0,0.5);
}

/* Theme toggle button */
.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated); color: var(--fg);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: background 0.15s, transform 0.15s;
}
.theme-toggle:hover { background: var(--bg-sunken); transform: rotate(15deg); }
.theme-toggle .moon { display: none; }
.theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
[data-theme="dark"] .theme-toggle .sun { display: none; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  min-width: 1280px;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.page { max-width: var(--page-max); margin: 0 auto; }

/* ===== Typography ===== */
.t-display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
.t-mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }
.t-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-muted);
}

/* ===== Buttons ===== */
.btn {
  font-family: inherit; font-size: 14px; font-weight: 500;
  padding: 9px 16px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}
.btn-primary {
  background: var(--fg); color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: var(--bg-elevated); color: var(--fg);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-sunken); }
.btn-ghost { background: transparent; color: var(--fg-muted); }
.btn-ghost:hover { color: var(--fg); background: var(--bg-sunken); }
.btn-accent {
  background: var(--accent-deep); color: white;
  border-color: var(--accent-deep);
}
.btn-accent:hover { filter: brightness(1.05); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Input ===== */
.input {
  font-family: inherit; font-size: 14px;
  padding: 10px 14px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated); color: var(--fg);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.input::placeholder { color: var(--fg-subtle); }

/* ===== Chip ===== */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500;
  background: var(--bg-elevated); color: var(--fg-muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}
.chip:hover { color: var(--fg); border-color: var(--border-strong); }
.chip[data-active="true"] {
  background: var(--fg); color: var(--bg);
  border-color: var(--fg);
}
.chip-soft {
  background: var(--accent-tint); color: var(--accent-fg);
  border-color: transparent;
}

/* ===== Card ===== */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-hover { transition: all 0.18s ease; cursor: pointer; }
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* ===== Brand ===== */
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}
.brand-glyph {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--fg);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 15px; font-style: italic;
  line-height: 1;
}

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-sunken); display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--fg-muted);
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.v-divider { width: 1px; align-self: stretch; background: var(--border); }

.star {
  display: inline-block; width: 12px; height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l2.9 6.9L22 10l-5.5 4.8L18.2 22 12 18.3 5.8 22l1.7-7.2L2 10l7.1-1.1z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2l2.9 6.9L22 10l-5.5 4.8L18.2 22 12 18.3 5.8 22l1.7-7.2L2 10l7.1-1.1z'/></svg>") center/contain no-repeat;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== Site header ===== */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px; border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 30;
}
.site-header .nav { display: flex; gap: 24px; font-size: 14px; color: var(--fg-muted); }
.site-header .nav a { text-decoration: none; color: var(--fg-muted); }
.site-header .nav a.active { color: var(--fg); font-weight: 500; }
.site-header .search { position: relative; width: 320px; }
.site-header .search .search-icon { position: absolute; left: 12px; top: 11px; color: var(--fg-subtle); }
.site-header .search input { padding-left: 36px; }
.site-header .search kbd {
  position: absolute; right: 10px; top: 9px;
  font-size: 11px; font-family: var(--font-mono);
  padding: 3px 6px; border-radius: 4px;
  border: 1px solid var(--border); color: var(--fg-subtle);
  background: var(--bg-sunken);
}
.site-header .header-left { display: flex; align-items: center; gap: 36px; }
.site-header .header-right { display: flex; align-items: center; gap: 12px; }
.breadcrumb { font-size: 13px; color: var(--fg-subtle); }
.breadcrumb .sep { margin: 0 6px; }
.breadcrumb .here { color: var(--fg); }

/* ===== Hero (marketplace) ===== */
.hero { padding: 44px 40px 24px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.hero h1 {
  font-size: 56px; line-height: 1.05;
  margin: 10px 0 14px; letter-spacing: -0.02em;
}
.hero h1 em { color: var(--accent-deep); font-style: italic; }
.hero p { font-size: 16px; color: var(--fg-muted); max-width: 540px; line-height: 1.55; margin: 0; }
.hero-stats { display: flex; gap: 40px; padding-bottom: 6px; }
.stat .val { font-size: 32px; line-height: 1; letter-spacing: -0.02em; }
.stat .lbl { margin-top: 6px; }

/* ===== Category bar ===== */
.cat-bar { padding: 8px 40px 18px; display: flex; gap: 8px; align-items: center; flexWrap: wrap; flex-wrap: wrap; }
.chip .count { font-size: 11px; color: var(--fg-subtle); font-family: var(--font-mono); }
.chip[data-active="true"] .count { color: rgba(255,255,255,0.6); }

/* ===== Body grid (sidebar + content) ===== */
.body-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 24px 40px 64px;
}
.filters { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 90px; align-self: start; }
.filter-block .filter-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.filter-block .reset {
  background: none; border: 0; color: var(--fg-subtle); font-size: 11px; cursor: pointer;
}
.filter-block .filter-body { display: flex; flex-direction: column; gap: 8px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--fg-muted); cursor: pointer; }
.check-box {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.check-row.checked .check-box {
  border-color: var(--fg); background: var(--fg);
}
.check-row.checked > span:nth-child(2) { color: var(--fg); }
.check-row .hint { font-size: 11px; color: var(--fg-subtle); margin-left: auto; }

.slider-track { position: relative; height: 24px; }
.slider-track .rail { position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: var(--border-strong); }
.slider-track .fill { position: absolute; top: 11px; left: 8%; right: 22%; height: 2px; background: var(--fg); }
.slider-track .knob {
  position: absolute; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-elevated); border: 2px solid var(--fg);
}

/* ===== Results bar ===== */
.results-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; font-size: 14px; color: var(--fg-muted);
}
.results-bar strong { color: var(--fg); }
.view-toggle {
  display: flex; border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden;
}
.view-toggle button {
  border: 0; padding: 7px 10px; cursor: pointer;
  background: var(--bg-elevated); color: var(--fg-muted);
  display: inline-flex; align-items: center;
}
.view-toggle button.active { background: var(--fg); color: var(--bg); }

/* ===== Service card grid ===== */
.service-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.service-card { display: flex; flex-direction: column; }
.service-card .cover {
  position: relative; aspect-ratio: 4/3;
  overflow: hidden; background: var(--bg-sunken);
}
.service-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.service-card .level-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 9px; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.95); color: var(--fg);
  border-radius: var(--r-pill); backdrop-filter: blur(8px);
  letter-spacing: 0.02em;
}
.service-card .shield-badge {
  position: absolute; top: 12px; right: 52px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: var(--accent-deep);
  display: inline-flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
}
.service-card .save {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: 0; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.service-card .body {
  padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.service-card .seller-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
}
.service-card .seller-row .avatar { width: 22px; height: 22px; }
.service-card .seller-row .loc { font-size: 12px; color: var(--fg-subtle); }
.service-card .title {
  font-size: 14.5px; line-height: 1.4; font-weight: 500; min-height: 40px;
  text-wrap: pretty;
}
.service-card .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.service-card .tag {
  font-size: 11px; padding: 2px 7px; border-radius: 4px;
  background: var(--bg-sunken); color: var(--fg-muted);
}
.service-card .meta-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border-faint);
}
.service-card .from-lbl { font-size: 11px; color: var(--fg-subtle); margin-bottom: 2px; }
.service-card .from-val { font-size: 16px; font-weight: 600; font-family: var(--font-mono); }
.service-card .rating { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.service-card .rating .reviews { color: var(--fg-subtle); }

/* ===== Pagination ===== */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 36px;
}
.pagination .btn { min-width: 34px; justify-content: center; }

/* ===== Detail page ===== */
.gallery-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: 1fr 1fr; gap: 8px; height: 480px;
  border-radius: var(--r-lg); overflow: hidden;
}
.gallery-grid > div { position: relative; background: var(--bg-sunken); }
.gallery-grid > div img { width: 100%; height: 100%; object-fit: cover; }
.gallery-grid .main { grid-row: span 2; }
.gallery-grid .play-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.4) 100%);
  display: flex; align-items: flex-end; padding: 24px;
}
.gallery-grid .play-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 0;
}
.gallery-grid .play-label { margin-left: 14px; color: white; font-size: 13px; font-weight: 500; }
.gallery-grid .more-overlay {
  position: absolute; inset: 0; background: rgba(14,26,43,0.55);
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500; cursor: pointer;
}

.detail-body {
  display: grid; grid-template-columns: 1fr 400px; gap: 56px;
  padding: 32px 40px 64px;
}
.detail-title h1 {
  font-size: 44px; line-height: 1.1; margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.detail-title .pills { display: flex; gap: 8px; margin-bottom: 14px; }
.detail-title .meta {
  display: flex; align-items: center; gap: 18px;
  font-size: 14px; color: var(--fg-muted);
}
.detail-title .meta strong { color: var(--fg); }
.detail-title .online { color: var(--success); display: flex; align-items: center; gap: 6px; }
.detail-title .online .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

.seller-card {
  display: flex; align-items: center; gap: 20px;
  padding: 20px; margin: 24px 0 32px;
}
.seller-card .avatar { width: 56px; height: 56px; }
.seller-card .seller-meta { flex: 1; }
.seller-card .seller-meta strong { font-size: 15px; }
.seller-card .verified {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--accent-deep);
}
.seller-card .seller-meta .blurb { font-size: 13px; color: var(--fg-muted); margin-top: 4px; }

.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.tabs button {
  background: none; border: 0; cursor: pointer; font-size: 14px;
  padding: 12px 0; color: var(--fg-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--fg); font-weight: 600; border-bottom-color: var(--fg); }

.detail-section h3 { font-size: 18px; margin: 32px 0 16px; }
.detail-section h3:first-of-type { margin-top: 0; }
.detail-section p { font-size: 15px; line-height: 1.65; color: var(--fg-muted); margin: 0; text-wrap: pretty; }

.includes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.includes-grid .item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--fg-muted);
}

.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.process-grid .step { padding: 16px; }
.process-grid .step .n { font-size: 12px; color: var(--fg-subtle); margin-bottom: 8px; font-family: var(--font-mono); }
.process-grid .step .t { font-weight: 600; margin-bottom: 4px; }
.process-grid .step .d { font-size: 13px; color: var(--fg-muted); line-height: 1.45; margin-bottom: 10px; }
.process-grid .step .days { font-size: 10px; }

.reviews-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.review { padding: 18px; }
.review .head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.review .head strong { font-size: 13px; }
.review .head .co { font-size: 12px; color: var(--fg-subtle); }
.review .stars { margin-left: auto; display: flex; gap: 1px; color: var(--fg); }
.review p { font-size: 14px; line-height: 1.55; color: var(--fg-muted); margin: 0; text-wrap: pretty; }

/* Pricing card */
.pricing-aside { position: sticky; top: 84px; align-self: start; }
.tier-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.tier-tabs button {
  padding: 14px 8px; background: var(--bg-sunken); border: 0;
  border-bottom: 2px solid transparent; font-size: 13px;
  color: var(--fg-muted); cursor: pointer;
}
.tier-tabs button.active {
  background: var(--bg-elevated); color: var(--fg);
  font-weight: 600; border-bottom-color: var(--fg);
}
.tier-body { padding: 22px; }
.tier-price {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px;
}
.tier-price .num { font-size: 38px; letter-spacing: -0.02em; }
.tier-price .unit { font-size: 13px; color: var(--fg-subtle); }
.tier-blurb { font-size: 13px; color: var(--fg-muted); margin: 0 0 16px; line-height: 1.5; }
.tier-stats {
  display: flex; gap: 16px; padding: 12px 0;
  border-top: 1px solid var(--border-faint);
  border-bottom: 1px solid var(--border-faint);
}
.tier-stats .col { flex: 1; }
.tier-stats .col .lbl { font-size: 10px; margin-bottom: 4px; }
.tier-stats .col .val { font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.tier-features {
  list-style: none; padding: 0; margin: 16px 0 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.tier-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--fg); }
.tier-features li.missing { color: var(--fg-subtle); text-decoration: line-through; }
.tier-features li.missing .placeholder { width: 14px; height: 14px; display: inline-block; }
.escrow-note {
  margin-top: 16px; padding: 12px; background: var(--bg-sunken);
  border-radius: var(--r-md); display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--fg-muted); line-height: 1.5;
}

/* ===== Upload page ===== */
.upload-grid {
  display: grid;
  grid-template-columns: 280px 1fr 360px;
  min-height: calc(100vh - 60px);
}
.upload-rail {
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  background: var(--bg-tint);
}
.upload-rail h2 {
  font-size: 26px; line-height: 1.15; letter-spacing: -0.01em;
  margin: 0 0 28px;
}
.step-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.step-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
}
.step-item.active {
  background: var(--bg-elevated);
  border-color: var(--border);
}
.step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-sunken);
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
  font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-family: var(--font-mono);
}
.step-item.done .step-num { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.step-item.active .step-num { background: var(--bg-elevated); color: var(--fg); }
.step-meta .t { font-size: 13.5px; font-weight: 500; color: var(--fg-muted); }
.step-meta .d { font-size: 12px; color: var(--fg-subtle); margin-top: 2px; }
.step-item.active .step-meta .t,
.step-item.done .step-meta .t { color: var(--fg); font-weight: 600; }

.protip {
  margin-top: 32px; padding: 14px;
  background: var(--accent-tint); border-radius: var(--r-lg);
  border: 1px solid transparent;
}
.protip strong { font-size: 12px; color: var(--accent-fg); }
.protip p { font-size: 12px; color: var(--accent-fg); line-height: 1.5; margin: 6px 0 0; }

.upload-main { padding: 44px 56px; max-width: 880px; }
.upload-main .step-meta-row { font-size: 12px; color: var(--fg-subtle); font-family: var(--font-mono); }
.upload-main h1 { font-size: 40px; letter-spacing: -0.02em; margin: 8px 0 6px; }
.upload-main .lede { font-size: 15px; color: var(--fg-muted); margin: 0 0 32px; max-width: 580px; }

.tiers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tier-card {
  background: var(--bg-elevated); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 20px; position: relative;
}
.tier-card.featured {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}
.tier-card .featured-flag {
  position: absolute; top: -10px; right: 16px;
  background: var(--accent); color: var(--accent-fg);
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: var(--r-pill); text-transform: uppercase;
}
.tier-card .head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.tier-card .head .name { font-size: 13px; font-weight: 600; opacity: 0.7; }
.tier-card .head .edit {
  background: transparent; border: 0; padding: 0;
  color: var(--fg-subtle); cursor: pointer; font-size: 12px;
}
.tier-card.featured .head .edit { color: rgba(255,255,255,0.5); }
.tier-card .price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.tier-card .price .sym { font-size: 15px; opacity: 0.5; }
.tier-card .price .num {
  font-family: var(--font-display); font-weight: 400;
  font-size: 36px; line-height: 1; letter-spacing: -0.02em;
}
.tier-card .delivery { font-size: 12px; opacity: 0.6; margin-bottom: 18px; }
.tier-card hr { border: 0; border-top: 1px solid var(--border-faint); margin-bottom: 14px; }
.tier-card.featured hr { border-top-color: rgba(255,255,255,0.15); }
.tier-card ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.tier-card li {
  display: flex; justify-content: space-between; font-size: 12.5px;
}
.tier-card li .l { opacity: 0.7; }
.tier-card li .v { font-weight: 500; }

.addons-list { padding: 0; }
.addon-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-faint);
}
.addon-row:last-child { border-bottom: 0; }
.addon-row .info { flex: 1; }
.addon-row .info .n { font-size: 14px; font-weight: 500; }
.addon-row .info .d { font-size: 12px; color: var(--fg-subtle); }
.addon-row .price { font-size: 14px; font-weight: 600; font-family: var(--font-mono); }
.addon-row .more {
  background: none; border: 0; color: var(--fg-subtle); cursor: pointer; padding: 6px;
}

.toggle {
  width: 32px; height: 18px; border-radius: 999px;
  background: var(--border-strong); position: relative; cursor: pointer; flex-shrink: 0;
  transition: background 0.15s;
  border: 0; padding: 0;
}
.toggle.on { background: var(--fg); }
.toggle .knob {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: white; transition: left 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.toggle.on .knob { left: 16px; }

.custom-quote {
  padding: 18px; display: flex; align-items: center; gap: 16px;
  background: var(--bg-tint);
}
.custom-quote .info { flex: 1; }
.custom-quote .info .n { font-size: 14px; font-weight: 500; }
.custom-quote .info .d { font-size: 12px; color: var(--fg-muted); margin-top: 2px; }

.upload-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
}

.preview-aside {
  border-left: 1px solid var(--border);
  padding: 32px 24px;
  background: var(--bg-tint);
}
.preview-aside .head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.preview-aside .head .right { font-size: 11px; color: var(--fg-subtle); }
.mini-card { box-shadow: var(--shadow-md); }
.mini-card .cover { aspect-ratio: 16/10; position: relative; background: var(--bg-sunken); overflow: hidden; }
.mini-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-card .cover .flag {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 8px; font-size: 10px; font-weight: 600;
  background: rgba(255,255,255,0.95); border-radius: var(--r-pill);
}
.mini-card .body { padding: 14px; }
.mini-card .row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mini-card .row .avatar { width: 20px; height: 20px; }
.mini-card .row .name { font-size: 12px; font-weight: 500; }
.mini-card .title { font-size: 13.5px; font-weight: 500; line-height: 1.4; margin-bottom: 10px; text-wrap: pretty; }
.mini-card .meta { display: flex; justify-content: space-between; align-items: center; }
.mini-card .from-lbl { font-size: 10px; color: var(--fg-subtle); }
.mini-card .from-val { font-size: 14px; font-weight: 600; font-family: var(--font-mono); }
.mini-card .rating { font-size: 11px; color: var(--fg-muted); display: flex; align-items: center; gap: 3px; }
.mini-card .rating strong { color: var(--fg); }

.health { padding: 14px; }
.health .row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.health .donut { position: relative; width: 36px; height: 36px; }
.health .donut svg { transform: rotate(-90deg); }
.health .donut .pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.health .meta .ttl { font-size: 13px; font-weight: 600; }
.health .meta .sub { font-size: 11px; color: var(--fg-subtle); }
.health .list {
  display: flex; flex-direction: column; gap: 7px;
  padding-top: 10px; border-top: 1px solid var(--border-faint);
}
.health .list .li { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.health .list .li.done { color: var(--fg-muted); }
.health .list .pip {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid var(--border-strong);
}

/* ===== Checkout page ===== */
.checkout-progress {
  padding: 28px 40px 0; display: flex; justify-content: center;
}
.checkout-progress .inner {
  display: flex; align-items: center; max-width: 720px; width: 100%;
}
.cstep { display: flex; align-items: center; gap: 10px; }
.cstep .num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-elevated); color: var(--fg-muted);
  border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; font-family: var(--font-mono);
}
.cstep.active .num, .cstep.done .num {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}
.cstep .t { font-size: 13px; font-weight: 500; color: var(--fg-muted); }
.cstep.active .t, .cstep.done .t { color: var(--fg); }
.cstep.active .t { font-weight: 600; }
.cstep-bar { flex: 1; height: 1px; background: var(--border); margin: 0 16px; }
.cstep-bar.done { background: var(--fg); }

.checkout-body {
  display: grid; grid-template-columns: 1fr 440px; gap: 48px;
  padding: 40px 40px 64px; max-width: 1280px; margin: 0 auto;
}
.checkout-body h1 { font-size: 36px; letter-spacing: -0.02em; margin: 0 0 8px; }
.checkout-body .lede { font-size: 14px; color: var(--fg-muted); margin: 0 0 32px; }
.checkout-body h3 { font-size: 16px; margin: 0 0 14px; }

.schedule-card { padding: 18px; margin-bottom: 28px; }
.schedule-card .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field .lbl { font-size: 10px; margin-bottom: 6px; }
.field .val { font-size: 14px; font-weight: 500; }
.timeline { position: relative; height: 56px; }
.timeline .rail { position: absolute; top: 22px; left: 0; right: 0; height: 4px; background: var(--bg-sunken); border-radius: 2px; }
.timeline .marker { position: absolute; top: 0; transform: translateX(-50%); text-align: center; }
.timeline .marker .pt {
  width: 10px; height: 10px; border-radius: 50%;
  margin: 20px auto 0; border: 2px solid var(--bg-elevated);
}
.timeline .marker .lbl { font-size: 10px; color: var(--fg-subtle); margin-top: 6px; white-space: nowrap; }

.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.pay-method {
  text-align: left; padding: 14px; cursor: pointer;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
}
.pay-method.active { border-color: var(--fg); }
.pay-method .head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.pay-method .head .l { font-size: 13px; font-weight: 600; }
.pay-method .radio {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
}
.pay-method.active .radio { border-color: var(--fg); background: var(--fg); }
.pay-method.active .radio::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: white;
}
.pay-method .s { font-size: 11px; color: var(--fg-subtle); }

.card-form { padding: 22px; margin-bottom: 28px; }
.card-form .grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card-form .row3 { display: grid; grid-template-columns: 1fr 140px 100px; gap: 12px; }
.card-form label { display: block; font-size: 12px; font-weight: 500; color: var(--fg-muted); margin-bottom: 6px; }
.card-form .card-input-wrap { position: relative; }
.card-form .card-input-wrap .logos { position: absolute; right: 12px; top: 9px; display: flex; gap: 4px; }
.card-logo {
  background: var(--bg); color: white;
  font-size: 9px; font-weight: 700;
  padding: 3px 6px; border-radius: 3px;
  font-family: var(--font-mono);
}
.card-logo.visa { background: #1A1F71; }
.card-logo.mc { background: #EB001B; }
.card-logo.amex { background: #016FD0; }

.agreement-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.checkline { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--fg-muted); cursor: pointer; }
.checkline .check-box { margin-top: 1px; }
.checkline.checked > span:nth-child(2) { color: var(--fg); }

.checkout-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border);
}

.order-aside { position: sticky; top: 24px; align-self: start; }
.order-card { overflow: hidden; }
.order-card .hd {
  padding: 16px; display: flex; gap: 12px;
  border-bottom: 1px solid var(--border-faint);
}
.order-card .hd .thumb {
  width: 64px; height: 64px; border-radius: var(--r-md);
  overflow: hidden; flex-shrink: 0; background: var(--bg-sunken);
}
.order-card .hd .thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-card .hd .meta { flex: 1; min-width: 0; }
.order-card .hd .seller { font-size: 12px; color: var(--fg-subtle); margin-bottom: 3px; }
.order-card .hd .title { font-size: 13.5px; font-weight: 500; line-height: 1.35; text-wrap: pretty; }
.order-card .hd .sub { font-size: 11px; color: var(--fg-muted); margin-top: 4px; }
.order-card .lines { padding: 16px 16px 0; }
.line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 13px;
}
.line .l { color: var(--fg); display: flex; align-items: center; gap: 8px; }
.line.muted .l { color: var(--fg-muted); }
.line .remove {
  background: none; border: 0; color: var(--fg-subtle);
  cursor: pointer; font-size: 11px; padding: 0;
}
.line .hint { font-size: 11px; color: var(--fg-subtle); margin-top: 2px; }
.line .v { font-weight: 600; font-family: var(--font-mono); }
.line.muted .v { font-weight: 500; color: var(--fg-muted); }

.promo-row { padding: 12px 16px; display: flex; gap: 8px; }
.summary-mid { padding: 16px; }
.summary-total { padding: 16px 16px 20px; background: var(--bg-sunken); }
.summary-total .row {
  display: flex; justify-content: space-between; align-items: baseline;
}
.summary-total .l .lbl { margin-bottom: 4px; }
.summary-total .l .sub { font-size: 11px; color: var(--fg-subtle); }
.summary-total .amt {
  font-family: var(--font-display); font-size: 30px; letter-spacing: -0.02em;
}

.trust { margin-top: 16px; padding: 14px; display: flex; gap: 10px; align-items: flex-start; }
.trust .copy { font-size: 12px; color: var(--fg-muted); line-height: 1.55; }
.trust .copy strong { color: var(--fg); }

.producer { margin-top: 8px; padding: 14px; display: flex; gap: 10px; }
.producer .avatar { width: 32px; height: 32px; }
.producer .copy { font-size: 12px; color: var(--fg-muted); line-height: 1.5; }
.producer .copy strong { color: var(--fg); }

/* ===== Footer ===== */
.site-footer {
  padding: 40px; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  font-size: 13px; color: var(--fg-muted);
}
.site-footer .col h4 { font-size: 12px; color: var(--fg); margin: 0 0 12px; letter-spacing: 0.02em; }
.site-footer .col a { display: block; padding: 4px 0; color: var(--fg-muted); text-decoration: none; }
.site-footer .col a:hover { color: var(--fg); }
.site-footer .about p { margin: 12px 0 0; line-height: 1.6; max-width: 360px; }

/* ===== Auth modal ===== */
#mm-auth-modal { display: none; }
#mm-auth-modal.mm-open { display: block; }
#mm-auth-modal .mm-auth-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 26, 43, 0.55);
  backdrop-filter: blur(6px);
}
[data-theme="dark"] #mm-auth-modal .mm-auth-backdrop { background: rgba(0,0,0,0.55); }
#mm-auth-modal .mm-auth-card {
  position: fixed; left: 50%; top: 50%; z-index: 101;
  transform: translate(-50%, -50%);
  width: 440px; max-width: calc(100vw - 32px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
#mm-auth-modal .mm-auth-x {
  position: absolute; right: 14px; top: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--fg-muted);
}
#mm-auth-modal .mm-auth-x:hover { background: var(--bg-sunken); }

/* ===== Live/demo banner ===== */
.mm-live-banner {
  font-size: 12px; color: var(--fg-muted);
  padding: 6px 40px; background: var(--bg-tint);
  border-bottom: 1px solid var(--border-faint);
  display: flex; align-items: center; gap: 8px;
}
.mm-live-banner .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-subtle);
}
[data-live="true"] .mm-live-banner .dot { background: var(--success); }
[data-live="false"] .mm-live-banner .dot { background: var(--warn); }
.mm-live-banner .label-live, .mm-live-banner .label-demo { display: none; }
[data-live="true"] .mm-live-banner .label-live { display: inline; }
[data-live="false"] .mm-live-banner .label-demo { display: inline; color: var(--warn); }

/* ===== Auth pill placeholder in header ===== */
[data-auth-pill] { display: inline-flex; align-items: center; }

/* ===== Empty state ===== */
.mm-empty {
  padding: 60px 20px; text-align: center; color: var(--fg-muted);
}
.mm-empty .mm-empty-title { font-size: 18px; color: var(--fg); margin-bottom: 6px; }

/* ===== Sign-in page (signin.html) ===== */
.signin-page {
  display: grid; grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}
.signin-side {
  background: var(--bg-tint);
  border-right: 1px solid var(--border);
  padding: 40px 56px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.signin-side::before {
  content: ""; position: absolute; inset: auto -120px -160px auto;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-tint) 0%, transparent 70%);
  pointer-events: none;
}
.signin-side-inner { margin-top: auto; margin-bottom: auto; max-width: 520px; position: relative; }
.signin-headline {
  font-size: 44px; line-height: 1.08; letter-spacing: -0.02em;
  margin: 14px 0 18px;
}
.signin-headline em { color: var(--accent-deep); font-style: italic; }
.signin-blurb {
  font-size: 15px; color: var(--fg-muted); line-height: 1.6; margin: 0 0 28px;
  max-width: 460px;
}
.signin-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 14px; color: var(--fg-muted);
}
.signin-features .bullet { color: var(--accent-deep); margin-right: 10px; font-size: 8px; vertical-align: middle; }
.signin-side-footer { position: relative; }

.signin-main {
  padding: 40px 56px;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  position: relative;
}
.signin-theme-toggle { position: absolute; top: 24px; right: 24px; }
.signin-card {
  width: 100%; max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.signin-label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--fg-muted); margin-bottom: 8px;
}
.signin-reason {
  display: none;
  align-items: flex-start; gap: 10px;
  padding: 12px 14px; margin-bottom: 22px;
  background: var(--accent-tint); color: var(--accent-fg);
  border-radius: var(--r-md);
  font-size: 13px; line-height: 1.5;
}
.signin-reason .ic { font-size: 16px; line-height: 1.2; }
.signin-err {
  font-size: 12px; color: var(--danger);
  margin: 12px 0 0; min-height: 14px; text-align: center;
}
.signin-foot {
  margin-top: 18px; font-size: 11px; color: var(--fg-subtle); max-width: 420px; text-align: center;
}
.signin-foot a { color: var(--fg-muted); }

/* Phone input with fixed +998 prefix */
.phone-input { position: relative; }
.phone-input .prefix {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 14px;
  color: var(--fg); font-weight: 500;
  pointer-events: none;
  border-right: 1px solid var(--border);
  padding-right: 10px;
}
.phone-input input { padding-left: 70px; letter-spacing: 0.08em; }
