@font-face { font-family: 'Holtwood'; src: url(/fonts/holtwood.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Gabarito'; src: url(/fonts/gabarito.woff2) format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Sono'; src: url(/fonts/sono.woff2) format('woff2'); font-weight: 400 600; font-display: swap; }

/* A painted fairground derby booth: pistachio wall, cream enamel, vermilion paint, marquee bulbs, tin horses. */
:root {
  --wall: #e3ebc6;
  --wall-2: #d3dfaa;
  --cream: #fbf6e8;
  --paper: #f4eedd;
  --ink: #1e1720;
  --ink-2: #4a4048;
  --ink-3: #6f6570;
  --red: #e2492f;
  --red-dk: #b8341e;
  --bulb: #ffcf4a;
  --amber: #f2b632;
  --cobalt: #2a49c9;
  --turf: #3d8a55;
  --turf-2: #34794a;
  --plank: #b5793f;
  --plank-dk: #8a5527;
  --tin: #c9cfd6;
  --up: #1d7f45;
  --down: #c62f3a;
  --edge: 2.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --r: 12px;
  --display: 'Holtwood', 'Rockwell Extra Bold', Georgia, serif;
  --text: 'Gabarito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Sono', ui-monospace, 'SF Mono', Menlo, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
}

@property --x { syntax: '<number>'; inherits: false; initial-value: 0; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 500 17px/1.5 var(--text); color: var(--ink); background: var(--wall);
  /* the booth wall: painted boards */
  background-image: repeating-linear-gradient(90deg, transparent 0 118px, rgba(30, 23, 32, .045) 118px 120px);
  overflow-x: hidden;
}
main { flex: 1; outline: none; }
a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.ico { width: 1em; height: 1em; vertical-align: -.14em; flex: none; }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: -.01em; }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--ink-3); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type scale ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; margin: 0; letter-spacing: .005em; }
h1 { font-size: clamp(44px, 6.4vw, 84px); }
h2 { font-size: clamp(30px, 3.6vw, 44px); }
h3 { font-size: 24px; }
p { margin: 0; }
.lede { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45; color: var(--ink-2); max-width: 34em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 52px; padding: 0 26px; border: var(--edge); border-radius: 10px; cursor: pointer;
  background: var(--red); color: var(--cream); font: 800 18px/1 var(--text); letter-spacing: .01em; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .08s, box-shadow .08s, background .15s; white-space: nowrap;
}
.btn:hover { background: #ec5539; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-cream:hover { background: #fffdf4; }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #33283a; }
.btn-small { min-height: 42px; padding: 0 16px; font-size: 16px; box-shadow: 3px 3px 0 var(--ink); }
.btn-wide { width: 100%; white-space: normal; text-align: center; line-height: 1.15; padding-block: 10px; }
.link { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; cursor: pointer; }

/* ---------- launch strip (off until TOKEN_LIVE) ---------- */
.launch { background: var(--ink); color: var(--cream); font-size: 15px; }
.launch-in { display: flex; gap: var(--s3); align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 16px; }
.launch-ca { display: inline-flex; gap: 6px; align-items: center; background: none; border: 1.5px solid #6d6270; border-radius: 6px; padding: 3px 8px; cursor: pointer; color: var(--cream); font: 500 13px var(--mono); }
.launch a { color: var(--bulb); font-weight: 700; }

/* ---------- header: the booth's sign board ---------- */
.top { position: relative; background: var(--red); border-bottom: var(--edge); color: var(--cream); }
.top-in { width: min(1180px, 100% - 32px); margin-inline: auto; display: flex; align-items: center; gap: var(--s5); min-height: 92px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); }
.brand-horse { width: 76px; height: 54px; flex: none; filter: drop-shadow(2px 2px 0 var(--ink)); }
.brand-word { font: 400 44px/1 var(--display); letter-spacing: .02em; text-shadow: 3px 3px 0 var(--ink); }
.nav { display: flex; gap: 6px; margin-left: var(--s3); }
.nav a { text-decoration: none; font-weight: 800; font-size: 17px; padding: 8px 12px; border-radius: 8px; border: 2px solid transparent; }
.nav a:hover { border-color: rgba(251, 246, 232, .45); }
.nav a[aria-current='page'] { background: var(--cream); color: var(--ink); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: var(--s4); }
.top .btn { background: var(--cream); color: var(--ink); }
.top .btn:hover { background: #fff; }
.mode-note { font-size: 14px; font-weight: 700; color: var(--cream); opacity: .92; white-space: nowrap; }
.bulbs {
  position: absolute; left: 0; right: 0; bottom: 6px; height: 12px;
  background: radial-gradient(circle at 50% 50%, #fff6cf 0 2px, var(--bulb) 3px 5px, var(--ink) 5.5px 6.5px, transparent 7px) 0 0 / 30px 12px repeat-x;
}

/* ---------- sections ---------- */
.sec { padding: var(--s8) 0 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.panel { background: var(--cream); border: var(--edge); border-radius: var(--r); box-shadow: var(--shadow); }

/* ---------- hero ---------- */
.hero { padding: var(--s7) 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s6); align-items: center; }
.hero h1 span { display: block; }
.hero h1 .h1b { color: var(--red); text-shadow: 3px 3px 0 var(--ink); }
.hero .lede { margin: var(--s5) 0 var(--s6); }
.cta-row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: var(--s4); font-size: 15px; color: var(--ink-3); }

/* ---------- the booth ---------- */
.booth { position: relative; border: var(--edge); border-radius: 16px; background: var(--red); box-shadow: 6px 6px 0 var(--ink); padding: 10px; }
.booth-sign { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s3); background: var(--cream); border: var(--edge); border-radius: 10px 10px 4px 4px; padding: 10px 14px; }
.booth-sign .t-name { font: 400 24px/1 var(--display); }
.booth-sign .t-meta { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.booth-sign .clock { font: 400 26px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.booth-sign .clock small { display: block; font: 700 13px/1.2 var(--text); color: var(--ink-3); margin-top: 2px; }
.booth-sign .center { text-align: center; }

/* prize shelf: rosettes and the jar on a plank */
.shelf { position: relative; display: flex; align-items: end; justify-content: center; gap: clamp(8px, 2.4vw, 28px); padding: 12px 10px 0; }
.shelf::after { content: ''; position: absolute; left: 4px; right: 4px; bottom: 0; height: 14px; background: linear-gradient(var(--plank), var(--plank-dk)); border: var(--edge); border-radius: 3px; }
.prize { position: relative; z-index: 1; display: grid; justify-items: center; margin-bottom: 10px; }
.prize svg { width: clamp(46px, 6vw, 66px); height: clamp(60px, 7.8vw, 86px); }
.prize b { position: absolute; top: 18%; left: 0; right: 0; text-align: center; font: 400 clamp(12px, 1.4vw, 16px)/1 var(--display); }
.prize span { font: 800 13px/1 var(--text); color: var(--cream); background: var(--ink); border-radius: 5px; padding: 4px 6px; margin-top: -6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pot { position: relative; z-index: 1; display: grid; justify-items: center; margin-bottom: 10px; }
.pot svg { width: clamp(70px, 9vw, 104px); height: clamp(86px, 11vw, 128px); }
.pot .pot-sum { position: absolute; top: 44%; left: 50%; translate: -50% 0; background: var(--cream); border: 2px solid var(--ink); border-radius: 6px; padding: 3px 7px; font: 400 clamp(13px, 1.5vw, 17px)/1 var(--display); white-space: nowrap; }
.pot .pot-label { font: 800 12px/1 var(--text); color: var(--cream); margin-top: 3px; text-shadow: 1px 1px 0 var(--ink); }

.track { position: relative; margin-top: 10px; border: var(--edge); border-radius: 6px 6px 10px 10px; overflow: hidden; background: var(--turf); }
.lane { position: relative; height: var(--lane-h, 64px); border-bottom: 2px solid rgba(30, 23, 32, .35); }
.lane:nth-child(even) { background: var(--turf-2); }
.lane:last-child { border-bottom: 0; }
.lane::after { content: ''; position: absolute; left: 42px; right: 26px; bottom: 7px; height: 5px; border-radius: 3px; background: #1d2a22; box-shadow: inset 0 1px 0 rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.18); }
.lane-no { position: absolute; left: 0; top: 0; bottom: 0; width: 34px; display: grid; place-items: center; background: var(--cream); border-right: var(--edge); font: 400 18px/1 var(--display); z-index: 2; }
.finish { position: absolute; top: 0; bottom: 0; right: 0; width: 18px; z-index: 1; border-left: var(--edge);
  background: conic-gradient(var(--ink) 25%, var(--cream) 0 50%, var(--ink) 0 75%, var(--cream) 0) 0 0 / 12px 12px; }
.zero { position: absolute; top: 0; bottom: 0; width: 0; border-left: 3px dashed rgba(251, 246, 232, .8); z-index: 1; transition: left 1.2s cubic-bezier(.3, .7, .3, 1); }
.zero span { position: absolute; top: 3px; left: 4px; font: 800 11px/1 var(--text); color: var(--cream); }
.runner { position: absolute; top: 2px; bottom: 9px; left: calc(42px + (100% - 42px - 26px - var(--hw)) * var(--x, 0)); width: var(--hw); z-index: 3; --hw: calc((var(--lane-h, 64px) - 11px) * 1.412); }
.runner .horse { position: absolute; inset: 0 0 4px; width: 100%; height: calc(100% - 4px); overflow: visible; }
.runner .rod { position: absolute; left: 44%; bottom: -4px; width: 4px; height: 9px; background: #c6a052; border: 1.5px solid var(--ink); border-radius: 2px; }
.runner .disc { position: absolute; left: 36.8%; top: 34%; width: 20%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--silk, #2a49c9); border: 2px solid var(--ink); display: grid; place-items: center; font: 800 10px/1 var(--text); color: var(--cream); }
.runner .disc img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tag { position: absolute; left: calc(100% + 4px); top: 50%; translate: 0 -60%; background: var(--cream); border: 2px solid var(--ink); border-radius: 6px; padding: 2px 7px; font: 800 13px/1.15 var(--text); white-space: nowrap; box-shadow: 2px 2px 0 var(--ink); font-variant-numeric: tabular-nums; }
.tag em { font-style: normal; display: block; font: 600 12px/1.1 var(--mono); }
.runner.flip .tag { left: auto; right: calc(100% + 4px); }
.runner.me .tag { background: var(--bulb); }
.runner.p1 .tag { background: #dfe6ff; }
.lane-empty { display: grid; place-items: center; color: var(--cream); font-weight: 800; font-size: 15px; text-shadow: 1px 1px 0 var(--ink); }
.booth-more { color: var(--cream); font-weight: 800; font-size: 14px; text-align: center; padding: 8px 0 2px; text-shadow: 1px 1px 0 var(--ink); }
.booth-more a { color: var(--cream); }

@media (prefers-reduced-motion: reduce) { .zero { transition: none; } }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); counter-reset: s; }
.step { padding: var(--s5); display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.step svg.art { width: 84px; height: 72px; }
.step h3 { margin-bottom: 6px; font-size: 22px; }
.step h3::before { counter-increment: s; content: counter(s) '. '; color: var(--red); }
.step p { color: var(--ink-2); font-size: 16px; }

/* ---------- tables as fair tickets ---------- */
.tickets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s5); }
.ticket-w { filter: drop-shadow(4px 4px 0 var(--ink)); min-width: 0; }
.ticket {
  position: relative; height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: var(--s3); padding: 22px 26px 20px 30px;
  background: var(--paper); border: var(--edge); border-radius: 10px;
  -webkit-mask: radial-gradient(circle 10px at 0 62%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 10px at 100% 62%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 10px at 0 62%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 10px at 100% 62%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.ticket-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px var(--s3); border-bottom: 2px dashed var(--ink-3); padding-bottom: var(--s3); }
.ticket-head h3 { font-size: 27px; }
.ticket-head .fee-in { font: 400 21px/1 var(--display); color: var(--red); white-space: nowrap; }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 16px; }
.ticket dt { color: var(--ink-3); font-weight: 700; }
.ticket dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.ticket.sprint { --tk: var(--red); }
.ticket.heat { --tk: var(--cobalt); }
.ticket.classic { --tk: var(--turf); }
.ticket.dash { --tk: var(--amber); }
.ticket::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--tk, var(--red)); border-right: 2px solid var(--ink); }

/* ---------- lobby ---------- */
.lobby-table { margin-bottom: var(--s7); }
.lt-head { display: flex; align-items: baseline; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); }
.lt-head h2 { font-size: clamp(30px, 3.4vw, 40px); }
.lt-head .lt-meta { font-weight: 800; color: var(--ink-2); }
.lt-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s5); align-items: start; }
.card { padding: var(--s5); }
.card h3 { font-size: 22px; margin-bottom: var(--s3); }
.count { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.count .big { font: 400 40px/1 var(--display); font-variant-numeric: tabular-nums; }
.count .sub { font-weight: 700; color: var(--ink-3); font-size: 15px; }
.potline { display: flex; justify-content: space-between; gap: var(--s3); padding: 10px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); margin-bottom: var(--s4); font-weight: 800; }
.potline b { font: 400 22px/1 var(--display); }
.picks { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: 6px; max-height: 330px; overflow: auto; }
.pick { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 15px; }
.pick .ci, .ci { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--ink); background: var(--tin); object-fit: cover; display: grid; place-items: center; font: 800 11px/1 var(--text); overflow: hidden; }
.pick b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .w { font: 500 13px var(--mono); color: var(--ink-3); }
.empty-note { color: var(--ink-3); font-weight: 700; margin-bottom: var(--s4); }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.results li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--cream); border: 2px solid var(--ink); border-radius: 8px; font-size: 15px; }
.results a { text-decoration: none; }
.results .when { font: 500 13px var(--mono); color: var(--ink-3); }
.mini-booth .booth { padding: 7px; box-shadow: var(--shadow); }
.mini-booth .track { --lane-h: 40px; }
.mini-booth .tag { font-size: 12px; padding: 1px 5px; }
.mini-booth .tag em { display: none; }

/* ---------- race page ---------- */
.race-top { display: flex; justify-content: space-between; align-items: end; gap: var(--s4); flex-wrap: wrap; margin-block: var(--s6) var(--s5); }
.race-top h1 { font-size: clamp(36px, 5vw, 60px); }
.race-top .sub { font-weight: 700; color: var(--ink-2); margin-top: 6px; }
.standings { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.standings th { text-align: left; font-size: 13px; font-weight: 800; color: var(--ink-3); padding: 10px 12px; border-bottom: var(--edge); white-space: nowrap; }
.standings td { padding: 10px 12px; border-bottom: 1.5px solid rgba(30, 23, 32, .15); vertical-align: middle; font-variant-numeric: tabular-nums; }
.standings tr:last-child td { border-bottom: 0; }
.standings .num { text-align: right; white-space: nowrap; }
.standings .coin { display: flex; align-items: center; gap: 10px; min-width: 0; }
.standings .coin b { white-space: nowrap; }
.standings .place { font: 400 20px/1 var(--display); width: 44px; }
.standings tr.me td { background: #fff3c4; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.proof { margin-top: var(--s4); font-size: 15px; color: var(--ink-2); }

/* ---------- me / stats / docs ---------- */
.page-head { margin-block: var(--s6) var(--s5); }
.page-head p { margin-top: var(--s3); }
.mine { display: grid; gap: var(--s4); }
.mine-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s4); align-items: center; padding: var(--s4) var(--s5); }
.mine-row .coin { display: flex; gap: 12px; align-items: center; }
.mine-row .k { font-size: 13px; color: var(--ink-3); font-weight: 800; }
.mine-row .v { font-weight: 800; font-variant-numeric: tabular-nums; }
.ledger { padding: var(--s5) var(--s6); }
.ledger dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s7); margin: 0; }
.ledger div { display: flex; justify-content: space-between; gap: var(--s4); padding: 12px 0; border-bottom: 2px dotted rgba(30, 23, 32, .35); }
.ledger dt { font-weight: 700; color: var(--ink-2); }
.ledger dd { margin: 0; font-weight: 900; font-variant-numeric: tabular-nums; }
.addr { font: 500 14px var(--mono); word-break: break-all; }
.doc { max-width: 760px; padding: var(--s6); margin-bottom: var(--s7); }
.doc h2 { font-size: 28px; margin: var(--s6) 0 var(--s3); }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: var(--s3); }
.doc ul, .doc ol { padding-left: 1.2em; margin: var(--s3) 0; }
.doc li + li { margin-top: 6px; }
.doc table { border-collapse: collapse; margin: var(--s3) 0; }
.doc td, .doc th { border: 2px solid var(--ink); padding: 6px 12px; text-align: left; }

/* ---------- dialogs ---------- */
.dlg { width: min(560px, 100vw - 24px); max-height: min(92vh, 860px); padding: 0; border: var(--edge); border-radius: 14px; background: var(--cream); color: var(--ink); box-shadow: 8px 8px 0 var(--ink); overflow: auto; }
.dlg-small { width: min(420px, 100vw - 24px); }
.dlg::backdrop { background: rgba(30, 23, 32, .5); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 18px 20px; background: var(--red); color: var(--cream); border-bottom: var(--edge); position: sticky; top: 0; z-index: 2; }
.dlg-head h2 { font-size: 28px; text-shadow: 2px 2px 0 var(--ink); }
.dlg-x { width: 40px; height: 40px; border-radius: 8px; border: 2px solid var(--ink); background: var(--cream); color: var(--ink); cursor: pointer; display: grid; place-items: center; font-size: 18px; }
.dlg-body { padding: 20px; display: grid; gap: var(--s4); }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.seg button { border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); padding: 10px 8px; cursor: pointer; text-align: left; display: grid; gap: 2px; }
.seg button b { font: 400 18px/1 var(--display); }
.seg button span { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--cream); box-shadow: 3px 3px 0 var(--red); }
.seg button[aria-pressed='true'] span { color: #d9cfd6; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; font-size: 15px; }
.inp { display: flex; align-items: center; gap: 8px; border: var(--edge); border-radius: 10px; background: #fff; padding: 0 12px; min-height: 52px; }
.inp input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 16px var(--text); padding: 12px 0; color: var(--ink); }
.inp:focus-within { box-shadow: 0 0 0 3px var(--bulb); }
.hits { list-style: none; margin: 0; padding: 0; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: #fff; }
.hits button { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; background: none; border: 0; border-bottom: 1.5px solid rgba(30, 23, 32, .12); text-align: left; cursor: pointer; }
.hits li:last-child button { border-bottom: 0; }
.hits button:hover, .hits button:focus-visible { background: #fff3c4; }
.hits .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hits .nm small { color: var(--ink-3); font-weight: 600; }
.hits .liq { font-size: 13px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.coin-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; border: var(--edge); border-radius: 12px; background: #fff; }
.coin-card .ci { width: 52px; height: 52px; font-size: 15px; }
.coin-card h3 { font-size: 22px; }
.coin-card .facts { font-size: 14px; font-weight: 700; color: var(--ink-3); margin-top: 3px; }
.coin-card .addr { font-size: 12px; color: var(--ink-3); }
.verdict { font-weight: 800; font-size: 15px; }
.verdict.no { color: var(--down); }
.verdict.ok { color: var(--up); }
.pay-sum { display: grid; gap: 6px; padding: 12px 14px; border: 2px dashed var(--ink-3); border-radius: 10px; font-size: 15px; }
.pay-sum div { display: flex; justify-content: space-between; gap: 12px; }
.pay-sum b { font-variant-numeric: tabular-nums; }
.test-note { font-size: 14px; color: var(--ink-2); background: #eef3db; border: 2px solid var(--wall-2); border-radius: 8px; padding: 10px 12px; }
.err { color: var(--down); font-weight: 800; font-size: 15px; }
.done-box { text-align: center; display: grid; gap: var(--s3); justify-items: center; padding: var(--s3) 0; }
.done-box svg { width: 150px; height: 106px; }
.wallets { display: grid; gap: 10px; }
.wallets button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 800; font-size: 17px; }
.wallets button img { width: 32px; height: 32px; border-radius: 8px; }
.wallets button:hover { background: #fff3c4; }

.toast { position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 50; background: var(--ink); color: var(--cream); padding: 12px 18px; border-radius: 10px; font-weight: 800; box-shadow: 4px 4px 0 var(--red); max-width: calc(100vw - 32px); }

/* ---------- footer ---------- */
.foot { margin-top: var(--s8); background: var(--ink); color: #ddd3d9; border-top: 6px solid var(--red); }
.foot-in { padding: var(--s6) 0 var(--s7); display: grid; gap: var(--s3); font-size: 15px; }
.foot-risk { color: var(--cream); font-weight: 700; }
.foot-links { display: flex; gap: var(--s5); flex-wrap: wrap; margin-top: var(--s3); }
.foot-links a { color: var(--cream); font-weight: 800; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.foot-links a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid, .lt-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .nav { display: none; }
}
@media (max-width: 1020px) {
  .nav-mobile { display: flex !important; }
}
.nav-mobile { display: none; gap: 4px; overflow-x: auto; padding: 0 16px 14px; scrollbar-width: none; }
.nav-mobile a { flex: none; text-decoration: none; font-weight: 800; color: var(--cream); padding: 6px 12px; border-radius: 8px; border: 2px solid rgba(251, 246, 232, .4); font-size: 15px; }
.nav-mobile a[aria-current='page'] { background: var(--cream); color: var(--ink); border-color: var(--ink); }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top-in { min-height: 74px; gap: var(--s3); }
  .brand-horse { width: 56px; height: 40px; }
  .brand-word { font-size: 32px; }
  .mode-note { display: none; }
  .sec { padding-top: var(--s7); }
  .hero { padding-top: var(--s6); }
  .booth { padding: 6px; border-radius: 12px; }
  .booth-sign { grid-template-columns: 1fr auto; padding: 8px 10px; }
  .booth-sign .center { display: none; }
  .booth-sign .t-name { font-size: 20px; }
  .booth-sign .clock { font-size: 22px; }
  .track { --lane-h: 46px; }
  .lane::after { left: 30px; right: 18px; }
  .lane-no { width: 24px; font-size: 14px; }
  .runner { left: calc(28px + (100% - 28px - 18px - var(--hw)) * var(--x, 0)); }
  .finish { width: 12px; background-size: 8px 8px; }
  .tag { font-size: 12px; padding: 1px 5px; }
  .tag em { font-size: 11px; }
  .step { grid-template-columns: 64px minmax(0, 1fr); padding: var(--s4); }
  .step svg.art { width: 64px; height: 56px; }
  .mine-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ledger { padding: var(--s4) var(--s5); }
  .ledger dl { grid-template-columns: minmax(0, 1fr); }
  .doc { padding: var(--s5); }
  .race-t th:nth-child(3), .race-t td:nth-child(3), .race-t th:nth-child(4), .race-t td:nth-child(4), .race-t th:nth-child(5), .race-t td:nth-child(5) { display: none; }
  .pay-t th:nth-child(3), .pay-t td:nth-child(3), .pay-t th:nth-child(4), .pay-t td:nth-child(4) { display: none; }
  .standings td, .standings th { padding: 10px 8px; }
  .standings .place { width: 36px; font-size: 17px; }
  .count .big { font-size: 32px; }
}
