/* Through Ball: ink navy, electric lime, big confident numbers. */
:root {
  --bg: #070b14; --bg2: #0a1020; --card: #0f1626; --card2: #161f33; --card3: #1d2840;
  --line: rgba(255, 255, 255, .07); --line2: rgba(255, 255, 255, .12);
  --ink: #f2f5fa; --mut: #8a96ad; --mut2: #5d6880;
  --acc: #c6f432; --acc-ink: #0a1200; --acc-soft: rgba(198, 244, 50, .12); --acc-glow: rgba(198, 244, 50, .35);
  --aqua: #38e1d0; --w: #34d399; --d: #64748b; --l: #f87171;
  --r: 20px; --r-sm: 14px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "SF Pro Text", -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", Roboto, sans-serif;
  --font-d: "SF Pro Display", -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font: 15px/1.45 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1;
  background: radial-gradient(120% 60% at 100% -10%, rgba(198, 244, 50, .07), transparent 60%), radial-gradient(90% 50% at -20% 0%, rgba(56, 225, 208, .06), transparent 60%), var(--bg);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* header */
header#top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 10px) 16px 10px; background: rgba(7, 11, 20, .72); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
header h1 { flex: 1; margin: 0; font: 800 20px/1.2 var(--font-d); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 10px; }
header h1 .mark { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.icon-btn svg.i { width: 19px; height: 19px; }
.icon-btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

main { padding: 14px 14px calc(104px + var(--safe-b)); max-width: 760px; margin: 0 auto; outline: none; }

/* floating glass tab bar */
nav#tabs {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); z-index: 20; display: flex; gap: 2px;
  width: min(440px, calc(100% - 24px)); padding: 6px; border-radius: 22px;
  background: rgba(16, 23, 38, .78); backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid var(--line2); box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
nav#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--mut); padding: 7px 0 6px; border-radius: 16px; transition: background .15s, color .15s; }
nav#tabs a svg.i { width: 21px; height: 21px; }
nav#tabs a.on { color: var(--acc-ink); background: var(--acc); }

/* cards */
.card { background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.card h2 { margin: 0 0 4px; font: 750 17px/1.25 var(--font-d); letter-spacing: -.01em; }
.sub { color: var(--mut); font-size: 13px; }
.mut { color: var(--mut); }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
.lg-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--acc)); box-shadow: 0 0 10px var(--c, var(--acc)); display: inline-block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line2); background: var(--card2); font-weight: 650; font-size: 14.5px; cursor: pointer; transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn.pri { background: var(--acc); border-color: transparent; color: var(--acc-ink); box-shadow: 0 8px 24px -8px var(--acc-glow); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 13.5px; border-radius: 12px; }
.btn[disabled] { opacity: .45; }
.btn .lock, .lock { width: 13px; height: 13px; opacity: .7; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btns .btn { flex: 1; }
.empty { text-align: center; color: var(--mut); padding: 26px 8px; }
.loading { text-align: center; color: var(--mut); padding: 44px 8px; font-size: 13.5px; }
.loading::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--card3); border-top-color: var(--acc); animation: spin .8s linear infinite; }
.err { background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .3); color: #fecaca; border-radius: var(--r-sm); padding: 14px; font-size: 14px; }

/* hero (welcome) */
.hero { text-align: center; padding: 30px 18px 22px; background: radial-gradient(80% 70% at 50% 0%, rgba(198, 244, 50, .14), transparent 70%), var(--card); }
.hero img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 16px 40px -12px var(--acc-glow); }
.hero h2 { font: 800 26px/1.15 var(--font-d); letter-spacing: -.03em; margin: 16px 0 8px; }
.hero .sub { font-size: 14.5px; max-width: 340px; margin: 0 auto; }

/* team card */
.tname { font: 800 23px/1.15 var(--font-d); letter-spacing: -.025em; margin: 8px 0 4px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.kpi { background: var(--card2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 11px; min-width: 0; }
.kpi .l { font-size: 10.5px; color: var(--mut); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font: 800 22px/1.2 var(--font-d); letter-spacing: -.02em; margin-top: 3px; }
.kpi .s { font-size: 11.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.hi { background: var(--acc-soft); border-color: rgba(198, 244, 50, .25); }
.kpi.hi .v { color: var(--acc); }
.form { display: inline-flex; gap: 3px; vertical-align: middle; }
.form b { width: 18px; height: 18px; border-radius: 6px; font-size: 10px; font-weight: 800; display: grid; place-items: center; color: #04140c; }
.form .W { background: var(--w); } .form .D { background: var(--d); color: #fff; } .form .L { background: var(--l); color: #2a0606; }
.next { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--mut); }
.pbar { display: flex; gap: 3px; height: 26px; margin-top: 8px; font-size: 11px; font-weight: 800; }
.pbar div { display: grid; place-items: center; min-width: 0; overflow: hidden; border-radius: 8px; white-space: nowrap; }
.pbar .pw { background: var(--acc); color: var(--acc-ink); } .pbar .pd { background: var(--card3); color: var(--ink); } .pbar .pl { background: rgba(248, 113, 113, .85); color: #2a0606; }

/* pickers and tables */
.pickers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.seg { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px 4px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--mut); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--card3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1px solid var(--line2); background: var(--card); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; color: var(--mut); cursor: pointer; }
.chips button.on { background: var(--acc); border-color: transparent; color: var(--acc-ink); }
select {
  width: 100%; font: 600 15px var(--font); color: var(--ink); background: var(--card); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 12px 14px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238a96ad' stroke-width='2'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center;
}
input[type=search] { width: 100%; font: 16px var(--font); color: var(--ink); background: var(--card2); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 13px 14px; outline: none; }
input[type=search]:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
table.st { width: 100%; border-collapse: collapse; font-size: 14px; }
table.st th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--mut2); font-weight: 700; text-align: right; padding: 6px 4px 8px; }
table.st td { padding: 11px 4px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.st th.t, table.st td.t { text-align: left; }
table.st td.t { max-width: 0; width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
table.st td.rk { color: var(--mut); width: 28px; text-align: left; font-weight: 700; }
table.st tr.me td { background: var(--acc-soft); }
table.st tr.me td:first-child { box-shadow: inset 3px 0 var(--acc); border-radius: 6px 0 0 6px; }
table.st tr.me td:last-child { border-radius: 0 6px 6px 0; }
table.st tr[data-team] { cursor: pointer; }
table.st .pts { font-weight: 800; }
.pct { display: inline-block; min-width: 42px; font-weight: 700; }
.pct.hi { color: var(--acc); }
.delta { font-size: 11px; font-weight: 800; margin-left: 4px; }
.delta.up { color: var(--acc); } .delta.dn { color: var(--l); }
.tier { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; border-radius: 5px; padding: 1px 5px; margin-left: 6px; background: var(--acc-soft); color: var(--acc); vertical-align: 1px; }

/* games */
.games { display: flex; flex-direction: column; }
.game { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.game:first-child { border-top: 0; }
.game .dt { width: 64px; flex: none; font-size: 12px; color: var(--mut); line-height: 1.3; font-weight: 600; }
.res { flex: none; font-weight: 800; font-size: 13px; padding: 4px 9px; border-radius: 9px; background: var(--card3); }
.res.w { background: rgba(52, 211, 153, .16); color: #6ee7b7; } .res.l { background: rgba(248, 113, 113, .14); color: #fca5a5; } .res.d { background: var(--card3); color: var(--ink); }
.odds { font-size: 11.5px; color: var(--mut); text-align: right; flex: none; line-height: 1.4; font-weight: 600; }
.tag { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; border-radius: 5px; padding: 1px 5px; margin-left: 5px; background: rgba(56, 225, 208, .12); color: var(--aqua); vertical-align: 1px; }
.day-h { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mut2); font-weight: 800; margin: 16px 0 2px; }

/* what-if */
.pick { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.pick .h { text-align: right; } .pick .nm { font-size: 13.5px; font-weight: 700; }
.pick .pr { font-size: 11px; color: var(--mut); font-weight: 600; }
.pick .opts { display: flex; gap: 4px; background: var(--card2); padding: 3px; border-radius: 12px; }
.pick .opts button { width: 36px; height: 32px; border-radius: 9px; border: 0; background: none; font-size: 12.5px; font-weight: 800; color: var(--mut); cursor: pointer; }
.pick .opts button.on { background: var(--acc); color: var(--acc-ink); }
.focus { background: radial-gradient(90% 90% at 100% 0%, rgba(198, 244, 50, .16), transparent 60%), var(--card); border-color: rgba(198, 244, 50, .18); }
.cmp { display: flex; align-items: baseline; gap: 12px; font: 800 34px/1.1 var(--font-d); letter-spacing: -.03em; margin-top: 8px; }
.cmp .arrow { color: var(--mut2); font-size: 22px; }
.cmp .to { color: var(--acc); }

/* scouting */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; text-align: center; }
.vs .nm { font-weight: 750; font-size: 15px; }
.vs .score { font: 800 36px/1 var(--font-d); letter-spacing: -.03em; padding: 0 6px; }
.statrow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; align-items: center; }
.statrow .a { text-align: right; font-weight: 750; } .statrow .b { font-weight: 750; } .statrow .k { color: var(--mut); font-size: 11.5px; text-align: center; font-weight: 600; }
.statrow .better { color: var(--acc); }

/* updates */
.upd { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; align-items: flex-start; }
.upd:first-of-type { border-top: 0; }
.upd .ic { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--card2); }
.upd .ic.up { background: var(--acc-soft); color: var(--acc); } .upd .ic.dn { background: rgba(248, 113, 113, .12); color: var(--l); }
.upd .ic svg.i { width: 16px; height: 16px; }
.upd small { display: block; color: var(--mut); font-size: 12px; margin-top: 1px; }

/* locked teaser */
.locked { position: relative; overflow: hidden; }
.locked .blur { filter: blur(6px); opacity: .5; pointer-events: none; user-select: none; }
.locked .over { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 18px; background: linear-gradient(transparent, rgba(7, 11, 20, .9) 45%); }
.locked .over .badge { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 8px; background: var(--acc-soft); color: var(--acc); }
.locked .over .badge svg.i { width: 24px; height: 24px; }

/* sheet */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(2, 4, 10, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet-card {
  position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line2);
  border-radius: 28px 28px 0 0; padding: 22px 18px calc(22px + var(--safe-b)); animation: up .25s cubic-bezier(.2, .9, .3, 1);
}
@media (min-width: 600px) { .sheet { align-items: center; } .sheet-card { border-radius: 28px; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--card2); cursor: pointer; display: grid; place-items: center; color: var(--mut); }
.pw-head { text-align: center; margin: 6px 0 16px; }
.pw-head img { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 14px 34px -10px var(--acc-glow); }
.pw-head h2 { margin: 12px 0 4px; font: 800 24px/1.15 var(--font-d); letter-spacing: -.025em; }
.pw-head h2 em { font-style: normal; color: var(--acc); }
.feat { display: flex; gap: 12px; padding: 9px 0; align-items: flex-start; }
.feat .ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); }
.feat b { display: block; font-size: 14.5px; }
.feat span { font-size: 13px; color: var(--mut); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 10px; }
.plan { border: 1.5px solid var(--line2); border-radius: 18px; padding: 16px 10px 13px; text-align: center; background: var(--card); cursor: pointer; position: relative; color: var(--ink); }
.plan.best { border-color: var(--acc); background: linear-gradient(180deg, var(--acc-soft), transparent 80%), var(--card); }
.plan .p { font: 800 26px/1.1 var(--font-d); letter-spacing: -.02em; margin: 2px 0; }
.plan .n { font-size: 13px; font-weight: 700; }
.plan .s { font-size: 11.5px; color: var(--mut); }
.plan .ribbon { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--acc); color: var(--acc-ink); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.legal { font-size: 11px; color: var(--mut2); text-align: center; margin-top: 12px; line-height: 1.5; }
.legal a { text-decoration: underline; }
.linkbtn { background: none; border: 0; color: var(--acc); font-weight: 700; cursor: pointer; padding: 8px; font-size: 14px; }

/* settings */
.set { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.set:first-of-type { border-top: 0; }
.set .grow b { display: block; font-size: 15px; font-weight: 650; }
.set .grow span { font-size: 12.5px; color: var(--mut); }
.result { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; cursor: pointer; color: var(--ink); }
.result .add { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--card2); color: var(--acc); }

#toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%) translateY(20px); opacity: 0; transition: .22s;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 700; z-index: 60; pointer-events: none; max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
#toast.on { opacity: 1; transform: translateX(-50%); }

.disclaimer { font-size: 11.5px; color: var(--mut2); text-align: center; margin: 20px 10px 0; line-height: 1.55; }
@media (max-width: 380px) { .kpi .v { font-size: 19px; } .tname { font-size: 20px; } .hide-xs { display: none; } }
