/* $PAWOUT · 01 Midnight Pay Clerk. A deadpan overnight cashier: midnight shop, chalk paper, till-green register.
   Palette: Midnight #121713 · Chalk #F4F0E5 · Till Green #B8ED82 · Receipt Gray #AAB3A5 · Counter Brown #77583F */
:root {
  --midnight: #121713; --chalk: #F4F0E5; --till: #B8ED82; --receipt: #AAB3A5; --counter: #77583F;
  --bg: var(--midnight); --surface: #182019; --surface-2: #212b22;
  --border: rgba(244, 240, 229, .10); --border-2: rgba(244, 240, 229, .20);
  --text: var(--chalk); --text-2: var(--receipt); --text-3: #858f81;
  --accent: var(--till); --on-accent: var(--midnight); --accent-text: var(--till);
  --wood: var(--counter); --wood-dark: #5B4331;
  /* paper: console, receipts, tickets. Stays paper in both modes. */
  --paper: var(--chalk); --paper-2: #E9E4D6; --ink: var(--midnight); --ink-2: #4A5348; --ink-3: #697265;
  --rule: rgba(18, 23, 19, .14); --rule-2: rgba(18, 23, 19, .26);
  --stamp: #B24A3B;
  /* scene */
  --scene-wall: #1c251e; --scene-line: #2d3a2f; --scene-ink: var(--midnight); --scene-ink2: #8d9789;
  --scene-glow: var(--chalk); --scene-jar: rgba(244, 240, 229, .06); --cat: #070a08;
  --m-cat: var(--chalk); --m-screen: var(--till); --m-counter: var(--counter); --m-lip: #5B4331; --m-paper: var(--chalk);
  --shadow: 0 16px 40px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .35);
  --radius: 14px; --radius-sm: 10px;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Bricolage Grotesque", "IBM Plex Sans", ui-sans-serif, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px; /* sticky top bar */
  --sticky-h: 76px; /* mobile sticky Run bar: 12 + 52 + 12 */
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: var(--chalk); --surface: #FBF8F0; --surface-2: #E9E4D6;
    --border: rgba(18, 23, 19, .12); --border-2: rgba(18, 23, 19, .24);
    --text: var(--midnight); --text-2: #4A5348; --text-3: #626b5f;
    --accent-text: #3E6B14;
    --paper: #FFFDF7; --paper-2: #F1ECDF;
    --scene-wall: #E3DCCB; --scene-line: #CFC6B1; --scene-ink2: #6f6656; --scene-glow: #FFFDF7; --scene-jar: rgba(255, 253, 247, .5); --cat: var(--midnight);
    --m-cat: var(--midnight); --m-paper: #FFFDF7;
    --shadow: 0 14px 36px rgba(18, 23, 19, .16), 0 2px 6px rgba(18, 23, 19, .08);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
/* No scroll-behavior: smooth here: in-page links animate from app.js, so reloads and captures never land mid-scroll. */
html { scroll-padding-top: calc(var(--header-h) + 12px);scrollbar-color: var(--surface-2) var(--bg); scrollbar-width: thin; }
body { font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 8px; border: 2px solid var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
p, h1, h2, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; box-shadow: 0 0 0 5px var(--midnight); }
::selection { background: var(--till); color: var(--midnight); }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.i { width: 16px; height: 16px; flex: none; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.mark { width: 34px; height: 30px; flex: none; }
.wordmark { font: 800 24px/1 var(--display); letter-spacing: -.035em; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border-2); background: transparent; font: 600 14px/1 var(--sans); cursor: pointer; white-space: nowrap; transition: background .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease), color .15s; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.outline:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn.ghost { border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 700; }
.btn.primary:hover { background: #c6f498; }
.btn.primary.pressed { transform: translateY(1px) scale(.985); background: #a3dc6c; }
.btn.lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn.sm { height: 40px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 44px; padding: 0; }
.btn.link { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-2); }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- Top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top-in { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
@media (max-width: 400px) { .top .wordmark { font-size: 21px; } .top .mark { width: 30px; height: 26px; } .launch { padding: 0 12px; } }
@media (min-width: 880px) { .top-in { gap: 32px; } }
.top-nav { display: none; gap: 24px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.top-nav a:hover { color: var(--text); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.launch { gap: 8px; border-radius: 999px; padding: 0 14px; }
.launch > span { display: inline-flex; align-items: center; gap: 8px; }
.connect { border-radius: 999px; padding: 0 14px; }
.connect.is-on { font-family: var(--mono); font-weight: 500; }
.connect.is-on .i { color: var(--accent-text); }
@media (max-width: 480px) { .connect { width: 40px; padding: 0; } .connect [data-connect-label] { display: none; } }
/* Phones: with Connect and Buy both up, the X icon steps aside (Follow on X is right in the hero). */
@media (max-width: 420px) { .top-actions:has(.connect:not([hidden])) > [data-coin-link="x"] { display: none; } }
@media (min-width: 880px) { .top-nav { display: flex; } }

/* ---------- Hero ---------- */
.hero { display: grid; gap: 28px; padding-top: 32px; padding-bottom: 56px; grid-template-areas: "copy" "console" "rest"; }
.hero-copy { grid-area: copy; }
.hero-rest { grid-area: rest; display: grid; gap: 20px; align-content: start; }
.console { grid-area: console; }
.tag-live { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
h1 { margin-top: 16px; font: 800 clamp(44px, 12.4vw, 84px)/.94 var(--display); letter-spacing: -.035em; text-wrap: balance; max-width: 11ch; }
.tag-live[hidden] + h1 { margin-top: 0; }
.lede { margin-top: 20px; max-width: 34em; font-size: 17px; color: var(--text-2); }
.shorthand { margin-top: 16px; font-weight: 700; font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chain-chip { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.tile { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--text); color: var(--bg); font: 700 9px/1 var(--mono); letter-spacing: .02em; }
.tile.has-logo, .chain-chip.on-wood .tile.has-logo { background: transparent; overflow: hidden; }
.tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile-sm { width: 18px; height: 18px; border-radius: 5px; font-size: 8px; background: var(--ink); color: var(--paper); flex: none; }
.chain-chip .chip-sep { margin: 0 -2px; opacity: .6; }
.scene { width: 100%; max-width: 560px; }
.scene svg { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.scene-mono { font-family: var(--mono); font-weight: 500; }
.scene-bold { font-weight: 600; }
.scene-receipt { transform-box: fill-box; transform-origin: 50% 0; }
.scene-receipt.print { animation: print .6s var(--ease); }
@keyframes print { from { transform: scaleY(.25); } to { transform: none; } }

@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) 460px; grid-template-areas: "copy console" "rest console"; column-gap: 56px; row-gap: 28px; padding-top: 56px; padding-bottom: 88px; align-items: start; }
  .lede { font-size: 19px; }
  .shorthand { font-size: 19px; }
}

/* ---------- Paper (console, receipts, tickets) ---------- */
.paper { background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius); --m-cat: var(--midnight); --m-paper: #fff; }
.paper :focus-visible { box-shadow: 0 0 0 5px var(--midnight); }

/* ---------- Payday Console ---------- */
.console { position: relative; padding: 20px; }
.c-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; }
.c-title { font: 800 22px/1.1 var(--display); letter-spacing: -.03em; }
.c-mark { width: 44px; height: 38px; transition: transform .2s var(--ease); }
.c-mark.reach { transform: translateY(-3px) rotate(-3deg); }
.c-block { padding: 16px 0; border-top: 1px dashed var(--rule-2); display: grid; gap: 10px; }
.c-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.c-label { font: 600 13px/1.3 var(--sans); }
.c-muted { font-weight: 400; color: var(--ink-3); }
.c-fine { font-size: 12px; line-height: 1.4; color: var(--ink-3); }
.c-row .c-fine { text-align: right; }
.console .mono.c-fine { font-family: var(--mono); }

.clock { display: flex; align-items: center; font: 600 clamp(46px, 14vw, 60px)/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--ink); }
.dg { position: relative; display: inline-block; width: .6em; height: 1.08em; overflow: hidden; text-align: center; }
.dg > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.dg .in { animation: roll-in .24s var(--ease) both; }
.dg .out { animation: roll-out .24s var(--ease) both; }
.colon { display: inline-block; width: .42em; text-align: center; color: var(--ink-3); transform: translateY(-.04em); }
@keyframes roll-in { from { transform: translateY(-70%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes roll-out { from { transform: none; opacity: 1; } to { transform: translateY(70%); opacity: 0; } }

.pill { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 12px; border-radius: 8px; background: color-mix(in srgb, var(--till) 55%, var(--paper)); color: var(--ink); font: 600 11px/1.3 var(--mono); letter-spacing: .06em; }
.pill .dot { background: var(--ink); animation: blink 2s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.tally { display: grid; gap: 2px; font-size: 13px; color: var(--ink-2); }
.tally b { color: var(--ink); font-weight: 600; font-size: 15px; }
.tally-total { display: flex; align-items: center; gap: 8px; }
.tally-usd { color: var(--ink-3); }
.tally[data-state="loading"] b { color: transparent; border-radius: 6px; background: linear-gradient(90deg, var(--paper-2) 30%, #fff 50%, var(--paper-2) 70%) 0 0 / 200% 100%; animation: shimmer .8s linear infinite; }
.tally[data-state="loading"] [data-last] { visibility: hidden; }
.pill.is-closed { background: var(--paper-2); border: 1px solid var(--rule-2); }

.field { display: grid; gap: 6px; }
.field-label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field-label em { font-style: normal; color: var(--ink-3); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg button { height: 44px; border-radius: 8px; border: 1px solid var(--rule-2); background: var(--paper); font: 500 14px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease); }
.seg button:hover { background: var(--paper-2); }
.seg button[aria-checked="true"] { background: var(--accent); border-color: color-mix(in srgb, var(--till) 60%, var(--midnight)); font-weight: 600; }
.price-chip { justify-self: start; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
.price-chip b { color: var(--ink); font-weight: 600; }
.price-src { padding: 1px 6px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.price-chip.is-live .price-src { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.price-chip.is-live .price-src::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px rgba(18, 23, 19, .35); }

/* Console tabs: What-if | Check a wallet */
.c-tabs { padding: 16px 0 4px; border-top: 1px dashed var(--rule-2); }
.seg-2 { grid-template-columns: repeat(2, 1fr); }
.seg button[aria-selected="true"] { background: var(--accent); border-color: color-mix(in srgb, var(--till) 60%, var(--midnight)); font-weight: 600; }
.c-tabs button { font-family: var(--sans); font-size: 14px; }
.c-tabs + .c-block, [data-panel] > .c-block:first-child { border-top: 0; }

/* Wallet check */
.w-form { display: grid; gap: 6px; }
.w-row { display: flex; gap: 8px; }
.w-input { flex: 1; min-width: 0; height: 48px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 14px; }
.w-input::placeholder { color: var(--ink-3); }
.w-input:hover { border-color: var(--ink-3); }
.w-input:focus-visible { outline: 2px solid var(--midnight); outline-offset: 1px; box-shadow: none; }
.w-input:disabled { background: var(--paper-2); cursor: not-allowed; }
.wallet[data-wstate="invalid"] .w-input { border-color: var(--stamp); }
.w-go { height: 48px; min-width: 88px; }
.w-help { font-size: 12px; line-height: 1.4; color: var(--ink-3); min-height: 17px; }
.w-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.w-sub .btn { flex: none; min-height: 44px; }
.console .w-sub .btn.is-on { color: var(--ink-3); }
.w-hist { display: grid; gap: 6px; }
.w-hist ol { display: grid; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.w-hist li { display: grid; grid-template-columns: 4.5em 1fr auto auto; align-items: center; gap: 8px; min-height: 40px; padding: 4px 6px 4px 12px; font-size: 13px; border-top: 1px solid var(--rule); }
.w-hist li:first-child { border-top: 0; }
.w-hist .h-d { font-family: var(--mono); color: var(--ink-3); }
.w-hist .h-v { font-weight: 600; }
.w-hist .h-v small { font-weight: 500; font-size: 11px; color: var(--ink-3); }
.w-hist .badge { margin: 0; }
.wallet[data-wstate="invalid"] .w-help { color: var(--stamp); font-weight: 500; }
.w-out:empty { display: none; }
.w-out { display: grid; gap: 10px; }
.w-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.w-num { font-size: clamp(32px, 9vw, 38px); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.w-num small { font-size: .55em; font-weight: 500; }
.w-addr { font: 500 12px/1.3 var(--mono); color: var(--ink-3); text-align: right; }
.w-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.w-stats div { padding: 10px 12px; background: var(--paper); display: grid; gap: 2px; min-width: 0; }
.w-stats dt { font-size: 11px; color: var(--ink-3); }
.w-stats dd { font: 600 15px/1.25 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-stats dd small { font-weight: 500; font-size: 11px; color: var(--ink-3); }
.w-note { font-size: 12px; line-height: 1.45; color: var(--ink-2); padding: 8px 10px; background: var(--paper-2); border-radius: 8px; }
.w-msg { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 12px; border: 1px dashed var(--rule-2); border-radius: 10px; }
.w-msg .mark { width: 38px; height: 34px; grid-row: span 2; }
.w-msg-t { font: 800 18px/1.15 var(--display); letter-spacing: -.03em; }
.w-msg-s { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.w-msg-s b { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.w-skel { display: grid; gap: 10px; }
.w-skel span { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--paper-2) 30%, #fff 50%, var(--paper-2) 70%) 0 0 / 200% 100%; animation: shimmer .8s linear infinite; }
.w-skel span:first-child { height: 38px; width: 55%; }
.w-skel span:nth-child(2) { height: 96px; }
.w-res.grow .w-num, .w-res.grow .w-stats { animation: pop .25s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .w-skel span { animation: none; } }
.run { width: 100%; margin-top: 4px; }

.out-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.out-num { font-size: clamp(32px, 9vw, 38px); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.out-num small { font-size: .55em; font-weight: 500; }
.out[data-state="done"] .out-num { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--till) 80%, transparent) 62% 92%, transparent 92%); display: inline; -webkit-box-decoration-break: clone; }
.out-more { display: grid; gap: 4px; text-align: right; }
.out-more div { display: flex; align-items: baseline; justify-content: flex-end; gap: 10px; }
.out-more dd { font-size: 15px; font-weight: 600; min-width: 6.5em; }
.out.grow .out-num, .out.grow .out-more dd { animation: pop .25s var(--ease) both; }
.out[data-state="idle"] .out-more dd { color: var(--ink-3); }
.out-break { font-size: 12px; color: var(--ink-2); line-height: 1.5; padding: 8px 10px; background: var(--paper-2); border-radius: 8px; overflow-wrap: anywhere; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* skeleton */
.out[data-state="loading"] .out-num, .out[data-state="loading"] .out-more dd, .out[data-state="loading"] [data-out-usd] { color: transparent; border-radius: 6px; background: linear-gradient(90deg, var(--paper-2) 30%, #fff 50%, var(--paper-2) 70%) 0 0 / 200% 100%; animation: shimmer .8s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.c-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; padding-top: 12px; border-top: 1px dashed var(--rule-2); }
.console .btn.ghost { color: var(--ink-2); padding: 0 8px; }
.console .btn.ghost:hover { color: var(--ink); background: var(--paper-2); }
.pop-wrap { position: relative; }
.pop { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; width: min(290px, calc(100vw - 48px)); padding: 14px; border-radius: 12px; background: var(--midnight); color: var(--chalk); box-shadow: var(--shadow); display: grid; gap: 4px; font-size: 13px; line-height: 1.45; animation: pop .18s var(--ease); }
.pop span { color: var(--receipt); }

.coin { position: absolute; z-index: 4; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); border: 2px solid var(--midnight); pointer-events: none; }

@media (min-width: 720px) { .console { padding: 24px; } }

/* ---------- Coin block: the counter ---------- */
.coin-block { background: var(--wood); color: var(--chalk); border-top: 8px solid var(--wood-dark); --m-cat: var(--midnight); --m-counter: var(--wood-dark); --m-lip: #3f2e21; }
.coin-in { display: grid; gap: 20px; padding-top: 28px; padding-bottom: 28px; align-items: center; }
.coin-id { display: flex; align-items: center; gap: 14px; }
.coin-mark { width: 52px; height: 46px; }
.coin-name { font-size: 15px; }
.coin-name b { font: 800 22px/1.1 var(--display); letter-spacing: -.03em; margin-right: 4px; }
.chain-chip.on-wood { color: color-mix(in srgb, var(--chalk) 82%, var(--wood)); font-size: 13px; margin-top: 4px; }
.chain-chip.on-wood .tile { background: var(--chalk); color: var(--wood); }
.coin-h { font: 600 13px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.ca { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 6px 6px 14px; border-radius: 12px; background: rgba(18, 23, 19, .28); border: 1px solid rgba(244, 240, 229, .16); }
.ca .k { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--chalk) 70%, var(--wood)); }
.ca code { flex: 1; min-width: 0; font: 600 15px/1.2 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca code.is-ca { cursor: pointer; }
.ca code.is-ca.full { white-space: normal; overflow-wrap: anywhere; font-size: 13px; }
.coin-block .btn.outline { border-color: rgba(244, 240, 229, .4); color: var(--chalk); }
.coin-block .btn.outline:hover { background: rgba(18, 23, 19, .22); border-color: var(--chalk); }
.coin-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
@media (min-width: 960px) {
  .coin-in { grid-template-columns: auto minmax(0, 1fr) auto; gap: 40px; }
}

/* ---------- Stamps ---------- */
.stamp { display: inline-block; padding: 6px 12px; border: 2.5px solid var(--stamp); border-radius: 6px; color: var(--stamp); font: 600 16px/1.15 var(--mono); letter-spacing: .12em; text-transform: uppercase; transform: rotate(-6deg); box-shadow: inset 0 0 0 2px transparent, inset 0 0 0 3.5px color-mix(in srgb, var(--stamp) 55%, transparent); opacity: .92; white-space: nowrap; }
.stamp-sm { font-size: 12px; padding: 4px 9px; border-width: 2px; }
.stamp-lg { font-size: 20px; padding: 10px 16px; text-align: center; white-space: normal; }
.coin-block .stamp { color: var(--chalk); border-color: var(--chalk); box-shadow: inset 0 0 0 3.5px rgba(244, 240, 229, .4); }

/* ---------- Sections ---------- */
.sec { padding-top: 72px; padding-bottom: 8px; }
.sec-head { display: grid; gap: 8px; margin-bottom: 28px; }
.sec-head.row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.kicker { font: 600 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
h2 { font: 800 clamp(30px, 7.4vw, 48px)/1 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.sec-note { margin-top: 24px; max-width: 40em; font-size: 15px; color: var(--text-2); }
@media (min-width: 960px) { .sec { padding-top: 104px; } }

/* How it works */
.how { display: grid; gap: 40px; }
.flow { display: grid; gap: 12px; counter-reset: s; }
.step { display: flex; align-items: center; gap: 20px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.diagram { width: 108px; height: 65px; flex: none; color: var(--text); }
.step-n { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.step-t { font: 800 22px/1.15 var(--display); letter-spacing: -.03em; margin-top: 4px; }
.receipt-col { display: grid; justify-items: center; gap: 12px; align-content: start; }

/* The till: the dev wallet, live */
.till { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); overflow: hidden; }
.till-stat { display: grid; gap: 4px; align-content: start; padding: 18px 16px; background: var(--paper); min-width: 0; }
.till-k { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.till-v { font-size: clamp(24px, 6.4vw, 34px); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.till-v small { font-size: .5em; font-weight: 500; color: var(--ink-3); }
.till-s { font-size: 12px; line-height: 1.4; color: var(--ink-2); }
.till-addr code { font: 500 13px/1 var(--mono); }
.inline-link { display: inline-flex; align-items: center; gap: 2px; color: var(--text); text-decoration: underline; text-decoration-color: var(--border-2); text-underline-offset: 3px; white-space: nowrap; }
.inline-link .i { width: 14px; height: 14px; }
@media (min-width: 960px) { .till { grid-template-columns: repeat(4, minmax(0, 1fr)); } .till-stat { padding: 22px 20px; } }
@media (min-width: 960px) {
  .how { grid-template-columns: minmax(0, 1fr) 360px; gap: 64px; align-items: start; }
}

/* Receipt (zig-zag paper) */
.receipt { position: relative; width: min(100%, 340px); padding: 30px 24px 34px; background: var(--paper); color: var(--ink); font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13px; line-height: 1.55;
  --z: 8px;
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--z)) 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--z)) 51% repeat-x;
  mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--z)) 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--z)) 51% repeat-x;
}
.receipt.reprint { animation: reprint .35s var(--ease); }
@keyframes reprint { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.r-logo { font: 800 40px/1 var(--display); letter-spacing: -.035em; text-align: center; }
.r-sub { text-align: center; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.r-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin: 16px 0 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--rule-2); }
.r-lines div, .r-days div { display: flex; justify-content: space-between; gap: 12px; }
.r-lines dd, .r-days dd { text-align: right; }
.r-stamp { display: table; margin: 14px auto 10px; font-size: 22px; }
.r-big { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.r-usd { color: var(--ink-2); font-size: 12px; margin-bottom: 12px; }
.r-days { padding: 10px 0; border-top: 1px dashed var(--rule-2); border-bottom: 1px dashed var(--rule-2); font-weight: 600; }
.r-foot { margin-top: 16px; text-align: center; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

/* Live board: tonight's split, from /api/live */
.sec-sub { max-width: 44em; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.sub-head { margin: 40px 0 16px; font: 700 18px/1.2 var(--display); letter-spacing: -.01em; }
.live { display: grid; gap: 16px; }
.live-stats { border-radius: var(--radius); }
@media (min-width: 960px) { .live-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 959px) { .live-stats .till-stat:first-child { grid-column: 1 / -1; } }
.live .table-wrap, .live [data-live-scanning], .live [data-live-error] { display: none; }
.live[data-view="rows"] .table-wrap, .live[data-view="loading"] .table-wrap { display: block; }
.live[data-view="scanning"] [data-live-scanning], .live[data-view="error"] [data-live-error] { display: grid; }
.live[data-view="scanning"] .live-stats, .live[data-view="error"] .live-stats { display: none; }
.live-table td.rank { position: sticky; left: 0; z-index: 1; background: var(--paper); color: var(--ink-3); width: 1%; }
.live-table th:first-child { width: 1%; }
.live-table a.w { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.live-table a.w:hover { text-decoration-color: var(--ink-3); }
.live-table td.hype { color: var(--ink); font-weight: 600; }
.live-table tr.you td { background: var(--paper-2); }
.live-table tr.you td.rank { background: var(--paper-2); }
.live-table .you-tag { margin-left: 8px; }
.live-table tr.gap td { padding: 4px 12px; color: var(--ink-3); text-align: center; border-bottom: 0; }
.test-banner { margin: 0; padding: 10px 20px; background: var(--stamp); color: #fff; font-size: 14px; line-height: 1.4; text-align: center; }
.test-banner[hidden] { display: none; }

/* Receipts wall */
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; border: 0; background: none; font-size: 14px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.switch-track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-2); transition: background .18s var(--ease); }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .18s var(--ease), background .18s; }
.switch[aria-checked="true"] { color: var(--text); }
.switch[aria-checked="true"] .switch-track { background: var(--accent); border-color: transparent; }
.switch[aria-checked="true"] .switch-knob { transform: translateX(18px); background: var(--midnight); }
.roll { overflow: hidden; }
.table-wrap { display: none; overflow-x: auto; }
.receipts[data-view="rows"] .table-wrap, .receipts[data-view="demo"] .table-wrap, .receipts[data-view="loading"] .table-wrap { display: block; }
.receipts:not([data-view="empty"]) [data-empty], .receipts:not([data-view="error"]) [data-rerror] { display: none; }
.receipts:not([data-view="rows"]) .r-foot { display: none; }
.switch[hidden] { display: none; }
.rtable { width: 100%; border-collapse: collapse; font: 400 13px/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.rtable th { text-align: left; padding: 14px 12px; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px dashed var(--rule-2); white-space: nowrap; }
.rtable td { padding: 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.rtable tr:last-child td { border-bottom: 0; }
.rtable .num { text-align: right; }
.rtable tbody tr { animation: pop .22s var(--ease) both; }
.rtable .s { margin-left: 8px; padding: 2px 5px; border: 1.5px solid var(--stamp); border-radius: 4px; color: var(--stamp); font-size: 9px; font-weight: 600; letter-spacing: .08em; vertical-align: 1px; }
.tx { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 0 6px; border: 0; border-radius: 6px; background: none; font: 500 13px/1 var(--mono); color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.tx:hover { background: var(--paper-2); color: var(--ink); }
.tx .i { width: 12px; height: 12px; }
a.tx { text-decoration-color: var(--ink-3); }
.tx-more { font-size: 11px; color: var(--ink-3); }
/* Date column stays put while the table scrolls sideways on phones. */
.rtable th:first-child, .rtable td.date { position: sticky; left: 0; z-index: 1; background: var(--paper); }
.badge { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 2px 7px; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font: 600 10px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; cursor: default; }
.badge.verified::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px rgba(18, 23, 19, .35); }
.badge.skipped { background: transparent; border-style: dashed; }
.rtable td.reason { max-width: 30ch; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); }
.rtable tr.skel td span { display: inline-block; width: 64px; height: 12px; border-radius: 4px; vertical-align: middle; background: linear-gradient(90deg, var(--paper-2) 30%, #fff 50%, var(--paper-2) 70%) 0 0 / 200% 100%; animation: shimmer .8s linear infinite; }
.rtable tr.skel td:first-child span { width: 88px; }
.r-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px; border-top: 1px dashed var(--rule-2); }
.r-legend { font-size: 12px; color: var(--ink-3); }
.r-legend .badge { margin: 0 4px 0 0; }
.r-legend .badge + .badge { margin-left: 10px; }
.r-foot .btn.ghost { color: var(--ink-2); }
.r-foot .btn.ghost:hover { color: var(--ink); background: var(--paper-2); }
@media (min-width: 640px) { .r-foot { padding: 12px 20px; } }
@media (prefers-reduced-motion: reduce) { .rtable tr.skel td span { animation: none; } }
.long { display: none; }
@media (min-width: 640px) { .long { display: inline; } .rtable { font-size: 14px; } .rtable th, .rtable td { padding-left: 20px; padding-right: 20px; } }
@media (max-width: 400px) { .rtable th, .rtable td { padding-left: 8px; padding-right: 8px; } .rtable .s { display: block; margin: 4px 0 0; width: max-content; } }

.empty { position: relative; display: grid; justify-items: center; text-align: center; gap: 8px; padding: 48px 20px 44px; }
.empty-stack { position: absolute; inset: 0; pointer-events: none; }
.empty-stack span { position: absolute; top: 24px; width: 120px; height: 150px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; }
.empty-stack span:first-child { left: 8%; transform: rotate(-7deg); }
.empty-stack span:last-child { right: 8%; transform: rotate(6deg); }
.empty > :not(.empty-stack) { position: relative; }
.empty-mark { width: 64px; height: 56px; margin-bottom: 6px; }
.empty-t { font: 800 26px/1.1 var(--display); letter-spacing: -.03em; }
.empty-s { max-width: 30em; font-size: 14px; color: var(--ink-2); }
.empty-k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 6px 0 10px; }
.empty .btn.outline { border-color: var(--rule-2); color: var(--ink); }
.empty .btn.outline:hover { background: var(--paper-2); border-color: var(--ink-3); }
@media (max-width: 560px) { .empty-stack { display: none; } }

/* Name slot */
.slot { display: grid; gap: 28px; }
.ticket { padding: 20px; display: grid; gap: 20px; }
.ticket-top { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--paper-2); border: 1px dashed var(--rule-2); font: 600 15px/1 var(--mono); color: var(--ink-3); }
.slot-handle { font-size: 18px; font-weight: 600; }
.slot-split { display: grid; gap: 6px; padding-top: 16px; border-top: 1px dashed var(--rule-2); }
.slot-num { font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.split-bar { display: flex; height: 12px; margin-top: 10px; border-radius: 999px; overflow: hidden; gap: 3px; }
.split-a { flex: 80; background: var(--accent); border-radius: 999px 3px 3px 999px; }
.split-b { flex: 20; background: repeating-linear-gradient(-45deg, var(--counter) 0 4px, color-mix(in srgb, var(--counter) 55%, var(--paper)) 4px 8px); border-radius: 3px 999px 999px 3px; }
.split-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.split-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 10px; height: 10px; border-radius: 3px; }
.sw-a { background: var(--accent); border: 1px solid var(--rule-2); }
.sw-b { background: var(--counter); }
.slot-copy { display: grid; gap: 14px; align-content: start; }
.slot-lead { font: 800 24px/1.2 var(--display); letter-spacing: -.03em; max-width: 20em; }
.slot-note { font-size: 15px; color: var(--text-2); max-width: 36em; }
.slot-copy .stamp-lg { justify-self: start; margin-top: 12px; color: var(--stamp); }
.slot-proof { justify-self: start; }
@media (prefers-color-scheme: dark) { .slot-copy .stamp-lg { --stamp: #D27563; } }
@media (min-width: 960px) {
  .slot { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
  .ticket { padding: 28px; }
}

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--border); max-width: 820px; }
.qa { border-bottom: 1px solid var(--border); }
.q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 64px; padding: 14px 0; border: 0; background: none; text-align: left; font: 600 17px/1.35 var(--sans); cursor: pointer; }
.q:hover { color: var(--text); }
.chev { width: 20px; height: 20px; color: var(--text-3); transition: transform .2s var(--ease); }
.q[aria-expanded="true"] .chev { transform: rotate(180deg); color: var(--text); }
.a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s var(--ease); }
.a > div { overflow: hidden; }
.a p { padding: 0 0 20px; max-width: 42em; font-size: 15px; color: var(--text-2); }
.qa.open .a { grid-template-rows: 1fr; }

/* ---------- Footer ---------- */
.foot { margin-top: 96px; padding: 28px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.foot-strip { display: grid; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.foot-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.foot-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border-radius: 8px; font-size: 14px; color: var(--text-2); }
.foot-links a:hover { color: var(--text); background: var(--surface-2); }
.foot-legal { font-size: 13px; color: var(--text-3); }
.foot-sign { margin-top: 12px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }

/* ---------- Sticky mobile primary + toast ---------- */
.sticky-run { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); }
.sticky-run .btn { width: 100%; }
@media (min-width: 960px) { .sticky-run { display: none; } }
/* Mobile: room under the last controls so the sticky bar never covers them. */
@media (max-width: 959px) { body { padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom)); } }
.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 50; max-width: calc(100vw - 40px); padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font: 600 14px/1.3 var(--mono); box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 8px); transition: opacity .18s var(--ease), transform .18s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 960px) { .toast { bottom: 32px; } }

/* ---------- Wallet picker: a card under Connect on desktop, a bottom sheet on phones ---------- */
.wallet-picker { width: min(380px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 32px)); margin: 0; padding: 18px; border: 1px solid var(--border-2); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); overflow: auto; overscroll-behavior: contain; }
.wallet-picker[open] { display: grid; gap: 12px; animation: wp-in .2s var(--ease); }
.wallet-picker::backdrop { background: rgba(7, 10, 8, .5); animation: wp-fade .2s var(--ease); }
@media (min-width: 641px) {
  .wallet-picker { position: fixed; inset: calc(var(--header-h) + 8px) max(16px, calc((100vw - 1200px) / 2 + 32px)) auto auto; }
  .wallet-picker::backdrop { background: rgba(7, 10, 8, .25); }
}
@media (max-width: 640px) {
  .wallet-picker { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
  .wallet-picker[open] { animation-name: wp-up; }
}
@keyframes wp-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes wp-up { from { transform: translateY(24px); opacity: 0; } }
@keyframes wp-fade { from { opacity: 0; } }
.wp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wp-head h2 { margin: 0; font: 700 17px/1.2 var(--display); letter-spacing: -.01em; }
.wp-close { margin-right: -8px; }
.wp-list { list-style: none; margin: 0; padding: 4px; display: grid; gap: 2px; background: var(--surface-2); border-radius: 12px; }
.wp-list:empty { display: none; }
.wp-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: 600 15px/1.2 var(--sans); text-align: left; text-decoration: none; cursor: pointer; user-select: none; transition: background .15s var(--ease); }
.wp-row:hover { background: var(--surface); }
.wp-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.wp-row[aria-busy="true"] { cursor: progress; }
.wp-icon, .wp-tile { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--bg); }
.wp-icon { object-fit: cover; }
.wp-tile { display: grid; place-items: center; color: var(--text-2); font: 700 13px/1 var(--mono); }
.wp-name { flex: 1; min-width: 0; }
.wp-name > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-err { display: block; margin-top: 3px; font: 500 12px/1.3 var(--sans); color: var(--stamp); }
.wp-tag { flex: none; font: 500 12px/1 var(--mono); color: var(--text-3); }
.wp-tag.recent { color: var(--accent-text); }
.wp-row[aria-busy="true"] .wp-tag { color: var(--text-2); }
.wp-empty { padding: 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; line-height: 1.45; }
.wp-empty p { margin: 4px 0 0; color: var(--text-2); }
.wp-or { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--text-3); font: 500 12px/1 var(--mono); }
.wp-or::before, .wp-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.wp-paste { width: 100%; }
.wp-fine { margin: 0; color: var(--text-3); font-size: 12px; line-height: 1.4; text-align: center; }

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