/* PredictXI player app. Themes swap the tokens only; components never use raw colours.
   H · Stadium View (default) is defined here; H2 and C add their own [data-theme] blocks. */

[data-theme="h"] {
  --bg: #CFE3F5;
  --surface: #FFFFFF;
  --surface-2: #EEF3F8;
  --line: #D5DFEA;
  --ink: #10233A;
  --ink-2: #48607A;
  --ink-inv: #FFFFFF;
  --ink-inv-2: #A9BCD0;
  --hero: #10233A;
  --accent-soft: #FFB4A0;
  --green: #00C282;
  --red: #FA3C09;
  --violet: #6655D3;
  --coin: #F5B700;
  --grass-a: #4E8F4B;
  --grass-b: #579A53;
  --rope: #B7C9DB;
  --pitch: #D9C9A3;
  --ok-bg: #E9FBF3;
  --ok-ink: #047857;
  --bad-bg: #FDECE7;
  --bad-ink: #B42D07;
  --shadow: 0 2px 8px rgba(16, 35, 58, .08);
  --shadow-lg: 0 10px 24px rgba(16, 35, 58, .22);
  --radius: 18px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Exo 2', var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 15px; line-height: 1.45; padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #2563EB; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

main { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.end { align-items: flex-end; }
.row.gap { gap: 10px; }
.grow { flex: 1; }
.center { text-align: center; }
.right { text-align: right; }
.muted { color: var(--ink-2); }
.dim, .muted-inv { color: var(--ink-inv-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; margin: 6px 0 0; }
.strong { font-weight: 800; }
.big { font-weight: 800; font-size: 26px; line-height: 1.15; }
.big small { font-size: 14px; color: var(--ink-inv-2); }
.big.ink small { color: var(--ink-2); }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #B4410A; text-transform: uppercase; }
.accent { font-weight: 800; font-size: 20px; color: var(--accent-soft); }
.section-title { font-size: 18px; font-weight: 800; margin: 6px 0 0; }

/* header + tab bar */
.top { display: flex; align-items: center; justify-content: space-between; max-width: 560px; margin: 0 auto; padding: 14px 16px 4px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.wordmark { font-family: var(--font-brand); font-style: italic; font-weight: 800; font-size: 22px; letter-spacing: -.5px; }
.wordmark span { color: var(--red); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.chip {
  min-height: 38px; padding: 0 14px; border-radius: 999px; border: none; background: var(--surface); box-shadow: var(--shadow);
  display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; text-decoration: none;
}
.coin { width: 14px; height: 14px; border-radius: 50%; background: var(--coin); box-shadow: inset 0 0 0 2px rgba(0,0,0,.12); }
.tabbar {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(536px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 4px;
  border-radius: 22px; background: var(--surface); box-shadow: 0 6px 18px rgba(16, 35, 58, .15); z-index: 20;
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ink-2); text-decoration: none; min-height: 44px; justify-content: center; }
.tabbar a[aria-current="page"] { color: var(--ink); font-weight: 800; }

/* cards */
.card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); text-decoration: none; display: block; }
.card.row { display: flex; }
.card.empty { display: flex; flex-direction: column; gap: 6px; }
.live-card { border-radius: 24px; overflow: hidden; background: var(--hero); color: var(--ink-inv); box-shadow: var(--shadow-lg); position: relative; }
.pitch-strip { position: relative; height: 96px; background: repeating-linear-gradient(90deg, var(--grass-a) 0 22px, var(--grass-b) 22px 44px); overflow: hidden; }
.pitch-strip .pitch { position: absolute; left: 50%; top: 14px; width: 18px; height: 70px; margin-left: -9px; border-radius: 3px; background: var(--pitch); }
.pitch-strip .ring { position: absolute; left: 50%; top: 8px; width: 220px; height: 220px; margin-left: -110px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.5); }
.live-pill { position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(16,35,58,.78); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.live-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.btn {
  min-height: 50px; border-radius: 14px; border: none; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; text-decoration: none; gap: 6px;
}
.btn.light { background: var(--surface); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--ink-inv); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* match page */
.match-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; margin-top: 4px; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.match-title { font-size: 15px; font-weight: 800; margin: 0; }
.watch-pill { font-size: 11px; font-weight: 800; background: var(--surface); padding: 6px 10px; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; }
.ground { position: relative; height: 300px; display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.ground-rope { position: absolute; width: min(360px, 96%); height: 270px; border-radius: 50%; background: var(--rope); }
.ground-grass { position: absolute; width: min(330px, 88%); height: 244px; border-radius: 50%; background: repeating-linear-gradient(90deg, var(--grass-a) 0 22px, var(--grass-b) 22px 44px); box-shadow: inset 0 0 0 4px #F4F7FA; }
.ground-ring { position: absolute; width: 180px; height: 140px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.6); }
.ground-pitch { position: absolute; width: 22px; height: 72px; border-radius: 3px; background: var(--pitch); box-shadow: inset 0 0 0 1px #C2AF85; }
/* ball animation on the ground (driven by app.js from each delivery's runs) */
.ground-fx { position: absolute; inset: 0; pointer-events: none; }
.fx-ball, .fx-shadow, .fx-mark { position: absolute; left: 50%; top: 50%; border-radius: 50%; }
.fx-ball { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: var(--red); box-shadow: 0 0 0 2px #fff; z-index: 3; }
.fx-shadow { width: 10px; height: 5px; margin: -2.5px 0 0 -5px; background: rgba(0,0,0,.28); z-index: 2; }
.fx-mark { width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid #fff; z-index: 2; }
.fx-mark.boundary { border-color: #FFE08A; }
.ground-pitch { display: flex; justify-content: center; }
.stumps { position: absolute; top: 6px; width: 12px; height: 4px; border-radius: 2px; background: #6B4E1E; }
.stumps.hit { animation: stumps .6s ease-out; background: var(--red); }
@keyframes stumps { 0%, 100% { transform: none } 20% { transform: translateX(-4px) rotate(-14deg) } 45% { transform: translateX(4px) rotate(12deg) } 70% { transform: translateX(-2px) rotate(-6deg) } }
.ball-flash { position: absolute; top: 34px; background: var(--surface); border-radius: 10px; padding: 4px 12px; font-weight: 800; font-size: 14px; box-shadow: var(--shadow-lg); animation: pop .5s ease-out; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0 } 70% { transform: scale(1.08); opacity: 1 } }
.score-card { position: absolute; left: 0; bottom: 4px; background: var(--hero); color: var(--ink-inv); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-lg); min-width: 128px; }
.live-tag { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--accent-soft); }
.score { font-weight: 800; font-size: 24px; line-height: 1.1; }
.score small { font-size: 14px; color: var(--ink-inv-2); }
.over-card { position: absolute; right: 0; bottom: 4px; background: var(--surface); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow-lg); max-width: 58%; }
.ball-row { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.b { min-width: 24px; height: 24px; padding: 0 4px; border-radius: 999px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.b.four, .b.six { background: var(--ink); color: var(--ink-inv); }
.b.w { background: var(--red); color: #fff; }
.b.empty { background: transparent; border: 1px dashed #9FB3C8; }

.pick-sheet { margin: 12px -16px 0; border-radius: 30px 30px 0 0; background: var(--surface); padding: 10px 18px 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 -8px 24px rgba(16,35,58,.12); min-height: 360px; }
.grab { align-self: center; width: 44px; height: 5px; border-radius: 999px; background: var(--line); margin: 0 auto; }
.pick-title { font-size: 20px; font-weight: 800; margin: 0; }
.state-badge { min-width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; text-align: center; background: var(--surface-2); padding: 4px; }
.state-badge.open { background: var(--ok-bg); color: var(--ok-ink); }
.state-badge.paused { background: #FFF4DB; color: #8A5A00; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.seg button { min-height: 40px; border: none; border-radius: 11px; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 800; box-shadow: 0 1px 3px rgba(16,35,58,.15); }
.colour-picks { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pick { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 16px; border-radius: 18px; border: 3px solid transparent; color: #fff; text-align: left; }
.pick-g { background: var(--green); } .pick-v { background: var(--violet); } .pick-r { background: var(--red); }
.pick[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--surface) inset; }
.pick-name { flex: 1; font-weight: 800; font-size: 18px; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.pick-x { font-weight: 800; font-size: 16px; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.mini-balls { display: flex; gap: 3px; }
.mini-balls i { width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.25); font-style: normal; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.number-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.nball { aspect-ratio: 1; border-radius: 50%; border: 3px solid transparent; color: #fff; font-weight: 800; font-size: 20px; text-shadow: 0 1px 2px rgba(0,0,0,.3); min-height: 48px; }
.nball[aria-pressed="true"] { border-color: var(--ink); }
.n1, .n3, .n7, .n9 { background: var(--green); }
.n2, .n4, .n6, .n8 { background: var(--red); }
.n0 { background: linear-gradient(135deg, var(--red) 50%, var(--violet) 50%); }
.n5 { background: linear-gradient(135deg, var(--green) 50%, var(--violet) 50%); }
.stepper { flex: 1; display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 6px; border-radius: 16px; background: var(--surface-2); }
.stepper button { width: 42px; height: 42px; border-radius: 12px; border: none; background: var(--surface); font-size: 20px; font-weight: 700; }
.stepper input { width: 70px; border: none; background: transparent; text-align: center; font-weight: 800; font-size: 18px; }
[data-call] { min-height: 54px; }
.results { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.results-row { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.rball { position: relative; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.rball.prov { animation: provPulse 1.8s ease-in-out infinite; } /* provisional: gentle pulse, no outline */
@keyframes provPulse { 50% { opacity: .62; transform: scale(.92); } }
.rball .mark { position: absolute; right: -5px; top: -5px; width: 15px; height: 15px; border-radius: 50%; font-size: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); text-shadow: none; }
.mine-list, .pick-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pick-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.pick-list .pick-item { background: var(--surface); box-shadow: var(--shadow); }
.pill { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); }
.pill.won { background: var(--ok-bg); color: var(--ok-ink); }
.pill.lost { background: var(--bad-bg); color: var(--bad-ink); }

/* sheets, forms, toasts */
.sheet { border: none; padding: 12px 20px 24px; width: min(560px, 100%); max-width: 100%; margin: auto auto 0; border-radius: 30px 30px 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -10px 30px rgba(16,35,58,.25); }
.sheet::backdrop { background: rgba(16,35,58,.4); }
.sheet h2 { margin: 12px 0 2px; font-size: 22px; }
.sheet-close { position: absolute; right: 14px; top: 10px; }
.sheet-close button { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--surface-2); font-size: 22px; }
.auth-hero { display: flex; gap: 14px; align-items: center; border-radius: 18px; background: var(--ok-bg); padding: 14px; margin-top: 10px; }
.auth-hero.bad { background: var(--surface-2); }
#auth-form { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
#auth-form label { font-size: 13px; font-weight: 700; margin-top: 6px; }
#auth-form input:not([type=checkbox]) { min-height: 50px; border-radius: 14px; border: 2px solid var(--line); padding: 0 14px; font-size: 16px; font-weight: 600; }
#auth-form input:focus { border-color: var(--ink); outline: none; }
#auth-form .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; font-size: 13px; }
#auth-form .check input { width: 20px; height: 20px; margin-top: 1px; }
#auth-form .btn { margin-top: 10px; }
.form-error { color: var(--bad-ink); font-weight: 700; font-size: 13px; margin: 4px 0 0; }
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--ink-inv); padding: 12px 16px; border-radius: 14px; font-weight: 700; font-size: 14px; z-index: 40; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
.toast.win { background: var(--green); color: #05301F; }
.conn { position: fixed; top: 0; left: 0; right: 0; background: #8A5A00; color: #fff; text-align: center; font-size: 13px; font-weight: 700; padding: 6px; z-index: 60; }

/* rules */
.prose p { margin: 0; }
.rules-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rules-table th, .rules-table td { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; color: #fff; font-weight: 800; font-size: 12px; }
.tag.g { background: #047857; } .tag.r { background: #B42D07; } .tag.v { background: var(--violet); } .tag.n { background: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 640px) {
  .pick-sheet { margin: 12px 0 0; border-radius: 30px; }
}

/* ================================================================== game FX (fx.js) */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.fx-layer > div { position: absolute; will-change: transform, opacity; }
.fx-confetti { border-radius: 2px; transform: translate(-50%, -50%); }
.fx-spark { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.fx-coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE79A, var(--coin) 55%, #C98F00); box-shadow: inset 0 0 0 2px rgba(150,100,0,.45), 0 2px 6px rgba(0,0,0,.25); }
.fx-stamp { transform: translate(-50%, -50%); font-family: var(--font-brand); font-style: italic; font-weight: 800; font-size: 54px; letter-spacing: -1px; white-space: nowrap; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 rgba(16,35,58,.35); }
.fx-stamp-six span { color: #FFE08A; } .fx-stamp-four span { color: #fff; } .fx-stamp-out span { color: #FF5A2B; } .fx-stamp-open span { color: #9BF0CF; font-size: 40px; }
.fx-ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); pointer-events: none; }
.btn, .pick, .nball, .chip, .stepper button, .seg button { position: relative; overflow: hidden; }
.fx-tick-up { animation: tickUp .9s ease-out; } .fx-tick-down { animation: tickDown .9s ease-out; }
@keyframes tickUp { 0% { color: var(--ok-ink); transform: translateY(-2px) } 100% { transform: none } }
@keyframes tickDown { 0% { color: var(--bad-ink); transform: translateY(2px) } 100% { transform: none } }

.fx-reveal { position: fixed !important; inset: 0; pointer-events: auto; display: flex; align-items: center; justify-content: center; background: rgba(16,35,58,.55); backdrop-filter: blur(3px); z-index: 80; }
.fx-reveal-card { background: var(--surface); border-radius: 28px; padding: 22px 26px; width: min(320px, 86vw); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fx-reveal-kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.fx-reveal-ball { width: 118px; height: 118px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 58px; font-weight: 800; text-shadow: 0 3px 6px rgba(0,0,0,.3); box-shadow: inset -10px -14px 0 rgba(0,0,0,.14), inset 8px 10px 0 rgba(255,255,255,.18), 0 12px 24px rgba(16,35,58,.3); }
.fx-reveal-maths { font-weight: 800; font-size: 16px; min-height: 22px; }
.fx-reveal-outcome { font-weight: 800; font-size: 18px; min-height: 24px; }
.fx-reveal-outcome.won { color: var(--ok-ink); } .fx-reveal-outcome.lost { color: var(--ink-2); }

/* always-on motion */
.pick[aria-pressed="true"], .nball[aria-pressed="true"] { animation: picked 1.6s ease-in-out infinite; }
@keyframes picked { 50% { box-shadow: 0 0 0 5px rgba(16,35,58,.18), 0 8px 18px rgba(16,35,58,.25); transform: translateY(-2px); } }
.pick::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); pointer-events: none; }
.pick[aria-pressed="true"]::after { animation: shimmer 2.2s ease-in-out infinite; }
@keyframes shimmer { 60%, 100% { transform: translateX(120%); } }
[data-call]:not(:disabled) { animation: ready 1.8s ease-in-out infinite; }
@keyframes ready { 50% { box-shadow: 0 0 0 6px rgba(16,35,58,.15); } }
.state-badge.open { position: relative; }
.state-badge.open::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 3px solid var(--green); animation: ring 1.6s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.9); opacity: .9 } 100% { transform: scale(1.35); opacity: 0 } }
.b.fresh { animation: chipIn .45s cubic-bezier(.2,1.4,.4,1) backwards; }
@keyframes chipIn { from { transform: scale(0) rotate(-90deg); } }
.rball.new { animation: dropIn .7s cubic-bezier(.2,1.5,.4,1) backwards; }
@keyframes dropIn { from { transform: translateY(-60px) scale(.3) rotate(-180deg); opacity: 0; } }
.score.bump { animation: scoreBump .5s ease-out; }
@keyframes scoreBump { 40% { transform: scale(1.18); color: #FFE08A; } }
.score.wkt { animation: scoreWkt .7s ease-out; }
@keyframes scoreWkt { 30% { color: #FF7A55; transform: translateX(-3px); } 60% { transform: translateX(3px); } }
.ground-rope.flash { animation: rope 1.1s ease-out; }
@keyframes rope { 0%, 60% { box-shadow: 0 0 0 4px #FFE08A, 0 0 28px 8px rgba(255,224,138,.8); } 100% { box-shadow: none; } }
.ground.shake { animation: groundShake .5s ease-out; }
@keyframes groundShake { 20% { transform: translate(-5px, 2px) } 40% { transform: translate(5px, -2px) } 60% { transform: translate(-3px, 1px) } 80% { transform: translate(2px, 0) } }
.ground-grass { animation: grass 14s linear infinite; background-size: 88px 100%; }
@keyframes grass { to { background-position: 88px 0; } }
/* The players on the ground: --kit colours are set per match by dressPlayers() in app.js. */
.ground-fx { --kit-bat: #E5352B; --kit-bat2: #9C1F18; --kit-field: #2D5BFF; --kit-field2: #1A369E; }
.fielder { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 2; --kit: var(--kit-field); --kit2: var(--kit-field2); --face: 1; transition: transform .7s cubic-bezier(.3,.7,.3,1); }
.fielder.batter { --kit: var(--kit-bat); --kit2: var(--kit-bat2); }
.pl { position: absolute; left: -9px; bottom: -3px; width: 18px; height: 25px; overflow: visible; transform: scaleX(var(--face)); transition: transform .15s; }
.pl-shirt { fill: var(--kit); transition: fill .4s; }
.pl-trouser { fill: var(--kit2); transition: fill .4s; }
.pl-pad { fill: #F4F6F8; }
.pl-helmet { fill: #14233A; }
.pl-grille { fill: none; stroke: #14233A; stroke-width: .5; }
.pl-fig { transform-box: fill-box; transform-origin: 50% 100%; animation: plIdle 2.6s ease-in-out infinite; }
.fielder:nth-child(3n) .pl-fig { animation-delay: -.9s; }
.fielder:nth-child(3n+1) .pl-fig { animation-delay: -1.7s; }
.pl-leg, .pl-arm-l, .pl-arm-r { transform-box: fill-box; transform-origin: 50% 0; }
.fielder.run .pl-fig { animation: plRunBob .26s ease-in-out infinite; }
.fielder.run .pl-leg-a, .fielder.run .pl-arm-r { animation: plSwing .26s ease-in-out infinite alternate; }
.fielder.run .pl-leg-b, .fielder.run .pl-arm-l { animation: plSwing .26s ease-in-out infinite alternate-reverse; }
.fielder.cheer .pl-fig { animation: plCheer .5s cubic-bezier(.3,.7,.4,1) 3; }
.pl-coat { fill: #FBFBF7; stroke: #C9CDD2; stroke-width: .3; }
.umpire .pl-arm-l, .umpire .pl-arm-r { transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.umpire[data-sign="out"] .pl-arm-r { transform: rotate(-172deg); }
.umpire[data-sign="six"] .pl-arm-r { transform: rotate(-172deg); }
.umpire[data-sign="six"] .pl-arm-l { transform: rotate(172deg); }
.umpire[data-sign="wide"] .pl-arm-r { transform: rotate(-90deg); }
.umpire[data-sign="wide"] .pl-arm-l { transform: rotate(90deg); }
.umpire[data-sign="four"] .pl-arm-r { animation: plWave .4s ease-in-out infinite alternate; }
@keyframes plWave { from { transform: rotate(-60deg); } to { transform: rotate(-120deg); } }
@keyframes plIdle { 50% { transform: translateY(-.6px) scaleY(1.02); } }
@keyframes plRunBob { 50% { transform: translateY(-1.6px); } }
@keyframes plSwing { from { transform: rotate(-32deg); } to { transform: rotate(32deg); } }
@keyframes plCheer { 40% { transform: translateY(-9px) rotate(-5deg); } 60% { transform: translateY(-9px) rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .pl-fig, .fielder.run .pl-fig, .fielder.run .pl-leg-a, .fielder.run .pl-leg-b, .fielder.run .pl-arm-l, .fielder.run .pl-arm-r, .fielder.cheer .pl-fig, .umpire[data-sign="four"] .pl-arm-r { animation: none; } }
.calm .pl-fig { animation: none; }
@media (max-width: 480px) { .pl { left: -7.5px; bottom: -2.5px; width: 15px; height: 21px; } }
.pick-sheet.whoosh { animation: whoosh .6s cubic-bezier(.2,1.3,.4,1); }
@keyframes whoosh { from { transform: translateY(26px); } }
.live-card .pitch-strip { animation: grass 10s linear infinite; background-size: 88px 100%; }
.coins .coin { animation: coinSpin 3.5s ease-in-out infinite; }
@keyframes coinSpin { 0%, 80% { transform: rotateY(0) } 90% { transform: rotateY(180deg) } 100% { transform: rotateY(360deg) } }
.sound-btn { width: 38px; padding: 0; justify-content: center; }
@media (prefers-reduced-motion: reduce) {
  .ground-grass, .live-card .pitch-strip, .coins .coin, .pick[aria-pressed="true"], [data-call]:not(:disabled), .state-badge.open::before { animation: none !important; }
}

/* ================================================================== animation pass 2 */
/* crowd ring on the rope: idle twinkle, Mexican wave on boundaries */
.crowd { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.crowd i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .55; } }
/* rain delay */
.rain { position: absolute; inset: 0; z-index: 4; overflow: hidden; border-radius: 40%; background: linear-gradient(rgba(60,80,100,.35), rgba(60,80,100,.15)); pointer-events: none; }
.rain i { position: absolute; top: -20px; width: 2px; height: 16px; border-radius: 2px; background: rgba(255,255,255,.75); animation: drop linear infinite; }
@keyframes drop { to { transform: translate(-30px, 340px); } }
.rain::after { content: 'RAIN DELAY'; position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); background: rgba(16,35,58,.85); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .1em; padding: 6px 12px; border-radius: 999px; }
/* banners */
.fx-layer > .fx-banner { position: absolute; width: 100%; display: flex; justify-content: center; }
.fx-banner-in { display: flex; flex-direction: column; align-items: center; padding: 12px 40px; min-width: 70%; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.fx-banner-in strong { font-family: var(--font-brand); font-style: italic; font-weight: 800; font-size: 34px; letter-spacing: -.5px; line-height: 1.1; }
.fx-banner-in span { font-weight: 700; font-size: 14px; opacity: .9; }
.fx-banner-navy .fx-banner-in { background: var(--ink); color: #fff; }
.fx-banner-gold .fx-banner-in { background: linear-gradient(90deg, #F5B700, #FFE08A, #F5B700); color: var(--ink); }
.fx-banner-green .fx-banner-in { background: #047857; color: #fff; }
.fx-banner-red .fx-banner-in { background: #B42D07; color: #fff; }
.fx-flyball { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 6px 14px rgba(0,0,0,.3); }
.fx-coin-big { width: 26px; height: 26px; }
.fx-float { transform: translate(-50%, -50%); font-weight: 800; font-size: 16px; color: var(--ok-ink); text-shadow: 0 1px 0 #fff; }
/* streak flame next to the balance */
.streak { display: inline-flex; align-items: center; gap: 3px; height: 38px; padding: 0 10px; border-radius: 999px; background: linear-gradient(135deg, #FF8A3D, #FA3C09); color: #fff; font-weight: 800; font-size: 13px; box-shadow: var(--shadow); }
.streak svg { animation: flame .9s ease-in-out infinite alternate; transform-origin: 50% 90%; }
@keyframes flame { from { transform: scale(1) rotate(-4deg); } to { transform: scale(1.15) rotate(4deg); } }
/* number balls bounce in when the tab opens */
.number-grid.show .nball { animation: bounceIn .5s cubic-bezier(.2,1.6,.4,1) backwards; }
.number-grid.show .nball:nth-child(2) { animation-delay: .03s } .number-grid.show .nball:nth-child(3) { animation-delay: .06s } .number-grid.show .nball:nth-child(4) { animation-delay: .09s } .number-grid.show .nball:nth-child(5) { animation-delay: .12s }
.number-grid.show .nball:nth-child(6) { animation-delay: .15s } .number-grid.show .nball:nth-child(7) { animation-delay: .18s } .number-grid.show .nball:nth-child(8) { animation-delay: .21s } .number-grid.show .nball:nth-child(9) { animation-delay: .24s } .number-grid.show .nball:nth-child(10) { animation-delay: .27s }
@keyframes bounceIn { from { transform: scale(0) translateY(20px); opacity: 0; } }
.colour-picks.show .pick { animation: slideIn .45s cubic-bezier(.2,1.2,.4,1) backwards; }
.colour-picks.show .pick:nth-child(2) { animation-delay: .06s } .colour-picks.show .pick:nth-child(3) { animation-delay: .12s }
@keyframes slideIn { from { transform: translateX(-30px); opacity: 0; } }
/* score card / over card arrive from the sides */
.match-intro .score-card { animation: fromLeft .6s cubic-bezier(.2,1.2,.4,1) .2s backwards; }
.match-intro .over-card { animation: fromRight .6s cubic-bezier(.2,1.2,.4,1) .3s backwards; }
.match-intro .ground-grass, .match-intro .ground-rope { animation: zoomIn .7s cubic-bezier(.2,1.2,.4,1) backwards; }
@keyframes fromLeft { from { transform: translateX(-120%); } }
@keyframes fromRight { from { transform: translateX(120%); } }
@keyframes zoomIn { from { transform: scale(.5) rotate(-8deg); opacity: 0; } }
/* picks page */
.pick-list .pick-item { animation: slideIn .4s ease-out backwards; }
.pick-list .pick-item:nth-child(2) { animation-delay: .05s } .pick-list .pick-item:nth-child(3) { animation-delay: .1s } .pick-list .pick-item:nth-child(4) { animation-delay: .15s } .pick-list .pick-item:nth-child(n+5) { animation-delay: .2s }
.pill.won { position: relative; overflow: hidden; }
.pill.won::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.8) 50%, transparent 70%); animation: shimmer 2.4s ease-in-out infinite; transform: translateX(-120%); }
/* rules page: the digit maths, animated */
.digit-demo { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 76px; font-weight: 800; font-size: 26px; }
.digit-demo .step { opacity: 0; animation: demoStep 6s ease-in-out infinite; }
.digit-demo .step:nth-child(2) { animation-delay: 1s } .digit-demo .step:nth-child(3) { animation-delay: 2s } .digit-demo .step:nth-child(4) { animation-delay: 3s } .digit-demo .step:nth-child(5) { animation-delay: 3.6s }
@keyframes demoStep { 0% { opacity: 0; transform: translateY(10px) scale(.6) } 8%, 70% { opacity: 1; transform: none } 80%, 100% { opacity: 0 } }
.digit-demo .rball { width: 56px; height: 56px; font-size: 26px; }
@media (prefers-reduced-motion: reduce) {
  .crowd i, .rain i, .streak svg, .digit-demo .step { animation: none !important; opacity: 1; }
}
/* score + over cards always sit above the crowd, rain, fielders and ball layers */
.score-card, .over-card { z-index: 6; }

/* ================================================================== home page motion */
/* guest hero */
.hero { position: relative; margin-top: 10px; border-radius: 26px; padding: 22px 18px 18px; overflow: hidden; color: #fff;
  background: radial-gradient(120% 90% at 85% 0%, #1E4F7A 0%, transparent 60%), linear-gradient(160deg, #10233A, #17324F); box-shadow: var(--shadow-lg); }
.hero::before { content: ''; position: absolute; inset: auto -20% -60% -20%; height: 70%; background: repeating-linear-gradient(90deg, var(--grass-a) 0 22px, var(--grass-b) 22px 44px); border-radius: 50% 50% 0 0; opacity: .35; animation: grass 12s linear infinite; background-size: 88px 100%; }
.hero > * { position: relative; }
.hero-balls { display: flex; gap: 12px; height: 70px; align-items: flex-end; }
.hb { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: #fff; text-shadow: 0 2px 3px rgba(0,0,0,.3);
  box-shadow: inset -6px -8px 0 rgba(0,0,0,.15), inset 5px 6px 0 rgba(255,255,255,.2); animation: hop 2.4s cubic-bezier(.3,0,.3,1) infinite; }
.hb-g { background: var(--green); } .hb-v { background: var(--violet); animation-delay: .25s; } .hb-r { background: var(--red); animation-delay: .5s; }
@keyframes hop { 0%, 40%, 100% { transform: translateY(0) scale(1, 1); } 10% { transform: translateY(0) scale(1.15, .85); } 22% { transform: translateY(-24px) scale(.95, 1.05) rotate(-12deg); } 34% { transform: translateY(0) scale(1.1, .9); } }
.hero-title { font-family: var(--font-brand); font-style: italic; font-weight: 800; font-size: 28px; line-height: 1.1; margin: 12px 0 6px; letter-spacing: -.5px;
  background: linear-gradient(90deg, #fff 0%, #fff 40%, #FFE08A 50%, #fff 60%, #fff 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: titleShine 4s ease-in-out infinite; }
@keyframes titleShine { 0%, 30% { background-position: 100% 0; } 70%, 100% { background-position: 0 0; } }
.hero-sub { margin: 0 0 14px; color: #C7D6E6; font-size: 14px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.gold { background: linear-gradient(135deg, #FFD34D, #F5B700); color: var(--ink); box-shadow: 0 6px 16px rgba(245,183,0,.35); animation: ready 1.8s ease-in-out infinite; }
.btn.ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.3); }
.shine::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%); transform: translateX(-120%); animation: shimmer 2.6s ease-in-out infinite; pointer-events: none; }
.muted-hero { color: #9FB3C8; margin-top: 10px; }
/* section title live dot */
.title-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); margin-right: 8px; vertical-align: middle; position: relative; top: -2px; box-shadow: 0 0 0 0 rgba(250,60,9,.6); animation: beacon 1.6s ease-out infinite; }
@keyframes beacon { to { box-shadow: 0 0 0 10px rgba(250,60,9,0); } }
/* live card */
.live-card { transition: transform .2s ease; }
.live-card:hover { transform: translateY(-3px); }
.pitch-strip { position: relative; }
.mini-ball { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #fff; opacity: 0; z-index: 2; }
.mini-flash { position: absolute; right: 14px; top: 12px; z-index: 3; background: #fff; color: var(--ink); font-weight: 800; font-size: 13px; padding: 3px 10px; border-radius: 10px; box-shadow: var(--shadow-lg); animation: pop .5s ease-out; }
.mini-flash.w { background: var(--red); color: #fff; } .mini-flash.six { background: #FFE08A; }
.mini-strip { min-height: 24px; }
.mini-strip .b { background: rgba(255,255,255,.12); color: #fff; }
.mini-strip .b.four, .mini-strip .b.six { background: #fff; color: var(--ink); }
.mini-strip .b.w { background: var(--red); }
.play-btn { position: relative; overflow: hidden; }
.play-btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(16,35,58,.12) 50%, transparent 65%); transform: translateX(-120%); animation: shimmer 3s ease-in-out infinite; }
.play-btn .nudge { animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }
.accent.flip { animation: flipIn .5s ease-out; }
@keyframes flipIn { from { transform: rotateX(90deg); opacity: 0; } }
/* empty state */
.idle-ball { height: 64px; display: flex; align-items: flex-end; justify-content: center; }
.idle-ball span { width: 26px; height: 26px; border-radius: 50%; background: var(--red); box-shadow: inset -4px -5px 0 rgba(0,0,0,.18); position: relative; animation: hop 1.6s cubic-bezier(.3,0,.3,1) infinite; }
.idle-ball span::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(60deg, transparent 44%, #fff 44% 50%, transparent 50%); opacity: .8; }
/* upcoming countdowns */
.upcoming { transition: transform .2s ease; }
.upcoming:hover { transform: translateX(3px); }
.countdown { display: flex; gap: 4px; }
.cd { display: flex; align-items: baseline; gap: 1px; background: var(--ink); color: #fff; border-radius: 8px; padding: 4px 6px; }
.cd b { font-variant-numeric: tabular-nums; font-size: 15px; display: inline-block; }
.cd b.tick { animation: flipIn .35s ease-out; }
.cd i { font-style: normal; font-size: 10px; color: var(--ink-inv-2); }
.upcoming.soon { box-shadow: 0 0 0 3px var(--green), var(--shadow); animation: soon 1.6s ease-in-out infinite; }
@keyframes soon { 50% { box-shadow: 0 0 0 6px rgba(0,194,130,.35), var(--shadow); } }
.upcoming.soon .kicker { color: var(--ok-ink); }
/* header logo + nav */
.brand svg { transition: transform .6s cubic-bezier(.2,1.4,.4,1); }
.brand.spin svg { animation: logoSpin .9s cubic-bezier(.2,1.2,.4,1); }
@keyframes logoSpin { from { transform: rotate(-540deg) scale(.6); } }
.tabbar { overflow: hidden; }
.tab-pill { position: absolute; top: 6px; bottom: 6px; left: 0; border-radius: 16px; background: var(--surface-2); transition: transform .45s cubic-bezier(.2,1.3,.4,1), width .3s; z-index: 0; }
.tabbar a { position: relative; z-index: 1; }
.tabbar a.bounce svg { animation: tabBounce .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes tabBounce { 40% { transform: translateY(-6px) scale(1.15); } }
@media (prefers-reduced-motion: reduce) {
  .hb, .hero-title, .hero::before, .btn.gold, .shine::after, .title-dot, .play-btn::after, .play-btn .nudge, .idle-ball span, .upcoming.soon { animation: none !important; }
  .hero-title { color: #fff; }
}

/* over chips: icon per delivery type; only the newest chip animates */
.b { gap: 1px; position: relative; }
.b.dot .dotmark { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); display: block; }
.b.four { background: var(--ink); color: #fff; box-shadow: inset 0 0 0 2px #FFE08A; }
.b.six { background: linear-gradient(135deg, #FFD34D, #F5A300); color: var(--ink); box-shadow: 0 2px 6px rgba(245,163,0,.45); }
.b.six .spark { margin-left: 1px; animation: sparkle 1.6s ease-in-out infinite; }
@keyframes sparkle { 50% { transform: rotate(72deg) scale(1.3); } }
.b.w { background: var(--red); color: #fff; }
.b.extra { background: #FFF1D6; color: #8A5A00; font-size: 10px; }
.b.empty { border: 1.5px dashed #B5C4D4; }
.b.empty.next { border-color: var(--ink-2); animation: nextBall 1.4s ease-in-out infinite; }
@keyframes nextBall { 50% { transform: scale(1.15); border-color: var(--red); } }
.b.four.fresh { animation: chipIn .45s cubic-bezier(.2,1.4,.4,1) backwards, ringOut 1s ease-out .3s; }
@keyframes ringOut { from { box-shadow: inset 0 0 0 2px #FFE08A, 0 0 0 0 rgba(255,224,138,.9); } to { box-shadow: inset 0 0 0 2px #FFE08A, 0 0 0 12px rgba(255,224,138,0); } }
.b.six.fresh { animation: sixIn .8s cubic-bezier(.2,1.4,.4,1) backwards; }
@keyframes sixIn { 0% { transform: scale(0) rotate(-360deg); } 60% { transform: scale(1.4) rotate(0); } }
.b.w.fresh { animation: chipIn .4s cubic-bezier(.2,1.4,.4,1) backwards, wShake .5s ease-out .4s; }
@keyframes wShake { 25% { transform: rotate(-14deg); } 50% { transform: rotate(12deg); } 75% { transform: rotate(-6deg); } }
.b.dot.fresh .dotmark { animation: dotIn .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes dotIn { from { transform: scale(3); opacity: 0; } }
.mini-strip .b.dot .dotmark { background: rgba(255,255,255,.7); }
.mini-strip .b.extra { background: rgba(255,224,138,.25); color: #FFE08A; }
@media (prefers-reduced-motion: reduce) { .b.empty.next, .b.six .spark, .rball.prov { animation: none !important; } .rball.prov { opacity: .7; } }

/* ================================================================== Me page, coin history, colour-blind mode */
.me-head { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.avatar { position: relative; width: 70px; height: 70px; flex: none; }
.avatar span { position: absolute; inset: 5px; border-radius: 50%; background: var(--hero); color: #fff; font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; }
[data-theme="c"] .avatar span { background: var(--surface-2); color: var(--gold); }
.avatar-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--surface) 0); animation: ringFill 1.2s cubic-bezier(.2,.8,.2,1) both; }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
@keyframes ringFill { from { --p: 0; } }
.me-name { font-size: 20px; font-weight: 800; margin: 0; }
.xp { margin-top: 6px; height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.xp-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--ink), #2D5B8A); transition: width 1.2s cubic-bezier(.2,.8,.2,1) .2s; position: relative; overflow: hidden; }
[data-theme="c"] .xp-fill { background: linear-gradient(90deg, #B8892E, var(--gold)); }
.xp-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%); animation: shimmer 2.4s ease-in-out infinite; transform: translateX(-120%); }
.me-in .xp-fill { width: var(--w); }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.tile { background: var(--surface); border-radius: 16px; padding: 12px; text-align: center; box-shadow: var(--shadow); animation: tileIn .5s cubic-bezier(.2,1.3,.4,1) backwards; }
.tile:nth-child(2) { animation-delay: .08s; } .tile:nth-child(3) { animation-delay: .16s; }
@keyframes tileIn { from { transform: translateY(16px) scale(.9); opacity: 0; } }
.tile-n { font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.tile-l { font-size: 11px; color: var(--ink-2); }
[data-theme="c"] .tile { border: 1px solid var(--line); }
.me-card { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.card-h { font-size: 15px; font-weight: 800; margin: 0; }
.form-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.form-dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; animation: dropIn .6s cubic-bezier(.2,1.5,.4,1) backwards; animation-delay: calc(var(--i) * 70ms + .2s); }
.form-dot.won { background: var(--green); } .form-dot.lost { background: var(--surface-2); color: var(--ink-2); }
.me-money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.me-money div { display: flex; flex-direction: column; }
.me-money strong { font-size: 17px; font-weight: 800; }
.pos { color: var(--ok-ink); } .neg { color: var(--bad-ink); }
.ink-strong { color: var(--ink); }
.land-row { display: grid; grid-template-columns: 70px 1fr 44px; align-items: center; gap: 8px; }
.land-l { font-size: 13px; font-weight: 700; }
.land-v { font-size: 13px; font-weight: 800; text-align: right; }
.land-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.land-fill { height: 100%; width: 0; border-radius: 999px; background: var(--c); transition: width 1s cubic-bezier(.2,.8,.2,1) .35s; }
.me-in .land-fill { width: var(--w); }
.badges { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.badge { aspect-ratio: 1; border-radius: 14px; border: none; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #fff; animation: bounceIn .5s cubic-bezier(.2,1.6,.4,1) backwards; animation-delay: calc(var(--i) * 45ms + .3s); position: relative; overflow: hidden; }
.badge.earned::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); animation: shimmer 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * 200ms); }
.badge.locked { background: transparent; border: 2px dashed var(--line); color: var(--ink-2); }
.b-ink { background: var(--hero); } .b-green { background: #047857; } .b-red { background: #C52F06; } .b-violet { background: var(--violet); } .b-gold { background: linear-gradient(135deg, #FFD34D, #E0A100); color: #2A1D00; }
[data-theme="c"] .b-ink { background: #2A2D35; color: var(--gold); }
.settings { padding: 0; gap: 0; overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 0 16px; border: none; border-bottom: 1px solid var(--surface-2); background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; width: 100%; text-align: left; }
.set-row:last-child { border-bottom: none; }
.set-row.danger { color: var(--bad-ink); }
.switch { width: 50px; height: 30px; flex: none; border-radius: 999px; border: none; background: var(--line); position: relative; transition: background .25s; padding: 0; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .3s cubic-bezier(.2,1.4,.4,1); }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

.page-head { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.page-head .section-title { margin: 0; }
.coin-hero { margin-top: 12px; border-radius: 24px; background: var(--hero); color: #fff; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
[data-theme="c"] .coin-hero { color: var(--ink); border: 1px solid var(--line); }
.coin-hero::before { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(245,183,0,.35), transparent 70%); animation: flood 5s ease-in-out infinite; }
.coin-big { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 38px; font-variant-numeric: tabular-nums; }
.coin-big .coin { width: 26px; height: 26px; }
.spin-coin { animation: coinSpin 3s ease-in-out infinite; }
.coin-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coin-split strong { font-size: 15px; }
.won-c { color: #7CF0C5; } .bonus-c { color: #FFD27A; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.chips-row button { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; }
.chips-row button[aria-selected="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
[data-theme="c"] .chips-row button[aria-selected="true"] { background: var(--gold); color: #2A1D00; border-color: var(--gold); }
.ledger { margin-top: 12px; padding: 4px 0; }
.ledger-list { list-style: none; margin: 0; padding: 0; }
.ledger-day { padding: 12px 16px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--ink-2); text-transform: uppercase; }
.ledger-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 16px; border-top: 1px solid var(--surface-2); animation: slideIn .4s ease-out backwards; animation-delay: calc(var(--i) * 35ms); }
.ledger-empty { padding: 16px; }
.l-icon { width: 36px; height: 36px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; }
.l-win { background: var(--ok-bg); color: var(--ok-ink); } .l-pick { background: var(--surface-2); color: var(--ink); } .l-lost { background: var(--bad-bg); color: var(--bad-ink); }
.l-bonus { background: #FFF6DB; color: #8A6100; } .l-refund { background: #EDEBFB; color: #4B3DB0; } .l-adjust { background: #E9F2FC; color: #1D4ED8; }
[data-theme="c"] .l-bonus { background: #3A2E12; color: var(--gold); } [data-theme="c"] .l-refund { background: #24203F; color: #B9B0FF; } [data-theme="c"] .l-adjust { background: #16243A; color: #8FB8FF; }
.l-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.l-main strong { font-size: 14px; }
.l-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-amt { text-align: right; display: flex; flex-direction: column; }
.l-amt strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.btn.more { width: calc(100% - 32px); margin: 10px 16px; }

/* colour-blind mode: every colour ball carries its letter (G / R / V), split balls both */
html[data-cb] .rball, html[data-cb] .nball, html[data-cb] .fx-reveal-ball, html[data-cb] .fx-flyball { position: relative; }
html[data-cb] .n1::after, html[data-cb] .n3::after, html[data-cb] .n7::after, html[data-cb] .n9::after { content: 'G'; }
html[data-cb] .n2::after, html[data-cb] .n4::after, html[data-cb] .n6::after, html[data-cb] .n8::after { content: 'R'; }
html[data-cb] .n0::after { content: 'R·V'; } html[data-cb] .n5::after { content: 'G·V'; }
html[data-cb] [class*=" n"]::after, html[data-cb] [class^="n"]::after { position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); font-size: 8px; font-weight: 800; background: rgba(16,35,58,.85); color: #fff; padding: 0 3px; border-radius: 4px; line-height: 12px; text-shadow: none; white-space: nowrap; }
html[data-cb] .pick-g .pick-name::after { content: ' (G)'; } html[data-cb] .pick-r .pick-name::after { content: ' (R)'; } html[data-cb] .pick-v .pick-name::after { content: ' (V)'; }
@media (prefers-reduced-motion: reduce) {
  .avatar-ring, .tile, .form-dot, .badge, .badge.earned::after, .ledger-row, .spin-coin, .coin-hero::before, .xp-fill::after { animation: none !important; }
  .xp-fill, .land-fill { transition: none; }
}
.avatar span { z-index: 1; }
.avatar-ring { z-index: 0; }

/* ================================================================== contests */
.tabbar { grid-template-columns: repeat(5, 1fr); }
.tabbar a { font-size: 10.5px; }
.contest-hero { display: flex; flex-direction: column; gap: 12px; border-radius: 24px; background: var(--hero); color: #fff; padding: 16px; text-decoration: none; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.contest-hero::after { content: ''; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, rgba(245,183,0,.32), transparent 70%); animation: flood 5s ease-in-out infinite; pointer-events: none; }
[data-theme="c"] .contest-hero { border: 1px solid var(--line); color: var(--ink); }
.contest-hero .ends { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #FFB4A0; }
.hero-name { font-weight: 800; font-size: 20px; margin-top: 2px; }
.hero-rank { font-weight: 800; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.prize-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.prize { border-radius: 12px; background: rgba(255,255,255,.08); padding: 8px 0; animation: bounceIn .5s cubic-bezier(.2,1.6,.4,1) backwards; }
.prize:nth-child(2) { animation-delay: .08s } .prize:nth-child(3) { animation-delay: .16s } .prize:nth-child(4) { animation-delay: .24s }
.prize:first-child { background: linear-gradient(135deg, rgba(255,211,77,.35), rgba(245,163,0,.2)); }
.contest-row { display: flex; align-items: center; gap: 12px; }
.contest-row a { text-decoration: none; color: inherit; }
.c-badge { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.c-badge.ai { background: var(--violet); }
.sm-btn { min-height: 40px; padding: 0 14px; font-size: 13px; }
.join-big { width: 100%; margin-top: 12px; }
.trophy { color: #E0A100; display: flex; justify-content: center; } .trophy svg { width: 40px; height: 40px; animation: hop 2s cubic-bezier(.3,0,.3,1) infinite; }
.ai-note { display: flex; gap: 12px; align-items: center; margin-top: 12px; font-size: 13px; }
.board { margin-top: 12px; padding: 8px 0; }
.board-h { padding: 8px 16px 6px; font-size: 12px; font-weight: 800; color: var(--ink-2); letter-spacing: .06em; text-transform: uppercase; }
.board-h h2 { font-size: 12px; margin: 0; }
.lb { list-style: none; margin: 0; padding: 0; }
.lb-row { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 16px; animation: slideIn .4s ease-out backwards; animation-delay: calc(var(--i) * 30ms); transition: background .3s; }
.lb-row.me { background: color-mix(in srgb, var(--green) 14%, transparent); }
.lb-row.moved { animation: rankUp .9s ease-out; }
@keyframes rankUp { 0% { background: rgba(0,194,130,.35); transform: translateY(8px); } }
.lb-rank { width: 28px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.lb-rank.top { color: #C2410C; }
.lb-av { width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.lb-name { flex: 1; font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-tag { display: inline-block; height: 20px; padding: 0 7px; border-radius: 6px; background: #EDEBFB; color: #4B3DB0; font-size: 11px; font-weight: 800; line-height: 20px; vertical-align: middle; }
.lb-score { width: 40px; text-align: right; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.lb-empty { padding: 16px; }
@media (prefers-reduced-motion: reduce) { .contest-hero::after, .prize, .lb-row, .trophy svg { animation: none !important; } }

/* ------------------------------------------------------------------ rewards (daily streak, rescue, promo code, invite) */
.daily-banner { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 12px 14px; border-radius: var(--radius); text-decoration: none; color: #2A1D00; background: linear-gradient(135deg, #FFE08A, #F5B700); box-shadow: 0 8px 20px rgba(245,183,0,.35); position: relative; overflow: hidden; animation: bounceIn .5s cubic-bezier(.3,1.6,.5,1) both; }
.daily-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.65) 50%, transparent 65%); transform: translateX(-120%); animation: shimmer 2.8s ease-in-out infinite; }
.daily-banner strong { display: block; font-size: 15px; }
.daily-banner .small { opacity: .8; }
.daily-go { font-weight: 800; font-size: 13px; background: #10233A; color: #FFE08A; padding: 6px 12px; border-radius: 999px; }
.gift-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.55); animation: giftWiggle 2.4s ease-in-out infinite; }
@keyframes giftWiggle { 0%, 70%, 100% { transform: none; } 75% { transform: rotate(-12deg) scale(1.1); } 82% { transform: rotate(10deg) scale(1.1); } 89% { transform: rotate(-6deg); } }

.rw-hero { margin-top: 12px; border-radius: 24px; background: var(--hero); color: #fff; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.rw-hero::before { content: ''; position: absolute; left: -60px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(245,183,0,.28), transparent 70%); animation: flood 5s ease-in-out infinite; pointer-events: none; }
[data-theme="c"] .rw-hero { color: var(--ink); border: 1px solid var(--line); }
.rw-kicker { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #FFE08A; }
.rw-title { font-family: var(--font-brand); font-style: italic; font-weight: 800; font-size: 22px; line-height: 1.15; margin: 2px 0 4px; }
.rw-streak { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 8px 6px; border-radius: 16px; background: rgba(255,255,255,.08); }
.rw-streak strong { font-family: var(--font-brand); font-size: 26px; line-height: 1; }
.rw-streak .flame { width: 18px; height: 22px; background: radial-gradient(circle at 50% 70%, #FFE08A 0 25%, #F5B700 40%, #FA3C09 70%); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; animation: flame .5s ease-in-out infinite alternate; margin-bottom: 2px; }
.rw-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; position: relative; }
.rw-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.1); animation: bounceIn .45s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i) * 60ms); }
[data-theme="c"] .rw-day { background: var(--surface-2); border-color: var(--line); }
.rw-day.big { grid-column: span 2; flex-direction: row; justify-content: center; gap: 10px; }
.rw-day.big .rw-amt { font-size: 18px; }
.rw-amt { font-weight: 800; font-size: 14px; }
.rw-d { font-size: 11px; opacity: .7; }
.rw-ico { display: grid; place-items: center; height: 30px; }
.rw-tick { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; transform: scale(0); transition: transform .35s cubic-bezier(.3,1.8,.5,1); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.rw-day.done { background: rgba(0,194,130,.14); border-color: rgba(0,194,130,.45); }
.rw-day.done .rw-tick { transform: scale(1); }
.rw-day.done .rw-ico { filter: saturate(.6); opacity: .75; }
.rw-day.today { border-color: #FFE08A; background: rgba(255,224,138,.16); box-shadow: 0 0 0 0 rgba(255,224,138,.6); animation: bounceIn .45s cubic-bezier(.3,1.6,.5,1) both, todayGlow 1.6s ease-in-out infinite .6s; }
.rw-day.today .rw-ico { animation: hopCoin 1.6s ease-in-out infinite; }
.rw-day.today.done { animation: none; }
.rw-day.later { opacity: .55; }
@keyframes todayGlow { 50% { box-shadow: 0 0 0 5px rgba(255,224,138,.25), 0 0 18px rgba(255,224,138,.45); } }
@keyframes hopCoin { 0%, 55%, 100% { transform: none; } 20% { transform: translateY(-6px) rotateY(180deg); } 40% { transform: translateY(0) rotateY(360deg); } }
.rw-day.just { animation: claimPop .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes claimPop { 30% { transform: scale(1.25) rotate(-4deg); } 60% { transform: scale(.95) rotate(2deg); } }
.rw-claim { width: 100%; min-height: 52px; font-size: 16px; }
.rw-next { text-align: center; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.06); }
.rw-card { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.rw-row { display: flex; gap: 12px; align-items: flex-start; }
.rw-badge { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); color: var(--ink); }
.rw-badge.life { background: var(--red); animation: spinSlow 6s linear infinite; }
.rw-badge.tag { background: #EDEAFF; color: var(--violet); }
.rw-badge.friends { background: var(--ok-bg); }
[data-theme="c"] .rw-badge.tag { background: #24203F; color: #B9B0FF; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.rescue { border: 2px dashed var(--red); }
.rw-code, .rw-link { display: flex; gap: 8px; }
.rw-code input, .rw-link input { flex: 1; min-width: 0; min-height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 0 12px; font: inherit; }
.rw-code input { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.rw-link input { font-size: 13px; }
.rw-code input.bad { border-color: var(--bad-ink); animation: groundShake .4s; }
.rw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.rw-stats div { display: flex; flex-direction: column; padding: 8px 4px; border-radius: 12px; background: var(--surface-2); }
.rw-stats strong { font-size: 18px; }
@media (prefers-reduced-motion: reduce) {
  .daily-banner, .daily-banner::after, .gift-ico, .rw-hero::before, .rw-streak .flame, .rw-day, .rw-day.today, .rw-day.today .rw-ico, .rw-day.just, .rw-badge.life { animation: none !important; }
}

/* ------------------------------------------------------------------ support */
.unread-pill { display: inline-block; background: var(--red); color: #fff; font-weight: 800; font-size: 11px; padding: 3px 9px; border-radius: 999px; animation: beacon 1.4s ease-out infinite; box-shadow: 0 0 0 0 rgba(250,60,9,.5); }
.sup-hero { margin-top: 12px; border-radius: 24px; background: var(--hero); color: #fff; padding: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
[data-theme="c"] .sup-hero { color: var(--ink); border: 1px solid var(--line); }
.sup-hero .btn { margin-top: 6px; }
.sup-bubbles { position: absolute; right: 14px; top: 14px; width: 90px; height: 70px; pointer-events: none; }
.bub { position: absolute; border-radius: 16px; animation: bubUp 4.5s ease-in-out infinite; }
.bub.b1 { width: 54px; height: 26px; right: 0; top: 0; background: rgba(0,194,130,.35); }
.bub.b2 { width: 40px; height: 22px; right: 36px; top: 30px; background: rgba(255,224,138,.3); animation-delay: -1.5s; }
.bub.b3 { width: 30px; height: 18px; right: 4px; top: 48px; background: rgba(102,85,211,.4); animation-delay: -3s; }
@keyframes bubUp { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.06); } }
.small-title { font-size: 16px; margin-top: 16px; }
.ticket-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticket-list li { animation: slideIn .4s cubic-bezier(.2,1.2,.4,1) both; animation-delay: calc(var(--i) * 50ms); }
.ticket-row { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.ticket-row strong { display: block; font-size: 14px; }
.t-last { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
.ticket-row.unread { box-shadow: inset 4px 0 0 var(--red), var(--shadow); }
.t-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.t-status { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); }
.t-status.s-reply { background: var(--red); color: #fff; }
.t-status.s-open, .t-status.s-sent { background: #EDEAFF; color: var(--violet); }
.t-status.s-done { background: var(--ok-bg); color: var(--ok-ink); }
.t-ico { flex: none; width: 36px; height: 36px; border-radius: 12px; background-color: var(--surface-2); background-position: center; background-size: 20px; background-repeat: no-repeat; }
.cat-over_result { background-color: #FDECE7; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='%23FA3C09'/%3E%3Cpath d='M5 3.5c2 2.5 2 6.5 0 9M11 3.5c-2 2.5-2 6.5 0 9' stroke='%23fff' stroke-width='1' fill='none'/%3E%3C/svg%3E"); }
.cat-picks { background-color: #EDEAFF; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='5' cy='8' r='3' fill='%2300C282'/%3E%3Ccircle cx='11' cy='8' r='3' fill='%236655D3'/%3E%3C/svg%3E"); }
.cat-coins { background-color: #FFF4D6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cellipse cx='8' cy='10' rx='5.5' ry='2.5' fill='%23C98F00'/%3E%3Cellipse cx='8' cy='7' rx='5.5' ry='2.5' fill='%23FFD34D'/%3E%3C/svg%3E"); }
.cat-account { background-color: #E6F0FB; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='5.5' r='3' fill='%2310233A'/%3E%3Cpath d='M2.5 14c0-3 2.5-5 5.5-5s5.5 2 5.5 5z' fill='%2310233A'/%3E%3C/svg%3E"); }
.cat-bug { background-color: #E9FBF3; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9.5 2 6 9h3l-1.5 5L12 6H9z' fill='%23047857'/%3E%3C/svg%3E"); }
.cat-other { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 3h12v8H7l-3 3v-3H2z' fill='%2348607A'/%3E%3C/svg%3E"); }
.sup-new { margin-top: 14px; }
.sup-new form, [data-report-form] { display: flex; flex-direction: column; gap: 12px; }
.cat-grid { border: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-chip { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 14px; border: 2px solid var(--line); font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .2s, transform .2s; }
.cat-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cat-chip:has(input:checked) { border-color: var(--ink); background: var(--surface-2); transform: translateY(-1px); }
.cat-chip:has(input:focus-visible) { outline: 3px solid var(--violet); outline-offset: 2px; }
.cat-chip .t-ico { width: 30px; height: 30px; border-radius: 10px; background-size: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.fld input, .fld textarea, .fld select, .reply-box textarea { width: 100%; min-height: 46px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 10px 12px; font: inherit; font-weight: 500; resize: vertical; }
.reason-chips { border: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.reason-chips legend { margin-bottom: 8px; }
.reason-chips label { position: relative; }
.reason-chips label span { display: inline-block; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .2s; }
.reason-chips input { position: absolute; opacity: 0; pointer-events: none; }
.reason-chips input:checked + span { background: var(--ink); color: var(--ink-inv); border-color: var(--ink); transform: scale(1.05); }
.reason-chips input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 2px; }
.btn.wide { width: 100%; }
.report-link { display: flex; align-items: center; gap: 6px; margin: 10px auto 0; border: none; background: none; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 32px; }
.report-link:hover svg { animation: flagWave .6s ease-in-out; }
@keyframes flagWave { 30% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } }
.t-title { font-size: 18px; margin: 0; line-height: 1.25; }
.t-over { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; }
.t-over .rball { width: 40px; height: 40px; font-size: 18px; flex: none; }
.t-over .rball.pending { background: var(--surface-2); color: var(--ink-2); text-shadow: none; }
.t-over .pill { display: inline-block; margin: 6px 6px 0 0; }
.thread { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; gap: 3px; max-width: 86%; animation: bounceIn .4s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(min(var(--i), 8) * 40ms); }
.msg.player { align-self: flex-end; align-items: flex-end; }
.msg.staff { align-self: flex-start; }
.msg .bubble { padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.msg.player .bubble { background: var(--ink); color: var(--ink-inv); border-bottom-right-radius: 6px; }
.msg.staff .bubble { background: var(--surface); color: var(--ink); border-bottom-left-radius: 6px; border: 1.5px solid var(--green); }
.msg.system { align-self: center; max-width: 100%; }
.msg .sys { font-size: 11px; color: var(--ink-2); background: var(--surface-2); padding: 4px 10px; border-radius: 999px; }
.msg.arrive { animation: msgArrive .5s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes msgArrive { from { transform: translateY(16px) scale(.9); opacity: 0; } }
.reply-box { display: flex; flex-direction: column; gap: 10px; position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 5; }
.plane { position: fixed; z-index: 9999; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
@media (prefers-reduced-motion: reduce) {
  .unread-pill, .bub, .ticket-list li, .msg, .msg.arrive, .report-link:hover svg { animation: none !important; }
}

/* ------------------------------------------------------------------ content: help centre, pages, footer, banners */
.help-hero { margin-top: 12px; border-radius: 24px; background: var(--hero); color: #fff; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
[data-theme="c"] .help-hero { color: var(--ink); border: 1px solid var(--line); }
.help-hero h1 { margin: 0; }
.help-balls { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; }
.help-balls .hb { width: 30px; height: 30px; font-size: 14px; }
.help-search { display: flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); border-radius: 14px; padding: 0 12px; min-height: 50px; box-shadow: 0 6px 18px rgba(0,0,0,.18); transition: transform .2s; }
.help-search:focus-within { transform: scale(1.02); }
.help-search input { flex: 1; min-width: 0; border: none; background: none; font: inherit; font-size: 16px; outline: none; color: var(--ink); }
.help-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.help-cat { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.1); color: inherit; text-decoration: none; font-size: 13px; font-weight: 700; }
[data-theme="c"] .help-cat { background: var(--surface-2); }
.help-cat .t-ico { width: 24px; height: 24px; border-radius: 8px; background-size: 14px; }
.faq { padding: 0; overflow: hidden; margin-bottom: 8px; animation: slideIn .4s cubic-bezier(.2,1.2,.4,1) both; animation-delay: calc(var(--i) * 40ms); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq-plus { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); transition: transform .3s, background .3s; }
.faq-plus::before, .faq-plus::after { content: ''; position: absolute; left: 6px; right: 6px; top: 10px; height: 2px; border-radius: 2px; background: currentColor; }
.faq-plus::after { transform: rotate(90deg); transition: transform .3s; }
.faq[open] .faq-plus { transform: rotate(180deg); background: var(--green); color: #fff; }
.faq[open] .faq-plus::after { transform: rotate(0); }
.faq .md { padding: 0 14px; animation: faqOpen .35s ease; }
.faq-link { display: inline-block; margin: 0 14px 14px; }
@keyframes faqOpen { from { opacity: 0; transform: translateY(-6px); } }
.faq.hit summary span { background: linear-gradient(transparent 60%, rgba(255,224,138,.7) 60%); }
.help-cta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; }
.md { line-height: 1.6; font-size: 15px; }
.md h2 { font-size: 18px; margin: 18px 0 6px; }
.md h3 { font-size: 16px; margin: 14px 0 4px; }
.md p, .md ul, .md ol { margin: 0 0 10px; }
.md ul, .md ol { padding-left: 22px; }
.md li { margin-bottom: 4px; }
.md a { color: var(--violet); font-weight: 700; }
[data-theme="c"] .md a { color: var(--gold); }
.md code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.md-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #FFF4D6; color: #6B4A00; font-size: 14px; border-left: 4px solid #F5B700; }
[data-theme="c"] .md-note { background: #3A2E12; color: #FFE08A; }
.article { margin-top: 10px; }
.doc h2:first-child, .doc .md-note:first-child { margin-top: 0; }
.helpful { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.helpful-btns { display: flex; gap: 8px; }
.helpful-btns .btn { display: inline-flex; align-items: center; gap: 6px; }
.helpful.voted .helpful-btns { display: none; }
.set-link { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--ink); font-weight: 700; font-size: 14px; }
.site-foot { margin: 28px 0 8px; text-align: center; color: var(--ink-2); }
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-bottom: 6px; }
.site-foot a, .site-foot button { color: inherit; font: inherit; font-size: 12px; font-weight: 600; text-decoration: none; background: none; border: none; padding: 6px 0; cursor: pointer; }
.site-foot a:hover, .site-foot button:hover { text-decoration: underline; }
.announce { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 14px; font-size: 13px; font-weight: 600; animation: dropDown .5s cubic-bezier(.3,1.4,.5,1) both; }
.announce.a-info { background: var(--ink); color: #fff; }
.announce.a-promo { background: linear-gradient(90deg, #6655D3, #FA3C09); color: #fff; }
.announce.a-warning { background: #FFE08A; color: #4A3300; }
.announce a { color: inherit; font-weight: 800; }
.a-text { flex: 1; }
.a-ico { flex: none; width: 10px; height: 10px; border-radius: 50%; background: currentColor; animation: beacon 1.6s ease-out infinite; }
.a-close { flex: none; width: 32px; height: 32px; border: none; border-radius: 50%; background: rgba(255,255,255,.18); color: inherit; font-size: 18px; cursor: pointer; }
.announce.leaving { animation: liftUp .3s ease forwards; }
@keyframes dropDown { from { transform: translateY(-100%); opacity: 0; } }
@keyframes liftUp { to { transform: translateY(-100%); opacity: 0; } }
.cookie-bar { position: fixed; left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 60; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 30px rgba(16,35,58,.3); animation: bounceIn .45s cubic-bezier(.3,1.5,.5,1) both; }
.cookie-bar p { margin: 0; }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) {
  .faq, .faq .md, .announce, .a-ico, .cookie-bar, .faq-plus, .faq-plus::after { animation: none !important; transition: none !important; }
}

/* staff-only reminder while maintenance is on */
.maint-bar { position: sticky; top: 0; z-index: 45; padding: 8px 14px; background: #FA3C09; color: #fff; font-size: 13px; font-weight: 700; text-align: center; }
.maint-bar a { color: #fff; }

/* ------------------------------------------------------------------ core games */
.mcard { margin-top: 14px; }
.mcard-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mcard-ring { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--surface-2) 0); transition: --p .6s; position: relative; }
.mcard-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.mcard-ring span { position: relative; }
.mq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mq { padding: 12px; border-radius: 16px; background: var(--surface-2); animation: slideIn .4s cubic-bezier(.2,1.2,.4,1) both; animation-delay: calc(min(var(--i), 10) * 35ms); transition: box-shadow .3s; }
.mq.picked { animation: picked .6s ease; }
.mq.correct { box-shadow: inset 0 0 0 2px var(--green); background: var(--ok-bg); }
.mq.wrong { opacity: .78; }
.mq.void { opacity: .6; }
.mq-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mq-top strong { flex: 1; font-size: 14px; }
.mq-kind { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--ink); color: var(--ink-inv); }
.mq-kind.k-toss { background: #F5B700; color: #2A1D00; }
.mq-kind.k-winner { background: var(--red); color: #fff; }
.mq-kind.k-custom { background: var(--violet); color: #fff; }
.mq-coins { flex: none; font-size: 12px; font-weight: 800; color: #9A6B00; }
[data-theme="c"] .mq-coins { color: var(--gold); }
.mq-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.mq-opts.opts-3 { grid-template-columns: repeat(3, 1fr); }
.mq-opts.opts-5 { grid-template-columns: repeat(3, 1fr); }
.mq-opt { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 42px; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; transition: border-color .2s, transform .15s; }
.mq-opt::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: rgba(102,85,211,.12); transition: width .7s cubic-bezier(.2,1,.3,1); }
.mq-opt > * { position: relative; }
.mq-opt:not(:disabled):hover { transform: translateY(-1px); border-color: var(--ink-2); }
.mq-opt:disabled { cursor: default; }
.mq-opt.mine { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(16,35,58,.12); }
.mq-opt.mine::after { content: '✓'; position: absolute; top: 2px; right: 6px; font-size: 10px; }
.mq-opt.answer { border-color: var(--green); background: var(--ok-bg); animation: answerGlow 1.6s ease-in-out 2; }
.mq-opt.wrong { border-color: var(--bad-ink); }
.mq-pct { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mq-foot { margin-top: 6px; color: var(--ink-2); }
.mq-res.ok { color: var(--ok-ink); font-weight: 800; }
.mq-res.bad { color: var(--bad-ink); font-weight: 700; }
@keyframes answerGlow { 50% { box-shadow: 0 0 0 5px rgba(0,194,130,.25); } }

.play-hero { margin-top: 12px; border-radius: 24px; background: var(--hero); color: #fff; padding: 18px 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
[data-theme="c"] .play-hero { color: var(--ink); border: 1px solid var(--line); }
.play-hero h1 { margin: 0; }
.play-balls { position: absolute; right: 14px; top: 14px; display: flex; gap: 6px; }
.play-balls .hb { width: 24px; height: 24px; animation: hop 2.4s ease-in-out infinite; }
.play-balls .hb:nth-child(2) { animation-delay: .2s; } .play-balls .hb:nth-child(3) { animation-delay: .4s; }
.puz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.puz-tile { position: relative; display: flex; flex-direction: column; gap: 4px; color: var(--ink); min-height: 118px; animation: bounceIn .45s cubic-bezier(.3,1.6,.5,1) both; }
.puz-tile.mini { min-height: 0; }
.puz-tile:nth-child(2) { animation-delay: .08s; }
.puz-tile.fresh { box-shadow: inset 0 0 0 2px #F5B700, var(--shadow); }
.puz-tile.fresh::after { content: 'NEW'; position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: #F5B700; color: #2A1D00; animation: pulse 1.6s ease-in-out infinite; }
.puz-tile.solved { box-shadow: inset 0 0 0 2px var(--green), var(--shadow); }
.puz-tile.solved::after { content: '✓'; position: absolute; top: 8px; right: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 800; font-size: 12px; }
.puz-ico { display: block; }
.puz-streak { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 13px; }
.puz-streak .flame, .puz-streak.big .flame { width: 14px; height: 18px; background: radial-gradient(circle at 50% 70%, #FFE08A 0 25%, #F5B700 40%, #FA3C09 70%); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; animation: flame .5s ease-in-out infinite alternate; }
.puz-streak.big { font-size: 18px; padding: 6px 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.vs-card { margin-bottom: 10px; animation: slideIn .4s cubic-bezier(.2,1.2,.4,1) both; animation-delay: calc(var(--i) * 50ms); }
.vs-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 10px 0 6px; }
.vs-team { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; transition: transform .2s, border-color .2s; }
.vs-team:not(:disabled):hover { transform: translateY(-2px); }
.vs-team.mine { border-color: var(--green); background: var(--ok-bg); }
.vs-badge { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--ink); color: #fff; }
.vs-team:last-of-type .vs-badge { background: var(--red); }
.vs-name { font-weight: 800; font-size: 13px; text-align: center; }
.vs-pct { font-size: 12px; color: var(--ink-2); min-height: 16px; }
.vs-mid { font-family: var(--font-brand); font-style: italic; font-weight: 800; color: var(--red); }
.vs-card.clash .vs-mid { animation: clash .5s cubic-bezier(.3,1.8,.5,1); }
.vs-card.clash .vs-team.mine { animation: claimPop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes clash { 40% { transform: scale(1.8) rotate(-10deg); } }

.puz-no { font-size: .75em; color: var(--ink-2); }
.puz { display: grid; gap: 12px; margin-top: 10px; }
.puz-clues ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.puz-clues li.new { animation: clueIn .7s ease both; }
@keyframes clueIn { from { opacity: 0; transform: translateX(-12px); background: rgba(255,224,138,.6); } }
.puz-head, .prow { display: grid; gap: 4px; }
.puz-head { font-size: 10px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; text-align: center; }
.puz-head.m, .prow:has(> .tile:nth-child(3):last-child) { grid-template-columns: 1fr 1fr 70px; }
.puz-head.c, .prow:has(> .tile:nth-child(7)) { grid-template-columns: 1.6fr 1.4fr 1fr .8fr .9fr .9fr .8fr; }
.puz-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.prow.ghost { height: 44px; border-radius: 10px; border: 2px dashed var(--line); }
.prow .tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 4px; border-radius: 10px; background: #3A4656; color: #fff; font-size: 11px; font-weight: 800; text-align: center; overflow-wrap: anywhere; line-height: 1.15; }
.prow .tile b { font-weight: 800; }
.prow .tile i { font-style: normal; font-size: 13px; }
.prow .tile.hit { background: var(--green); }
.prow .tile.swap, .prow .tile.near, .prow .tile.close { background: #F5B700; color: #2A1D00; }
.prow .tile.up, .prow .tile.down { background: #3A4656; color: #fff; }
.prow .tile.up.close, .prow .tile.down.close { background: #F5B700; color: #2A1D00; }
.prow .tile.name { background: var(--surface-2); color: var(--ink); }
.prow .tile.name.hit { background: var(--green); color: #fff; }
.prow.fresh .tile { animation: flipIn .5s ease both; animation-delay: calc(var(--d) * 110ms); }
.prow.win .tile { animation: tileWin .6s ease both; animation-delay: calc(var(--d) * 70ms + .8s); }
@keyframes flipIn { from { transform: rotateX(90deg); } }
@keyframes tileWin { 50% { transform: translateY(-8px); } }
.puz-inputs { display: grid; grid-template-columns: 1fr 1fr 90px; gap: 8px; margin-bottom: 10px; }
@media (max-width: 420px) { .puz-inputs { grid-template-columns: 1fr 1fr; } .puz-inputs label:last-child { grid-column: span 2; } }
.puz-form { position: relative; }
.suggest { position: absolute; left: 14px; right: 14px; top: calc(100% - 14px); z-index: 20; list-style: none; margin: 0; padding: 4px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); max-height: 280px; overflow: auto; }
.suggest li { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--surface-2); }
.puz-hints { display: flex; flex-wrap: wrap; gap: 6px; }
.hint { padding: 6px 10px; border-radius: 999px; background: #FFF4D6; color: #6B4A00; font-size: 13px; font-weight: 700; animation: bounceIn .4s cubic-bezier(.3,1.6,.5,1) both; }
.puz-end { text-align: center; animation: bounceIn .5s cubic-bezier(.3,1.5,.5,1) both; }
.end-badge { display: inline-block; padding: 6px 16px; border-radius: 999px; font-family: var(--font-brand); font-style: italic; font-weight: 800; font-size: 20px; color: #fff; background: var(--green); }
.end-badge.lose { background: var(--ink-2); }
.end-coins { font-size: 22px; font-weight: 800; color: #9A6B00; margin: 4px 0; }
.mk { display: inline-block; padding: 1px 6px; border-radius: 6px; color: #fff; font-weight: 800; font-size: 12px; background: #3A4656; }
.mk.hit { background: var(--green); } .mk.swap, .mk.near { background: #F5B700; color: #2A1D00; }
.puz-how summary { cursor: pointer; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; margin: 14px 0; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; animation: rise .6s cubic-bezier(.2,1.2,.4,1) both; }
.pod.p1 { animation-delay: .25s; } .pod.p3 { animation-delay: .12s; }
.pod-av { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--ink); box-shadow: 0 0 0 3px var(--c); }
.pod.p1 .pod-av { width: 60px; height: 60px; font-size: 18px; animation: crown 2.4s ease-in-out infinite 1s; }
.pod-name { font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.pod-pts { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.pod-step { width: 100%; display: grid; place-items: center; border-radius: 12px 12px 0 0; background: var(--c); color: #fff; font-family: var(--font-brand); font-style: italic; font-weight: 800; font-size: 22px; }
.pod.p1 .pod-step { height: 70px; } .pod.p2 .pod-step { height: 50px; } .pod.p3 .pod-step { height: 36px; }
@keyframes crown { 50% { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--c), 0 0 18px var(--c); } }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.lb { list-style: none; padding: 6px; }
@media (prefers-reduced-motion: reduce) {
  .mq, .mq.picked, .mq-opt.answer, .play-balls .hb, .puz-tile, .puz-tile.fresh::after, .vs-card, .vs-card.clash .vs-mid, .vs-card.clash .vs-team.mine, .puz-clues li.new, .prow.fresh .tile, .prow.win .tile, .hint, .puz-end, .pod, .pod.p1 .pod-av, .puz-streak .flame { animation: none !important; }
}

.demo-hint { margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: #FFF4D6; color: #6B4A00; font-size: 13px; }
.demo-hint a { color: inherit; font-weight: 800; }

/* same as last + undo */
.again { display: inline-flex; align-items: center; gap: 6px; margin: 2px auto 8px; padding: 7px 14px; border-radius: 999px; border: 1.5px dashed var(--ink-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; animation: bounceIn .35s cubic-bezier(.3,1.6,.5,1) both; }
.again:hover svg { transform: rotate(-120deg); transition: transform .4s; }
.undo-bar { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 10px 14px; border-radius: 14px; background: var(--ink); color: var(--ink-inv); font-size: 13px; font-weight: 600; animation: bounceIn .3s cubic-bezier(.3,1.6,.5,1) both; }
.undo-bar button { border: none; background: #FFE08A; color: #2A1D00; font: inherit; font-weight: 800; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.undo-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #FFE08A; transform-origin: left; }
.undo-bar.run .undo-timer { animation: undoShrink 3s linear forwards; }
@keyframes undoShrink { to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .again, .undo-bar { animation: none; } }

/* why this result? */
.results-row .rball[data-over] { cursor: pointer; }
.results-row .rball[data-over]:hover, .results-row .rball[data-over]:focus-visible { transform: translateY(-2px) scale(1.08); outline: none; box-shadow: 0 0 0 3px rgba(102,85,211,.35); }
.pballs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.pball { position: relative; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); font-weight: 800; font-size: 13px; animation: dropIn .45s cubic-bezier(.3,1.5,.5,1) both; animation-delay: calc(var(--i) * 90ms); }
.pball.w { background: var(--red); color: #fff; }
.pball.x { background: #FFF4D6; color: #6B4A00; }
.pball i { position: absolute; top: -6px; right: -4px; font-style: normal; font-size: 11px; }
.proof-eq { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; animation: slideIn .4s ease both; animation-delay: calc(var(--n) * 90ms); }
.proof-eq code { font: 700 15px/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.proof-result { display: flex; align-items: center; gap: 14px; margin: 12px 0; padding: 12px; border-radius: 16px; background: var(--surface-2); animation: bounceIn .5s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--n, 8) * 90ms + .5s); }
.rball.big { width: 56px; height: 56px; font-size: 26px; flex: none; }
.proof-wins { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
@media (prefers-reduced-motion: reduce) { .pball, .proof-eq, .proof-result { animation: none; } }

/* skeleton rows */
.skel { position: relative; overflow: hidden; list-style: none; height: 52px; margin: 8px 0; border-radius: 14px; background: var(--surface-2); }
.skel.short { width: 60%; height: 28px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: shimmer 1.4s ease-in-out infinite; }
[data-theme="dark"] .skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
/* help tips */
.tip { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 4px; vertical-align: middle; border-radius: 50%; border: 1.5px solid currentColor; background: none; color: var(--ink-2); font-family: inherit; font-weight: 800; font-size: 12px; line-height: 1; cursor: pointer; opacity: .75; }
.tip:hover, .tip:focus-visible { opacity: 1; transform: scale(1.12); }
.tip-bubble { position: absolute; z-index: 90; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--ink-inv); font-size: 13px; font-weight: 500; line-height: 1.45; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: bounceIn .25s cubic-bezier(.3,1.6,.5,1) both; }
/* coach-mark tutorial */
.coach { position: fixed; inset: 0; z-index: 100; }
.coach.out { opacity: 0; transition: opacity .3s; }
.coach-hole { position: fixed; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(10,8,30,.72); transition: all .35s cubic-bezier(.3,1.2,.5,1); pointer-events: none; }
.coach-hole::after { content: ""; position: absolute; inset: -4px; border-radius: 22px; border: 2px solid #FFE08A; animation: coachPulse 1.4s ease-in-out infinite; }
@keyframes coachPulse { 50% { inset: -10px; opacity: .3; } }
.coach-card { position: fixed; left: 50%; width: min(340px, calc(100vw - 32px)); transform: translateX(-50%); padding: 16px; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.coach-card.in { animation: coachIn .4s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes coachIn { from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.94); } }
.coach-step { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.coach-h { display: block; margin: 4px 0; font-size: 18px; }
.coach-p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.coach-btns { display: flex; justify-content: space-between; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .skel::after, .coach-hole::after, .coach-card.in, .tip-bubble { animation: none; } .coach-hole { transition: none; } }.coach-btns .btn { min-height: 40px; padding: 0 16px; font-size: 14px; cursor: pointer; }
.coach-btns .btn.light { background: var(--surface-2); }

/* featured match + off-season */
.feat-banner { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 12px 0; padding: 18px 16px; border-radius: 22px; color: #fff; text-decoration: none; text-align: center; background: radial-gradient(120% 90% at 50% 0%, #3B2E9E 0%, #1B1550 70%); box-shadow: 0 14px 30px rgba(27,21,80,.35); }
.feat-banner::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,224,138,.25) 80%, transparent 90%); animation: featSweep 6s linear infinite; }
.feat-banner > * { position: relative; }
@keyframes featSweep { to { transform: rotate(1turn); } }
.feat-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #FFE08A; color: #2A1D00; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.feat-teams { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.feat-team { font-size: 30px; font-weight: 900; letter-spacing: .02em; animation: featIn .6s cubic-bezier(.3,1.5,.5,1) both; }
.feat-team:last-child { animation-name: featInR; }
@keyframes featIn { from { opacity: 0; transform: translateX(-40px); } }
@keyframes featInR { from { opacity: 0; transform: translateX(40px); } }
.feat-vs { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.15); font-size: 13px; font-weight: 800; animation: bounceIn .5s .35s cubic-bezier(.3,1.6,.5,1) both; }
.feat-names { font-size: 13px; opacity: .85; }
.feat-banner .kicker { color: #FFE08A; }
.feat-banner .countdown .cd { background: rgba(255,255,255,.12); color: #fff; }
.feat-cta { font-size: 12px; opacity: .8; }
.live-card.featured { box-shadow: 0 0 0 3px #FFE08A, var(--shadow); }
.feat-ribbon { position: absolute; right: 12px; top: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px; background: #FFE08A; color: #2A1D00; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.offseason { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; margin: 12px 0; text-align: center; }
.offseason p { margin: 0; }
.off-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.off-art { position: relative; width: 120px; height: 86px; margin-bottom: 4px; }
.off-stump { position: absolute; bottom: 0; width: 7px; height: 64px; border-radius: 4px; background: #E8C27A; }
.off-stump:nth-child(1) { left: 34px; } .off-stump:nth-child(2) { left: 56px; } .off-stump:nth-child(3) { left: 78px; }
.off-bail { position: absolute; left: 33px; top: 18px; width: 53px; height: 5px; border-radius: 3px; background: #C9973F; animation: offBail 4s ease-in-out infinite; transform-origin: 30% 50%; }
.off-ball { position: absolute; left: 0; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); box-shadow: inset -3px -3px 0 rgba(0,0,0,.18); animation: offRoll 4s ease-in-out infinite; }
@keyframes offRoll { 0%, 15% { transform: translateX(-10px) rotate(0); opacity: 0; } 25% { opacity: 1; } 55% { transform: translateX(22px) rotate(360deg); } 70%, 100% { transform: translateX(22px) rotate(380deg); opacity: 1; } }
@keyframes offBail { 0%, 50% { transform: none; } 56% { transform: translateY(-6px) rotate(-8deg); } 64%, 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .feat-banner::before, .feat-team, .feat-vs, .off-bail, .off-ball { animation: none; } }

/* account & security */
.nav-dot { position: absolute; top: 6px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--surface); animation: beacon 1.4s ease-out infinite; }
.sub-h { margin: 10px 0 6px; font-size: 14px; }
.link-btn { border: none; background: none; padding: 6px 4px; color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:disabled { opacity: .5; }
.device-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.device { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); animation: slideIn .35s ease both; animation-delay: calc(var(--i) * 60ms); transition: transform .3s, opacity .3s; }
.device .grow { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.device.current { box-shadow: inset 0 0 0 2px var(--green); }
.device.gone { transform: translateX(60px); opacity: 0; }
.pill.this { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--green); color: #05301F; font-size: 10px; font-weight: 800; vertical-align: 1px; }
.notices:empty { display: none; }
.notice { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; padding: 10px 12px; border-radius: 14px; background: #FFF4D6; color: #3D2A00; border-left: 4px solid #F5B700; animation: bounceIn .4s cubic-bezier(.3,1.6,.5,1) both; }
.close-list { margin: 8px 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.stack-form { display: flex; flex-direction: column; gap: 6px; }
.stack-form label { font-size: 13px; font-weight: 700; margin-top: 6px; }
.stack-form input { min-height: 50px; border-radius: 14px; border: 2px solid var(--line); padding: 0 14px; font-size: 16px; font-weight: 600; }
.stack-form input:focus { border-color: var(--ink); outline: none; }
.btn.danger-btn { margin-top: 10px; background: var(--red); color: #fff; cursor: pointer; }
.btn.checking { background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,.25) 50%, rgba(255,255,255,0) 100%); background-size: 200% 100%; animation: checkSweep 1s linear infinite; }
@keyframes checkSweep { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .nav-dot, .device, .notice, .btn.checking { animation: none; } .device { transition: none; } }
/* closing soon + up next */
.closing { position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; padding: 9px 12px; border-radius: 12px; background: #FFF4D6; color: #3D2A00; font-size: 13px; font-weight: 700; animation: bounceIn .35s cubic-bezier(.3,1.6,.5,1) both; }
.closing-ico { display: inline-block; animation: closingWobble 1s ease-in-out infinite; }
@keyframes closingWobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.closing-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #F5B700; transform-origin: left; }
.closing.run .closing-bar { animation: undoShrink var(--left, 10s) linear forwards; }
.closing.late { background: #FDE3DA; color: #6B1600; }
.closing.late .closing-ico { animation-duration: .45s; }
.up-next { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); color: var(--ink); text-decoration: none; animation: slideIn .45s ease both; }
.up-next strong { flex: 1 1 auto; }
.up-tag { padding: 3px 9px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.up-go { font-size: 22px; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .closing, .closing-ico, .up-next { animation: none; } .closing.run .closing-bar { animation: none; } }.lb-av { overflow: hidden; }
.lb-av img { width: 100%; height: 100%; object-fit: cover; }
.prose img, .md img { max-width: 100%; height: auto; border-radius: 14px; }

/* ================================================================== phase 8 animation pack */

/* page morph between Home and a match (browsers with cross-page View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(pxi-score), ::view-transition-new(pxi-score) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2,.9,.3,1); }
::view-transition-old(root) { animation: vtOut .25s ease both; }
::view-transition-new(root) { animation: vtIn .35s ease both; }
@keyframes vtOut { to { opacity: 0; transform: scale(.98); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(12px); } }

/* running total under the over's balls */
.over-total { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); animation: slideIn .3s ease both; }
.over-total .ot-l { text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
.over-total .ot-sum { font-variant-numeric: tabular-nums; color: var(--ink); }
.rball.mini { width: 22px; height: 22px; font-size: 12px; }
.rball.tickin { animation: tickIn .5s cubic-bezier(.3,1.7,.5,1); }
@keyframes tickIn { 0% { transform: scale(.4) rotate(-120deg); } 70% { transform: scale(1.25) rotate(10deg); } }

/* split-flap scoreboard (result reveal) */
.fx-reveal-board { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 8px; }
.fx-board-l { font-size: 11px; font-weight: 800; letter-spacing: .12em; opacity: .7; }
.flapboard { display: inline-flex; gap: 4px; perspective: 300px; }
.flap { position: relative; display: grid; place-items: center; width: 34px; height: 46px; border-radius: 6px; background: linear-gradient(#1B2B40 0 49%, #0E1A2A 51%); color: #FFE08A; font: 900 28px/1 ui-monospace, Consolas, monospace; box-shadow: inset 0 -2px 0 rgba(0,0,0,.3), 0 4px 10px rgba(0,0,0,.25); }
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: rgba(0,0,0,.55); }
.flap.turn b { animation: flapTurn .07s linear; transform-origin: 50% 50%; display: inline-block; }
.flap.set { animation: flapSet .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes flapTurn { from { transform: rotateX(-80deg); opacity: .4; } }
@keyframes flapSet { 50% { transform: scale(1.12); box-shadow: 0 0 0 3px rgba(255,224,138,.5), 0 4px 10px rgba(0,0,0,.25); } }

/* near miss: the ball wobbles, the text glows amber */
.fx-reveal-ball.nearmiss { animation: nearMiss .9s cubic-bezier(.36,.07,.19,.97); }
@keyframes nearMiss { 10%, 50%, 90% { transform: rotate(-12deg) translateX(-6px); } 30%, 70% { transform: rotate(12deg) translateX(6px); } }
.fx-reveal-outcome.near { color: #F5B700; }

/* streak flame grows with the streak */
.streak svg { transform: scale(calc(1 + var(--heat, 2) * .05)); }
.streak.blaze { background: linear-gradient(135deg, #FFB800, #FA3C09 60%, #B3122E); box-shadow: 0 0 0 0 rgba(250,60,9,.5), var(--shadow); animation: blaze 1.2s ease-out infinite; }
@keyframes blaze { to { box-shadow: 0 0 0 10px rgba(250,60,9,0), var(--shadow); } }

/* home: a live card's heartbeat follows real balls, not a timer */
.live-card .dot { animation-duration: 2.4s; }
.live-card.beat { animation: cardBeat .7s cubic-bezier(.3,1.5,.5,1); }
.live-card.beat .live-pill .dot { animation: dotBeat .7s ease-out; }
@keyframes cardBeat { 30% { transform: scale(1.015); box-shadow: 0 0 0 4px rgba(250,60,9,.25), var(--shadow); } }
@keyframes dotBeat { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(250,60,9,.8); } 100% { transform: scale(1); box-shadow: 0 0 0 12px rgba(250,60,9,0); } }

/* countdown digits flip like a desk clock */
.cd b { perspective: 200px; }
.cd b.tick { animation: clockFlip .45s cubic-bezier(.3,1.4,.5,1); transform-origin: 50% 50%; }
@keyframes clockFlip { 0% { transform: rotateX(-90deg); filter: brightness(.6); } 60% { transform: rotateX(15deg); } }

/* modal moments: chest, level up */
.fx-moment { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(10,8,30,.6); pointer-events: auto; z-index: 120; cursor: pointer; }
.fx-chest-stage { position: relative; display: grid; place-items: center; width: 240px; height: 260px; }
.fx-chest-svg { position: relative; z-index: 2; width: 170px; filter: drop-shadow(0 12px 18px rgba(0,0,0,.4)); }
.fx-chest-lid { transform-box: fill-box; transform-origin: 0% 100%; transition: transform .45s cubic-bezier(.3,1.8,.5,1); }
.fx-chest-stage.wobble .fx-chest-svg { animation: chestWobble .55s ease-in-out infinite; }
@keyframes chestWobble { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg) translateY(-3px); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg) translateY(-2px); } 80% { transform: rotate(3deg); } }
.fx-chest-stage.open .fx-chest-lid { transform: translateY(-4px) rotate(-38deg); }
.fx-chest-stage.open .fx-chest-svg { animation: chestPop .5s cubic-bezier(.3,1.7,.5,1); }
@keyframes chestPop { 40% { transform: scale(1.12) translateY(-6px); } }
.fx-rays { position: absolute; inset: -40px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255,224,138,.55) 0 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); opacity: 0; transform: scale(.4); }
.fx-chest-stage.open .fx-rays { opacity: 1; transform: scale(1); transition: opacity .3s, transform .6s cubic-bezier(.2,1.4,.4,1); animation: raysTurn 8s linear infinite; }
@keyframes raysTurn { to { rotate: 1turn; } }
.fx-chest-amt { position: absolute; top: 4px; z-index: 3; color: #FFE08A; font-weight: 900; font-size: 40px; line-height: 1; text-shadow: 0 3px 0 #7A3F0B, 0 0 18px rgba(255,224,138,.8); opacity: 0; }
.fx-chest-stage.open .fx-chest-amt { opacity: 1; animation: amtUp .6s cubic-bezier(.3,1.7,.5,1) both; }
@keyframes amtUp { from { transform: translateY(40px) scale(.4); } }
.fx-chest-hint { position: absolute; bottom: 0; color: #fff; font-size: 13px; font-weight: 700; opacity: .85; }
.fx-level-card { position: relative; display: grid; place-items: center; gap: 4px; text-align: center; color: #fff; }
.fx-level-ring { position: absolute; width: 180px; height: 180px; border-radius: 50%; border: 6px solid #FFE08A; animation: ringBurst 1.1s cubic-bezier(.2,.8,.3,1) both; }
@keyframes ringBurst { from { transform: scale(.2); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.fx-level-kicker { font-size: 14px; font-weight: 900; letter-spacing: .3em; color: #FFE08A; animation: slideIn .4s ease both; }
.fx-level-n { font-weight: 900; font-size: 110px; line-height: 1; text-shadow: 0 6px 0 #6655D3, 0 0 30px rgba(102,85,211,.9); animation: levelPunch .7s cubic-bezier(.3,1.8,.5,1) .15s both; }
@keyframes levelPunch { from { transform: scale(3) rotate(-12deg); opacity: 0; } }
.fx-level-sub { font-size: 13px; opacity: .85; animation: slideIn .4s ease .5s both; }

/* badge unlock: 3D flip + light sweep */
.badge { perspective: 400px; position: relative; overflow: hidden; }
.badge.unlock { animation: badgeFlip 1s cubic-bezier(.3,1.3,.5,1) both; }
.badge.unlock::after { content: ""; position: absolute; inset: -30%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.85) 50%, transparent 60%); transform: translateX(-120%); animation: sweep .8s ease .55s forwards; pointer-events: none; }
@keyframes badgeFlip { 0% { transform: rotateY(0) scale(1); } 45% { transform: rotateY(180deg) scale(1.25); } 100% { transform: rotateY(360deg) scale(1); } }
@keyframes sweep { to { transform: translateX(120%); } }

/* contest: who climbed */
.lb-up { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--green); color: #05301F; font-size: 10px; font-weight: 900; animation: upPop .5s cubic-bezier(.3,1.8,.5,1) both, upFade 1s ease 4s forwards; }
@keyframes upPop { from { transform: translateY(8px) scale(.4); opacity: 0; } }
@keyframes upFade { to { opacity: 0; } }
.pod-av { overflow: hidden; }
.pod-av img { width: 100%; height: 100%; object-fit: cover; }

/* puzzle: tiles turn over to reveal their colour; the solved card shines */
.prow.fresh .tile { animation: tileReveal .6s ease both; animation-delay: calc(var(--d) * 120ms); }
@keyframes tileReveal { 0% { transform: rotateX(0); filter: grayscale(1) brightness(.6); } 49% { transform: rotateX(90deg); filter: grayscale(1) brightness(.6); } 50% { transform: rotateX(90deg); filter: none; } 100% { transform: rotateX(0); filter: none; } }
.puz-end.shine-win { position: relative; overflow: hidden; }
.puz-end.shine-win::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.6) 50%, transparent 60%); transform: translateX(-120%); animation: sweep 1.1s ease 1.2s 2 forwards; pointer-events: none; }

/* reconnecting: a ball rolls across the banner */
.conn { overflow: hidden; }
.conn-ball { position: absolute; top: 50%; left: -20px; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FF6B4A, #B3122E); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); animation: connRoll 2.2s linear infinite; }
@keyframes connRoll { from { transform: translateX(0) rotate(0); } to { transform: translateX(calc(100vw + 40px)) rotate(720deg); } }

/* pull to refresh (installed app) */
.ptr { position: fixed; top: 0; left: 50%; z-index: 90; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FF6B4A, #B3122E 70%); box-shadow: 0 4px 12px rgba(0,0,0,.3); transform: translate(-50%, -50px); transition: transform .25s; pointer-events: none; }
.ptr::before { content: ""; position: absolute; top: 2px; bottom: 2px; left: 50%; width: 3px; margin-left: -1.5px; background: repeating-linear-gradient(#FFE5DE 0 3px, transparent 3px 6px); border-radius: 2px; }
.ptr.ready { box-shadow: 0 0 0 4px rgba(255,224,138,.6), 0 4px 12px rgba(0,0,0,.3); }
.ptr.spin { transition: none; animation: ptrSpin .5s linear infinite; }
@keyframes ptrSpin { to { transform: translate(-50%, 40px) rotate(1turn); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root), ::view-transition-old(pxi-score), ::view-transition-new(pxi-score) { animation: none; }
  .over-total, .rball.tickin, .flap.turn b, .flap.set, .fx-reveal-ball.nearmiss, .streak.blaze, .live-card.beat, .live-card.beat .live-pill .dot, .cd b.tick,
  .fx-chest-stage.wobble .fx-chest-svg, .fx-chest-stage.open .fx-chest-svg, .fx-chest-stage.open .fx-rays, .fx-chest-stage.open .fx-chest-amt, .fx-level-ring, .fx-level-kicker, .fx-level-n, .fx-level-sub,
  .badge.unlock, .badge.unlock::after, .lb-up, .prow.fresh .tile, .puz-end.shine-win::after, .conn-ball, .ptr.spin { animation: none !important; }
  .fx-chest-lid { transition: none; }
}

/* ================================================================== animation pack 2 */

/* odometer digits ("you could win") */
.odo { display: inline-flex; }
.odo-d { display: inline-block; height: 1.2em; overflow: hidden; vertical-align: bottom; }
.odo-col { display: flex; flex-direction: column; transform: translateY(calc(var(--from) * -1.2em)); animation: odoRoll .6s cubic-bezier(.2,.9,.3,1.15) forwards; }
.odo-col i { height: 1.2em; line-height: 1.2em; font-style: normal; text-align: center; }
@keyframes odoRoll { to { transform: translateY(calc(var(--to) * -1.2em)); } }

/* stake picker: coin stack + win meter */
.win-meter { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: color .3s; }
.win-meter b { font-size: 17px; font-weight: 900; color: var(--ink); font-variant-numeric: tabular-nums; }
.coin-stack { position: relative; display: inline-flex; flex-direction: column-reverse; width: 22px; height: 30px; justify-content: flex-start; }
.coin-stack i { display: block; width: 22px; height: 6px; margin-top: -2px; border-radius: 50%; background: linear-gradient(#FFE08A, #F5B700); box-shadow: inset 0 -1.5px 0 #C98F00, 0 1px 0 rgba(0,0,0,.15); animation: coinStack .3s cubic-bezier(.3,1.7,.5,1) both; }
.coin-stack i:last-child { animation-delay: .02s; }
@keyframes coinStack { from { transform: translateY(-14px); opacity: 0; } }
.win-meter.max { color: #8A6100; }
.win-meter.max b { color: #C98F00; text-shadow: 0 0 12px rgba(245,183,0,.6); }
.win-meter.max .coin-stack i { box-shadow: inset 0 -1.5px 0 #C98F00, 0 0 8px rgba(245,183,0,.8); }

/* number pad: sinks like a real button, ripple in its colour */
.number-grid .nball { position: relative; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.number-grid .nball:active { transform: translateY(3px) scale(.94); box-shadow: inset 0 3px 6px rgba(0,0,0,.25); }
.nripple { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: rgba(255,255,255,.6); pointer-events: none; animation: nripple .6s ease-out forwards; }
@keyframes nripple { to { transform: scale(9); opacity: 0; } }

/* welcome jar */
.fx-welcome-card, .fx-trophy-card { display: grid; justify-items: center; gap: 6px; padding: 24px 26px; border-radius: 26px; background: var(--surface); color: var(--ink); text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.4); animation: bounceIn .45s cubic-bezier(.3,1.6,.5,1) both; max-width: min(320px, calc(100vw - 32px)); }
.fx-welcome-k { font-size: 12px; font-weight: 900; letter-spacing: .14em; color: var(--ink-2); }
.fx-jar { position: relative; width: 96px; height: 120px; margin: 8px 0; }
.fx-jar-glass { position: absolute; inset: 0; border: 4px solid rgba(16,35,58,.35); border-top-width: 10px; border-radius: 18px 18px 26px 26px; background: linear-gradient(90deg, rgba(255,255,255,.35), transparent 40%); }
.fx-jar-fill { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 0; border-radius: 6px 6px 20px 20px; background: repeating-linear-gradient(0deg, #F5B700 0 7px, #FFD34D 7px 10px); transition: height .16s ease-out; }
.fx-drop { position: absolute; top: -40px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFE08A, #F5B700 60%, #C98F00); animation: coinDrop .6s cubic-bezier(.5,0,.8,.4) forwards; z-index: 2; }
@keyframes coinDrop { to { transform: translateY(110px) rotate(200deg); opacity: .6; } }
.fx-jar.pour { animation: jarPour .9s ease-in-out; transform-origin: 50% 100%; }
@keyframes jarPour { 40% { transform: rotate(-35deg) translateY(-6px); } }
.fx-welcome-amt { font-size: 40px; font-weight: 900; color: #C98F00; font-variant-numeric: tabular-nums; }
.fx-welcome-sub, .fx-trophy-s { font-size: 13px; color: var(--ink-2); }

/* scoreboard moment (innings break, chase) */
.fx-sb { display: grid; justify-items: center; gap: 8px; padding: 22px 28px; border-radius: 22px; background: #10233A; color: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.45); animation: sbIn .5s cubic-bezier(.3,1.4,.5,1) both; }
.fx-sb.red { background: linear-gradient(135deg, #B3122E, #FA3C09); }
@keyframes sbIn { from { transform: translateY(-60px) scale(.9); opacity: 0; } }
.fx-sb-k { font-size: 12px; font-weight: 900; letter-spacing: .2em; color: #FFE08A; }
.fx-sb-big .flap { width: 46px; height: 62px; font-size: 40px; }
.fx-sb-big.thump { animation: thump .45s cubic-bezier(.3,1.8,.5,1); }
@keyframes thump { 40% { transform: scale(1.18); } }
.fx-sb-sub { font-size: 13px; opacity: .85; }

/* end-of-match summary */
.fx-sum-card { width: min(340px, calc(100vw - 32px)); padding: 22px; border-radius: 24px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 50px rgba(0,0,0,.4); cursor: default; animation: bounceIn .45s cubic-bezier(.3,1.6,.5,1) both; }
.fx-sum-k { font-size: 11px; font-weight: 900; letter-spacing: .16em; color: var(--ink-2); }
.fx-sum-t { margin: 2px 0 12px; font-size: 20px; font-weight: 900; }
.fx-sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fx-sum-s { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--surface-2); animation: slideIn .4s ease both; animation-delay: calc(.4s + var(--i) * .38s); }
.fx-sum-s b { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.fx-sum-s span { font-size: 12px; color: var(--ink-2); }
.fx-sum-btns { display: flex; gap: 8px; margin-top: 14px; }
.fx-sum-btns .btn { flex: 1; min-height: 44px; cursor: pointer; }

/* toss coin */
.fx-toss-stage { display: grid; justify-items: center; gap: 16px; perspective: 600px; }
.fx-coin { position: relative; width: 120px; height: 120px; transform-style: preserve-3d; }
.fx-coin-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; backface-visibility: hidden; font-size: 26px; font-weight: 900; color: #5A3B00; background: radial-gradient(circle at 35% 30%, #FFF1B8, #F5B700 55%, #C98F00); box-shadow: inset 0 0 0 6px rgba(201,143,0,.6), 0 10px 24px rgba(0,0,0,.35); }
.fx-coin-face.back { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #F3F6FA, #A9BCD0 55%, #6E8299); color: #1B2B40; box-shadow: inset 0 0 0 6px rgba(110,130,153,.6), 0 10px 24px rgba(0,0,0,.35); }
.fx-coin.flip { animation: coinToss 1.3s cubic-bezier(.25,.6,.35,1) forwards; }
@keyframes coinToss { 0% { transform: translateY(0) rotateY(0); } 45% { transform: translateY(-120px) rotateY(calc(var(--end) * .55)); } 100% { transform: translateY(0) rotateY(var(--end)); } }
.fx-toss-note { color: #fff; font-weight: 800; font-size: 15px; animation: slideIn .4s ease 1.3s both; }

/* installed-app splash */
.fx-splash { background: #10233A !important; }
.fx-splash-mark { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 34px; font-weight: 900; font-style: italic; }
.fx-splash-ball { width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FF6B4A, #B3122E 70%); position: relative; animation: splashBall .7s cubic-bezier(.3,1.5,.5,1) both; }
.fx-splash-ball::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 50%; width: 3px; margin-left: -1.5px; background: repeating-linear-gradient(#FFE5DE 0 3px, transparent 3px 6px); }
@keyframes splashBall { from { transform: translateX(-120px) rotate(-540deg); opacity: 0; } }
.fx-splash-word { animation: slideIn .4s ease .35s both; }
.fx-splash-word b { color: #FA3C09; display: inline-block; animation: xiStamp .4s cubic-bezier(.3,1.8,.5,1) .65s both; }
@keyframes xiStamp { from { transform: scale(2.6) rotate(-12deg); opacity: 0; } }

/* first-win trophy */
.fx-trophy-cup { font-size: 72px; line-height: 1; animation: cupRise .7s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes cupRise { from { transform: translateY(40px) scale(.3) rotate(-20deg); opacity: 0; } }
.fx-trophy-t { font-size: 24px; font-weight: 900; }

/* my picks: open ones breathe, settled ones stamp in */
.pick-list li.pk-open { box-shadow: inset 0 0 0 2px rgba(102,85,211,.25); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: inset 0 0 0 2px rgba(102,85,211,.6), 0 0 0 4px rgba(102,85,211,.08); } }
.pk-stamp { margin-left: 6px; font-weight: 900; font-size: 18px; opacity: 0; transform: scale(2.4) rotate(-14deg); }
.pk-won .pk-stamp { color: var(--green); }
.pk-lost .pk-stamp { color: var(--red); }
.stamped .pk-stamp { animation: pkStamp .45s cubic-bezier(.3,1.8,.5,1) forwards; }
@keyframes pkStamp { to { opacity: 1; transform: scale(1) rotate(-8deg); } }
.empty-stumps { display: flex; align-items: center; gap: 12px; }
.zz-stumps { position: relative; display: inline-flex; gap: 4px; align-items: flex-end; height: 40px; padding-right: 18px; }
.zz-stumps i { width: 4px; height: 30px; border-radius: 2px; background: #E8C27A; transform: rotate(-8deg); transform-origin: bottom; animation: snooze 3s ease-in-out infinite; }
.zz-stumps i:nth-child(2) { animation-delay: .15s; } .zz-stumps i:nth-child(3) { animation-delay: .3s; }
@keyframes snooze { 50% { transform: rotate(-14deg); } }
.zz-stumps b { position: absolute; right: 0; top: 0; font-size: 12px; color: var(--ink-2); opacity: 0; animation: zz 3s ease-in-out infinite; }
.zz-stumps b:last-child { animation-delay: 1.5s; font-size: 9px; right: 6px; }
@keyframes zz { 20% { opacity: 1; } 80% { opacity: 0; transform: translate(8px, -16px); } }

/* home: nothing live, the bowler keeps bowling */
.bowler-art { margin: 4px auto; }
.bowler-art .bw-arm { transform-origin: 34px 42px; animation: bowlArm 2.6s ease-in-out infinite; }
.bowler-art .bw-ball { animation: bowlBall 2.6s ease-in-out infinite; }
.bowler-art .bw-body { animation: bowlRun 2.6s ease-in-out infinite; }
@keyframes bowlArm { 0%, 40% { transform: rotate(0); } 55% { transform: rotate(-200deg); } 65%, 100% { transform: rotate(-360deg); } }
@keyframes bowlRun { 0%, 40% { transform: translateX(0); } 55% { transform: translateX(10px); } 100% { transform: translateX(0); } }
@keyframes bowlBall { 0%, 52% { transform: translate(0, 0); opacity: 1; } 60% { transform: translate(40px, 30px); } 75% { transform: translate(98px, 52px); opacity: 1; } 80%, 100% { transform: translate(98px, 52px); opacity: 0; } }

/* support: honest waiting dots (no fake "typing") */
.waiting-dots { display: flex; align-items: center; gap: 4px; margin: 6px 0 10px; font-size: 12px; color: var(--ink-2); }
.waiting-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); animation: wdot 1.2s ease-in-out infinite; }
.waiting-dots span:nth-child(2) { animation-delay: .15s; } .waiting-dots span:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes wdot { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: .4; } }

/* friendly form errors: a "no-ball" shake and flash */
.form-error.oops { animation: noBall .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes noBall { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); background: rgba(250,60,9,.12); } 40%, 60% { transform: translateX(6px); } }

@media (prefers-reduced-motion: reduce) {
  .odo-col { animation: none; transform: translateY(calc(var(--to) * -1.2em)); }
  .coin-stack i, .nripple, .fx-welcome-card, .fx-trophy-card, .fx-drop, .fx-jar.pour, .fx-sb, .fx-sb-big.thump, .fx-sum-card, .fx-sum-s, .fx-coin.flip, .fx-toss-note,
  .fx-splash-ball, .fx-splash-word, .fx-splash-word b, .fx-trophy-cup, .pick-list li.pk-open, .stamped .pk-stamp, .zz-stumps i, .zz-stumps b, .bowler-art *, .waiting-dots span, .form-error.oops { animation: none !important; }
  .fx-coin.flip { transform: rotateY(var(--end)); }
  .pk-stamp { opacity: 1; transform: none; }
}
.title-tip { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.title-tip .pick-title { margin: 0; }
.title-tip .tip { flex: none; margin-left: 0; }

/* ================================================================== motion polish */
:root { --ease-pop: cubic-bezier(.3,1.6,.5,1); --ease-out: cubic-bezier(.2,.9,.3,1); --dur-quick: .25s; --dur-med: .45s; }

/* Me → Reduce animations: everything jumps straight to its end state */
html.calm *, html.calm *::before, html.calm *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
html.calm ::view-transition-group(*), html.calm ::view-transition-old(*), html.calm ::view-transition-new(*) { animation: none !important; }

/* volume slider */
input.vol { -webkit-appearance: none; appearance: none; width: 140px; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--ink) var(--v, 80%), var(--line) var(--v, 80%)); outline-offset: 4px; }
input.vol::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); box-shadow: var(--shadow); cursor: pointer; }
input.vol::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); cursor: pointer; }

/* contest final whistle: podium rises 3rd → 1st */
.podium.live-reveal .pod { opacity: 0; transform: translateY(40px); }
.podium.live-reveal .pod.up { opacity: 1; transform: none; transition: transform .6s var(--ease-pop), opacity .3s; }

/* puzzle streak calendar */
.streak-week { display: flex; gap: 6px; justify-content: center; list-style: none; margin: 8px 0; padding: 0; }
.streak-week li { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 11px; font-weight: 800; }
.streak-week li.today { box-shadow: 0 0 0 2px var(--ink); }
.streak-week li.on { background: linear-gradient(135deg, #FFB800, #FA3C09); color: #fff; }
.streak-week.lit li.on { animation: dayLight .45s var(--ease-pop) both; animation-delay: calc(var(--i) * 110ms); }
@keyframes dayLight { 0% { transform: scale(.5); filter: grayscale(1); } 60% { transform: scale(1.18); } 100% { transform: none; filter: none; } }

/* home: ring around "Over N" fills ball by ball */
.over-ring-wrap { position: relative; display: inline-grid; place-items: center; min-width: 64px; min-height: 44px; }
.over-ring { position: absolute; width: 50px; height: 50px; transform: rotate(-90deg); }
.over-ring circle { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 3; }
.over-ring .or-fill { stroke: #FFE08A; stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: calc(97.4 - 97.4 * var(--p, 0) / 6); transition: stroke-dashoffset .6s var(--ease-out); }
.over-ring-wrap .accent { position: relative; font-size: 13px; }

@media (prefers-reduced-motion: reduce) { .streak-week.lit li.on { animation: none; } .podium.live-reveal .pod { opacity: 1; transform: none; } .over-ring .or-fill { transition: none; } }
html.calm .podium.live-reveal .pod { opacity: 1; transform: none; }.podium.live-reveal .pod { animation: none; }
/* dark (Premium Pitch) touches for the newer moments */
[data-theme="c"] .fx-jar-glass { border-color: rgba(255,255,255,.35); }
[data-theme="c"] .fx-sum-btns .btn.light { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
[data-theme="c"] .streak-week li.today { box-shadow: 0 0 0 2px var(--gold, #F5B700); }

/* ================================================================== launch small features */
/* buyer branding: main colour on buttons, the active tab and highlights */
html.branded .btn.primary, html.branded [data-call].btn { background: var(--brand); color: var(--brand-ink); }
html.branded .tabbar a[aria-current="page"] { color: var(--brand); }
html.branded .tabbar a[aria-current="page"] svg { stroke: var(--brand); }
html.branded .title-dot, html.branded .btn.gold { background: var(--brand); color: var(--brand-ink); }
html.branded .section-title a, html.branded a.small { color: var(--brand); }
.brand-logo { display: block; height: 34px; width: auto; max-width: 180px; object-fit: contain; }
/* planned maintenance notice */
.plan-bar { padding: 8px 14px; background: #FFF4D6; color: #3D2A00; font-size: 13px; font-weight: 700; text-align: center; animation: slideIn .4s ease both; }
/* crowd split */
.crowd-split { margin: 2px 0 10px; }
.crowd-split.in { animation: slideIn .4s ease both; }
.cs-bar { display: flex; gap: 2px; height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.cs-bar i { flex: 1 1 0; min-width: 0; transition: flex-grow .7s cubic-bezier(.2,.9,.3,1); }
.cs-bar .g { background: var(--green); } .cs-bar .r { background: var(--red); } .cs-bar .v { background: var(--violet); } .cs-bar .n { background: var(--ink-2); }
.cs-legend { margin-top: 4px; color: var(--ink-2); text-align: center; }
/* Me: messages from the team */
.inbox .msg-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin-bottom: 6px; border-radius: 14px; background: var(--surface-2); animation: slideIn .35s ease both; animation-delay: calc(var(--i) * 60ms); }
.inbox .msg-row.unread { box-shadow: inset 3px 0 0 var(--red); }
@media (prefers-reduced-motion: reduce) { .plan-bar, .crowd-split.in, .inbox .msg-row { animation: none; } .cs-bar i { transition: none; } }

/* ================================================================== small features 2 */
/* install card */
.install-card { position: fixed; left: 12px; right: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 65; display: flex; align-items: center; gap: 10px; max-width: 460px; margin: 0 auto; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 14px 34px rgba(16,35,58,.28); animation: icIn .5s cubic-bezier(.3,1.5,.5,1) both; }
.install-card.out { animation: icOut .3s ease forwards; }
@keyframes icIn { from { transform: translateY(120%); opacity: 0; } }
@keyframes icOut { to { transform: translateY(120%); opacity: 0; } }
.install-card .grow { display: flex; flex-direction: column; gap: 2px; }
.ic-ball { width: 34px; height: 34px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FF6B4A, #B3122E 70%); animation: icBall 2s ease-in-out infinite; }
@keyframes icBall { 50% { transform: rotate(25deg) translateY(-3px); } }
.ic-x { border: none; background: none; color: var(--ink-2); font-size: 22px; line-height: 1; padding: 4px 6px; cursor: pointer; }
.install-card .btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
/* share a win */
.share-chip { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 64; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border: none; border-radius: 999px; background: linear-gradient(135deg, #FFD34D, #F5B700); color: #2A1D00; font: inherit; font-weight: 800; font-size: 14px; box-shadow: 0 10px 24px rgba(245,183,0,.45); cursor: pointer; animation: shareIn .5s cubic-bezier(.3,1.6,.5,1) both, shareWiggle 2.4s ease-in-out 1s infinite; }
.share-chip.out { animation: icOut .3s ease forwards; }
@keyframes shareIn { from { transform: translate(-50%, 60px) scale(.6); opacity: 0; } }
@keyframes shareWiggle { 0%, 80%, 100% { rotate: 0deg; } 85% { rotate: -4deg; } 90% { rotate: 4deg; } 95% { rotate: -2deg; } }
.pk-share { margin-left: 4px; border: none; background: var(--surface-2); color: var(--ink); width: 30px; height: 30px; border-radius: 50%; font-weight: 900; cursor: pointer; }
.win-share { position: relative; overflow: hidden; display: grid; justify-items: center; gap: 8px; padding: 28px 18px; margin-top: 12px; }
.ws-burst { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(245,183,0,.14) 0 10deg, transparent 10deg 24deg); animation: raysTurn 14s linear infinite; pointer-events: none; }
.win-share > * { position: relative; }
.ws-k { font-size: 12px; font-weight: 900; letter-spacing: .2em; color: #C98F00; }
.ws-h { margin: 0; font-size: 24px; line-height: 1.2; }
.ws-amt { font-size: 40px; font-weight: 900; color: #C98F00; animation: bounceIn .6s cubic-bezier(.3,1.6,.5,1) both; }
.ws-amt small { font-size: 15px; color: var(--ink-2); font-weight: 700; }
.win-share .btn.wide { width: 100%; max-width: 320px; }
/* favourite teams */
.fav-row { display: flex; justify-content: center; gap: 8px; margin: 4px 0 8px; }
.fav-btn { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.fav-btn.on { background: #FFF4D6; border-color: #F5B700; color: #6B4A00; }
[data-teams].fav { position: relative; }
.fav-star { position: absolute; top: 8px; left: 10px; z-index: 3; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #FFE08A; color: #6B4A00; font-size: 13px; box-shadow: 0 2px 6px rgba(0,0,0,.2); animation: bounceIn .4s cubic-bezier(.3,1.6,.5,1) both; }
.upcoming.fav { box-shadow: inset 0 0 0 2px #F5B700, var(--shadow); padding-left: 40px; }
@media (prefers-reduced-motion: reduce) { .install-card, .ic-ball, .share-chip, .ws-burst, .ws-amt, .fav-star { animation: none !important; } }

/* ================================================================== crowd + golden overs */
.fx-reveal-crowd { min-height: 0; margin-top: 6px; font-size: 13px; font-weight: 700; color: #6655D3; opacity: 0; }
.fx-reveal-crowd.in { animation: slideIn .4s ease .3s both; opacity: 1; }
.crowd-line { margin: 4px 0 8px; color: var(--ink-2); font-weight: 600; text-align: center; }
.crowd-line.in { animation: slideIn .4s ease both; }
.pick-sheet.golden { box-shadow: 0 0 0 3px #F5B700, 0 0 28px rgba(245,183,0,.55), var(--shadow); animation: goldenGlow 2.4s ease-in-out infinite; }
@keyframes goldenGlow { 50% { box-shadow: 0 0 0 3px #FFE08A, 0 0 40px rgba(245,183,0,.8), var(--shadow); } }
.golden-ribbon { margin: 0 0 8px; padding: 8px 12px; border-radius: 12px; background: linear-gradient(135deg, #FFE08A, #F5B700); color: #3D2A00; font-size: 13px; font-weight: 800; text-align: center; position: relative; overflow: hidden; }
.golden-ribbon::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.7) 50%, transparent 60%); transform: translateX(-120%); animation: sweep 2.6s ease-in-out infinite; }
.golden-ribbon.soon { background: #FFF4D6; color: #6B4A00; }
.golden-ribbon.soon::after { display: none; }
.golden-strip { margin: -4px 0 4px; padding: 5px 10px; border-radius: 10px; background: rgba(255,224,138,.18); color: #FFE08A; font-size: 12px; font-weight: 800; }
.ootd { display: flex; align-items: center; gap: 14px; margin: 12px 0; text-decoration: none; color: var(--ink); }
.ootd .grow { display: flex; flex-direction: column; gap: 2px; }
.ootd-k { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: var(--ink-2); }
.ootd-ball { width: 46px; height: 46px; font-size: 20px; flex: none; animation: bounceIn .6s cubic-bezier(.3,1.6,.5,1) both; }
@media (prefers-reduced-motion: reduce) { .pick-sheet.golden, .golden-ribbon::after, .ootd-ball, .fx-reveal-crowd.in, .crowd-line.in { animation: none; } }
/* ------------------------------------------------------------------ add-on games: name banner + "Games on this match" strip */
.ao-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.ao-head.compact { align-items: center; margin-bottom: 0; padding-bottom: 6px; border-bottom-color: rgba(59, 30, 132, .2); }
.ao-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #FFF4D6, #FFE08A); font-size: 19px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); animation: aoIcoIn .6s cubic-bezier(.3,1.6,.5,1) both; }
.ao-head.compact .ao-ico { width: 26px; height: 26px; border-radius: 8px; font-size: 14px; }
.ao-title { flex: 1; min-width: 0; }
.ao-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ao-name { margin: 0; font-size: 16px; font-weight: 900; color: var(--ink); }
.ao-head.compact .ao-name { font-size: 13px; color: inherit; }
.ao-tag { padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--ink-inv); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.ao-line { margin: 3px 0 0; color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.35; }
.ao-how { position: relative; flex: none; }
.ao-how summary { list-style: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 900; font-size: 13px; cursor: pointer; }
.ao-how summary::-webkit-details-marker { display: none; }
.ao-how[open] summary { background: var(--ink); color: var(--ink-inv); }
.ao-how-box { position: absolute; right: 0; top: 32px; z-index: 30; width: min(290px, 80vw); padding: 12px 14px; border-radius: 14px; background: var(--hero); color: var(--ink-inv); font-size: 13px; line-height: 1.45; box-shadow: var(--shadow-lg); animation: aoHowIn .22s cubic-bezier(.2,1.3,.4,1); }
.ao-how-box ol { margin: 6px 0 0; padding-left: 18px; }
.ao-how-box li + li { margin-top: 4px; }
[data-addon-game].ao-flash { animation: aoFlash 1.1s ease-out; }
@keyframes aoIcoIn { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
@keyframes aoHowIn { from { transform: translateY(-6px) scale(.96); opacity: 0; } }
@keyframes aoFlash { 0%, 40% { box-shadow: 0 0 0 3px var(--coin), var(--shadow); } 100% { box-shadow: 0 0 0 0 transparent, var(--shadow); } }

.ao-strip { position: relative; margin: 10px 0 0; z-index: 40; }
.ao-drop { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; text-align: left; cursor: pointer; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; animation: aoChipIn .4s cubic-bezier(.3,1.5,.5,1) both; }
.ao-drop:active { transform: scale(.98); }
.ao-strip.open .ao-drop { border-color: var(--coin); }
.ao-drop-icons { flex: none; display: flex; }
.ao-drop-icons span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #FFF4D6, #FFE08A); border: 2px solid var(--surface); font-size: 13px; }
.ao-drop-icons span + span { margin-left: -10px; }
.ao-drop-label { flex: 1; min-width: 0; }
.ao-drop-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-right: 2px; border-radius: 999px; background: var(--ink); color: var(--ink-inv); font-size: 12px; font-weight: 900; }
.ao-drop-count.bump { animation: aoBump .6s cubic-bezier(.3,1.8,.5,1); }
.ao-drop-chev { flex: none; width: 8px; height: 8px; margin: -3px 2px 0; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .25s cubic-bezier(.3,1.5,.5,1), margin .25s; }
.ao-strip.open .ao-drop-chev { transform: rotate(225deg); margin-top: 4px; }
.ao-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: min(56vh, 380px); margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; list-style: none; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); transform-origin: top center; animation: aoMenuIn .24s cubic-bezier(.2,1.3,.4,1); }
.ao-menu[hidden] { display: none; }
.ao-menu li { display: flex; align-items: center; gap: 8px; animation: aoOptIn .3s cubic-bezier(.2,1.2,.4,1) both; animation-delay: calc(var(--i, 0) * 25ms); }
.ao-menu.ao-quiet, .ao-menu.ao-quiet li { animation: none; }
.ao-opt { flex: 1; min-width: 0; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 800; text-align: left; cursor: pointer; transition: background .12s, transform .12s, opacity .2s; }
.ao-opt:hover, .ao-opt:focus-visible { background: var(--surface-2); outline: none; transform: translateX(2px); }
.ao-opt:active { transform: scale(.98); }
.ao-menu li.off .ao-opt { opacity: .5; }
.ao-opt-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg, #FFF4D6, #FFE08A); font-size: 15px; }
.ao-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.ao-opt-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ao-opt-sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 11px; font-weight: 700; }
.ao-opt-sub:empty { display: none; }
.ao-sw { width: 42px; height: 26px; margin-right: 6px; cursor: pointer; }
.ao-sw::after { top: 3px; left: 3px; width: 20px; height: 20px; }
.ao-sw[aria-checked="true"]::after { transform: translateX(16px); }
.ao-sw:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ao-foot { padding: 4px 8px 2px; }
.ao-foot:has(> [hidden]) { display: none; }
.ao-showall { width: 100%; min-height: 40px; border: 1px dashed var(--line); border-radius: 12px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.ao-showall[hidden] { display: none; }
.ao-user-off { display: none !important; }
#main-game.ao-waiting::before { content: ''; order: -1; height: 120px; border-radius: 16px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: aoWait 1.2s linear infinite; }
@keyframes aoWait { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { #main-game.ao-waiting::before { animation: none; } }
.ao-card-out { animation: aoCardOut .22s ease-in both; }
.ao-card-in { animation: aoCardIn .4s cubic-bezier(.2,1.3,.4,1) both; }
.ao-sw.ao-nope { animation: aoNope .4s ease-out; }
@keyframes aoNope { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes aoCardOut { to { transform: scale(.94); opacity: 0; } }
@keyframes aoCardIn { from { transform: translateY(10px) scale(.96); opacity: 0; } }
@keyframes aoChipIn { from { transform: translateY(6px) scale(.9); opacity: 0; } }
@keyframes aoMenuIn { from { transform: translateY(-8px) scale(.97); opacity: 0; } }
@keyframes aoOptIn { from { transform: translateX(-8px); opacity: 0; } }
@keyframes aoBump { 40% { transform: scale(1.45); background: var(--coin); color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .ao-ico, .ao-how-box, .ao-drop, .ao-menu, .ao-menu li, .ao-drop-count.bump, [data-addon-game].ao-flash, .ao-card-in, .ao-card-out, .ao-sw.ao-nope { animation: none; } .ao-drop-chev { transition: none; } }

/* ------------------------------------------------------------------ Play page: Arcade (add-on games) */
.arcade-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.arcade-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; color: var(--ink); text-decoration: none; transition: transform .15s; animation: aoChipIn .45s cubic-bezier(.3,1.5,.5,1) both; }
.arcade-tile:nth-child(2) { animation-delay: .06s; } .arcade-tile:nth-child(3) { animation-delay: .12s; } .arcade-tile:nth-child(n+4) { animation-delay: .18s; }
.arcade-tile:active { transform: scale(.97); }
.arcade-tile .ao-name { font-size: 15px; }
.arcade-tile .ao-tag { font-size: 9px; }
/* An add-on's own page */
.arcade-page { display: flex; flex-direction: column; gap: 12px; }
.arcade-back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 800; font-size: 13px; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .arcade-tile { animation: none; } }

/* Score-only matches (CricketData.org): why the ball games are off */
.score-only-note { display: grid; gap: 4px; margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; line-height: 1.45; }
.score-only-note strong { font-size: .92rem; }
