:root {
  --enamel: oklch(0.21 0.07 268);
  --enamel-2: oklch(0.26 0.085 268);
  --enamel-3: oklch(0.33 0.1 268);
  --paper: oklch(0.95 0.012 255);
  --paper-2: oklch(0.91 0.02 258);
  --ink: oklch(0.26 0.09 266);
  --ink-soft: oklch(0.42 0.08 266);
  --cobalt: oklch(0.44 0.19 266);
  --cobalt-deep: oklch(0.34 0.16 266);
  --cobalt-line: oklch(0.56 0.15 266);
  --amber: oklch(0.86 0.14 80);
  --amber-deep: oklch(0.74 0.15 72);
  --red: oklch(0.62 0.2 27);
  --red-ink: oklch(0.5 0.19 27);
  --on-dark: oklch(0.93 0.02 255);
  --on-dark-soft: oklch(0.78 0.04 262);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: 'Ultra', 'Rockwell', serif;
  --text: 'Archivo', system-ui, sans-serif;
  --mono: 'Courier Prime', 'Courier New', monospace;
  --bar-h: 60px;
  color-scheme: dark light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 12px); }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-dark);
  background: var(--enamel);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--amber); color: var(--ink); padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 3px; }
.paper :focus-visible { outline-color: var(--cobalt); }
.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 4px; cursor: pointer;
  font-weight: 750; font-stretch: 88%; font-size: 1rem; letter-spacing: 0.01em;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms;
}
.btn:active { transform: translateY(2px); }
.btn-primary {
  background: linear-gradient(oklch(0.9 0.13 85), var(--amber) 55%, var(--amber-deep));
  color: oklch(0.22 0.08 266);
  box-shadow: 0 3px 0 oklch(0.55 0.13 65), 0 0 22px oklch(0.86 0.14 80 / 0.25);
}
.btn-primary:hover { box-shadow: 0 3px 0 oklch(0.55 0.13 65), 0 0 30px oklch(0.86 0.14 80 / 0.45); }
.btn-primary:active { box-shadow: 0 1px 0 oklch(0.55 0.13 65); }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-quiet:hover { background: oklch(0.26 0.09 266 / 0.07); }
.btn[disabled], .btn[aria-busy='true'] { opacity: 0.6; cursor: progress; }
.btn.wide { width: 100%; }
.btn-ghost {
  background: none; border: 0; cursor: pointer; color: var(--on-dark-soft);
  font-size: 0.875rem; font-weight: 600; min-height: 32px; padding: 0 6px;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: oklch(0.78 0.04 262 / 0.4);
}
.btn-ghost:hover { color: var(--amber); }
.btn-ghost[disabled] { opacity: 0.45; cursor: default; text-decoration: none; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 40;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 20px;
  background: linear-gradient(oklch(0.19 0.065 268), oklch(0.17 0.06 268));
  border-bottom: 2px solid var(--cobalt-deep);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--display); font-size: 1.45rem; letter-spacing: 0.01em; color: var(--on-dark); line-height: 1; }
.routes { display: flex; gap: 4px; }
.routes a {
  text-decoration: none; padding: 8px 12px; border-radius: 4px;
  font-weight: 650; font-stretch: 90%; color: var(--on-dark-soft);
}
.routes a:hover { color: var(--on-dark); background: var(--enamel-2); }
.routes a[aria-current='page'] { color: var(--amber); box-shadow: inset 0 -3px 0 var(--amber); border-radius: 4px 4px 0 0; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.how-link { background: none; border: 0; cursor: pointer; color: var(--on-dark-soft); font-weight: 600; font-stretch: 90%; padding: 8px; }
.how-link:hover { color: var(--amber); }
.chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  min-height: 38px; padding: 8px 12px;
  background: var(--enamel-2); border: 1px solid var(--enamel-3); border-radius: 4px; cursor: pointer;
  font-size: 0.875rem;
}
.chip:hover { border-color: var(--amber); }
.chip-sym { font-weight: 800; font-stretch: 85%; color: var(--amber); }
.chip-price { color: var(--on-dark); font-weight: 600; }
.chip-chg { font-weight: 700; }
.up { color: oklch(0.82 0.14 150); }
.down { color: oklch(0.72 0.17 25); }
.paper .up { color: oklch(0.46 0.13 150); }
.paper .down { color: var(--red-ink); }
.btn-connect { min-height: 38px; padding: 0 14px; background: var(--cobalt); color: var(--on-dark); box-shadow: inset 0 0 0 1px var(--cobalt-line); }
.btn-connect:hover { background: oklch(0.5 0.19 266); }
.btn-connect.on { font-family: var(--mono); font-weight: 700; }
.wallet-wrap { position: relative; }
.wallet-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px;
  background: var(--paper); color: var(--ink); border-radius: 4px; padding: 6px;
  box-shadow: 0 14px 40px oklch(0.1 0.05 268 / 0.5);
}
.wallet-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; cursor: pointer; border-radius: 3px; font-weight: 600; }
.wallet-menu button:hover { background: var(--paper-2); }

/* ---------- tote band ---------- */
.tote-band {
  position: relative;
  padding: 28px 20px 44px;
  background:
    radial-gradient(1200px 500px at 30% -10%, oklch(0.3 0.1 268 / 0.9), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 119px, oklch(0.16 0.06 268 / 0.7) 119px 121px),
    var(--enamel);
}
.tote-head { width: min(1400px, 100%); margin: 0 auto 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.rule-fine { display: block; margin-top: 6px; font-size: 0.875rem; color: oklch(0.72 0.05 262); }
.headline { font-family: var(--display); font-weight: 400; font-size: clamp(2.3rem, 4.2vw, 3.5rem); line-height: 0.95; color: var(--on-dark); letter-spacing: -0.005em; }
.rule { max-width: 46ch; color: var(--on-dark-soft); font-size: 1.0625rem; }
.tote-grid { width: min(1400px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.tote-frame {
  position: relative;
  padding: 10px 14px 8px;
  border-radius: 6px;
  background: linear-gradient(oklch(0.38 0.12 266), oklch(0.3 0.11 266));
  box-shadow: inset 0 1px 0 oklch(0.55 0.12 266), inset 0 -2px 0 oklch(0.2 0.08 266), 0 30px 60px oklch(0.1 0.05 268 / 0.55);
}
.tote-frame::before, .tote-frame::after {
  content: ''; position: absolute; top: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, oklch(0.75 0.05 266), oklch(0.35 0.08 266));
}
.tote-frame::before { left: 8px; } .tote-frame::after { right: 8px; }
.plate { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 10px 10px; }
.plate-name { font-family: var(--display); font-size: 0.95rem; color: oklch(0.88 0.04 262); letter-spacing: 0.04em; }
.lamps { display: flex; gap: 6px; }
.lamp {
  font-weight: 800; font-stretch: 75%; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 3px;
  color: oklch(0.45 0.06 266); background: oklch(0.2 0.06 268);
  box-shadow: inset 0 1px 3px oklch(0.1 0.05 268);
  transition: color 120ms, background 120ms, box-shadow 400ms;
}
.lamp.on { color: oklch(0.22 0.08 266); background: var(--amber); box-shadow: 0 0 16px oklch(0.86 0.14 80 / 0.7); }
.lamp-red.on { color: oklch(0.98 0.01 30); background: var(--red); box-shadow: 0 0 18px oklch(0.62 0.2 27 / 0.8); }
.tote-canvas-wrap { position: relative; border-radius: 3px; overflow: hidden; background: var(--enamel); box-shadow: inset 0 0 0 2px oklch(0.16 0.06 268); }
#tote { width: 100%; height: auto; touch-action: manipulation; }
#tote:focus-visible { outline-offset: -3px; }
.tote-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 2px 0; }
.tote-hint { color: oklch(0.84 0.04 262); font-size: 0.8125rem; text-align: center; }

/* ---------- ticket ---------- */
.side { display: grid; gap: 18px; }
.ticket {
  position: relative;
  background:
    radial-gradient(circle at 0 100%, transparent 0 0) ,
    linear-gradient(oklch(0.96 0.03 90), oklch(0.93 0.035 88));
  color: var(--ink);
  border-radius: 3px;
  box-shadow: 0 18px 40px oklch(0.1 0.05 268 / 0.5);
  font-family: var(--mono);
  overflow: hidden;
}
.ticket::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image: repeating-linear-gradient(0deg, transparent 0 23px, oklch(0.6 0.08 266 / 0.25) 23px 24px);
}
.ticket-top { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--cobalt); color: var(--on-dark); }
.ticket-kind { font-family: var(--display); font-size: 1.1rem; font-weight: 400; }
.ticket-race { font-weight: 700; }
.ticket-body { position: relative; padding: 16px; display: grid; gap: 14px; min-height: 150px; }
.ticket-line { font-size: 0.95rem; line-height: 1.45; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--text); }
.ticket-actions .btn { flex: 1 1 auto; }
.ticket-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.ticket-figs dt { font-size: 0.8rem; color: var(--ink-soft); }
.ticket-figs dd { margin: 0; font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.ticket-figs .big { grid-column: 1 / -1; }
.ticket-figs .big dd { font-family: var(--display); font-weight: 400; font-size: 2.4rem; line-height: 1; color: var(--cobalt); }
.ticket-perf { position: relative; height: 0; border-top: 2px dashed oklch(0.26 0.09 266 / 0.35); margin: 0 10px; }
.ticket-stub { position: relative; display: flex; justify-content: space-between; align-items: baseline; padding: 10px 16px 12px; font-size: 0.9rem; }
.ticket-stub strong { font-size: 1.05rem; }
.stamp {
  position: absolute; right: 14px; top: 58px;
  font-family: var(--display); font-size: 1.5rem; color: var(--red-ink);
  border: 3px solid currentColor; border-radius: 4px; padding: 2px 10px;
  transform: rotate(-12deg) scale(1.6); opacity: 0; pointer-events: none;
  mix-blend-mode: multiply;
}
.stamp.show { animation: stamp 420ms var(--ease) forwards; }
@keyframes stamp { to { transform: rotate(-12deg) scale(1); opacity: 0.85; } }

/* runners list */
.side-h { font-family: var(--display); font-weight: 400; font-size: 1.3rem; color: var(--on-dark); margin-bottom: 8px; }
.runner-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.runner-list li.skel { height: 38px; border-radius: 3px; background: linear-gradient(90deg, var(--enamel-2), var(--enamel-3), var(--enamel-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.runner {
  width: 100%; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px;
  min-height: 38px; padding: 4px 10px 4px 4px; cursor: pointer; text-align: left;
  background: var(--enamel-2); border: 1px solid transparent; border-radius: 3px;
  transition: background 150ms, border-color 150ms;
}
.runner:hover, .runner[aria-pressed='true'] { background: var(--enamel-3); border-color: var(--amber); }
.saddle {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 3px;
  font-weight: 900; font-stretch: 80%; background: var(--amber); color: var(--ink);
}
.runner.you .saddle { background: var(--red); color: oklch(0.98 0.01 30); }
.runner.field .saddle { background: var(--on-dark-soft); }
.runner-w { font-family: var(--mono); font-size: 0.9rem; color: var(--on-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runner-o { font-weight: 800; font-stretch: 85%; color: var(--amber); }
.runner-empty { color: var(--on-dark-soft); font-size: 0.9rem; padding: 10px; background: var(--enamel-2); border-radius: 3px; }
.entry { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px; border-radius: 3px; background: oklch(0.17 0.06 268); box-shadow: inset 0 0 0 1px var(--enamel-3); }
.entry.you { box-shadow: inset 0 0 0 2px var(--red); }
.skel-entry { height: 150px; background: linear-gradient(90deg, var(--enamel-2), var(--enamel-3), var(--enamel-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.saddle.big { width: 52px; height: 60px; font-size: 1.9rem; border-radius: 4px; box-shadow: inset 0 -4px 0 oklch(0.7 0.14 72); }
.entry.you .saddle.big { background: var(--red); color: oklch(0.98 0.01 30); box-shadow: inset 0 -4px 0 oklch(0.48 0.18 27); }
.entry-main { min-width: 0; display: grid; gap: 8px; }
.entry .side-h { margin: 0; font-size: 1.25rem; }
.entry-note { color: var(--on-dark-soft); font-size: 0.95rem; }
.entry-addr { font-family: var(--mono); font-size: 0.85rem; color: var(--on-dark); word-break: break-all; }
.entry-addr .copy { color: var(--amber); opacity: 1; }
.entry-figs { display: flex; gap: 24px; margin: 0; }
.entry-figs dt { font-size: 0.8rem; color: var(--on-dark-soft); }
.entry-figs dd { margin: 0; font-family: var(--display); font-size: 1.7rem; line-height: 1.05; color: var(--amber); }
.entry-link { font-size: 0.875rem; font-weight: 600; color: var(--on-dark); text-underline-offset: 3px; }
.entry-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 2px 0; color: var(--on-dark-soft); font-size: 0.85rem; }
.runner-detail { margin-top: 10px; padding: 12px; border-radius: 3px; background: oklch(0.17 0.06 268); font-size: 0.9rem; display: grid; gap: 4px; }
.runner-detail .addr { font-family: var(--mono); word-break: break-all; color: var(--on-dark); }
.runner-detail .row { display: flex; gap: 12px; flex-wrap: wrap; color: var(--on-dark-soft); }
.runner-detail .row b { color: var(--amber); }

/* ---------- paper bands ---------- */
.paper {
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .25 0 0 0 0 .5 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; }
.h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1; }
.h3 { font-family: var(--display); font-weight: 400; font-size: 1.45rem; line-height: 1.1; }
.lede { font-size: 1.125rem; max-width: 52ch; color: var(--ink-soft); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.sec-sub { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 16px; max-width: 65ch; }
.more { font-weight: 700; font-stretch: 88%; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.band-how { padding: 80px 0 72px; }
.how-head { display: grid; grid-template-columns: auto 1fr; gap: 12px 48px; align-items: end; margin-bottom: 36px; }
.track-diagram svg { width: 100%; height: auto; overflow: visible; }
.track-diagram .rail { fill: none; stroke: var(--ink); stroke-width: 3; }
.track-diagram .rail-dash { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 2 8; }
.track-diagram .pole { stroke: var(--ink); stroke-width: 3; }
.track-diagram .pole-cap { fill: var(--cobalt); }
.track-diagram .pole-cap.red { fill: var(--red); }
.track-diagram .capn { font-family: var(--display); font-size: 20px; fill: var(--paper); }
.track-diagram .lbl { font-family: var(--display); font-size: 22px; fill: var(--ink); }
.track-diagram .sub { font-family: var(--text); font-size: 15px; fill: var(--ink-soft); }
.track-diagram .fig { font-family: var(--text); font-weight: 800; font-size: 15px; fill: var(--cobalt); font-stretch: 85%; }
.track-diagram .flow { fill: none; stroke: var(--cobalt); stroke-width: 3; stroke-dasharray: 10 8; }
@media (prefers-reduced-motion: no-preference) {
  .track-diagram .flow { animation: flow 1.6s linear infinite; }
}
@keyframes flow { to { stroke-dashoffset: -36; } }
.track-diagram .tn { display: none; max-width: 420px; }
@media (max-width: 700px) {
  .track-diagram .tw { display: none; }
  .track-diagram .tn { display: block; }
}

/* field band: reversed two-colour print */
.band-field {
  padding: 72px 0;
  color: var(--on-dark);
  background:
    radial-gradient(circle, oklch(0.5 0.19 266 / 0.55) 1px, transparent 1.6px) 0 0 / 7px 7px,
    var(--cobalt);
}
.band-field .sec-sub { color: oklch(0.88 0.04 262); }
.band-field .more { color: var(--on-dark); }
.field-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; }
.late-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.late-list li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline;
  padding: 10px 12px; background: oklch(0.36 0.16 266 / 0.8); border-radius: 3px; font-size: 0.95rem;
}
@starting-style { .late-list li.new { opacity: 0; transform: translateY(-6px); } }
.late-list li { transition: opacity 250ms var(--ease), transform 250ms var(--ease); }
.late-list .side-b { font-weight: 800; font-stretch: 80%; text-transform: uppercase; font-size: 0.8rem; padding: 1px 6px; border-radius: 2px; background: var(--amber); color: var(--ink); }
.late-list .side-s { font-weight: 800; font-stretch: 80%; text-transform: uppercase; font-size: 0.8rem; padding: 1px 6px; border-radius: 2px; background: oklch(0.88 0.03 262); color: var(--ink); }
.late-list .w { font-family: var(--mono); }
.late-list time { color: oklch(0.86 0.04 262); font-size: 0.85rem; }
.empty-note { padding: 18px; border: 2px dashed currentColor; border-radius: 4px; opacity: 0.85; font-size: 0.95rem; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap.tall { overflow: visible; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.975rem; }
.tbl th {
  text-align: left; font-weight: 800; font-stretch: 75%; font-size: 0.9rem; letter-spacing: 0.02em;
  padding: 10px 12px; border-bottom: 3px solid currentColor;
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid oklch(0.26 0.09 266 / 0.15); vertical-align: middle; }
.band-field .tbl td { border-bottom-color: oklch(0.93 0.02 255 / 0.18); }
.tbl .num { text-align: right; }
.tbl .w { font-family: var(--mono); font-weight: 700; }
.tbl tr.you td { background: oklch(0.62 0.2 27 / 0.16); }
.tbl tr.flash td { animation: rowflash 1.2s var(--ease); }
@keyframes rowflash { from { background: oklch(0.86 0.14 80 / 0.5); } }
.tbl .tag { font-family: var(--text); font-size: 0.75rem; font-weight: 800; font-stretch: 80%; padding: 1px 6px; border-radius: 2px; margin-left: 6px; background: var(--red); color: oklch(0.98 0.01 30); vertical-align: 1px; }
.tbl .tag.sample { background: oklch(0.26 0.09 266 / 0.15); color: var(--ink); }
.tbl.sticky thead th { position: sticky; top: var(--bar-h); background: var(--paper); z-index: 2; }
.tbl .carried { color: var(--ink-soft); font-style: italic; }
.tbl a.sol { font-weight: 700; text-underline-offset: 3px; }
.copy { background: none; border: 0; cursor: pointer; padding: 4px 6px; margin-left: 2px; border-radius: 3px; color: inherit; opacity: 0.75; font-size: 0.8rem; font-weight: 700; font-stretch: 85%; min-height: 24px; }
.copy:hover { opacity: 1; background: oklch(0.5 0.1 266 / 0.15); }
.skel-row td span { display: block; height: 14px; border-radius: 2px; background: oklch(0.5 0.1 266 / 0.18); }

.band-results { padding: 72px 0; }
.band-results { color: var(--ink); background: var(--paper-2); }

/* purse */
.band-purse {
  padding: 80px 0;
  background:
    radial-gradient(900px 400px at 85% 0%, oklch(0.3 0.12 266 / 0.8), transparent 70%),
    var(--enamel);
}
.purse-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; }
.purse-lede { color: var(--on-dark-soft); max-width: 48ch; margin: 14px 0 28px; font-size: 1.05rem; }
.purse-figs { display: flex; flex-wrap: wrap; gap: 28px 44px; margin-bottom: 32px; }
.purse-fig span { display: block; color: var(--on-dark-soft); font-size: 0.9rem; }
.purse-fig strong { font-family: var(--display); font-weight: 400; font-size: 2.2rem; line-height: 1.05; color: var(--amber); }
.purse-fig.lead strong { font-size: clamp(3rem, 6vw, 4.6rem); text-shadow: 0 0 30px oklch(0.86 0.14 80 / 0.35); }
.split { display: grid; gap: 10px; margin-bottom: 32px; }
#purseLead { margin-bottom: 18px; }
.split-bar { display: flex; height: 56px; border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 2px oklch(0.16 0.06 268); }
.split-bar span { display: grid; place-items: center; font-weight: 800; font-stretch: 80%; font-size: 0.95rem; }
.split-bar .s-burn { background: var(--red); color: oklch(0.98 0.01 30); }
.split-bar .s-pot { background: var(--amber); color: var(--ink); }
.split-bar .s-owner { background: var(--cobalt); color: var(--on-dark); }
.split-key { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.9rem; color: var(--on-dark-soft); }
.split-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.log-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 2px; }
.log-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; background: var(--enamel-2); border-radius: 3px; }
.log-list .amt { font-weight: 800; color: var(--amber); }
.log-list .meta { grid-column: 1 / -1; font-size: 0.85rem; color: var(--on-dark-soft); display: flex; gap: 12px; flex-wrap: wrap; }
.log-list .meta a { color: var(--on-dark); }
.log-list .w { font-family: var(--mono); }
.band-purse .empty-note { color: var(--on-dark-soft); }
.purse-log .more { color: var(--on-dark); }
.log-list li strong { font-weight: 800; font-stretch: 85%; margin-right: 6px; color: var(--on-dark); }
.log-list li a.w { color: var(--on-dark); text-underline-offset: 3px; }
.log-list li.you { box-shadow: inset 0 0 0 2px var(--red); }
.log-list li.flash { animation: rowflash 1.4s var(--ease); }
.log-list .amt.carried { color: var(--on-dark-soft); font-weight: 600; font-style: italic; }
.log-list .copy { color: var(--on-dark); padding: 0 4px; }
.log-list .skel-li { height: 64px; background: linear-gradient(90deg, var(--enamel-2), var(--enamel-3), var(--enamel-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* faq */
.band-faq { padding: 80px 0 88px; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 48px; }
.faq details { border-top: 2px solid var(--ink); }
.faq details:last-child { border-bottom: 2px solid var(--ink); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 750; font-stretch: 90%; font-size: 1.15rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 12px; font-family: var(--display); font-size: 1.6rem; color: var(--cobalt); transition: transform 200ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; max-width: 62ch; color: var(--ink-soft); }

/* pages */
.screen[data-screen='field'], .screen[data-screen='results'] { min-height: calc(100vh - var(--bar-h)); }
.page { padding: 48px 0 80px; }
.page-head { margin-bottom: 24px; display: grid; gap: 10px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.search input {
  width: min(420px, 100%); min-height: 44px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: 4px; background: oklch(0.98 0.008 255); color: var(--ink);
  font-family: var(--mono); font-size: 1rem;
}
.search input::placeholder { color: var(--ink-soft); }
.search { flex: 1 1 260px; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 0 14px; min-height: 40px; cursor: pointer; font-weight: 700; font-stretch: 88%; color: var(--ink); }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }

/* footer */
.foot { background: var(--cobalt-deep); color: var(--on-dark); padding: 40px 0; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 28px; align-items: center; }
.foot-brand { display: flex; gap: 14px; align-items: center; }
.foot-brand strong { font-family: var(--display); font-weight: 400; font-size: 1.4rem; }
.foot-brand p { color: oklch(0.86 0.04 262); font-size: 0.9rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-nav a, .foot-nav button { background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 650; text-decoration: none; color: var(--on-dark); }
.foot-nav a:hover, .foot-nav button:hover { color: var(--amber); }
.foot-ca { font-family: var(--mono); font-size: 0.9rem; color: oklch(0.88 0.04 262); word-break: break-all; }
.foot-ca .copy { color: var(--amber); opacity: 1; }

/* tabs (phone) */
.tabs { display: none; }

/* sheets */
.sheet-scrim { position: fixed; inset: 0; z-index: 60; background: oklch(0.12 0.05 268 / 0.6); }
.sheet {
  position: fixed; z-index: 61; right: 20px; top: calc(var(--bar-h) + 10px);
  width: min(400px, calc(100% - 24px)); max-height: calc(100vh - var(--bar-h) - 30px); overflow: auto;
  background: var(--paper); color: var(--ink); border-radius: 6px; padding: 18px 20px 22px;
  box-shadow: 0 30px 80px oklch(0.1 0.05 268 / 0.6);
  animation: sheetIn 240ms var(--ease);
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(-8px); } }
.sheet-how { right: 50%; transform: translateX(50%); top: 12vh; width: min(640px, calc(100% - 24px)); animation: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; }
.x { background: none; border: 0; cursor: pointer; font-size: 1.8rem; line-height: 1; width: 40px; height: 40px; border-radius: 4px; color: var(--ink); }
.x:hover { background: var(--paper-2); }
.coin-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.coin-top img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; background: var(--paper-2); }
.coin-price { font-family: var(--display); font-size: 1.8rem; line-height: 1; }
.coin-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.coin-stats div { background: var(--paper-2); padding: 10px 12px; border-radius: 3px; }
.coin-stats span { display: block; font-size: 0.8rem; color: var(--ink-soft); }
.coin-stats strong { font-size: 1.1rem; }
.spark { width: 100%; height: 64px; }
.spark path.l { fill: none; stroke: var(--cobalt); stroke-width: 2; }
.spark path.a { fill: oklch(0.44 0.19 266 / 0.12); }
.ca-row { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.9rem; background: var(--paper-2); padding: 8px 10px; border-radius: 3px; margin-bottom: 14px; }
.ca-row code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buy-amts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.buy-amts button { min-height: 40px; border: 2px solid var(--ink); background: none; border-radius: 4px; cursor: pointer; font-weight: 750; color: var(--ink); }
.buy-amts button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.field-err { color: var(--red-ink); font-size: 0.9rem; margin-top: 8px; min-height: 1.2em; }
.soon { padding: 16px; border: 2px dashed var(--ink); border-radius: 4px; }
.how-one { font-size: 1.1rem; margin-bottom: 18px; }
.how-steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how-steps li { display: grid; gap: 4px; align-content: start; }
.how-steps svg { width: 100%; height: 70px; background: var(--enamel); border-radius: 4px; padding: 6px; fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.how-steps strong { font-family: var(--display); font-weight: 400; font-size: 1.2rem; margin-top: 6px; }
.how-steps span { font-size: 0.9rem; color: var(--ink-soft); }

/* toasts */
.toasts { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: 24px; display: grid; gap: 8px; width: min(420px, calc(100% - 24px)); }
.toast { background: var(--paper); color: var(--ink); padding: 12px 16px; border-radius: 4px; box-shadow: 0 16px 40px oklch(0.1 0.05 268 / 0.5); border-top: 4px solid var(--cobalt); font-size: 0.95rem; animation: sheetIn 220ms var(--ease); }
.toast.err { border-top-color: var(--red); }
.toast.ok { border-top-color: var(--amber-deep); }
.toast a { font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .tote-grid { grid-template-columns: 1fr; }
  .side { grid-template-columns: 1fr 1fr; align-items: start; }
  .tote-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 860px) {
  .routes, .how-link { display: none; }
  .field-grid, .purse-grid, .faq-grid { grid-template-columns: 1fr; gap: 36px; }
  .how-head { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabs {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: oklch(0.17 0.06 268); border-top: 2px solid var(--cobalt-deep);
  }
  .tabs a, .tabs button {
    display: grid; justify-items: center; gap: 2px; padding: 6px 0; min-height: 50px;
    background: none; border: 0; text-decoration: none; cursor: pointer;
    font-size: 0.75rem; font-weight: 700; color: var(--on-dark-soft);
  }
  .tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tabs a[aria-current='page'] { color: var(--amber); }
  .tabs button[data-buy] { color: var(--amber); }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 86vh; border-radius: 10px 10px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .sheet-how { transform: none; top: auto; }
}
@media (max-width: 640px) {
  .bar { padding: 0 12px; gap: 10px; }
  .brand-name { display: none; }
  .chip { padding: 6px 9px; gap: 6px; }
  .chip-chg:empty { display: none; }
  .tote-band { padding: 20px 10px 32px; }
  .headline { font-size: 2.35rem; }
  .rule { font-size: 1rem; }
  .tote-frame { padding: 8px 8px 6px; }
  .plate { padding: 0 4px 8px; }
  .plate-name { font-size: 0.8rem; }
  .lamp { padding: 2px 6px; font-size: 0.72rem; }
  .tote-hint { display: none; }
  .side { grid-template-columns: 1fr; }
  .wrap { width: calc(100% - 28px); }
  .band-how, .band-field, .band-results, .band-purse, .band-faq { padding: 56px 0; }
  .tbl { font-size: 0.9rem; }
  .tbl th, .tbl td { padding: 9px 7px; }
  .tbl .hide-s { display: none; }
  .how-steps { grid-template-columns: 1fr; }
  .how-steps li { grid-template-columns: 90px 1fr; column-gap: 12px; }
  .how-steps svg { grid-row: span 2; height: 64px; }
  .how-steps strong { margin-top: 0; }
  .purse-fig strong { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
