/* ============================================================
   PYRA — light editorial design system (v17)
   Paper ground, serif headlines, black actions, one brass accent.
   No gradients. Photos are the colour.
   ============================================================ */
:root {
  --paper: #F6F4EF;        /* page ground */
  --surface: #FFFFFF;      /* cards, sheets */
  --surface-2: #EFECE5;    /* image wells, inputs */
  --ink: #141316;          /* text + primary actions */
  --ink-2: #2B2930;
  --line: #E3DED4;
  --line-soft: #ECE8E0;
  --dim: #6B6875;          /* secondary text */
  --faint: #9A96A4;        /* tertiary text */
  --gold: #9A7B2F;         /* brass accent — grades, eyebrows */
  --gold-soft: rgba(154,123,47,.10);
  --danger: #CF4540;
  --win: #1F8B57;
  --live: #D8352F;
  --blue: #2F6FE4;

  /* legacy token names still referenced by inline styles in app.js */
  --bone: var(--ink);
  --slab: var(--surface);
  --slab-2: var(--surface-2);
  --holo-a: var(--blue);
  --holo-b: var(--ink);
  --holo-c: var(--gold);
  --holo: linear-gradient(var(--ink), var(--ink));

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --shell-w: 460px;
  --tabbar-h: 70px;
  --shadow-card: 0 1px 2px rgba(20,19,22,.04), 0 8px 24px -12px rgba(20,19,22,.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
.app { position: relative; max-width: var(--shell-w); margin: 0 auto; min-height: 100dvh; background: var(--paper); }
@media (min-width: 900px) { .app { border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); } }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

/* ============ Type helpers ============ */
.eyebrow, .section-label span, .price-block .lbl, .stat .l, .desc-block .l, .collect-total .l {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint);
}

/* ============ Splash ============ */
.splash { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: var(--paper); transition: opacity .45s ease, visibility .45s; }
.splash.gone { opacity: 0; visibility: hidden; }
.splash-inner { text-align: center; padding: 32px; max-width: var(--shell-w); }
.splash-logo { font-family: var(--font-display); font-weight: 400; font-size: clamp(72px, 22vw, 112px); letter-spacing: .04em; line-height: 1; color: var(--ink); }
.splash-holo-line { width: 44px; height: 2px; margin: 22px auto 24px; background: var(--gold); }
.splash-tag { color: var(--dim); margin-bottom: 36px; font-family: var(--font-display); font-style: italic; font-size: 20px; line-height: 1.35; }
.splash-enter { margin: 0 auto; }
.splash-fine { margin-top: 30px; font-family: var(--font-mono); font-size: 11px; color: var(--faint); letter-spacing: .14em; text-transform: uppercase; }

/* ============ Buttons ============ */
.btn-holo {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; letter-spacing: 0;
  color: #fff; background: var(--ink);
  padding: 15px 26px; border-radius: 999px;
  transition: transform .12s ease, background .2s ease;
}
.btn-holo:hover { background: var(--ink-2); }
.btn-holo:active { transform: scale(.98); }
.btn-holo:disabled { background: var(--line); color: var(--faint); cursor: not-allowed; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  padding: 12px 20px; border-radius: 999px;
  transition: transform .12s ease, border-color .2s;
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost:active { transform: scale(.98); }

/* ============ Screen & header ============ */
.screen { padding: 0 18px calc(var(--tabbar-h) + 28px); min-height: 100dvh; animation: screenIn .26s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 10px; margin: 0 -18px;
  position: sticky; top: 0; z-index: 10;
  background: rgba(246,244,239,.92); backdrop-filter: blur(10px);
}
.hdr-logo { font-family: var(--font-display); font-size: 28px; letter-spacing: .06em; color: var(--ink); display: flex; align-items: center; }
.hdr-logo i { font-style: normal; color: var(--gold); }
.hdr-title { font-family: var(--font-display); font-size: 26px; letter-spacing: .01em; }
.hdr-back { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-weight: 600; font-size: 14px; padding: 8px 10px 8px 0; }
.hdr-back:hover { color: var(--ink); }
.hdr-right { display: flex; align-items: center; gap: 8px; }
.wallet-chip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; background: var(--surface); border: 1px solid var(--line); padding: 8px 13px; border-radius: 999px; }
.wallet-chip svg { color: var(--gold); }
.bell-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }
.bell-btn:hover { border-color: var(--ink); }
.bell-btn .tab-dot { top: 7px; right: 8px; }
.demo-pill { display: inline-block; vertical-align: middle; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(154,123,47,.4); padding: 3px 7px; border-radius: 4px; margin-left: 10px; }

/* ============ Badges & chips ============ */
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: 5px 10px 5px 9px; border-radius: 999px; }
.live-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--dim); padding: 5px 11px; border-radius: 999px; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }
.grade-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--gold); border: 1px solid rgba(154,123,47,.35); background: var(--gold-soft); padding: 4px 9px; border-radius: 6px; }
.grade-chip.pop { color: var(--blue); border-color: rgba(47,111,228,.3); background: rgba(47,111,228,.07); }

/* ============ Filters ============ */
.cats { display: flex; gap: 8px; margin: 12px 0 4px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats-grade { margin-top: 0; }
.cat { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; color: var(--dim); background: var(--surface); border: 1px solid var(--line); padding: 9px 16px; border-radius: 999px; transition: all .15s ease; }
.cat svg { width: 14px; height: 14px; }
.cat:hover { border-color: var(--ink); color: var(--ink); }
.cat.on { color: #fff; background: var(--ink); border-color: var(--ink); }
.cat.on.gold { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ============ Section labels ============ */
.section-label { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; }
.section-label h2 { font-family: var(--font-display); font-weight: 400; font-size: 24px; letter-spacing: 0; line-height: 1.1; }

/* ============ Featured (lot of the day) ============ */
.featured { position: relative; display: grid; grid-template-columns: 138px 1fr; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; cursor: pointer; box-shadow: var(--shadow-card); transition: transform .15s ease, border-color .2s; }
.featured:hover { border-color: var(--ink); }
.featured:active { transform: scale(.99); }
.featured-img { border-radius: 10px; overflow: hidden; background: var(--surface-2); aspect-ratio: 63/88; display: grid; place-items: center; padding: 8px; }
.featured-img img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(20,19,22,.18)); }
.featured-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.featured-body .name { font-family: var(--font-display); font-size: 30px; line-height: 1.02; letter-spacing: -.01em; margin-top: 2px; }
.featured-body .set { color: var(--dim); font-size: 13px; }
.featured-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.featured-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
.price-block .val { font-family: var(--font-mono); font-weight: 700; font-size: 22px; letter-spacing: -.02em; white-space: nowrap; }
.price-block .val small { font-size: 11px; color: var(--faint); font-weight: 600; }

/* ============ Countdown ============ */
.count { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: 5px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.count .ends { font-weight: 500; font-size: 10.5px; color: var(--faint); margin-left: 7px; padding-left: 7px; border-left: 1px solid var(--line); letter-spacing: 0; }
.count.urgent { color: var(--live); border-color: rgba(216,53,47,.35); background: #FFF3F2; animation: pulse 1.2s ease-in-out infinite; }
.count.urgent .ends { color: inherit; opacity: .75; border-color: rgba(216,53,47,.3); }
.count.done { color: var(--faint); }
.count.buy-chip, .buy-tag { color: var(--gold); border-color: rgba(154,123,47,.35); background: var(--gold-soft); }
.buy-tag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-weight: 600; font-size: 11.5px; padding: 5px 10px; border-radius: 8px; border: 1px solid rgba(154,123,47,.35); }
.gcard .img .count .ends, .rail-card .count .ends { font-size: 10px; margin-left: 5px; padding-left: 5px; }

/* ============ Rails ============ */
.rail { display: flex; gap: 12px; overflow-x: auto; margin: 0 -18px; padding: 4px 18px 10px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-card { flex: 0 0 152px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; text-align: left; cursor: pointer; transition: transform .15s ease, border-color .2s; }
.rail-card:hover { border-color: var(--ink); }
.rail-card:active { transform: scale(.98); }
.rail-card .img { border-radius: 8px; overflow: hidden; aspect-ratio: 63/88; background: var(--surface-2); margin-bottom: 10px; display: grid; place-items: center; padding: 6px; }
.rail-card .img img { width: 100%; height: 100%; object-fit: contain; }
.rail-card .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-card .bid { font-family: var(--font-mono); font-weight: 600; font-size: 13px; margin: 3px 0 8px; }
.rail-card .bid s { color: var(--faint); font-weight: 500; font-size: 10.5px; text-decoration: none; margin-right: 4px; text-transform: uppercase; letter-spacing: .06em; }

/* ============ Grid cards ============ */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gcard { min-width: 0; }
.gcard .row { flex-wrap: wrap; row-gap: 2px; }
.gcard .bid { white-space: nowrap; font-size: clamp(12.5px, 4vw, 15px); }
.gcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; text-align: left; cursor: pointer; transition: transform .15s ease, border-color .2s, box-shadow .2s; }
.gcard:hover { border-color: var(--ink); box-shadow: var(--shadow-card); }
.gcard:active { transform: scale(.98); }
.gcard .img { position: relative; border-radius: 9px; overflow: hidden; aspect-ratio: 63/88; background: var(--surface-2); margin-bottom: 10px; display: grid; place-items: center; padding: 8px; }
.gcard .img img { width: 100%; height: 100%; object-fit: contain; }
.gcard .img .count { position: absolute; left: 7px; bottom: 7px; }
.gcard .img .grade-chip { position: absolute; right: 7px; top: 7px; background: var(--surface); }
.gcard .nm { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard .st { color: var(--dim); font-size: 12px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard .row { display: flex; align-items: center; justify-content: space-between; }
.gcard .bid { font-family: var(--font-mono); font-weight: 700; font-size: 15px; }
.gcard .bid em { font-style: normal; font-size: 10px; color: var(--faint); display: block; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.gcard .bids-n { font-size: 11.5px; color: var(--dim); }
.gcard .mine { position: absolute; top: -8px; left: 12px; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .08em; padding: 3px 8px; border-radius: 5px; z-index: 1; }
.mine.winning { background: #E7F5EC; color: var(--win); border: 1px solid #BFE3CC; }
.mine.outbid { background: #FDECEB; color: var(--danger); border: 1px solid #F3C7C4; }
.mine.yours { background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(154,123,47,.35); }

/* ============ Detail ============ */
.detail-hero { position: relative; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 28px 26px 22px; margin-top: 8px; display: flex; justify-content: center; }
.detail-hero .img { position: relative; width: min(64%, 230px); border-radius: 10px; overflow: hidden; border: 0; background: none; padding: 0; cursor: zoom-in; animation: cardIn .45s cubic-bezier(.2,.9,.3,1.1) both; filter: drop-shadow(0 18px 30px rgba(20,19,22,.22)); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.detail-hero .img::after { display: none; }
.detail-hero .img.slab-frame { padding: 34px 12px 14px; background: rgba(255,255,255,.75); border: 1px solid rgba(20,19,22,.12); border-radius: 12px; overflow: visible; filter: drop-shadow(0 18px 30px rgba(20,19,22,.18)); }
.detail-hero .img.slab-frame img { border-radius: 4px; }
.detail-hero .img.slab-frame::after { display: none; }
.slab-label { position: absolute; top: 6px; left: 6px; right: 6px; height: 24px; background: #E33B31; color: #fff; border-radius: 4px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; font-family: var(--font-mono); font-size: 11px; }
.slab-label small { font-size: 9px; opacity: .9; letter-spacing: .05em; }
.detail-hero .watch { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--dim); transition: all .18s ease; }
.detail-hero .watch.on { color: var(--live); border-color: rgba(216,53,47,.4); }
.detail-hero .watch:active { transform: scale(.9); }
.zoom-hint { position: absolute; left: 14px; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--dim); background: var(--surface); border: 1px solid var(--line); padding: 4px 9px; border-radius: 999px; }
.zoom-hint svg { width: 12px; height: 12px; }
.thumbs { display: flex; gap: 8px; margin: 10px 0 2px; }
.thumb { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--dim); font-size: 10.5px; font-weight: 600; }
.thumb img { width: 44px; aspect-ratio: 63/88; object-fit: cover; border-radius: 5px; background: var(--surface-2); }
.thumb.on { border-color: var(--ink); color: var(--ink); }

.detail-title { margin: 20px 2px 4px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-title h1 { font-family: var(--font-display); font-weight: 400; font-size: 38px; line-height: 1; letter-spacing: -.01em; }
.detail-sub { color: var(--dim); font-size: 13.5px; margin: 6px 2px 16px; }
.detail-sub b { color: var(--ink); font-weight: 600; }

.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; }
.stat .l { margin-bottom: 5px; }
.stat .v { font-family: var(--font-mono); font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; }
.stat .v.urgent { color: var(--live); }
.stat-sub { font-family: var(--font-mono); font-size: 11px; color: var(--dim); margin-top: 3px; }
.stat-row .field { margin: 0; }

.seller-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 15px; margin-bottom: 10px; }
.seller-row.tappable { width: 100%; text-align: left; cursor: pointer; transition: border-color .2s; }
.seller-row.tappable:hover { border-color: var(--ink); }
.seller-row .chev, .seller-row.tappable .chev { color: var(--faint); }
.seller-ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 20px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.seller-ava.big { width: 64px; height: 64px; font-size: 30px; }
.seller-info { flex: 1; min-width: 0; }
.seller-info .n { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 5px; }
.seller-info .n svg { color: var(--blue); flex-shrink: 0; }
.seller-info .m { color: var(--dim); font-size: 12px; }
.seller-loc { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }

.trust-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.trust { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 15px; font-size: 13.5px; color: var(--dim); }
.trust svg { color: var(--gold); flex-shrink: 0; }
.trust b { color: var(--ink); font-weight: 600; }

.desc-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 15px; margin-bottom: 12px; }
.desc-block .l { margin-bottom: 6px; }
.desc-block p { color: var(--ink-2); font-family: var(--font-display); font-size: 17px; line-height: 1.4; }

.hist-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 15px 8px; margin-bottom: 12px; }
.hist-block .section-label h2 { font-size: 20px; }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.hist-row:first-of-type { border-top: 0; }
.hist-grade { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); flex: 1; min-width: 0; }
.hist-grade svg { color: var(--gold); flex-shrink: 0; }
.hist-price { font-family: var(--font-mono); font-weight: 600; font-size: 13.5px; }
.hist-note { font-size: 12px; color: var(--dim); padding: 6px 0 8px; }
.hist-note.dim { color: var(--faint); border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.hist-row.link { text-decoration: none; color: var(--blue); }
.hist-row.link .hist-grade { color: var(--blue); }
.hist-row.link .hist-price { color: var(--dim); font-size: 12px; }
.slab-panel .hist-price { font-size: 13px; }
.al-ago { font-size: 11px; color: var(--faint); font-family: var(--font-mono); }

.bid-history { margin-bottom: 16px; }
.bid-history .section-label { margin-top: 10px; }
.bh-item { display: flex; align-items: center; justify-content: space-between; padding: 11px 2px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; animation: bhIn .3s ease both; }
@keyframes bhIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.bh-item .who { display: flex; align-items: center; gap: 9px; color: var(--dim); }
.bh-item .who .ava { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--dim); }
.bh-item .who.you { color: var(--blue); }
.bh-item .amt { font-family: var(--font-mono); font-weight: 600; }
.bh-item.top .amt { color: var(--win); }
.bh-item .ago { font-size: 11px; color: var(--faint); margin-left: 8px; }

/* Sticky bid bar */
.bidbar { position: fixed; bottom: var(--tabbar-h); left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--shell-w); padding: 12px 18px 12px; background: linear-gradient(rgba(246,244,239,0), var(--paper) 30%); z-index: 20; }
.bidbar-inner { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: 0 -8px 30px rgba(20,19,22,.08), var(--shadow-card); }
.quick { display: flex; gap: 6px; }
.quick button { font-family: var(--font-mono); font-weight: 600; font-size: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); padding: 0 12px; border-radius: 10px; transition: all .15s ease; }
.quick button:hover { border-color: var(--ink); }
.quick button.sel { background: var(--ink); color: #fff; border-color: var(--ink); }
.bidbar .btn-holo { flex: 1; min-width: 0; padding: 13px 8px; font-size: 13.5px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ended-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 14px; color: var(--dim); }
.ended-bar.won { border-color: #BFE3CC; color: var(--win); background: #F1FAF4; }

/* ============ Sheets ============ */
.sheet-backdrop[hidden] { display: none; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(20,19,22,.45); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: var(--shell-w); background: var(--surface); border-radius: 22px 22px 0 0; padding: 14px 20px calc(20px + env(safe-area-inset-bottom)); animation: sheetUp .3s cubic-bezier(.2,.9,.3,1) both; }
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 16px; }
.sheet h3 { font-family: var(--font-display); font-weight: 400; font-size: 26px; margin-bottom: 4px; }
.sheet .sub { color: var(--dim); font-size: 13px; margin-bottom: 16px; }
.sheet-amount { font-family: var(--font-mono); font-weight: 700; font-size: 36px; text-align: center; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.sheet-amount small { font-size: 14px; color: var(--faint); font-weight: 600; }
.sheet-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.sheet-steps button { font-family: var(--font-mono); font-weight: 600; font-size: 13px; min-width: 48px; height: 40px; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.sheet-steps button:active { transform: scale(.94); }
.fee-lines { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; margin-bottom: 16px; }
.fee-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--dim); padding: 3px 0; }
.fee-line b { color: var(--ink); font-family: var(--font-mono); font-weight: 600; text-align: right; }
.fee-line.total { font-weight: 600; color: var(--ink); border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 9px; }
.sheet .btn-holo { width: 100%; }
.sheet-cancel { width: 100%; text-align: center; color: var(--faint); font-weight: 600; font-size: 13.5px; padding: 14px 0 2px; }

/* ============ Search ============ */
.searchbox { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; margin: 14px 0 8px; }
.searchbox svg { color: var(--faint); flex-shrink: 0; }
.searchbox input { flex: 1; background: none; border: 0; outline: none; font-size: 15px; color: var(--ink); }
.searchbox input::placeholder { color: var(--faint); }
.save-search { display: flex; align-items: center; gap: 8px; width: 100%; margin: 6px 0 2px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); background: var(--gold-soft); border: 1px solid rgba(154,123,47,.3); text-align: left; }
.save-search:hover { border-color: var(--gold); }
.save-search.saved { color: var(--win); background: #F1FAF4; border-color: #BFE3CC; }
.saved-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.saved-item { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; font-weight: 600; }
.saved-item span { flex: 1; }
.saved-item svg:first-child { color: var(--gold); }
.saved-x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); border: 1px solid var(--line); background: var(--surface); }
.saved-x:hover { color: var(--danger); border-color: var(--danger); }

/* ============ Forms ============ */
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--dim); letter-spacing: .02em; margin-bottom: 7px; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; color: var(--ink); font-size: 15px; outline: none; transition: border-color .2s; -webkit-appearance: none; appearance: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); }
.field .hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.hint.proceeds b { color: var(--win); }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; font-weight: 600; font-size: 13.5px; color: var(--dim); padding: 10px 6px; border-radius: 9px; transition: all .15s ease; }
.seg button.on { background: var(--ink); color: #fff; }
.upload { border: 1.5px dashed var(--line); border-radius: var(--r-md); background: var(--surface); padding: 22px; text-align: center; cursor: pointer; color: var(--dim); font-size: 13.5px; transition: border-color .2s; position: relative; overflow: hidden; }
.upload:hover { border-color: var(--ink); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload svg { color: var(--faint); margin: 0 auto 8px; }
.upload.has-img { padding: 0; border-style: solid; }
.upload.has-img img { width: 100%; max-height: 260px; object-fit: contain; background: var(--surface-2); }
.plate-preview { padding: 0; display: flex; justify-content: center; }
.plate-preview img { width: 60%; max-height: none; }
.plate-empty { padding: 26px; color: var(--faint); font-size: 13px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.form .btn-holo { width: 100%; margin-top: 4px; }
.fee-note { text-align: center; font-size: 12px; color: var(--faint); }

/* ============ Activity / lists ============ */
.subtabs { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin: 12px 0 18px; }
.subtabs button { flex: 1; font-weight: 600; font-size: 13px; color: var(--dim); padding: 10px 4px; border-radius: 9px; transition: all .15s; white-space: nowrap; }
.subtabs button.on { background: var(--ink); color: #fff; }
.act-item { display: flex; gap: 13px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; margin-bottom: 10px; cursor: pointer; text-align: left; width: 100%; transition: border-color .2s, transform .15s ease; }
.act-item:hover { border-color: var(--ink); }
.act-item:active { transform: scale(.99); }
.act-item .img { width: 52px; border-radius: 7px; overflow: hidden; aspect-ratio: 63/88; background: var(--surface-2); flex-shrink: 0; display: grid; place-items: center; }
.act-item .img img { width: 100%; height: 100%; object-fit: contain; }
.act-item .mid { flex: 1; min-width: 0; }
.act-item .mid .n { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-item .mid .s { color: var(--dim); font-size: 12px; }
.act-item .right { text-align: right; flex-shrink: 0; }
.act-item .right .amt { font-family: var(--font-mono); font-weight: 700; font-size: 14.5px; }
.status-pill { display: inline-block; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; margin-top: 4px; }
.status-pill.winning { background: #E7F5EC; color: var(--win); }
.status-pill.outbid { background: #FDECEB; color: var(--danger); }
.status-pill.won { background: var(--gold-soft); color: var(--gold); }
.status-pill.neutral { background: var(--surface-2); color: var(--dim); }

/* Escrow timeline */
.escrow-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin-bottom: 12px; }
.escrow-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.escrow-head .img { width: 46px; border-radius: 6px; overflow: hidden; aspect-ratio: 63/88; flex-shrink: 0; background: var(--surface-2); display: grid; place-items: center; }
.escrow-head .img img { width: 100%; height: 100%; object-fit: contain; }
.escrow-head .n { font-weight: 600; font-size: 14.5px; }
.escrow-head .p { font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.timeline { display: flex; flex-direction: column; }
.tl-step { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before { content: ''; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.tl-step:last-child::before { display: none; }
.tl-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.tl-step.done .tl-dot { border-color: var(--win); background: #E7F5EC; }
.tl-step.done .tl-dot svg { color: var(--win); }
.tl-step.now .tl-dot { border-color: var(--ink); animation: pulse 1.6s ease-in-out infinite; }
.tl-body .t { font-size: 13.5px; font-weight: 600; color: var(--faint); }
.tl-step.done .tl-body .t, .tl-step.now .tl-body .t { color: var(--ink); }
.tl-body .d { font-size: 11.5px; color: var(--dim); font-family: var(--font-mono); }
.escrow-card .btn-ghost { width: 100%; margin-top: 14px; }
.escrow-card .btn-ghost.confirm { border-color: var(--win); color: var(--win); }

/* ============ Profile ============ */
.profile-head { display: flex; align-items: center; gap: 16px; margin: 18px 0 22px; }
.profile-ava { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 32px; color: #fff; background: var(--ink); }
.profile-head .n { font-family: var(--font-display); font-size: 28px; display: flex; align-items: center; gap: 7px; line-height: 1; }
.profile-head .n svg { color: var(--blue); }
.profile-head .m { color: var(--dim); font-size: 13px; margin-top: 4px; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.stat-tiles .stat .v { font-size: 17px; }
.plist { display: flex; flex-direction: column; gap: 8px; }
.plist-item { display: flex; align-items: center; gap: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px; font-weight: 600; font-size: 14.5px; width: 100%; text-align: left; transition: border-color .2s; }
.plist-item:hover { border-color: var(--ink); }
.plist-item svg:first-child { color: var(--dim); flex-shrink: 0; }
.plist-item span { flex: 1; }
.plist-item .sub { display: block; font-weight: 500; font-size: 12px; color: var(--faint); }
.plist-item .chev { color: var(--faint); }
.collect-total { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 22px 20px; text-align: center; margin: 12px 0 14px; }
.collect-total .l { color: rgba(255,255,255,.55); }
.collect-total .v { font-family: var(--font-mono); font-weight: 700; font-size: 36px; margin: 6px 0 2px; }
.collect-total .v small { font-size: 13px; color: rgba(255,255,255,.55); font-weight: 600; }
.collect-total .m { font-size: 12.5px; color: rgba(255,255,255,.6); }

/* ============ Reviews ============ */
.review { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 15px; margin-bottom: 10px; }
.review-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-stars { color: var(--gold); letter-spacing: 2px; font-size: 14px; }
.star-off { color: var(--line); }
.review p { font-family: var(--font-display); font-size: 17px; line-height: 1.35; color: var(--ink-2); }
.review-who { margin-top: 8px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }

/* ============ Alerts feed ============ */
.alert-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 14px; margin-bottom: 8px; font-size: 14px; transition: border-color .2s; }
.alert-item:hover { border-color: var(--ink); }
.alert-item .al-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin-top: 7px; flex-shrink: 0; }
.alert-item.unread { border-color: var(--ink); }
.alert-item.unread .al-dot { background: var(--ink); }
.alert-item.good .al-dot { background: var(--win); }
.alert-item.bad .al-dot { background: var(--danger); }
.alert-item .al-text { flex: 1; }

/* ============ Empty states ============ */
.empty { text-align: center; padding: 52px 24px; color: var(--dim); }
.empty svg { color: var(--faint); margin: 0 auto 14px; }
.empty .t { font-family: var(--font-display); font-size: 24px; color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: 14px; }
.empty .btn-ghost { margin: 18px auto 0; }

/* ============ Tab bar ============ */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--shell-w); height: var(--tabbar-h); display: flex; align-items: stretch; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; position: relative; transition: color .2s; }
.tab svg { width: 22px; height: 22px; }
.tab.on { color: var(--ink); }
.tab-dot { position: absolute; top: 12px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--live); border: 2px solid #fff; }
.tab-sell { color: var(--faint); }
.sell-orb { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; margin-top: -18px; box-shadow: 0 8px 20px -6px rgba(20,19,22,.4); transition: transform .15s ease; }
.sell-orb svg { width: 20px; height: 20px; }
.tab-sell:active .sell-orb { transform: scale(.92); }
.tab-sell.on { color: var(--ink); }

/* ============ Toasts ============ */
.toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: calc(var(--shell-w) - 32px); z-index: 70; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 14px; padding: 13px 16px; font-size: 13.5px; font-weight: 500; box-shadow: 0 16px 40px rgba(20,19,22,.25); animation: toastIn .3s cubic-bezier(.2,.9,.3,1.2) both; }
.toast.out { animation: toastOut .25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }
.toast svg { flex-shrink: 0; }
.toast.good svg { color: #6FE3A5; }
.toast.bad svg { color: #FF8A85; }
.toast.info svg { color: #FFD37D; }

/* ============ Lightbox ============ */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(246,244,239,.97); display: flex; flex-direction: column; align-items: center; justify-content: center; animation: fadeIn .18s ease both; }
.lb-scroll { max-width: 100%; max-height: 100%; overflow: auto; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: min(92vw, 560px); max-height: 82vh; border-radius: 10px; cursor: zoom-in; transition: transform .25s ease; filter: drop-shadow(0 24px 40px rgba(20,19,22,.25)); }
.lightbox img.zoomed { transform: scale(2.2); cursor: zoom-out; }
.lb-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }
.lb-hint { position: absolute; bottom: 22px; font-size: 12px; color: var(--dim); text-align: center; max-width: 80vw; }
/* Zoomed slab: the whole holder, label and cert — not just the art inside it */
.lb-slab { width: min(88vw, 460px); filter: drop-shadow(0 24px 44px rgba(20,19,22,.28)); }
.lb-slab .slab { width: 100%; }
.lb-slab .slab img { max-width: 100%; max-height: none; border-radius: 0; filter: none; cursor: default; }
/* Slab thumbnail shows a miniature slab, so "Slab" never previews as bare art */
.thumb.is-slab .slab { width: 44px; }
.thumb.is-slab .slab img { width: 100%; }

/* ============ Desktop ============ */
@media (min-width: 900px) {
  :root { --shell-w: 1040px; }
  .screen { padding-left: 32px; padding-right: 32px; }
  .hdr { margin: 0 -32px; padding-left: 32px; padding-right: 32px; }
  .rail { margin: 0 -32px; padding-left: 32px; padding-right: 32px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .gcard .bid { font-size: 15px; }
  .rail-card { flex-basis: 196px; }
  .featured { grid-template-columns: 220px 1fr; padding: 24px; gap: 28px; }
  .featured-body .name { font-size: 44px; }
  .stat-row { grid-template-columns: repeat(4, 1fr); }
  .screen[data-screen="detail"], .screen[data-screen="sell"], .screen[data-screen="activity"], .screen[data-screen="profile"],
  .screen[data-screen="alerts"], .screen[data-screen="collection"], .screen[data-screen="mylistings"], .screen[data-screen="pinfo"] { max-width: 760px; margin: 0 auto; }
  .screen[data-screen="seller"] .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-hero .img { width: min(48%, 300px); }
  .detail-title h1 { font-size: 46px; }
  .bidbar, .sheet, .toasts { max-width: 760px; }
  body { font-size: 15.5px; }
}

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

/* custom bid amount */
.custom-bid { margin: 2px 0 14px; }
.custom-bid label { display: block; font-size: 12px; font-weight: 600; color: var(--dim); margin-bottom: 7px; }
.custom-bid-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.custom-bid-row:focus-within { border-color: var(--ink); }
.custom-bid-row span { font-family: var(--font-mono); font-size: 12px; color: var(--faint); font-weight: 600; }
.custom-bid-row input { flex: 1; border: 0; outline: none; background: none; font-family: var(--font-mono); font-weight: 600; font-size: 20px; padding: 12px 0; color: var(--ink); -moz-appearance: textfield; }
.custom-bid-row input::-webkit-outer-spin-button, .custom-bid-row input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.custom-bid .hint { font-size: 12px; color: var(--faint); margin-top: 6px; }
.custom-bid .hint.bad { color: var(--danger); }
.quick button.custom { font-family: var(--font-body); font-weight: 600; }

/* nested category row */
.cats-sub { margin: 4px 0 4px; align-items: center; }
.sub-arrow { color: var(--faint); font-size: 14px; padding: 0 2px 0 6px; flex-shrink: 0; }
.cat.sm { padding: 7px 13px; font-size: 13px; }
.cat .dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
.cat.on .dot { border-color: rgba(255,255,255,.4); }

.sortrow { align-items: center; margin-top: -4px; margin-bottom: 10px; }
.sortrow .sub-arrow { display: inline-flex; color: var(--dim); }

html, body { overflow-x: hidden; }

/* small grid chips: timer only; end time stays on featured, rail, detail */
@media (max-width: 899px) { .gcard .img .count .ends { display: none; } }

/* ============ cert verification in sell flow ============ */
.cert-row { display: flex; gap: 8px; }
.cert-row input { flex: 1; }
.cert-btn { padding: 0 18px; border-radius: 12px; font-size: 14px; white-space: nowrap; }
.cert-result { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13px; border: 1px solid var(--line); background: var(--surface); }
.cert-result div { display: flex; flex-direction: column; gap: 2px; }
.cert-result b { font-size: 13.5px; }
.cert-result span { color: var(--dim); font-size: 12.5px; }
.cert-result.ok { border-color: #BFE3CC; background: #F1FAF4; }
.cert-result.ok svg, .cert-result.ok b { color: var(--win); }
.cert-result.fail { border-color: #F3C7C4; background: #FDF1F0; }
.cert-result.fail svg, .cert-result.fail b { color: var(--danger); }
.cert-result.checking { color: var(--dim); align-items: center; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-cert { font-family: var(--font-mono); font-size: 11px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; margin-right: 4px; }
.cert-field input[readonly] { background: var(--surface-2); color: var(--dim); }

/* ============ identity gate ============ */
.gate { position: fixed; inset: 0; z-index: 65; background: var(--paper); display: flex; align-items: center; justify-content: center; overflow: auto; animation: fadeIn .25s ease both; }
.gate-inner { width: 100%; max-width: 420px; padding: 32px 24px; display: flex; flex-direction: column; gap: 14px; }
.gate-logo { font-family: var(--font-display); font-size: 34px; letter-spacing: .06em; text-align: center; margin-bottom: 6px; }
.gate-logo i { font-style: normal; color: var(--gold); }
.gate-steps { display: flex; justify-content: center; gap: 18px; margin-bottom: 10px; }
.gate-steps span { display: flex; flex-direction: column; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.gate-steps span em { font-style: normal; font-family: var(--font-body); font-size: 11px; letter-spacing: .04em; }
.gate-steps span.now { color: var(--ink); }
.gate-steps span.done { color: var(--win); }
.gate-steps span svg { width: 14px; height: 14px; }
.gate h2 { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.05; }
.gate p { color: var(--dim); font-size: 14.5px; }
.gate .btn-holo { width: 100%; }
.gate .otp { text-align: center; font-family: var(--font-mono); font-size: 28px; letter-spacing: .5em; font-weight: 700; }
.gate-demo { display: inline-block; margin-top: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--gold); }
.gate-demo b { color: var(--ink); }
.gate-ok { width: 64px; height: 64px; border-radius: 50%; background: #E7F5EC; color: var(--win); display: grid; place-items: center; margin: 0 auto 4px; }
.gate-ok svg { width: 30px; height: 30px; }
.gate-fine { text-align: center; font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; margin-top: 10px; }

/* ============ Real-slab rendering for graded lots ============ */
.slab { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; background: linear-gradient(165deg, rgba(255,255,255,.72), rgba(255,255,255,.28) 45%, rgba(255,255,255,.55)); border: 1px solid rgba(20,19,22,.22); border-radius: 8% / 5.5%; padding: 4.5% 5% 5%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), inset 0 0 18px rgba(20,19,22,.06), 0 6px 16px -6px rgba(20,19,22,.28); font-size: 6px; }
.slab-lab { position: relative; background: #FFFFFF; border: 1px solid rgba(20,19,22,.15); border-radius: .5em; padding: .8em 1em; display: flex; justify-content: space-between; gap: 1em; font-family: Arial, Helvetica, sans-serif; font-weight: 700; color: #111; letter-spacing: .02em; line-height: 1.25; font-size: 1em; text-transform: uppercase; margin-bottom: 5%; min-height: 4.6em; }
.slab-l, .slab-r { display: flex; flex-direction: column; gap: .15em; min-width: 0; }
.slab-l { flex: 1; }
.slab-l div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slab-r div { white-space: nowrap; }
.slab-r { text-align: right; align-items: flex-end; }
.slab-name { font-size: 1.15em; }
.slab-grade { font-size: 1.2em; white-space: nowrap; }
.slab-cert { font-weight: 600; letter-spacing: .04em; }
.slab-mark { position: static; align-self: flex-end; transform: none; padding: 0 .4em .1em; font-family: Arial Black, Arial, sans-serif; font-weight: 900; font-size: 1.35em; letter-spacing: .05em; color: #D8352F; background: linear-gradient(90deg, #D8352F 0 60%, #1F4FB8 60%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.slab.bgs .slab-lab { background: #111; color: #E8C36A; border-color: #333; }
.slab.bgs .slab-mark { background: none; -webkit-text-fill-color: #E8C36A; color: #E8C36A; }
.slab.cgc .slab-lab { background: #0E2A63; color: #fff; }
.slab.cgc .slab-mark { background: none; -webkit-text-fill-color: #fff; }
.slab-card { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.slab-card img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 3%; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
/* compact label (grid, rails, lists): one line, grader + grade */
.slab.compact .slab-lab { justify-content: space-between; align-items: center; min-height: 0; padding: .7em 1em; }
.slab.compact .slab-mark { position: static; transform: none; font-size: 1.2em; }
.slab.compact .slab-grade { font-size: 1.05em; }
/* size the slab typography by context */
.gcard .img .slab, .rail-card .img .slab, .act-item .img .slab, .escrow-head .img .slab, .thumb .slab { font-size: 5px; }
.act-item .img .slab, .escrow-head .img .slab { font-size: 3px; padding: 5% 6%; }
.featured-img .slab { font-size: 5.5px; }
.detail-hero .img.is-slab { width: min(72%, 260px); border-radius: 12px; overflow: visible; filter: none; padding: 0; }
.detail-hero .img.is-slab .slab { font-size: 8.5px; aspect-ratio: 63/104; height: auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), inset 0 0 22px rgba(20,19,22,.06), 0 22px 40px -16px rgba(20,19,22,.35); }
.featured-img, .gcard .img, .rail-card .img { padding: 6px; }
.featured-img .slab, .gcard .img .slab, .rail-card .img .slab { aspect-ratio: 63/104; height: auto; max-height: 100%; }
@media (min-width: 900px) { .gcard .img .slab, .rail-card .img .slab { font-size: 6px; } .detail-hero .img.is-slab .slab { font-size: 10px; } }

/* bid bar with the extra "Any" chip must fit 375px */
.quick button { padding: 0 9px; font-size: 11.5px; }
.quick button.custom { font-size: 12px; padding: 0 10px; }
.bidbar .btn-holo { font-size: 13px; padding: 13px 6px; }

/* full slab label = real PSA layout: two text columns on top, grader mark centered underneath */
.slab:not(.compact) .slab-lab { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 1em; row-gap: .3em; align-items: start; }
.slab:not(.compact) .slab-l div { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
.slab:not(.compact) .slab-l { font-size: .95em; }
.slab:not(.compact) .slab-mark { grid-column: 1 / -1; justify-self: center; align-self: center; padding: 0; line-height: 1; }
.detail-hero .img.is-slab .slab { font-size: 8px; }

/* ============ market price + fair-price meter ============ */
.market-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 4px 0 10px; }
.market-mid small { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
.market-mid b { font-family: var(--font-mono); font-size: 24px; font-weight: 700; }
.fair-tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 6px; white-space: nowrap; }
.fair-tag.good { background: #E7F5EC; color: var(--win); }
.fair-tag.fair { background: var(--surface-2); color: var(--dim); }
.fair-tag.high { background: #FBEFD9; color: #9A5B12; }
.fair-tag.mini { font-size: 9.5px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }
.fair-meter { position: relative; height: 34px; margin: 2px 0 6px; }
.fm-line { position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #BFE3CC 0 40%, var(--line) 40% 60%, #F3DFB8 60%); }
.fm-mark { position: absolute; top: 4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(20,19,22,.3); transition: left .4s ease; }
.fm-lab { position: absolute; top: 20px; font-family: var(--font-mono); font-size: 9.5px; color: var(--faint); letter-spacing: .04em; }
.fm-lab.l { left: 0; } .fm-lab.c { left: 50%; transform: translateX(-50%); } .fm-lab.r { right: 0; }
.hist-grade .this { font-style: normal; font-family: var(--font-mono); font-size: 9.5px; color: var(--gold); border: 1px solid rgba(154,123,47,.35); border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.market-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 11px 12px; border-radius: 12px; background: var(--gold-soft); border: 1px solid rgba(154,123,47,.3); }
.market-hint div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.market-hint b { font-size: 13px; }
.market-hint span { font-size: 12px; color: var(--dim); }
.market-hint .btn-ghost { padding: 9px 12px; font-size: 12.5px; white-space: nowrap; flex-shrink: 0; }

/* dropdown reveal for nested category rows */
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); max-height: 0; } to { opacity: 1; transform: none; max-height: 80px; } }
.drop { animation: dropIn .22s ease both; overflow: hidden; }
.seg.sub { margin-top: 8px; background: transparent; border: 0; padding: 0; gap: 8px; align-items: center; }
.seg.sub button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 13px; }
.seg.sub button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.seg.sub .dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
.seg.sub button.on .dot { border-color: rgba(255,255,255,.4); }

/* ============ checkout payment methods ============ */
.pay-methods { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.pay-pill { flex: 1 1 calc(50% - 3px); display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 11px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13.5px; color: var(--ink); }
.pay-pill small { font-weight: 500; font-size: 11px; color: var(--dim); }
.pay-pill.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pay-pill:disabled { opacity: .4; cursor: not-allowed; }
.pay-pill.bnpl { font-family: var(--font-display); font-style: italic; font-size: 16px; letter-spacing: -.01em; }
.apple-mark { font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif; font-weight: 600; }
.pay-hint { font-size: 12px; color: var(--dim); margin-bottom: 12px; }
.btn-holo.apple { background: #000; }
/* surface video */
.upload.video video { width: 100%; max-height: 220px; object-fit: cover; }
.video-ok { display: flex; align-items: center; gap: 10px; padding: 14px 16px; text-align: left; color: var(--win); }
.video-ok div { display: flex; flex-direction: column; }
.video-ok span { font-size: 12px; color: var(--dim); font-family: var(--font-mono); }
.trust.video-row em { font-style: normal; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; margin-left: 6px; font-size: 12px; }

/* ============ v32: hero stats, hot rail, drops, VIP, leaderboards, chart, RTL ============ */
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 4px; }
.hero-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; text-align: center; }
.hero-stats b { display: block; font-family: var(--font-mono); font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.hero-stats span { display: block; font-size: 10.5px; color: var(--faint); letter-spacing: .04em; margin-top: 2px; }
.lang-btn { font-family: var(--font-body); font-weight: 700; font-size: 13px; }
.rail-card.hot { position: relative; border-color: rgba(216,53,47,.35); }
.hot-tag { position: absolute; top: -8px; left: 10px; z-index: 1; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .08em; color: #fff; background: var(--live); padding: 3px 8px; border-radius: 5px; }
.drop-card { flex: 0 0 236px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.drop-card.night { background: var(--ink); color: #fff; border-color: var(--ink); }
.drop-card.night .drop-when, .drop-card.night .drop-note { color: rgba(255,255,255,.65); }
.drop-card.night .btn-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; }
.drop-tag { align-self: flex-start; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(154,123,47,.35); padding: 3px 7px; border-radius: 5px; }
/* An event PYRA has not actually booked says so, on the card and on the page */
.drop-tag.proposed { color: var(--faint); border-color: var(--line); border-style: dashed; margin-inline-start: 6px; }
.drop-card.night .drop-tag { color: #FFD37D; border-color: rgba(255,211,125,.4); }
.drop-title { font-family: var(--font-display); font-size: 21px; line-height: 1.1; }
.drop-when { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); }
.drop-note { font-size: 12.5px; color: var(--dim); flex: 1; }
.btn-ghost.sm { padding: 9px 14px; font-size: 13px; margin-top: 6px; align-self: flex-start; }
.btn-ghost.sm.done { color: var(--win); border-color: #BFE3CC; }
.mine.vip { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.vip-lock { border-color: var(--ink); color: var(--ink); gap: 8px; flex-wrap: wrap; }
.link-btn { font-weight: 700; text-decoration: underline; color: var(--ink); padding: 0; }
.vip-pill { display: inline-block; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .14em; color: #fff; background: var(--ink); padding: 3px 8px; border-radius: 5px; margin-left: 6px; vertical-align: middle; }
.vip-pill.big { font-size: 11px; padding: 5px 10px; margin: 0; }
.vip-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.vip-card.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.vip-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.vip-head b { font-family: var(--font-mono); font-size: 22px; }
.vip-head small { font-size: 12px; color: var(--faint); font-weight: 500; }
.vip-card ul { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.vip-card li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--dim); }
.vip-card li svg { color: var(--win); flex-shrink: 0; }
.vip-card .btn-holo { width: 100%; }
.rank { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); font-family: var(--font-mono); font-size: 11px; margin-right: 6px; color: var(--ink); }
.chart-top { display: flex; justify-content: space-between; align-items: center; padding: 2px 0 8px; }
.chart-top b { font-family: var(--font-mono); font-size: 22px; }
.chart-ranges { display: inline-flex; gap: 4px; }
.chart-ranges .cat.sm { padding: 4px 9px; font-size: 11px; text-transform: none; letter-spacing: 0; font-family: var(--font-mono); }
.chart-svg { width: 100%; height: 96px; display: block; }
.act-item.sim { padding: 10px; }
.act-item.sim .img { width: 40px; }
.wa-row { text-decoration: none; }
.wa-row svg { color: #1FAF5A; }
/* RTL */
html[dir="rtl"] { --font-display: 'Noto Naskh Arabic', 'Geeza Pro', 'Instrument Serif', serif; --font-body: 'Noto Sans Arabic', 'Instrument Sans', system-ui, sans-serif; }
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .hdr-back svg, html[dir="rtl"] .chev, html[dir="rtl"] .sub-arrow { transform: scaleX(-1); }
html[dir="rtl"] .count, html[dir="rtl"] .hist-price, html[dir="rtl"] .price-block .val, html[dir="rtl"] .stat .v, html[dir="rtl"] .bid, html[dir="rtl"] .amt, html[dir="rtl"] .wallet-chip { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .gcard .mine { left: auto; right: 12px; }
html[dir="rtl"] .hot-tag { left: auto; right: 10px; }
html[dir="rtl"] .detail-hero .watch { right: auto; left: 14px; }
html[dir="rtl"] .zoom-hint { left: auto; right: 14px; }
html[dir="rtl"] .hdr-logo { letter-spacing: .04em; }

/* two-slot photo upload (front + back) — cards-only listings */
.upload-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.upload-pair .upload { margin: 0; min-height: 132px; }
.upload-pair .upload div { font-size: 11.5px; line-height: 1.35; }
.upload-pair .upload b { font-size: 13px; }

/* share button sits under the watch heart on the lot hero */
.detail-hero .watch.share-btn { top: 64px; }
html[dir="rtl"] .detail-hero .watch.share-btn { right: auto; left: 14px; }

/* ---------- disputes ---------- */
.sheet-tall { max-height: 88vh; overflow-y: auto; }
.case-reasons { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.case-reason { display: flex; gap: 11px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 13px; transition: border-color .15s; }
.case-reason.on { border-color: var(--ink); }
.case-reason .cr-dot { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 1px; border: 1.6px solid #C9C3B8;
  border-radius: 50%; display: grid; place-items: center; color: #fff; }
.case-reason.on .cr-dot { background: var(--ink); border-color: var(--ink); }
.case-reason .cr-dot svg { width: 11px; height: 11px; }
.case-reason .cr-t { min-width: 0; }
.case-reason .cr-t b { display: block; font-size: 14px; font-weight: 600; }
.case-reason .cr-t em { display: block; font-style: normal; font-size: 12px; color: var(--dim); margin-top: 2px; line-height: 1.35; }
.upload.sm { padding: 16px; min-height: 96px; }
.case-rules { background: var(--well); border-radius: var(--r-md); padding: 13px 14px; margin: 14px 0; }
.case-rules b { display: block; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; margin-bottom: 7px; }
.case-rules span { display: block; font-size: 12.5px; color: var(--dim); line-height: 1.45; margin-bottom: 4px; }
.order-flag { display: flex; gap: 9px; align-items: center; width: 100%; text-align: left; font-size: 13px;
  border-radius: var(--r-md); padding: 11px 13px; margin-top: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--dim); }
.order-flag svg { flex: 0 0 auto; width: 17px; height: 17px; }
.order-flag.open { border-color: rgba(216,53,47,.35); color: var(--ink); }
.order-flag.good { border-color: #C9DCD0; color: var(--ink); }
.order-flag.muted { font-size: 12px; }
.btn-ghost.report { color: var(--dim); }
.case-note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 13px 14px; font-size: 13.5px; line-height: 1.5; }
.case-photo img { width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); display: block; }

/* ---------- deposits & payment deadline ---------- */
.bidbar-inner.col { flex-direction: column; align-items: stretch; gap: 9px; }
.hold-line { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--dim); line-height: 1.35; }
.hold-line svg { flex: 0 0 auto; width: 17px; height: 17px; }
.hold-line b { color: var(--ink); }
.pay-due { border: 1px solid rgba(216,53,47,.35); background: var(--surface); border-radius: var(--r-md); padding: 14px; margin-top: 10px; }
.pd-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.pd-head b { font-size: 14px; }
.pd-clock { font-family: var(--mono, 'JetBrains Mono', monospace); font-size: 13px; font-weight: 700; color: var(--live); }
.pay-due p { font-size: 12.5px; color: var(--dim); line-height: 1.45; margin-bottom: 11px; }
.pay-due .btn-holo { width: 100%; }

/* ---------- legal pages ---------- */
.legal-draft { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--brass, #9A7B2F); border-radius: var(--r-md); padding: 13px 14px; margin: 0 0 4px;
  font-size: 12.5px; line-height: 1.45; color: var(--dim); }
.legal-draft svg { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; }
.legal-draft b { color: var(--ink); }
.legal-body { font-size: 13.8px; line-height: 1.6; color: var(--ink); }
.legal-body p { margin-bottom: 10px; }
.legal-body p:last-child { margin-bottom: 0; }
.legal-body b { font-weight: 600; }
.legal-body ul { margin: 0 0 10px 17px; }
.legal-body li { margin-bottom: 7px; line-height: 1.55; }

/* ---------- sudden death ---------- */
.count.sudden { border-color: rgba(216,53,47,.45); color: var(--live); font-weight: 700; }
.count.sudden svg { color: var(--live); }
.trust.sudden-row { border-color: rgba(216,53,47,.3); }
.sd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: 0 0 auto;
  margin-top: 6px; animation: sdPulse 1s ease-in-out infinite; }
@keyframes sdPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .sd-dot { animation: none; } }

/* ---------- deliver-to block in checkout ---------- */
.ship-to { background: var(--well); border-radius: var(--r-md); padding: 13px 14px; margin: 4px 0 14px; }
.st-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.st-head span { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.st-change { font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; background: none; }
.st-body b { display: block; font-size: 14px; font-weight: 600; }
.st-body span { display: block; font-size: 12.5px; color: var(--dim); line-height: 1.4; }
.st-note { display: flex; gap: 7px; align-items: flex-start; margin-top: 9px; padding-top: 9px;
  border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); line-height: 1.4; }
.st-note svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }

/* ---------- address picker ---------- */
.addr-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.addr { display: flex; gap: 11px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 13px; }
.addr.on { border-color: var(--ink); }
.addr .cr-dot { width: 19px; height: 19px; flex: 0 0 auto; margin-top: 1px; border: 1.6px solid #C9C3B8;
  border-radius: 50%; display: grid; place-items: center; color: #fff; }
.addr.on .cr-dot { background: var(--ink); border-color: var(--ink); }
.addr .cr-dot svg { width: 11px; height: 11px; }
.addr .cr-t b { display: block; font-size: 14px; font-weight: 600; }
.addr .cr-t em { display: block; font-style: normal; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
html[dir="rtl"] .addr, html[dir="rtl"] .case-reason { text-align: right; }
.v.sudden, .count.sudden { color: var(--live); }

/* the wordmark is a name, not a sentence — never reorder it in RTL */
html[dir="rtl"] .hdr-logo, html[dir="rtl"] .splash-logo { direction: ltr; }

/* ---------- events ---------- */
.event-banner { display: block; width: 100%; text-align: left; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 17px; margin: 0 0 18px; }
.event-banner.live { border-color: rgba(216,53,47,.35); }
.eb-top { display: flex; align-items: center; gap: 7px; font-family: var(--mono,'JetBrains Mono',monospace);
  font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); font-weight: 700; margin-bottom: 8px; }
.event-banner.live .eb-top { color: var(--live); }
.eb-top svg { width: 13px; height: 13px; }
.eb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: sdPulse 1.4s ease-in-out infinite; }
.eb-title { font-family: var(--serif, Georgia, serif); font-size: 21px; line-height: 1.2; margin-bottom: 4px; }
.eb-meta { font-size: 12.5px; color: var(--dim); }
.eb-collect { display: flex; gap: 7px; align-items: center; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line); font-size: 12px; color: var(--ink); }
.eb-collect svg { width: 15px; height: 15px; flex: 0 0 auto; }
.eb-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px;
  font-size: 12.5px; font-weight: 600; color: var(--ink); }
.eb-go svg { width: 14px; height: 14px; }

.event-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 18px; }
.event-hero.live { border-color: rgba(216,53,47,.35); }
.eh-tag { display: flex; align-items: center; gap: 7px; font-family: var(--mono,'JetBrains Mono',monospace);
  font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; color: var(--dim); margin-bottom: 10px; }
.event-hero.live .eh-tag { color: var(--live); }
.event-hero h1 { font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: 27px; line-height: 1.18; margin-bottom: 8px; }
.eh-meta { font-size: 13px; color: var(--dim); }
.event-hero > p { font-size: 13.5px; line-height: 1.55; margin: 12px 0 0; }
.eh-collect { background: var(--well); border-radius: var(--r-md); padding: 14px; margin: 14px 0; }
.ehc-head { display: flex; gap: 8px; align-items: center; margin-bottom: 7px; font-size: 14px; }
.ehc-head svg { width: 16px; height: 16px; }
.eh-collect p { font-size: 12.8px; color: var(--dim); line-height: 1.5; margin-bottom: 9px; }
.ehc-steps { margin: 0; padding-left: 18px; }
.ehc-steps li { font-size: 12.8px; line-height: 1.5; margin-bottom: 5px; }
html[dir="rtl"] .ehc-steps { padding-left: 0; padding-right: 18px; }
html[dir="rtl"] .event-banner { text-align: right; }

.drop-actions { display: flex; gap: 8px; align-items: center; }
.drop-card.live { border-color: rgba(216,53,47,.35); }
.drop-card.live .drop-tag { color: var(--live); }
.trust.event-row { width: 100%; text-align: left; }
html[dir="rtl"] .trust.event-row { text-align: right; }

/* delivery choice */
.deliv-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.deliv-seg button { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md);
  padding: 10px 8px; font-size: 13px; font-weight: 600; color: var(--dim); display: flex;
  flex-direction: column; gap: 2px; align-items: center; }
.deliv-seg button.on { border-color: var(--ink); color: var(--ink); }
.deliv-seg em { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--faint); }
.deliv-seg button.on em { color: var(--dim); }

/* handover code */
.handover { background: var(--well); border-radius: var(--r-md); padding: 13px 14px; margin-top: 10px; text-align: center; }
.ho-l { display: block; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.ho-c { display: block; font-family: var(--mono,'JetBrains Mono',monospace); font-size: 30px; font-weight: 700;
  letter-spacing: 5px; margin: 5px 0 6px; }
.ho-n { display: block; font-size: 11.5px; color: var(--dim); line-height: 1.4; }

/* ============ Inspection & Auction Night (v51) ============ */
/* The claim only a card PYRA actually held can carry. Kept visually quiet —
   a green tick, not a marketing banner — because it has to still read as true
   next to a lot that does NOT have it. */
.ins-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--win); }
.ins-chip svg { width: 12px; height: 12px; }
.ins-chip.sm { margin: 2px 0 -2px; font-size: 9px; }
.hist-block.inspect { border-color: rgba(45,122,74,.28); }
.hist-block.inspect.none { border-color: var(--line); }
.inspect-body { padding: 10px 2px 2px; font-size: 12.5px; line-height: 1.6; color: var(--ink); }
.inspect-body p { margin: 0 0 8px; }
.inspect-body p.dim { color: var(--dim); font-size: 12px; }

.night-card { margin: 18px 0 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.night-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.night-card h2 { font-family: var(--font-display); font-size: 26px; line-height: 1.1; margin: 0 0 4px; }
.night-when { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--dim); margin-bottom: 8px; }
.night-note { font-size: 13px; line-height: 1.6; color: var(--ink); margin: 0 0 12px; }
.night-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.night-stats > div { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 8px; text-align: center; min-width: 0; }
.night-stats b { display: block; font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.night-stats span { display: block; font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.night-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.night-foot { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 900px) { .night-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- reserve & second chance ---------- */
.res-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: 0 0 auto; margin-top: 5px;
  border: 2px solid var(--line); }
.res-dot.met { background: var(--win, #2E6B4F); border-color: rgba(46,107,79,.3); }
.mine.reserve { background: var(--well); color: var(--dim); border: 1px solid var(--line); }
.escrow-card.second-chance { border-color: var(--brass, #9A7B2F); }
.sc-body { margin: 12px 0; }
.sc-body p { font-size: 13.5px; line-height: 1.55; margin-bottom: 8px; }
.sc-clock { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono,'JetBrains Mono',monospace);
  font-size: 12px; font-weight: 700; color: var(--live); }
.sc-clock svg { width: 14px; height: 14px; }
.escrow-card.second-chance .btn-holo { width: 100%; margin-bottom: 8px; }
.escrow-card.second-chance .btn-ghost { width: 100%; }
.hero-stats.two { grid-template-columns: repeat(2, 1fr); }
.shop-pill { font-family: var(--mono,'JetBrains Mono',monospace); font-size: 9.5px; letter-spacing: .8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; color: var(--dim); }

/* ---------- booth intake (operator tool) ---------- */
.booth-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.booth-bar > div { background: var(--ink); color: #fff; border-radius: var(--r-md); padding: 12px 10px; text-align: center; }
.booth-bar b { display: block; font-family: var(--mono,'JetBrains Mono',monospace); font-size: 20px; font-weight: 700; }
.booth-bar span { display: block; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; opacity: .7; margin-top: 2px; }
.sell-form.booth .field { margin-bottom: 16px; }
.sell-form.booth input, .sell-form.booth select { font-size: 16px; padding: 13px 14px; }
.sell-form.booth .seg button { padding: 13px 10px; font-size: 14px; }
.sell-form.booth .upload { min-height: 150px; }
.field.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field.two-up label { display: block; margin-bottom: 6px; }
.plist-item.booth-row { border-left: 3px solid var(--ink); }
.sell-form.booth .btn-holo { width: 100%; padding: 16px; font-size: 16px; }
.sell-form.booth .btn-holo:disabled { opacity: .35; }
.sell-form.booth .btn-ghost { width: 100%; margin-top: 8px; }

/* booth: the cert field is the one you type in most — give it the room */
.sell-form.booth .cert-row { display: flex; gap: 8px; align-items: stretch; }
.sell-form.booth .cert-row input { flex: 1 1 auto; min-width: 0; }
.sell-form.booth .cert-row .cert-btn { flex: 0 0 auto; width: auto; padding: 13px 20px; font-size: 15px; white-space: nowrap; }

/* ============ Bank transfer (v62) ============ */
/* The reference is the only string that appears both here and on a bank line,
   so it gets the emphasis a payment amount usually would. */
.transfer { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.tf-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tf-l { font-size: 12px; color: var(--dim); }
.tf-v { font-size: 14px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.tf-v.mono, .tf-code { font-family: var(--font-mono); }
.tf-ref { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 14px; background: var(--surface-2); border-radius: var(--r-sm); }
.tf-code { font-size: 22px; font-weight: 700; letter-spacing: .12em; color: var(--ink); user-select: all; }
.tf-note { font-size: 12px; color: var(--dim); line-height: 1.5; }
.tf-note.good { color: var(--win); }
.tf-note.warn { color: var(--gold); }

/* ============ Reserve (v66) ============ */
/* A bidder needs to know they must go higher — not by how much. */
.res-chip { display:inline-block; margin:2px 0 -2px; font-family:var(--font-mono); font-size:9px;
            font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--gold); }
.trust.reserve-row { border-color: rgba(154,123,47,.32); }

/* The address form. Deliberately plain and full-width: it is filled in once, on
   a phone, usually while the person is doing something else. */
.addr-form { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.addr-form input, .addr-form select {
  width: 100%; padding: 12px 13px; font: inherit; font-size: 15px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.addr-form input:focus-visible, .addr-form select:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink);
}
.addr-form .btn-holo { margin-top: 3px; }
