/* ============================================================
   BIDANWIN — app.css
   Mobile-first from 360px. Dark-first, both themes complete.
   Authored as one lean sheet: no page ships CSS it cannot use.
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────────
   The complete LIGHT palette lives on bare :root. Dark redefines
   only what changes, in both the media query and the explicit
   attribute, so a manual toggle wins in either direction.        */

:root {
  /* Surfaces */
  --bg:            #F6F8FB;
  --surface:       #FFFFFF;
  --surface-2:     #EEF2F7;
  --surface-3:     #E3E9F1;
  --border:        #D7DEE8;
  --border-strong: #BCC7D6;

  /* Text */
  --text:          #0B0F14;
  --text-2:        #46586E;
  --text-3:        #6B7C93;
  --text-on-volt:  #04231A;

  /* Brand */
  --volt:          #00A876;
  --volt-bg:       rgba(0, 168, 118, .10);
  --volt-border:   rgba(0, 168, 118, .30);
  --ember:         #D93A16;
  --ember-bg:      rgba(217, 58, 22, .10);
  --gold:          #A87400;
  --gold-bg:       rgba(168, 116, 0, .12);
  --azure:         #2563EB;
  --azure-bg:      rgba(37, 99, 235, .10);

  /* Effects */
  --shadow-1: 0 1px 2px rgba(11,15,20,.06), 0 1px 3px rgba(11,15,20,.05);
  --shadow-2: 0 4px 12px rgba(11,15,20,.08), 0 2px 4px rgba(11,15,20,.04);
  --shadow-3: 0 12px 32px rgba(11,15,20,.14), 0 4px 8px rgba(11,15,20,.06);
  --shadow-dock: 0 -8px 24px rgba(11,15,20,.12);

  /* Geometry */
  --r-sm: 8px;  --r-md: 12px;  --r-lg: 16px;  --r-xl: 22px;  --r-full: 999px;
  --gap: 16px;
  --page: 1240px;
  --dock-h: 76px;

  /* Type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font);
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --t-fast: 140ms cubic-bezier(.4,0,.2,1);
  --t: 220ms cubic-bezier(.4,0,.2,1);
}

/* Dark — system preference, unless the user explicitly chose light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0B0F14;
    --surface:       #151C24;
    --surface-2:     #1B242E;
    --surface-3:     #222D3A;
    --border:        #222D3A;
    --border-strong: #33404F;

    --text:          #EAF0F6;
    --text-2:        #A3B1C2;
    --text-3:        #74849A;
    --text-on-volt:  #04231A;

    --volt:          #00E5A0;
    --volt-bg:       rgba(0, 229, 160, .12);
    --volt-border:   rgba(0, 229, 160, .32);
    --ember:         #FF5C39;
    --ember-bg:      rgba(255, 92, 57, .14);
    --gold:          #F5B800;
    --gold-bg:       rgba(245, 184, 0, .14);
    --azure:         #3B82F6;
    --azure-bg:      rgba(59, 130, 246, .14);

    --shadow-1: 0 1px 2px rgba(0,0,0,.4);
    --shadow-2: 0 4px 12px rgba(0,0,0,.45);
    --shadow-3: 0 12px 32px rgba(0,0,0,.55);
    --shadow-dock: 0 -8px 24px rgba(0,0,0,.5);
  }
}

/* Dark — explicit choice */
:root[data-theme="dark"] {
  --bg:            #0B0F14;
  --surface:       #151C24;
  --surface-2:     #1B242E;
  --surface-3:     #222D3A;
  --border:        #222D3A;
  --border-strong: #33404F;

  --text:          #EAF0F6;
  --text-2:        #A3B1C2;
  --text-3:        #74849A;
  --text-on-volt:  #04231A;

  --volt:          #00E5A0;
  --volt-bg:       rgba(0, 229, 160, .12);
  --volt-border:   rgba(0, 229, 160, .32);
  --ember:         #FF5C39;
  --ember-bg:      rgba(255, 92, 57, .14);
  --gold:          #F5B800;
  --gold-bg:       rgba(245, 184, 0, .14);
  --azure:         #3B82F6;
  --azure-bg:      rgba(59, 130, 246, .14);

  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 4px 12px rgba(0,0,0,.45);
  --shadow-3: 0 12px 32px rgba(0,0,0,.55);
  --shadow-dock: 0 -8px 24px rgba(0,0,0,.5);
}

/* ── RESET ─────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  font-size: 16px;              /* never below 16 — stops iOS zoom-on-focus */
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: var(--volt); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--volt); color: var(--text-on-volt); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--volt); color: var(--text-on-volt);
  padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700;
  transition: top var(--t);
}
.skip-link:focus { top: 8px; }

/* ── TYPE ──────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.85rem, 1.2rem + 3.2vw, 3.4rem); }
h2 { font-size: clamp(1.4rem,  1.1rem + 1.6vw, 2.1rem); }
h3 { font-size: clamp(1.1rem,  1rem + 0.6vw, 1.35rem); }

.eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-3);
}
.lead { font-size: clamp(1rem, .95rem + .4vw, 1.15rem); color: var(--text-2); }
.muted { color: var(--text-3); }
.small { font-size: .85rem; }

/* Prices and clocks use tabular figures so digits never shift width. */
.num, .price, .countdown, .amount {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ── LAYOUT ────────────────────────────────────────────────── */

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: 16px; }
.section { padding-block: clamp(36px, 6vw, 72px); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.stack   { display: flex; flex-direction: column; gap: var(--gap); }
.row     { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.spacer  { flex: 1; }

.grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 560px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(4, 1fr); } }

/* Horizontal rail — scroll-snap on mobile, plain grid on desktop. */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%;
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 8px; margin-inline: -16px; padding-inline: 16px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 560px)  { .rail { grid-auto-columns: 46%; } }
@media (min-width: 900px)  { .rail { grid-auto-columns: 31%; } }
@media (min-width: 1200px) {
  .rail { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr);
          overflow: visible; margin-inline: 0; padding-inline: 0; }
}

/* ── HEADER ────────────────────────────────────────────────── */

.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 12px;
  height: 60px; max-width: var(--page); margin-inline: auto; padding-inline: 16px;
}

.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--volt), color-mix(in srgb, var(--volt) 55%, var(--azure)));
  color: var(--text-on-volt); font-family: var(--font-display);
  font-weight: 800; font-size: 1rem; letter-spacing: -.04em;
}
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.18rem;
  letter-spacing: -.03em; color: var(--text);
}
.brand-name b { color: var(--volt); font-weight: 700; }

.nav-links { display: none; gap: 4px; margin-left: 8px; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-links a {
  padding: 8px 13px; border-radius: var(--r-sm); color: var(--text-2);
  font-size: .93rem; font-weight: 550;
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); background: var(--surface-2); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.icon-btn {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--text-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

.live-pill {
  display: none; align-items: center; gap: 7px;
  padding: 5px 11px 5px 9px; border-radius: var(--r-full);
  background: var(--volt-bg); border: 1px solid var(--volt-border);
  color: var(--volt); font-size: .78rem; font-weight: 700;
}
@media (min-width: 700px) { .live-pill { display: inline-flex; } }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--volt);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.82); } }

/* ── BOTTOM TAB BAR (mobile) ───────────────────────────────── */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 900px) { .tabbar { display: none; } }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-height: 56px; font-size: .68rem; font-weight: 600;
  color: var(--text-3); text-decoration: none;
}
.tabbar a.active { color: var(--volt); }
.tabbar svg { width: 21px; height: 21px; }
body.has-tabbar { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { body.has-tabbar { padding-bottom: 0; } }

/* ── BUTTONS ───────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 20px; border-radius: var(--r-md);
  font-weight: 650; font-size: .95rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform var(--t-fast), background var(--t-fast),
              border-color var(--t-fast), opacity var(--t-fast);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.975); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--volt); color: var(--text-on-volt); }
.btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--volt) 88%, white); }

.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); border-color: var(--border-strong); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover:not(:disabled) { background: var(--surface-2); }

.btn-danger { background: var(--ember); color: #fff; }
.btn-lg { min-height: 52px; padding: 15px 26px; font-size: 1.02rem; border-radius: var(--r-lg); }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── BADGES ────────────────────────────────────────────────── */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: var(--r-full);
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  white-space: nowrap;
}
.badge-live      { background: var(--volt-bg);  color: var(--volt);  border: 1px solid var(--volt-border); }
.badge-urgent    { background: var(--ember-bg); color: var(--ember); border: 1px solid color-mix(in srgb, var(--ember) 30%, transparent); }
.badge-reserve   { background: var(--gold-bg);  color: var(--gold);  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.badge-info      { background: var(--azure-bg); color: var(--azure); border: 1px solid color-mix(in srgb, var(--azure) 30%, transparent); }
.badge-neutral   { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge-winning   { background: var(--volt);  color: var(--text-on-volt); }
.badge-outbid    { background: var(--ember); color: #fff; }

/* ── CARDS ─────────────────────────────────────────────────── */

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.card-pad { padding: 18px; }

/* Lot card */
.lot {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
@media (hover: hover) {
  .lot:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); border-color: var(--border-strong); }
  .lot:hover .lot-img img { transform: scale(1.045); }
}
.lot-link { position: absolute; inset: 0; z-index: 2; }
.lot-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.lot-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.lot-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms cubic-bezier(.4,0,.2,1); }

.lot-tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 3; }
.lot-watch {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 44px; height: 44px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(8px); color: var(--text-2);
  border: 1px solid var(--border);
}
.lot-watch:hover { color: var(--ember); }
.lot-watch[aria-pressed="true"] { color: var(--ember); background: var(--ember-bg); }
.lot-watch svg { width: 18px; height: 18px; }

.lot-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lot-lot { font-size: .7rem; font-weight: 700; letter-spacing: .1em; color: var(--text-3); }
.lot-title {
  font-family: var(--font-display); font-size: 1.02rem; font-weight: 650;
  line-height: 1.28; letter-spacing: -.015em; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lot-specs {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
  font-size: .79rem; color: var(--text-3);
}
.lot-specs span { display: inline-flex; align-items: center; gap: 4px; }

.lot-foot {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
}
.lot-price-label { font-size: .68rem; font-weight: 700; letter-spacing: .08em; color: var(--text-3); text-transform: uppercase; }
.lot-price {
  font-family: var(--font-display); font-size: 1.28rem; font-weight: 700;
  letter-spacing: -.02em; color: var(--text);
}
.lot-bids { font-size: .74rem; color: var(--text-3); }

/* ── COUNTDOWN ─────────────────────────────────────────────── */

.countdown {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 700; font-size: .82rem; letter-spacing: -.01em;
  color: var(--text-2);
}
.countdown svg { width: 14px; height: 14px; opacity: .7; }
.countdown[data-urgency="soon"]     { color: var(--gold); }
.countdown[data-urgency="critical"] { color: var(--ember); }
.countdown[data-urgency="critical"] .cd-val { animation: pulse 1.6s ease-in-out infinite; }
.countdown[data-urgency="ended"]    { color: var(--text-3); }

/* ── LOT PAGE ──────────────────────────────────────────────── */

.lot-layout { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1024px) {
  .lot-layout { grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); gap: 32px; }
  .lot-side { position: sticky; top: 76px; }
}

/* Gallery — native scroll-snap, no JS lightbox on mobile */
.gallery { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); }
.gallery-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track > figure { scroll-snap-align: center; aspect-ratio: 4 / 3; }
.gallery-track img { width: 100%; height: 100%; object-fit: cover; }
.gallery-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 5px 9px; border-radius: var(--r-full);
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
}
.gallery-dots button { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45); }
.gallery-dots button[aria-current="true"] { background: #fff; width: 18px; border-radius: var(--r-full); }

.thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button {
  flex: 0 0 74px; aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid transparent; opacity: .6; transition: opacity var(--t-fast), border-color var(--t-fast);
}
.thumbs button[aria-current="true"] { border-color: var(--volt); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ── MEDIA CHIPS ON A CARD ─────────────────────────────────── */

.lot-media {
  position: absolute; left: 10px; bottom: 10px; z-index: 3;
  display: flex; gap: 6px;
}
.media-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: var(--r-full);
  background: rgba(11, 15, 20, .68);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
}
.media-chip svg { width: 13px; height: 13px; }
.media-chip-360 { background: var(--volt); color: var(--text-on-volt); }

/* ── 360° SPIN VIEWER ──────────────────────────────────────
   A drag-to-rotate run of exterior frames. Buyers cannot walk
   around the car before they bid, so this is the closest thing
   to standing next to it — and it is the single most persuasive
   thing on a lot page. */

.viewer { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); }

.viewer-tabs {
  display: flex; gap: 6px; margin-bottom: 10px;
}
.viewer-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px; min-height: 44px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .87rem; font-weight: 650; color: var(--text-2);
  transition: all var(--t-fast);
}
.viewer-tab:hover { border-color: var(--border-strong); color: var(--text); }
.viewer-tab[aria-selected="true"] {
  background: var(--volt); border-color: var(--volt); color: var(--text-on-volt);
}
.viewer-tab svg { width: 16px; height: 16px; }

.spin {
  position: relative; aspect-ratio: 4 / 3;
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: var(--surface-3);
  overflow: hidden;
}
.spin.dragging { cursor: grabbing; }
.spin img {
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; -webkit-user-drag: none;
  transition: transform var(--t);
}

/* The hint fades once the buyer works out they can drag it. */
.spin-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-full);
  background: rgba(11, 15, 20, .74);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; font-size: .78rem; font-weight: 600; white-space: nowrap;
  pointer-events: none; transition: opacity var(--t);
}
.spin-hint svg { width: 15px; height: 15px; }
.spin.touched .spin-hint { opacity: 0; }

.spin-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,.16);
}
.spin-progress span {
  display: block; height: 100%; background: var(--volt);
  transition: width 90ms linear;
}

.spin-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-3);
  font-size: .85rem; font-weight: 600; gap: 10px;
}
.spin-loading[hidden] { display: none; }

.spin-badge {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: var(--r-full);
  background: var(--volt); color: var(--text-on-volt);
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
}
.spin-badge svg { width: 13px; height: 13px; }

.viewer-tools {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  display: flex; flex-direction: column; gap: 6px;
}
.viewer-tool {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: rgba(11, 15, 20, .68); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background var(--t-fast);
}
.viewer-tool:hover { background: var(--volt); color: var(--text-on-volt); }
.viewer-tool svg { width: 18px; height: 18px; }
@media (pointer: coarse) { .viewer-tool { width: 44px; height: 44px; } }

/* ── LIGHTBOX ──────────────────────────────────────────────── */

.lightbox {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(6, 9, 12, .96);
  display: grid; grid-template-rows: auto 1fr auto;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.lightbox[hidden] { display: none; }
.lightbox-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 14px; color: #fff;
}
.lightbox-bar .icon-btn { color: #fff; }
.lightbox-bar .icon-btn:hover { background: rgba(255,255,255,.14); }
.lightbox-count { font-size: .85rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.lightbox-stage {
  position: relative; display: grid; place-items: center;
  min-height: 0; padding: 0 8px;
}
.lightbox-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: var(--r-md);
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff;
  backdrop-filter: blur(6px);
}
.lightbox-nav:hover { background: var(--volt); color: var(--text-on-volt); }
.lightbox-nav svg { width: 22px; height: 22px; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox-prev svg { transform: rotate(180deg); }
.lightbox-strip {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 14px;
  scrollbar-width: none;
}
.lightbox-strip::-webkit-scrollbar { display: none; }
.lightbox-strip button {
  flex: 0 0 68px; aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid transparent; opacity: .5; transition: all var(--t-fast);
}
.lightbox-strip button[aria-current="true"] { border-color: var(--volt); opacity: 1; }
.lightbox-strip img { width: 100%; height: 100%; object-fit: cover; }
.lightbox-caption { font-size: .82rem; color: rgba(255,255,255,.72); }

/* Spec table */
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-radius: var(--r-md); overflow: hidden; }
@media (min-width: 700px) { .specs { grid-template-columns: repeat(3, 1fr); } }
.spec { background: var(--surface); padding: 13px 14px; }
.spec dt { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; }
.spec dd { font-size: .95rem; font-weight: 600; color: var(--text); }

/* Bid panel */
.bid-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.bid-head { padding: 18px; border-bottom: 1px solid var(--border); }
.bid-price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.bid-price {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.7rem); line-height: 1; color: var(--text);
}
.bid-price.bump { animation: bump 500ms cubic-bezier(.34,1.56,.64,1); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.08); color: var(--volt); } 100% { transform: scale(1); } }

.reserve-bar { height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; margin-top: 12px; }
.reserve-fill { height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--azure), var(--volt)); transition: width 600ms cubic-bezier(.4,0,.2,1); }
.reserve-fill.met { background: var(--gold); }

.bid-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 10px 14px; min-height: 44px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border);
  font-weight: 650; font-size: .88rem; color: var(--text);
  transition: all var(--t-fast); flex: 1 1 auto;
}
.chip:hover { border-color: var(--volt); background: var(--volt-bg); color: var(--volt); }
.chip[aria-pressed="true"] { background: var(--volt); border-color: var(--volt); color: var(--text-on-volt); }

/* Live feed */
.feed { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow-y: auto; }
.feed-item {
  display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2);
}
.feed-item.is-new { animation: slide-in 260ms cubic-bezier(.4,0,.2,1); }
.feed-item.is-mine { background: var(--volt-bg); border: 1px solid var(--volt-border); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.feed-avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); font-size: .7rem; font-weight: 700; color: var(--text-2);
}
.feed-who { font-size: .84rem; font-weight: 600; color: var(--text-2); }
.feed-when { font-size: .72rem; color: var(--text-3); }
.feed-amt { font-family: var(--font-display); font-weight: 700; font-size: .98rem; color: var(--text); }

/* ── STICKY BID DOCK (the mobile headline) ─────────────────── */

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 58;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-dock);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px;
  transform: translateY(0); transition: transform var(--t);
}
@media (min-width: 1024px) { .dock { display: none; } }
.dock[hidden] { display: none; }
.dock-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dock-label { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.dock-price {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  letter-spacing: -.025em; color: var(--text); line-height: 1.1;
}
.dock-sub { display: flex; align-items: center; gap: 8px; font-size: .74rem; }
.dock .btn { white-space: nowrap; }
body.has-dock { padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { body.has-dock { padding-bottom: 0; } }

/* ── BOTTOM SHEET ──────────────────────────────────────────── */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: opacity var(--t);
  backdrop-filter: blur(2px);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  background: var(--surface); border-top: 1px solid var(--border);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 8px 18px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform 280ms cubic-bezier(.32,.72,0,1);
  max-height: 88dvh; overflow-y: auto; box-shadow: var(--shadow-3);
}
.sheet.open { transform: translateY(0); }
@media (min-width: 640px) {
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: min(460px, calc(100vw - 32px));
    border-radius: var(--r-xl); border: 1px solid var(--border);
    transform: translate(-50%, -46%) scale(.97); opacity: 0;
    transition: transform var(--t), opacity var(--t);
  }
  .sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.sheet-grab { width: 38px; height: 4px; border-radius: var(--r-full); background: var(--border-strong); margin: 6px auto 14px; }
@media (min-width: 640px) { .sheet-grab { display: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }

/* ── FORMS ─────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .82rem; font-weight: 650; color: var(--text-2); }
.field .hint { font-size: .76rem; color: var(--text-3); }

.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 12px 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  font-size: 16px; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--volt);
  box-shadow: 0 0 0 3px var(--volt-bg);
}
.input::placeholder { color: var(--text-3); }
.textarea { min-height: 110px; resize: vertical; }

.input-money { position: relative; }
.input-money .prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-weight: 700; color: var(--text-3); pointer-events: none;
}
.input-money .input { padding-left: 34px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }

.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: var(--text-2); cursor: pointer; }
.checkbox input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--volt); flex-shrink: 0; }

/* ── ALERTS ────────────────────────────────────────────────── */

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 15px; border-radius: var(--r-md); font-size: .89rem;
  border: 1px solid transparent;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--volt-bg);  color: var(--volt);  border-color: var(--volt-border); }
.alert-error   { background: var(--ember-bg); color: var(--ember); border-color: color-mix(in srgb, var(--ember) 30%, transparent); }
.alert-info    { background: var(--azure-bg); color: var(--azure); border-color: color-mix(in srgb, var(--azure) 30%, transparent); }
.alert-warn    { background: var(--gold-bg);  color: var(--gold);  border-color: color-mix(in srgb, var(--gold) 30%, transparent); }

/* ── TOASTS ────────────────────────────────────────────────── */

.toasts {
  position: fixed; z-index: 120; left: 12px; right: 12px;
  top: calc(12px + env(safe-area-inset-top));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
@media (min-width: 640px) { .toasts { left: auto; right: 20px; top: 76px; width: 340px; } }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 15px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-3); font-size: .89rem; font-weight: 550;
  pointer-events: auto; animation: toast-in 260ms cubic-bezier(.34,1.4,.64,1);
}
.toast.out { animation: toast-out 200ms ease forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(.97); } }
.toast-success { border-left: 3px solid var(--volt); }
.toast-error   { border-left: 3px solid var(--ember); }
.toast-info    { border-left: 3px solid var(--azure); }

/* ── BANNER CAROUSEL ───────────────────────────────────────
   Full-bleed auction-floor photography above the fold. The first
   slide is the page's LCP element, so it is eager and priority-
   hinted while the rest stay lazy. */

.banner {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);

  /* FIXED aspect ratios, not viewport height.
     A viewport-height banner has an unpredictable ratio, so the CDN crop can
     never match the box — the image gets cropped once by Cloudinary and again
     by object-fit, and the picture "does not show in full". Fixing the ratio
     per breakpoint means one crop, a known safe zone, and an exact source size
     we can hand to whoever supplies the photography. */
  aspect-ratio: 2 / 3;           /* phones — tall portrait, ~63% of the screen */
}
@media (min-width: 700px)  { .banner { aspect-ratio: 3 / 2; } }
@media (min-width: 1200px) { .banner { aspect-ratio: 16 / 10; border-radius: var(--r-xl); } }

.banner-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 700ms ease;
  pointer-events: none;
}
.banner-slide[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.banner-slide picture { display: block; width: 100%; height: 100%; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }

/* Legible white text over unpredictable photography needs a real scrim,
   not a hope. Two stops: dark at the bottom-left where the copy sits. */
.banner-slide::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top,   rgba(6,9,12,.92) 0%, rgba(6,9,12,.55) 38%, rgba(6,9,12,.12) 70%),
    linear-gradient(to right, rgba(6,9,12,.7) 0%, rgba(6,9,12,0) 62%);
}

.banner-copy {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: 24px 20px 28px;
  max-width: 64ch;
}
@media (min-width: 700px)  { .banner-copy { padding: 38px 40px 44px; } }
@media (min-width: 1200px) { .banner-copy { padding: 52px 60px 60px; } }

.banner-title {
  font-family: var(--font-display); font-weight: 700; color: #fff;
  letter-spacing: -.03em; line-height: 1.05;
  font-size: clamp(1.75rem, 1.15rem + 3.2vw, 3.75rem);
  text-wrap: balance;
}
.banner-sub {
  color: rgba(255,255,255,.88); margin-top: 12px;
  font-size: clamp(.95rem, .86rem + .5vw, 1.28rem);
  max-width: 54ch;
}
.banner-copy .btn { margin-top: 22px; }
@media (min-width: 700px) {
  .banner-copy .btn { min-height: 56px; padding: 16px 30px; font-size: 1.05rem; }
}

.banner-dots {
  position: absolute; z-index: 3; right: 16px; bottom: 18px;
  display: flex; gap: 7px;
}
@media (min-width: 1200px) { .banner-dots { right: 52px; bottom: 46px; } }
.banner-dots button {
  width: 9px; height: 9px; border-radius: var(--r-full);
  background: rgba(255,255,255,.42); transition: all var(--t);
}
.banner-dots button[aria-current="true"] { background: #fff; width: 26px; }
@media (pointer: coarse) {
  /* Keep the visual dot small but give the finger a real target. */
  .banner-dots { gap: 0; }
  .banner-pause { width: 44px; height: 44px; opacity: 1; }
  .banner-dots button {
    width: 44px; height: 44px; border-radius: 0; background: none;
    position: relative;
  }
  .banner-dots button::after {
    content: ""; position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 9px; height: 9px; border-radius: var(--r-full);
    background: rgba(255,255,255,.42); transition: all var(--t);
  }
  .banner-dots button[aria-current="true"]::after { background: #fff; width: 26px; }
}

.banner-pause {
  position: absolute; z-index: 3; right: 16px; top: 16px;
  width: 40px; height: 40px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: rgba(6,9,12,.55); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity var(--t);
}
.banner:hover .banner-pause, .banner-pause:focus-visible { opacity: 1; }
.banner-pause svg { width: 17px; height: 17px; }

/* ── IMAGE-LED CONTENT BLOCKS ──────────────────────────────
   Everything below is driven by rows in `content_blocks`, so
   copy and photography change from the admin dashboard rather
   than from a deploy. */

/* Split: one large photograph beside the message. Image first on mobile —
   it is the thing that stops the scroll. */
.split {
  display: grid; gap: 0;
  grid-template-columns: 1fr;
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1.05fr .95fr; align-items: stretch; }
  .split.is-reversed .split-media { order: 2; }
}

.split-media { position: relative; background: var(--surface-2); }
.split-media img {
  width: 100%; height: 100%; object-fit: cover;
  aspect-ratio: 4 / 3;
}
@media (min-width: 900px) {
  .split-media img { aspect-ratio: auto; min-height: 460px; }
}

.split-body {
  padding: 28px 22px 32px;
  display: flex; flex-direction: column; justify-content: center;
  gap: 14px;
}
@media (min-width: 900px)  { .split-body { padding: 48px 44px; } }
@media (min-width: 1200px) { .split-body { padding: 60px 56px; } }

.split-title {
  font-family: var(--font-display); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.08;
  font-size: clamp(1.5rem, 1.15rem + 1.9vw, 2.5rem);
  text-wrap: balance;
}
.split-sub { color: var(--text-2); font-size: clamp(.95rem, .9rem + .3vw, 1.12rem); max-width: 46ch; }
.split-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* Full-bleed: photograph as the whole section, copy laid over it. */
.bleed {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  min-height: 380px;
  display: grid; align-items: center;
}
@media (min-width: 700px)  { .bleed { min-height: 460px; } }
@media (min-width: 1200px) { .bleed { min-height: 540px; } }

/* The image may be wrapped in <picture> for art direction, so position the
   wrapper and let the img fill it — targeting `.bleed > img` alone silently
   stops matching the moment a <picture> is introduced, and the section
   collapses into a full-height block. */
.bleed > picture,
.bleed > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.bleed > picture img,
.bleed > img { object-fit: cover; }
.bleed::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top,   rgba(6,9,12,.90) 0%, rgba(6,9,12,.55) 45%, rgba(6,9,12,.25) 100%),
    linear-gradient(to right, rgba(6,9,12,.72) 0%, rgba(6,9,12,0) 70%);
}
.bleed-body {
  position: relative; z-index: 2;
  padding: 32px 22px; max-width: 60ch;
}
@media (min-width: 700px)  { .bleed-body { padding: 48px 44px; } }
@media (min-width: 1200px) { .bleed-body { padding: 64px 60px; } }

.bleed-title {
  font-family: var(--font-display); font-weight: 700; color: #fff;
  letter-spacing: -.03em; line-height: 1.05;
  font-size: clamp(1.6rem, 1.2rem + 2.6vw, 3.1rem);
  text-wrap: balance;
}
.bleed-sub {
  color: rgba(255,255,255,.88); margin-top: 12px;
  font-size: clamp(.95rem, .88rem + .4vw, 1.18rem); max-width: 48ch;
}
.bleed-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.bleed .btn-outline { color: #fff; border-color: rgba(255,255,255,.5); }
.bleed .btn-outline:hover { background: rgba(255,255,255,.14); border-color: #fff; }

/* Tiles: a photographic grid — categories, branches, whatever needs browsing. */
.tiles {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px)  { .tiles { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.tile {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-lg);
  aspect-ratio: 3 / 4;
  background: var(--surface-2);
  text-decoration: none;
}
@media (min-width: 700px) { .tile { aspect-ratio: 4 / 5; } }
.tile:hover { text-decoration: none; }
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 500ms cubic-bezier(.4,0,.2,1);
}
@media (hover: hover) { .tile:hover img { transform: scale(1.07); } }
.tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,9,12,.88) 8%, rgba(6,9,12,.28) 55%, rgba(6,9,12,.05) 100%);
}
.tile-body {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: 14px 14px 16px;
}
@media (min-width: 700px) { .tile-body { padding: 18px; } }
.tile-title {
  font-family: var(--font-display); font-weight: 700; color: #fff;
  letter-spacing: -.02em; line-height: 1.15;
  font-size: clamp(.98rem, .9rem + .5vw, 1.25rem);
}
.tile-sub {
  color: rgba(255,255,255,.8); font-size: .78rem; margin-top: 3px;
  display: flex; align-items: center; gap: 5px;
}
.tile-sub svg { width: 13px; height: 13px; }

/* ── HERO ──────────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 8vw, 88px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 420px at 12% -10%, var(--volt-bg), transparent 65%),
    radial-gradient(700px 380px at 92% 8%,  var(--azure-bg), transparent 62%);
}
.hero-grid { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 48px; } }
.hero h1 { margin-block: 14px 16px; }
.hero h1 em { font-style: normal; color: var(--volt); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 30px; }
.stat { padding: 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.stat-val { font-family: var(--font-display); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); font-weight: 700; letter-spacing: -.03em; color: var(--text); }
.stat-key { font-size: .72rem; font-weight: 600; color: var(--text-3); margin-top: 2px; }

/* ── FILTER BAR ────────────────────────────────────────────── */

.filterbar {
  position: sticky; top: 60px; z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); padding-block: 10px;
}
.filterbar-inner { display: flex; gap: 8px; align-items: center; }
.search {
  position: relative; flex: 1; min-width: 0;
}
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 40px; }

.pill-scroll { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.pill-scroll::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0; padding: 8px 14px; min-height: 38px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  font-size: .84rem; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.pill:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }
.pill.active { background: var(--volt); border-color: var(--volt); color: var(--text-on-volt); }

/* ── FOOTER ────────────────────────────────────────────────── */

.footer { margin-top: 56px; border-top: 1px solid var(--border); background: var(--surface); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; padding-block: 40px; }
@media (min-width: 640px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; } }
.footer h4 { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; font-family: var(--font); font-weight: 700; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--text-2); font-size: .9rem; }
.footer a:hover { color: var(--volt); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-block: 18px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: .82rem; color: var(--text-3);
}

/* ── ADMIN: IMAGE MANAGER ──────────────────────────────────── */

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 28px 20px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: var(--r-lg);
  background: var(--surface-2); color: var(--text-2);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--volt); background: var(--volt-bg); }
.dropzone.over { border-color: var(--volt); background: var(--volt-bg); color: var(--volt); }
.dropzone svg { width: 28px; height: 28px; opacity: .7; }
.dropzone strong { font-size: .95rem; color: var(--text); }

.upload-progress { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.upload-bar { height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--volt); transition: width 200ms linear; }

.img-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}
.img-tile {
  position: relative; aspect-ratio: 4/3; border-radius: var(--r-md); overflow: hidden;
  border: 2px solid var(--border); background: var(--surface-2);
  cursor: grab; transition: border-color var(--t-fast), opacity var(--t-fast);
}
.img-tile:hover { border-color: var(--border-strong); }
.img-tile.dragging { opacity: .4; cursor: grabbing; }
.img-tile.is-hero { border-color: var(--volt); }
.img-tile img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.img-index {
  position: absolute; top: 5px; left: 5px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: rgba(11,15,20,.72); color: #fff;
  font-size: .68rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.img-tile.is-hero .img-index { background: var(--volt); color: var(--text-on-volt); }

.img-del, .img-hero {
  position: absolute; width: 26px; height: 26px; border-radius: var(--r-full);
  display: grid; place-items: center;
  background: rgba(11,15,20,.72); color: #fff; font-size: .8rem; line-height: 1;
  opacity: 0; transition: opacity var(--t-fast), background var(--t-fast);
}
.img-del  { top: 5px; right: 5px; }
.img-hero { bottom: 5px; right: 5px; }
.img-del svg, .img-hero svg { width: 14px; height: 14px; }
.img-del:hover  { background: var(--ember); }
.img-hero:hover { background: var(--volt); color: var(--text-on-volt); }
.img-tile:hover .img-del, .img-tile:hover .img-hero { opacity: 1; }
/* Touch has no hover, so the controls stay visible there. */
@media (pointer: coarse) {
  .img-del, .img-hero { opacity: 1; width: 30px; height: 30px; }
}

/* ── ADMIN: CONTENT EDITOR ─────────────────────────────────── */

.content-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.content-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  cursor: grab; transition: border-color var(--t-fast), opacity var(--t-fast), box-shadow var(--t-fast);
}
.content-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.content-card.dragging { opacity: .4; cursor: grabbing; }
.content-card.is-off { opacity: .55; }

.content-card-media { position: relative; aspect-ratio: 8 / 5; background: var(--surface-2); }
.content-card-media img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.content-card-off { position: absolute; top: 8px; left: 8px; }

.content-card-body {
  padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.content-card-title {
  font-family: var(--font-display); font-size: 1rem; font-weight: 650;
  line-height: 1.25; letter-spacing: -.015em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.content-card-sub {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Image picker inside the editor sheet */
.image-picker {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 8 / 5; overflow: hidden; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: var(--r-lg);
  background: var(--surface-2);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.image-picker:hover, .image-picker:focus-visible, .image-picker.over {
  border-color: var(--volt); background: var(--volt-bg);
}
.image-picker img { width: 100%; height: 100%; object-fit: cover; }
.image-picker-empty {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-align: center; padding: 18px; color: var(--text-2);
}
.image-picker-empty svg { width: 26px; height: 26px; opacity: .7; }
.image-picker-empty strong { font-size: .93rem; color: var(--text); }

/* The editor sheet carries a long form — give it room on a laptop. */
@media (min-width: 640px) {
  #contentSheet { width: min(620px, calc(100vw - 32px)); }
}

/* ── EMPTY / SKELETON ──────────────────────────────────────── */

.empty { text-align: center; padding: 56px 20px; color: var(--text-3); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 14px; opacity: .5; }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
            background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Long lists: let the browser skip offscreen work. */
.lot-list { content-visibility: auto; contain-intrinsic-size: auto 380px; }

/* ── TOUCH TARGETS ─────────────────────────────────────────
   On a touch screen every control clears 44×44. Compact sizes
   are a mouse affordance and stay that way on pointer devices. */

@media (pointer: coarse) {
  .btn-sm { min-height: 44px; padding-inline: 18px; }
  .pill   { min-height: 44px; padding-block: 11px; }
  .thumbs button { flex-basis: 84px; }
  .brand  { min-height: 44px; }
  .gallery-dots button { height: 12px; min-width: 12px; }
  .gallery-dots { padding: 8px 12px; gap: 8px; }
  .footer a, .nav-links a { display: inline-block; padding-block: 11px; min-height: 44px; }
  .footer li { margin-bottom: 2px; }
  /* Breadcrumbs are navigation, not body copy — they need a real target. */
  .breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 2px; }
}

/* ── MOTION PREFERENCE ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── PRINT ─────────────────────────────────────────────────── */

@media print {
  .topbar, .tabbar, .dock, .sheet, .sheet-backdrop, .toasts, .footer { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ── ADMIN: image spec note ────────────────────────────────
   The required dimensions, shown beside the upload control. */

.spec-note {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 13px; margin-top: 10px;
  border-radius: var(--r-md);
  background: var(--volt-bg);
  border: 1px solid var(--volt-border);
}
.spec-note strong {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  color: var(--volt); letter-spacing: -.01em;
}
.spec-note span { line-height: 1.45; }

/* ── ADMIN CHROME ──────────────────────────────────────────
   A distinct bar so staff always know they are in the admin
   area and not looking at the public site. */

.admin-bar {
  position: sticky; top: 60px; z-index: 45;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-block: 9px;
}
.admin-bar-inner { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-bar .pill-scroll { flex: 1; min-width: 0; }
.admin-bar .pill svg { width: 14px; height: 14px; margin-right: 2px; }
.admin-bar > .wrap > .admin-bar-inner > .btn { flex-shrink: 0; }

.admin-badge {
  display: none; align-items: center; gap: 5px; flex-shrink: 0;
  padding: 5px 10px; border-radius: var(--r-full);
  background: var(--ember-bg); color: var(--ember);
  border: 1px solid color-mix(in srgb, var(--ember) 30%, transparent);
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.admin-badge svg { width: 13px; height: 13px; }
@media (min-width: 900px) { .admin-badge { display: inline-flex; } }

/* ── Stat tiles ────────────────────────────────────────────── */

.stat-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px)  { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .stat-grid { grid-template-columns: repeat(8, 1fr); } }

.stat-tile {
  display: block; padding: 14px 12px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), transform var(--t-fast);
}
a.stat-tile:hover { border-color: var(--border-strong); transform: translateY(-2px); text-decoration: none; }
.stat-tile-val {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  letter-spacing: -.03em; line-height: 1; color: var(--text);
}
.stat-tile-key { font-size: .72rem; font-weight: 600; color: var(--text-3); margin-top: 5px; }
.stat-tile.tone-volt  .stat-tile-val { color: var(--volt); }
.stat-tile.tone-ember .stat-tile-val { color: var(--ember); }
.stat-tile.tone-gold  .stat-tile-val { color: var(--gold); }

/* ── Three-column working area ─────────────────────────────── */

.admin-cols { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 800px)  { .admin-cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .admin-cols { grid-template-columns: repeat(3, 1fr); } }

.mini-row {
  padding: 9px 10px; border-radius: var(--r-sm);
  background: var(--surface-2); text-decoration: none; color: inherit;
}
a.mini-row:hover { background: var(--surface-3); text-decoration: none; }

/* ── Admin tables ──────────────────────────────────────────── */

.admin-table-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: var(--r-lg); background: var(--surface);
}
.admin-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.admin-table th {
  text-align: left; padding: 11px 12px; font-size: .72rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--text-3);
  border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--surface-2); }
.admin-table input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--volt); }

/* ── Bulk action bar ───────────────────────────────────────── */

.bulkbar {
  position: sticky; top: 112px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--volt-bg); border: 1px solid var(--volt-border);
}
.bulkbar[hidden] { display: none; }

/* ── Admin forms ───────────────────────────────────────────── */

.form-row { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-row { grid-template-columns: repeat(3, 1fr); } }

/* ── INVOICE ───────────────────────────────────────────────
   Designed to print. Everything the page chrome adds is
   stripped, and the document sits on white regardless of the
   viewer's theme, because it is a legal record. */

.invoice {
  background: #fff; color: #0B0F14;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px 24px;
}
@media (min-width: 700px) { .invoice { padding: 40px 38px; } }

.invoice-head {
  display: grid; gap: 18px; grid-template-columns: 1fr;
  padding-bottom: 22px; border-bottom: 2px solid #0B0F14;
}
@media (min-width: 640px) { .invoice-head { grid-template-columns: 1fr auto; } }
.invoice .brand-name { color: #0B0F14; }
.invoice .eyebrow { color: #6B7C93; }
.invoice .muted { color: #46586E; }

.invoice-parties {
  display: grid; gap: 20px; grid-template-columns: 1fr;
  padding-block: 22px;
}
@media (min-width: 640px) { .invoice-parties { grid-template-columns: 1fr 1fr; } }
.invoice-parties p { font-size: .9rem; line-height: 1.6; margin-top: 6px; }

.invoice-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.invoice-table th {
  text-align: left; padding: 10px 0; font-size: .72rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: #6B7C93;
  border-bottom: 1px solid #D7DEE8;
}
.invoice-table td { padding: 11px 0; border-bottom: 1px solid #EEF2F7; font-size: .93rem; }
.invoice-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.invoice-sub td { font-weight: 650; border-top: 1px solid #D7DEE8; }
.invoice-total td {
  font-weight: 800; font-size: 1.15rem; border-top: 2px solid #0B0F14;
  border-bottom: 0; padding-top: 14px;
}

.invoice-pay { margin-top: 26px; padding: 16px 18px; border-radius: var(--r-md); background: #F6F8FB; }
.invoice-foot { margin-top: 22px; padding-top: 14px; border-top: 1px solid #EEF2F7; text-align: center; }

@media print {
  .admin-bar, .no-print, .breadcrumb { display: none !important; }
  .invoice { border: 0; padding: 0; }
  .wrap, .section { padding: 0 !important; max-width: none !important; }
  @page { margin: 16mm; }
}

/* Admin entry in the public header — labelled, so staff can find it. */
.admin-entry { flex-shrink: 0; }
.admin-entry svg { width: 15px; height: 15px; }
@media (max-width: 599px) { .admin-entry span { display: none; } }
