/* ═══════════════════════════════ holotape desk — tokens ═══════════════════════════════
   Neutral near-black grounds (no blue cast). The holo foil is the one accent: wordmark, selection edge, Pro.
   Semantic colour (buy / verify / over) is separate from the accent and never decorative.                      */
:root {
  --sans: "Geist", "Instrument Sans", -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display: "Unbounded", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --bg0: #09090a; --bg1: #0f0f11; --bg2: #141416; --bg3: #1b1b1f; --bg4: #232328; --sel: #17171b;
  --line: #1f1f23; --line2: #2b2b31; --line3: #3a3a42;
  --fg0: #ececee; --fg1: #a3a3ab; --fg2: #6e6e77; --fg3: #46464e;
  --up: #2fd27a; --up-bg: rgba(47,210,122,.13); --up-ink: #04160b;
  --dn: #f2545b; --dn-bg: rgba(242,84,91,.12);
  --warn: #f2a93b; --warn-bg: rgba(242,169,59,.14); --warn-ink: #1a1200;
  --cyan: #21d4ec; --cyan-bg: rgba(33,212,236,.12);
  --violet: #8b7cf6; --pink: #f06cb0; --gold: #f6c343;
  --accent: #9d90f8; --accent-bg: rgba(139,124,246,.14);
  --foil: linear-gradient(120deg, #21d4ec, #8b7cf6 40%, #f06cb0 72%, #f6c343);
  --foil-text: repeating-linear-gradient(-35deg, #21d4ec 0 2px, #8b7cf6 2px 4px, #f06cb0 4px 6px, #f6c343 6px 8px);
  --card-bg: #f4f1ea;
  --shadow: 0 16px 40px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.4);
  --row-h: 40px; --r: 5px; --top-h: 44px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg0: #f2f2f3; --bg1: #ffffff; --bg2: #f7f7f8; --bg3: #ededef; --bg4: #e3e3e6; --sel: #f1effd;
  --line: #e5e5e8; --line2: #d5d5da; --line3: #c2c2c9;
  --fg0: #141416; --fg1: #55555e; --fg2: #80808a; --fg3: #b3b3bb;
  --up: #17a34a; --up-bg: rgba(23,163,74,.12); --up-ink: #ffffff;
  --dn: #d92d34; --dn-bg: rgba(217,45,52,.10);
  --warn: #c77a0b; --warn-bg: rgba(199,122,11,.13); --warn-ink: #ffffff;
  --cyan: #0891b2; --cyan-bg: rgba(8,145,178,.10);
  --accent: #6b5ce6; --accent-bg: rgba(107,92,230,.12);
  --card-bg: #ffffff;
  --shadow: 0 16px 40px rgba(20,20,30,.16), 0 2px 6px rgba(20,20,30,.08);
  color-scheme: light;
}

/* ═══════════════════════════════ base ═══════════════════════════════ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg0); color: var(--fg0); font: 12px/1.35 var(--sans); display: grid; grid-template-rows: var(--top-h) minmax(0, 1fr); overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--fg2); }
.pad { padding: 12px 14px; }
.r { text-align: right; }
::-webkit-scrollbar { width: 9px; height: 9px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-thumb:hover { background-color: var(--line3); } ::-webkit-scrollbar-track { background: transparent; }
.foil { background: var(--foil-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
kbd { font: 500 10px/1 var(--mono); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 3px; padding: 2px 5px; background: var(--bg2); color: var(--fg1); }
svg.i { width: 14px; height: 14px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ═══════════════════════════════ top bar ═══════════════════════════════ */
.top { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--bg1); border-bottom: 1px solid var(--line); white-space: nowrap; min-width: 0; }
.brand { display: flex; align-items: center; gap: 9px; margin-right: 6px; }
.brand .logo { font: 800 14px/1 var(--display); letter-spacing: -.04em; color: var(--fg0); }
.logo .foil { font: inherit; color: transparent; }
.brand .sub { color: var(--fg2); font: 11px var(--mono); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg3); flex: none; }
.dot.live { background: var(--up); box-shadow: 0 0 0 0 rgba(47,210,122,.5); animation: pulse 2.4s infinite; }
.dot.busy { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); } .dot.err { background: var(--dn); box-shadow: 0 0 0 3px var(--dn-bg); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,210,122,.45); } 70% { box-shadow: 0 0 0 6px rgba(47,210,122,0); } 100% { box-shadow: 0 0 0 0 rgba(47,210,122,0); } }
.plan { font: 700 9px/1 var(--mono); letter-spacing: .1em; border-radius: 3px; padding: 4px 6px; text-transform: uppercase; }
.plan.free { color: var(--fg1); border: 1px solid var(--line2); }
.plan.pro { color: #0b0b0d; background: var(--foil); }
.plan.admin { color: var(--fg0); border: 1px solid var(--accent); background: var(--accent-bg); }
.views { display: flex; align-self: stretch; gap: 2px; }
.views button { position: relative; border: 0; background: transparent; color: var(--fg1); font-weight: 500; font-size: 12px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; }
.views button:hover { color: var(--fg0); }
.views button.on { color: var(--fg0); }
.views button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--foil); border-radius: 2px 2px 0 0; }
.views button b { font: 600 10px/1 var(--mono); color: var(--fg2); background: var(--bg3); border-radius: 8px; padding: 3px 6px; min-width: 20px; text-align: center; }
.views button b:empty { display: none; }
.views button b.hot { color: var(--warn-ink); background: var(--warn); }
.spacer { flex: 1 0 8px; }
.search { display: inline-flex; align-items: center; gap: 6px; width: 190px; height: 28px; padding: 0 9px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--bg2); color: var(--fg2); flex: none; }
.search:focus-within { border-color: var(--accent); color: var(--fg1); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; color: var(--fg0); font-size: 12px; }
.search input::placeholder { color: var(--fg2); }
.search kbd { margin-right: -3px; }
.ib { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid transparent; background: transparent; border-radius: var(--r); color: var(--fg1); position: relative; }
.ib:hover { background: var(--bg3); color: var(--fg0); }
.ib.on { color: var(--fg0); background: var(--bg3); border-color: var(--line2); }
.ib.avatar img { width: 22px; height: 22px; border-radius: 50%; display: block; object-fit: cover; }
.icons { display: inline-flex; gap: 1px; margin: 0 2px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; border: 1px solid var(--line2); background: var(--bg2); border-radius: var(--r); padding: 0 11px; font-weight: 500; font-size: 12px; color: var(--fg0); white-space: nowrap; }
.btn:hover { border-color: var(--line3); background: var(--bg3); }
.btn.primary { background: var(--fg0); border-color: var(--fg0); color: var(--bg0); font-weight: 600; }
.btn.primary:hover { background: #fff; border-color: #fff; }
:root[data-theme="light"] .btn.primary:hover { background: #000; border-color: #000; }
.btn.buy { background: var(--up); border-color: var(--up); color: var(--up-ink); font-weight: 600; }
.btn.buy:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--fg1); }
.btn.ghost:hover { background: var(--bg3); color: var(--fg0); }
.btn.sm { height: 24px; padding: 0 8px; font-size: 11px; }
.btn.danger { color: var(--dn); }
.btn.upgrade { background: var(--foil); border-color: transparent; color: #0b0b0d; font-weight: 700; }
.btn.upgrade:hover { filter: brightness(1.06); }
.btn b.badge { font: 600 10px/1 var(--mono); color: var(--fg2); background: var(--bg3); border-radius: 8px; padding: 3px 6px; }
.btn b.badge:empty { display: none; }
.btn b.badge.hot { color: var(--warn-ink); background: var(--warn); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.watching { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }

/* ═══════════════════════════════ desk grid ═══════════════════════════════ */
.desk { display: grid; grid-template-columns: minmax(0, 1fr) 500px; gap: 1px; background: var(--line); min-height: 0; }
@media (max-width: 1540px) { .desk { grid-template-columns: minmax(0, 1fr) 450px; } }
@media (max-width: 1240px) { .desk { grid-template-columns: minmax(0, 1fr) 400px; } }
.left { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1px; background: var(--line); min-height: 0; }
.right { display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; }
.desk > *, .left > *, .right > * { min-width: 0; }
.panel { background: var(--bg1); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.ph { display: flex; align-items: center; gap: 10px; height: 26px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg1); font: 700 10px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--fg1); flex: none; }
.ph .pm { font: 400 11px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--fg2); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line2); background: var(--bg2); color: var(--fg1); border-radius: 10px; padding: 2px 8px; font: 600 10px/1.3 var(--sans); letter-spacing: 0; text-transform: none; white-space: nowrap; }
.pill.lock { cursor: pointer; }
.pill.lock:hover { border-color: var(--accent); color: var(--fg0); }
.pill.new { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-bg); cursor: pointer; }

/* ═══════════════════════════════ opportunities strip ═══════════════════════════════ */
.opps { height: 128px; }
.opp-strip { display: flex; gap: 6px; padding: 7px 10px; overflow-x: auto; overflow-y: hidden; flex: 1; min-width: 0; width: 100%; scrollbar-width: thin; }
.opp { flex: none; width: 236px; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); cursor: pointer; position: relative; text-align: left; transition: border-color .12s, background .12s; }
.opp:hover { border-color: var(--line3); background: var(--bg3); }
.opp.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.opp.watched { border-color: var(--warn); }
.opp .imgs { display: flex; gap: 2px; position: relative; }
.opp .imgs img { width: 34px; height: 47px; object-fit: cover; border-radius: 2px; background: var(--bg3); display: block; }
.opp .imgs img.card { object-fit: contain; background: var(--card-bg); }
.opp .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; padding-right: 30px; }
.opp .n span { color: var(--fg2); font-weight: 400; }
.opp .s { color: var(--fg2); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.opp .p { margin-top: 5px; font: 11px var(--mono); color: var(--fg2); display: flex; align-items: baseline; gap: 5px; }
.opp .p b { color: var(--fg0); font-weight: 600; font-size: 12px; }
.opp .u { font: 700 13px var(--mono); color: var(--up); margin-top: 1px; display: flex; align-items: baseline; gap: 6px; }
.opp .u small { font-weight: 500; font-size: 10px; color: var(--fg1); }
.opp .ft { position: absolute; right: 6px; top: 6px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.opp .age { font: 10px var(--mono); color: var(--fg2); }
.opp-lock { display: flex; align-items: center; gap: 22px; padding: 12px 16px; flex: 1; min-width: 0; }
.opp-lock .big { font: 600 28px/1 var(--mono); color: var(--fg0); letter-spacing: -.03em; }
.opp-lock .big small { font: 500 11px var(--sans); color: var(--fg2); margin-left: 6px; letter-spacing: 0; }
.opp-lock .txt { color: var(--fg1); font-size: 12px; max-width: 420px; line-height: 1.4; }
.opp-lock .txt b { color: var(--fg0); }
.opp-lock .txt a { color: var(--accent); font-weight: 600; }
.opp-lock .ghosts { display: flex; gap: 6px; flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent); mask-image: linear-gradient(90deg, #000 30%, transparent); }
.opp-lock .ghost { flex: none; width: 236px; height: 92px; border: 1px dashed var(--line2); border-radius: 6px; background: repeating-linear-gradient(-35deg, transparent 0 6px, var(--bg2) 6px 12px); }

/* ═══════════════════════════════ tape ═══════════════════════════════ */
.tape { min-height: 0; }
.toolbar { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); flex: none; white-space: nowrap; overflow: hidden; }
.toolbar .pm { color: var(--fg2); font-size: 11px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
.toolbar .sep { width: 1px; height: 16px; background: var(--line2); }
.ctl { display: inline-flex; align-items: center; gap: 5px; color: var(--fg2); font-size: 11px; }
.ctl input[type=number] { width: 50px; height: 24px; padding: 0 6px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg2); font: 11px var(--mono); color: var(--fg0); }
.ctl input[type=number]:focus { border-color: var(--accent); outline: 0; }
.ctl.chk { cursor: pointer; }
.ctl.chk input { margin: 0; width: 13px; height: 13px; accent-color: var(--accent); }
.ctl.sel { height: 24px; padding: 0 22px 0 7px; border: 1px solid var(--line2); border-radius: 4px; background: var(--bg2); color: var(--fg1); appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fg2) 50%), linear-gradient(135deg, var(--fg2) 50%, transparent 50%); background-position: calc(100% - 11px) 9px, calc(100% - 7px) 9px; background-size: 4px 4px; background-repeat: no-repeat; }
.srcseg { display: inline-flex; gap: 4px; }
.srcseg .src { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; opacity: .3; filter: grayscale(1); border-radius: 5px; transition: opacity .12s; }
.srcseg .src:hover { opacity: .7; }
.srcseg .src.on { opacity: 1; filter: none; }
.th, .tr { display: grid; grid-template-columns: 40px 62px minmax(0, 1fr) 40px 68px 68px 58px 66px 46px 58px 46px; gap: 8px; align-items: center; padding: 0 12px; }
.th { height: 24px; font: 600 9.5px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--fg2); border-bottom: 1px solid var(--line); flex: none; }
.tape-body { overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; }
.tape-foot { display: flex; gap: 10px; align-items: center; padding: 5px 12px; border-top: 1px solid var(--line); flex: none; }
.tr { height: var(--row-h); border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.tr:hover { background: var(--bg2); }
.tr.sel { background: var(--sel); }
.tr.sel::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--foil); }
.tr.watched { background: var(--warn-bg); box-shadow: inset 3px 0 0 var(--warn); }
.tr.watched.sel::before { display: none; }
.tr.watched.sel { box-shadow: inset 3px 0 0 var(--warn), inset 0 0 0 1px var(--accent); }
.tr.dim { opacity: .5; }
.tr.hidden { display: none; }
.tr.new { animation: rowin .8s ease-out; }
@keyframes rowin { 0% { background: var(--cyan-bg); transform: translateY(-4px); } 100% { background: transparent; transform: none; } }
.tr.buy-flash { animation: buyflash 1.4s ease-out; }
@keyframes buyflash { 0% { background: var(--up-bg); } 100% { background: transparent; } }
.c-time { font: 11px var(--mono); color: var(--fg2); }
.c-time.fresh { color: var(--cyan); }
.c-img { display: flex; gap: 2px; position: relative; }
.c-img img, .c-img .ph-img { width: 28px; height: 38px; object-fit: cover; border-radius: 2px; background: var(--bg3); display: block; }
.c-img img.card { object-fit: contain; background: var(--card-bg); }
.c-img .ph-img { display: flex; align-items: center; justify-content: center; color: var(--fg3); font-size: 12px; }
.c-img .ph-img.spin::after { content: ''; width: 10px; height: 10px; border: 2px solid var(--fg3); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.c-main { min-width: 0; line-height: 1.3; }
.c-main .ttl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.c-main .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg2); font-size: 11px; }
.c-main .meta .cn { color: var(--fg1); font-weight: 500; }
.c-main .meta .sep { margin: 0 4px; color: var(--fg3); }
.c-main .meta .lang { font: 600 9px/1 var(--mono); border: 1px solid var(--line2); border-radius: 2px; padding: 1px 3px; margin-left: 4px; vertical-align: 1px; color: var(--fg1); }
.c-main .meta .vchip { color: var(--cyan); border-color: var(--cyan); }
.c-main .meta.st { font-style: italic; }
.c-cond { font: 500 11px var(--mono); text-align: center; color: var(--fg1); line-height: 1.1; }
.c-cond small { display: block; font: 8.5px var(--sans); color: var(--fg3); margin-top: 1px; }
.c-cond.graded { color: var(--cyan); }
.c-num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; font-size: 12px; line-height: 1.15; }
.c-num small { display: block; font-size: 9.5px; color: var(--fg2); }
.c-num.ask { color: var(--fg0); font-weight: 600; }
.c-num.fair { color: var(--fg1); }
.c-delta { font: 700 11.5px var(--mono); text-align: center; border-radius: 3px; padding: 4px 0; }
.c-delta.steal { background: var(--up); color: var(--up-ink); }
.c-delta.good { background: var(--up-bg); color: var(--up); }
.c-delta.fair { background: var(--bg3); color: var(--fg1); }
.c-delta.over { background: var(--dn-bg); color: var(--dn); }
.c-delta.none { color: var(--fg3); font-weight: 400; }
.c-delta.auc { background: var(--warn-bg); color: var(--warn); font-weight: 600; font-size: 10.5px; white-space: nowrap; }
.c-up { font: 600 12px var(--mono); text-align: right; }
.c-up.pos { color: var(--up); } .c-up.neg { color: var(--fg3); font-weight: 400; } .c-up.ceil { color: var(--cyan); }
.c-conf { font: 700 9px var(--sans); letter-spacing: .06em; color: var(--fg2); display: flex; align-items: center; gap: 4px; }
.c-conf::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--fg3); flex: none; }
.c-conf.high::before { background: var(--up); } .c-conf.medium::before { background: var(--warn); } .c-conf.image::before { background: var(--cyan); } .c-conf.manual::before { background: var(--fg0); }
.sig { font: 800 10px var(--sans); letter-spacing: .08em; text-align: center; border-radius: 3px; padding: 4px 0; }
.sig.buy { background: var(--up); color: var(--up-ink); }
.sig.verify { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.sig.fair { color: var(--fg2); box-shadow: inset 0 0 0 1px var(--line2); }
.sig.pass { color: var(--fg3); }
.sig.watch { background: var(--warn); color: var(--warn-ink); }
.sig.auction { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.c-act { display: flex; justify-content: flex-end; gap: 1px; }
.c-act button, .c-act a { border: 0; background: transparent; padding: 3px 4px; border-radius: 3px; color: var(--fg3); font-size: 13px; line-height: 1; }
.c-act button:hover, .c-act a:hover { background: var(--bg4); color: var(--fg0); }
.c-act .star.on { color: var(--warn); }
.c-act button[disabled] { opacity: .3; cursor: default; }

/* marketplace badges and chips */
.src { display: inline-block; width: 14px; height: 14px; border-radius: 3px; flex: none; vertical-align: middle; overflow: hidden; }
svg.src { display: inline-block; }
.src svg { display: block; width: 100%; height: 100%; }
.c-img > .src, .opp .imgs > .src, .hit .imgs > .src { position: absolute; left: -2px; bottom: -2px; box-shadow: 0 0 0 1.5px var(--bg1); }
.chip { display: inline-block; font: 700 9px/13px var(--mono); letter-spacing: .04em; border-radius: 3px; padding: 0 4px; margin-right: 4px; vertical-align: 1px; }
.chip.bin { background: var(--cyan-bg); color: var(--cyan); }
.chip.auc { background: var(--warn-bg); color: var(--warn); }
.chip.obo { box-shadow: inset 0 0 0 1px var(--line2); color: var(--fg1); }
.chip.loc { box-shadow: inset 0 0 0 1px var(--line2); color: var(--fg2); }

/* ═══════════════════════════════ inspector ═══════════════════════════════ */
.insp-body { overflow-y: auto; flex: 1; min-height: 0; padding: 12px 14px 20px; }
.insp .empty { color: var(--fg2); font-size: 12px; line-height: 1.5; max-width: 40ch; }
.insp .head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: start; margin-bottom: 10px; }
.insp .head h3 { margin: 0; font: 600 15px/1.25 var(--sans); letter-spacing: -.01em; overflow-wrap: anywhere; }
.insp .head h3 .no { color: var(--fg2); font-weight: 500; }
.insp .head .set { color: var(--fg1); font-size: 11.5px; margin-top: 2px; overflow-wrap: anywhere; }
.insp .head .set .sep { color: var(--fg3); margin: 0 5px; }
.insp .badges { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.sigbig { display: inline-flex; align-items: center; font: 800 10px/1 var(--sans); letter-spacing: .1em; padding: 5px 8px; border-radius: 3px; }
.insp .head .star { width: 34px; height: 34px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--bg2); color: var(--fg2); font-size: 17px; display: inline-flex; align-items: center; justify-content: center; }
.insp .head .star:hover { color: var(--warn); border-color: var(--warn); }
.insp .head .star.on { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }
.insp .head .star[disabled] { opacity: .35; cursor: default; }
.insp .imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.insp .imgs .frame { position: relative; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); overflow: hidden; }
.insp .imgs .frame.card { background: var(--card-bg); }
.insp .imgs .frame img { width: 100%; height: 250px; object-fit: contain; display: block; cursor: zoom-in; }
.insp .imgs .frame .lbl { position: absolute; left: 6px; top: 6px; font: 700 9px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--fg1); background: rgba(9,9,10,.72); padding: 4px 6px; border-radius: 3px; backdrop-filter: blur(4px); }
.insp .imgs .frame.card .lbl { color: #3a3a40; background: rgba(255,255,255,.8); }
.insp .imgs .frame .cnt { position: absolute; right: 6px; top: 6px; font: 600 9px/1 var(--mono); color: var(--fg1); background: rgba(9,9,10,.72); padding: 4px 6px; border-radius: 3px; }
.insp .imgs .none { height: 250px; display: flex; align-items: center; justify-content: center; color: var(--fg2); font-size: 11px; }
.insp .thumbs { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.insp .thumbs img { width: 36px; height: 48px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); cursor: pointer; background: var(--bg3); }
.insp .thumbs img:hover { border-color: var(--line3); }
.insp .thumbs img.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0 8px; }
.ladder div { background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; min-width: 0; }
.ladder .l { font: 600 9px/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ladder .v { font: 600 17px/1.15 var(--mono); letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; }
.ladder .v.up { color: var(--up); } .ladder .v.dn { color: var(--dn); } .ladder .v.cy { color: var(--cyan); }
.ladder .v small { display: block; font: 500 10px/1.25 var(--sans); color: var(--fg2); letter-spacing: 0; margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
.insp .actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; align-items: center; }
.insp .actions .btn { height: 30px; }
.insp .actions .sp { flex: 1; }
.insp .section { margin-top: 14px; }
.insp .section > .sh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.insp .sh h5 { margin: 0; font: 700 9.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--fg2); }
.insp .sh .seg { margin-left: auto; }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; padding: 2px; }
.seg button { border: 0; background: transparent; padding: 2px 8px; border-radius: 3px; color: var(--fg2); font: 600 10px var(--sans); }
.seg button.on { background: var(--bg4); color: var(--fg0); }
.seg.small button { padding: 3px 10px; font-size: 11px; display: inline-flex; align-items: center; gap: 6px; }
.seg button .badge { font: 600 10px/1 var(--mono); color: var(--fg2); background: var(--bg3); border-radius: 8px; padding: 3px 6px; }
.seg button .badge:empty { display: none; }
.seg button .badge.hot { color: var(--warn-ink); background: var(--warn); }
.kv { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 5px 10px; font-size: 11.5px; margin: 0; line-height: 1.4; }
.kv dt { color: var(--fg2); } .kv dd { margin: 0; color: var(--fg1); overflow-wrap: anywhere; }
.kv dd b { color: var(--fg0); }
.kv dd .warn { color: var(--warn); }
.kv dd .g { display: inline-block; margin-right: 8px; white-space: nowrap; }
.kv dd .g b { font-family: var(--mono); font-weight: 500; }
.kv dd .g.on { color: var(--fg0); background: var(--bg3); border: 1px solid var(--line2); border-radius: 4px; padding: 0 5px; }
.insp .vchips { display: flex; gap: 5px; flex-wrap: wrap; }
.insp .vchips .btn { height: 24px; font-size: 11px; padding: 0 8px; gap: 5px; }
.insp .vchips .btn .num { color: var(--fg2); }
.insp .vchips .btn.primary .num { color: inherit; opacity: .7; }
.insp .desc { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg1); font-size: 11.5px; line-height: 1.45; max-height: 76px; overflow: hidden; padding: 8px 10px; background: var(--bg2); border-radius: 6px; position: relative; }
.insp .desc.open { max-height: none; }
.insp .desc:not(.open)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 28px; background: linear-gradient(transparent, var(--bg2)); }
.insp .more { border: 0; background: transparent; color: var(--accent); font-size: 11px; padding: 4px 0; }
.cand { display: grid; grid-template-columns: 26px minmax(0, 1fr) 56px 48px; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.cand:last-child { border-bottom: 0; }
.cand img { width: 26px; height: 36px; object-fit: contain; background: var(--card-bg); border-radius: 2px; }
.cand .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand .why { color: var(--fg3); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand.chosen { background: var(--sel); margin: 0 -6px; padding: 4px 6px; border-radius: 4px; }
.cand .sc { text-align: right; color: var(--fg2); font: 10px var(--mono); }
.note { color: var(--fg1); font-size: 11.5px; line-height: 1.45; padding: 8px 10px; background: var(--bg2); border-radius: 6px; border: 1px solid var(--line); }
.note.warn { border-color: var(--warn); color: var(--warn); }
.note a { color: var(--accent); font-weight: 500; }
.alertline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; color: var(--fg2); font-size: 11px; margin-top: -4px; margin-bottom: 8px; }
.alertline .ch { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line2); border-radius: 10px; padding: 2px 7px; color: var(--fg1); }
.alertline .ch.on { border-color: var(--up); color: var(--up); }
.alertline .ch.off { color: var(--fg3); border-style: dashed; }
.alertline a { color: var(--accent); }

/* activity chart: market line, our listings as marks, this listing ringed */
.chart-wrap { border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); padding: 8px 8px 6px; }
.chart { width: 100%; height: 168px; display: block; overflow: visible; font-family: var(--mono); }
.chart .grid { stroke: var(--line2); stroke-width: 1; }
.chart .axis { fill: var(--fg2); font-size: 9.5px; }
.chart .mkt { fill: none; stroke: var(--fg1); stroke-width: 1.5; }
.chart .mkt-area { fill: var(--fg3); opacity: .16; }
.chart .fairln { stroke: var(--cyan); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .fairlbl { fill: var(--cyan); font-size: 9px; font-weight: 600; }
.chart .pt { cursor: pointer; stroke: var(--bg2); stroke-width: 1; }
.chart .pt.v { stroke: #09b1ba; stroke-width: 1.5; } .chart .pt.e { stroke: #e53238; stroke-width: 1.5; }
.chart .pt.steal, .chart .pt.good { fill: var(--up); } .chart .pt.fair { fill: var(--fg1); } .chart .pt.over { fill: var(--dn); } .chart .pt.none { fill: var(--fg3); }
.chart .pt.auc { fill: var(--bg2); stroke: var(--warn); stroke-width: 1.5; }
.chart .pt.cur { stroke: var(--accent); stroke-width: 2; }
.chart .ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .9; }
.chart .clip { fill: var(--dn); }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; color: var(--fg2); font-size: 10px; margin-top: 6px; padding: 0 2px; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: -1px; margin-right: 5px; box-sizing: border-box; }
.chart-legend i.v { border: 2px solid #09b1ba; background: var(--fg1); } .chart-legend i.e { border: 2px solid #e53238; border-radius: 1px; background: var(--fg1); }
.chart-legend i.sq { border-radius: 1px; }
.chart-legend i.ln { width: 12px; height: 2px; border-radius: 1px; vertical-align: 2px; }
.chart-legend i.ds { width: 12px; height: 0; border-top: 1px dashed var(--cyan); vertical-align: 2px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.stats div { min-width: 0; padding: 6px 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; }
.stats .l { font: 600 8.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats .v { font: 600 15px/1.2 var(--mono); letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats .s { font: 500 10px/1.25 var(--sans); color: var(--fg2); margin-top: 2px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1300px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats .l { white-space: normal; } }
.stats .v.up { color: var(--up); } .stats .v.dn { color: var(--dn); }
.chart-empty { color: var(--fg2); font-size: 11px; padding: 10px 2px; line-height: 1.5; }
.tip { position: fixed; z-index: 70; pointer-events: none; background: var(--bg1); border: 1px solid var(--line2); box-shadow: var(--shadow); border-radius: 6px; padding: 7px 9px; font-size: 11px; color: var(--fg1); max-width: 260px; display: flex; gap: 8px; align-items: center; }
.tip img { width: 30px; height: 40px; object-fit: cover; border-radius: 2px; background: var(--bg3); flex: none; }
.tip b { color: var(--fg0); font-family: var(--mono); }
.tip .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

/* ═══════════════════════════════ peek, lightbox, modal ═══════════════════════════════ */
.peek { position: fixed; z-index: 60; display: flex; gap: 6px; padding: 6px; background: var(--bg1); border: 1px solid var(--line2); border-radius: 8px; box-shadow: var(--shadow); pointer-events: none; }
.peek img { height: 300px; width: 215px; object-fit: contain; border-radius: 4px; background: var(--bg3); }
.peek img.card { background: var(--card-bg); }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(6,6,8,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: zoom-out; backdrop-filter: blur(6px); }
.lightbox img.big { max-width: min(92vw, 1100px); max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; background: var(--bg2); cursor: default; }
.lightbox .lb-thumbs { display: flex; gap: 6px; }
.lightbox .lb-thumbs img { width: 46px; height: 60px; object-fit: cover; border-radius: 3px; border: 2px solid transparent; cursor: pointer; opacity: .7; }
.lightbox .lb-thumbs img.on { border-color: var(--accent); opacity: 1; }
.lightbox .lb-cap { color: var(--fg1); font-size: 11px; }
.lightbox .lb-close { position: absolute; top: 14px; right: 16px; }
.modal { position: fixed; inset: 0; z-index: 85; background: rgba(6,6,8,.7); display: grid; place-items: center; backdrop-filter: blur(4px); }
.modal .box { width: min(520px, 92vw); background: var(--bg1); border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); padding: 18px 20px; }
.modal h3 { margin: 0 0 12px; font-size: 14px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 12px; color: var(--fg1); align-items: center; }
.keys .kk { display: flex; gap: 3px; }
.modal .foot { display: flex; justify-content: flex-end; margin-top: 14px; }

/* ═══════════════════════════════ drawer ═══════════════════════════════ */
.drawer { position: fixed; top: var(--top-h); right: 0; bottom: 0; width: 480px; max-width: 100vw; background: var(--bg1); border-left: 1px solid var(--line2); box-shadow: var(--shadow); z-index: 30; display: flex; flex-direction: column; }
.dhead { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tab { overflow: auto; padding: 12px 14px 20px; flex: 1; }
.findrow { display: flex; gap: 6px; margin-bottom: 10px; }
.findrow input { flex: 1; height: 30px; padding: 0 10px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--bg2); color: var(--fg0); }
.findrow input:focus { border-color: var(--accent); outline: 0; }
.cards { display: flex; flex-direction: column; }
.crd { display: grid; grid-template-columns: 36px minmax(0, 1fr) 80px 28px; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.crd img { width: 36px; height: 50px; object-fit: contain; background: var(--card-bg); border-radius: 3px; }
.crd .n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crd .s { color: var(--fg2); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crd .s a { color: var(--accent); }
.crd .p { text-align: right; font: 11.5px var(--mono); }
.crd .p span { display: block; color: var(--fg2); font-size: 10px; }
.crd .star, .hit .star { border: 0; background: transparent; font-size: 17px; color: var(--fg3); padding: 2px; }
.crd .star:hover, .hit .star:hover { color: var(--warn); }
.crd .star.on, .hit .star.on { color: var(--warn); }
.maxp { width: 64px; height: 20px; padding: 0 5px; border: 1px solid var(--line2); border-radius: 3px; background: var(--bg2); font: 10px var(--mono); color: var(--fg0); margin-top: 2px; }
.sethead { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; }
.sethead h4 { margin: 0; flex: 1; font-size: 12px; }
.wset { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.wset > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h5 { margin: 12px 0 6px; font: 700 9.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--fg2); display: flex; align-items: center; gap: 8px; }
.h5:first-child { margin-top: 0; }
.h5 .cnt { font: 500 10px var(--mono); color: var(--fg3); letter-spacing: 0; text-transform: none; }
.wgroup { margin: 4px 0; }
.wgroup summary { cursor: pointer; font-size: 11px; color: var(--fg1); padding: 4px 0; }
.hit { display: grid; grid-template-columns: 60px minmax(0, 1fr) 100px 46px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.hit:hover { background: var(--bg2); margin: 0 -6px; padding: 6px; border-radius: 4px; }
.hit.unseen .n::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); margin-right: 5px; vertical-align: 1px; }
.hit .imgs { display: flex; gap: 2px; position: relative; }
.hit .imgs img { width: 28px; height: 38px; object-fit: cover; border-radius: 2px; background: var(--bg3); }
.hit .imgs img.card { object-fit: contain; background: var(--card-bg); }
.hit .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hit .s { color: var(--fg2); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hit .p { font: 11px var(--mono); text-align: right; line-height: 1.25; }
.hit .p b { display: block; font-size: 12px; }
.hit .p .d { display: block; font-size: 10px; white-space: nowrap; }
.hit .p .d.steal, .hit .p .d.good { color: var(--up); } .hit .p .d.over { color: var(--dn); }
.hit .age { font: 10px var(--mono); color: var(--fg2); text-align: right; }

/* ═══════════════════════════════ account ═══════════════════════════════ */
.acct { display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
.acct .who { display: flex; align-items: center; gap: 10px; }
.acct .who img { width: 36px; height: 36px; border-radius: 50%; background: var(--bg3); object-fit: cover; }
.acct .who .e { color: var(--fg2); font-size: 11px; }
.acct .box { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--bg2); }
.acct .box.pro { border-color: transparent; background: linear-gradient(var(--bg2), var(--bg2)) padding-box, var(--foil) border-box; }
.acct .box h4 { margin: 0 0 8px; font: 700 9.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--fg2); display: flex; align-items: center; gap: 8px; }
.acct .box h4 .st { margin-left: auto; font: 600 10px var(--sans); letter-spacing: 0; text-transform: none; }
.acct .box h4 .st.ok { color: var(--up); } .acct .box h4 .st.no { color: var(--fg2); }
.acct .price { font: 600 22px/1 var(--mono); letter-spacing: -.02em; }
.acct .price small { font: 400 11px var(--sans); color: var(--fg2); letter-spacing: 0; }
.acct ul { margin: 8px 0 0; padding-left: 16px; color: var(--fg1); line-height: 1.5; }
.acct ol { margin: 6px 0 0; padding-left: 18px; color: var(--fg1); line-height: 1.55; }
.acct .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.acct input[type=text] { flex: 1; min-width: 140px; height: 28px; padding: 0 8px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--bg1); color: var(--fg0); font: 11px var(--mono); }
.acct input[type=text]:focus { border-color: var(--accent); outline: 0; }
.acct .usage { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; color: var(--fg1); font: 11px var(--mono); }
.acct .usage span:nth-child(odd) { color: var(--fg2); font-family: var(--sans); }
.acct .toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--fg1); }
.acct .toggle input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.acct .dc { display: flex; align-items: center; gap: 10px; }
.acct .dc .dcico { width: 30px; height: 30px; border-radius: 8px; background: #5865f2; display: grid; place-items: center; color: #fff; flex: none; }
.acct .dc .dcico svg { width: 18px; height: 18px; fill: currentColor; }

/* ═══════════════════════════════ toasts ═══════════════════════════════ */
.toasts { position: fixed; bottom: 14px; left: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 50; }
.toast { background: var(--bg1); border: 1px solid var(--line2); border-left: 3px solid var(--accent); box-shadow: var(--shadow); border-radius: 8px; padding: 9px 11px; width: 330px; display: flex; gap: 10px; align-items: center; cursor: pointer; animation: slidein .25s ease-out; }
.toast.watch { border-left-color: var(--warn); } .toast.steal { border-left-color: var(--up); } .toast.lock { border-left-color: var(--pink); }
.toast img { width: 32px; height: 44px; object-fit: cover; border-radius: 3px; background: var(--bg3); flex: none; }
.toast .tt { font-weight: 600; } .toast .tb { color: var(--fg1); font-size: 11px; line-height: 1.4; margin-top: 1px; }
.toast .n { font: 700 11px var(--mono); color: var(--up-ink); background: var(--up); border-radius: 8px; padding: 2px 7px; margin-left: 6px; vertical-align: 1px; }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ═══════════════════════════════ gate ═══════════════════════════════ */
.gate { position: fixed; inset: 0; z-index: 80; background: radial-gradient(900px 500px at 50% -10%, #17171b, var(--bg0) 62%); display: grid; place-items: center; }
.gate::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 300px at 20% 110%, rgba(139,124,246,.10), transparent 60%), radial-gradient(500px 260px at 85% 100%, rgba(33,212,236,.08), transparent 60%); pointer-events: none; }
.gate-card { position: relative; width: min(440px, 92vw); display: flex; flex-direction: column; gap: 20px; align-items: center; }
.gate-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.gate-brand .logo { font: 800 32px/1 var(--display); letter-spacing: -.045em; }
.gate-brand .tag { color: var(--fg1); font-size: 13px; }
.gate-foot { display: flex; gap: 14px; color: var(--fg2); font-size: 11px; }
.gate-foot a { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- realised sales: what the card actually fetched, and how long it took ---- */
.chart .pt.sold { fill-opacity: 1; stroke-width: 1.4; }
.chart.has-sales .pt:not(.sold) { fill-opacity: .3; }
.chart .sellln { stroke: var(--up); stroke-width: 1.2; stroke-dasharray: 1 3; opacity: .85; }
.chart .selllbl { fill: var(--up); font: 500 9.5px var(--mono); }
.chart-legend i.soldi { background: var(--up); border-radius: 50%; }
.chart-legend i.sl { background: var(--up); height: 2px; border-radius: 0; }
.sales { display: flex; flex-direction: column; gap: 1px; }
.sale { display: grid; grid-template-columns: 52px 1fr 46px 52px 62px; gap: 8px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.sale:last-child { border-bottom: 0; }
.sale .w { color: var(--fg2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
.sale b { font-family: var(--mono); font-weight: 600; color: var(--fg0); }
.sale .t { font-family: var(--mono); color: var(--up); font-size: 11px; }
.sale .d { font-size: 10.5px; }
.sale .c { font-size: 9.5px; color: var(--fg3); text-align: right; }
.sale .c.firm { color: var(--up); }

/* ---- grading advisor ---- */
.verdict { font: 700 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 4px; }
.verdict.yes { background: var(--up); color: #04140a; }
.verdict.maybe { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); }
.verdict.no { color: var(--fg2); border: 1px solid var(--line2); }
.gsum { font-size: 13px; color: var(--fg1); margin-bottom: 10px; text-wrap: pretty; }
.gsum b { color: var(--fg0); font-family: var(--mono); font-weight: 600; }
.gsum b.up { color: var(--up); } .gsum b.dn { color: var(--dn); }
.gbars { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.gb { display: grid; grid-template-columns: 62px 1fr 34px 58px; gap: 8px; align-items: center; font-size: 11.5px; }
.gb .gg { font-family: var(--mono); color: var(--fg1); }
.gb .gp { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.gb .gp i { display: block; height: 100%; background: var(--foil); }
.gb .gn { font-family: var(--mono); color: var(--fg2); text-align: right; font-size: 10.5px; }
.gb .gv { font-family: var(--mono); color: var(--fg0); text-align: right; }

/* ═══════════════════════════════ phone ═══════════════════════════════
   The desk is a three-column trading terminal, which a phone cannot be. It becomes an app instead: one column at a
   time, the inspector as a full-screen sheet over the tape, and the four views moved to a bottom bar where a thumb
   actually reaches. Everything the terminal puts in a row is still here — it just wraps into two lines per listing
   instead of eleven columns. */
.tabbar { display: none; }
.sheet-back { display: none; }
.only-phone { display: none !important; }

@media (max-width: 760px) {
  :root {
    --top-h: calc(52px + env(safe-area-inset-top, 0px));
    --tabbar-h: calc(54px + env(safe-area-inset-bottom, 0px));
  }
  /* a tap should feel like a press, not a hover that never lifts */
  * { -webkit-tap-highlight-color: transparent; }
  .tr:hover, .opp:hover, .btn:hover, .ib:hover { background: inherit; }

  /* ---- header: the brand, a filter, and the two controls worth a permanent slot ---- */
  header.top { gap: 8px; padding: env(safe-area-inset-top, 0px) 10px 0; }
  header.top .views, header.top .icons, header.top .spacer, #pollInfo, #upgradeBtn, #opsBtn { display: none; }
  .brand { gap: 6px; }
  .logo { font-size: 15px; }
  .search { flex: 1 1 auto; min-width: 0; height: 34px; }
  .search input { font-size: 16px; }   /* iOS zooms the page for anything smaller when it takes focus */
  .search kbd { display: none; }
  #watchBtn { position: relative; width: 38px; height: 34px; padding: 0; justify-content: center; }
  #watchBtn .lbl { display: none; }
  #watchBtn .only-phone { display: block !important; width: 17px; height: 17px; }
  #watchBtn b.badge { position: absolute; top: -5px; right: -5px; padding: 2px 5px; }
  #acctBtn { width: 34px; height: 34px; flex: none; }

  /* ---- one column, with the bar reserved at the bottom ---- */
  .desk { grid-template-columns: minmax(0, 1fr); padding-bottom: var(--tabbar-h); }
  /* tall enough for the whole card: a clipped upside figure is the one number that must not be cut */
  .opps { height: 134px; }
  .opp-strip { scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding: 7px 10px; }
  .opp { scroll-snap-align: start; width: 224px; }
  .tape-body { overscroll-behavior-y: contain; }

  /* ---- filters: every control visible as a chip, nothing hidden off the side of the screen ---- */
  .toolbar { flex-wrap: wrap; height: auto; overflow: visible; white-space: normal; padding: 8px 10px; gap: 6px; }
  .toolbar > * { flex: none; }
  .toolbar .sep { display: none; }
  .ctl { height: 34px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 17px; background: var(--bg2); color: var(--fg1); font-size: 12px; gap: 6px; }
  .ctl input[type=number] { width: 44px; height: 24px; padding: 0 2px; border: 0; background: transparent; font-size: 16px; text-align: center; }
  .ctl.chk input { width: 16px; height: 16px; }
  .ctl.chk:has(input:checked) { border-color: var(--accent); color: var(--fg0); background: var(--bg3); }
  .ctl.sel { height: 34px; padding: 0 26px 0 12px; border-radius: 17px; font-size: 12px; background-position: calc(100% - 13px) 15px, calc(100% - 9px) 15px; }
  .srcseg { gap: 6px; }
  .srcseg .src { width: 34px; height: 34px; padding: 5px; border: 1px solid var(--line2); border-radius: 17px; }
  .srcseg .src.on { border-color: var(--accent); background: var(--bg3); }
  .toolbar .pm { flex: 1 1 auto; order: 9; margin: 0; align-self: center; font-size: 11px; text-align: right; }
  .toolbar .pill { order: 8; height: 34px; border-radius: 17px; padding: 0 12px; font-size: 12px; }

  /* the opportunities strip explains itself; only the live count earns a line here */
  .opps .ph .pm { display: none; }

  /* ---- a listing becomes a two-line card: what it is on top, what it costs underneath ---- */
  .th { display: none; }
  .tr {
    grid-template-columns: 60px auto auto auto minmax(0, 1fr) auto;
    column-gap: 8px; row-gap: 3px;
    height: auto; min-height: 66px; padding: 9px 12px; align-items: center;
  }
  .c-img { grid-column: 1; grid-row: 1 / 3; }
  .c-main { grid-column: 2 / 6; grid-row: 1; }
  .c-main .ttl { font-size: 13px; }
  .c-main .meta { font-size: 11.5px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .sig { grid-column: 6; grid-row: 1; justify-self: end; }
  .c-time { grid-column: 2; grid-row: 2; }
  .c-cond { grid-column: 3; grid-row: 2; text-align: left; }
  .c-cond small { display: none; }   /* where the condition was read from is in the sheet */
  .c-delta { grid-column: 4; grid-row: 2; }
  .c-up { grid-column: 5; grid-row: 2; justify-self: start; font-size: 12px; }
  .c-num.ask { grid-column: 6; grid-row: 2; font-size: 13px; }
  /* fair value, match confidence and the row's own buttons all live in the sheet a tap away */
  .c-num.fair, .c-conf, .c-act { display: none; }

  /* ---- the inspector is a sheet that slides over the tape ---- */
  .right {
    position: fixed; inset: 0; z-index: 35; background: var(--bg0);
    transform: translateX(100%); visibility: hidden;
    /* pointer-events is not animated, so it drops the instant the sheet is dismissed. Without it the sheet keeps
       swallowing taps while it slides away, and a tap meant for the header lands on the sheet's Buy link. */
    pointer-events: none;
    transition: transform .26s cubic-bezier(.32, .72, 0, 1), visibility .26s;
  }
  body.insp-open .right { transform: none; visibility: visible; pointer-events: auto; }
  body.insp-open { overflow: hidden; }
  .right .ph { height: calc(46px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 12px 0; }
  .right .ph > span:not(.pm) { display: none; }   /* the back button already says where you are */
  .right .ph .pm { display: none; }
  .sheet-back { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px 0 6px; margin-left: -6px; border: 0; background: transparent; color: var(--fg0); font: 600 13px/1 var(--sans); letter-spacing: 0; text-transform: none; }
  .sheet-back .i { width: 18px; height: 18px; }
  .sheet-back:active { opacity: .6; }
  .insp-body { padding: 12px 14px calc(28px + env(safe-area-inset-bottom, 0px)); }
  .insp .imgs { grid-template-columns: 1fr 1fr; }
  .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dt { color: var(--fg2); margin-top: 6px; }
  .kv dd { margin-left: 0; }
  .actions .btn { height: 42px; font-size: 14px; }
  .actions .sp { display: none; }   /* let the secondary actions pack left instead of splitting across the row */
  .sheet-buy { display: inline-flex; align-items: center; margin-left: auto; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--fg0); color: var(--bg0); font: 700 13px/1 var(--sans); letter-spacing: 0; text-transform: none; }
  .sheet-buy.buy { background: var(--up); color: #04140a; }
  .sheet-buy:active { opacity: .7; }
  .cand { grid-template-columns: 26px minmax(0, 1fr) 56px; }
  .cand > *:nth-child(4) { display: none; }
  .sale { grid-template-columns: 44px 1fr auto auto; }
  .sale .d { display: none; }
  .gb { grid-template-columns: 54px 1fr 30px 50px; }

  /* ---- the drawer covers the screen too, so its lists get full width ---- */
  .drawer { top: 0; width: 100%; max-width: 100%; border-left: 0; z-index: 40; }
  .dhead { height: calc(46px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 8px 0; }
  .dhead .seg { overflow-x: auto; scrollbar-width: none; }
  .dhead .seg::-webkit-scrollbar { display: none; }
  .dhead .seg button { flex: none; height: 34px; }
  .tab { padding: 12px 14px calc(24px + env(safe-area-inset-bottom, 0px)); overscroll-behavior-y: contain; }
  .hit { grid-template-columns: 52px minmax(0, 1fr) auto; min-height: 60px; }
  .hit > *:nth-child(4) { display: none; }
  .crd { grid-template-columns: 36px minmax(0, 1fr) auto; min-height: 56px; }

  /* ---- bottom bar: the four views, always one thumb away ---- */
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--bg1); border-top: 1px solid var(--line);
  }
  .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: transparent; color: var(--fg2); font: 600 10px/1 var(--sans); position: relative;
  }
  .tabbar button .i { width: 21px; height: 21px; }
  .tabbar button.on { color: var(--fg0); }
  .tabbar button.on .i { stroke: var(--accent); }
  .tabbar button:active { opacity: .55; }
  .tabbar b { position: absolute; top: 4px; left: 50%; margin-left: 4px; font: 600 9px/1 var(--mono); color: var(--fg2); background: var(--bg3); border-radius: 7px; padding: 2px 4px; }
  .tabbar b:empty { display: none; }
  .tabbar button.on b { color: var(--fg0); }

  /* ---- everything that assumes a mouse or a big screen ---- */
  .peek, .tip { display: none !important; }
  .toasts { bottom: calc(var(--tabbar-h) + 8px); left: 8px; right: 8px; }
  .toast { width: auto; }
  .modal .box { width: calc(100vw - 24px); max-height: 80vh; overflow: auto; }
  .lightbox img.main { max-width: 100vw; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* very narrow phones: drop the least load-bearing column rather than let the row squash */
@media (max-width: 360px) {
  .tr { grid-template-columns: 54px auto auto minmax(0, 1fr) auto; }
  .c-main { grid-column: 2 / 6; }
  .sig { grid-column: 5; }
  .c-time { display: none; }
  .c-cond { grid-column: 2; }
  .c-delta { grid-column: 3; }
  .c-up { grid-column: 4; }
  .c-num.ask { grid-column: 5; }
}
