/* NoHouse — Ultraviolet. One stylesheet; tokens first. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../assets/fonts/archivo-variable-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url(../assets/fonts/spline-sans-mono-variable-latin.woff2) format('woff2');
}

:root {
  --bg: #220B40;
  --surface: #2D1254;
  --surface-2: #391A68;
  --line: #4A2785;
  --hair: #3A1C6A;
  --text: #F7F3FF;
  --text-2: #CDBDF2;
  --text-3: #A794D9;
  --coral: #FF6A55;
  --on-coral: #220B40;
  --lilac: #B9A0FF;
  --paper: #F7F3FF;
  --paper-ink: #220B40;
  --paper-mute: #5B4691;
  --paper-line: #E2D8FA;
  --paper-field: #CDBDF2;
  --paper-tint: #E9E1FF;
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --page: 1320px;
  --gutter: 32px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--font); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--lilac); text-decoration: none; }
a:hover { color: var(--text); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wide { font-stretch: 125%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-3); }

/* ---------- shell ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.page { width: 100%; max-width: var(--page); margin: 0 auto; padding: 24px var(--gutter) 56px; flex: 1; display: flex; flex-direction: column; gap: 36px; }

.hdr { border-bottom: 1px solid var(--hair); background: var(--bg); position: sticky; top: 0; z-index: 30; }
.hdr-in { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); min-height: 74px; display: flex; align-items: center; gap: 12px 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-tile { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--coral); color: var(--on-coral); font-weight: 900; font-size: 21px; font-stretch: 125%; }
.brand-word { font-weight: 900; font-size: 23px; font-stretch: 125%; letter-spacing: 0.01em; }
.nav-pills { display: flex; gap: 6px; }
.pill { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; color: var(--text-2); font-weight: 600; font-size: 15px; border: 0; background: none; }
.pill:hover { color: var(--text); background: var(--surface); }
.pill.is-on { background: var(--surface-2); color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); display: inline-block; }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface); }
.icon-btn.round { border-radius: 50%; background: var(--surface); }
.balance { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--surface); color: var(--text); line-height: 1.15; }
.balance:hover { color: var(--text); background: var(--surface-2); }
.balance small { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--text-3); }
.balance b { font-family: var(--mono); font-weight: 600; font-size: 15px; }

.btn { height: 44px; padding: 0 20px; border-radius: 12px; border: 0; font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-coral { background: var(--coral); color: var(--on-coral); }
.btn-coral:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-paper { background: var(--paper); color: var(--paper-ink); }
.btn-block { width: 100%; }
.btn-lg { height: 56px; border-radius: 16px; font-size: 17px; font-weight: 900; }
.btn:disabled { opacity: 0.45; filter: none; }

.sportbar { border-bottom: 1px solid var(--hair); }
.sportbar-in { max-width: var(--page); margin: 0 auto; padding: 12px var(--gutter); display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.sportbar-in::-webkit-scrollbar { display: none; }
.chip { flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 13px; border-radius: 12px; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; border: 0; }
.chip:hover { color: var(--text); background: var(--surface-2); }
.chip.is-on { background: var(--coral); color: var(--on-coral); font-weight: 700; }

.foot { border-top: 1px solid var(--hair); }
.foot-in { max-width: var(--page); margin: 0 auto; padding: 24px var(--gutter) 120px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 13px; color: var(--text-3); }
.foot-in nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 20px; }
.foot-in a { color: var(--text-2); }
.preview-note { font-size: 12px; color: var(--text-3); }

/* ---------- type ---------- */
.kicker { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; color: var(--coral); text-transform: uppercase; }
.h1 { margin: 0; font-size: clamp(40px, 6vw, 66px); line-height: 0.95; font-weight: 900; font-stretch: 125%; text-transform: uppercase; }
.h1 .at { color: var(--text-3); font-weight: 700; }
.h2 { margin: 0; font-size: 22px; font-weight: 900; font-stretch: 125%; text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
.h3 { margin: 0; font-size: 15px; font-weight: 900; font-stretch: 125%; text-transform: uppercase; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 16px; }
.label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--text-3); text-transform: uppercase; }

/* ---------- prices ---------- */
.price { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface-2); color: var(--text); font-family: var(--mono); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; transition: background 0.15s, border-color 0.15s; width: 100%; }
.price:hover { border-color: var(--lilac); }
.price .pl { font-family: var(--font); font-weight: 500; font-size: 13px; color: var(--text-2); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price .po { display: inline-flex; align-items: center; gap: 4px; }
.price.end { justify-content: flex-end; }
.price.center { justify-content: center; }
.price.stack { flex-direction: column; justify-content: center; gap: 1px; }
.price.stack .pl { font-size: 11px; }
.price.is-picked { background: var(--coral); border-color: var(--coral); color: var(--on-coral); font-weight: 700; }
.price.is-picked .pl { color: var(--on-coral); font-weight: 700; }
.price.is-up { border-color: var(--lilac); animation: flash-up 2.4s ease-out; }
.price.is-down { border-color: var(--coral); animation: flash-down 2.4s ease-out; }
.price.is-picked.is-up, .price.is-picked.is-down { animation: none; }
.arrow-up { color: var(--lilac); font-size: 10px; }
.arrow-down { color: var(--coral); font-size: 10px; }
.price.is-picked .arrow-up, .price.is-picked .arrow-down { color: var(--on-coral); }
@keyframes flash-up { 0% { background: #4d2f8a; } 100% { background: var(--surface-2); } }
@keyframes flash-down { 0% { background: #5a2347; } 100% { background: var(--surface-2); } }

/* ---------- cards / board ---------- */
.card { background: var(--surface); border-radius: 22px; padding: 20px 22px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.grid-cards.wide { grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr)); }

.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(500px, 100%), 1fr)); gap: 28px; align-items: end; padding: 40px; border-radius: var(--r-l); background: var(--surface); }
.hero-when { margin: 16px 0 0; font-size: 15px; color: var(--text-2); }
.hero-grid { display: grid; grid-template-columns: 96px repeat(3, minmax(0, 1fr)); gap: 8px 10px; align-items: center; }
.hero-grid .team { font-size: 16px; font-weight: 700; }
.hero-grid .price { min-height: 52px; }
.hero-more { grid-column: 2 / -1; justify-self: end; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 700; font-size: 14px; }

.live-card { display: flex; flex-direction: column; gap: 12px; }
.live-top { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; }
.live-top .clock { color: var(--coral); }
.score-row { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; }
.score-row .mono { font-weight: 600; }
.live-note { font-size: 12px; color: var(--text-3); }

.table { background: var(--surface); border-radius: 22px; overflow-x: auto; }
.table-in { min-width: 920px; padding: 6px 24px 10px; }
.table-head, .game-grid { display: grid; grid-template-columns: minmax(250px, 1.6fr) repeat(3, minmax(160px, 1fr)); gap: 8px 12px; align-items: center; }
.table-head { padding: 14px 0 12px; border-bottom: 1px solid var(--line); }
.game { padding: 14px 0 16px; border-bottom: 1px solid var(--hair); }
.game:last-child { border-bottom: 0; }
.game-meta { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 13px; }
.game-meta .when { font-family: var(--mono); color: var(--text-2); }
.team-cell { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 16px; font-weight: 700; }
.mono-badge { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); font-size: 10px; font-weight: 800; letter-spacing: 0.04em; color: var(--text-2); }
.empty-cell { min-height: 48px; display: grid; place-items: center; color: var(--text-3); }

.match-card { display: flex; flex-direction: column; gap: 14px; }
.match-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.match-head .teams { font-size: 17px; font-weight: 700; }
.match-head .teams .v { color: var(--text-3); font-weight: 500; }
.match-head .when { font-family: var(--mono); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sub-row { display: flex; align-items: center; gap: 8px; }
.sub-row .label { width: 64px; flex: none; }

.seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--surface); }
.seg button { height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--text-3); font-weight: 600; font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface); }
.tabs button { height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); font-weight: 700; font-size: 15px; }
.tabs button[aria-pressed="true"] { background: var(--paper); color: var(--paper-ink); font-weight: 800; }

.group-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.group-tabs button { height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; }
.group-tabs button[aria-pressed="true"] { background: var(--paper); color: var(--paper-ink); font-weight: 700; }

.market { display: flex; flex-direction: column; gap: 12px; }
.market-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.margin { font-family: var(--mono); font-size: 12px; color: var(--text-3); white-space: nowrap; }
.ladder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.col-head { padding: 0 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-head { margin-bottom: -4px; }
.prop-row { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 8px; align-items: center; }
.prop-row .who { font-weight: 700; font-size: 15px; }
.prop-row .who small { display: block; font-weight: 500; font-size: 12px; color: var(--text-3); }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--text-3); }
.crumbs a { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.game-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); gap: 24px; align-items: center; padding: 36px 40px; border-radius: var(--r-l); background: var(--surface); }
.versus { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.versus .side { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--text-2); }
.big-badge { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--surface-2); font-size: 18px; font-weight: 900; font-stretch: 125%; color: var(--text); }
.versus .at { font-size: 18px; font-weight: 800; font-stretch: 125%; color: var(--text-3); }

.empty { padding: 40px 24px; text-align: center; color: var(--text-2); background: var(--surface); border-radius: 22px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

/* ---------- ticket ---------- */
.ticket-dock { position: fixed; left: 0; right: 0; bottom: 20px; z-index: 40; display: flex; justify-content: center; padding: 0 var(--gutter); pointer-events: none; }
.ticket-bar { pointer-events: auto; width: 100%; max-width: 980px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 12px 12px 22px; border-radius: 22px; background: var(--paper); color: var(--paper-ink); box-shadow: 0 24px 48px rgba(10, 2, 24, 0.55); }
.count { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--coral); color: var(--on-coral); font: 800 15px var(--mono); flex: none; }
.tb-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--paper-mute); text-transform: uppercase; }
.tb-value { font-size: 16px; font-weight: 800; }
.tb-open { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.tb-stake { display: flex; align-items: center; gap: 10px; }
.tb-stake .field { width: 120px; }
.tb-actions { margin-left: auto; display: flex; gap: 8px; }
.btn-paper-ghost { height: 48px; padding: 0 18px; border: 1.5px solid var(--paper-field); border-radius: 14px; background: transparent; color: var(--paper-ink); font-weight: 700; font-size: 15px; }
.ticket-bar .btn-coral { height: 48px; border-radius: 14px; padding: 0 26px; }

.scrim { position: fixed; inset: 0; background: rgba(16, 4, 34, 0.62); z-index: 50; }
.sheet { position: fixed; z-index: 60; background: var(--paper); color: var(--paper-ink); display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(10, 2, 24, 0.6); }
.sheet.panel { right: 24px; bottom: 24px; width: 440px; max-height: calc(100vh - 48px); border-radius: 26px; }
.sheet-body { padding: 18px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.sheet-handle { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--paper-field); margin-top: 10px; display: none; }
.sheet h2 { margin: 0; display: flex; align-items: baseline; gap: 10px; font-size: 20px; font-weight: 900; font-stretch: 125%; text-transform: uppercase; }
.sheet h2 small { font-size: 14px; font-weight: 600; font-stretch: 100%; text-transform: none; color: var(--paper-mute); }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link-btn { height: 44px; padding: 0 6px; border: 0; background: transparent; color: var(--paper-mute); font-weight: 700; font-size: 14px; text-decoration: underline; }
.paper-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--paper-tint); }
.paper-tabs button { height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--paper-mute); font-weight: 700; font-size: 15px; }
.paper-tabs button[aria-pressed="true"] { background: var(--paper-ink); color: var(--paper); font-weight: 800; }
.paper-tabs button:disabled { opacity: 0.45; }
.pick { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--paper-line); }
.pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pick-main b { font-size: 16px; font-weight: 800; }
.pick-main span { font-size: 13px; color: var(--paper-mute); }
.pick-odds { font: 700 16px var(--mono); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.pick-odds .was { font-weight: 500; font-size: 12px; color: var(--paper-mute); text-decoration: line-through; }
.pick-x { width: 44px; height: 44px; border: 0; background: transparent; color: var(--paper-mute); display: grid; place-items: center; flex: none; }
.pick-stake { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.field { height: 48px; padding: 0 14px; border: 2px solid var(--paper-ink); border-radius: 14px; background: #FFFFFF; color: var(--paper-ink); font: 600 18px var(--mono); width: 100%; min-width: 0; }
.field.small { height: 44px; font-size: 16px; border-width: 1.5px; }
.field::placeholder { color: #8C7BB8; }
.field-label { font-size: 13px; font-weight: 700; color: var(--paper-mute); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick button { height: 44px; border: 1.5px solid var(--paper-field); border-radius: 12px; background: #FFFFFF; color: var(--paper-ink); font: 700 14px var(--mono); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle-row b { font-size: 15px; }
.toggle-row span { display: block; font-size: 12px; color: var(--paper-mute); }
.switch { flex: none; width: 60px; height: 44px; border: 0; background: transparent; display: grid; place-items: center; padding: 0; }
.switch i { position: relative; display: block; width: 52px; height: 30px; border-radius: 999px; background: var(--paper-field); transition: background 0.15s; }
.switch i::after { content: ''; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; transition: left 0.15s; }
.switch[aria-pressed="true"] i { background: var(--paper-ink); }
.switch[aria-pressed="true"] i::after { left: 26px; background: var(--coral); }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.sum-row span { color: var(--paper-mute); font-weight: 600; }
.sum-row b { font: 700 16px var(--mono); }
.sum-row.big b { font-size: 20px; }
.issues { margin: 0; padding: 10px 12px; border-radius: 12px; background: #FFE9E5; color: #7A1E12; font-size: 13px; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.receipt { display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: left; }
.receipt .stamp { align-self: flex-start; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--paper-ink); color: var(--paper); display: grid; place-items: center; font-size: 12px; font-weight: 900; letter-spacing: 0.1em; }

/* ---------- bets / cashier ---------- */
.bet { display: flex; flex-direction: column; gap: 10px; }
.bet-top { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.bet-top .kind { color: var(--lilac); }
.bet-top .when { color: var(--text-3); }
.leg { display: flex; align-items: center; gap: 10px; }
.leg-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--text-3); }
.leg-dot.won { background: var(--lilac); border-color: var(--lilac); }
.leg-dot.lost { background: var(--coral); border-color: var(--coral); }
.leg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.leg-main b { font-size: 15px; font-weight: 800; }
.leg-main span { font-size: 12px; color: var(--text-3); }
.hr { height: 1px; background: var(--line); }
.bet-money { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); }
.bet-money b { font-family: var(--mono); color: var(--text); }
.stamp-chip { flex: none; display: inline-grid; place-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: 0.08em; }
.stamp-chip.won { background: var(--lilac); color: var(--paper-ink); }
.stamp-chip.lost { background: var(--surface-2); color: var(--text-2); }
.stamp-chip.cashed { background: var(--paper); color: var(--paper-ink); }
.btn-outline-lilac { height: 46px; border: 1.5px solid var(--lilac); border-radius: 14px; background: transparent; color: var(--text); font-weight: 800; font-size: 15px; }
.btn-outline-lilac:hover { background: var(--surface-2); }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 16px; align-items: start; }
.big-money { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.big-money b { font: 600 34px var(--mono); letter-spacing: -0.02em; }
.big-money span { font-size: 14px; font-weight: 800; color: var(--coral); }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-2); }
.kv b { font-family: var(--mono); font-weight: 600; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.tag.coral { background: var(--coral); color: var(--on-coral); font-weight: 900; }
.qr-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.qr { flex: none; width: 148px; height: 148px; border-radius: 14px; background: #FFFFFF; padding: 10px; }
.qr svg { width: 100%; height: 100%; display: block; }
.addr { font: 600 14px var(--mono); word-break: break-all; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
.note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; line-height: 1.45; }
.dark-field { height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); font: 600 16px var(--mono); width: 100%; }
.dark-field::placeholder { color: var(--text-3); }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.form-err { color: #FFB4A8; font-size: 13px; margin: 0; }
.ok-msg { color: var(--lilac); font-size: 14px; margin: 0; }
.hist { display: flex; flex-direction: column; }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.hist-row:last-child { border-bottom: 0; }
.hist-row b { font-size: 15px; }
.hist-row span { display: block; font-size: 12px; color: var(--text-3); }
.amt { font: 600 15px var(--mono); white-space: nowrap; }
.amt.plus { color: var(--lilac); }

.auth { max-width: 440px; width: 100%; margin: 24px auto 0; display: flex; flex-direction: column; gap: 16px; }

.toast { position: fixed; left: 50%; top: 88px; transform: translateX(-50%); z-index: 70; padding: 12px 18px; border-radius: 14px; background: var(--paper); color: var(--paper-ink); font-weight: 700; box-shadow: 0 16px 40px rgba(10, 2, 24, 0.5); }

.search-box { position: relative; }
.search-box input { padding-left: 44px; }
.search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.results { display: flex; flex-direction: column; gap: 8px; }
.result { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface); color: var(--text); }
.result:hover { color: var(--text); background: var(--surface-2); }
.result small { display: block; color: var(--text-3); font-size: 12px; }

/* ---------- phone ---------- */
.m-only { display: none; }
.icon-btn.coral { background: var(--coral); color: var(--on-coral); border: 0; }
.bottom-nav { display: none; }
@media (max-width: 1023px) {
  :root { --gutter: 16px; }
  .d-only { display: none !important; }
  .icon-btn.m-only { display: grid; }
  .table { overflow: visible; }
  .table-in { min-width: 0; padding: 2px 12px 6px; }
  .table-head, .game-grid { grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 6px; }
  .table-head { padding: 12px 0 10px; font-size: 10px; letter-spacing: 0.08em; }
  .team-cell { gap: 0; font-size: 14px; min-height: 54px; min-width: 0; }
  .team-cell span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .team-cell .mono-badge { display: none; }
  .game-grid .price, .hero-grid .price { flex-direction: column; justify-content: center; align-items: center; gap: 0; min-height: 54px; padding: 0 4px; font-size: 14px; }
  .game-grid .price .pl, .hero-grid .price .pl { font-size: 11px; }
  .game-grid .price.end, .hero-grid .price.end { justify-content: center; }
  .match-head { flex-direction: column; gap: 2px; }
  .hdr-in { min-height: 62px; gap: 10px; }
  .brand-tile { width: 32px; height: 32px; border-radius: 9px; font-size: 18px; }
  .brand-word { font-size: 17px; }
  .balance { background: transparent; padding: 0 4px; height: auto; }
  .balance small { font-size: 9px; }
  .balance b { font-size: 13px; }
  .sportbar { border-bottom: 0; }
  .sportbar-in { padding: 4px var(--gutter) 10px; }
  .page { padding: 8px var(--gutter) 40px; gap: 26px; }
  .hero { padding: 24px 20px; gap: 18px; border-radius: 22px; }
  .hero-grid { grid-template-columns: 74px repeat(3, minmax(0, 1fr)); gap: 6px; }
  .hero-grid .team { font-size: 14px; }
  .h2 { font-size: 16px; }
  .card { padding: 16px; }
  .game-hero { padding: 24px 20px; }
  .versus { display: none; }
  .group-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .group-tabs::-webkit-scrollbar { display: none; }
  .group-tabs button { flex: none; }
  /* On a phone every labelled price stacks its line over its odds so nothing gets cut off. */
  .market .price, .match-card .price { flex-direction: column; justify-content: center; align-items: center; gap: 1px; min-height: 56px; padding: 4px 8px; }
  .market .price .pl, .match-card .price .pl { font-size: 12px; max-width: 100%; }
  .market .price.end, .match-card .price.end { justify-content: center; }
  .col-head { padding: 0; text-align: center; }
  .prop-row { grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)); gap: 6px; }
  .big-badge { width: 64px; height: 64px; font-size: 15px; }
  /* Content fades out under the floating bar and nav instead of showing through the gaps. */
  .app::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 39; pointer-events: none; background: linear-gradient(180deg, rgba(34, 11, 64, 0) 0%, var(--bg) 62%); }
  .bottom-nav { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); height: 64px; z-index: 45; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-3); font-size: 11px; font-weight: 700; }
  .bottom-nav a.is-on { color: var(--coral); font-weight: 800; }
  .ticket-dock { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); padding: 0 12px; }
  .ticket-bar { padding: 8px 8px 8px 14px; gap: 10px; border-radius: 18px; flex-wrap: nowrap; }
  .tb-open { flex: 1; min-width: 0; }
  .tb-open .tb-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ticket-bar .tb-stake, .ticket-bar .tb-returns, .ticket-bar .btn-coral { display: none; }
  .sheet.panel { left: 0; right: 0; bottom: 0; width: auto; max-height: 88vh; border-radius: 26px 26px 0 0; }
  .sheet.panel .sheet-body { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .sheet-handle { display: block; }
  .foot-in { padding-bottom: calc(176px + env(safe-area-inset-bottom, 0px)); }
  .toast { top: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .price.is-up, .price.is-down { animation: none; }
  * { transition: none !important; }
}
