/* ═══════════════════════════════════════════════════════════════════════
   Rippr /shop — Commerce-forward design system (Direction 2, owner-approved)
   Layers ON TOP of the site tokens. Tokens are re-declared here so the
   marketplace also renders correctly standalone (local dev without nginx).
   Language: Rippr dark-violet base; GREEN owns money; TCGplayer-grade
   density; tables for seller comparison + seller ops.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    --primary: #7C3AED;
    --primary-light: #A78BFA;
    --primary-dark: #5B21B6;
    --secondary: #3B82F6;
    --bg: #0F0F1A;
    --bg-secondary: #1A1A2E;
    --bg-tertiary: #252540;
    --surface: #1E1E32;
    --surface-elevated: #2A2A45;
    --surface-highlight: #3D3D5C;
    --text-primary: #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-tertiary: #6B6B80;
    --success: #10B981;
    --success-dark: #059669;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    /* shop-specific */
    --money: var(--success);
    --money-bg: rgba(16, 185, 129, 0.07);
    --money-border: rgba(16, 185, 129, 0.35);
    --border-soft: rgba(61, 61, 92, 0.35);
    --border-med: rgba(61, 61, 92, 0.5);
    --violet-bg: rgba(124, 58, 237, 0.12);
    --violet-border: rgba(124, 58, 237, 0.3);
    --star: #FBBF24;
}

/* ── Page scaffold ─────────────────────────────────────────────────── */
.shop-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 84px 24px 80px;   /* clears the fixed site nav */
}
.shop-main.narrow { max-width: 880px; }
.shop-crumbs {
    display: flex; align-items: center; gap: 8px;
    font-size: 12.5px; color: var(--text-tertiary);
    margin-bottom: 18px; flex-wrap: wrap;
}
.shop-crumbs a { color: var(--text-secondary); }
.shop-crumbs a:hover { color: var(--text-primary); }
.shop-crumbs .sep { opacity: .5; }
.shop-h1 {
    font-size: 30px; font-weight: 800; letter-spacing: -1px;
    margin-bottom: 6px; line-height: 1.15;
}
.shop-sub { color: var(--text-secondary); font-size: 14.5px; margin-bottom: 26px; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-size: 14.5px; font-weight: 700;
    border: none; border-radius: var(--radius-md); cursor: pointer;
    padding: 12px 22px; color: #fff; text-decoration: none;
    transition: all .2s cubic-bezier(.4,0,.2,1);
    -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
/* V2.2 defect fix: author .btn{display} beats the hidden attr (UA rule) —
   without this guard, JS-hidden buttons (label modal #lm-buy) render as
   blank bars. Mirrors .shop-modal[hidden]. */
.btn[hidden] { display: none !important; }
.btn-buy {           /* green = money action */
    background: var(--success);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}
.btn-buy:hover { background: var(--success-dark); transform: translateY(-1px); box-shadow: 0 8px 26px rgba(16,185,129,.4); color:#fff; }
.btn-buy:active { transform: scale(.98); }
.btn-primary {       /* violet = navigation/secondary actions */
    background: var(--primary);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); color:#fff; }
.btn-ghost {
    background: transparent; color: var(--text-secondary);
    border: 1px solid var(--surface-highlight); font-weight: 600;
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--primary-light); background: var(--violet-bg); }
.btn-danger { background: var(--error); }
.btn-danger:hover { background: #DC2626; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-lg { padding: 15px 28px; font-size: 16px; width: 100%; }
.btn-link { background:none; border:none; color: var(--primary-light); font-weight:600; cursor:pointer; padding:0; font-size:13px; font-family:inherit; }
.btn-link:hover { color: var(--text-primary); text-decoration: underline; }

/* Cart badge in the site nav */
.cart-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px;
    background: var(--primary); color: #fff; border-radius: 100px;
    font-size: 10.5px; font-weight: 800; line-height: 1;
    vertical-align: 1px;
}

/* ── Pills & badges ───────────────────────────────────────────────── */
.pill {
    display: inline-flex; align-items: center; gap: 5px;
    border-radius: 100px; font-size: 11px; font-weight: 600;
    padding: 3px 10px; white-space: nowrap;
}
.pill-tcg { background: var(--violet-bg); color: var(--primary-light); border: 1px solid var(--violet-border); text-transform: uppercase; letter-spacing: .4px; font-size: 10px; }
.pill-ok { background: rgba(16,185,129,.12); color: var(--success); border: 1px solid rgba(16,185,129,.3); }
.pill-ok::before { content:''; width:5px; height:5px; border-radius:50%; background: var(--success); box-shadow: 0 0 6px var(--success); }
.pill-warn { background: rgba(245,158,11,.12); color: var(--warning); border: 1px solid rgba(245,158,11,.3); }
.pill-err { background: rgba(239,68,68,.12); color: var(--error); border: 1px solid rgba(239,68,68,.3); }
.pill-muted { background: rgba(107,107,128,.15); color: var(--text-tertiary); border: 1px solid rgba(107,107,128,.3); }
.pill-sealed { background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-med); }

/* order/suborder status pills — one class per status keeps templates dumb */
.st-awaiting_shipment { composes: pill; }
.pill.st-awaiting_shipment { background: rgba(245,158,11,.12); color: var(--warning); border:1px solid rgba(245,158,11,.3); }
.pill.st-shipped        { background: rgba(59,130,246,.12);  color: var(--info);    border:1px solid rgba(59,130,246,.3); }
.pill.st-delivered      { background: rgba(16,185,129,.12);  color: var(--success); border:1px solid rgba(16,185,129,.3); }
.pill.st-cancelled      { background: rgba(107,107,128,.15); color: var(--text-tertiary); border:1px solid rgba(107,107,128,.3); }
.pill.st-refunded, .pill.st-partially_refunded { background: rgba(239,68,68,.12); color: var(--error); border:1px solid rgba(239,68,68,.3); }
.pill.st-paid           { background: rgba(16,185,129,.12);  color: var(--success); border:1px solid rgba(16,185,129,.3); }
.pill.st-pending_payment{ background: rgba(245,158,11,.12);  color: var(--warning); border:1px solid rgba(245,158,11,.3); }

/* ── Stars ────────────────────────────────────────────────────────── */
.stars { color: var(--star); font-size: 13px; letter-spacing: 1px; white-space: nowrap; }
.stars .n { color: var(--text-tertiary); font-size: 12px; letter-spacing: 0; margin-left: 4px; }
.stars-lg { font-size: 18px; }

/* ── Money ────────────────────────────────────────────────────────── */
.price { font-weight: 800; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.price-money { color: var(--money); }
.price-strike { color: var(--text-tertiary); text-decoration: line-through; font-weight: 500; }

/* ── Browse: filter bar ───────────────────────────────────────────── */
.shop-toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 20px;
}
.shop-search {
    flex: 1 1 240px; min-width: 200px;
    background: var(--surface); border: 1px solid var(--border-med);
    color: var(--text-primary); font-family: inherit; font-size: 14px;
    padding: 10px 14px; border-radius: var(--radius-md); outline: none;
    transition: border-color .2s;
}
.shop-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.shop-search::placeholder { color: var(--text-tertiary); }
.chip {
    background: var(--surface); border: 1px solid var(--border-med);
    color: var(--text-secondary); font-size: 12.5px; font-weight: 600;
    padding: 7px 14px; border-radius: 100px; cursor: pointer;
    font-family: inherit; transition: all .15s;
}
.chip:hover { color: var(--text-primary); border-color: var(--primary-light); }
.chip.on { background: var(--violet-bg); color: var(--primary-light); border-color: var(--violet-border); }
.shop-select {
    background: var(--surface); border: 1px solid var(--border-med);
    color: var(--text-primary); padding: 8px 12px; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 13px; cursor: pointer; margin-left: auto;
}

/* ── Browse: product grid ─────────────────────────────────────────── */
.pgrid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}
.pcard {
    background: var(--surface); border: 1px solid var(--border-med);
    border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
    transition: transform .18s, border-color .18s, box-shadow .18s;
}
.pcard:hover { transform: translateY(-3px); border-color: rgba(124,58,237,.55); box-shadow: 0 14px 30px -12px rgba(124,58,237,.35); color: inherit; }
.pcard-img {
    aspect-ratio: 1/1; background: var(--bg-secondary); position: relative; overflow: hidden;
}
.pcard-img img { width: 100%; height: 100%; object-fit: contain; background: rgba(255,255,255,.02); }
.pcard-img .noimg { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color: var(--text-tertiary); font-size:12px; }
.pcard-img .pill { position: absolute; top: 8px; left: 8px; }
.pcard-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard-title {
    font-size: 13.5px; font-weight: 600; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: calc(13.5px * 1.35 * 2);
}
.pcard-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.pcard-price { font-size: 16px; }        /* combine w/ .price .price-money */
.pcard-sub { font-size: 10.5px; color: var(--text-tertiary); }
.pcard-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ── Product page ─────────────────────────────────────────────────── */
.pdp {
    display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px;
    align-items: start;
}
.pdp-gallery {
    background: var(--surface); border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg); padding: 28px;
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 1/1; position: sticky; top: 84px;
}
.pdp-gallery img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pdp-info { min-width: 0; }
.pdp-title { font-size: 26px; font-weight: 800; letter-spacing: -.8px; line-height: 1.2; margin-bottom: 8px; }
.pdp-meta-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.pdp-rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }

/* Buy box — the committed green conversion unit */
.buybox {
    background: var(--surface); border: 1px solid var(--money-border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.buybox-head { padding: 16px 18px 12px; background: var(--money-bg); }
.buybox-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.buybox-price { font-size: 28px; font-weight: 800; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.buybox-breakdown { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.buybox-body { padding: 14px 18px 18px; }
.buybox-seller { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 12px; flex-wrap: wrap; }
.buybox-qty { display:flex; align-items:center; gap:10px; margin-bottom: 12px; }
.buybox-qty select { background: var(--bg-tertiary); border:1px solid var(--border-med); color:var(--text-primary); border-radius: var(--radius-sm); padding: 7px 10px; font-family:inherit; font-size:13px; }
.buybox-note { font-size: 11.5px; color: var(--text-tertiary); text-align: center; margin-top: 10px; }

/* Seller comparison table (all listings) */
.stable { width: 100%; border-collapse: collapse; font-size: 13px; }
.stable th {
    text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text-tertiary); padding: 10px 12px;
    border-bottom: 1px solid var(--border-med);
}
.stable td { padding: 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.stable tr:last-child td { border-bottom: none; }
.stable tr:hover td { background: rgba(124,58,237,.04); }
.stable .num { text-align: right; font-variant-numeric: tabular-nums; }
.section-card {
    background: var(--surface); border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px;
}
.section-card-head {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 14px 18px; border-bottom: 1px solid var(--border-soft);
}
.section-card-head h2, .section-card-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; margin: 0; }
.section-card-body { padding: 16px 18px; }
.section-card-body.flush { padding: 0; }

/* Retail sources block (restockr links live on) */
.retail-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 11px 18px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px;
}
.retail-row:last-child { border-bottom: none; }
.retail-row .r-name { font-weight: 600; }
.retail-row .r-price { font-variant-numeric: tabular-nums; color: var(--text-secondary); }

/* ── Cart ─────────────────────────────────────────────────────────── */
.cart-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 24px; align-items: start; }
.cart-group {
    background: var(--surface); border: 1px solid var(--border-med);
    border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px;
}
.cart-group-head {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 12px 16px; background: var(--bg-tertiary); font-size: 13px;
    border-bottom: 1px solid var(--border-soft);
}
.cart-item { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border-soft); align-items: center; }
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--bg-secondary); object-fit: contain; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.cart-item-sub { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }
.cart-qty { display: flex; align-items: center; gap: 6px; }
.cart-qty button {
    width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border-med);
    background: var(--bg-tertiary); color: var(--text-primary); cursor: pointer;
    font-size: 14px; line-height: 1; font-family: inherit;
}
.cart-qty button:hover { border-color: var(--primary-light); }
.cart-qty span { min-width: 24px; text-align: center; font-weight: 700; font-size: 13px; }

/* Order summary card (cart + checkout) */
.summary-card {
    background: var(--surface); border: 1px solid var(--border-med);
    border-radius: var(--radius-lg); padding: 18px; position: sticky; top: 84px;
}
.summary-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.sumrow { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-secondary); padding: 4px 0; font-variant-numeric: tabular-nums; }
.sumrow.total { color: var(--text-primary); font-weight: 800; font-size: 16px; border-top: 1px solid var(--border-med); margin-top: 8px; padding-top: 12px; }
.sumrow.total .amt { color: var(--money); }

/* ── Forms (checkout, auth, seller settings) ──────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.field label .req { color: var(--error); }
.input, .field input, .field select, .field textarea {
    background: var(--bg-tertiary); border: 1px solid var(--border-med);
    color: var(--text-primary); font-family: inherit; font-size: 14px;
    padding: 11px 13px; border-radius: var(--radius-sm); outline: none; width: 100%;
    transition: border-color .2s; box-sizing: border-box;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}
.field .err-text { color: var(--error); font-size: 11.5px; }
.field input.invalid, .field select.invalid { border-color: var(--error); }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-secondary); padding: 6px 0; cursor: pointer; }
.checkbox-row input { accent-color: var(--primary); width: 16px; height: 16px; margin-top: 2px; }

/* Stripe element containers pick up the dark theme via Appearance API;
   give them a consistent well */
.stripe-well {
    background: var(--bg-tertiary); border: 1px solid var(--border-med);
    border-radius: var(--radius-md); padding: 14px; min-height: 40px;
}

/* ── Alerts / banners ─────────────────────────────────────────────── */
.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-md); padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px; }
.banner-warn { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.3); color: var(--warning); }
.banner-err { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.3); color: var(--error); }
.banner-ok { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.3); color: var(--success); }
.banner-info { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.3); color: var(--info); }
.banner .body { color: var(--text-secondary); }
.banner b { color: inherit; }

/* ── Seller dashboard ─────────────────────────────────────────────── */
.dash-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-med); margin-bottom: 22px; overflow-x: auto; }
.dash-tab {
    padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
    border-bottom: 2px solid transparent; text-decoration: none; white-space: nowrap;
}
.dash-tab:hover { color: var(--text-primary); }
.dash-tab.on { color: var(--text-primary); border-bottom-color: var(--primary); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 14px 16px; }
.stat-card .k { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-tertiary); }
.stat-card .v { font-size: 22px; font-weight: 800; letter-spacing: -.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-card .v.warn { color: var(--warning); }
.stat-card .v.money { color: var(--money); }
.deadline-chip { font-weight: 700; font-variant-numeric: tabular-nums; }
.deadline-chip.ok { color: var(--text-secondary); }
.deadline-chip.soon { color: var(--warning); }
.deadline-chip.late { color: var(--error); }

/* ── Reviews ──────────────────────────────────────────────────────── */
.review { padding: 16px 18px; border-bottom: 1px solid var(--border-soft); }
.review:last-child { border-bottom: none; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-body { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }
.review-reply { margin-top: 10px; padding: 10px 14px; background: var(--bg-tertiary); border-left: 2px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 13px; color: var(--text-secondary); }
.review-reply .who { font-weight: 700; color: var(--primary-light); font-size: 11.5px; }

/* ── Order status timeline ────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tstep { display: flex; gap: 12px; }
.tstep .dot-col { display: flex; flex-direction: column; align-items: center; }
.tstep .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-highlight); border: 2px solid var(--surface-highlight); flex-shrink: 0; margin-top: 3px; }
.tstep.done .dot { background: var(--success); border-color: var(--success); box-shadow: 0 0 8px rgba(16,185,129,.5); }
.tstep.now .dot { background: var(--bg); border-color: var(--primary-light); box-shadow: 0 0 8px rgba(124,58,237,.5); }
.tstep .line { width: 2px; flex: 1; background: var(--surface-highlight); min-height: 18px; }
.tstep.done .line { background: var(--success); }
.tstep .t-body { padding-bottom: 16px; font-size: 13px; }
.tstep .t-title { font-weight: 700; }
.tstep .t-sub { color: var(--text-tertiary); font-size: 11.5px; }

/* ── Modal ────────────────────────────────────────────────────────── */
.shop-modal[hidden] { display: none !important; }
.shop-modal {
    position: fixed; inset: 0; z-index: 200; display: flex;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(10, 10, 18, 0.7); backdrop-filter: blur(6px);
}
.shop-modal-card {
    background: var(--surface-elevated); border: 1px solid var(--border-med);
    border-radius: var(--radius-lg); max-width: 480px; width: 100%;
    max-height: 86vh; overflow-y: auto; padding: 24px;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.shop-modal-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }

/* ── Toast ────────────────────────────────────────────────────────── */
.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
    background: var(--surface-elevated); border: 1px solid var(--border-med);
    color: var(--text-primary); font-size: 13.5px; font-weight: 600;
    padding: 11px 18px; border-radius: 100px; box-shadow: 0 12px 40px rgba(0,0,0,.5);
    animation: toast-in .25s cubic-bezier(.4,0,.2,1);
}
.toast.ok { border-color: var(--money-border); }
.toast.err { border-color: rgba(239,68,68,.4); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Empty states / skeletons ─────────────────────────────────────── */
.empty { text-align: center; color: var(--text-tertiary); padding: 60px 20px; font-size: 14.5px; }
.empty .big { font-size: 34px; margin-bottom: 10px; }
.skel { background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--surface-highlight) 50%, var(--bg-tertiary) 75%); background-size: 200% 100%; animation: skel 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
    .skel, .toast, .pcard, .btn { animation: none !important; transition: none !important; }
}

/* ── Pagination ───────────────────────────────────────────────────── */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 28px; }
.pager a, .pager span {
    min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
    border: 1px solid var(--border-med); color: var(--text-secondary);
}
.pager a:hover { border-color: var(--primary-light); color: var(--text-primary); }
.pager .on { background: var(--violet-bg); border-color: var(--violet-border); color: var(--primary-light); }

/* ── Admin ────────────────────────────────────────────────────────── */
.admin-grid { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 24px; align-items: start; }
.admin-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { padding: 9px 14px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; color: var(--text-secondary); }
.admin-nav a:hover { color: var(--text-primary); background: var(--violet-bg); }
.admin-nav a.on { color: var(--text-primary); background: var(--violet-bg); border-left: 2px solid var(--primary); }
.admin-nav .count { float: right; font-size: 11px; background: var(--bg-tertiary); border-radius: 100px; padding: 1px 8px; color: var(--text-tertiary); }
.admin-nav .count.hot { background: rgba(245,158,11,.15); color: var(--warning); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .pdp { grid-template-columns: 1fr; }
    .pdp-gallery { position: static; max-width: 420px; margin: 0 auto; width: 100%; }
    .pdp-rail { position: static; }
    .cart-layout { grid-template-columns: 1fr; }
    .summary-card { position: static; }
    .admin-grid { grid-template-columns: 1fr; }
    .admin-nav { position: static; flex-direction: row; overflow-x: auto; }
}
@media (max-width: 640px) {
    .shop-main { padding: 76px 16px 60px; }
    .shop-h1 { font-size: 24px; }
    .pgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .form-grid { grid-template-columns: 1fr; }
    .buybox-price { font-size: 24px; }
    .stable { font-size: 12px; }
    .stable th, .stable td { padding: 8px; }
    .cart-item { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════════════════════
   V2 BROWSE (board ① — owner-approved) — line dropdown nav, facet sidebar,
   chips, sticky toolbar, grid/list cards, numbered pager, mobile filter
   sheet. Additive: nothing above this line changed.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Line dropdown nav (base.html, under the fixed site nav) ─────────── */
.lnavbar {
    margin-top: 62px;               /* clears the fixed site nav */
    background: rgba(26, 26, 46, 0.75);
    border-bottom: 1px solid var(--border-soft);
    position: relative; z-index: 90;
}
.lnavbar-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 22px;
    display: flex; gap: 2px; align-items: stretch;
    /* Board ⑧ B root-cause fix: overflow-x:auto here CLIPPED every
       absolutely-positioned dropdown panel (any overflow ≠ visible clips
       abs children) — hover looked dead on ALL items. Desktop wraps
       instead of scrolling; mobile uses the burger menu anyway. */
    overflow: visible; flex-wrap: wrap;
}
.lnav-item { position: relative; flex-shrink: 0; }
.lnav-link {
    display: inline-block; padding: 11px 15px;
    font-size: 13px; font-weight: 700; color: var(--text-secondary);
    border-bottom: 2px solid transparent; white-space: nowrap;
    text-decoration: none;
}
.lnav-link:hover, .lnav-item.open > .lnav-link { color: var(--text-primary); }
.lnav-link:focus-visible { outline: 2px solid var(--primary-light); outline-offset: -2px; border-radius: 6px; }
.lnav-item.on > .lnav-link { color: var(--text-primary); border-bottom-color: var(--primary); }
.lnav-car { font-size: 9px; opacity: .7; margin-left: 2px; }
.lnav-panel {
    position: absolute; top: 100%; left: 0; z-index: 95;
    display: flex; gap: 36px;
    visibility: hidden; opacity: 0; transform: translateY(-4px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s;
    background: var(--surface); border: 1px solid var(--violet-border);
    border-radius: 12px; padding: 16px 20px;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    /* Uniform game panels (owner fix): fixed width, evenly split columns —
       max-content made each game's panel a different shape. */
    width: 560px; max-width: calc(100vw - 32px);
}
.lnav-item:hover > .lnav-panel,
.lnav-item.open > .lnav-panel,
.lnav-item:focus-within > .lnav-panel {
    visibility: visible; opacity: 1; transform: translateY(0);
}
/* Right-edge tabs (Digimon / DBS / More TCGs) open right-aligned so the
   panel never runs off the viewport (owner fix: panels were cut off). */
.lnav-item:nth-last-child(-n+3) .lnav-panel { left: auto; right: 0; }
.lnav-col { flex: 1; min-width: 0; }
.lnav-h {
    font-size: 10.5px; font-weight: 800; letter-spacing: 1px;
    text-transform: uppercase; color: var(--primary-light); margin-bottom: 8px;
}
.lnav-i {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    font-size: 13px; color: var(--text-secondary); padding: 4px 0;
    text-decoration: none; border-radius: 6px;
}
.lnav-i:hover { color: var(--text-primary); }
.lnav-i:hover span:first-child { color: var(--text-primary); }
.lnav-n { color: var(--text-tertiary); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.lnav-a {
    display: block; font-size: 12.5px; font-weight: 700; color: var(--primary-light);
    padding: 4px 0; margin-top: 2px; text-decoration: none;
}
.lnav-a:hover { color: var(--text-primary); }
.lnav-panel-more { flex-direction: column; gap: 0; width: max-content; }
.lnav-more-grid {
    display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 0 24px; max-height: 60vh; overflow-y: auto;
}
.sdot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    margin-right: 8px; vertical-align: 1px;
}
.sdot.ok { background: var(--success); box-shadow: 0 0 6px var(--success); }
.sdot.vio { background: var(--primary-light); box-shadow: 0 0 6px var(--primary); }
.sdot.warn { background: var(--warning); }
/* burger-menu lines list — mobile only (base.html) */
.lnav-burger { display: none; }

/* ── Browse layout ────────────────────────────────────────────────────── */
.shop-main.b2 { padding-top: 26px; }
.b2-layout {
    display: grid; grid-template-columns: 250px minmax(0, 1fr);
    gap: 0; align-items: start;
}
.b2-maincol { min-width: 0; padding-left: 22px; }
.b2-crumbs { font-size: 12px; color: var(--text-tertiary); margin-bottom: 10px; }
.b2-crumbs a { color: var(--text-tertiary); }
.b2-crumbs a:hover { color: var(--text-secondary); }
.b2-crumbs b { color: var(--text-secondary); }
.b2-crumbs .sep { opacity: .5; margin: 0 2px; }
.b2-hero { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.b2-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: -.7px; margin: 0; }
.b2-hero-stats { color: var(--text-tertiary); font-size: 12.5px; }
.b2-hero-stats b { color: var(--success); font-weight: 700; }

/* ── Facet sidebar ────────────────────────────────────────────────────── */
.b2-side {
    border-right: 1px solid var(--border-soft);
    padding: 4px 16px 30px 0;
    background: transparent;
}
.b2-sheet-head, .b2-sheet-foot { display: none; }
.fgroup { border-bottom: 1px solid var(--border-soft); padding-bottom: 12px; margin-bottom: 12px; }
.fgroup:last-child { border-bottom: none; }
.fhead {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; font-weight: 800; letter-spacing: .8px;
    text-transform: uppercase; color: var(--text-secondary); margin-bottom: 10px;
}
.fhead-n { color: var(--text-tertiary); font-size: 10px; font-weight: 600; }
.frow {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 8px; border-radius: 7px; font-size: 13px;
    color: var(--text-secondary); text-decoration: none;
}
.frow:hover { background: var(--violet-bg); color: var(--text-primary); }
.frow.on { color: var(--text-primary); background: var(--violet-bg); }
.frow .l { display: flex; align-items: center; min-width: 0; }
.frow .l > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .cb {
    width: 14px; height: 14px; border-radius: 4px;
    border: 1.5px solid var(--surface-highlight);
    margin-right: 8px; flex-shrink: 0; display: inline-block;
    box-sizing: border-box; position: relative;
}
.frow.on .cb { background: var(--primary); border-color: var(--primary); }
.frow.on .cb::after {
    content: ''; position: absolute; left: 4px; top: 1px;
    width: 3px; height: 7px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.fcount { color: var(--text-tertiary); font-size: 11.5px; font-variant-numeric: tabular-nums; margin-left: 8px; flex-shrink: 0; }
.frow.on .fcount { color: var(--text-secondary); }
.fsearch {
    width: 100%; box-sizing: border-box;
    background: var(--bg-tertiary); border: 1px solid var(--border-med);
    border-radius: 8px; color: var(--text-primary);
    font-size: 12.5px; padding: 7px 10px; margin-bottom: 8px;
    font-family: inherit; outline: none;
}
.fsearch:focus { border-color: var(--primary); }
.fsearch::placeholder { color: var(--text-tertiary); }
.showmore {
    display: block; background: none; border: none; cursor: pointer;
    color: var(--primary-light); font-size: 12px; font-weight: 600;
    padding: 5px 8px; font-family: inherit; text-align: left;
}
.showmore:hover { color: var(--text-primary); }
.fgroup .frow.xtra { display: none; }
.fgroup.expanded .frow.xtra, .fgroup.searching .frow.xtra { display: flex; }
.fgroup .frow.hide { display: none !important; }
.fnone { color: var(--text-tertiary); font-size: 12px; padding: 4px 8px; }
.price-row { display: flex; gap: 6px; align-items: center; }
.price-row input {
    width: 64px; min-width: 0; flex: 1;
    background: var(--bg-tertiary); border: 1px solid var(--border-med);
    border-radius: 7px; color: var(--text-primary); font-size: 12px;
    padding: 6px 8px; font-family: inherit; outline: none;
}
.price-row input:focus { border-color: var(--primary); }
.price-row .dash { color: var(--text-tertiary); }
.price-row .go {
    background: var(--primary); border: none; color: #fff; cursor: pointer;
    border-radius: 7px; font-size: 12px; font-weight: 700; padding: 6px 12px;
    font-family: inherit;
}
.price-row .go:hover { background: var(--primary-dark); }
.tgl {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 8px; font-size: 13px; color: var(--text-secondary);
    text-decoration: none; border-radius: 7px;
}
.tgl:hover { background: var(--violet-bg); color: var(--text-primary); }
.sw {
    width: 30px; height: 17px; border-radius: 100px;
    background: var(--surface-highlight); position: relative; flex-shrink: 0;
}
.sw::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 13px; height: 13px; border-radius: 50%; background: #fff;
    transition: left .15s;
}
.sw.on { background: var(--success); }
.sw.on::after { left: 15px; }

/* ── Active-filter chips ──────────────────────────────────────────────── */
.chips2 { display: flex; gap: 7px; flex-wrap: wrap; margin: 10px 0 14px; }
.chip2 {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--violet-bg); border: 1px solid var(--violet-border);
    color: var(--primary-light); font-size: 12px; font-weight: 600;
    border-radius: 100px; padding: 4px 6px 4px 12px; text-decoration: none;
}
.chip2:hover { border-color: var(--primary-light); color: var(--text-primary); }
.chip2 .x {
    width: 15px; height: 15px; border-radius: 50%;
    background: rgba(124, 58, 237, 0.35);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px; color: #fff; line-height: 1;
}
.chip2.clear { background: none; border-color: var(--border-med); color: var(--text-tertiary); padding: 4px 12px; }
.chip2.clear:hover { color: var(--text-primary); border-color: var(--primary-light); }

/* ── Sticky toolbar ───────────────────────────────────────────────────── */
.b2-toolbar {
    position: sticky; top: 66px; z-index: 5;
    display: flex; align-items: center; gap: 10px;
    background: rgba(20, 20, 31, 0.92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-soft); border-radius: 12px;
    padding: 9px 12px; margin-bottom: 16px;
}
.b2-toolbar .tsearch {
    flex: 1; min-width: 120px;
    background: var(--bg-tertiary); border: 1px solid var(--border-med);
    border-radius: 9px; padding: 8px 12px;
    color: var(--text-primary); font-size: 13px; font-family: inherit; outline: none;
}
.b2-toolbar .tsearch:focus { border-color: var(--primary); }
.b2-toolbar .tsearch::placeholder { color: var(--text-tertiary); }
.tsel {
    background: var(--bg-tertiary); border: 1px solid var(--border-med);
    border-radius: 9px; color: var(--text-primary);
    font-size: 12.5px; font-weight: 600; padding: 8px 12px;
    white-space: nowrap; font-family: inherit; cursor: pointer;
}
.vt { display: flex; border: 1px solid var(--border-med); border-radius: 9px; overflow: hidden; flex-shrink: 0; }
.vt a {
    padding: 7px 10px; font-size: 13px; color: var(--text-tertiary);
    text-decoration: none; line-height: 1.2;
}
.vt a:hover { color: var(--text-primary); }
.vt a.on { background: var(--violet-bg); color: var(--primary-light); }
.b2-filters-btn {
    display: none; align-items: center; gap: 6px;
    background: var(--surface); border: 1px solid var(--border-med);
    border-radius: 100px; padding: 7px 13px;
    font-size: 12px; font-weight: 700; color: var(--text-primary);
    font-family: inherit; cursor: pointer; white-space: nowrap;
}
.b2-filters-btn .n {
    background: var(--primary); border-radius: 100px; padding: 0 6px;
    font-size: 10px; color: #fff;
}
.res-note { font-size: 12.5px; color: var(--text-tertiary); margin-bottom: 12px; }
.res-note b { color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* ── Grid cards ───────────────────────────────────────────────────────── */
.grid2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.pc2 {
    background: var(--surface); border: 1px solid var(--border-med);
    border-radius: 14px; overflow: hidden;
    display: flex; flex-direction: column;
    text-decoration: none; color: inherit;
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.pc2:hover {
    border-color: rgba(124, 58, 237, 0.55); transform: translateY(-2px);
    box-shadow: 0 14px 30px -12px rgba(124, 58, 237, 0.35); color: inherit;
}
.pc2-img {
    aspect-ratio: 1 / 0.92; background: #fff; position: relative;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pc2-img img { width: 100%; height: 100%; object-fit: contain; }
.noimg2 {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; color: #9a9ab0; font-size: 12px;
    background: var(--bg-secondary);
}
.pc2-cat {
    position: absolute; top: 8px; left: 8px;
    background: rgba(15, 15, 26, 0.82); color: var(--text-secondary);
    font-size: 9.5px; font-weight: 700; letter-spacing: .5px;
    text-transform: uppercase; border-radius: 100px; padding: 3px 9px;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.pc2-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pc2-set {
    font-size: 10px; font-weight: 700; letter-spacing: .6px;
    text-transform: uppercase; color: var(--primary-light);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pc2-name {
    font-size: 13px; font-weight: 650; line-height: 1.3; min-height: 34px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pc2-listed { font-size: 12px; color: var(--text-secondary); margin-top: auto; font-variant-numeric: tabular-nums; }
.pc2-listed b { color: var(--success); font-size: 15px; font-weight: 800; letter-spacing: -.3px; }
.pc2-listed.muted { color: var(--text-tertiary); }
.pc2-listed .mktb { color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.pc2-mkt { font-size: 11px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; min-height: 14px; }
.pc2-mkt s { opacity: .8; }

/* ── List view ────────────────────────────────────────────────────────── */
.lv2 { border: 1px solid var(--border-med); border-radius: 12px; overflow: hidden; background: var(--surface); }
.lrow2 {
    display: grid; grid-template-columns: 52px minmax(0, 1fr) 110px 110px 90px 110px;
    gap: 12px; align-items: center; padding: 9px 12px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 12.5px; text-decoration: none; color: var(--text-secondary);
}
.lrow2:last-child { border-bottom: none; }
.lrow2:hover { background: rgba(124, 58, 237, 0.06); }
.lrow2 .im {
    width: 44px; height: 44px; border-radius: 8px; background: #fff;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.lrow2 .im img { width: 100%; height: 100%; object-fit: contain; }
.lrow2 .nm { min-width: 0; }
.lrow2 .nm b {
    display: block; font-size: 13px; color: var(--text-primary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lrow2 .nm .st {
    display: block; font-size: 10.5px; color: var(--primary-light);
    text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lrow2 .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lrow2 .gr { color: var(--success); font-weight: 800; }
.lrow2 .mu, .mu { color: var(--text-tertiary); }

/* ── Numbered pager ───────────────────────────────────────────────────── */
.pager2 { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 26px; flex-wrap: wrap; }
.pg2 {
    min-width: 32px; height: 32px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-med); border-radius: 8px;
    font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
    text-decoration: none; font-variant-numeric: tabular-nums;
}
a.pg2:hover { border-color: var(--primary-light); color: var(--text-primary); }
.pg2.on { background: var(--violet-bg); border-color: var(--violet-border); color: var(--primary-light); }
.pg2.e { border: none; color: var(--text-tertiary); padding: 0 2px; min-width: 0; }
.pg2.dis { opacity: .4; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .b2-layout { grid-template-columns: 1fr; }
    .b2-maincol { padding-left: 0; }
    .grid2 { grid-template-columns: repeat(2, 1fr); gap: 9px; }
    .b2-filters-btn { display: inline-flex; }
    .lrow2 { grid-template-columns: 44px minmax(0, 1fr) 80px; }
    .lrow2 .num.mu, .lrow2 .num:nth-child(5) { display: none; }
    .lrow2 .im { width: 40px; height: 40px; }
    /* sidebar → full-height filter sheet */
    .b2-side {
        position: fixed; inset: 0; z-index: 210;
        background: var(--bg-secondary);
        border-right: none; padding: 0 16px 16px;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
        display: none;
    }
    body.b2-sheet-open .b2-side { display: block; }
    body.b2-sheet-open { overflow: hidden; }
    .b2-sheet-head {
        display: flex; justify-content: space-between; align-items: center;
        position: sticky; top: 0; z-index: 1;
        background: var(--bg-secondary);
        font-size: 15px; font-weight: 800; padding: 16px 0 12px;
        border-bottom: 1px solid var(--border-med); margin-bottom: 12px;
    }
    .b2-sheet-head .x {
        background: var(--surface); border: 1px solid var(--border-med);
        color: var(--text-primary); width: 32px; height: 32px;
        border-radius: 50%; font-size: 16px; cursor: pointer; font-family: inherit;
    }
    .b2-sheet-foot {
        display: flex; justify-content: space-between; gap: 10px;
        position: sticky; bottom: 0; background: var(--bg-secondary);
        padding: 12px 0; border-top: 1px solid var(--border-med); margin-top: 8px;
    }
    .b2-sheet-foot .btn { flex: 1; }
    .b2-toolbar { top: 62px; }
}
@media (max-width: 768px) {
    /* v7.22: .gl overrides .shop-main's 84px clearance with 18px and the
       .lnavbar that normally clears the fixed nav is hidden <=768 — the
       game landing's crumbs/H1 sat under the header at all phone widths. */
    .shop-main.gl { padding-top: 76px; }
    /* line bar folds into the burger menu */
    .lnavbar { display: none; }
    .shop-main.b2 { padding-top: 76px; }
    .lnav-burger { display: block; border-top: 1px solid var(--border-med); margin-top: 6px; padding-top: 8px; }
    .lnav-burger-h {
        font-size: 10.5px; font-weight: 800; letter-spacing: 1px;
        text-transform: uppercase; color: var(--primary-light); padding: 4px 14px 6px;
    }
    .lnav-burger-grid {
        display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px;
        max-height: 38vh; overflow-y: auto;
    }
    .lnav-burger-grid a { display: block; padding: 8px 14px !important; font-size: 13.5px !important; }
}
@media (max-width: 640px) {
    .b2-hero h1 { font-size: 21px; }
    .b2-toolbar { flex-wrap: wrap; }
    .b2-toolbar .tsearch { flex-basis: 100%; order: -1; }
    .grid2 { grid-template-columns: repeat(2, 1fr); }
    .pc2-set { font-size: 9px; }
    .pc2-name { font-size: 11.5px; min-height: 30px; }
}

/* ── V2.2 board ⑦ #2 — game-grouped set accordion (unscoped browse) ───── */
.facc { border-bottom: 1px solid var(--border-soft); }
.facc:last-of-type { border-bottom: none; }
.facc-h {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    width: 100%; background: none; border: none; cursor: pointer;
    padding: 8px 2px; font-family: inherit; font-size: 12.5px; font-weight: 700;
    color: var(--text-primary); text-align: left;
}
.facc-h:hover { color: var(--primary-light); }
.facc-meta { font-size: 10.5px; font-weight: 600; color: var(--text-tertiary); white-space: nowrap; }
.facc-ar { display: inline-block; margin-left: 4px; transition: transform .15s; }
.facc.open > .facc-h .facc-ar, .facc.searchopen > .facc-h .facc-ar { transform: rotate(90deg); }
.facc.open > .facc-h { color: var(--primary-light); }
.facc-b { display: none; padding: 0 0 6px 10px; }
.facc.open > .facc-b, .facc.searchopen > .facc-b { display: block; }
.facc.hide { display: none; }
.facc-all {
    display: block; font-size: 11.5px; color: var(--primary-light);
    padding: 5px 4px 3px 14px; text-decoration: none;
}
.facc-all:hover { text-decoration: underline; }
.fcode { color: var(--text-tertiary); font-size: 10.5px; }

/* Branded image-coming-soon tile (board ⑦ follow-up, owner directive):
   MUST fill its slot edge-to-edge on every surface. The container rules it
   fights (`.pcard-img img`, `.pd-gal-main img`, `.sim img`, `.pd-rc .im
   img`, `.lrow2 .im img`) use object-fit:contain + max-width 78-92% on a
   white background — without these overrides the navy tile floats in a
   white box (the owner's "white borders"). Specificity + !important are
   deliberate. */
img.ph-img,
.pd-gal-main img.ph-img,
.pcard-img img.ph-img,
.pd-setrow .sim img.ph-img,
.pd-rc .im img.ph-img,
.lrow2 .im img.ph-img,
/* src-keyed variants: the set-mates/related strips reach the placeholder
   via a template `or`-fallback and an onerror swap that don't add the
   class — key on the src so the fill can never be missed again. */
.pd-setrow .sim img[src*="img-coming-soon"],
.pd-rc .im img[src*="img-coming-soon"],
.lrow2 .im img[src*="img-coming-soon"],
.pcard-img img[src*="img-coming-soon"],
.pc2-img img[src*="img-coming-soon"],
.crail-card .im img[src*="img-coming-soon"],
.col-img img[src*="img-coming-soon"],
.pd-gal-main img[src*="img-coming-soon"],
.gl-set .im img[src*="img-coming-soon"],
.ac-thumb img[src*="img-coming-soon"] {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    display: block;
    border-radius: inherit;
    background: none !important;
}
/* Self-sized thumbs (the class itself fixes width/height): only the fit +
   background change — never 100%-size them (that would fill the row). */
img.co-item-img[src*="img-coming-soon"],
img.ad-thumb[src*="img-coming-soon"] {
    object-fit: cover !important;
    background: none !important;
    border: none;
}
.pd-ph { min-height: 320px; }

/* Board ⑧ B — panel quick-links row (Most Popular / Newest / Shop all). */
.lnav-panel { flex-wrap: wrap; }
.lnav-quick {
    width: 100%; display: flex; gap: 8px; flex-wrap: wrap;
    padding-bottom: 10px; margin-bottom: 4px;
    border-bottom: 1px solid var(--border-soft);
}
.lnav-q {
    font-size: 11px; font-weight: 800; text-decoration: none;
    border: 1px solid var(--surface-hi); border-radius: 100px;
    padding: 4px 11px; color: var(--text-secondary);
    transition: color .15s, border-color .15s;
}
.lnav-q:hover { color: var(--text-primary); border-color: var(--primary-light); }
.lnav-q.hot { border-color: rgba(16,185,129,.5); color: var(--success); }
.lnav-q.hot:hover { color: #fff; border-color: var(--success); }
.lnav-q.new { border-color: rgba(124,58,237,.5); color: var(--primary-light); }
.lnav-q.new:hover { color: #fff; border-color: var(--primary); }
/* §SINGLES quick-link + panel column: amber accent so the singles cut reads
   as its own product family next to the green/violet sealed cuts. */
.lnav-q.sgl { border-color: rgba(245,158,11,.5); color: #fbbf24; }
.lnav-q.sgl:hover { color: #fff; border-color: #f59e0b; }
.lnav-col-singles { padding-left: 14px; border-left: 1px solid rgba(245,158,11,.35); }
.lnav-col-singles .lnav-h { color: #fbbf24; }
/* Singles directory in the More-TCGs panel: same amber identity as the
 * per-line Singles columns. */
.lnav-h-sgl { color: #fbbf24; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(245,158,11,.35); }
.lnav-n-sgl { color: #fbbf24; }

/* ── Global nav search (owner 2026-08-26): one search box in the header on
 * every marketplace page. GET → /shop?q= (matches the JSON-LD SearchAction).
 * Desktop: grows in the middle of .nav-inner. Mobile: wraps to a full-width
 * second row under the logo/hamburger. ── */
.nav-search {
    flex: 1 1 auto;
    max-width: 460px;
    margin: 0 22px;
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--surface);
    border: 1px solid var(--border-med);
    border-radius: var(--radius-md);
    padding: 9px 14px;
    transition: border-color .15s, box-shadow .15s;
}
.nav-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--violet-bg);
}
.nav-search svg { width: 16px; height: 16px; color: var(--text-tertiary); flex: 0 0 auto; }
.nav-search input {
    flex: 1 1 auto;
    min-width: 0;
    background: none;
    border: 0;
    outline: none;
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
}
.nav-search input::placeholder { color: var(--text-tertiary); }
.nav-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

@media (max-width: 768px) {
    /* Stay a single row so the fixed nav keeps its ~60px height and the mobile
       menu drawer (pinned at top:60px) doesn't collide. The search shrinks
       between the logo and the hamburger. */
    .nav-search { margin: 0 10px; max-width: none; padding: 8px 12px; }
    .nav-search input { font-size: 13px; }
    .nav-logo { font-size: 19px; }
    .nav-logo img { height: 30px; }
}
@media (max-width: 400px) {
    /* Tightest phones: keep the icon, drop the wordmark to give search room. */
    .nav-logo { font-size: 0; gap: 0; }
    .nav-logo img { height: 30px; }
}

/* ===========================================================================
   SINGLES browse (§SINGLES — design board 1). The card grid reuses the b2
   product-card system; only the image well changes: trading cards are
   portrait (5:7), and the white product-photo backing looks wrong behind
   full-bleed card scans — dark neutral instead.
   =========================================================================== */
.grid2-cards { grid-template-columns: repeat(4, 1fr); }  /* v7: owner — 4-wide everywhere, matches sealed */
.pc2-card .pc2-img {
    aspect-ratio: 5 / 7;
    background: var(--bg-secondary);
    padding: 8px;
}
.pc2-card .pc2-img img { object-fit: contain; }
/* v7.24: sealed tiles in the MIXED grid keep the exact 5/7 card-well
   footprint (identical tile size) but wear the sealed white window —
   product contained on white, like the sealed browse grids. Singles and
   singles_browse.html (which shares .pc2-card) are untouched. */
.pc2-card--sealed .pc2-img {
    background: #fff;
    padding: 10px;
}
.pc2-card .pc2-cat {
    /* rarity badge reuses the category-badge chip */
    max-width: calc(100% - 12px);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 1100px) {
    .grid2-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .grid2-cards { grid-template-columns: repeat(2, 1fr); gap: 9px; }
}

/* §SINGLES search card rail (sealed browse, q set) */
.crail { margin: 4px 0 16px; border: 1px solid rgba(245,158,11,.35);
         border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.crail-h { display: flex; justify-content: space-between; align-items: baseline;
           margin-bottom: 10px; font-size: 13.5px; font-weight: 600; }
.crail-all { color: #fbbf24; font-size: 12.5px; text-decoration: none; }
.crail-all:hover { text-decoration: underline; }
.crail-row { display: grid; grid-auto-flow: column; grid-auto-columns: 128px;
             gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.crail-card { display: flex; flex-direction: column; gap: 3px;
              text-decoration: none; color: var(--text-primary); }
.crail-card .im { aspect-ratio: 5 / 7; background: var(--bg-secondary);
                  border-radius: 8px; overflow: hidden; display: flex;
                  align-items: center; justify-content: center; padding: 5px; }
.crail-card .im img { max-width: 100%; max-height: 100%; object-fit: contain; }
.crail-card .nm { font-size: 12px; font-weight: 600; line-height: 1.25;
                  overflow: hidden; display: -webkit-box;
                  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.crail-card .st { font-size: 11px; color: var(--text-secondary);
                  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crail-card .pr { font-size: 12px; font-weight: 700; color: var(--success); }

/* §SINGLES new-listing modal photo chips */
.nl-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.nl-photo { position: relative; width: 64px; height: 64px; border-radius: 8px;
            overflow: hidden; border: 1px solid var(--border-med); }
.nl-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Preview couldn't load but the upload IS stored — show a calm saved
   state, never the broken-image glyph. */
.nl-photo.nl-photo-saved::before {
    content: "Photo saved"; position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 9.5px; color: var(--text-secondary); text-align: center;
    background: var(--bg-tertiary); padding: 4px;
}
.nl-photo.nl-photo-saved .nl-photo-x { z-index: 1; }
.nl-photo-x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
              border: none; border-radius: 50%; background: rgba(0,0,0,.65);
              color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }

/* §SINGLES modal: author display rules must not defeat the hidden attr */
#nl-sealed-cond[hidden], #nl-card-fields[hidden],
#nl-graded-fields[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════
   §SINGLES board-review fixes (owner 2026-08-27)
   ═══════════════════════════════════════════════════════════════════════ */

/* 1) White-band fix — site.css paints body with a FIXED-attachment
   gradient and no backstop color: everything past the first viewport
   (long pages, iOS Safari, full-page captures) composited WHITE. The
   solid color backstops every marketplace page; the gradient still
   paints on top where the browser honors it. */
body { background-color: var(--bg); }

/* 4) Native-control replacements (owner: "old school buttons") —
   custom switch for checkbox rows + styled file-pick button. The real
   <input>s stay in the DOM (forms/keyboard/AT unchanged), visually
   swapped for branded controls. */
.switch-row { display: flex; align-items: center; gap: 10px;
              font-size: 13.5px; color: var(--text-secondary);
              padding: 6px 0; cursor: pointer; user-select: none; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row .track {
    width: 38px; height: 22px; border-radius: 100px; flex-shrink: 0;
    background: var(--surface-highlight); border: 1px solid var(--border-med);
    position: relative; transition: all .18s ease;
}
.switch-row .track::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; border-radius: 50%; background: #fff;
    transition: transform .18s ease;
}
.switch-row input:checked + .track { background: var(--primary);
                                     border-color: var(--primary); }
.switch-row input:checked + .track::after { transform: translateX(16px); }
.switch-row input:focus-visible + .track {
    box-shadow: 0 0 0 3px rgba(124,58,237,.3); }
.switch-row input:disabled + .track { opacity: .45; }
.switch-row b { color: var(--text-primary); }

.file-pick input[type=file] { position: absolute; opacity: 0;
                              width: 1px; height: 1px; }

/* selects: kill the OS widget everywhere in shop forms */
.field select, .tsel, .col-copy select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23A1A1AA' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 32px;
}

/* §SINGLES shared listing modal — styles the modal needs on EVERY page it
   renders (dashboard keeps its own inline copies harmlessly). */
#new-listing-modal .thumb { width: 40px; height: 40px; border-radius: 6px;
    object-fit: contain; background: var(--bg-secondary); flex-shrink: 0; }
#new-listing-modal .search-results { display: flex; flex-direction: column;
    gap: 2px; max-height: 260px; overflow-y: auto; margin-top: 8px; }
#new-listing-modal .search-hit { display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer;
    border: 1px solid transparent; background: none; font-family: inherit;
    color: var(--text-primary); text-align: left; width: 100%; }
#new-listing-modal .search-hit:hover { background: var(--violet-bg);
    border-color: var(--violet-border); }
#new-listing-modal .search-hit .sh-name { font-size: 13px; font-weight: 600;
    line-height: 1.3; flex: 1; }
#new-listing-modal .search-hit .sh-ref { font-size: 11.5px;
    color: var(--text-tertiary); white-space: nowrap; }
#new-listing-modal .fee-preview { font-size: 12.5px; color: var(--money);
    margin-top: 6px; min-height: 16px; }
#new-listing-modal .cell-sub { font-size: 11px; color: var(--text-tertiary); }
#nl-copy-slot[hidden] { display: none !important; }

/* §SINGLES fix (owner 2026-08-27, found at tablet widths): the mega-menu
   panels grew a 4th column — their HIDDEN (visibility, not display) boxes
   were widening the page and causing horizontal scroll. Clip the bar's
   x-overflow (y stays visible so open panels still drop below) and let
   wide panels wrap inside the viewport. */
.lnavbar { overflow-x: clip; }
.lnav-panel { max-width: calc(100vw - 16px); flex-wrap: wrap; }

/* ── §DISCOVER: unified search page ─────────────────────────────────── */
.usearch { max-width: 1280px; margin: 0 auto; padding: 18px 16px 48px; }
.usearch-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 22px; }
.uchip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 650;
    border: 1px solid var(--border-med); color: var(--text-primary);
    text-decoration: none; background: var(--surface);
}
.uchip:hover { border-color: var(--primary-light); }
.uchip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.uchip .n { font-size: 11.5px; opacity: .75; font-variant-numeric: tabular-nums; }
.uchip.scope { border-color: rgba(139,92,246,.55); color: var(--primary-light); }
.uchip.scope .x { opacity: .7; }
.uchip.scope:hover { border-color: var(--primary); color: #fff; }
.usec { margin: 26px 0; }
.usec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.usec-h h2 { font-size: 17px; font-weight: 800; letter-spacing: -.3px; margin: 0; }
.usec-h h2 .n { color: var(--text-secondary); font-weight: 650; font-size: 13px; }
.usec-all { font-size: 13px; font-weight: 650; color: var(--primary-light); text-decoration: none; white-space: nowrap; }
.usec-all:hover { text-decoration: underline; }
.uset-row { display: flex; gap: 10px; flex-wrap: wrap; }
.empty.slim { padding: 18px; font-size: 13.5px; }

/* ── §DISCOVER: set hub sealed rail + singles heading ───────────────── */
.crail-n { font-size: 12px; color: var(--text-secondary); font-weight: 650; margin-left: 6px; }
.hub-sealed { margin-bottom: 4px; }
.hub-cards-h { font-size: 16px; font-weight: 800; letter-spacing: -.3px; margin: 18px 0 2px; }

/* ── §DISCOVER: per-game set directory ──────────────────────────────── */
.setsdir { max-width: 1200px; margin: 0 auto; padding: 18px 16px 48px; }
.setsdir-tools { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.setsdir-tools .tsearch { flex: 1; max-width: 440px; }
.setsdir-count { font-size: 12.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.setsdir-yh {
    font-size: 13px; font-weight: 800; letter-spacing: .06em;
    color: var(--text-secondary); text-transform: uppercase;
    margin: 22px 0 10px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border-soft);
}
.setsdir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.setsdir-row {
    display: flex; flex-direction: column; gap: 3px;
    padding: 10px 14px; border-radius: 10px; text-decoration: none;
    border: 1px solid var(--border-soft); background: var(--surface);
}
.setsdir-row:hover { border-color: var(--primary-light); }
.setsdir-row .sn { font-weight: 700; font-size: 13.5px; color: var(--text-primary); line-height: 1.3; }
.setsdir-row .sm { display: flex; gap: 10px; font-size: 11.5px; color: var(--text-secondary); flex-wrap: wrap; }
.setsdir-row .sc { color: var(--primary-light); font-weight: 650; }
.setsdir-row .ss { color: var(--success); font-weight: 650; }
.setsdir-empty { color: var(--text-secondary); padding: 24px 0; }
@media (max-width: 640px) {
    .setsdir-grid { grid-template-columns: 1fr; }
    .usearch-chips { position: sticky; top: 60px; z-index: 5; background: var(--bg); padding: 8px 0; margin-top: 6px; }
}

/* ── §DISCOVER: search-bar scope chip + type-ahead panel ────────────── */
.nav-search { position: relative; }
.nav-scope {
    display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
    padding: 3px 9px; margin-right: 6px; border-radius: 7px;
    font-size: 11.5px; font-weight: 700; font-family: inherit;
    background: rgba(139,92,246,.16); color: var(--primary-light);
    border: 1px solid rgba(139,92,246,.5); cursor: pointer;
}
.nav-scope:hover { border-color: var(--primary); color: #fff; }
.nav-scope .x { opacity: .7; }
.nav-suggest {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 300;
    background: var(--surface-raised, #171628); border: 1px solid var(--border-med);
    border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.5);
    max-height: min(66vh, 520px); overflow-y: auto; padding: 6px;
}
.nav-suggest .sg-h {
    font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text-secondary);
    padding: 8px 10px 4px;
}
.nav-suggest .sg-i {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: 9px; text-decoration: none;
    color: var(--text-primary); font-size: 13px;
}
.nav-suggest .sg-i:hover, .nav-suggest .sg-i.on { background: var(--violet-bg, rgba(124,58,237,.14)); }
.nav-suggest .sg-i img {
    width: 30px; height: 42px; object-fit: contain; border-radius: 4px;
    background: #fff; flex-shrink: 0;
}
.nav-suggest .sg-n { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-suggest .sg-m { font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; }
.nav-suggest .sg-p { font-size: 12.5px; font-weight: 750; color: var(--success); margin-left: auto; }
.nav-suggest .sg-i.all .sg-all { font-weight: 700; color: var(--primary-light); }

/* ── §DISCOVER: nested mobile drawer ────────────────────────────────── */
.mdrawer { position: relative; overflow: hidden; }
.nav-links .mdrawer-panel.is-on { animation: mdr-in .18s ease; }
@keyframes mdr-in { from { transform: translateX(14px); opacity: .4; } to { transform: none; opacity: 1; } }
.nav-links .mdrawer-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; padding: 11px 12px; margin: 2px 0; border-radius: 10px;
    background: none; border: 1px solid var(--border-soft);
    color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 650;
    text-decoration: none; cursor: pointer; text-align: left;
}
.nav-links .mdrawer-row:hover { border-color: var(--primary-light); }
.nav-links .mdrawer-row .car { color: var(--text-secondary); font-size: 16px; }
.nav-links .mdrawer-row .n { font-size: 11.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.nav-links .mdrawer-row.sub { font-weight: 550; font-size: 13px; padding: 9px 12px; border-color: transparent; }
.nav-links .mdrawer-row.sub:hover { border-color: var(--border-med); }
.nav-links .mdrawer-back {
    display: inline-flex; padding: 6px 2px; margin: 2px 0 6px;
    background: none; border: none; color: var(--primary-light);
    font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.nav-links .mdrawer-more { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.nav-links .mdrawer-sm {
    display: block; padding: 7px 8px; border-radius: 8px;
    color: var(--text-primary); font-size: 13px; text-decoration: none;
}
.nav-links .mdrawer-sm:hover { background: var(--violet-bg, rgba(124,58,237,.14)); }
.nav-links .mdrawer-find {
    width: 100%; margin: 4px 0 8px; padding: 9px 12px; border-radius: 10px;
    border: 1px solid var(--border-med); background: var(--surface);
    color: var(--text-primary); font: inherit; font-size: 13.5px;
}
.nav-links .mdrawer-sets { max-height: 44vh; overflow-y: auto; }
@media (min-width: 769px) { .lnav-burger { display: none; } }

/* specificity guards vs .nav-links a rules */
.nav-links .mdrawer-row { display: flex !important; }
.nav-links .mdrawer-row .n { margin-left: auto; }
.nav-links .mdrawer-row .car { margin-left: 8px; }
.nav-links .mdrawer-sm { display: block !important; }

/* ── §DISCOVER v3: two-zone game panel (left = destinations, right = ALL
   sets, searchable in place) ─────────────────────────────────────────── */
.lnav-panel.lnav-v3 {
    display: flex; gap: 22px; width: min(880px, calc(100vw - 32px));
    padding: 18px 20px;
}
.lnav-v3-left { width: 250px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; }
.lnav-big {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-radius: 9px; text-decoration: none;
    font-size: 14px; font-weight: 750; color: var(--text-primary);
    border: 1px solid var(--border-soft);
    margin-bottom: 4px;
}
.lnav-big:hover { border-color: var(--primary-light); color: var(--primary-light); }
.lnav-big .n { font-size: 11.5px; font-weight: 650; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.lnav-big .car { color: var(--text-secondary); }
.lnav-div { height: 1px; background: var(--border-soft); margin: 8px 0; }
.lnav-v3-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lnav-v3-shead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.lnav-v3-shead .lnav-h { margin: 0; }
.lnav-setfind {
    flex: 1; padding: 8px 12px; border-radius: 9px; font: inherit; font-size: 13px;
    border: 1px solid var(--border-med); background: var(--surface);
    color: var(--text-primary);
}
.lnav-setfind:focus { outline: none; border-color: var(--primary-light); }
.lnav-setlist {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px 14px;
    overflow-y: auto; max-height: 352px; align-content: start;
    padding-right: 4px;
}
.lnav-set {
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding: 6px 8px; border-radius: 7px; text-decoration: none;
    font-size: 12.5px; color: var(--text-primary); min-width: 0;
}
.lnav-set > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lnav-set:hover { background: var(--violet-bg, rgba(124,58,237,.14)); }
.lnav-v3 + .lnav-a, .lnav-v3-right .lnav-a { margin-top: 10px; }

/* [hidden] must ALWAYS win over author display on filterable rows */
.lnav-set[hidden], .nav-links .mdrawer-sm[hidden], .setsdir-row[hidden],
.setsdir-year[hidden] { display: none !important; }

/* ── §DISCOVER: toolbar alignment after the in-page search box removal
   (the flex:1 .tsearch WAS the spacer). Desktop: selects sit RIGHT.
   Mobile: ONE row — button fixed, selects share the rest. ─────────── */
.b2-toolbar .tsel:first-of-type { margin-left: auto; }
@media (max-width: 760px) {
    .b2-toolbar { flex-wrap: nowrap; }
    .b2-toolbar .b2-filters-btn { flex-shrink: 0; }
    /* width:0 + flex-grow — iOS Safari <select>s refuse to shrink below
       their longest option without it (v7.13: the 16px zoom-kill font made
       them overflow 390px and the whole page scrolled sideways). */
    .b2-toolbar .tsel { flex: 1 1 0; width: 0; min-width: 0; }
    /* Belt: no layout may EVER scroll the page sideways on phones. */
    html, body { overflow-x: clip; }
}

/* ── §DISCOVER v7: game landing ─────────────────────────────────────── */
.gl { max-width: 1280px; margin: 0 auto; padding: 18px 16px 48px; }
.gl-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 18px 0 8px; }
.gl-tile {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px; border-radius: 12px; text-decoration: none;
    background: var(--surface); border: 1px solid var(--border-med);
    transition: border-color .15s, transform .15s;
}
.gl-tile:hover { border-color: var(--primary-light); transform: translateY(-2px); }
.gl-tile .t { font-size: 15px; font-weight: 800; color: var(--text-primary); letter-spacing: -.2px; }
.gl-tile .d { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.gl-sec { margin: 30px 0; }
/* v7.3 (owner): set tiles are a composed card, not a row with buttons
   stuck on. Full-bleed art panel LEFT (whole card, never cropped, floats
   on a gradient well that runs edge to edge), content RIGHT fills the
   tile: name + meta on top, the Shop set / Price guide pair anchored to
   the bottom and splitting the full width. Grid-stretch keeps every tile
   in a row the same height — no dead right/bottom space. */
.gl-sets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gl-set {
    display: flex; flex-direction: row; align-items: stretch;
    background: var(--surface); border: 1px solid var(--border-med);
    border-radius: 12px; overflow: hidden;
    transition: border-color .15s, transform .15s;
}
.gl-set:hover { border-color: var(--primary-light); transform: translateY(-2px); }
/* v7.16 (owner): the art well is the SAME uniform white window the listing
   cards use (.pc2-img) — identical box on every tile, product contained
   inside it. No floating natural-size art, no gradient, no shadow. */
.gl-set .im {
    width: 118px; flex-shrink: 0; align-self: stretch; min-height: 158px;
    background: #fff;
    border-right: 1px solid var(--border-soft);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.gl-set .im img {
    width: 100%; height: 100%; object-fit: contain;
}
.gl-set .tx {
    display: flex; flex-direction: column; flex: 1; min-width: 0;
    padding: 14px 14px 13px;
}
.gl-set .lnk { display: block; min-width: 0; text-decoration: none; }
.gl-set .nm {
    font-size: 14.5px; font-weight: 750; color: var(--text-primary);
    line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.gl-set .ct { font-size: 12px; color: var(--text-secondary); margin-top: 5px; }
.gl-set .act { display: flex; gap: 8px; margin-top: auto; padding-top: 13px; }
.gl-set .act a {
    flex: 1 1 0; text-align: center; font-size: 12.5px; font-weight: 700;
    text-decoration: none; padding: 8px 6px; border-radius: 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    border: 1px solid var(--border-med); color: var(--text-primary);
    background: var(--bg-tertiary);
    transition: border-color .15s, background .15s, filter .15s;
}
.gl-set .act a:hover { border-color: var(--primary-light); }
.gl-set .act a.pri {
    background: var(--primary); border-color: var(--primary); color: #fff;
}
.gl-set .act a.pri:hover { filter: brightness(1.08); }
.gl-movers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gl-mover {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    background: var(--surface); border: 1px solid var(--border-med);
    border-radius: 12px; text-decoration: none;
}
.gl-mover:hover { border-color: var(--primary-light); }
.gl-mover .im { width: 46px; height: 64px; border-radius: 6px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.gl-mover .im img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gl-mover .b { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gl-mover .nm { font-size: 12.5px; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-mover .pr { font-size: 12.5px; font-weight: 750; color: var(--text-primary); }
.gl-mover .chg { font-size: 11px; font-weight: 750; margin-left: 6px; }
.gl-mover .chg.up { color: var(--success); }
.gl-mover .chg.down { color: #f87171; }
@media (max-width: 1100px) {
    .gl-sets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
    .gl-tiles { grid-template-columns: repeat(2, 1fr); }
    /* 5 tiles on a 2-col grid: the odd one out (Price Guide) spans the
       full width as one centered bar instead of sitting orphaned. */
    .gl-tile:nth-child(5) { grid-column: 1 / -1; align-items: center; text-align: center; }
    .gl-movers { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .gl-sets { grid-template-columns: 1fr; }
}

/* v7: singles price guide layout + set tile filter guards */
.pg-layout-single { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .pg-layout-single { grid-template-columns: 1fr; } .pg-layout-single .pg-side { display: none; } }
.gl-set.hide, .setsdir-row.hide { display: none !important; }
.pg-setgrid { margin-top: 6px; }
.setsdir-grid.art { grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1100px) { .setsdir-grid.art { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .setsdir-grid.art { grid-template-columns: 1fr; } }
.setsdir-row.art[hidden] { display: none !important; }

/* v7.1: standalone find boxes (outside .b2-toolbar scope) */
.setsdir-tools .tsearch {
    background: var(--bg-tertiary); border: 1px solid var(--border-med);
    border-radius: 9px; padding: 9px 12px;
    color: var(--text-primary); font-size: 13px; font-family: inherit; outline: none;
}
.setsdir-tools .tsearch:focus { border-color: var(--primary); }
.setsdir-tools .tsearch::placeholder { color: var(--text-tertiary); }

/* v7.25: disabled form controls must LOOK disabled (graded listings grey
   out the raw-condition select — grade determines condition). */
select:disabled, input:disabled, textarea:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* v7.26: photo-upload loading tile — the pause is visibly "working" */
.nl-photo-loading {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 4px;
    background: var(--bg-tertiary); border: 1px solid var(--border-med);
}
.nl-spin {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--border-med); border-top-color: var(--primary);
    animation: nl-spin .8s linear infinite;
}
@keyframes nl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .nl-spin { animation: none; } }
.nl-loading-tx { font-size: 8.5px; color: var(--text-tertiary); }
