:root {
  --font-display: 'Cabinet Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --bg: #121315;
  --surface: #1a1c1f;
  --surface-2: #222529;
  --border: #2f3338;
  --text: #ecebe6;
  --muted: #9a9c9f;
  --faint: #6c6f73;
  --accent: #e3b341;        /* slab-label gold */
  --accent-ink: #1a1405;
  --pass: #5cc489;
  --warn: #e7a83d;
  --fail: #ef6a5b;
  --info: #6fa8dc;
  --line-outer: #4fd1ff;
  --line-inner: #ff5fa2;

  --r: 10px;
  --space: 16px;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
}
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px;
  background: rgba(18,19,21,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.brand-name span { color: var(--accent); }
.badge {
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted); white-space: nowrap;
}
.badge.local { border-color: rgba(227,179,65,.45); color: var(--accent); }

/* ---------- Steps ---------- */
.steps {
  display: flex; gap: 6px; padding: 14px 20px 0; max-width: 1180px; margin: 0 auto;
  overflow-x: auto;
}
.step {
  flex: 1 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted);
}
.step .num {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; background: var(--surface-2); color: var(--muted);
}
.step.active { color: var(--text); border-color: var(--accent); }
.step.active .num { background: var(--accent); color: var(--accent-ink); }
.step.done .num { background: var(--pass); color: #08140d; }
.step[disabled] { opacity: .45; cursor: not-allowed; }

main { max-width: 1180px; margin: 0 auto; padding: 18px 20px 60px; }
.panel { display: none; }
.panel.active { display: block; }

h1, h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 22px; margin-bottom: 4px; }
h2 { font-size: 18px; margin-bottom: 10px; }
h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.lede { color: var(--muted); margin-bottom: 16px; max-width: 68ch; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px;
}
.card + .card { margin-top: 14px; }

/* ---------- Capture ---------- */
.dropzone {
  border: 1.5px dashed #444a51; border-radius: var(--r);
  min-height: 360px; display: grid; place-items: center; text-align: center;
  padding: 24px; background: var(--surface);
  transition: border-color .15s, background .15s;
}
.dropzone.drag { border-color: var(--accent); background: #1f1d17; }
.dropzone .frame-guide {
  width: 150px; aspect-ratio: 63 / 88; margin: 0 auto 14px;
  border: 2px solid var(--accent); border-radius: 8px; opacity: .8;
  display: grid; place-items: center; color: var(--accent); font-weight: 700; font-size: 13px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: 14px;
}
.btn:hover { border-color: #4a4f56; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .step:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.canvas-wrap {
  position: relative; background: #0c0d0e; border-radius: var(--r);
  border: 1px solid var(--border); overflow: hidden; touch-action: none;
}
.canvas-wrap canvas { display: block; width: 100%; height: auto; cursor: crosshair; }
.canvas-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }

/* ---------- Checks ---------- */
.checks { list-style: none; padding: 0; display: grid; gap: 6px; }
.check {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start;
  padding: 9px 10px; border-radius: 8px; background: var(--surface-2);
}
.check .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.check.pass .dot { background: rgba(92,196,137,.18); color: var(--pass); }
.check.warn .dot { background: rgba(231,168,61,.18); color: var(--warn); }
.check.fail .dot { background: rgba(239,106,91,.18); color: var(--fail); }
.check.info .dot { background: rgba(111,168,220,.18); color: var(--info); }
.check .label { font-weight: 600; font-size: 14px; }
.check .detail { color: var(--muted); font-size: 13px; }
.check .val { font-family: var(--font-mono); font-size: 13px; color: var(--muted); white-space: nowrap; }

.alert {
  padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-top: 10px;
  border: 1px solid; display: none;
}
.alert.show { display: block; }
.alert.fail { border-color: rgba(239,106,91,.5); background: rgba(239,106,91,.08); color: #ffb3a9; }
.alert.warn { border-color: rgba(231,168,61,.5); background: rgba(231,168,61,.08); color: #f5cf8c; }
.alert.pass { border-color: rgba(92,196,137,.5); background: rgba(92,196,137,.08); color: #a6e6c0; }

/* ---------- Centering readout ---------- */
.ratio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ratio {
  background: var(--surface-2); border-radius: 8px; padding: 10px 12px;
}
.ratio .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ratio .v { font-family: var(--font-mono); font-size: 20px; font-weight: 600; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
label.field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.field input, .field select {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 10px; color: var(--text); font-weight: 500; font-size: 14px; width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--accent); outline: none; }

.manual { display: grid; gap: 8px; }
.manual-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 8px; background: var(--surface-2);
}
.manual-row .t { font-weight: 600; font-size: 14px; }
.manual-row .h { font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button {
  border: 0; background: transparent; padding: 6px 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted);
}
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on.pass { background: rgba(92,196,137,.2); color: var(--pass); }
.seg button.on.fail { background: rgba(239,106,91,.2); color: var(--fail); }
.seg button.on.skip { background: #2b2f34; color: var(--text); }
@media (max-width: 560px) { .manual-row { grid-template-columns: 1fr; } }

/* ---------- Report ---------- */
.score {
  display: flex; align-items: center; gap: 16px;
}
.score-ring {
  --p: 0; --c: var(--pass);
  width: 96px; height: 96px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #2a2d31 0);
  display: grid; place-items: center;
}
.score-ring > div {
  width: 76px; height: 76px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 22px; font-weight: 700;
}
.verdict { font-family: var(--font-display); font-weight: 800; font-size: 20px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td.num { font-family: var(--font-mono); }
.pill { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pill.pass { background: rgba(92,196,137,.16); color: var(--pass); }
.pill.warn { background: rgba(231,168,61,.16); color: var(--warn); }
.pill.fail { background: rgba(239,106,91,.16); color: var(--fail); }

.money { font-family: var(--font-mono); font-size: 26px; font-weight: 700; }
.money.pos { color: var(--pass); }
.money.neg { color: var(--fail); }

.fp { font-family: var(--font-mono); font-size: 13px; word-break: break-all; color: var(--accent); }

.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.thumbs figure { background: #0c0d0e; border-radius: 8px; border: 1px solid var(--border); padding: 6px; }
.thumbs figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: center; }

.disclaimer {
  margin-top: 18px; font-size: 12px; color: var(--faint); line-height: 1.6; max-width: 90ch;
}
.disclaimer a { color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.linkbtn{background:none;border:0;color:var(--muted,#9aa0a6);text-decoration:underline;font:inherit;font-size:.85rem;cursor:pointer;padding:.5rem 0;margin-top:.25rem}
.linkbtn:hover{color:var(--accent,#e3b341)}

.pill.info { background: rgba(111,168,220,.16); color: var(--info); }
.alert.info { border-color: rgba(111,168,220,.45); background: rgba(111,168,220,.08); color: #bcd7f0; }
#idStatus .alert { margin-top: 12px; }
.id-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.chip.on { border-color: var(--accent); color: var(--accent); }
.id-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.id-imgs figure { margin: 0; }
.id-imgs img, .id-imgs .noimg { width: 100%; aspect-ratio: 63 / 88; object-fit: contain; background: #0c0d0e; border: 1px solid var(--border); border-radius: 8px; display: block; }
.id-imgs .noimg { display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; color: var(--muted); font-size: 13px; }
.id-imgs figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.kv { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 6px 14px; margin-top: 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.id-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.id-h { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.id-block p { font-size: 14px; color: var(--text); line-height: 1.5; }
#idResult a, #reportId a { color: var(--accent); }
@media (max-width: 560px) {
  .topbar { padding: 10px 14px; }
  .badge.local { white-space: normal; text-align: right; font-size: 11px; max-width: 190px; line-height: 1.3; }
  .steps { padding: 12px 14px 0; }
  .step { flex: 0 0 auto; padding: 8px 10px; font-size: 13px; }
  main { padding: 14px 14px 48px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
body { overflow-x: hidden; }
main, .card { min-width: 0; }
.grid-2 > * { min-width: 0; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
#idResult > p.muted { margin-top: 12px; }

/* =========================================================
   App shell — navigation, home, collection, verify, shop, plans
   ========================================================= */
:root { --side-w: 232px; --tab-h: 68px; --surface-3: #2a2d32; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }
button.brand { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.lg { padding: 12px 20px; font-size: 16px; }
.btn.danger { border-color: rgba(239,106,91,.5); color: var(--fail); background: transparent; }
.btn.danger:hover { background: rgba(239,106,91,.1); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; color: var(--text); }
a.btn.primary { color: var(--accent-ink); }
.btn-row.start { justify-content: flex-start; }
.accent { color: var(--accent); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.note { margin-top: 12px; }

.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100dvh - 57px); }
.views { min-width: 0; padding: 24px 28px 64px; max-width: 1240px; width: 100%; outline: none; }
.view { display: none; animation: viewIn .22s ease-out; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } }
#view-scan .steps { padding: 0; max-width: none; margin: 0 0 18px; }
.scan-main { min-width: 0; }

/* Sidebar (desktop) */
.tabs {
  position: sticky; top: 57px; align-self: start; height: calc(100dvh - 57px);
  display: flex; flex-direction: column; gap: 4px; padding: 20px 12px;
  border-right: 1px solid var(--border); background: var(--bg);
}
.tab {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 10px; border: 1px solid transparent;
  background: none; color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
}
.tab:hover { background: var(--surface); color: var(--text); }
.tab[aria-current="page"] { background: var(--surface); color: var(--text); border-color: var(--border); }
.tab[aria-current="page"] .tab-ic { color: var(--accent); }
.tab-ic { display: grid; place-items: center; }
.tab-scan { margin: 6px 0; background: var(--accent); color: var(--accent-ink); }
.tab-scan:hover, .tab-scan[aria-current="page"] { background: var(--accent); color: var(--accent-ink); filter: brightness(1.06); }
.tab-scan[aria-current="page"] .tab-ic { color: var(--accent-ink); }
.tab:focus-visible, .tool:focus-visible, .mini:focus-visible, .ccard:focus-visible, .chip:focus-visible, .side-link:focus-visible, .linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); }
.side-link { background: none; border: 0; padding: 0; color: var(--text); font-weight: 600; cursor: pointer; font-size: 14px; }
.side-link:hover { color: var(--accent); }
.side-note { color: var(--faint); font-size: 12px; margin-top: 6px; }

/* Bottom tab bar (phones and small tablets) */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .views { padding: 18px 16px calc(var(--tab-h) + 36px); }
  .tabs {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 20; height: auto;
    flex-direction: row; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--border);
    background: rgba(18,19,21,.96); backdrop-filter: blur(10px);
  }
  .tab { flex: 1 1 0; flex-direction: column; gap: 3px; padding: 6px 2px; font-size: 11px; text-align: center; border: 0; min-width: 0; }
  .tab:hover { background: none; }
  .tab[aria-current="page"] { background: none; }
  .tab-l { white-space: nowrap; }
  .tab-scan { margin: -18px 4px 0; padding: 0; background: none; color: var(--text); }
  .tab-scan:hover, .tab-scan[aria-current="page"] { background: none; color: var(--text); filter: none; }
  .tab-scan .tab-ic { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 5px var(--bg), 0 6px 18px rgba(227,179,65,.25); }
  .tab-scan[aria-current="page"] .tab-ic { color: var(--accent-ink); }
  .side-foot { display: none; }
  .toast { bottom: calc(var(--tab-h) + 22px); }
}

/* Page heads */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 28px; }
.page-head .lede { margin-bottom: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 28px 0 12px; }
.section-head h2 { margin: 0; }

/* Home hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: center;
  padding: 32px; border-radius: 16px; border: 1px solid var(--border);
  background: radial-gradient(120% 140% at 100% 0%, rgba(227,179,65,.14), transparent 55%), var(--surface);
}
.hero h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.05; margin-bottom: 12px; }
.hero .lede { font-size: 16px; }
.hero-art { display: grid; place-items: center; }
.slab {
  width: min(220px, 100%); padding: 10px; border-radius: 14px;
  background: linear-gradient(160deg, #2c3035, #1b1d20); border: 1px solid #3a3f45;
  box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  transform: rotate(-4deg);
}
.slab-label { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.slab-label b { font-size: 10px; letter-spacing: 0; }
.slab-card { position: relative; margin-top: 8px; aspect-ratio: 63/88; border-radius: 8px; background: linear-gradient(150deg, #3b3220, #c99a2e 45%, #f1d27a 55%, #6f5520); padding: 9%; }
.slab-inner { width: 100%; height: 100%; border-radius: 4px; background: linear-gradient(180deg, #1d2a33, #0f1418); }
.slab-card .ln { position: absolute; background: var(--line-inner); opacity: .85; }
.slab-card .l1, .slab-card .l2 { top: 0; bottom: 0; width: 2px; }
.slab-card .l1 { left: 9%; } .slab-card .l2 { right: 9%; }
.slab-card .l3, .slab-card .l4 { left: 0; right: 0; height: 2px; }
.slab-card .l3 { top: 6.5%; } .slab-card .l4 { bottom: 6.5%; }

/* How it works */
.how { margin-top: 16px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.how[hidden] { display: none; }
.how-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.how-head h2 { margin: 0; }
.how-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.how-steps li { display: flex; gap: 12px; }
.how-steps b { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-size: 13px; }
.how-steps strong { display: block; font-size: 15px; }
.how-steps span { color: var(--muted); font-size: 13px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.stat { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat .v { font-size: 24px; font-weight: 700; margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat .h { font-size: 12px; color: var(--faint); }

/* Recent + mini cards */
.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mini { display: flex; gap: 12px; align-items: stretch; text-align: left; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: inherit; cursor: pointer; min-width: 0; transition: border-color .15s, transform .15s; }
.mini:hover, .ccard:hover, .tool:hover { border-color: #4a4f56; transform: translateY(-1px); }
.mini-img { flex: 0 0 64px; aspect-ratio: 63/88; border-radius: 6px; overflow: hidden; background: #0c0d0e; }
.mini-img img { width: 100%; height: 100%; object-fit: cover; }
.mini-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-body strong, .ccard-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Empty state */
.empty { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px; border-radius: 12px; border: 1px dashed var(--border); background: var(--surface); grid-column: 1 / -1; }
.empty > div:not(.empty-art) { flex: 1 1 220px; }
.empty-art { width: 46px; height: 64px; border-radius: 6px; border: 2px dashed #4a4f56; flex: 0 0 auto; }

/* Tools grid */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: inherit; cursor: pointer; transition: border-color .15s, transform .15s; min-width: 0; }
.tool-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); margin-bottom: 6px; }
.tool span:last-child { color: var(--muted); font-size: 13px; }

/* Collection */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 0; outline: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.field.inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.field.inline select { width: auto; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.ccard { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: inherit; cursor: pointer; transition: border-color .15s, transform .15s; min-width: 0; }
.ccard-img { position: relative; aspect-ratio: 63/88; background: #0c0d0e; }
.ccard-img img { width: 100%; height: 100%; object-fit: cover; }
.ccard-img .pill { position: absolute; left: 8px; top: 8px; backdrop-filter: blur(6px); background: rgba(12,13,14,.75); }
.ccard-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; min-width: 0; }
.ccard-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }

/* Verify */
.lookup { display: flex; gap: 8px; margin-top: 12px; }
.lookup input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); text-transform: uppercase; letter-spacing: .04em; }
.lookup input:focus { border-color: var(--accent); outline: none; }
#regResult { margin-top: 12px; }
#regResult .alert { display: block; }
.reg-hit { display: flex; gap: 14px; padding: 12px; border-radius: 12px; border: 1px solid rgba(92,196,137,.45); background: rgba(92,196,137,.06); }
.reg-hit .pill { display: inline-block; margin-bottom: 4px; }
.reg-img { flex: 0 0 72px; aspect-ratio: 63/88; border-radius: 6px; overflow: hidden; background: #0c0d0e; }
.reg-img img { width: 100%; height: 100%; object-fit: cover; }
.progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 4px 0 12px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.pill:not(.pass):not(.warn):not(.fail):not(.info) { background: var(--surface-2); color: var(--muted); }
.checklist { list-style: none; padding: 0; display: grid; gap: 6px; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; }
.checklist label:hover { border-color: #4a4f56; }
.checklist input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checklist .box { flex: 0 0 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 2px solid #4a4f56; display: grid; place-items: center; }
.checklist input:checked + .box { background: var(--pass); border-color: var(--pass); }
.checklist input:checked + .box::after { content: ''; width: 9px; height: 5px; border: 2px solid #08140d; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.checklist input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.checklist strong { display: block; font-size: 14px; }
.checklist .muted { display: block; }
.checklist input:checked ~ span strong { color: var(--muted); }

/* Shop */
.promise { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.promise > div { padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); border-top: 3px solid var(--accent); }
.promise strong, .plain strong { display: block; }
.promise span, .plain span { color: var(--muted); font-size: 13px; }
.plain { list-style: none; padding: 0; display: grid; gap: 12px; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.plan h2 { margin: 0; }
.plan.best { border-color: var(--accent); background: radial-gradient(120% 80% at 100% 0%, rgba(227,179,65,.12), transparent 60%), var(--surface); }
.plan .tag { position: absolute; top: -11px; left: 20px; padding: 2px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; }
.price b { font-family: var(--font-display); font-size: 32px; }
.price span { color: var(--muted); font-size: 13px; margin-left: 4px; }
.plan ul { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 14px; flex: 1; }
.plan li::before { content: '✓'; color: var(--pass); font-weight: 800; margin-right: 8px; }
.plan .btn { width: 100%; justify-content: center; }

/* Dialog + toast */
.dialog { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.dialog[hidden] { display: none; }
.dlg-box { position: relative; width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.dlg-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.dlg-box h2 { padding-right: 40px; margin-bottom: 2px; }
body.noscroll { overflow: hidden; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 1100px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .hero-art { display: none; }
  .how-steps, .promise { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head h1 { font-size: 24px; }
}
@media (max-width: 560px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .tools { grid-template-columns: minmax(0, 1fr); }
  .col-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero .btn-row .btn { flex: 1 1 auto; justify-content: center; }
  .badge.local { display: none; }
  .views { padding-left: 14px; padding-right: 14px; }
}

/* Account, verification, scam report */
.span-2 { grid-column: 1 / -1; }
.field textarea { width: 100%; margin-top: 4px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; resize: vertical; background: var(--surface-2); }
.field textarea:focus { border-color: var(--accent); outline: none; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.45; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; }
.agree input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; flex: 0 0 auto; }
#acctBtn { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#acctBtn.verified { border-color: var(--pass); color: var(--pass); }
.profile { display: flex; gap: 14px; align-items: center; }
.avatar { flex: 0 0 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 20px; }
.profile-body { min-width: 0; }
.profile-body h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 2px; overflow-wrap: anywhere; }
.vsteps { list-style: none; padding: 0; display: grid; gap: 8px; }
.vstep { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); }
.vstep > div strong { display: block; font-size: 14px; }
.vstep > div span { display: block; overflow-wrap: anywhere; }
.vnum { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: 13px; }
.vstep.done { border-color: rgba(92,196,137,.35); }
.vstep.done .vnum { background: var(--pass); color: #08140d; }
.next-steps { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.next-steps strong, .next-steps span { display: block; }
.next-steps a { color: var(--accent); }
#scamCard { margin-top: 0; }
@media (max-width: 560px) {
  .vstep { grid-template-columns: 30px minmax(0, 1fr); }
  .vstep > :last-child { grid-column: 2; justify-self: start; }
  #acctBtn { max-width: 110px; }
}
#regResult a.btn:not(.primary) { color: var(--text); }

/* Navigation polish */
.tab { position: relative; }
.tab-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); color: var(--text); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; font-family: var(--font-mono); }
.tab-badge[hidden] { display: none; }
.tab[aria-current="page"] .tab-badge { background: var(--accent); color: var(--accent-ink); }
.views h1:focus { outline: none; }
.views h1:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.jump { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 16px; position: sticky; top: 57px; z-index: 5; padding: 8px 0; background: var(--bg); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--text); }
#regCard, #tradeCard, #scamCard, #sealedCard { scroll-margin-top: 120px; }
.nudge { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(227,179,65,.4); background: linear-gradient(90deg, rgba(227,179,65,.1), transparent 70%), var(--surface); }
.nudge-ic { flex: 0 0 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(227,179,65,.15); color: var(--accent); }
.nudge-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nudge-body .progress { margin: 6px 0 0; max-width: 260px; }
@media (max-width: 900px) {
  .tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; background: var(--accent); color: var(--accent-ink); }
  .tab:not(.tab-scan)[aria-current="page"]::before { content: ''; position: absolute; top: -6px; left: 50%; width: 22px; height: 3px; margin-left: -11px; border-radius: 0 0 3px 3px; background: var(--accent); }
  .tab[aria-current="page"] { color: var(--text); }
  .tab:not(.tab-scan)[aria-current="page"] .tab-ic { color: var(--accent); }
}
@media (max-width: 560px) {
  .nudge { flex-wrap: wrap; }
  .nudge .btn { width: 100%; justify-content: center; }
  .jump { overflow-x: auto; flex-wrap: nowrap; }
  .jump .chip { flex: 0 0 auto; }
}
/* Card check (shared: card dialog) */
.ccheck { margin-top: 16px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); }
.ccheck.ok { border-color: var(--pass); }
.ccheck-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.ccheck-list li { display: flex; gap: 8px; align-items: flex-start; }
.ccheck-list li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.ccheck-ic { flex: 0 0 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--warn); color: #1a1a1a; }
.ccheck-list li.ok .ccheck-ic { background: var(--pass); }
.ccheck p { margin: 0; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: '–'; color: var(--muted); }
.ar-alts { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ar-alts .btn { padding: .3rem .7rem; font-size: .85rem; }
.auth-card { max-width: 420px; }
.auth-form { display: grid; gap: 10px; margin-top: 10px; }
.auth-form .btn { justify-self: start; }
.auth-switch { margin-top: 12px; }
html, body { overscroll-behavior-y: contain; }
/* Pick your printing by picture */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin: 12px 0; max-height: 560px; overflow-y: auto; padding: 2px; }
.pick-card { font: inherit; display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); cursor: pointer; text-align: center; font-size: 12px; line-height: 1.3; min-width: 0; }
.pick-card img { width: 100%; aspect-ratio: 63 / 88; object-fit: contain; border-radius: 6px; background: var(--surface); }
.pick-card .noimg { aspect-ratio: 63 / 88; display: grid; place-items: center; font-size: 11px; }
.pick-card small { color: var(--text-muted, inherit); opacity: .8; overflow-wrap: anywhere; }
.pick-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pick-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
