/* ─────────────────────────────────────────────────────────────────────────
   BoardBazaar (بردبازار) design system
   Seeded from the OD web-prototype template token contract (six :root vars),
   extended for an RTL mobile-first marketplace. Only logical properties.
   ───────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Shabnam';
  src: url('fonts/Shabnam-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* ── six brand tokens (see brand-spec.md) ─────────────────────────── */
  --bg:      oklch(98% 0.008 80);
  --surface: oklch(100% 0 0);
  --fg:      oklch(22% 0.02 60);
  --muted:   oklch(50% 0.02 60);
  --border:  oklch(90% 0.012 80);
  --accent:  oklch(48% 0.11 172);

  /* ── derived ──────────────────────────────────────────────────────── */
  --accent-strong: color-mix(in oklch, var(--accent) 84%, black);
  --accent-text:   color-mix(in oklch, var(--accent) 88%, black);
  --accent-soft:   color-mix(in oklch, var(--accent) 12%, transparent);
  --accent-tint:   color-mix(in oklch, var(--accent) 7%, var(--bg));
  --fg-soft:       color-mix(in oklch, var(--fg) 6%, transparent);
  --fg-softer:     color-mix(in oklch, var(--fg) 3.5%, transparent);

  /* ── semantic status (never decorative) ───────────────────────────── */
  --ok:          oklch(56% 0.15 150);
  --ok-text:     oklch(42% 0.13 150);
  --ok-soft:     color-mix(in oklch, var(--ok) 14%, transparent);
  --warn:        oklch(72% 0.16 72);
  --warn-text:   oklch(46% 0.13 68);
  --warn-soft:   color-mix(in oklch, var(--warn) 18%, transparent);
  --danger:      oklch(56% 0.2 27);
  --danger-text: oklch(48% 0.19 27);
  --danger-soft: color-mix(in oklch, var(--danger) 12%, transparent);
  --info:        oklch(55% 0.13 250);
  --info-text:   oklch(44% 0.13 250);
  --info-soft:   color-mix(in oklch, var(--info) 13%, transparent);
  --plum:        oklch(50% 0.13 320);
  --plum-text:   oklch(42% 0.13 320);
  --plum-soft:   color-mix(in oklch, var(--plum) 13%, transparent);

  /* ── type ─────────────────────────────────────────────────────────── */
  --font-display: 'Shabnam', 'Vazirmatn', system-ui, sans-serif;
  --font-body:    'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;
  --fs-h1: clamp(24px, 2.4vw, 32px);
  --fs-h2: clamp(19px, 1.7vw, 23px);
  --fs-h3: 17px;
  --fs-body: 15px;
  --fs-meta: 13px;
  --fs-xs: 12px;

  /* ── spacing / shape ──────────────────────────────────────────────── */
  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 40px;
  --gutter: 16px;
  --container: 1200px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --topbar-h: 60px;
  --nav-h: 64px;

  --shadow-sm: 0 1px 2px color-mix(in oklch, var(--fg) 7%, transparent);
  --shadow-md: 0 10px 28px -10px color-mix(in oklch, var(--fg) 22%, transparent);
  --shadow-lg: 0 28px 56px -18px color-mix(in oklch, var(--fg) 32%, transparent);
  --ring: 0 0 0 3px var(--accent-soft);
}

/* ─── reset & base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
  min-height: 100vh;
}
body.no-bnav { padding-bottom: 24px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-family: var(--font-display); font-weight: 700; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─── layout primitives ──────────────────────────────────────────────── */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); width: 100%; }
.section { padding-block: var(--gap-lg); }
.section + .section { padding-top: 0; }
.stack { display: flex; flex-direction: column; gap: var(--gap-md); }
.stack-sm { display: flex; flex-direction: column; gap: var(--gap-xs); }
.row { display: flex; align-items: center; gap: var(--gap-sm); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-sm); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-sm); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-sm); }
.grid-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-sm); }
@media (max-width: 919px) { .hide-mobile { display: none !important; } }
.dflex { display: none; }
@media (min-width: 920px) {
  .dflex { display: flex; align-items: center; gap: 6px; }
  :root { --gutter: 32px; }
  .section { padding-block: var(--gap-xl); }
  .grid-2 { gap: var(--gap-lg); }
  .grid-3 { gap: var(--gap-lg); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-lg); }
  .hide-desktop { display: none !important; }
  body { padding-bottom: 48px; }
}

/* ─── type utilities ─────────────────────────────────────────────────── */
h1, .h1 { font-size: var(--fs-h1); line-height: 1.35; }
h2, .h2 { font-size: var(--fs-h2); line-height: 1.4; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.5; }
.lead { font-size: 16px; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.text-sm { font-size: var(--fs-meta); }
.text-xs { font-size: var(--fs-xs); }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; }
.display { font-family: var(--font-display); }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.price { font-family: var(--font-display); font-size: 16px; color: var(--fg); white-space: nowrap; }
.price small { font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--muted); margin-inline-start: 3px; }
.link { color: var(--fg); font-weight: 600; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 4px; }
.link:hover { text-decoration-color: var(--fg); }

/* ─── brand / logo ───────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 21px; line-height: 1; color: var(--fg); }
.brand .mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--accent); color: var(--surface); border-radius: 10px; }
.brand .mark svg { width: 20px; height: 20px; }
.brand .brand-sub { display: none; }

/* ─── icons ──────────────────────────────────────────────────────────── */
.ic { width: 22px; height: 22px; flex: 0 0 auto; }
.ic-sm { width: 18px; height: 18px; }
.ic-xs { width: 14px; height: 14px; }
.ic-lg { width: 28px; height: 28px; }

/* ─── top bar ────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklch, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: var(--gap-sm); min-height: var(--topbar-h); }
.topbar-title { font-family: var(--font-display); font-size: 17px; flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.dnav { display: none; }
@media (min-width: 920px) {
  .dnav { display: flex; align-items: center; gap: 4px; margin-inline-start: var(--gap-lg); }
  .dnav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--fg); }
  .dnav a:hover { background: var(--fg-soft); }
  .dnav a.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
  .dnav a .ic { width: 18px; height: 18px; }
}

/* ─── bottom navigation (mobile) ─────────────────────────────────────── */
.bnav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in oklch, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.bnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--muted); position: relative; min-height: 44px;
}
.bnav a .ic { width: 24px; height: 24px; }
.bnav a:hover { color: var(--fg); }
.bnav a.active { color: var(--accent-text); }
.bnav a.active::before { content: ''; position: absolute; top: 0; inset-inline-start: calc(50% - 14px); width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--accent); }
.bnav .dot { position: absolute; top: 8px; inset-inline-start: calc(50% - 16px); min-width: 16px; height: 16px; padding-inline: 4px; border-radius: 999px; background: var(--danger); color: var(--surface); font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
@media (min-width: 920px) { .bnav { display: none; } }

/* ─── buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease, box-shadow .15s ease;
  text-decoration: none; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--accent); color: var(--surface); border-color: var(--accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--surface); }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--fg); background: var(--fg-softer); color: var(--fg); }
.btn-soft { background: var(--accent-soft); color: var(--accent-text); }
.btn-soft:hover { background: var(--accent); color: var(--surface); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg-soft); color: var(--fg); }
.btn-danger { background: var(--danger-soft); color: var(--danger-text); }
.btn-danger:hover { background: var(--danger); color: var(--surface); }
.btn-dark { background: var(--fg); color: var(--surface); }
.btn-dark:hover { background: color-mix(in oklch, var(--fg) 80%, var(--surface)); color: var(--surface); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-sm .ic { width: 16px; height: 16px; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; height: 44px; padding: 0; border-radius: 12px; }
.btn-icon.btn-sm { width: 36px; height: 36px; }
.btn-pill { border-radius: 999px; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.is-locked { background: var(--fg-softer); color: var(--muted); border: 1px dashed color-mix(in oklch, var(--muted) 45%, transparent); box-shadow: none; }
.btn.is-locked:hover { background: var(--fg-soft); color: var(--fg); }
.btn.is-loading { pointer-events: none; }
.btn .spin { width: 18px; height: 18px; border: 2px solid color-mix(in oklch, currentColor 30%, transparent); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── icon-only round action (favorite, close, etc.) ─────────────────── */
.iconbtn {
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center;
  background: var(--surface); color: var(--fg); border: 1px solid var(--border);
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.iconbtn:hover { border-color: var(--fg); background: var(--fg-softer); }
.iconbtn .ic { width: 20px; height: 20px; }
.iconbtn.fav.is-on { color: var(--danger); border-color: color-mix(in oklch, var(--danger) 40%, var(--border)); background: var(--danger-soft); }
.iconbtn.fav.is-on .ic path { fill: currentColor; }
.iconbtn.fav.pop { animation: pop .3s ease; }
@keyframes pop { 40% { transform: scale(1.25); } }

/* ─── badges / chips / tags ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; min-height: 22px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap;
  background: var(--fg-soft); color: var(--fg);
}
.badge .ic { width: 13px; height: 13px; }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }
.badge-ok { background: var(--ok-soft); color: var(--ok-text); }
.badge-warn { background: var(--warn-soft); color: var(--warn-text); }
.badge-danger { background: var(--danger-soft); color: var(--danger-text); }
.badge-info { background: var(--info-soft); color: var(--info-text); }
.badge-plum { background: var(--plum-soft); color: var(--plum-text); }
.badge-solid { background: var(--fg); color: var(--surface); }
.badge-featured { background: var(--warn); color: var(--fg); }
.badge-outline { background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--fg);
  font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--fg); background: var(--fg-softer); }
.chip.active { background: var(--fg); color: var(--surface); border-color: var(--fg); }
.chip .ic { width: 16px; height: 16px; }
.chip .x { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklch, currentColor 14%, transparent); margin-inline-end: -6px; }
.chip .x .ic { width: 12px; height: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-block: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }

/* ─── cards ──────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--gap-md); }
.card-pad-0 { padding: 0; overflow: hidden; }
.card-tint { background: var(--accent-tint); border-color: color-mix(in oklch, var(--accent) 18%, var(--border)); }
.card-hover { transition: box-shadow .2s, border-color .2s, transform .2s; }
.card-hover:hover { box-shadow: var(--shadow-md); border-color: color-mix(in oklch, var(--fg) 16%, var(--border)); }
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; font-weight: 500; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: 0; }

/* ─── listing card ───────────────────────────────────────────────────── */
.lcard {
  display: flex; flex-direction: column; position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
  min-width: 0;
}
.lcard:hover { box-shadow: var(--shadow-md); border-color: color-mix(in oklch, var(--fg) 16%, var(--border)); }
.lcard-media { position: relative; aspect-ratio: 4 / 3; background: var(--fg-softer); overflow: hidden; }
.lcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.lcard:hover .lcard-media img { transform: scale(1.03); }
.lcard-badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.lcard-fav { position: absolute; top: 8px; inset-inline-end: 8px; width: 36px; height: 36px; background: color-mix(in oklch, var(--surface) 92%, transparent); backdrop-filter: blur(6px); }
.lcard-fav .ic { width: 18px; height: 18px; }
.lcard-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 14px; }
.lcard-title { font-size: 14px; font-weight: 600; line-height: 1.55; min-height: calc(2 * 1.55em); }
.lcard-price { font-family: var(--font-display); font-size: 16px; line-height: 1.3; }
.lcard-price small { font-family: var(--font-body); font-size: 11px; font-weight: 500; color: var(--muted); margin-inline-start: 3px; }
.lcard-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.lcard-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--border); }
.lcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; font-size: 12px; color: var(--muted); }
.lcard-link { position: absolute; inset: 0; z-index: 1; }
.lcard-fav, .lcard .btn { position: relative; z-index: 2; }
.lcard-fav { position: absolute; }
.lcard.is-sold .lcard-media img { filter: grayscale(1); opacity: .6; }
.lcard-timer { position: absolute; bottom: 8px; inset-inline-start: 8px; }

/* horizontal scroller on mobile, grid on desktop */
.hscroll {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity;
  padding-inline: var(--gutter); padding-block: 4px 8px; margin-inline: calc(-1 * var(--gutter));
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > .lcard { flex: 0 0 172px; scroll-snap-align: start; }
.hscroll > .lcard-wide { flex: 0 0 260px; }
@media (min-width: 920px) {
  .hscroll { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-lg); overflow: visible; padding: 0; margin: 0; }
  .hscroll > .lcard { flex: initial; }
  .hscroll > .lcard:nth-child(n + 5) { display: none; }
}
@media (min-width: 1200px) {
  .hscroll { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .hscroll > .lcard:nth-child(n + 5) { display: flex; }
  .hscroll > .lcard:nth-child(n + 6) { display: none; }
}
.grid-listings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .grid-listings { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 920px) { .grid-listings { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-lg); } }
@media (min-width: 1200px) { .grid-listings { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* section header */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { font-size: var(--fs-h2); }
.sec-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sec-head .link { font-size: 13px; }

/* ─── category tiles ─────────────────────────────────────────────────── */
.cats { display: flex; gap: 10px; overflow-x: auto; padding-inline: var(--gutter); margin-inline: calc(-1 * var(--gutter)); padding-block: 4px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 12px; font-weight: 600; color: var(--fg); }
.cat-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--accent-text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.cat-ic .ic { width: 28px; height: 28px; }
.cat:hover .cat-ic { border-color: var(--fg); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.cat.active .cat-ic { background: var(--fg); color: var(--surface); border-color: var(--fg); }
@media (min-width: 920px) {
  .cats { display: grid; grid-template-columns: repeat(8, 1fr); overflow: visible; padding: 0; margin: 0; gap: var(--gap-md); }
  .cat { flex: initial; }
}

/* ─── search bar ─────────────────────────────────────────────────────── */
.searchbar {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding-inline: 16px 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.searchbar:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.searchbar .ic { color: var(--muted); }
.searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; height: 44px; }
.searchbar input::placeholder { color: var(--muted); }
.searchbar .btn { flex: 0 0 auto; }

/* ─── form fields ────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--fg); }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12px; color: var(--danger-text); display: none; align-items: center; gap: 4px; }
.field.is-invalid .error { display: flex; }
.field.is-invalid .input, .field.is-invalid .textarea, .field.is-invalid .select { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--fg);
  font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.input:hover, .textarea:hover, .select:hover { border-color: color-mix(in oklch, var(--fg) 30%, var(--border)); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { min-height: 112px; padding: 12px 14px; line-height: 1.7; resize: vertical; }
.select { appearance: none; padding-inline-end: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 15px calc(50% - 1px), 20px calc(50% - 1px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.input-wrap { position: relative; }
.input-wrap .affix { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 14px; font-size: 13px; color: var(--muted); pointer-events: none; }
.input-wrap .input { padding-inline-end: 64px; }
.input-ltr { direction: ltr; text-align: left; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.input-lg { min-height: 56px; font-size: 18px; border-radius: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.switch { position: relative; width: 46px; height: 28px; border-radius: 999px; background: color-mix(in oklch, var(--muted) 35%, var(--border)); transition: background .2s; flex: 0 0 auto; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(-18px); }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.radio-card:hover { border-color: var(--fg); }
.radio-card.active { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.radio-card .rc-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex: 0 0 auto; margin-top: 3px; display: grid; place-items: center; }
.radio-card.active .rc-mark { border-color: var(--accent); }
.radio-card.active .rc-mark::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.radio-card .rc-title { font-weight: 700; font-size: 15px; }
.radio-card .rc-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.radio-card.is-locked { background: var(--fg-softer); border-style: dashed; color: var(--muted); }
.radio-card.is-locked .rc-title { color: var(--muted); }
.radio-card.is-locked:hover { border-color: var(--muted); }

/* OTP */
.otp { display: flex; direction: ltr; justify-content: center; gap: 10px; }
.otp input { width: 48px; height: 58px; text-align: center; font-size: 24px; font-weight: 700; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.otp.is-invalid input { border-color: var(--danger); }

/* ─── segmented / tabs / stepper ─────────────────────────────────────── */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--fg-soft); border-radius: 12px; }
.seg button { flex: 1; min-height: 38px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.seg button:hover { color: var(--fg); }
.seg button.active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px; min-height: 46px; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.tab:hover { color: var(--fg); }
.tab.active { color: var(--fg); border-color: var(--fg); }
.tab .count { font-size: 11px; background: var(--fg-soft); color: inherit; padding: 1px 7px; border-radius: 999px; }
.tab.active .count { background: var(--fg); color: var(--surface); }
.steps { display: flex; gap: 8px; }
.step { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.step-bar { height: 4px; border-radius: 4px; background: var(--border); }
.step.done .step-bar, .step.current .step-bar { background: var(--accent); }
.step.current { color: var(--fg); font-weight: 600; }

/* ─── avatar ─────────────────────────────────────────────────────────── */
.avatar { --h: 172; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; font-weight: 700; font-size: 15px; background: oklch(90% 0.06 var(--h)); color: oklch(34% 0.1 var(--h)); overflow: hidden; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-xl { width: 80px; height: 80px; font-size: 28px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ─── sheet / modal ──────────────────────────────────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: color-mix(in oklch, var(--fg) 45%, transparent); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 51;
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 92vh; display: flex; flex-direction: column;
  transform: translateY(105%); transition: transform .26s cubic-bezier(.2,.8,.2,1);
  box-shadow: var(--shadow-lg);
}
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--border); margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px 8px; }
.sheet-head h3 { flex: 1; font-size: 18px; }
.sheet-body { padding: 8px 20px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
@media (min-width: 920px) {
  .sheet { inset: 50% auto auto 50%; bottom: auto; width: min(540px, 92vw); max-height: 86vh; border-radius: var(--radius-xl); transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
  .sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet-handle { display: none; }
  .sheet-head { padding-top: 20px; }
  .sheet-foot { border-radius: 0 0 var(--radius-xl) var(--radius-xl); padding-bottom: 20px; }
}

/* ─── toast ──────────────────────────────────────────────────────────── */
.toast-host { position: fixed; inset-inline: 16px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
body.no-bnav .toast-host { bottom: 20px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 460px; width: 100%; padding: 12px 16px; border-radius: 14px; background: var(--fg); color: var(--surface); font-size: 14px; box-shadow: var(--shadow-lg); animation: toast-in .25s ease; }
.toast .ic { width: 18px; height: 18px; }
.toast.ok .ic { color: oklch(78% 0.15 150); }
.toast.danger .ic { color: oklch(78% 0.15 27); }
.toast .btn { margin-inline-start: auto; color: var(--surface); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (min-width: 920px) { .toast-host { bottom: 24px; } }

/* ─── empty / loading / error states ─────────────────────────────────── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 40px 20px; }
.empty-ic { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-text); border: 1px solid color-mix(in oklch, var(--accent) 16%, var(--border)); margin-bottom: 6px; position: relative; }
.empty-ic .ic { width: 38px; height: 38px; }
.empty h3 { font-size: 17px; }
.empty p { color: var(--muted); font-size: 14px; max-width: 34ch; }
.empty .btn { margin-top: 10px; }
.dots-bg { background-image: radial-gradient(color-mix(in oklch, var(--fg) 9%, transparent) 1.3px, transparent 1.4px); background-size: 16px 16px; }
.sk { position: relative; overflow: hidden; background: var(--fg-soft); border-radius: 8px; }
.sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--surface) 70%, transparent), transparent); animation: sk 1.3s infinite; }
@keyframes sk { to { transform: translateX(100%); } }
.sk-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.sk-card .sk-media { aspect-ratio: 4 / 3; border-radius: 0; }
.sk-card .sk-lines { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 12px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; border: 1px solid; line-height: 1.6; }
.alert .ic { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; }
.alert-danger { background: var(--danger-soft); color: var(--danger-text); border-color: color-mix(in oklch, var(--danger) 30%, transparent); }
.alert-warn { background: var(--warn-soft); color: var(--warn-text); border-color: color-mix(in oklch, var(--warn) 45%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info-text); border-color: color-mix(in oklch, var(--info) 30%, transparent); }
.alert-ok { background: var(--ok-soft); color: var(--ok-text); border-color: color-mix(in oklch, var(--ok) 30%, transparent); }
.alert-neutral { background: var(--fg-softer); color: var(--fg); border-color: var(--border); }

/* ─── gallery (listing detail) ───────────────────────────────────────── */
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; background: var(--fg-soft); border: 1px solid var(--border); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-count { position: absolute; bottom: 10px; inset-inline-start: 10px; padding: 3px 10px; border-radius: 999px; background: color-mix(in oklch, var(--fg) 72%, transparent); color: var(--surface); font-size: 12px; backdrop-filter: blur(6px); }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.gallery-nav.prev { inset-inline-start: 10px; }
.gallery-nav.next { inset-inline-end: 10px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { flex: 0 0 68px; width: 68px; height: 68px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: var(--fg-soft); transition: border-color .15s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--fg); }
.thumb:hover { border-color: color-mix(in oklch, var(--fg) 40%, transparent); }

/* ─── listing detail layout ──────────────────────────────────────────── */
.detail { display: grid; gap: var(--gap-lg); }
@media (min-width: 920px) {
  .detail { grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.85fr); align-items: start; }
  .detail-side { position: sticky; top: calc(var(--topbar-h) + 24px); }
}
.actionbar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; gap: 10px; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: color-mix(in oklch, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
.actionbar .btn { flex: 1; }
@media (min-width: 920px) { .actionbar { display: none; } }
.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.spec-item { padding: 12px; border-radius: 12px; background: var(--fg-softer); border: 1px solid var(--border); }
.spec-item .k { font-size: 12px; color: var(--muted); }
.spec-item .v { font-weight: 600; font-size: 14px; margin-top: 2px; }

/* ─── auctions ───────────────────────────────────────────────────────── */
.auc { position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 16px; overflow: hidden; }
.auc::before { content: ''; position: absolute; inset-inline: 0; top: 0; height: 4px; background: var(--auc-color, var(--accent)); }
.auc-en { --auc-color: var(--warn); --auc-text: var(--warn-text); --auc-soft: var(--warn-soft); }
.auc-nl { --auc-color: var(--info); --auc-text: var(--info-text); --auc-soft: var(--info-soft); }
.auc-td { --auc-color: var(--plum); --auc-text: var(--plum-text); --auc-soft: var(--plum-soft); }
.auc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.auc-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--auc-text, var(--fg)); }
.auc-kicker .ic { width: 18px; height: 18px; }
.auc-price { font-family: var(--font-display); font-size: 28px; line-height: 1.2; }
.auc-price small { font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--muted); margin-inline-start: 4px; }
.auc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-block: 12px; }
.auc-stat { padding: 10px 12px; border-radius: 12px; background: var(--fg-softer); border: 1px solid var(--border); }
.auc-stat .k { font-size: 12px; color: var(--muted); }
.auc-stat .v { font-weight: 700; font-size: 15px; margin-top: 2px; }
.countdown { display: inline-flex; gap: 6px; direction: ltr; }
.countdown span { min-width: 40px; padding: 6px 4px; border-radius: 10px; background: var(--auc-soft, var(--fg-soft)); color: var(--auc-text, var(--fg)); text-align: center; font-weight: 700; font-size: 15px; line-height: 1.2; }
.countdown span i { display: block; font-style: normal; font-size: 10px; font-weight: 500; color: var(--muted); }
.countdown.urgent span { background: var(--danger-soft); color: var(--danger-text); }
.drop-track { height: 8px; border-radius: 8px; background: var(--fg-soft); overflow: hidden; margin-top: 8px; }
.drop-track i { display: block; height: 100%; border-radius: 8px; background: var(--info); }
.strike { text-decoration: line-through; color: var(--muted); }
.bids { display: flex; flex-direction: column; }
.bids .list-row { padding: 10px 0; }
.bids .amount { margin-inline-start: auto; font-family: var(--font-display); font-size: 15px; white-space: nowrap; }
.bids .amount small { font-family: var(--font-body); font-size: 11px; color: var(--muted); font-weight: 500; }
.bid-input { display: flex; gap: 8px; }
.bid-input .input-wrap { flex: 1; }
.bid-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pricebox { padding: 14px 16px; border-radius: var(--radius); background: var(--accent-tint); border: 1px solid color-mix(in oklch, var(--accent) 16%, var(--border)); }

/* ─── chat ───────────────────────────────────────────────────────────── */
.convo { display: flex; gap: 12px; align-items: center; padding: 12px var(--gutter); border-bottom: 1px solid var(--border); transition: background .15s; position: relative; }
.convo:hover { background: var(--fg-softer); }
.convo .thumb-sm { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex: 0 0 auto; background: var(--fg-soft); border: 1px solid var(--border); }
.convo .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.convo-body { flex: 1; min-width: 0; }
.convo-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.convo-name { font-weight: 700; font-size: 15px; }
.convo-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.convo-listing { font-size: 12px; color: var(--muted); }
.convo-last { font-size: 13px; color: var(--muted); margin-top: 2px; }
.convo.unread .convo-last { color: var(--fg); font-weight: 500; }
.unread-badge { min-width: 20px; height: 20px; padding-inline: 6px; border-radius: 999px; background: var(--accent); color: var(--surface); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.chat-shell { display: flex; flex-direction: column; min-height: calc(100vh - var(--topbar-h)); }
.chat-listing { display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter); background: var(--surface); border-bottom: 1px solid var(--border); }
.chat-listing .thumb-sm { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; flex: 0 0 auto; border: 1px solid var(--border); }
.chat-listing .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.messages { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 16px var(--gutter) 90px; }
.day-sep { align-self: center; font-size: 11px; color: var(--muted); background: var(--fg-soft); padding: 2px 10px; border-radius: 999px; margin-block: 8px; }
.bubble { max-width: min(78%, 480px); padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.65; position: relative; }
.bubble .t { display: block; font-size: 10px; margin-top: 4px; opacity: .7; text-align: end; }
.bubble.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-start-start-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--surface); border-start-end-radius: 6px; }
.bubble.me .t { color: var(--surface); }
.bubble img { border-radius: 12px; max-width: 240px; margin-bottom: 4px; }
.bubble.sys { align-self: center; background: transparent; color: var(--muted); font-size: 12px; text-align: center; max-width: 90%; }
.composer { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; align-items: flex-end; gap: 8px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: color-mix(in oklch, var(--surface) 96%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
.composer .input { border-radius: 22px; min-height: 44px; padding-block: 10px; line-height: 1.5; resize: none; max-height: 120px; }
@media (min-width: 920px) {
  .chat-shell { max-width: 860px; margin-inline: auto; border-inline: 1px solid var(--border); background: var(--bg); min-height: calc(100vh - var(--topbar-h)); }
  .composer { position: sticky; }
  .messages { padding-bottom: 16px; }
}

/* ─── notifications ──────────────────────────────────────────────────── */
.notif { display: flex; gap: 12px; padding: 14px var(--gutter); border-bottom: 1px solid var(--border); align-items: flex-start; }
.notif.unread { background: var(--accent-tint); }
.notif-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; background: var(--fg-soft); color: var(--fg); }
.notif-ic.warn { background: var(--warn-soft); color: var(--warn-text); }
.notif-ic.info { background: var(--info-soft); color: var(--info-text); }
.notif-ic.ok { background: var(--ok-soft); color: var(--ok-text); }
.notif-ic.accent { background: var(--accent-soft); color: var(--accent-text); }
.notif-ic.danger { background: var(--danger-soft); color: var(--danger-text); }
.notif-ic.plum { background: var(--plum-soft); color: var(--plum-text); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 600; font-size: 14px; }
.notif-text { font-size: 13px; color: var(--muted); margin-top: 2px; }
.notif-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ─── profile / my listings ──────────────────────────────────────────── */
.profile-head { display: flex; align-items: center; gap: 14px; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-tile { padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-align: center; }
.stat-tile .v { font-family: var(--font-display); font-size: 22px; line-height: 1.2; }
.stat-tile .k { font-size: 12px; color: var(--muted); margin-top: 2px; }
.menu-row { display: flex; align-items: center; gap: 12px; padding: 14px var(--gap-md); border-top: 1px solid var(--border); min-height: 56px; transition: background .15s; }
.menu-row:first-child { border-top: 0; }
.menu-row:hover { background: var(--fg-softer); }
.menu-row .ic { color: var(--muted); }
.menu-row .chev { margin-inline-start: auto; color: var(--muted); }
.mylist { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.mylist .thumb-md { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; flex: 0 0 auto; background: var(--fg-soft); }
.mylist .thumb-md img { width: 100%; height: 100%; object-fit: cover; }
.mylist-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mylist-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.mylist.is-sold .thumb-md img { filter: grayscale(1); opacity: .6; }

/* ─── hero (home) ────────────────────────────────────────────────────── */
.hero { position: relative; padding: 20px var(--gap-md) 18px; border-radius: var(--radius-xl); background: var(--accent-tint); border: 1px solid color-mix(in oklch, var(--accent) 14%, var(--border)); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in oklch, var(--accent) 22%, transparent) 1.4px, transparent 1.5px); background-size: 18px 18px; mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent); opacity: .7; pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { font-size: clamp(21px, 2.6vw, 30px); line-height: 1.45; max-width: 22ch; }
.hero p { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 42ch; }
.hero .searchbar { margin-top: 14px; }
.hero-meeple { position: absolute; inset-inline-end: -8px; bottom: -14px; width: 120px; height: 120px; color: var(--accent); opacity: .12; pointer-events: none; }
@media (min-width: 920px) { .hero { padding: 40px 40px 36px; } .hero .searchbar { max-width: 640px; margin-top: 22px; } .hero-meeple { width: 220px; height: 220px; inset-inline-end: 24px; bottom: -40px; } }

/* ─── admin ──────────────────────────────────────────────────────────── */
.admin { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.admin-side { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px var(--gutter); scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--fg); min-height: 44px; }
.admin-nav a:hover { background: var(--fg-soft); }
.admin-nav a.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.admin-nav a .ic { width: 18px; height: 18px; }
.admin-main { padding: var(--gap-md) var(--gutter) var(--gap-xl); min-width: 0; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: var(--gap-md); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.kpi .k { font-size: 12px; color: var(--muted); }
.kpi .v { font-family: var(--font-display); font-size: 26px; line-height: 1.2; margin-top: 4px; }
.kpi .d { font-size: 12px; margin-top: 4px; }
.kpi .d.up { color: var(--ok-text); }
.kpi .d.down { color: var(--danger-text); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.table th, .table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--fg-softer); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--fg-softer); }
.table .num-col { text-align: end; white-space: nowrap; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 10px; color: var(--muted); }
.bars .bar i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: var(--accent); min-height: 4px; }
.bars .bar i.alt { background: color-mix(in oklch, var(--accent) 35%, var(--border)); }
.bars .bar b { font-size: 11px; color: var(--fg); font-weight: 600; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: middle; background: var(--accent); }
.legend i.alt { background: color-mix(in oklch, var(--accent) 35%, var(--border)); }
@media (min-width: 920px) {
  .admin { grid-template-columns: 240px minmax(0, 1fr); }
  .admin-side { border-bottom: 0; border-inline-end: 1px solid var(--border); height: 100vh; position: sticky; top: 0; }
  .admin-nav { flex-direction: column; padding: 12px; overflow: visible; }
  .admin-main { padding: var(--gap-lg) var(--gap-xl); }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-md); }
}

/* ─── misc ───────────────────────────────────────────────────────────── */
.lock-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed color-mix(in oklch, var(--muted) 45%, transparent); border-radius: 12px; background: var(--fg-softer); color: var(--muted); font-size: 13px; }
.upload-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1; border: 1.5px dashed color-mix(in oklch, var(--accent) 50%, var(--border)); border-radius: var(--radius); background: var(--accent-tint); color: var(--accent-text); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.upload-zone:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.upload-grid .ph { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--fg-soft); }
.upload-grid .ph img { width: 100%; height: 100%; object-fit: cover; }
.upload-grid .ph .rm { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in oklch, var(--fg) 70%, transparent); color: var(--surface); display: grid; place-items: center; }
.upload-grid .ph .rm .ic { width: 14px; height: 14px; }
.upload-grid .ph .cover { position: absolute; bottom: 6px; inset-inline-start: 6px; }
.game-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.game-tile { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: start; transition: border-color .15s, box-shadow .15s; }
.game-tile:hover { border-color: var(--fg); }
.game-tile.active { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.game-tile .gt-img { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--fg-soft); }
.game-tile .gt-img img { width: 100%; height: 100%; object-fit: cover; }
.game-tile .gt-name { font-size: 13px; font-weight: 600; line-height: 1.4; }
.game-tile .gt-sub { font-size: 11px; color: var(--muted); }
@media (min-width: 600px) { .game-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); } .upload-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 920px) { .game-pick { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.preview-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.preview-card .pv-img { aspect-ratio: 4 / 3; background: var(--fg-soft); }
.preview-card .pv-img img { width: 100%; height: 100%; object-fit: cover; }
.preview-card .pv-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.narrow { max-width: 680px; margin-inline: auto; }
.fab-space { height: 72px; }
.content-img { display: block; max-width: 100%; max-height: min(70vh, 720px); width: auto; height: auto; object-fit: contain; border-radius: var(--radius-lg); }
.swatch { display: flex; flex-direction: column; gap: 6px; }
.swatch i { display: block; height: 64px; border-radius: 12px; border: 1px solid var(--border); }
.swatch b { font-size: 13px; }
.swatch span { font-size: 11px; color: var(--muted); font-family: var(--font-mono); direction: ltr; }
.ds-section { padding-block: var(--gap-lg); border-top: 1px solid var(--border); }
.ds-section:first-of-type { border-top: 0; }
.ds-section > h2 { margin-bottom: 4px; }
.ds-section > .lead { font-size: 14px; margin-bottom: var(--gap-md); }
.demo { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.demo-col { display: flex; flex-direction: column; gap: 10px; }
