:root {
  --bg: #0b1120;
  --panel: #111a2e;
  --panel-2: #17223a;
  --border: #22304d;
  --text: #e7ecf5;
  --text-2: #c9d3e4;
  --muted: #8d9bb5;
  --accent: #22c55e;
  --accent-ink: #052e14;
  --blue: #38bdf8;
  --warn: #f59e0b;
  --danger: #f87171;
  --good: #0ca30c;
  --critical: #d03b3b;
  --radius: 12px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* Outcome colors: slot N = the Nth outcome of a pot. Validated for colorblind separation
   and 3:1 contrast on the dark panels. --on-c is the label ink that reads on that fill. */
.s1 { --c: #3987e5; --on-c: #0b1120; }
.s2 { --c: #d95926; --on-c: #0b1120; }
.s3 { --c: #199e70; --on-c: #0b1120; }
.s4 { --c: #c98500; --on-c: #0b1120; }
.s5 { --c: #d55181; --on-c: #0b1120; }
.s6 { --c: #008300; --on-c: #ffffff; }
.s7 { --c: #9085e9; --on-c: #0b1120; }
.s8 { --c: #e66767; --on-c: #0b1120; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.9rem; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; margin-top: 1.5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: var(--accent); }
.neg { color: var(--danger); }
.eyebrow {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--panel); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- Chrome --------------------------------------------------------------- */
.demo-banner {
  background: #3b2a06; color: #fcd34d; text-align: center;
  font-size: .78rem; padding: 4px 16px; letter-spacing: .02em;
}
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 17, 32, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px 28px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.1rem; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.logo { flex: none; }
.nav-main { display: flex; gap: 22px; }
.nav-main a, .footer-links a { color: var(--muted); font-weight: 500; }
.nav-main a:hover, .nav-main a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-login { color: var(--muted); }
.balance {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums;
}
.balance:hover { text-decoration: none; border-color: var(--accent); }
.balance.bump { animation: bump .6s ease; }
.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #3987e5, #199e70); color: #fff; font-weight: 800; font-size: .85rem;
}
.avatar.small { width: 24px; height: 24px; font-size: .72rem; margin-right: 8px; vertical-align: middle; }

.dropdown { position: relative; }
.dropdown summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--text); }
.dropdown summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 190px; z-index: 40;
  display: grid; padding: 6px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow);
}
.menu-panel a, .menu-panel button {
  display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--panel-2); text-decoration: none; }
.menu-panel form { margin: 0; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.mobile-menu { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.mobile-menu summary { width: 36px; height: 36px; justify-content: center; border: 1px solid var(--border); border-radius: 8px; }

main { max-width: 1160px; margin: 0 auto; padding: 28px 16px 56px; }

.site-footer { border-top: 1px solid var(--border); background: #0a0f1c; }
.footer-inner {
  max-width: 1160px; margin: 0 auto; padding: 28px 16px 12px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-brand p { color: var(--muted); font-size: .88rem; max-width: 420px; margin: 8px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: flex-start; }
.fine-print { max-width: 1160px; margin: 0 auto; padding: 0 16px 28px; color: #62708a; font-size: .8rem; }

/* --- Buttons, chips, badges ----------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 9px; padding: 10px 18px; cursor: pointer; white-space: nowrap;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-busy { opacity: .6; cursor: progress; }
.btn.small { padding: 6px 12px; font-size: .88rem; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { border-color: var(--blue); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--text); cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px;
}
.chip:hover { border-color: var(--blue); }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
a.chip { display: inline-flex; align-items: center; gap: 6px; }
a.chip:hover { text-decoration: none; }
.chip-count { font-size: .75rem; font-weight: 700; opacity: .6; }
.league-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 4px; }
.more-note { margin: 14px 0 0; }

.badge {
  display: inline-block; border-radius: 999px; padding: 2px 8px; white-space: nowrap;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.badge-open, .badge-bet-pending { background: #0b2536; color: var(--blue); }
.badge-closed { background: #33230a; color: var(--warn); }
.badge-settled, .badge-refunded, .badge-bet-refunded, .badge-log { background: var(--panel-2); color: var(--muted); }
.badge-won, .badge-bet-won { background: var(--accent); color: var(--accent-ink); }
.badge-bet-lost { background: #2d1216; color: var(--danger); }
.badge-won { margin-left: 2px; }
.badge-live { background: #3a0d12; color: #ff6b6b; }
.badge-live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: blink 1.4s infinite; }

.scoreline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: .9rem; color: var(--text-2); }
.scoreline b { color: var(--text); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.scoreline.is-live .muted { color: #ff6b6b; }
.scoreboard {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 14px;
  padding: 12px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
.scoreboard-team { display: flex; align-items: baseline; gap: 12px; }
.scoreboard-team span { color: var(--text-2); }
.scoreboard-team strong { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.scoreboard-detail { font-size: .85rem; font-weight: 700; color: var(--muted); }
.scoreboard.is-live .scoreboard-detail { color: #ff6b6b; }

.feed-panel { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.feed-panel-main { flex: 1; min-width: 260px; }
.feed-panel p { margin: 0 0 8px; }
.feed-errors summary { cursor: pointer; color: var(--warn); font-size: .88rem; }
.feed-errors pre { white-space: pre-wrap; font-size: .8rem; color: var(--muted); max-height: 200px; overflow: auto; }
.badge-log { margin-right: 6px; }

.countdown {
  display: inline-block; font-size: .75rem; font-weight: 600; white-space: nowrap;
  color: var(--text-2); background: var(--panel-2); border-radius: 999px; padding: 2px 9px;
}
.countdown:empty { display: none; }
.countdown.soon { color: #fcd34d; background: #33230a; }
.countdown.closed { color: var(--warn); background: #33230a; }
.countdown.upcoming { color: var(--muted); }
.badge-upcoming { background: var(--panel-2); color: var(--muted); }

.swatch { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* Inline notices (the "no admin yet" note on sign-up, draft and demo-player warnings). */
.flash { padding: 10px 14px; margin-bottom: 16px; border: 1px solid; border-radius: 8px; font-size: .92rem; }
.flash.success { background: #0c2a18; border-color: #166534; color: #bbf7d0; }
.flash.error { background: #2d1216; border-color: #7f1d1d; color: #fecaca; }
.flash.info { background: #0c2233; border-color: #075985; color: #bae6fd; }
.flash code { color: inherit; }

/* --- Confirm-your-email bar, account page ------------------------------------------ */
.confirm-bar { background: #0c2233; border-bottom: 1px solid #075985; color: #bae6fd; font-size: .88rem; }
.confirm-bar-inner {
  max-width: 1160px; margin: 0 auto; padding: 8px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px;
}
.confirm-bar form { margin: 0; }
.confirm-bar strong { color: #e0f2fe; }
.link-button { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-weight: 700; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.account-grid { margin-bottom: 20px; }
.account-grid h2, .account-details h2 { margin-top: 0; }
.account-email { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; overflow-wrap: anywhere; }
.account-more { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.account-more summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.account-more .form { margin-top: 12px; }
.account-delete { margin-top: 20px; border-color: #3a1a1f; }
.account-delete summary { cursor: pointer; font-weight: 600; color: var(--danger); }
.account-delete p { margin: 12px 0; }

/* --- Notifications: the account panel and the after-a-pick offer --------------------- */
.account-notifications { margin-bottom: 20px; }
.account-notifications h2 { margin-top: 0; }
.push-status { margin: 0 0 12px; font-weight: 600; }
.push-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.push-buttons form { margin: 0; }
.push-prefs { display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.push-prefs label.check { display: flex; align-items: center; gap: 10px; color: var(--text); }
.push-prefs input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.push-ask { border-color: #075985; background: linear-gradient(160deg, #0c2233, var(--panel) 70%); }
.push-ask:not(.side-card) { margin: 0 0 8px; }
.push-ask h3 { margin: 0 0 6px; font-size: 1rem; }
.push-ask p { margin: 0 0 12px; font-size: .9rem; color: var(--text-2); }
.push-ask-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- Toasts ----------------------------------------------------------------- */
.toasts {
  position: fixed; top: 80px; right: 16px; z-index: 50;
  display: grid; gap: 8px; width: min(400px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
  animation: toast-in .25s ease; transition: opacity .25s, transform .25s;
}
.toast.error { border-color: #7f1d1d; }
.toast.hide { opacity: 0; transform: translateX(16px); }
.toast-icon {
  display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1px;
  border-radius: 50%; font-weight: 800; font-size: .72rem;
}
.toast.success .toast-icon { background: var(--accent); color: var(--accent-ink); }
.toast.error .toast-icon { background: var(--danger); color: #2d1216; }
.toast.info .toast-icon { background: var(--blue); color: #062033; }
.toast-text { flex: 1; font-size: .92rem; }
.toast-close { background: none; border: 0; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.toast-close:hover { color: var(--text); }

/* --- The pot bar -------------------------------------------------------------- */
.pot-bar { display: flex; gap: 2px; height: 24px; border-radius: 4px; overflow: hidden; }
.pot-bar.pot-sm { height: 8px; }
.pot-bar.is-empty { background: var(--panel-2); }
.pot-bar.is-empty::after {
  content: "Nothing in the pot yet"; margin: auto; font-size: .75rem; color: var(--muted);
}
.pot-sm.is-empty::after { content: none; }
.pot-seg {
  position: relative; flex: 0 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--c); transition: flex-grow .6s cubic-bezier(.2, .8, .2, 1), filter .15s;
}
.pot-seg.is-zero { display: none; }
.pot-seg[tabindex] { cursor: default; }
.pot-seg[tabindex]:hover, .pot-seg[tabindex]:focus-visible { filter: brightness(1.18); }
.pot-seg:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #fff; }
.pot-seg-label {
  position: relative; z-index: 1; pointer-events: none; white-space: nowrap;
  font-size: .78rem; font-weight: 800; color: var(--on-c);
}
.pot-seg.no-label .pot-seg-label { visibility: hidden; }
.pot-yours { position: absolute; top: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .42); transition: width .3s; }
.pot-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; }
.pot-legend li { display: flex; align-items: center; gap: 7px; }
.pot-legend .legend-label { color: var(--text-2); }

.viz-tip {
  position: fixed; z-index: 60; pointer-events: none; min-width: 120px;
  padding: 8px 10px; font-size: .82rem; color: var(--text-2);
  background: #0e1628; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.viz-tip.show { opacity: 1; transform: none; }
.viz-tip .tip-head { color: var(--muted); font-size: .75rem; margin-bottom: 4px; }
.viz-tip .tip-row { display: flex; align-items: center; gap: 8px; }
.viz-tip .tip-row strong { color: var(--text); font-size: .92rem; }
.viz-tip .key { display: inline-block; width: 12px; height: 2px; border-radius: 1px; background: var(--c); }

/* --- Home ------------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center; }
.hero h1 { font-size: 2.7rem; margin: 6px 0 14px; }
.lead { font-size: 1.08rem; color: var(--text-2); max-width: 560px; margin: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.featured {
  display: grid; gap: 12px; color: var(--text);
  background: linear-gradient(160deg, #15233f 0%, var(--panel) 60%);
  transition: border-color .15s;
}
.featured:hover { border-color: var(--blue); text-decoration: none; }
.featured-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.featured .matchup { font-size: 1.2rem; }
.featured-total { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.featured-total strong { font-size: 2.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.hero-stats { margin-top: 32px; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 36px 0 14px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.empty {
  background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; color: var(--muted);
}
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.event-card {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text);
  transition: border-color .15s, transform .15s;
}
.event-card:hover { border-color: var(--blue); text-decoration: none; transform: translateY(-2px); }
.event-card[hidden] { display: none; }
.event-card-top, .event-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.event-card-foot { margin-top: auto; }
.sport { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--blue); }
.matchup { font-weight: 700; font-size: 1.05rem; }
.vs { color: var(--muted); font-weight: 400; font-size: .78em; margin: 0 .2em; }
.card-pot { display: grid; gap: 6px; margin-top: 4px; }
.card-pot-head { display: flex; justify-content: space-between; align-items: baseline; }
.card-pot-head strong { font-size: 1.05rem; }
.mini-odds { display: flex; gap: 8px; margin-top: 4px; }
.mini-odd {
  flex: 1; min-width: 0; display: grid; gap: 2px; padding: 8px 10px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
}
.mini-odd.won { border-color: var(--accent); }
.mini-label { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-price { font-weight: 800; font-size: 1.15rem; }
.mini-share { font-size: .72rem; color: var(--muted); }
.mini-odd.won .mini-share { color: var(--accent); font-weight: 700; }

/* --- Event page --------------------------------------------------------------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); }
.event-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.event-hero h1 { font-size: 2.3rem; margin: 4px 0 8px; }
.event-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); }
.event-hero-side { display: grid; justify-items: end; gap: 6px; }
.hero-figure { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.matchup-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: -8px 0 22px; padding: 14px 18px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
.matchup-team { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.matchup-side { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.matchup-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matchup-record { font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.team-form { display: inline-flex; align-items: center; gap: 3px; }
.team-form .muted { margin-right: 3px; }
.form-result {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px;
  font-size: .68rem; font-weight: 800;
}
.form-result.is-W { background: #0c2a18; color: var(--accent); }
.form-result.is-L { background: #2d1216; color: var(--danger); }
.form-result.is-T { background: var(--panel-2); color: var(--muted); }
.matchup-where { grid-column: 1 / -1; margin: 2px 0 0; }
@media (max-width: 760px) { .matchup-info { grid-template-columns: 1fr; } }
.event-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.pools { display: grid; gap: 18px; }
.event-aside { display: grid; gap: 16px; position: sticky; top: 84px; }

.pool-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.pool-head h2 { margin: 0 0 6px; }
.pool-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--muted); font-size: .85rem; }
.pot-total { display: grid; justify-items: end; text-align: right; }
.pot-total strong { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pot-bump { height: 1.2em; font-size: .8rem; font-weight: 700; color: var(--accent); opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.pot-bump.show { opacity: 1; transform: none; }

.odds { width: 100%; border-collapse: collapse; margin-top: 10px; }
.odds th {
  text-align: left; padding: 8px; border-bottom: 1px solid var(--border);
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
}
.odds th.num { text-align: right; }
.odds td { padding: 11px 8px; border-bottom: 1px solid var(--border); }
.odds tbody tr:last-child td { border-bottom: 0; }
.odds tbody tr:has(input:checked) td { background: rgba(56, 189, 248, .07); }
.odds tr.winner td { background: rgba(34, 197, 94, .08); }
.pick { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex: none; }
.price { font-size: 1.15rem; font-weight: 800; }
.price.tick-up, .price.tick-down { animation: tick 1.8s ease; }
.price.tick-up::after { content: " ▲"; font-size: .6em; color: var(--good); }
.price.tick-down::after { content: " ▼"; font-size: .6em; color: var(--critical); }

.slip { display: grid; gap: 12px; margin-top: 14px; padding: 16px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.slip-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.stake { display: grid; gap: 4px; }
.money-input {
  display: flex; align-items: center; padding: 0 12px 0 0; color: var(--muted);
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
}
.money-input:focus-within { outline: 2px solid var(--blue); outline-offset: -1px; }
.money-input input { width: 100px; border: 0; background: transparent; padding-right: 4px; font-weight: 700; }
.money-input input:focus { outline: none; }
.slip .chips { padding-bottom: 3px; }
.place-bet { margin-left: auto; }
.estimate { font-size: .92rem; color: var(--text-2); }
.estimate p { margin: 0; }
.est-return { font-size: 1.35rem; font-weight: 800; color: var(--accent); }
.est-moves { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 6px; color: var(--muted); font-size: .85rem; }
.est-moves strong { color: var(--text); }
.est-warn { display: flex; gap: 8px; margin-top: 8px; color: #fcd34d; font-size: .85rem; }
.est-warn::before { content: "⚠"; }

.pool-note { margin: 14px 0 0; color: var(--muted); font-size: .9rem; }
.pool-note strong { color: var(--text); }

.history { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.history summary { cursor: pointer; font-weight: 600; font-size: .92rem; list-style: none; }
.history summary::-webkit-details-marker { display: none; }
.history summary::before { content: "▸"; display: inline-block; width: 1em; color: var(--muted); transition: transform .15s; }
.history[open] summary::before { transform: rotate(90deg); }
.history summary .muted { font-weight: 400; }
.chart { position: relative; margin-top: 12px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: #1d2a44; stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .end-label { fill: var(--text-2); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--c); stroke: var(--panel); stroke-width: 2; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .82rem; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; background: var(--c); }

.admin-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 16px; padding: 12px; border: 1px dashed var(--warn); border-radius: 8px;
}
.admin-bar form { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.admin-bar select { width: 290px; max-width: 100%; }
.admin-tag { margin-right: 4px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--warn); }

.side-card { padding: 16px; }
.side-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: .95rem; }
.feed, .bet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feed li { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 2px 9px; font-size: .86rem; line-height: 1.35; }
.feed li .swatch { margin-top: 4px; }
.feed li.muted { display: block; }
.feed li.is-new { animation: feed-in .6s ease; }
.feed time { font-size: .75rem; white-space: nowrap; margin-top: 1px; }
.feed-text { display: grid; min-width: 0; }
.feed-text .muted { font-size: .78rem; }
.bet-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.bet-list-main { display: grid; min-width: 0; font-size: .9rem; }
.bet-list-value { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.explainer p { margin: 0 0 8px; color: var(--text-2); font-size: .9rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }

/* --- Forms ------------------------------------------------------------------ */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.form { display: grid; gap: 16px; max-width: 760px; }
.form label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.form label.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.form label.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
fieldset { display: grid; gap: 14px; margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); }
legend { padding: 0 6px; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hint { margin: -6px 0 0; font-size: .82rem; color: var(--muted); }
.auth { max-width: 400px; margin: 24px auto; }
.auth .form { margin: 16px 0; }
.auth-logo { margin-bottom: 12px; }
.narrow-card { max-width: 520px; }
.narrow-card h2 { margin-top: 0; }

/* --- Stats and tables ------------------------------------------------------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.stat { padding: 14px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.stat span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.stat strong { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; }
.stat a { display: block; }
.stat span.small { display: block; text-transform: none; letter-spacing: 0; font-size: .82rem; }
.stat-wide { grid-column: span 2; }
@media (max-width: 560px) { .stat-wide { grid-column: auto; } }
.table-wrap { overflow-x: auto; margin-bottom: 28px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
}
.table th.num { text-align: right; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.pick-cell { display: inline-flex; align-items: center; gap: 8px; }
.leaderboard .rank { width: 48px; }
.rank-badge {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--panel-2); font-weight: 800; font-size: .8rem; font-variant-numeric: tabular-nums;
}
.rank-badge.top { background: var(--accent); color: var(--accent-ink); }
.is-you td { background: rgba(56, 189, 248, .06); }
.demo-note { margin: -6px 0 12px; }

/* --- Weekly drawing tab: the player's own week ------------------------------------ */
.board-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.my-week { margin: 20px 0 8px; }
.my-week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.my-week-head h2 { margin: 0; }
.my-week-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.streak {
  padding: 3px 10px; border-radius: 999px; font-size: .85rem; font-weight: 800; white-space: nowrap;
  color: #fdba74; background: #33190a; border: 1px solid #7c2d12;
}
.my-entries { margin: 0; color: var(--text-2); }
.my-entries strong { font-size: 1.6rem; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.day {
  display: grid; justify-items: center; align-content: start; gap: 6px; padding: 10px 4px; text-align: center;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
}
.day-name { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.day-box {
  display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--border); border-radius: 8px;
  font-weight: 800; color: var(--accent-ink);
}
.day-note { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.day.is-earned { background: #10281b; border-color: #1f5135; }
.day.is-earned .day-box { background: var(--accent); border-color: var(--accent); }
.day.is-earned .day-note { color: var(--accent); font-weight: 700; }
.day.is-today { border-color: var(--blue); }
.day.is-today .day-name, .day.is-today .day-note { color: var(--text); font-weight: 700; }
.day.is-future .day-box, .day.is-none .day-box { border-style: dashed; }
.day-progress { width: 80%; height: 4px; overflow: hidden; background: var(--border); border-radius: 2px; }
.day-progress i { display: block; height: 100%; background: var(--blue); }
.my-week-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.my-week-foot p { margin: 0 0 4px; }
.player { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.player .avatar.small { margin-right: 2px; }
.player-username { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  .week-days { gap: 4px; }
  .day { padding: 8px 2px; }
  .day-name { font-size: .62rem; letter-spacing: 0; }
  .day-box { width: 24px; height: 24px; }
  .day-note { font-size: .68rem; }
  /* Leaderboards fit a phone: short names, smaller day dots, tighter cells. */
  .leaderboard td, .leaderboard th { padding: 8px 6px; }
  .leaderboard .rank { width: 36px; }
  .leaderboard th { letter-spacing: .02em; }
  .player { gap: 4px; }
  .player .avatar { display: none; }
  .player .badge { padding: 1px 5px; font-size: .58rem; }
  .player-username { max-width: 84px; }
}
.gap-row td { padding: 2px 14px; text-align: center; color: var(--muted); letter-spacing: .3em; }

/* --- How it works, errors ----------------------------------------------------- */
.prose { max-width: 740px; }
.prose p, .prose li { color: var(--text-2); }
.prose li { margin-bottom: 8px; }
.prose .lead { margin-bottom: 20px; }
.steps { padding-left: 22px; }
.steps strong { color: var(--text); }
.example { display: grid; gap: 12px; margin: 12px 0 8px; }
.example p { margin: 0; }
.example ol { padding-left: 20px; margin: 4px 0 0; }
.error-page { max-width: 520px; margin: 48px auto; text-align: center; }
.error-code { font-size: 5rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--panel-2); -webkit-text-stroke: 1px var(--border); }

/* --- Free-to-play: contest, prizes, sponsors, leagues ------------------------------ */
.contest-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 28px; padding: 14px 18px;
  color: var(--text); background: linear-gradient(90deg, #13301f, var(--panel) 70%);
  border: 1px solid #1f5135; border-radius: var(--radius);
}
.contest-banner:hover { text-decoration: none; border-color: var(--accent); }
.contest-trophy { font-size: 1.4rem; }
.contest-text { flex: 1; min-width: 220px; }
.contest-banner + .hero-stats { margin-top: 16px; }

.prize-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
@media (min-width: 561px) { .prize-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
@media (max-width: 560px) { .prize-grid .prize-card.first { grid-column: 1 / -1; } }
.prize-card { display: grid; gap: 4px; padding: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.prize-card.first { border-color: var(--accent); background: linear-gradient(160deg, #13301f, var(--panel) 70%); }
.prize-place { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.prize-name { font-size: 1.1rem; }
.prize-amount { font-size: 2.2rem; font-weight: 800; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.prize-card.first .prize-amount { color: var(--accent); }
.sponsor-note { margin-top: -4px; }
.my-standing { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 20px 0 8px; padding: 14px 18px; }

.sponsor-line { margin: 8px 0 0; font-size: .88rem; color: var(--muted); }
.event-card-foot .sponsor-line { margin: 0; color: var(--warn); }
.ad-slot {
  position: relative; margin: 20px 0; padding: 14px 18px 14px 64px;
  background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-2);
}
.event-aside .ad-slot { margin: 0; }
.ad-slot p { margin: 0; font-size: .9rem; }
.ad-label {
  position: absolute; left: 14px; top: 15px; padding: 1px 6px; border-radius: 4px;
  font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border);
}
.referral p { margin: 0 0 10px; font-size: .9rem; color: var(--text-2); }
.referral .fine { margin: 10px 0 0; font-size: .75rem; color: var(--muted); }

.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 24px; }
.league-card { display: grid; gap: 4px; color: var(--text); }
.league-card:hover { border-color: var(--blue); text-decoration: none; }
.league-forms h2 { margin-top: 0; }
.league-actions { display: grid; justify-items: end; gap: 6px; }
.league-actions form { margin: 0; }
.league-code { letter-spacing: .12em; color: var(--text); }
.leave-form { margin-top: 20px; }

.details { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 12px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.hint-inline { font-size: .8rem; color: var(--muted); }

.prize-form h3 { margin: 0; }
.form .prize-row { display: grid; grid-template-columns: 44px minmax(0, 200px); gap: 8px; align-items: center; }
.prize-row .prize-place { font-size: .8rem; }
.cash-input {
  display: flex; align-items: center; padding-left: 12px; font-weight: 700; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
}
.cash-input:focus-within { outline: 2px solid var(--blue); outline-offset: -1px; }
.cash-input input { flex: 1; min-width: 0; padding-left: 4px; border: 0; background: transparent; font-weight: 700; font-variant-numeric: tabular-nums; }
.cash-input input:focus { outline: none; }
.prize-total { margin: 0; font-size: .9rem; color: var(--muted); }
.prize-total strong { color: var(--text); }
.sponsor-form { margin-top: 0; }
.payouts tr.is-unpaid td { background: rgba(245, 158, 11, .05); }
.pay-form, .paid-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.pay-form select, .pay-form input { padding: 6px 8px; font-size: .85rem; }
.pay-form input { width: 170px; }
.link-button.small { font-size: .82rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- Admin stats: one-hue daily bar charts ---------------------------------------- */
.chart-grid { margin-bottom: 8px; }
.chart-grid h2 { margin: 0 0 14px; font-size: 1rem; }
.bars {
  display: flex; align-items: flex-end; gap: 2px; height: 140px; padding-bottom: 1px;
  border-bottom: 1px solid var(--border);
}
.bar {
  flex: 1; min-width: 0; height: max(var(--h), 2px); border-radius: 4px 4px 0 0;
  background: var(--blue); opacity: .75; outline: none; cursor: default;
}
.bar.is-latest, .bar:hover, .bar:focus-visible { opacity: 1; }
.bars-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }

/* --- Profiles and badges ------------------------------------------------------------- */
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 8px; }
.profile-head h1 { margin: 0; }
.profile-head p { margin: 2px 0 0; }
.profile-avatar { width: 64px; height: 64px; font-size: 1.6rem; }
.profile-actions { display: flex; gap: 8px; margin-left: auto; }
.player a.player-username { color: var(--text); }
.player a.player-username:hover { color: var(--blue); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.badge-tile {
  display: grid; justify-items: center; gap: 2px; padding: 14px 10px; text-align: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
.badge-icon { font-size: 1.8rem; line-height: 1.2; }
.badge-name { font-weight: 700; }
.badge-how { font-size: .75rem; color: var(--muted); }
.badge-tile:not(.is-locked) { border-color: #1f5135; background: linear-gradient(160deg, #10281b, var(--panel) 70%); }
.badge-tile:not(.is-locked) .badge-how { color: var(--accent); }
.badge-tile.is-locked .badge-icon { filter: grayscale(1); opacity: .45; }
.result-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.result-list a {
  display: grid; grid-template-columns: 56px minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 6px 12px;
  padding: 10px 14px; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
}
.result-list a:hover { border-color: var(--blue); text-decoration: none; }
.result-game, .result-pick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-pick { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.result-outcome { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
@media (max-width: 760px) {
  .result-list a { grid-template-columns: 1fr auto; }
  .result-list .sport, .result-pick { display: none; }
  .profile-actions { margin-left: 0; }
}
.dup-group { margin-bottom: 14px; padding: 14px; }
.dup-group .table-wrap { margin: 10px 0 0; }
.dup-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.dup-head form { margin: 0 0 0 auto; }
.dup-flag { display: block; font-size: .78rem; color: var(--warn); }
.sponsor-form input { flex: 1; min-width: 160px; }

.rules h2 { font-size: 1.05rem; margin-top: 1.6rem; }

/* --- My picks: score cards ------------------------------------------------------ */
.pick-card {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; color: var(--text);
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.pick-card:hover { border-color: var(--blue); text-decoration: none; transform: translateY(-2px); }
.pick-card.is-live { border-color: #5c1a22; }
.pick-card.is-won { border-color: #1f5135; background: linear-gradient(160deg, #10281b, var(--panel) 60%); }
.pick-card-top, .pick-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px 10px; }
.pick-card-foot { flex-wrap: wrap; }
.pick-when { font-size: .8rem; color: var(--muted); }
.pick-teams { display: grid; gap: 4px; }
.pick-team {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  min-height: 42px; padding: 6px 12px; background: var(--panel-2); border-radius: 8px;
}
.pick-team-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; color: var(--text-2); }
.pick-team.is-mine { box-shadow: inset 3px 0 0 var(--c); }
.pick-team.is-mine .pick-team-name { font-weight: 800; color: var(--text); }
.mine-tag { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pick-team-score { grid-column: 3; min-width: 2ch; text-align: right; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pick-stake { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: .9rem; color: var(--text-2); }
.pick-stake strong { color: var(--text); }
.pick-result { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .9rem; }
.pick-margin { font-weight: 700; }
.pick-pays { margin-top: -4px; }
.pick-pays strong { color: var(--text-2); }
.earlier-picks { margin-top: 32px; }
.earlier-picks .event-grid { margin-top: 14px; }

/* --- Tutorial ------------------------------------------------------------------ */
/* Without JavaScript every step shows, stacked. app.js adds .is-live and shows one at a time. */
.tour { max-width: 600px; margin: 0 auto; }
.tour-top { display: flex; justify-content: space-between; align-items: center; min-height: 24px; margin-bottom: 12px; }
.tour-count { font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.tour-skip { font-size: .9rem; font-weight: 600; color: var(--muted); }
.tour-slides { display: grid; gap: 16px; touch-action: pan-y; }
.tour-slide {
  padding: 20px 20px 24px; text-align: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
}
.tour-slide h2 { margin: 22px 0 8px; font-size: 1.6rem; letter-spacing: -.02em; }
.tour-slide p { max-width: 460px; margin: 0 auto 8px; color: var(--text-2); }
.tour-slide p.muted { color: var(--muted); }
.tour.is-live .tour-slide {
  grid-area: 1 / 1; visibility: hidden; opacity: 0; transform: translateX(32px);
  transition: opacity .3s, transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s .35s;
}
.tour.is-live .tour-slide.is-past { transform: translateX(-32px); }
.tour.is-live .tour-slide.is-active { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.tour-nav { display: flex; justify-content: center; margin-top: 16px; }
.tour:not(.is-live) .tour-nav > :not([data-tour-done]) { display: none; }
.tour.is-live .tour-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.tour-nav [data-tour-back] { justify-self: start; }
.tour-nav [data-tour-back]:disabled { visibility: hidden; }
.tour-nav [data-tour-next], .tour-nav [data-tour-done] { justify-self: end; }
.tour-dots { display: flex; }
.tour-dot { display: grid; place-items: center; height: 28px; padding: 0 4px; border: 0; background: none; cursor: pointer; }
.tour-dot::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--border); transition: width .25s, background .25s; }
.tour-dot:hover::before { background: var(--muted); }
.tour-dot[aria-current="step"]::before { width: 22px; background: var(--accent); }

.tour-art {
  display: grid; place-items: center; min-height: 200px; padding: 22px 18px;
  background: radial-gradient(circle at 50% 0%, #1a2a4a, var(--bg) 75%);
  border: 1px solid var(--border); border-radius: 12px;
}
.art-welcome { display: grid; justify-items: center; gap: 14px; }
.art-welcome .logo { overflow: visible; }
.art-welcome .logo circle { transform-box: fill-box; animation: coin-drop .9s cubic-bezier(.3, 1.5, .5, 1) .25s both; }
.art-points {
  padding: 6px 16px; border-radius: 999px; font-size: 1.15rem; font-weight: 800;
  color: var(--accent); background: #0c2a18; border: 1px solid #166534;
}
.art-pot { display: grid; gap: 10px; width: 100%; max-width: 420px; text-align: left; }
.art-pot-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.art-pot-head strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.art-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 420px; }
.art-price {
  display: grid; gap: 2px; padding: 12px 14px; text-align: left;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
}
.art-price strong { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.art-price:last-of-type { border-color: var(--accent); }
.art-example { grid-column: 1 / -1; margin: 4px 0 0; font-size: .92rem; color: var(--text-2); }
.art-timeline {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  width: 100%; max-width: 440px; margin: 0; padding: 0; list-style: none;
}
.art-timeline::before { content: ""; position: absolute; top: 11px; left: 16.7%; right: 16.7%; height: 2px; background: var(--border); }
.art-timeline li { position: relative; display: grid; justify-items: center; gap: 4px; }
.art-timeline strong { margin-top: 6px; }
.art-timeline span:last-child { font-size: .85rem; color: var(--muted); }
.art-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 5px var(--bg), 0 0 0 6px var(--border); }
.art-dot.is-open { --c: var(--blue); }
.art-dot.is-live { --c: #ff6b6b; }
.art-dot.is-final { --c: var(--accent); }
.art-board { display: grid; gap: 10px; width: 100%; max-width: 380px; }
.art-prize {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; padding: 8px 12px;
  font-weight: 700; background: linear-gradient(90deg, #13301f, var(--panel)); border: 1px solid #1f5135; border-radius: 10px;
}
.art-prize span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-rows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; text-align: left; }
.art-rows li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
}
.art-rows li.is-you { border-color: var(--blue); background: #10233d; }
.art-checks { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; text-align: left; }
.art-checks li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.art-check {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  font-size: .85rem; font-weight: 800; color: var(--accent-ink); background: var(--accent);
}

/* --- "You called it!" screen ---------------------------------------------------- */
.win-screen {
  position: fixed; inset: 0; z-index: 70; width: min(440px, calc(100vw - 32px)); height: fit-content;
  max-height: calc(100vh - 32px); margin: auto; padding: 0; overflow: auto;
  color: var(--text); text-align: center;
  background: radial-gradient(circle at 50% 0%, #17402a 0%, var(--panel) 60%);
  border: 1px solid #1f5135; border-radius: 18px; box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
}
.win-screen::backdrop { background: rgba(5, 9, 18, .74); backdrop-filter: blur(3px); }
.win-inner { padding: 26px 22px 20px; animation: win-in .5s cubic-bezier(.2, 1.3, .4, 1); }
.win-badge {
  display: grid; place-items: center; width: 104px; height: 104px; margin: 0 auto 6px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, .28), transparent 70%);
}
.win-badge .logo { overflow: visible; }
.win-badge .logo circle { transform-box: fill-box; animation: coin-drop .9s cubic-bezier(.3, 1.5, .5, 1) .2s both; }
.win-screen h2 { margin: 0 0 6px; font-size: 2rem; letter-spacing: -.02em; }
.win-game { margin: 0; font-size: .92rem; color: var(--text-2); }
.win-amount {
  margin: 14px 0 6px; font-size: 3rem; font-weight: 800; line-height: 1; letter-spacing: -.03em;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.win-sub { margin: 0 0 6px; color: var(--text-2); }
.win-sub strong { color: var(--text); white-space: nowrap; }
.win-detail { margin: 0; font-size: .86rem; }
.win-list { display: grid; gap: 8px; margin: 16px 0 8px; padding: 0; list-style: none; text-align: left; }
.win-list li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
}
.win-list-main { display: grid; min-width: 0; }
.win-list-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-balance { margin: 16px 0 0; }
.win-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.win-actions form { margin: 0; }
.win-link { display: inline-block; margin-top: 12px; font-size: .88rem; }
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute; top: -16px; left: var(--x); width: 7px; height: 13px; border-radius: 2px;
  background: var(--c); opacity: 0; animation: confetti-fall var(--fall) cubic-bezier(.3, .5, .5, 1) var(--delay) forwards;
}
.confetti i.round { width: 9px; height: 9px; border-radius: 50%; }

/* --- Motion ----------------------------------------------------------------- */
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes tick { from { background: rgba(56, 189, 248, .22); } to { background: transparent; } }
@keyframes feed-in { from { opacity: 0; transform: translateX(-8px); background: rgba(34, 197, 94, .12); } }
@keyframes bump { 50% { transform: scale(1.08); } }
@keyframes blink { 50% { opacity: .3; } }
@keyframes coin-drop { from { opacity: 0; transform: translateY(-14px); } }
@keyframes win-in { from { opacity: 0; transform: scale(.92) translateY(10px); } }
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 105vh, 0) rotate(var(--spin)); }
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- Small screens ------------------------------------------------------------ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .event-layout { grid-template-columns: 1fr; }
  .event-aside { position: static; }
}
@media (max-width: 760px) {
  .nav-main, .nav-login, .user-name { display: none; }
  .mobile-menu { display: block; }
  .topbar-inner { column-gap: 12px; }
  .brand, .balance { white-space: nowrap; }
  .brand { font-size: 1rem; }
  .balance { padding: 4px 10px; }
  .hero h1 { font-size: 2rem; }
  .event-hero h1 { font-size: 1.7rem; }
  .event-hero-side { justify-items: start; }
  .hero-figure { font-size: 2.3rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .card { padding: 16px; }
  .pot-total strong { font-size: 1.5rem; }
  .place-bet { margin-left: 0; width: 100%; }
  .league-actions { justify-items: start; }
  .toasts { top: auto; bottom: 16px; }
}
