:root {
  --bg: #070B16;
  --bg-2: #0B1220;
  --surface: #121A2B;
  --surface-2: #1A2438;
  --line: #24304A;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --gold: #F2B92E;
  --gold-hi: #FFE48A;
  --gold-lo: #A06608;
  --amber: #FFB020;
  --green: #22C55E;
  --sky: #38BDF8;
  --coral: #F97362;
  --red: #EF4444;
  --radius: 14px;
  --display: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; background: radial-gradient(120% 60% at 50% -10%, #16233F 0%, var(--bg) 60%) fixed; }
button { font: inherit; color: inherit; }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- header ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brandlogo { width: 38px; height: 38px; flex: none; }
.wordmark { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: .5px; }
.wordmark span { color: var(--gold); }
.linkbtn { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 10px 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.linkbtn:hover { color: var(--text); }

/* ---------- home ---------- */
.hero { text-align: center; padding: 18px 0 8px; }
.herologo { width: 150px; height: 150px; filter: drop-shadow(0 14px 30px rgba(0,0,0,.55)); }
.hero h1 { font-family: var(--display); font-weight: 900; font-size: 46px; line-height: 1; margin: 20px 0 8px; letter-spacing: .3px; }
.hero h1 em { font-style: normal; white-space: nowrap; background: linear-gradient(180deg, #FFF6CF 0%, #F6C531 45%, #C88A0A 55%, #F2B92E 75%, #8A5600 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; color: var(--muted); font-size: 16px; }
.modes { display: grid; gap: 12px; margin: 26px 0 8px; }
.mode { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; }
.mode h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: .3px; }
.mode p { margin: 0; color: var(--muted); font-size: 14px; grid-column: 1; }
.mode .btn { grid-row: 1 / span 2; grid-column: 2; }
.mode.daily { border-color: rgba(242,185,46,.35); background: linear-gradient(180deg, rgba(242,185,46,.08), rgba(242,185,46,0) 70%), var(--surface); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-left: 6px; vertical-align: middle; }
.btn { appearance: none; border: 0; border-radius: 12px; min-height: 48px; padding: 0 20px; font-weight: 700; font-size: 16px; cursor: pointer; background: var(--surface-2); color: var(--text); }
.btn.primary { background: linear-gradient(180deg, #FFD45C, #F2A900); color: #1A1200; box-shadow: 0 6px 18px rgba(242,169,0,.25); }
.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .45; cursor: default; }
.steps { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; color: var(--muted); font-size: 14px; line-height: 1.45; }
.steps b { color: var(--text); font-weight: 600; }
.steps .n { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--gold); }
footer { color: var(--muted); font-size: 12px; line-height: 1.6; padding: 28px 0 40px; border-top: 1px solid var(--line); margin-top: 26px; }
footer nav { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
footer nav .linkbtn { font-size: 13px; padding: 6px 0; min-height: 0; }

/* ---------- spin reveal ---------- */
.reveal { position: fixed; inset: 0; background: rgba(4,7,15,.92); display: grid; place-items: center; z-index: 50; }
.reveal .box { text-align: center; }
.chips { display: flex; gap: 12px; justify-content: center; }
.chip { min-width: 132px; padding: 10px 16px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg-2); }
.chip small { display: block; font-size: 11px; letter-spacing: 2px; color: var(--muted); font-weight: 700; }
.chip strong { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: .5px; }
.chip.team { border-color: var(--gold); }
.chip.era { border-color: var(--sky); }
.reveal .tag { margin-top: 14px; font-size: 12px; letter-spacing: 3px; font-weight: 700; color: var(--gold); }
.reveal.spinning strong { animation: flick .09s steps(1) infinite; }
@keyframes flick { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .reveal.spinning strong { animation: none; } }

/* ---------- draft ---------- */
.draft-head { position: sticky; top: 0; z-index: 10; background: rgba(7,11,22,.96); backdrop-filter: blur(6px); padding: 10px 0 8px; border-bottom: 1px solid var(--line); }
.progress-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.progress-row b { color: var(--text); }
.clock { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--text); }
.clock.low { color: var(--red); }
.bar { height: 4px; border-radius: 4px; background: var(--surface-2); margin: 6px 0 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); transition: width .3s; }
.spin-row { display: flex; align-items: center; gap: 8px; }
.spin-row .chip { min-width: 0; padding: 4px 12px 6px; border-radius: 10px; }
.spin-row .chip small { font-size: 9px; letter-spacing: 1.5px; }
.spin-row .chip strong { font-size: 20px; }
.spin-row .grow { flex: 1; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.classic { font-size: 11px; color: var(--gold); letter-spacing: 1px; font-weight: 700; margin-top: 6px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.tabs button { flex: none; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--gold); color: #1A1200; border-color: var(--gold); }
.list { padding: 6px 0 190px; }
.group-title { font-size: 11px; letter-spacing: 2px; color: var(--muted); font-weight: 700; margin: 14px 2px 6px; text-transform: uppercase; }
.player { width: 100%; text-align: left; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; }
.player:hover { border-color: var(--line); }
.player.open { border-color: var(--gold); background: var(--surface-2); }
.player.blocked { opacity: .45; }
.badge { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; line-height: 1; font-family: var(--display); font-weight: 800; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.badge b { font-size: 17px; }
.pname { font-weight: 600; font-size: 15px; }
.pmeta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.os { color: var(--sky); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(40px, auto)); text-align: right; gap: 6px; }
.stats div { font-family: var(--display); font-weight: 700; font-size: 18px; }
.stats small { display: block; font-family: var(--body); font-weight: 600; font-size: 9px; color: var(--muted); letter-spacing: .5px; }
.why { grid-column: 2 / span 2; font-size: 12px; color: var(--muted); }
.detail { background: var(--surface-2); border: 1px solid var(--gold); border-top: 0; border-radius: 0 0 12px 12px; margin: -10px 0 8px; padding: 14px 12px 12px; }
.detail dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 12px; }
.detail dt { font-size: 10px; color: var(--muted); letter-spacing: .5px; font-weight: 600; }
.detail dd { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 700; }
.pick-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pick-btns .btn { flex: 1; min-width: 130px; }
.notice { background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 12px; color: var(--muted); font-size: 13px; margin-top: 10px; }

/* ---------- slot bar ---------- */
.slotbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(7,11,22,.97); border-top: 1px solid var(--line); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
.slotrow { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.slotrow > span { width: 62px; font-size: 10px; letter-spacing: 1.5px; color: var(--muted); font-weight: 700; }
.slotrow.bat > span { color: var(--sky); }
.slotrow.bowl > span { color: var(--coral); }
.slot { flex: 1; height: 40px; border-radius: 9px; border: 1px dashed var(--line); display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .5px; text-align: center; line-height: 1.05; overflow: hidden; }
.slot.filled { border-style: solid; color: #fff; font-family: var(--display); font-weight: 900; font-size: 17px; letter-spacing: .3px; }
.slot.filled small { display: block; font-family: var(--display); font-weight: 800; font-size: 10px; letter-spacing: 1px; opacity: 1; margin-top: 1px; }
.slot.can { border-color: var(--gold); color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }

/* ---------- result ---------- */
.result { padding: 10px 0 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.card-top { padding: 18px 18px 14px; display: grid; grid-template-columns: 1fr; gap: 6px; background: linear-gradient(180deg, rgba(242,185,46,.10), rgba(242,185,46,0)); }
.kicker { font-size: 12px; letter-spacing: 4px; font-weight: 700; color: var(--muted); }
.record { font-family: var(--display); font-weight: 900; font-size: clamp(64px, 20vw, 88px); line-height: .9; display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.grade { font-size: 30px; padding: 4px 10px 6px; border-radius: 12px; border: 2px solid var(--green); color: var(--green); background: rgba(34,197,94,.08); }
.grade.mid { border-color: var(--amber); color: var(--amber); background: rgba(255,176,32,.08); }
.grade.low { border-color: var(--red); color: var(--red); background: rgba(239,68,68,.08); }
.label { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: 3px; color: var(--green); text-transform: uppercase; }
.label.mid { color: var(--amber); }
.label.low { color: var(--red); }
.units { display: flex; gap: 8px; margin-top: 6px; }
.unit { flex: 1; border-radius: 10px; padding: 6px 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-family: var(--display); font-weight: 800; }
.unit small { font-size: 12px; letter-spacing: 2px; }
.unit b { font-size: 26px; }
.unit.bat { border: 1px solid rgba(56,189,248,.45); color: var(--sky); }
.unit.bowl { border: 1px solid rgba(249,115,98,.45); color: var(--coral); }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.pts { background: var(--bg-2); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; }
.modebadge { background: var(--surface-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.timeup { color: var(--red); font-size: 13px; font-weight: 600; }
.xi-title { font-size: 12px; letter-spacing: 4px; font-weight: 800; padding: 10px 18px; background: var(--bg-2); border-top: 1px solid var(--line); }
.xi-title.bat { color: var(--sky); }
.xi-title.bowl { color: var(--coral); }
.xi-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 18px; border-top: 1px solid rgba(36,48,74,.6); }
.xi-row.held { background: rgba(239,68,68,.08); }
.heldtag { display: inline-block; white-space: nowrap; margin-left: 6px; font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--red); background: rgba(239,68,68,.12); border-radius: 6px; padding: 2px 6px; vertical-align: middle; }
.squares { letter-spacing: 2px; font-size: 18px; text-align: center; margin: 16px 0 4px; }
.actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 16px; }
.actions .primary { grid-column: 1 / span 3; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 60; }

/* ---------- pages ---------- */
.page { padding: 8px 0 30px; line-height: 1.6; color: #CBD5E1; }
.page h1 { font-family: var(--display); font-size: 38px; color: var(--text); margin: 8px 0 12px; }
.page h2 { font-family: var(--display); font-size: 24px; color: var(--text); margin: 22px 0 6px; }
.page table { width: 100%; border-collapse: collapse; font-size: 14px; }
.page td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.page td:first-child { font-weight: 700; color: var(--text); white-space: nowrap; }
.loading { text-align: center; color: var(--muted); padding: 80px 0; }

@media (max-width: 380px) {
  .hero h1 { font-size: 40px; }
  .record { font-size: 70px; }
  .stats { grid-template-columns: repeat(3, 40px); }
  .stats div { font-size: 16px; }
  .slotrow > span { width: 52px; }
}

/* ---------- spin screen ---------- */
.spinstage { text-align: center; padding: 48px 0 220px; display: grid; justify-items: center; gap: 22px; }
.chips.big .chip { min-width: 148px; padding: 14px 18px 16px; }
.chips.big strong { font-size: 44px; color: var(--muted); }
.spinbtn { width: 100%; max-width: 320px; min-height: 60px; font-family: var(--display); font-weight: 900; font-size: 26px; letter-spacing: 6px; }
/* ---------- quit dialog ---------- */
.dialog { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; max-width: 340px; margin: 0 16px; }
.dialog h2 { margin: 0 0 8px; font-family: var(--display); font-size: 28px; }
.dialog p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.dialog-btns { display: flex; gap: 10px; margin-top: 18px; }
.dialog-btns .btn { flex: 1; }
/* ---------- role labels ---------- */
.rp { font-weight: 700; }
.rp.bat { color: #38BDF8; }
.rp.wk { color: #A78BFA; }
.rp.ar { color: #F2B92E; }
.rp.pace { color: #F97362; }
.rp.spin { color: #34D399; }

/* ---------- slot-machine reels ---------- */
.reels { position: relative; display: flex; gap: 12px; justify-content: center; width: 100%; max-width: 440px; padding: 14px 14px 16px; border-radius: 24px;
  background: linear-gradient(180deg, #121C31 0%, #0A1020 100%); border: 1px solid #263452;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 -10px 24px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.45); overflow: hidden; }
.reel { flex: 1; min-width: 0; }
.reel small { display: block; font-size: 11px; letter-spacing: 3px; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
.reel .window { position: relative; height: 192px; overflow: hidden; border-radius: 16px; background: radial-gradient(120% 70% at 50% 50%, #0F1A30 0%, #050912 100%);
  box-shadow: inset 0 6px 14px rgba(0,0,0,.65), inset 0 -6px 14px rgba(0,0,0,.65), 0 0 0 1px #1E2A44;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 70%, transparent 100%);
  transition: box-shadow .35s ease; }
.payline { position: absolute; left: 4px; right: 4px; top: 64px; height: 64px; border-radius: 14px; pointer-events: none;
  border: 1.5px solid rgba(255,255,255,.16); box-shadow: inset 0 0 18px rgba(255,255,255,.04); transition: border-color .3s ease, box-shadow .3s ease; }
.reel.locked .payline { border-color: var(--glow); box-shadow: 0 0 0 1px var(--glow), 0 0 22px var(--glow), inset 0 0 14px rgba(255,255,255,.08); }
.strip { will-change: transform; transform: translate3d(0,0,0); backface-visibility: hidden; }
.item { height: 64px; display: grid; place-items: center; }
.qt { font-family: var(--display); font-weight: 900; font-size: 44px; color: #3B4A68; }
.tm { position: relative; overflow: hidden; display: grid; place-items: center; width: calc(100% - 14px); height: 52px; border-radius: 12px; color: var(--tx);
  background:
    linear-gradient(180deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.16) 18%, rgba(255,255,255,0) 34%),
    linear-gradient(180deg, var(--tc-hi) 0%, var(--tc) 55%, var(--tc-lo) 100%);
  border: 2.5px solid var(--tc-edge);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.45), 0 3px 8px rgba(0,0,0,.4); }
.tm::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(105deg, transparent, rgba(255,255,255,.4), transparent); }
.reel.locked .tm::after { animation: sheen .7s ease-out .05s 1 both; }
@keyframes sheen { from { left: -50%; } to { left: 120%; } }
.tm b { position: relative; font-family: var(--display); font-weight: 900; font-size: 24px; letter-spacing: .6px; white-space: nowrap; }
.tm.long b { font-size: 19px; }
.er { display: grid; place-items: center; width: calc(100% - 14px); height: 52px; border-radius: 12px; line-height: 1;
  background: linear-gradient(180deg, #1E3A63 0%, #0C1830 60%); border: 2.5px solid rgba(56,189,248,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 8px rgba(0,0,0,.4); }
.er b { font-family: var(--display); font-weight: 900; font-size: 26px; color: #CFEFFF; letter-spacing: .5px; }
.er small { font-size: 8.5px; letter-spacing: 2px; font-weight: 800; color: #6FA8C8; margin-top: 3px; }
.flash { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255,214,102,.30) 50%, transparent 70%); transform: translateX(-120%); }
.reels.done .flash { animation: flash .75s ease-out 1 both; }
@keyframes flash { to { transform: translateX(120%); } }
.reels.done { border-color: rgba(242,185,46,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px rgba(242,185,46,.25), 0 18px 44px rgba(242,185,46,.12); transition: box-shadow .4s ease, border-color .4s ease; }
.spinbtn:disabled { opacity: .8; }
.spin-tag { min-height: 22px; font-size: 13px; letter-spacing: 3px; font-weight: 800; color: var(--gold); text-transform: uppercase; }

/* ---------- squad screen team / era boxes ---------- */
.teambox, .erabox { width: auto; height: auto; min-width: 0; padding: 6px 12px 9px; border-radius: 13px; display: grid; justify-items: start; place-items: initial; line-height: 1; }
.teambox small, .erabox small { position: relative; font-size: 9px; letter-spacing: 1.8px; font-weight: 800; margin: 0 0 3px; opacity: .78; }
.teambox b { font-size: 22px; }
.erabox b { font-size: 22px; }
.erabox small { color: #6FA8C8; opacity: 1; }
/* One continuous beam: it sweeps through the team box, then carries on through the era box. */
.teambox.shine::after { animation: sheen var(--sh-dur, .5s) linear var(--sh-delay, .2s) 1 both; }
.erabox { position: relative; overflow: hidden; }
.erabox::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.4), transparent); }
.erabox.shine::after { animation: sheen var(--sh-dur, .5s) linear var(--sh-delay, .7s) 1 both; }
/* glossy player badges and filled slots */
.badge, .slot.filled { color: var(--tx); border: 2.5px solid var(--tc-edge);
  background: linear-gradient(180deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.16) 18%, rgba(255,255,255,0) 34%), linear-gradient(180deg, var(--tc-hi) 0%, var(--tc) 55%, var(--tc-lo) 100%);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.45), 0 2px 5px rgba(0,0,0,.35); }

/* lettering contrast on team-colour tiles: dark edge for white letters, light edge for dark letters */
.tm b {
  -webkit-text-stroke: .6px rgba(var(--tsh), .4);
  text-shadow: 0 0 1px rgba(var(--tsh), .8), 0 1px 0 rgba(var(--tsh), .55), 0 2px 5px rgba(var(--tsh), .45); }
/* Small lettering: a crisp 1px outline only. Strokes and blurs smear text this size. */
.badge b, .slot.filled, .slot.filled small {
  -webkit-text-stroke: 0;
  text-shadow: 1px 0 0 rgba(var(--tsh),.85), -1px 0 0 rgba(var(--tsh),.85), 0 1px 0 rgba(var(--tsh),.85), 0 -1px 0 rgba(var(--tsh),.85); }
.badge b { font-size: 18px; letter-spacing: .3px; }
.slot { height: 44px; }

.teambox b, .erabox b { white-space: nowrap; }
.teambox { min-width: 0; flex: 0 1 auto; }
.teambox.long b { font-size: 15px; letter-spacing: .2px; }
.erabox { flex: none; }
.spin-row .btn.small { white-space: nowrap; flex: none; }
.reroll { padding: 0 12px; font-size: 16px; gap: 4px; }
.reroll span { font-size: 18px; }
.teambox { flex: 1 1 auto; }
.teambox b { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ---------- squad-screen boxes: polish ---------- */
.teambox, .erabox { justify-items: center; text-align: center; padding: 6px 14px 8px; }
.teambox b, .erabox b { line-height: 1.18; padding-bottom: 1px; }
/* Small labels: crisp edge, no stroke or blur (those smear tiny text). */
.teambox small, .erabox small { font-size: 10.5px; letter-spacing: 2px; opacity: 1; margin-bottom: 1px;
  -webkit-text-stroke: 0; text-shadow: 0 1px 0 rgba(var(--tsh), .7), 0 0 1px rgba(var(--tsh), .6); }
.teambox small { color: var(--tx); }
/* Era: same glossy treatment in its own blue, darker fade with light on top. */
.er, .erabox {
  background:
    linear-gradient(180deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.1) 18%, rgba(255,255,255,0) 34%),
    linear-gradient(180deg, #2C5E96 0%, #17345E 55%, #0A1830 100%);
  border: 2.5px solid #5FBDEB;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.45), 0 3px 8px rgba(0,0,0,.4); --tsh: 0,0,0; }
.er b, .erabox b { color: #E6F6FF; -webkit-text-stroke: .6px rgba(0,0,0,.4);
  text-shadow: 0 0 1px rgba(0,0,0,.8), 0 1px 0 rgba(0,0,0,.55), 0 2px 5px rgba(0,0,0,.45); }
.er small, .erabox small { color: #A9DCF5; }

/* ================= gold, everywhere (matches the logo) ================= */
:root {
  --gold-metal: linear-gradient(180deg, #FFF8DA 0%, #FFE27A 16%, #F4BE33 42%, #C98C0C 50%, #F7CE4C 62%, #D9A21C 82%, #9A6206 100%);
  --gold-ring: linear-gradient(115deg, #7A4A00 0%, #F6C531 18%, #FFF6CC 28%, #E2A41A 40%, #8A5600 58%, #F6C531 76%, #FFF3B0 86%, #9A6206 100%);
}
.btn.primary { position: relative; overflow: hidden; background: var(--gold-metal); color: #2A1A00; border: 1px solid #7A4A00;
  text-shadow: 0 1px 0 rgba(255,244,200,.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 -2px 0 rgba(90,55,0,.45), 0 6px 18px rgba(242,169,0,.22);
  transition: filter .2s ease, box-shadow .2s ease, transform .1s ease; }
.btn.primary::after { content: ""; position: absolute; top: -30%; bottom: -30%; left: -70%; width: 42%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.8), rgba(255,255,255,0)); }
@media (hover: hover) {
  .btn.primary:hover { filter: brightness(1.08) saturate(1.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -2px 0 rgba(90,55,0,.45), 0 0 0 1px rgba(255,214,102,.5), 0 0 24px rgba(255,200,60,.45); }
  .btn.primary:hover::after { animation: btnshine .75s ease-out 1 both; }
}
.btn.primary:active { transform: translateY(1px); filter: brightness(.97); }
.btn.primary:active::after { animation: btnshine .6s ease-out 1 both; }
.btn.primary:disabled { filter: grayscale(.4) brightness(.8); }
@keyframes btnshine { from { left: -70%; } to { left: 130%; } }
/* The Spin button invites a tap with an occasional glint. */
.spinbtn:not(:disabled)::after { animation: idleshine 3.4s ease-in-out .8s infinite; }
@keyframes idleshine { 0%, 62% { left: -70%; } 100% { left: 130%; } }

.tabs button[aria-pressed="true"] { background: var(--gold-metal); color: #2A1A00; border-color: #7A4A00; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }

/* Selected player: a gold outline with a slow glint running round it. */
.player { border-width: 2px; }
.player.open, .detail { border: 2px solid transparent;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--gold-ring) border-box;
  background-size: 100% 100%, 300% 300%; animation: glint 3.2s linear infinite; }
.detail { border-top: 0; }
@keyframes glint { from { background-position: 0 0, 0% 50%; } to { background-position: 0 0, 100% 50%; } }

.slot.can { border: 1.5px dashed #F6C531; color: #FFE27A; box-shadow: inset 0 0 0 1px rgba(242,185,46,.45), 0 0 12px rgba(242,185,46,.28); }
.slot { position: relative; }
.slot.incoming { border-style: solid; border-color: #FFE27A; box-shadow: 0 0 0 2px rgba(255,214,102,.5), 0 0 18px rgba(255,200,60,.5); }
.slot.landed { animation: slotflash .95s ease-out 1 both; overflow: hidden; }
.slot.landed::after { content: ""; position: absolute; top: -30%; bottom: -30%; left: -70%; width: 50%; transform: skewX(-20deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,246,204,.9), rgba(255,255,255,0)); animation: btnshine .8s ease-out .1s 1 both; }
@keyframes slotflash {
  0% { box-shadow: 0 0 0 0 rgba(255,214,102,.95), 0 0 22px rgba(255,200,60,.8); }
  100% { box-shadow: 0 0 0 12px rgba(255,214,102,0), 0 0 0 rgba(255,200,60,0); }
}
.ghost { pointer-events: none; box-shadow: 0 0 0 2px #FFE27A, 0 0 22px rgba(255,200,60,.7), 0 10px 24px rgba(0,0,0,.5) !important; }

/* TEAM / ERA labels: crisp solid outline so they read clearly. */
.teambox small, .erabox small { font-weight: 900;
  text-shadow: 1px 0 0 rgba(var(--tsh),.9), -1px 0 0 rgba(var(--tsh),.9), 0 1px 0 rgba(var(--tsh),.9), 0 -1px 0 rgba(var(--tsh),.9), 0 1px 3px rgba(var(--tsh),.5); }

/* Gold buttons at rest: dark bronze edge plus a thin bright rim, so they stand out before any hover. */
.btn.primary { border: 2px solid #5A3600;
  box-shadow: inset 0 0 0 1px rgba(255,240,180,.75), inset 0 2px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(90,55,0,.45), 0 0 0 1px rgba(255,214,102,.5), 0 6px 18px rgba(242,169,0,.22); }
@media (hover: hover) {
  .btn.primary:hover { box-shadow: inset 0 0 0 1px rgba(255,246,204,.9), inset 0 2px 0 rgba(255,255,255,.7), inset 0 -2px 0 rgba(90,55,0,.45), 0 0 0 1px rgba(255,226,122,.75), 0 0 24px rgba(255,200,60,.45); }
}

/* Selected player: one gold outline round the row and its details, with a glint orbiting slowly and seamlessly. */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.pwrap { position: relative; margin-bottom: 8px; padding: 2px; border-radius: 14px;
  background: conic-gradient(from var(--ang), #6B4100 0deg, #9A6206 40deg, #E8B425 80deg, #FFF6CC 100deg, #E8B425 120deg, #9A6206 160deg, #6B4100 210deg, #7A4A00 360deg);
  box-shadow: 0 0 18px rgba(242,185,46,.18); animation: orbit 5s linear infinite; }
@keyframes orbit { to { --ang: 360deg; } }
.pwrap > .player.open { margin: 0; border: 0; border-radius: 12px 12px 0 0; background: var(--surface-2); animation: none; }
.pwrap > .detail { margin: 0; border: 0; border-radius: 0 0 12px 12px; background: var(--surface-2); animation: none; }

/* Filter tabs: solid outlines like the main buttons. */
.tabs button { border: 1.5px solid #3A4D73; background: linear-gradient(180deg, #1A2740 0%, #0F1828 100%); color: #CBD5E1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px rgba(0,0,0,.4); }
.tabs button[aria-pressed="true"] { background: var(--gold-metal); color: #2A1A00; border: 2px solid #5A3600; text-shadow: 0 1px 0 rgba(255,244,200,.65);
  box-shadow: inset 0 0 0 1px rgba(255,240,180,.75), inset 0 2px 0 rgba(255,255,255,.6), 0 0 0 1px rgba(255,214,102,.5); }
#sort { border: 1.5px solid #3A4D73 !important; background: linear-gradient(180deg, #1A2740 0%, #0F1828 100%) !important; color: #CBD5E1 !important; }

/* Tabs: a little room on the left so outlines aren't clipped, and whole-pixel borders so edges stay crisp. */
.tabs { padding: 10px 4px 4px 4px; gap: 8px; }
.tabs button { border: 2px solid #3A4D73; box-shadow: none; }
.tabs button[aria-pressed="true"] { border: 2px solid #5A3600; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
#sort { border-width: 2px !important; }

/* ---------- five-stat rows: stats panel along the bottom of the card ---------- */
/* The panel spans the card's full inner width: its left edge lines up with the initials badge,
   and it sits the same distance from the card's right edge. */
.player, .xi-row { grid-template-columns: 44px 1fr; row-gap: 10px; }
.player .stats, .xi-row .stats { grid-column: 1 / -1; justify-self: stretch; box-sizing: border-box; width: 100%;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; text-align: center;
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.06); border-radius: 9px; padding: 7px 0 6px; }
.stats div { white-space: nowrap; font-size: 16px; line-height: 1.05; }
.stats div:first-child { color: var(--muted); } /* matches: context, not a headline number */
.stats div + div { border-left: 1px solid rgba(255,255,255,.09); }
.stats small { margin-top: 2px; font-size: 8.5px; }
@media (max-width: 380px) { .stats div { font-size: 15px; } }
/* Stats panel outline: same style as the filter tabs, but dimmer so it doesn't pull the eye. */
.player .stats, .xi-row .stats { border: 1px solid #33456A;
  background: linear-gradient(180deg, rgba(26,39,64,.55) 0%, rgba(8,13,24,.55) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px rgba(0,0,0,.35); }
.stats div + div { border-left-color: rgba(120,145,190,.16); }
/* Stats panel: deeper navy than the card, fading darker toward the bottom. */
.player .stats, .xi-row .stats { background: linear-gradient(180deg, #14254A 0%, #0C1832 50%, #050A16 100%); }
/* A lit slot can be tapped to drop the selected player straight in. */
.slot.can { cursor: pointer; }
@media (hover: hover) { .slot.can:hover { background: rgba(242,185,46,.12); box-shadow: inset 0 0 0 1px rgba(242,185,46,.7), 0 0 16px rgba(242,185,46,.4); } }
/* Filled slots: initials with the season underneath ("’16"). The slot's place in the bar already shows the role. */
.slot { height: 46px; }
.slot.filled { align-content: center; gap: 0; line-height: 1; }
.slot.filled small.yr { margin-top: 2px; font-size: 10px; letter-spacing: .6px; white-space: nowrap; }
.list { padding-bottom: 200px; }
@media (max-width: 380px) { .slotrow > span { width: 50px; font-size: 9px; letter-spacing: .8px; } }

/* ---------- role sections: one colour per role, used in the list and the slot bar ---------- */
:root { --c-bat: #38BDF8; --c-wk: #A78BFA; --c-ar: #F2B92E; --c-pace: #F97362; --c-spin: #34D399; }
.g-bat { --rc: var(--c-bat); } .g-wk { --rc: var(--c-wk); } .g-ar { --rc: var(--c-ar); } .g-pace { --rc: var(--c-pace); } .g-spin { --rc: var(--c-spin); }
.group { margin-top: 16px; }
/* Section header: a bar in the role colour that sticks below the team/era header while you scroll that section. */
.group-title { position: sticky; top: var(--head-h, 150px); z-index: 5; display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 8px; padding: 8px 12px 8px 14px; border-radius: 10px; color: var(--rc);
  font-size: 12.5px; letter-spacing: 2.5px; font-weight: 900; text-transform: uppercase;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 24%, #0B1220) 0%, color-mix(in srgb, var(--rc) 8%, #0B1220) 70%, #0B1220 100%);
  border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); border-left: 4px solid var(--rc);
  box-shadow: 0 6px 14px rgba(4,7,15,.75); }
.group-title b { font-family: var(--display); font-size: 15px; letter-spacing: .5px; color: #0B1220; background: var(--rc);
  border-radius: 999px; min-width: 26px; padding: 1px 8px; text-align: center; }
/* A thin stripe in the role colour down the left edge of each card (drawn inside, so nothing moves). */
.group .player { box-shadow: inset 3px 0 0 var(--rc); }
.group .pwrap > .player.open { box-shadow: inset 3px 0 0 var(--rc); }
/* Slot bar: empty slots keep their boxes; the labels take the role colours. Lit slots stay gold. */
.slot:not(.filled):not(.can)[data-slot="BAT"] { color: var(--c-bat); }
.slot:not(.filled):not(.can)[data-slot="WK"] { color: var(--c-wk); }
.slot:not(.filled):not(.can)[data-slot="AR"] { color: var(--c-ar); }
.slot:not(.filled):not(.can)[data-slot="PACE"] { color: var(--c-pace); }
.slot:not(.filled):not(.can)[data-slot="SPIN"] { color: var(--c-spin); }
/* Slot bar row labels: plain neutral grey, so the only colour in the bar is on the slots. */
.slotrow > span, .slotrow.bat > span, .slotrow.bowl > span { color: #7C8AA3; }

/* ================= buttons: press + quick glimmer on tap (phones) and click ================= */
.btn { position: relative; overflow: hidden; transition: filter .15s ease, transform .1s ease; }
/* Plain (dark) buttons get a cool silver glimmer; gold buttons keep their gold one. */
.btn:not(.primary):not(.danger)::after { content: ""; position: absolute; top: -30%; bottom: -30%; left: -70%; width: 42%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, rgba(220,235,255,0), rgba(220,235,255,.45), rgba(220,235,255,0)); }
@media (hover: hover) {
  .btn:not(.primary):not(.danger):not(:disabled):hover { filter: brightness(1.15); }
  .btn:not(.primary):not(.danger):not(:disabled):hover::after { animation: btnshine .6s ease-out 1 both; }
}
.btn.tap { animation: tappress .17s ease-out 1; }
.btn.tap::after { animation: btnshine .3s ease-out 1 both !important; }
@keyframes tappress { 0% { transform: scale(1); } 40% { transform: scale(.95); filter: brightness(1.12); } 100% { transform: scale(1); } }
.tabs button:active { transform: scale(.95); }

/* Red button (Quit / Give up): same shiny build as the gold ones, no glimmer. */
.btn.danger { color: #fff; border: 2px solid #4A0B0B; text-shadow: 0 1px 0 rgba(60,0,0,.6);
  background: linear-gradient(180deg, #FFB4A8 0%, #F0564A 16%, #D8261C 44%, #A9150F 52%, #D93A2F 64%, #B71D15 84%, #7A0C08 100%);
  box-shadow: inset 0 0 0 1px rgba(255,190,180,.55), inset 0 2px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(70,0,0,.45), 0 0 0 1px rgba(255,120,110,.35), 0 6px 18px rgba(220,40,30,.22); }
.btn.danger::after { content: none; }
@media (hover: hover) { .btn.danger:hover { filter: brightness(1.08) saturate(1.1); } }
.btn.danger:active { transform: translateY(1px); filter: brightness(.95); }

/* ================= home mode cards ================= */
.mode[data-act] { cursor: pointer; position: relative; transition: transform .12s ease, filter .15s ease; }
.mode.tap { animation: cardpress .17s ease-out 1; }
@keyframes cardpress { 40% { transform: scale(.985); } }
/* Daily: the gold outline with a glint circling it, like a selected player. */
.mode.daily { border: 2px solid transparent;
  background:
    linear-gradient(180deg, rgba(242,185,46,.10), rgba(242,185,46,0) 70%) padding-box,
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--ang), #6B4100 0deg, #9A6206 40deg, #E8B425 80deg, #FFF6CC 100deg, #E8B425 120deg, #9A6206 160deg, #6B4100 210deg, #7A4A00 360deg) border-box;
  box-shadow: 0 0 22px rgba(242,185,46,.16); animation: orbit 5s linear infinite; }
@media (hover: hover) { .mode.daily[data-act]:hover { filter: brightness(1.08); box-shadow: 0 0 28px rgba(242,185,46,.3); } }
/* Quick draft: a cool silver-blue outline, second to the Daily, with a light shine every few seconds. */
.mode.quick { overflow: hidden; border: 2px solid #4A6290;
  background: linear-gradient(180deg, rgba(120,160,230,.08), rgba(120,160,230,0) 70%), var(--surface);
  box-shadow: inset 0 1px 0 rgba(200,220,255,.12), 0 0 0 1px rgba(0,0,0,.4); }
.mode.quick::after { content: ""; position: absolute; top: -40%; bottom: -40%; left: -40%; width: 22%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, rgba(210,228,255,0), rgba(210,228,255,.16), rgba(210,228,255,0)); animation: cardsheen 4.5s ease-in-out 1.2s infinite; }
@keyframes cardsheen { 0%, 70% { left: -40%; } 100% { left: 130%; } }
@media (hover: hover) { .mode.quick:hover { filter: brightness(1.1); border-color: #7C98CC; } }
.mode.quick.tap { border-color: #9DB6E2; }
/* Coming soon: same card, dimmer, not clickable. */
.mode.soon { opacity: .62; border-style: dashed; grid-template-columns: 1fr; }
.mode.soon h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.soon-tag { font-family: var(--body); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--gold); border: 1px solid rgba(242,185,46,.55); border-radius: 999px; padding: 3px 8px; }
.dialog-btns .btn { padding: 0 12px; white-space: nowrap; font-size: 15px; }
/* Quit box: wider, everything centred, buttons sized so their labels always fit. */
.dialog { width: calc(100% - 32px); max-width: 420px; margin: 0 auto; padding: 28px 22px 22px; text-align: center; }
.dialog h2 { font-size: 30px; line-height: 1.1; margin-bottom: 10px; }
.dialog p { font-size: 15px; max-width: 34ch; margin: 0 auto; }
.dialog-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.dialog-btns .btn { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 0 10px; font-size: 16px; white-space: nowrap; overflow: visible; }
.dialog-btns .btn.primary { overflow: hidden; } /* keeps the glimmer inside the button */
@media (max-width: 360px) { .dialog-btns { grid-template-columns: 1fr; } }
.testreset { text-align: center; margin: 4px 0 0; }
.testreset .linkbtn { font-size: 13px; }
/* Opened player details: centred under the stats panel, same width as the panel. */
.pwrap > .detail { padding: 6px 12px 14px; }
.detail dl { grid-template-columns: repeat(4, 1fr); gap: 12px 6px; text-align: center; margin: 4px 0 14px; }
.detail dl > div { display: grid; justify-items: center; gap: 2px; }
.pick-btns { justify-content: center; }
/* Roles you've already filled sit at the bottom, dimmed, with a FILLED tag on the header. */
.group.full .group-title { filter: saturate(.35) brightness(.8); }
.fulltag { font-style: normal; margin-left: 10px; font-size: 9.5px; letter-spacing: 1.5px; padding: 2px 7px; border-radius: 999px; border: 1px solid currentColor; vertical-align: 1px; }

/* Header wordmark and the hero "14-0?": the same polished gold as the gold buttons (View / Play Daily). */
.wordmark span, .hero h1 em {
  background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(90,55,0,.9)) drop-shadow(0 0 1px rgba(60,35,0,.8)); }
.wordmark { font-size: 24px; letter-spacing: .6px; }
/* 14-0 lettering: the button's exact gold, fitted to the height of the numbers themselves
   (the line box is taller than the digits, so the button's stops are remapped onto the digit area). */
:root { --gold-text: linear-gradient(180deg, #FFF8DA 0%, #FFF8DA 13%, #FFE27A 24.8%, #F4BE33 44.1%, #C98C0C 50%, #F7CE4C 58.9%, #D9A21C 73.7%, #9A6206 87%, #9A6206 100%); }
.wordmark span, .hero h1 em { display: inline-block; line-height: 1; background: var(--gold-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== 14-0 in real gold: built like the gold buttons, in three layers =====
   behind: dark bronze outline + soft gold glow (the button's bronze border and glow)
   middle: the button's gold gradient fitted to the numbers
   front edge: a thin bright rim just inside the outline (the button's inner rim)
   "CRICKET" and "Can you go" stay white. */
.wordmark span.gold14, .hero h1 em.gold14 { position: relative; display: inline-block; line-height: 1; z-index: 0;
  color: transparent; background: none; -webkit-background-clip: border-box; background-clip: border-box; filter: none; }
.gold14::before, .gold14::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
.gold14::before { z-index: -1; color: #4A2C00; -webkit-text-stroke: .12em #4A2C00;
  text-shadow: 0 0 .32em rgba(242,185,46,.42), 0 .05em .12em rgba(0,0,0,.55); }
.gold14::after { z-index: 1; color: transparent; background: var(--gold-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: .022em rgba(255,240,185,.85); }
.wordmark .gold14::before { -webkit-text-stroke-width: .13em; }

/* ===== 14-0 gold, v3: the button's full edge, ring by ring (outside -> in) =====
   dark bronze outline -> bright gold rim -> copper band -> gold fill (toned down a touch).
   Four stacked copies of the text; each stroke is narrower than the one behind it, and the gold fill sits on top
   with no stroke, so every ring shows as a clean band outside the one before it. */
:root { --gold-text-2: linear-gradient(180deg, #FBE7A6 0%, #FBE7A6 13%, #F6D266 24.8%, #E8B02C 44.1%, #B97C08 50%, #EBBB3E 58.9%, #C88E16 73.7%, #8A5500 87%, #8A5500 100%);
  --ring-1: .15em; --ring-2: .10em; --ring-3: .05em; }
.wordmark span.gold14 { --ring-1: .21em; --ring-2: .14em; --ring-3: .07em; }
.wordmark span.gold14, .hero h1 em.gold14 { color: #FFE48C; -webkit-text-stroke: var(--ring-2) #FFE48C; }   /* bright gold rim */
.gold14::before { color: #3E2400; -webkit-text-stroke: var(--ring-1) #3E2400; background: none;              /* dark bronze outline + glow */
  text-shadow: 0 0 .28em rgba(242,185,46,.32), 0 .05em .12em rgba(0,0,0,.6); }
.gold14::after { z-index: 1; color: #A2601C; -webkit-text-stroke: var(--ring-3) #A2601C; background: none;    /* copper band */
  -webkit-background-clip: border-box; background-clip: border-box; }
.gold14 .gfill { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.gold14 .gfill::before { content: attr(data-text); position: absolute; inset: 0; color: transparent; -webkit-text-stroke: 0;  /* gold fill */
  background: var(--gold-text-2); -webkit-background-clip: text; background-clip: text; }

/* ===== 14-0 drawn exactly like the logo (inline SVG reusing the logo's gradients and shadow) ===== */
.gold-svg { display: inline-block; overflow: visible; height: .9em; width: auto; vertical-align: -0.12em; }
.gt-wrap { background: none !important; color: inherit; filter: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; }
.gt-hero { height: 1.25em; vertical-align: -0.19em; }
.gt-head { height: 1.29em; vertical-align: -0.21em; margin-left: -3px; }

/* Page background: the original navy at the top (with its soft glow), fading to black toward the bottom. */
html { background: #000; }
body { background: radial-gradient(120% 60% at 50% -10%, #16233F 0%, rgba(22,35,63,0) 60%), linear-gradient(180deg, #0B1428 0%, #070B16 40%, #030509 75%, #000000 100%) fixed; min-height: 100vh; }

/* ---------- daily leaderboard ---------- */
.board { padding: 6px 0 10px; }
.lb-title { font-family: var(--display); font-weight: 900; font-size: 34px; margin: 6px 0 4px; }
.lb-sub { margin: 0 0 6px; font-size: 13px; }
.lb-tabs { margin-bottom: 10px; }
.lb-head, .lb-row { display: grid; grid-template-columns: 34px 1fr 54px 76px; align-items: center; gap: 8px; }
.lb-head { padding: 0 14px 6px; font-size: 10px; letter-spacing: 1.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.lb-head span:nth-child(n+3) { text-align: right; }
.lb-list { display: grid; gap: 6px; }
.lb-row { padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1.5px solid #24304A; }
.lb-rank { font-family: var(--display); font-weight: 900; font-size: 20px; color: var(--muted); text-align: center; }
.lb-name { font-weight: 700; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name small, .lb-pts small, .lb-perfect small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .4px; }
.lb-perfect, .lb-pts { text-align: right; font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1.05; }
.lb-perfect { color: var(--gold); } .lb-perfect i { font-style: normal; color: #3A4D73; }
.lb-pts small, .lb-perfect small { font-family: var(--body); }
/* top three: medal-coloured rank badges and edges */
.lb-row.m-gold { border-color: #A87A12; background: linear-gradient(90deg, rgba(242,185,46,.14), rgba(242,185,46,0) 60%), var(--surface); }
.lb-row.m-silver { border-color: #7C8AA3; background: linear-gradient(90deg, rgba(203,213,225,.11), rgba(203,213,225,0) 60%), var(--surface); }
.lb-row.m-bronze { border-color: #8A5A2B; background: linear-gradient(90deg, rgba(205,127,50,.13), rgba(205,127,50,0) 60%), var(--surface); }
.m-gold .lb-rank, .m-silver .lb-rank, .m-bronze .lb-rank { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; color: #1A1200; margin: 0 auto; }
.m-gold .lb-rank { background: var(--gold-metal); box-shadow: 0 0 0 1.5px #5A3600; }
.m-silver .lb-rank { background: linear-gradient(180deg, #FFFFFF, #CBD5E1 45%, #8C99AE 55%, #E2E8F0); box-shadow: 0 0 0 1.5px #4B5567; }
.m-bronze .lb-rank { background: linear-gradient(180deg, #FFD9B0, #D08A4A 45%, #8A4F1C 55%, #E0A06A); box-shadow: 0 0 0 1.5px #4A2A0C; }
/* your own row: gold edge so you can find yourself */
.lb-row.you { border: 2px solid #F2B92E; background: linear-gradient(90deg, rgba(242,185,46,.18), rgba(242,185,46,.04)), var(--surface-2); box-shadow: 0 0 16px rgba(242,185,46,.18); }
.lb-row.you .lb-name { color: #FFE27A; }
.lb-gap { text-align: center; color: var(--muted); letter-spacing: 4px; margin: 4px 0; }
.lb-note { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0 0; }
.lb-link { display: block; margin: -4px auto 0; font-size: 14px; color: #F6C531; text-decoration: none; min-height: 36px; }
.lb-link:hover { color: #FFE27A; }
/* Header: wordmark and links always on one line (tapping CRICKET 14-0 goes home). */
.wordmark { white-space: nowrap; }
.topbar .linkbtn { white-space: nowrap; padding-left: 4px; padding-right: 4px; }
.topbar > span { gap: 6px !important; }
/* Leaderboard period tabs: four equal tabs that always fit. */
.lb-tabs { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
.lb-tabs button { padding: 0 6px; }
@media (max-width: 380px) { .wordmark { font-size: 20px; } .topbar .linkbtn { font-size: 13px; padding-left: 3px; padding-right: 3px; } }

/* ---------- leaderboard: top three in their metal, any 14-0 count in the logo's gold ---------- */
:root {
  --m-gold: linear-gradient(180deg, #FFF6CC 0%, #FFE27A 22%, #F2B92E 48%, #B47A0A 56%, #F2C94C 70%, #A06608 100%);
  --m-silver: linear-gradient(180deg, #FFFFFF 0%, #EEF2F7 22%, #C3CCD8 48%, #7D8A9E 56%, #D8DEE7 70%, #8592A6 100%);
  --m-bronze: linear-gradient(180deg, #FFE3C4 0%, #F2B47A 22%, #CD7F32 48%, #8A4F1C 56%, #D9925A 70%, #7A4416 100%);
}
.lb-name b, .lb-pts b { font-weight: inherit; }
.lb-name b { display: block; overflow: hidden; text-overflow: ellipsis; }
.m-gold .metal, .m-silver .metal, .m-bronze .metal { display: inline-block; max-width: 100%; color: transparent; -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.75)); }
.m-gold .metal { background-image: var(--m-gold); }
.m-silver .metal { background-image: var(--m-silver); }
.m-bronze .metal { background-image: var(--m-bronze); }
.lb-pts b { display: inline-block; }
/* Outline in the row's metal with a glint orbiting it (same effect as the selected player card). */
.lb-orbit { position: relative; padding: 2px; border-radius: 14px; animation: orbit 4.5s linear infinite; }
.lb-orbit > .lb-row { border: 0; border-radius: 12px; }
.o-gold { background: conic-gradient(from var(--ang), #6B4100 0deg, #9A6206 50deg, #F2B92E 95deg, #FFF6CC 112deg, #F2B92E 130deg, #9A6206 175deg, #6B4100 230deg, #7A4A00 360deg);
  box-shadow: 0 0 18px rgba(242,185,46,.22); }
.o-silver { background: conic-gradient(from var(--ang), #4B5567 0deg, #7D8A9E 50deg, #C3CCD8 95deg, #FFFFFF 112deg, #C3CCD8 130deg, #7D8A9E 175deg, #4B5567 230deg, #556074 360deg);
  box-shadow: 0 0 16px rgba(203,213,225,.14); animation-delay: -1.5s; }
.o-bronze { background: conic-gradient(from var(--ang), #4A2A0C 0deg, #8A4F1C 50deg, #CD7F32 95deg, #FFE3C4 112deg, #CD7F32 130deg, #8A4F1C 175deg, #4A2A0C 230deg, #5A320F 360deg);
  box-shadow: 0 0 16px rgba(205,127,50,.16); animation-delay: -3s; }
/* 14-0 count: the logo's gold numbers */
.gt-count { height: 1.42em; vertical-align: -0.22em; }
.lb-perfect { display: grid; justify-items: end; }

/* ---------- leaderboard polish: linked glints, diamond 14-0 counts ---------- */
/* Glints chase down the podium: gold leads, silver just behind, bronze just behind that. */
.o-gold { animation-delay: -0.9s; }
.o-silver { animation-delay: -0.45s; }
.o-bronze { animation-delay: 0s; }
/* 14-0 column: no small label (the heading says it); a big diamond number that fills the column. */
.lb-head, .lb-row { grid-template-columns: 34px 1fr 62px 76px; }
.lb-perfect { display: flex; justify-content: flex-end; align-items: center; }
.lb-perfect i { font-size: 20px; }
.dia { position: relative; display: inline-block; line-height: 0; }
.dia-svg { height: 38px; vertical-align: middle; }
/* a whitish-blue light travelling round the number's outline (like the glint round the top-three rows) */
.dia-run { stroke-dasharray: 48 218; stroke-width: 4.4px; animation: diarun 2.6s linear infinite; }
@keyframes diarun { to { stroke-dashoffset: -266; } }
@media (prefers-reduced-motion: reduce) { .dia-run { animation: none; opacity: 0; } }
.lb-head, .lb-row { grid-template-columns: 34px 1fr 64px 76px; }
.lb-perfect { padding-right: 8px; }
.dia-svg { height: 44px; }

/* ---------- leaderboard: streak column, roomier diamond column, no hard edge round the glow ---------- */
.lb-head, .lb-row { grid-template-columns: 28px minmax(0, 1fr) 48px 58px 72px; gap: 6px; }
.lb-head span:nth-child(3), .lb-head span:nth-child(4) { text-align: center; }
.lb-name { font-size: 14.5px; }
.lb-streak, .lb-perfect { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 0; overflow: visible; }
.lb-streak { gap: 2px; }
.lb-streak i, .lb-perfect i { font-style: normal; color: #3A4D73; font-size: 20px; }
.flame { width: 17px; height: 21px; flex: none; filter: drop-shadow(0 0 3px rgba(255,140,40,.85)) drop-shadow(0 0 8px rgba(255,90,20,.45)); }
.lb-streak b { font-family: var(--display); font-weight: 900; font-size: 19px; color: #FFE7B8;
  text-shadow: 0 0 6px rgba(255,140,40,.55), 0 1px 0 rgba(90,20,5,.9); }
/* diamond: the box is padded so the glow fades out completely inside it; negative margins keep the row height */
.dia { display: flex; justify-content: center; }
.dia-svg { height: 76px; margin: -16px -20px; max-width: none; }
.lb-head, .lb-row { grid-template-columns: 24px minmax(0, 1fr) 44px 54px 70px; gap: 5px; }
.lb-row { padding-left: 10px; padding-right: 10px; }
.lb-head { padding-left: 10px; padding-right: 10px; }
.dia-svg { height: 66px; margin: -22px -18px; }
/* Streak sits in the middle of the row: name area on its left and the 14-0s + points area on its right share the space equally. */
.lb-head, .lb-row { grid-template-columns: 24px minmax(0, 1fr) 46px minmax(0, 1fr); gap: 5px; }
.lb-right { display: flex; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.lb-right > .lb-perfect { width: 54px; flex: none; }
.lb-right > .lb-pts { width: 68px; flex: none; }
.lb-head .lb-right > span:first-child { width: 54px; text-align: center; }
.lb-head .lb-right > span:last-child { width: 68px; text-align: right; }
.lb-head > span:nth-child(3) { text-align: center; }
@media (max-width: 380px) { .lb-name { font-size: 13px; } .lb-name small { font-size: 9.5px; } }

/* ---------- leaderboard layout v3: [rank + name] | streak | [14-0s + points]. Streak sits mid-row; nothing collides. ---------- */
.lb-head, .lb-row { grid-template-columns: minmax(0, 1fr) 54px minmax(134px, 1fr); gap: 4px; }
.lb-left { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 6px; align-items: center; min-width: 0; }
.lb-head .lb-left > span:last-child { text-align: left; }
.lb-head > span:nth-child(2) { text-align: center; }
.lb-right > .lb-perfect { width: 54px; }
.lb-right > .lb-pts { width: 76px; min-width: 0; }
.lb-pts b { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: clip; }
.lb-streak { min-width: 0; }
.lb-streak b { min-width: 0; max-width: 34px; overflow: hidden; white-space: nowrap; }
.lb-name b { white-space: nowrap; }
/* medals sit inside their own column, clear of the name */
.m-gold .lb-rank, .m-silver .lb-rank, .m-bronze .lb-rank { width: 28px; height: 28px; font-size: 15px; margin: 0; }
.lb-rank { text-align: center; }
/* tighter right side so names get the room on phones */
.lb-head, .lb-row { grid-template-columns: minmax(0, 1fr) 48px minmax(120px, 1fr); }
.lb-left { grid-template-columns: 30px minmax(0, 1fr); gap: 5px; }
.lb-right { gap: 2px; }
.lb-right > .lb-perfect { width: 48px; }
.lb-right > .lb-pts { width: 70px; }
.lb-head .lb-right > span:first-child { width: 48px; }
.lb-head .lb-right > span:last-child { width: 70px; }
.lb-streak b { max-width: 30px; }
.dia-svg.len3 { height: 54px; margin: -16px -16px; }  /* three-digit 14-0 counts drawn a touch smaller */
.m-gold .lb-rank, .m-silver .lb-rank, .m-bronze .lb-rank { width: 27px; height: 27px; }
.dia-svg.len3 { height: 46px; margin: -11px -12px; }

/* Daily leaderboard: the bottom strip of the Daily card, inside the same gold trim (one border round the lot). */
.mode.daily { padding-bottom: 0; overflow: hidden; }
.daily-board { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; width: calc(100% + 36px); margin: 10px -18px 0;
  padding: 11px 18px 12px; border: 0; border-top: 1px solid rgba(242,185,46,.45); border-radius: 0 0 12px 12px; cursor: pointer; text-align: left;
  color: var(--text); font: inherit; background: linear-gradient(180deg, rgba(0,0,0,.30), rgba(0,0,0,.42)); transition: background .15s ease; }
.daily-board > span { flex: 1; min-width: 0; display: grid; gap: 1px; }
.daily-board b { font-weight: 700; font-size: 15px; color: #FFE7A0; }
.daily-board small { font-size: 12.5px; color: var(--muted); }
.daily-board i { font-style: normal; font-size: 24px; line-height: 1; color: #F2B92E; transition: transform .15s ease; }
.trophy { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 0 6px rgba(242,185,46,.35)); }
@media (hover: hover) { .daily-board:hover { background: linear-gradient(180deg, rgba(242,185,46,.10), rgba(242,185,46,.05)); } .daily-board:hover i { transform: translateX(3px); } }
.daily-board:active { background: linear-gradient(180deg, rgba(242,185,46,.16), rgba(242,185,46,.08)); }
.daily-board:active i { transform: translateX(4px); }

/* ---------- language bar (home page, always on screen) and Hindi type ---------- */
.langbar { position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding: 8px 16px; background: rgba(7,11,22,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.langbar .wrap { display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; max-width: none; padding: 0; }
.langbar .wrap::-webkit-scrollbar { display: none; }
.lang { flex: none; font: 600 14px/1 var(--body); font-family: Inter, Hind, system-ui, sans-serif; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; }
button.lang[aria-pressed="true"] { color: #14110A; background: linear-gradient(180deg, #FFE39A, #E8B02A); border-color: #F6C531; }
button.lang:active { transform: scale(.96); }
.lang.soon { opacity: .45; cursor: default; border-style: dashed; padding: 6px 7px; font-size: 12px; }
.lang-soon { flex: none; color: var(--muted); font-size: 10px; opacity: .75; margin-left: 1px; }
html[lang="hi"] { --body: Inter, Hind, system-ui, sans-serif; --display: "Barlow Condensed", Hind, "Arial Narrow", sans-serif; }
html[lang="hi"] :is(.kicker, .label, .group-title, .fulltag, .slotrow span, .xi-title, .stats small, .soon-tag, .heldtag, .spinbtn, .reel small, .teambox small, .erabox small, .er small, .lb-head, .classic, .unit small) { letter-spacing: 0; text-transform: none; }
html[lang="hi"] .hero h1 { font-size: 40px; line-height: 1.25; }
html[lang="hi"] .mode h2, html[lang="hi"] .dialog h2, html[lang="hi"] .page h1, html[lang="hi"] .lb-title { line-height: 1.3; }
html[lang="hi"] .stats small { font-size: 10px; }
html[lang="hi"] .label { font-size: 22px; }
