/* Layout: one lane, always on. A persistent "on the block" bar ties every page to the single live lane;
   inventory is a dense, scannable grid with a sticky filter rail; the live stage is a dark broadcast panel in both themes. */
:root {
  --bg: #f1f3f4;
  --surface: #ffffff;
  --surface-2: #e8ecee;
  --surface-3: #dde3e6;
  --line: #d6dde1;
  --line-2: #c3ccd2;
  --ink: #0e1726;
  --ink-2: #485364;
  --ink-3: #788393;
  --accent: #ff6a1a;          /* windshield-marker orange: lot stickers, bid actions */
  --accent-hover: #ff7d38;
  --accent-ink: #10151d;
  --accent-soft: #ffe7d9;
  --accent-text: #c2410c;
  --live: #e5383b;
  --live-soft: #fde3e3;
  --win: #0f8a55;
  --win-soft: #d9f3e6;
  --warn: #b7791f;
  --warn-soft: #fbefd5;
  --info: #2b5bd7;
  --info-soft: #e1e9fb;
  --shadow: 0 1px 2px rgba(14, 23, 38, .06), 0 6px 18px rgba(14, 23, 38, .06);
  --shadow-lg: 0 12px 40px rgba(14, 23, 38, .16);
  --scrim: rgba(8, 12, 20, .55);
  --stage: #0a1019;
  --stage-2: #121a26;
  --stage-3: #1b2535;
  --stage-line: #253248;
  --stage-ink: #f2f5f9;
  --stage-ink-2: #9aa7b8;
  --panel-orig: #3fa776;
  --panel-paint: #e8a317;
  --panel-filler: #e5383b;
  --panel-replaced: #6d5bd0;

  --f-display: "Alexandria", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --f-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --f-brand: "Reem Kufi", "Alexandria", sans-serif;

  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-md: .9375rem;
  --fs-lg: 1.0625rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: 3rem;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --gutter: 16px;
  --wrap: 1320px;
  --header-h: 64px;
  --minibar-h: 0px;
  --tabbar-h: 0px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e13;
    --surface: #121820;
    --surface-2: #19212b;
    --surface-3: #222c38;
    --line: #232d3a;
    --line-2: #313d4d;
    --ink: #edf1f5;
    --ink-2: #a6b0bd;
    --ink-3: #737f8f;
    --accent: #ff7a33;
    --accent-hover: #ff8f52;
    --accent-ink: #10151d;
    --accent-soft: #3a2316;
    --accent-text: #ff9a62;
    --live: #ff5a5f;
    --live-soft: #3a1c1f;
    --win: #34c486;
    --win-soft: #143127;
    --warn: #e7b04b;
    --warn-soft: #332810;
    --info: #7a9cff;
    --info-soft: #1a2442;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
    --scrim: rgba(0, 0, 0, .66);
    --stage: #060a10;
    --stage-2: #0f1620;
    --stage-3: #18212e;
    --stage-line: #222e41;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0e13;
  --surface: #121820;
  --surface-2: #19212b;
  --surface-3: #222c38;
  --line: #232d3a;
  --line-2: #313d4d;
  --ink: #edf1f5;
  --ink-2: #a6b0bd;
  --ink-3: #737f8f;
  --accent: #ff7a33;
  --accent-hover: #ff8f52;
  --accent-ink: #10151d;
  --accent-soft: #3a2316;
  --accent-text: #ff9a62;
  --live: #ff5a5f;
  --live-soft: #3a1c1f;
  --win: #34c486;
  --win-soft: #143127;
  --warn: #e7b04b;
  --warn-soft: #332810;
  --info: #7a9cff;
  --info-soft: #1a2442;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
  --scrim: rgba(0, 0, 0, .66);
  --stage: #060a10;
  --stage-2: #0f1620;
  --stage-3: #18212e;
  --stage-line: #222e41;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--minibar-h) + var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
img, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.25; margin: 0; text-wrap: balance; font-weight: 700; letter-spacing: -.01em; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] h4 { letter-spacing: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }
.mono { font-family: var(--f-mono); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.eyebrow { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
[lang="ar"] .eyebrow { letter-spacing: 0; font-size: var(--fs-sm); }
.flip { transform: scaleX(1); }
[dir="rtl"] .flip { transform: scaleX(-1); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 900px) { :root { --gutter: 28px; } }

.icon { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.icon.fill { fill: currentColor; stroke: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 42px; padding: 0 18px; border-radius: var(--r-sm);
  font-weight: 600; font-size: var(--fs-md); white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .08s, box-shadow .15s;
  border: 1px solid transparent; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { opacity: .9; }
.btn-line { border-color: var(--line-2); background: var(--surface); }
.btn-line:hover { border-color: var(--ink-3); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-sm); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--r-sm);
  color: var(--ink-2); position: relative; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 9px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 2px var(--surface); }

/* ---------- chips, pills, badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .4em; min-height: 34px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .x { opacity: .6; margin-inline-start: 2px; }
.chip .count { font-size: var(--fs-xs); color: var(--ink-3); }
.chip.on .count { color: inherit; opacity: .7; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; line-height: 1;
  background: var(--surface-2); color: var(--ink-2);
}
.pill.live { background: var(--live); color: #fff; }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s ease-in-out infinite; }
.pill.soon { background: var(--info-soft); color: var(--info); }
.pill.buy { background: var(--ink); color: var(--bg); }
.pill.sold { background: var(--surface-3); color: var(--ink-2); }
.pill.win { background: var(--win-soft); color: var(--win); }
.pill.lose { background: var(--live-soft); color: var(--live); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 500;
  color: var(--ink-2); padding: 3px 8px; border-radius: 5px; background: var(--surface-2); white-space: nowrap;
}
.tag .icon { width: 13px; height: 13px; }
.tag.good { color: var(--win); background: var(--win-soft); }
.tag.bad { color: var(--live); background: var(--live-soft); }
.tag.caution { color: var(--warn); background: var(--warn-soft); }

/* lot sticker, as written on auction windshields */
.sticker {
  display: inline-flex; align-items: baseline; gap: 5px; direction: ltr;
  font-family: var(--f-mono); font-weight: 600; font-size: 12px; line-height: 1;
  padding: 5px 7px 4px; border-radius: 3px; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .18); letter-spacing: .02em;
}
.sticker small { font-size: 9px; font-weight: 500; opacity: .75; letter-spacing: .08em; }
.sticker.lg { font-size: 15px; padding: 7px 10px 6px; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr .wrap { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  height: 34px; padding: 0 10px; border-radius: 6px; background: var(--accent); color: var(--accent-ink);
  display: inline-grid; place-items: center; font-family: var(--f-brand); font-weight: 700; font-size: 21px; line-height: 1;
}
.brand-word { display: grid; line-height: 1.05; }
.brand-word b { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .14em; }
.brand-word span { font-size: 10.5px; color: var(--ink-3); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: var(--r-sm);
  font-weight: 500; font-size: var(--fs-md); color: var(--ink-2); white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.on { color: var(--ink); background: var(--surface-2); }
.nav a .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.4s infinite; }
.search {
  flex: 1; min-width: 0; max-width: 420px; display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid transparent;
  color: var(--ink-3); transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--ink-3); background: var(--surface); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--ink); font-size: var(--fs-md); }
.search kbd { font-family: var(--f-mono); font-size: 11px; border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; color: var(--ink-3); }
.hdr-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.lang-btn { font-weight: 700; font-size: 14px; width: auto; padding: 0 10px; font-family: var(--f-display); }
.acct {
  display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 6px 0 6px; padding-inline-start: 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); margin-inline-start: 6px;
}
.acct:hover { border-color: var(--line-2); }
.acct-power { display: grid; line-height: 1.1; text-align: start; }
.acct-power small { font-size: 10.5px; color: var(--ink-3); }
.acct-power b { font-size: 13px; font-weight: 600; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 13px; font-family: var(--f-display); }

@media (max-width: 1180px) { .nav a .lbl-long { display: none; } .acct-power { display: none; } .acct { padding-inline-start: 6px; } }
@media (max-width: 980px) { .nav { display: none; } .search { max-width: none; } }
@media (max-width: 640px) {
  .hdr .wrap { gap: 10px; }
  .brand-word { display: none; }
  .search kbd { display: none; }
  .hdr .theme-btn { display: none; }
  .acct { display: none; }
}

/* ---------- page scaffolding ---------- */
main { min-height: 60vh; }
.page { padding-block: 24px 56px; display: grid; gap: 40px; }
.page.tight { gap: 24px; }
.sec { display: grid; gap: 16px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sec-head h2 { font-size: var(--fs-xl); }
.sec-head p { color: var(--ink-2); font-size: var(--fs-sm); margin-top: 2px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--fs-sm); color: var(--accent-text); }
.link-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-3); flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }
.crumbs .icon { width: 14px; height: 14px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title h1 { font-size: var(--fs-2xl); }
.page-title p { color: var(--ink-2); margin-top: 4px; }

/* ---------- live stage (home hero + live page) ---------- */
.stage {
  background: var(--stage); color: var(--stage-ink); border-radius: var(--r-lg);
  overflow: hidden; position: relative; isolation: isolate;
}
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 80% at 15% 0%, rgba(255, 106, 26, .14), transparent 60%),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, .025) 79px 80px);
}
.stage-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; }
.stage-media { position: relative; min-height: 100%; background: var(--stage-2); }
.stage-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: opacity .5s; }
.stage-media .overlay-top { position: absolute; inset-inline: 14px; top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stage-media .overlay-bottom {
  position: absolute; inset-inline: 0; bottom: 0; padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(6, 10, 16, .85), transparent);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; color: #fff;
}
.glass {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  background: rgba(10, 16, 25, .62); color: #fff; font-size: var(--fs-xs); font-weight: 600;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.stage-body { padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stage-eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--stage-ink-2); }
.stage-title { font-size: clamp(1.4rem, 2.3vw, 2rem); color: var(--stage-ink); }
.stage-title small { display: block; font-family: var(--f-body); font-weight: 400; font-size: var(--fs-md); color: var(--stage-ink-2); margin-top: 4px; letter-spacing: 0; }
.stage-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-specs .tag { background: var(--stage-3); color: var(--stage-ink-2); }
.stage-specs .tag.good { background: rgba(52, 196, 134, .14); color: #5fd6a2; }
.stage-specs .tag.bad { background: rgba(255, 90, 95, .14); color: #ff8a8d; }
.stage-specs .tag.caution { background: rgba(231, 176, 75, .14); color: #f0c46f; }
.bidbox { background: var(--stage-2); border: 1px solid var(--stage-line); border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 12px; }
.bidbox-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bidbox .lbl { font-size: var(--fs-xs); color: var(--stage-ink-2); }
.big-bid { font-family: var(--f-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1; letter-spacing: -.02em; color: var(--stage-ink); }
.big-bid.flash { animation: bidflash .7s ease-out; }
@keyframes bidflash { 0% { color: var(--accent); transform: scale(1.06); } 100% { color: var(--stage-ink); transform: scale(1); } }
.leader { font-size: var(--fs-sm); color: var(--stage-ink-2); display: inline-flex; align-items: center; gap: 6px; }
.leader b { color: var(--stage-ink); font-weight: 600; }
.leader.you b { color: #5fd6a2; }
.timer { display: grid; gap: 6px; }
.timer-top { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-sm); }
.call { font-family: var(--f-display); font-weight: 600; }
.stage .call, .minibar .call { color: var(--stage-ink); }
.stage .call.once, .minibar .call.once { color: #f0c46f; }
.stage .call.twice, .minibar .call.twice { color: #ff9a62; }
.stage .call.sold, .minibar .call.sold, .stage .call.next, .minibar .call.next { color: #5fd6a2; }
.card .call { font-family: var(--f-body); font-weight: 500; color: var(--ink-2); }
.card .call.once, .card .call.twice { color: var(--accent-text); }
.card .call.sold { color: var(--win); }
.timer-sec { font-family: var(--f-mono); font-weight: 600; color: var(--stage-ink); }
.bar { height: 6px; border-radius: 99px; background: var(--stage-3); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: inherit; transform-origin: left center; transition: transform .25s linear, background .3s; }
[dir="rtl"] .bar > i { transform-origin: right center; }
.bar.hot > i { background: var(--live); }
.bid-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bid-actions .btn-accent { flex: 1; min-width: 180px; }
.stage .btn-line { background: transparent; border-color: var(--stage-line); color: var(--stage-ink); }
.stage .btn-line:hover { border-color: var(--stage-ink-2); }
.stage .btn-ghost { color: var(--stage-ink-2); }
.stage .btn-ghost:hover { background: var(--stage-3); color: var(--stage-ink); }
.queue { border-top: 1px solid var(--stage-line); padding: 14px 18px 16px; display: grid; gap: 10px; }
.queue-head { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-sm); color: var(--stage-ink-2); }
.queue-head a { color: var(--stage-ink); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.queue-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.q-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border-radius: var(--r-sm); transition: background .15s; }
.q-item:hover { background: var(--stage-2); }
.q-item img { width: 64px; height: 48px; object-fit: cover; border-radius: 5px; background: var(--stage-3); }
.q-item b { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--stage-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item span { font-size: var(--fs-xs); color: var(--stage-ink-2); }
.sold-stamp {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  background: rgba(6, 10, 16, .45);
}
.sold-stamp div {
  font-family: var(--f-display); font-weight: 800; font-size: clamp(2rem, 6vw, 4rem); color: #5fd6a2;
  border: 5px solid currentColor; padding: 4px 24px; border-radius: 10px; transform: rotate(-8deg);
  animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both; text-align: center; line-height: 1.15;
}
.sold-stamp div small { display: block; font-size: .32em; font-weight: 600; letter-spacing: .04em; }
.sold-stamp.you div { color: var(--accent); }
@keyframes stamp { from { transform: rotate(-8deg) scale(2.2); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }

@media (max-width: 1100px) { .queue-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .stage-grid { grid-template-columns: 1fr; }
  .stage-body { padding: 18px 16px; gap: 14px; }
  .queue { padding: 12px 12px 14px; }
}
@media (max-width: 520px) { .queue-list { grid-template-columns: 1fr; } .q-item:nth-child(n+3) { display: none; } }

/* ---------- quick browse ---------- */
.quick { display: grid; gap: 14px; }
.body-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.body-tile {
  display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.body-tile:hover { border-color: var(--ink-3); transform: translateY(-2px); box-shadow: var(--shadow); }
.body-tile svg { width: 74px; height: 34px; color: var(--ink); }
.body-tile b { font-size: var(--fs-sm); font-weight: 600; }
.body-tile span { font-size: var(--fs-xs); color: var(--ink-3); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip-row::-webkit-scrollbar { display: none; }
@media (max-width: 900px) { .body-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 120px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } }

/* ---------- car cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.row-scroll > * { scroll-snap-align: start; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s, border-color .2s; position: relative; min-width: 0;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--line-2); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-media .tl { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; }
.card-media .tr { position: absolute; top: 8px; inset-inline-end: 8px; }
.card-media .bl { position: absolute; bottom: 10px; inset-inline-start: 10px; display: flex; gap: 6px; }
.card-media .br { position: absolute; bottom: 10px; inset-inline-end: 10px; display: flex; gap: 6px; }
.heart {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 16, 25, .5); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform .15s, background .15s;
}
.heart:hover { transform: scale(1.08); background: rgba(10, 16, 25, .7); }
.heart.on { color: var(--accent); }
.heart.on .icon { fill: currentColor; }
.card-body { padding: 12px 14px 14px; display: grid; gap: 8px; flex: 1; align-content: start; }
.card-title { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-lg); line-height: 1.3; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.card-meta { font-size: var(--fs-sm); color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-meta .icon { width: 14px; height: 14px; color: var(--ink-3); }
.card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.card-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 12px 14px;
  border-top: 1px dashed var(--line); margin-top: auto;
}
.price-lbl { font-size: var(--fs-xs); color: var(--ink-3); }
.price { font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; line-height: 1.15; }
.price.sm { font-size: 1.05rem; }
.foot-side { text-align: end; font-size: var(--fs-xs); color: var(--ink-2); display: grid; gap: 2px; }
.foot-side b { font-size: var(--fs-sm); color: var(--ink); font-weight: 600; }
.card .heart, .card .btn, .card .pill { position: relative; z-index: 1; }
.card-media .tl, .card-media .tr, .card-media .bl, .card-media .br { z-index: 1; }

/* list view */
.list { display: grid; gap: 12px; }
.list .card { flex-direction: row; }
.list .card-media { width: 300px; flex: none; aspect-ratio: auto; min-height: 210px; }
.list .card-content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.list .card-foot { border-top: 0; padding-top: 0; }
.list .specs-inline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 16px; font-size: var(--fs-sm); }
.list .specs-inline div { display: grid; }
.list .specs-inline small { color: var(--ink-3); font-size: var(--fs-xs); }
@media (max-width: 720px) {
  .list .card { flex-direction: column; }
  .list .card-media { width: 100%; aspect-ratio: 4 / 3; min-height: 0; }
  .list .specs-inline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- schedule strip ---------- */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day {
  display: grid; gap: 2px; padding: 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line);
  text-align: start; transition: border-color .15s, background .15s; position: relative;
}
.day:hover { border-color: var(--ink-3); }
.day .d-name { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.day .d-num { font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; line-height: 1.2; }
.day .d-lots { font-size: var(--fs-xs); color: var(--ink-2); }
.day.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.day.on .d-name, .day.on .d-lots { color: inherit; opacity: .75; }
.day.off { opacity: .5; pointer-events: none; background: transparent; border-style: dashed; }
.day .live-flag { position: absolute; top: 10px; inset-inline-end: 10px; }
@media (max-width: 760px) { .days { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 92px; overflow-x: auto; padding-bottom: 6px; } }

/* ---------- just sold ---------- */
.sold-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 18px; }
.sold-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sold-row:nth-last-child(-n+2) { border-bottom: 0; }
.sold-row img { width: 56px; height: 42px; border-radius: 5px; object-fit: cover; background: var(--surface-2); }
.sold-row b { font-size: var(--fs-sm); font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sold-row span { font-size: var(--fs-xs); color: var(--ink-3); }
.sold-price { text-align: end; display: grid; }
.sold-price b { font-family: var(--f-display); font-size: var(--fs-md); }
.delta { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); }
.delta.up { color: var(--win); }
.delta.down { color: var(--live); }
@media (max-width: 760px) { .sold-list { grid-template-columns: 1fr; } .sold-row:nth-last-child(2) { border-bottom: 1px solid var(--line); } }

/* ---------- how it works ---------- */
.how { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.step { padding: 20px 18px; display: grid; gap: 8px; align-content: start; border-inline-end: 1px solid var(--line); }
.step:last-child { border-inline-end: 0; }
.step-n { font-family: var(--f-mono); font-size: var(--fs-sm); color: var(--accent-text); font-weight: 600; }
.step b { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-md); }
.step p { font-size: var(--fs-sm); color: var(--ink-2); }
.power-card { background: var(--ink); color: var(--bg); border-radius: var(--r-md); padding: 22px; display: grid; gap: 14px; align-content: start; }
.power-card h3 { font-size: var(--fs-lg); }
.power-card p { font-size: var(--fs-sm); opacity: .78; }
.power-eq { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--f-display); }
.power-eq div { display: grid; }
.power-eq small { font-family: var(--f-body); font-size: var(--fs-xs); opacity: .65; }
.power-eq b { font-size: 1.6rem; }
.power-eq .op { font-size: 1.3rem; opacity: .5; }
.power-eq .res b { color: var(--accent); }
@media (max-width: 1000px) { .how { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr 1fr; } .step:nth-child(2) { border-inline-end: 0; } .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ---------- browse ---------- */
.browse { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; align-items: start; }
.rail {
  position: sticky; top: calc(var(--header-h) + 16px + env(safe-area-inset-top, 0px));
  max-height: calc(100vh - var(--header-h) - 32px - var(--minibar-h)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); scrollbar-width: thin;
}
.rail-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.rail-head b { font-family: var(--f-display); font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.rail-head button { font-size: var(--fs-sm); color: var(--accent-text); font-weight: 600; }
.fgroup { border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; cursor: pointer; font-weight: 600; font-size: var(--fs-sm); }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary .icon { transition: transform .2s; color: var(--ink-3); }
.fgroup[open] > summary .icon { transform: rotate(180deg); }
.fgroup > summary .n { margin-inline-start: auto; margin-inline-end: 8px; font-size: var(--fs-xs); background: var(--accent); color: var(--accent-ink); border-radius: 99px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; padding: 0 5px; }
.fbody { padding: 0 16px 16px; display: grid; gap: 8px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg button { height: 32px; border-radius: 5px; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); white-space: nowrap; padding: 0 8px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); font-weight: 600; }
.check { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); cursor: pointer; padding: 3px 0; color: var(--ink); }
.check input { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--line-2); border-radius: 5px; display: grid; place-items: center; flex: none; margin: 0; background: var(--surface); transition: background .12s, border-color .12s; cursor: pointer; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--bg); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check .c { margin-inline-start: auto; font-size: var(--fs-xs); color: var(--ink-3); }
.check.dim { opacity: .45; }
.fsearch { height: 36px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); padding: 0 10px; font-size: var(--fs-sm); width: 100%; }
.fsearch:focus { outline: none; border-color: var(--ink-3); }
.more-btn { justify-self: start; font-size: var(--fs-sm); color: var(--accent-text); font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); position: relative; transition: transform .12s; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.body-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.body-pick { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: var(--r-sm); border: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-2); transition: border-color .12s, background .12s; }
.body-pick svg { width: 54px; height: 24px; color: var(--ink); }
.body-pick:hover { border-color: var(--ink-3); }
.body-pick.on { border-color: var(--ink); background: var(--surface-2); color: var(--ink); font-weight: 600; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); cursor: pointer; padding: 4px 0; }
.toggle input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .15s; flex: none; margin: 0; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.toggle input:checked { background: var(--win); }
.toggle input:checked::after { inset-inline-start: 19px; }

/* dual range with histogram */
.range { display: grid; gap: 10px; }
.histo { display: flex; align-items: flex-end; gap: 2px; height: 44px; padding-inline: 2px; }
.histo i { flex: 1; background: var(--surface-3); border-radius: 2px 2px 0 0; min-height: 2px; transition: background .15s; }
.histo i.in { background: var(--accent); }
.dual { position: relative; height: 22px; }
.dual .track { position: absolute; inset-inline: 0; top: 9px; height: 4px; border-radius: 99px; background: var(--surface-3); }
.dual .fill { position: absolute; top: 9px; height: 4px; border-radius: 99px; background: var(--ink); }
.dual input[type="range"] { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; appearance: none; -webkit-appearance: none; height: 22px; }
.dual input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); cursor: grab; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.dual input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); cursor: grab; }
.dual input[type="range"]::-moz-range-track { background: transparent; }
.range-vals { display: flex; justify-content: space-between; gap: 8px; }
.range-vals span { font-size: var(--fs-sm); font-weight: 600; background: var(--surface-2); padding: 3px 8px; border-radius: 5px; }

.results-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.results-bar h1 { font-size: var(--fs-xl); }
.results-bar .count { color: var(--ink-2); font-size: var(--fs-sm); }
.results-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.select { height: 38px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); padding: 0 12px; padding-inline-end: 30px; font-size: var(--fs-sm); appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-size: 5px 5px; background-repeat: no-repeat; background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; cursor: pointer; }
[dir="rtl"] .select { background-position: 15px 16px, 10px 16px; }
.viewtog { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.viewtog button { width: 38px; height: 36px; display: grid; place-items: center; color: var(--ink-3); }
.viewtog button.on { background: var(--surface-2); color: var(--ink); }
.active-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.active-chips .chip { min-height: 30px; padding: 0 10px; background: var(--surface-2); border-color: transparent; color: var(--ink); }
.empty { text-align: center; padding: 60px 20px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r-md); display: grid; gap: 10px; justify-items: center; }
.empty h3 { font-size: var(--fs-lg); }
.empty p { color: var(--ink-2); font-size: var(--fs-sm); max-width: 380px; }
.filters-fab { display: none; }
.save-search { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--ink); font-size: var(--fs-sm); flex-wrap: wrap; }
.save-search .icon { color: var(--accent-text); }
.save-search p { flex: 1; min-width: 200px; }
@media (max-width: 980px) {
  .browse { grid-template-columns: 1fr; }
  .rail {
    position: fixed; inset: auto 0 0 0; top: auto; max-height: 86vh; z-index: 70; border-radius: 18px 18px 0 0;
    transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg);
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .rail.open { transform: none; }
  .rail-foot { position: fixed; inset-inline: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 10px; }
  .filters-fab { display: inline-flex; }
}
@media (min-width: 981px) { .rail-foot { display: none; } .rail .sheet-close { display: none; } }
.sheet-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 65; opacity: 0; pointer-events: none; transition: opacity .25s; }
.sheet-scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- lot page ---------- */
.lot {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px 28px; align-items: start;
  grid-template-areas: "head aside" "gal aside" "rest aside"; grid-template-rows: auto auto 1fr;
}
.lot > .lot-head { grid-area: head; }
.lot > .gallery { grid-area: gal; min-width: 0; }
.lot > .lot-aside { grid-area: aside; align-self: stretch; }
.lot > .lot-rest { grid-area: rest; display: grid; gap: 30px; min-width: 0; align-content: start; }
.lot-head { display: grid; gap: 10px; }
.lot-head h1 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.lot-head .sub { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; color: var(--ink-2); font-size: var(--fs-sm); }
.lot-head .sub .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.lot-head-actions { display: flex; gap: 8px; }
.lot-main { display: grid; gap: 28px; min-width: 0; }

.gallery { display: grid; gap: 12px; }
.mtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.mtabs::-webkit-scrollbar { display: none; }
.mtab {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 12px; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s, border-color .15s;
}
.mtab:hover { color: var(--ink); }
.mtab.on { color: var(--ink); border-color: var(--accent); }
.mtab .icon { width: 17px; height: 17px; }
.mtab .c { font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); padding: 1px 7px; border-radius: 99px; }
.mtab.on .c { background: var(--accent); color: var(--accent-ink); }
.mtab-note { font-size: var(--fs-sm); color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mtab-note .icon { color: var(--ink-3); }
.viewer { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); aspect-ratio: 3 / 2; max-height: 64vh; width: 100%; }
@media (max-width: 640px) { .viewer { aspect-ratio: 4 / 3; } }
.viewer img, .viewer video { width: 100%; height: 100%; object-fit: cover; }
.viewer video { object-fit: contain; background: #000; }
.viewer .nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(10, 16, 25, .55); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s, background .15s;
}
.viewer:hover .nav-arrow, .viewer:focus-within .nav-arrow { opacity: 1; }
.viewer .nav-arrow:hover { background: rgba(10, 16, 25, .8); }
.viewer .prev { inset-inline-start: 12px; }
.viewer .next { inset-inline-end: 12px; }
.viewer .v-top { position: absolute; top: 12px; inset-inline: 12px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.viewer .v-top > * { pointer-events: auto; }
.viewer .v-cap {
  position: absolute; inset-inline: 0; bottom: 0; padding: 36px 14px 12px; color: #fff;
  background: linear-gradient(to top, rgba(6, 10, 16, .78), transparent); display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; font-size: var(--fs-sm);
}
.viewer .v-cap b { font-weight: 600; display: block; }
.viewer .v-cap span { opacity: .8; font-size: var(--fs-xs); }
.viewer.is-damage::after { content: ""; position: absolute; inset: 0; border: 3px solid var(--live); border-radius: inherit; pointer-events: none; opacity: .6; }
@media (hover: none) { .viewer .nav-arrow { opacity: 1; width: 38px; height: 38px; } }
.thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.thumb { flex: none; width: 92px; aspect-ratio: 4 / 3; border-radius: 7px; overflow: hidden; position: relative; opacity: .65; transition: opacity .15s, box-shadow .15s; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.on { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .25); }
.thumb .dur { position: absolute; bottom: 4px; inset-inline-end: 4px; font-size: 10px; font-family: var(--f-mono); background: rgba(0, 0, 0, .65); color: #fff; padding: 0 4px; border-radius: 3px; }

.dmg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 16px; align-items: start; }
.dmg-map { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: grid; gap: 10px; }
.dmg-map h4 { font-size: var(--fs-sm); font-weight: 600; font-family: var(--f-body); }
.dmg-map p { font-size: var(--fs-xs); color: var(--ink-3); }
.carmap { width: 100%; max-width: 180px; justify-self: center; }
.carmap .p { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.2; transition: fill .15s; }
.carmap .glass { fill: var(--surface-3); stroke: var(--line-2); stroke-width: 1; }
.carmap .hit { fill: var(--live); fill-opacity: .25; stroke: var(--live); stroke-width: 1.5; cursor: pointer; }
.carmap .hit:hover, .carmap .hit.on { fill-opacity: .55; }
.carmap .hit-dot { fill: var(--live); }
.carmap .lbl { font-family: var(--f-mono); font-size: 9px; fill: var(--ink-3); }
@media (max-width: 760px) { .dmg-layout { grid-template-columns: 1fr; } .dmg-map { grid-template-columns: 120px minmax(0, 1fr); align-items: center; } .dmg-map .carmap { max-width: 110px; grid-row: span 3; } }

/* sonar */
.sonar { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; align-items: start; }
.sonar-fig { display: grid; justify-items: center; gap: 8px; }
.sonar-fig svg { width: 100%; max-width: 230px; }
.sonar .p { stroke: var(--surface); stroke-width: 2; cursor: pointer; transition: opacity .15s, filter .15s; }
.sonar .p:hover, .sonar .p.on { filter: brightness(1.12) saturate(1.2); }
.sonar .p.orig { fill: var(--panel-orig); }
.sonar .p.paint { fill: var(--panel-paint); }
.sonar .p.filler { fill: var(--panel-filler); }
.sonar .p.replaced { fill: var(--panel-replaced); }
.sonar .glass { fill: var(--surface-3); stroke: var(--surface); stroke-width: 2; }
.sonar .um { font-family: var(--f-mono); font-size: 10px; font-weight: 600; fill: #fff; pointer-events: none; text-anchor: middle; dominant-baseline: middle; }
.sonar .whl { fill: var(--ink); opacity: .85; }
.sonar-side { display: grid; gap: 14px; min-width: 0; }
.sonar-side h3 { font-size: var(--fs-lg); }
.sonar-side > p { font-size: var(--fs-sm); color: var(--ink-2); }
.legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.legend b { margin-inline-start: auto; font-family: var(--f-mono); font-size: var(--fs-sm); }
.legend small { display: block; font-size: 11px; color: var(--ink-3); }
.panel-detail { padding: 12px 14px; border-radius: var(--r-sm); border: 1px dashed var(--line-2); font-size: var(--fs-sm); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 54px; }
.panel-detail b { font-family: var(--f-display); font-weight: 600; }
.verdict { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); background: var(--win-soft); color: var(--ink); font-size: var(--fs-sm); }
.verdict .icon { color: var(--win); width: 22px; height: 22px; }
.verdict.caution { background: var(--warn-soft); }
.verdict.caution .icon { color: var(--warn); }
@media (max-width: 760px) { .sonar { grid-template-columns: 1fr; } .legend { grid-template-columns: 1fr 1fr; } }

/* documents */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.doc { display: grid; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); text-align: start; transition: border-color .15s, box-shadow .15s; }
.doc:hover { border-color: var(--ink-3); box-shadow: var(--shadow); }
.doc-paper {
  aspect-ratio: 1 / 1.2; border-radius: 4px; background: #fbfaf7; border: 1px solid #e6e2d8; padding: 12px 11px; display: grid; gap: 5px; align-content: start;
  position: relative; overflow: hidden; color: #2a2f38;
}
.doc-paper .dh { font-family: var(--f-display); font-size: 9.5px; font-weight: 700; color: #1d2430; display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.doc-paper .dh i { width: 16px; height: 16px; border-radius: 3px; background: var(--accent); flex: none; }
.doc-paper .ln { height: 4px; border-radius: 2px; background: #e4e0d6; }
.doc-paper .ln.s { width: 60%; }
.doc-paper .ln.m { width: 80%; }
.doc-paper .tbl { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 4px; }
.doc-paper .tbl i { height: 10px; border-radius: 2px; background: #efece4; }
.doc-paper .stamp-mini { position: absolute; bottom: 12px; inset-inline-end: 10px; width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(15, 138, 85, .55); transform: rotate(-14deg); display: grid; place-items: center; font-size: 7px; font-weight: 700; color: rgba(15, 138, 85, .8); font-family: var(--f-mono); }
.doc-paper .stamp-mini.red { border-color: rgba(229, 56, 59, .55); color: rgba(229, 56, 59, .85); }
.doc-paper .wm { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-mono); font-weight: 700; font-size: 18px; color: rgba(0, 0, 0, .05); transform: rotate(-30deg); letter-spacing: .2em; pointer-events: none; }
.doc b { font-size: var(--fs-sm); font-weight: 600; display: block; }
.doc span { font-size: var(--fs-xs); color: var(--ink-3); }

/* videos */
.vids { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
.vid-list { display: grid; gap: 8px; }
.vid-item { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border-radius: var(--r-sm); border: 1px solid transparent; text-align: start; transition: background .15s, border-color .15s; }
.vid-item:hover { background: var(--surface-2); }
.vid-item.on { border-color: var(--accent); background: var(--surface); }
.vid-item .thumb { width: 96px; opacity: 1; }
.vid-item b { font-size: var(--fs-sm); font-weight: 600; display: block; }
.vid-item span { font-size: var(--fs-xs); color: var(--ink-3); }
@media (max-width: 760px) { .vids { grid-template-columns: 1fr; } }

/* bid panel */
.bidpanel { position: sticky; top: calc(var(--header-h) + 16px + env(safe-area-inset-top, 0px)); display: grid; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.panel-pad { padding: 18px; display: grid; gap: 14px; }
.bp-status { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.bp-when { font-size: var(--fs-sm); color: var(--ink-2); display: grid; gap: 2px; }
.bp-when b { color: var(--ink); font-weight: 600; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.countdown div { background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 4px 6px; text-align: center; display: grid; }
.countdown b { font-family: var(--f-mono); font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
.countdown small { font-size: 10.5px; color: var(--ink-3); }
.cur-bid { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.cur-bid .price { font-size: 2rem; line-height: 1; }
.cur-bid .bids-n { font-size: var(--fs-sm); color: var(--ink-2); text-align: end; }
.reserve { font-size: var(--fs-xs); display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); }
.reserve .icon { width: 14px; height: 14px; }
.reserve.met { color: var(--win); }
.my-status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); }
.my-status.win { background: var(--win-soft); }
.my-status.win .icon { color: var(--win); }
.my-status.lose { background: var(--live-soft); }
.my-status.lose .icon { color: var(--live); }
.bid-input { display: flex; align-items: stretch; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); transition: border-color .15s; }
.bid-input:focus-within { border-color: var(--ink); }
.bid-input span { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); font-weight: 600; color: var(--ink-2); font-family: var(--f-mono); }
.bid-input input { flex: 1; min-width: 0; width: 100%; border: 0; outline: none; padding: 0 12px; height: 48px; font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; background: transparent; direction: ltr; text-align: left; }
.incs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.incs button { height: 34px; border-radius: var(--r-sm); border: 1px solid var(--line-2); font-size: var(--fs-sm); font-weight: 600; transition: border-color .12s, background .12s; }
.incs button:hover { border-color: var(--ink); background: var(--surface-2); }
.hint { font-size: var(--fs-xs); color: var(--ink-3); display: flex; gap: 6px; align-items: flex-start; }
.hint .icon { width: 14px; height: 14px; margin-top: 2px; }
.or { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); color: var(--ink-3); }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.buynow-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); flex-wrap: wrap; }
.buynow-box .price { font-size: 1.4rem; }
.fees { border-top: 1px solid var(--line); }
.fees > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; cursor: pointer; gap: 10px; }
.fees > summary::-webkit-details-marker { display: none; }
.fees > summary .t { font-size: var(--fs-sm); color: var(--ink-2); display: grid; }
.fees > summary .t b { color: var(--ink); font-family: var(--f-display); font-size: var(--fs-lg); }
.fees > summary .icon { transition: transform .2s; color: var(--ink-3); }
.fees[open] > summary .icon { transform: rotate(180deg); }
.fee-rows { padding: 0 18px 16px; display: grid; gap: 8px; font-size: var(--fs-sm); }
.fee-row { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-2); }
.fee-row b { color: var(--ink); font-weight: 500; }
.fee-row.total { border-top: 1px solid var(--line); padding-top: 10px; color: var(--ink); font-weight: 600; }
.fee-row.total b { font-family: var(--f-display); font-size: var(--fs-lg); font-weight: 700; }
.fee-row select { height: 30px; font-size: var(--fs-xs); padding-block: 0; background-position: calc(100% - 13px) 12px, calc(100% - 8px) 12px; }
[dir="rtl"] .fee-row select { background-position: 13px 12px, 8px 12px; }
.power-mini { display: grid; gap: 6px; font-size: var(--fs-xs); color: var(--ink-2); }
.power-mini .bar { background: var(--surface-2); height: 6px; }
.power-mini .bar > i { background: var(--win); }
.power-mini .row { display: flex; justify-content: space-between; }
.seller-card { display: flex; gap: 12px; align-items: center; font-size: var(--fs-sm); }
.seller-card .logo { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); }
.seller-card b { display: block; }
.seller-card span { color: var(--ink-3); font-size: var(--fs-xs); }

.lot-sec { display: grid; gap: 14px; }
.lot-sec > h2 { font-size: var(--fs-xl); display: flex; align-items: center; gap: 10px; }
.lot-sec > h2 .icon { color: var(--ink-3); }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.spec { padding: 12px 16px; display: grid; gap: 2px; border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); min-width: 0; }
.spec small { font-size: var(--fs-xs); color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; }
.spec small .icon { width: 13px; height: 13px; }
.spec b { font-weight: 600; font-size: var(--fs-md); overflow-wrap: anywhere; }
.spec b .sub { font-weight: 400; color: var(--ink-3); font-size: var(--fs-sm); }
.spec .vin { display: inline-flex; align-items: center; gap: 6px; }
.spec .vin button { color: var(--ink-3); }
.spec .vin button:hover { color: var(--ink); }
@media (max-width: 900px) { .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.inspect { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; align-items: center; }
.score { display: grid; justify-items: center; gap: 4px; text-align: center; }
.score svg { width: 132px; height: 132px; }
.score .ring-bg { stroke: var(--surface-2); }
.score .ring { stroke: var(--win); transition: stroke-dashoffset 1s ease; }
.score-n { font-family: var(--f-display); font-weight: 700; font-size: 2.2rem; fill: var(--ink); }
.score-d { font-size: 11px; fill: var(--ink-3); font-family: var(--f-body); }
.score p { font-size: var(--fs-sm); font-weight: 600; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.chk { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); padding: 7px 0; border-bottom: 1px dashed var(--line); }
.chk .st { margin-inline-start: auto; }
.chk .ok { color: var(--win); }
.chk .att { color: var(--warn); }
.chk .bad { color: var(--live); }
@media (max-width: 760px) { .inspect { grid-template-columns: 1fr; } .checks { grid-template-columns: 1fr; } }

.timeline { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 18px; }
.tl-row { display: grid; grid-template-columns: 96px 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; position: relative; }
.tl-row::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: calc(96px + 12px + 10px); width: 2px; background: var(--line); }
.tl-row:first-child::before { top: 18px; }
.tl-row:last-child::before { bottom: calc(100% - 18px); }
.tl-date { font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--ink-3); padding-top: 3px; text-align: end; }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); display: grid; place-items: center; position: relative; z-index: 1; }
.tl-dot .icon { width: 12px; height: 12px; }
.tl-dot.bad { border-color: var(--live); color: var(--live); }
.tl-dot.good { border-color: var(--win); color: var(--win); }
.tl-dot.now { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.tl-body b { font-size: var(--fs-sm); font-weight: 600; display: block; }
.tl-body span { font-size: var(--fs-xs); color: var(--ink-2); }

.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 10px; }
.chart-card .ch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.chart-card .ch-head b { font-family: var(--f-display); font-size: var(--fs-md); font-weight: 600; }
.chart-card .ch-head p { font-size: var(--fs-xs); color: var(--ink-3); }
.chart-card .ch-stats { display: flex; gap: 18px; }
.chart-card .ch-stats div { display: grid; text-align: end; }
.chart-card .ch-stats small { font-size: var(--fs-xs); color: var(--ink-3); }
.chart-card .ch-stats b { font-family: var(--f-display); font-size: var(--fs-md); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--line); stroke-dasharray: 2 4; }
.chart .axis-t { font-family: var(--f-mono); font-size: 10px; fill: var(--ink-3); }
.chart .dot { fill: var(--ink-2); fill-opacity: .55; }
.chart .avg { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 5 4; fill: none; }
.chart .avg-t { font-size: 10px; fill: var(--ink-2); font-family: var(--f-body); }
.chart .me { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .me-line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart .me-t { font-size: 11px; font-weight: 600; fill: var(--accent-text); font-family: var(--f-body); }
.chart .area { fill: var(--accent); fill-opacity: .08; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; }
.chart .bar-r { fill: var(--surface-3); }
.chart .bar-r.hi { fill: var(--accent); }
.chart .bar-t { font-size: 11px; fill: var(--ink-2); font-family: var(--f-body); }
.chart .bar-v { font-size: 11px; fill: var(--ink); font-family: var(--f-mono); font-weight: 600; }

.history { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.history table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.history th { text-align: start; font-weight: 500; font-size: var(--fs-xs); color: var(--ink-3); padding: 10px 16px; background: var(--surface-2); }
.history td { padding: 10px 16px; border-top: 1px solid var(--line); }
.history tr.you td { background: var(--win-soft); }
.history td:last-child, .history th:last-child { text-align: end; }

.mobile-cta { display: none; }
@media (max-width: 1060px) {
  .lot { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "gal" "aside" "rest"; grid-template-rows: none; }
  .bidpanel { position: static; }
  .mobile-cta {
    display: flex; position: fixed; inset-inline: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); z-index: 45;
    background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px; gap: 12px; align-items: center; justify-content: space-between;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .08);
  }
  .mobile-cta .price { font-size: 1.25rem; }
  .mobile-cta .btn { flex: none; }
}

/* ---------- live page ---------- */
.live-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.live-main .stage-grid { grid-template-columns: 1fr; }
.live-main .stage-media img { aspect-ratio: 16 / 9; max-height: 58vh; }
.live-main .stage-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.live-info { display: grid; gap: 14px; min-width: 0; }
.live-side { display: grid; gap: 14px; }
.feed { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; }
.feed-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.feed-head b { font-family: var(--f-display); font-weight: 600; font-size: var(--fs-md); }
.feed-list { display: grid; max-height: 320px; overflow-y: auto; scrollbar-width: thin; }
.feed-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.feed-item.fresh { animation: feedin .4s ease-out; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .av { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-2); font-family: var(--f-mono); }
.feed-item.you .av { background: var(--win); color: #fff; }
.feed-item.sys { color: var(--ink-3); font-size: var(--fs-xs); grid-template-columns: 32px minmax(0, 1fr); }
.feed-item.sys .av { background: transparent; }
.feed-item b { font-weight: 600; }
.feed-item span { color: var(--ink-3); font-size: var(--fs-xs); display: block; }
.feed-item .amt { font-family: var(--f-display); font-weight: 700; }
.feed-item.you .amt { color: var(--win); }
@keyframes feedin { from { transform: translateY(-6px); background: var(--accent-soft); } to { transform: none; } }
.lane-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.lane-row { display: grid; grid-template-columns: 28px 72px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); position: relative; }
.lane-row:last-child { border-bottom: 0; }
.lane-row .n { font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--ink-3); text-align: center; }
.lane-row img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.lane-row b { display: block; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-row span { font-size: var(--fs-xs); color: var(--ink-3); }
.lane-row.now { background: var(--accent-soft); }
.lane-row.done { opacity: .5; }
.lane-row a.cover::after { content: ""; position: absolute; inset: 0; }
.lane-row .btn { position: relative; z-index: 1; }
.lane-progress { display: grid; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: var(--fs-xs); color: var(--ink-2); }
.lane-progress .bar { background: var(--surface-2); height: 5px; }
.lane-progress .bar > i { background: var(--ink); }
.live-tools { display: flex; gap: 6px; }
.big-bid-btn { min-height: 64px; font-size: 1.25rem; border-radius: var(--r-md); }
.big-bid-btn small { font-weight: 500; font-size: .7em; opacity: .75; }
.max-row { display: flex; gap: 8px; align-items: stretch; }
.max-row .bid-input { flex: 1; min-width: 0; border-color: var(--stage-line); background: var(--stage-2); }
.max-row .bid-input span { background: var(--stage-3); color: var(--stage-ink-2); }
.max-row .bid-input input { color: var(--stage-ink); height: 42px; font-size: 1rem; }
.max-row .btn { min-height: 44px; }
.stat-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat-line div { background: var(--stage-2); border: 1px solid var(--stage-line); border-radius: var(--r-sm); padding: 8px 10px; display: grid; }
.stat-line small { font-size: 11px; color: var(--stage-ink-2); }
.stat-line b { font-family: var(--f-display); font-size: var(--fs-md); color: var(--stage-ink); }
@media (max-width: 1100px) { .live-wrap { grid-template-columns: 1fr; } .live-main .stage-body { grid-template-columns: 1fr; } }

/* ---------- upcoming ---------- */
.runlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.run-row { display: grid; grid-template-columns: 56px 110px minmax(0, 1fr) 150px 170px; gap: 16px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); position: relative; }
.run-row:last-child { border-bottom: 0; }
.run-row:hover { background: var(--surface-2); }
.run-row .ord { display: grid; text-align: center; }
.run-row .ord b { font-family: var(--f-mono); font-size: var(--fs-lg); }
.run-row .ord span { font-size: 11px; color: var(--ink-3); font-family: var(--f-mono); }
.run-row img { width: 110px; height: 82px; object-fit: cover; border-radius: 7px; background: var(--surface-2); }
.run-row .info { display: grid; gap: 4px; min-width: 0; }
.run-row .info b { font-family: var(--f-display); font-weight: 600; }
.run-row .info a::after { content: ""; position: absolute; inset: 0; }
.run-row .pb { display: grid; text-align: end; font-size: var(--fs-xs); color: var(--ink-3); }
.run-row .pb b { font-family: var(--f-display); font-size: var(--fs-lg); color: var(--ink); }
.run-row .acts { display: flex; gap: 6px; justify-content: flex-end; position: relative; z-index: 1; }
.run-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.run-head b { font-family: var(--f-display); font-weight: 600; }
.run-head span { font-size: var(--fs-sm); color: var(--ink-2); }
@media (max-width: 900px) {
  .run-row { grid-template-columns: 40px 88px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
  .run-row img { width: 88px; height: 66px; }
  .run-row .pb { grid-column: 3; text-align: start; }
  .run-row .acts { grid-column: 1 / -1; justify-content: stretch; }
  .run-row .acts .btn { flex: 1; }
}

/* ---------- results ---------- */
.res-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow-x: auto; }
.rtable { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 720px; }
.rtable th { text-align: start; font-weight: 500; font-size: var(--fs-xs); color: var(--ink-3); padding: 11px 14px; background: var(--surface-2); white-space: nowrap; }
.rtable td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.rtable tr:hover td { background: var(--surface-2); }
.rtable .car { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.rtable .car img { width: 60px; height: 45px; border-radius: 5px; object-fit: cover; background: var(--surface-2); }
.rtable .car b { font-weight: 600; display: block; }
.rtable .car span { font-size: var(--fs-xs); color: var(--ink-3); }
.rtable .r { text-align: end; }
.rtable .sp { font-family: var(--f-display); font-weight: 700; font-size: var(--fs-md); }
.res-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.res-tools .search { max-width: 280px; background: var(--surface); border-color: var(--line-2); }
@media (max-width: 1060px) { .res-grid { grid-template-columns: 1fr; } }

/* ---------- garage ---------- */
.garage-top { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 12px; }
.g-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: grid; gap: 6px; align-content: start; }
.g-card small { font-size: var(--fs-xs); color: var(--ink-3); }
.g-card b { font-family: var(--f-display); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.g-card p { font-size: var(--fs-xs); color: var(--ink-2); }
.g-card.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.g-card.dark small, .g-card.dark p { color: inherit; opacity: .7; }
.g-card.dark .bar { background: rgba(255, 255, 255, .15); }
:root[data-theme="dark"] .g-card.dark .bar { background: rgba(0, 0, 0, .15); }
.g-card.dark .bar > i { background: var(--accent); }
.gtabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.gtabs::-webkit-scrollbar { display: none; }
.g-list { display: grid; gap: 10px; }
.g-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; position: relative; }
.g-row img { width: 120px; height: 90px; object-fit: cover; border-radius: 7px; background: var(--surface-2); }
.g-row .info { display: grid; gap: 5px; min-width: 0; }
.g-row .info b { font-family: var(--f-display); font-weight: 600; }
.g-row .info a::after { content: ""; position: absolute; inset: 0; }
.g-row .side { display: grid; gap: 6px; justify-items: end; text-align: end; position: relative; z-index: 1; }
.g-row .side .price { font-size: 1.15rem; }
.progress-steps { display: flex; gap: 0; margin-top: 6px; }
.ps { flex: 1; display: grid; gap: 5px; font-size: 11px; color: var(--ink-3); }
.ps i { height: 4px; background: var(--surface-3); border-radius: 0; }
.ps:first-child i { border-start-start-radius: 99px; border-end-start-radius: 99px; }
.ps:last-child i { border-start-end-radius: 99px; border-end-end-radius: 99px; }
.ps.done i { background: var(--win); }
.ps.cur i { background: linear-gradient(90deg, var(--win) 50%, var(--surface-3) 50%); }
[dir="rtl"] .ps.cur i { background: linear-gradient(270deg, var(--win) 50%, var(--surface-3) 50%); }
.ps.done, .ps.cur { color: var(--ink); }
@media (max-width: 900px) { .garage-top { grid-template-columns: 1fr 1fr; } .garage-top .g-card:first-child { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .g-row { grid-template-columns: 96px minmax(0, 1fr); }
  .g-row img { width: 96px; height: 72px; }
  .g-row .side { grid-column: 1 / -1; justify-items: stretch; text-align: start; grid-template-columns: 1fr auto; align-items: center; }
}

/* ---------- mini live bar ---------- */
.minibar {
  position: fixed; inset-inline: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); z-index: 50;
  background: var(--stage); color: var(--stage-ink); border-top: 1px solid var(--stage-line);
  transform: translateY(0); transition: transform .3s ease;
}
.minibar.hide { transform: translateY(120%); }
.minibar .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
.minibar img { width: 62px; height: 46px; object-fit: cover; border-radius: 6px; background: var(--stage-3); }
.mb-info { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.mb-info b { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-info span { font-size: var(--fs-xs); color: var(--stage-ink-2); display: flex; gap: 8px; align-items: center; }
.mb-bid { display: grid; text-align: end; line-height: 1.15; }
.mb-bid small { font-size: 11px; color: var(--stage-ink-2); }
.mb-bid b { font-family: var(--f-display); font-size: 1.2rem; }
.mb-bid b.flash { animation: bidflash .7s ease-out; }
.mb-timer { width: 46px; height: 46px; position: relative; flex: none; }
.mb-timer svg { width: 46px; height: 46px; transform: rotate(-90deg); }
.mb-timer circle { fill: none; stroke-width: 4; }
.mb-timer .bg { stroke: var(--stage-3); }
.mb-timer .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.mb-timer.hot .fg { stroke: var(--live); }
.mb-timer span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-mono); font-size: 12px; font-weight: 600; }
.minibar .btn-accent { min-height: 42px; }
.mb-close { color: var(--stage-ink-2); width: 34px; height: 34px; }
.mb-close:hover { background: var(--stage-3); color: var(--stage-ink); }
@media (max-width: 640px) {
  .minibar .wrap { gap: 10px; height: 60px; }
  .minibar img { width: 52px; height: 40px; }
  .mb-timer { display: none; }
  .mb-bid { display: none; }
  .minibar .btn-accent { padding: 0 12px; font-size: var(--fs-sm); min-height: 38px; }
  .mb-close { display: none; }
}

/* ---------- mobile tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 980px) {
  :root { --tabbar-h: 62px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 55;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 11px; color: var(--ink-3); font-weight: 500; position: relative; }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--ink); }
  .tabbar a.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .tabbar .live-tab .icon-wrap { width: 30px; height: 30px; border-radius: 50%; background: var(--live); color: #fff; display: grid; place-items: center; margin-top: -2px; }
  .tabbar .live-tab .icon { width: 17px; height: 17px; }
}

/* ---------- modal / lightbox / toast ---------- */
.modal-scrim { position: fixed; inset: 0; z-index: 90; background: var(--scrim); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: var(--r-lg); width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--shadow-lg); animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
.modal.wide { max-width: 760px; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h3 { font-size: var(--fs-lg); }
.modal-body { padding: 20px; display: grid; gap: 16px; }
.modal-foot { padding: 14px 20px 20px; display: flex; gap: 10px; }
.modal-foot .btn { flex: 1; }
.confirm-car { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; }
.confirm-car img { width: 96px; height: 72px; border-radius: 7px; object-fit: cover; }
.confirm-car b { font-family: var(--f-display); font-weight: 600; display: block; }
.success { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 10px 0; }
.success .ok-ring { width: 64px; height: 64px; border-radius: 50%; background: var(--win-soft); color: var(--win); display: grid; place-items: center; }
.success .ok-ring .icon { width: 30px; height: 30px; }
.success h3 { font-size: var(--fs-xl); }
.success p { color: var(--ink-2); font-size: var(--fs-sm); max-width: 340px; }

.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(4, 6, 10, .96); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; color: #fff; animation: fade .2s; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; gap: 12px; }
.lb-top .lb-tabs { display: flex; gap: 4px; overflow-x: auto; }
.lb-top .lb-tabs button { padding: 6px 12px; border-radius: 99px; font-size: var(--fs-sm); color: rgba(255, 255, 255, .7); white-space: nowrap; }
.lb-top .lb-tabs button.on { background: rgba(255, 255, 255, .14); color: #fff; }
.lb-top .icon-btn { color: #fff; }
.lb-top .icon-btn:hover { background: rgba(255, 255, 255, .1); }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px; }
.lb-stage img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 6px; }
.lb-stage .nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; }
.lb-stage .nav-arrow:hover { background: rgba(255, 255, 255, .2); }
.lb-stage .prev { inset-inline-start: 10px; }
.lb-stage .next { inset-inline-end: 10px; }
.lb-bottom { padding: 10px 16px 16px; display: grid; gap: 10px; justify-items: center; }
.lb-cap { font-size: var(--fs-sm); color: rgba(255, 255, 255, .8); text-align: center; }
.lb-bottom .thumbs { max-width: 100%; }
@media (max-width: 640px) { .lb-stage { padding: 0 8px; } .lb-stage .nav-arrow { width: 40px; height: 40px; background: rgba(0, 0, 0, .4); } }

.doc-view { background: #fbfaf7; color: #1f2530; border-radius: 6px; border: 1px solid #e6e2d8; padding: 26px; display: grid; gap: 16px; position: relative; overflow: hidden; font-size: var(--fs-sm); }
.doc-view .wm { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-mono); font-weight: 700; font-size: 64px; color: rgba(0, 0, 0, .045); transform: rotate(-28deg); letter-spacing: .25em; pointer-events: none; }
.doc-view .dv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid #1f2530; padding-bottom: 12px; }
.doc-view .dv-head h4 { font-size: 1.15rem; color: #1f2530; }
.doc-view .dv-head span { font-size: var(--fs-xs); color: #6b7280; }
.doc-view .dv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.doc-view .dv-grid div { display: grid; border-bottom: 1px dotted #cfc9bb; padding-bottom: 6px; }
.doc-view .dv-grid small { font-size: 11px; color: #6b7280; }
.doc-view .dv-grid b { font-weight: 600; }
.doc-view .dv-note { font-size: var(--fs-xs); color: #6b7280; }
.doc-view .dv-stamp { justify-self: end; border: 3px solid rgba(15, 138, 85, .7); color: rgba(15, 138, 85, .9); padding: 6px 14px; border-radius: 8px; font-family: var(--f-mono); font-weight: 700; transform: rotate(-6deg); font-size: var(--fs-sm); }
.doc-view .dv-stamp.red { border-color: rgba(229, 56, 59, .7); color: rgba(229, 56, 59, .9); }
@media (max-width: 560px) { .doc-view .dv-grid { grid-template-columns: 1fr; } .doc-view { padding: 18px; } }

.toasts { position: fixed; z-index: 100; top: calc(var(--header-h) + 12px + env(safe-area-inset-top, 0px)); inset-inline-start: 16px; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--ink); color: var(--bg); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-lg); animation: toastin .3s cubic-bezier(.2, .8, .2, 1); font-size: var(--fs-sm); }
.toast .ti { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .toast .ti { background: rgba(0, 0, 0, .12); }
.toast.win .ti { background: var(--win); color: #fff; }
.toast.lose .ti { background: var(--live); color: #fff; }
.toast.acc .ti { background: var(--accent); color: var(--accent-ink); }
.toast b { display: block; font-weight: 600; }
.toast span { opacity: .75; font-size: var(--fs-xs); }
.toast button { opacity: .6; }
.toast.out { animation: toastout .25s forwards; }
@keyframes toastin { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes toastout { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 20px; }
.foot .wrap { padding-block: 32px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot h4 { font-size: var(--fs-sm); margin-bottom: 10px; font-family: var(--f-body); font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.foot ul a:hover { color: var(--ink); }
.foot p { font-size: var(--fs-sm); color: var(--ink-2); max-width: 340px; }
.foot .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-3); }
@media (max-width: 800px) { .foot .wrap { grid-template-columns: 1fr 1fr; } .foot .wrap > div:first-child { grid-column: 1 / -1; } }

.demo-note { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- notifications popover ---------- */
.notif-pop {
  position: fixed; z-index: 80; top: calc(var(--header-h) + 8px + env(safe-area-inset-top, 0px)); inset-inline-end: 16px;
  width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .2s cubic-bezier(.2, .8, .2, 1);
}
.np-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.np-head b { font-family: var(--f-display); font-weight: 600; }
.np-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); align-items: center; }
.np-item:last-child { border-bottom: 0; }
.np-item .ti { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.np-item .ti.lose { background: var(--live-soft); color: var(--live); }
.np-item .ti.acc { background: var(--accent-soft); color: var(--accent-text); }
.np-item b { display: block; font-weight: 500; }
.np-item span { font-size: var(--fs-xs); color: var(--ink-3); }

.yard-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; font-size: var(--fs-sm); }
.yard-card img { width: 96px; height: 72px; border-radius: 7px; object-fit: cover; background: var(--surface-2); }
.yard-card b { display: flex; align-items: center; gap: 4px; font-weight: 600; }
.yard-card span:last-child { font-size: var(--fs-xs); color: var(--ink-3); }
.credits ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--ink-2); }
.credits a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.credits p { font-size: var(--fs-sm); }
.legal .link-more { font-size: inherit; }
