/* StatJacket: dark navy-black, one-handed, team color + silver. System fonts only. */
:root {
  --bg: #060A16;
  --surface: #0E1527;
  --surface-2: #152038;
  --surface-3: #1E2A47;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #F5F5F7;
  --text-2: #A3AEC6;
  --text-3: #8C9AB6;
  /* Team color: --accent is the true color for fills, --accent-hi a lighter tint for text and icons on dark.
     app.js recomputes all of these from the chosen swatch. */
  --accent: #D3202F;
  --accent-rgb: 211, 32, 47;
  --accent-fill: #D3202F;
  --accent-fill-rgb: 211, 32, 47;
  --accent-ink: #FFFFFF;
  --accent-hi: #D3202F;
  --accent-hi-rgb: 211, 32, 47;
  --accent-2: #D5DAE3;
  --accent-2-rgb: 213, 218, 227;
  --accent-2-ink: #01082A;
  --accent-2-hi: #D5DAE3;
  --accent-2-hi-rgb: 213, 218, 227;
  --win: var(--accent-2-hi);
  --loss: #FB7185;
  --warn: #FBBF24;
  /* Type scale: every step is at least 1.25x the one below. */
  --fs-1: 11px;  /* caps labels */
  --fs-2: 14px;  /* secondary text */
  --fs-3: 18px;  /* body, buttons, inputs */
  --fs-4: 23px;  /* small numbers, card titles */
  --fs-5: 29px;  /* stat numbers */
  --fs-6: 37px;  /* page titles */
  --fs-7: 56px;  /* the scoreboard number */
  --r-lg: 22px;
  --r-md: 16px;
  --tabbar-h: 58px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lock, html.lock body { overflow: hidden; }
body {
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs-3); line-height: 1.35;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit;
  touch-action: manipulation; -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; }
input, textarea { font: inherit; color: inherit; }
b, strong { font-weight: 750; }
em { font-style: normal; font-weight: 500; color: var(--text-3); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.big { width: 44px; height: 44px; stroke-width: 1.6; }
.muted { color: var(--text-2); font-size: var(--fs-2); }
.muted.sm { display: inline-flex; align-items: center; gap: 4px; }
.muted.sm .ic { width: 15px; height: 15px; }

/* Status bar shim: content scrolls under a solid strip, not the clock. */
.status-shim { position: fixed; top: 0; left: 0; right: 0; height: var(--sat); background: var(--bg); z-index: 30; }

#view {
  max-width: 560px; margin: 0 auto;
  padding: 0 max(16px, var(--sar)) calc(var(--tabbar-h) + var(--sab) + 28px) max(16px, var(--sal));
}
#view.enter { animation: viewIn .26s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Header ---------- */
.top { padding: calc(var(--sat) + 12px) 0 18px; }
.top .top-bar { display: flex; align-items: center; gap: 10px; }
.top .top-bar .kicker { margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { width: 36px; height: 36px; object-fit: contain; flex: none; display: block; }
.top h1 { font-size: var(--fs-6); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin-top: 14px; overflow-wrap: break-word; }
.kicker { font-size: var(--fs-1); font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-hi); margin-bottom: 4px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hero-text { min-width: 0; }
.gameday { display: inline-block; margin-top: 14px; font-size: var(--fs-1); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2-ink); background: var(--accent-2); padding: 4px 9px; border-radius: 99px; }
.gameday + h1 { margin-top: 8px; }
.ig { display: inline-flex; align-items: center; min-height: 32px; margin-top: 2px; color: var(--text-2); font-size: var(--fs-2); font-weight: 650; text-decoration: none; }
.ig:active { color: var(--accent-hi); }
.jersey { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; color: var(--accent-hi); }
.jersey-pos { font-size: var(--fs-1); font-weight: 800; letter-spacing: .12em; color: var(--accent-ink); background: var(--accent); padding: 3px 8px; border-radius: 99px; }
.jersey-n { font-size: var(--fs-7); font-weight: 800; line-height: .82; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.jersey small { font-size: var(--fs-5); letter-spacing: 0; margin-right: 2px; vertical-align: top; opacity: .7; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); transition: transform .15s var(--ease); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.icon-btn.sm { width: 36px; height: 36px; background: transparent; border: 0; }
.icon-btn.sm .ic { width: 18px; height: 18px; }
.demo-badge { font-size: var(--fs-1); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-hi); border: 1px solid rgba(var(--accent-hi-rgb), .5); padding: 4px 8px; border-radius: 99px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 700; font-size: var(--fs-3);
  color: var(--text); text-align: center; transition: transform .14s var(--ease), opacity .2s; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; }
.btn .ic { width: 20px; height: 20px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.secondary { background: var(--accent-2); color: var(--accent-2-ink); border-color: transparent; }
.btn.danger { color: var(--loss); background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .28); }
.btn.ghost-danger { color: var(--loss); background: transparent; border-color: rgba(251, 113, 133, .28); }
.btn.block { display: flex; width: 100%; }
.btn.lg { min-height: 56px; border-radius: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack { display: grid; gap: 10px; }
.link { color: var(--accent-hi); font-weight: 700; font-size: var(--fs-2); min-height: 44px; padding: 0 2px; display: inline-flex; align-items: center; }

/* ---------- Install hint ---------- */
.install { display: flex; align-items: center; gap: 12px; padding: 12px 6px 12px 14px; margin-bottom: 14px;
  border-radius: var(--r-md); background: rgba(var(--accent-hi-rgb), .1); border: 1px solid rgba(var(--accent-hi-rgb), .3); }
.install-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(var(--accent-hi-rgb), .18); color: var(--accent-hi); flex: none; }
.install p { flex: 1; font-size: var(--fs-2); line-height: 1.4; }
.install p span { display: block; color: var(--text-2); margin-top: 3px; }

/* ---------- Next up ---------- */
.next { position: relative; display: block; width: 100%; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); padding: 18px 18px 20px; min-height: 170px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 1) 0%, rgba(var(--accent-rgb), .78) 100%); color: var(--accent-ink);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .8); transition: transform .16s var(--ease); }
.next:active { transform: scale(.985); }
.next.practice, .next.other, .next.empty { background: radial-gradient(120% 140% at 100% 0%, rgba(var(--accent-hi-rgb), .3) 0%, rgba(var(--accent-hi-rgb), .05) 55%, transparent 80%), var(--surface-2);
  color: var(--text); border: 1px solid rgba(var(--accent-hi-rgb), .26); box-shadow: none; }
.next-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pill-type { font-size: var(--fs-1); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; background: rgba(0, 0, 0, .24); }
.next.practice .pill-type, .next.other .pill-type, .next.empty .pill-type { background: rgba(var(--accent-hi-rgb), .16); color: var(--accent-hi); }
.countdown { font-size: var(--fs-2); font-weight: 750; padding: 5px 11px; border-radius: 99px; background: rgba(255, 255, 255, .2); white-space: nowrap; }
.next.practice .countdown, .next.other .countdown { background: rgba(255, 255, 255, .1); }
.next-title { font-size: var(--fs-6); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; margin: 16px 0 10px; overflow-wrap: anywhere; max-width: 66%; }
.next-line { display: flex; align-items: center; gap: 8px; font-size: var(--fs-3); font-weight: 650; margin-top: 4px; max-width: 70%; }
.next-line span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-line .ic { width: 18px; height: 18px; opacity: .85; }
.next-sub { color: var(--text-2); font-size: var(--fs-2); margin: -2px 0 14px; max-width: 64%; }
.next-mark { position: absolute; z-index: -1; right: -14px; bottom: -22px; width: 132px; height: 132px; object-fit: contain; pointer-events: none; transform: rotate(-4deg); }
.next.practice .next-mark, .next.other .next-mark, .next.empty .next-mark { opacity: .9; }
.next.empty .row2 { max-width: 66%; grid-template-columns: 1fr; }
.next .btn.on-accent { min-height: 46px; }
.next.empty .btn.on-accent:first-child { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* ---------- Quick actions ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.qa { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 2px 12px; min-height: 88px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-2); font-weight: 700; letter-spacing: -.01em; text-align: center; white-space: nowrap; transition: transform .14s var(--ease); }
.qa:active { transform: scale(.94); }
.qi { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(var(--accent-hi-rgb), .14); color: var(--accent-hi); }
.qa.alt .qi { background: rgba(var(--accent-2-hi-rgb), .14); color: var(--accent-2-hi); }

/* ---------- Sections + tiles ---------- */
.sec { margin-top: 24px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; min-height: 32px; margin-bottom: 8px; }
.sec-head h2 { font-size: var(--fs-1); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.tiles4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px 4px 13px; text-align: center; min-width: 0; }
.tile-v { font-size: var(--fs-5); font-weight: 800; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tile-v.long { font-size: var(--fs-4); line-height: 1.26; }
.tile-l, .stat span { font-size: var(--fs-1); font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin-top: 7px; }
.hint { color: var(--text-2); font-size: var(--fs-2); margin-top: 10px; }
.hint b { color: var(--text); }
.card { display: block; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
button.card { transition: transform .14s var(--ease); }
button.card:active { transform: scale(.985); }

/* Last game */
.last-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 750; font-size: var(--fs-3); }
.last-top span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.last-nums { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 4px; margin: 14px 0 8px; align-items: end; }
.last-nums div { display: flex; flex-direction: column; }
.last-nums b { font-size: var(--fs-5); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.last-nums div:first-child b { font-size: var(--fs-6); color: var(--accent-hi); }
.last-nums span { font-size: var(--fs-1); font-weight: 750; letter-spacing: .1em; color: var(--text-2); margin-top: 5px; }
.last-sub { color: var(--text-3); font-size: var(--fs-2); }

/* Weekly ring card (secondary accent = workout progress) */
.week { display: flex; align-items: center; gap: 16px; }
.ring-wrap { position: relative; width: 66px; height: 66px; flex: none; display: grid; place-items: center; }
.ring-wrap.lg { width: 104px; height: 104px; }
.ring { position: absolute; inset: 0; }
.ring-bg { fill: none; stroke: var(--surface-3); }
.ring-fg { fill: none; stroke: var(--accent-2-hi); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); }
.ring-n { position: relative; font-size: var(--fs-4); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ring-n small { font-size: var(--fs-2); color: var(--text-2); font-weight: 700; }
.ring-wrap.lg .ring-n { font-size: var(--fs-6); }
.ring-wrap.lg .ring-n small { font-size: var(--fs-3); }
.week-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.week-text b { font-size: var(--fs-3); font-weight: 800; }
.week-text > span { color: var(--text-2); font-size: var(--fs-2); }
.week-text .kicker { margin-bottom: 0; color: var(--accent-2-hi); }
.streak { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: var(--fs-2); font-weight: 750; color: var(--warn) !important; }
.streak .ic { width: 16px; height: 16px; }
.streak.off { color: var(--text-3) !important; font-weight: 600; }
.plus-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--accent-2-hi-rgb), .14); color: var(--accent-2-hi); flex: none; }
.plus-dot .ic { width: 18px; height: 18px; }
.week-big { display: flex; align-items: center; gap: 18px; padding: 18px; margin-bottom: 12px;
  background: radial-gradient(130% 160% at 0% 0%, rgba(var(--accent-2-hi-rgb), .16) 0%, transparent 60%), var(--surface); }

/* ---------- Segmented + chips ---------- */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.seg button { min-height: 44px; border-radius: 10px; font-weight: 700; font-size: var(--fs-2); color: var(--text-2); text-align: center; transition: background .18s, color .18s; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.sheet .seg { background: var(--bg); }
.seg.wl button { min-height: 54px; font-size: var(--fs-3); }
.seg.wl button.on[data-value="W"] { background: rgba(var(--accent-2-hi-rgb), .18); color: var(--win); }
.seg.wl button.on[data-value="L"] { background: rgba(251, 113, 133, .18); color: var(--loss); }
.chip { display: inline-flex; align-items: center; font-size: var(--fs-2); font-weight: 750; padding: 4px 9px; border-radius: 99px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.win { background: rgba(var(--accent-2-hi-rgb), .15); color: var(--win); }
.chip.loss { background: rgba(251, 113, 133, .15); color: var(--loss); }
.chip.ghost { border: 1px dashed rgba(var(--accent-hi-rgb), .6); color: var(--accent-hi); }
.chip.sm { font-size: var(--fs-1); padding: 2px 7px; margin-left: 4px; vertical-align: 2px; }
.chip.lg { font-size: var(--fs-3); padding: 6px 12px; }
.mini { font-size: var(--fs-1); font-weight: 750; letter-spacing: .04em; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Schedule ---------- */
.sched-seg { margin-bottom: 4px; }
.month { font-size: var(--fs-1); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin: 20px 2px 10px; }
.ev-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 10px 14px 10px 10px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); transition: transform .14s var(--ease); }
.ev-row:active { transform: scale(.985); }
.ev-row.past { background: rgba(14, 21, 39, .6); }
.ev-row.past .ev-date b { color: var(--text-2); }
.ev-date { width: 48px; flex: none; text-align: center; padding: 6px 0; border-radius: 12px; }
.ev-date span { display: block; font-size: var(--fs-1); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.ev-date b { display: block; font-size: var(--fs-4); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ev-row.game .ev-date { background: rgba(var(--accent-hi-rgb), .13); }
.ev-row.game .ev-date span { color: var(--accent-hi); }
.ev-row.today .ev-date span { color: var(--accent-hi); }
.ev-main { flex: 1; min-width: 0; }
.ev-title { font-weight: 750; font-size: var(--fs-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-row.practice .ev-title, .ev-row.other .ev-title { font-weight: 600; }
.ev-sub { color: var(--text-2); font-size: var(--fs-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.cal-all { margin-top: 18px; }
.empty-state { text-align: center; padding: 40px 18px 24px; color: var(--text-2); }
.empty-state .ic.big { color: var(--accent-hi); margin-bottom: 12px; }
.empty-state h3 { color: var(--text); font-size: var(--fs-4); font-weight: 800; margin-bottom: 6px; }
.empty-state p { font-size: var(--fs-2); max-width: 300px; margin: 0 auto 18px; }
.empty-state b { color: var(--text); }
.empty-state .row2 { max-width: 320px; margin: 0 auto; }

/* ---------- Stats ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 8px; padding: 18px 12px; }
.stat { text-align: center; }
.stat b { display: block; font-size: var(--fs-5); font-weight: 800; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { display: block; }
.chart-card { padding: 12px 8px 6px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .b { fill: rgba(var(--accent-hi-rgb), .4); }
.chart .b-last { fill: var(--accent-hi); }
.chart .v { fill: var(--text); font-size: var(--fs-1); font-weight: 750; text-anchor: middle; font-family: var(--font); }
.chart .d { fill: var(--text-3); font-size: var(--fs-1); font-weight: 600; text-anchor: middle; font-family: var(--font); }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .avg { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .avg-t { fill: var(--text-2); font-size: var(--fs-1); font-weight: 750; text-anchor: end; letter-spacing: .06em; font-family: var(--font); }
.highs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.high { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 10px 12px; min-width: 0; }
.high b { display: block; font-size: var(--fs-5); font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.high span { display: block; font-size: var(--fs-1); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin-top: 7px; }
.high small { display: block; font-size: var(--fs-1); color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 12px 14px 12px 12px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); transition: transform .14s var(--ease); }
.log-row:active { transform: scale(.985); }
.log-date { width: 40px; flex: none; text-align: center; }
.log-date span { display: block; font-size: var(--fs-1); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.log-date b { display: block; font-size: var(--fs-4); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.log-main { flex: 1; min-width: 0; }
.log-title { font-weight: 750; font-size: var(--fs-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-sub { color: var(--text-2); font-size: var(--fs-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.log-pts { text-align: center; flex: none; min-width: 40px; }
.log-pts b { display: block; font-size: var(--fs-5); font-weight: 800; color: var(--accent-hi); line-height: 1; font-variant-numeric: tabular-nums; }
.log-pts span { font-size: var(--fs-1); font-weight: 800; letter-spacing: .1em; color: var(--text-2); }

/* ---------- Workouts ---------- */
.wk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 2px 8px; font-size: var(--fs-2); font-weight: 700; color: var(--text-2); }
.wk-head span:first-child { color: var(--text); font-size: var(--fs-3); font-weight: 750; }
.wk-head .hit { color: var(--win); display: inline-flex; align-items: center; gap: 4px; }
.wk-head .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.w-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 11px 14px 11px 12px; margin-bottom: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); transition: transform .14s var(--ease); }
.w-row:active { transform: scale(.985); }
.w-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: rgba(var(--accent-hi-rgb), .14); color: var(--accent-hi); }
.w-ic.t-speed { background: rgba(251, 191, 36, .14); color: #FBBF24; }
.w-ic.t-agility { background: rgba(251, 146, 60, .15); color: #FB923C; }
.w-ic.t-strength { background: rgba(var(--accent-2-hi-rgb), .14); color: var(--accent-2-hi); }
.w-ic.t-footwork { background: rgba(45, 212, 191, .14); color: #2DD4BF; }
.w-ic.t-conditioning { background: rgba(244, 114, 182, .14); color: #F472B6; }
.w-ic.t-film { background: rgba(167, 139, 250, .15); color: #A78BFA; }
.w-ic.t-other { background: var(--surface-3); color: var(--text-2); }
.w-main { flex: 1; min-width: 0; }
.w-title { font-weight: 750; font-size: var(--fs-3); }
.w-sub { color: var(--text-2); font-size: var(--fs-2); margin-top: 3px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.effort { display: inline-flex; gap: 3px; }
.effort i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.effort i.on { background: var(--accent-hi); }
.w-right { text-align: right; flex: none; }
.w-right b { display: block; font-size: var(--fs-4); font-weight: 800; font-variant-numeric: tabular-nums; }
.w-right span { font-size: var(--fs-1); color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px max(8px, var(--sal)) calc(var(--sab) + 6px) max(8px, var(--sar));
  background: rgba(8, 13, 28, .88); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px; font-size: var(--fs-1); font-weight: 650; letter-spacing: .02em; color: var(--text-3); text-align: center; transition: color .18s; }
.tab .ic { width: 24px; height: 24px; }
.tab.on { color: var(--accent-hi); }
.tab.on .ic { stroke-width: 2.3; }
.is-setup .tabbar { display: none; }

/* ---------- Setup ---------- */
.setup { padding: calc(var(--sat) + 24px) 0 24px; }
.setup-hero { text-align: center; margin-bottom: 22px; }
.hero-mark { display: block; width: 112px; height: 112px; object-fit: contain; margin: 0 auto 12px; }
.setup-hero h1 { font-size: var(--fs-6); font-weight: 800; letter-spacing: -.035em; }
.setup-hero p { color: var(--text-2); font-size: var(--fs-3); margin-top: 4px; }
.setup .form { margin-bottom: 8px; }
.fine { color: var(--text-3); font-size: var(--fs-2); text-align: center; margin-top: 14px; line-height: 1.45; }
.fine.left { text-align: left; color: var(--text-2); margin-top: 10px; }
.setup-restore { display: flex; gap: 8px; margin: 8px auto 0; justify-content: center; }
.setup-restore .ic { width: 18px; height: 18px; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.swatch { height: 44px; border-radius: 12px; background: var(--sw); display: grid; place-items: center; color: #fff; position: relative; transition: transform .15s var(--ease); }
.swatch[data-value="#D5DAE3"], .swatch[data-value="#F4F4F5"], .swatch[data-value="#FBBF24"], .swatch[data-value="#F97316"], .swatch[data-value="#22C55E"] { color: rgba(1, 8, 42, .85); }
.pos-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pos-pick .chip-btn { min-width: 0; padding: 0 2px; font-size: var(--fs-2); }
.set-group .pos-pick .chip-btn:not(.on) { background: var(--surface-2); }
.swatch:active { transform: scale(.94); }
.swatch .ic { width: 22px; height: 22px; stroke-width: 3; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.swatch.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.swatch.on .ic { opacity: 1; transform: none; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span { font-size: var(--fs-2); font-weight: 700; color: var(--text-2); }
.field input:not(.switch), .field textarea, .min-custom, .share-text {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: var(--fs-3); color: var(--text); outline: none; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
.sheet .field input:not(.switch), .sheet .field textarea, .sheet .min-custom { background: var(--bg); }
.field textarea, .share-text { resize: none; line-height: 1.4; }
.field input::placeholder, .field textarea::placeholder, .score input::placeholder { color: var(--text-3); }
.field input:focus, .field textarea:focus, .min-custom:focus, .score input:focus { border-color: rgba(var(--accent-hi-rgb), .75); box-shadow: 0 0 0 3px rgba(var(--accent-hi-rgb), .2); }
.field input[type="date"], .field input[type="time"] { display: block; text-align: left; min-width: 0; }
input::-webkit-date-and-time-value { text-align: left; }
input::-webkit-calendar-picker-indicator { filter: invert(.8); opacity: .7; }
.at-field { position: relative; }
.at-field b { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-weight: 700; pointer-events: none; }
.at-field input { padding-left: 34px !important; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: var(--loss); font-size: var(--fs-2); font-weight: 650; }
.form[data-type] .only-game, .form[data-type] .only-other, .form[data-type] .only-practice { display: none; }
.form[data-type="game"] .only-game, .form[data-type="other"] .only-other, .form[data-type="practice"] .only-practice { display: flex; }
.form .only-shots { display: none; }
.form[data-shots="1"] .only-shots { display: flex; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 0 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-2); font-weight: 650; }
.toggle-row span { display: inline-flex; align-items: center; gap: 10px; }
.toggle-row .ic { color: var(--accent-hi); width: 20px; height: 20px; }
.switch { -webkit-appearance: none; appearance: none; width: 51px; height: 31px; border-radius: 99px; background: var(--surface-3); position: relative; flex: none; cursor: pointer; transition: background .2s; outline: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .35); transition: transform .22s var(--ease); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.repeat { gap: 12px; }
.repeat-body { display: none; flex-direction: column; gap: 12px; }
.form[data-repeat="1"] .repeat-body { display: flex; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day { height: 46px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2); font-weight: 750; font-size: var(--fs-2); text-align: center; color: var(--text-2); }
.day.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.repeat-count { font-size: var(--fs-2); font-weight: 700; color: var(--accent-hi); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { min-height: 46px; min-width: 52px; padding: 0 14px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line-2); font-weight: 750; font-size: var(--fs-3); text-align: center; font-variant-numeric: tabular-nums; }
.chip-btn.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.mins { display: flex; align-items: center; gap: 8px; }
.mins .chips { flex: 1; flex-wrap: nowrap; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mins .chip-btn { min-width: 0; padding: 0 4px; }
.min-custom { width: 76px !important; flex: none; text-align: center; min-height: 46px !important; padding: 8px !important; font-weight: 700; }
.min-custom::placeholder { color: var(--text-3); font-weight: 600; font-size: var(--fs-2); }
.wtypes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 10px 4px; border-radius: 16px;
  background: var(--bg); border: 1px solid var(--line-2); font-size: var(--fs-2); font-weight: 700; text-align: center; color: var(--text-2); transition: transform .14s var(--ease); }
.wt:active { transform: scale(.95); }
.wt .ic { color: var(--text); }
.wt.on { background: rgba(var(--accent-hi-rgb), .14); border-color: var(--accent-hi); color: var(--text); }
.wt.on .ic { color: var(--accent-hi); }
.effort-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.effort-pick button { height: 50px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-2); font-weight: 800; font-size: var(--fs-3); text-align: center; color: var(--text-2); }
.effort-pick button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.effort-cap { color: var(--text-2); font-size: var(--fs-2); font-weight: 650; }
.shots-row { display: flex; align-items: flex-end; gap: 8px; }
.score { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.score span { font-size: var(--fs-2); font-weight: 700; color: var(--text-2); text-align: center; }
.score input { width: 100%; height: 72px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line-2); text-align: center; font-size: var(--fs-6); font-weight: 800;
  letter-spacing: -.03em; color: var(--text); outline: none; -webkit-appearance: none; appearance: none; font-variant-numeric: tabular-nums; }
.score.sm input { height: 56px; font-size: var(--fs-5); }
.score-row { display: flex; align-items: flex-end; gap: 10px; }
.score-dash { font-size: var(--fs-5); font-weight: 700; color: var(--text-3); padding-bottom: 16px; }
.shots-row .score-dash { padding-bottom: 10px; font-size: var(--fs-4); }
.shot-pct { width: 64px; flex: none; text-align: center; padding-bottom: 8px; }
.shot-pct b { display: block; font-size: var(--fs-4); font-weight: 800; color: var(--accent-hi); font-variant-numeric: tabular-nums; }
.shot-pct span { font-size: var(--fs-1); font-weight: 750; color: var(--text-2); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Sheets ---------- */
#sheets { position: relative; z-index: 50; }
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap:not(.open) { pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .28s; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: calc(100% - var(--sat) - 18px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--surface); border-radius: 26px 26px 0 0; padding: 6px max(16px, var(--sar)) calc(var(--sab) + 20px) max(16px, var(--sal));
  transform: translateY(104%); transition: transform .32s var(--ease); box-shadow: 0 -20px 50px rgba(0, 0, 0, .5); }
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.k-full .sheet { max-height: none; height: 100%; border-radius: 0; background: var(--bg); padding-top: calc(var(--sat) + 4px); box-shadow: none; }
.sheet-wrap.k-dialog { align-items: center; padding: 24px; }
.sheet-wrap.k-dialog .sheet { max-width: 340px; border-radius: 22px; padding: 22px 18px 18px; transform: scale(.94); opacity: 0; transition: transform .22s var(--ease), opacity .18s; }
.sheet-wrap.k-dialog.open .sheet { transform: none; opacity: 1; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 4px auto 2px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; }
.sheet-head h3 { flex: 1; text-align: center; font-size: var(--fs-3); font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head .sp { width: 64px; flex: none; }
.txt-btn { min-height: 44px; min-width: 64px; padding: 0 4px; color: var(--text-2); font-weight: 600; font-size: var(--fs-3); }
.txt-btn:first-child { text-align: left; }
.txt-btn:last-child { text-align: right; }
.txt-btn.strong { color: var(--accent-hi); font-weight: 750; }
.sheet-sub { color: var(--text-2); font-size: var(--fs-2); margin: -4px 0 12px; text-align: center; }
.dlg h3 { font-size: var(--fs-4); font-weight: 800; text-align: center; letter-spacing: -.01em; line-height: 1.15; }
.dlg p { color: var(--text-2); font-size: var(--fs-2); text-align: center; margin-top: 8px; }
.dlg-btns { display: grid; gap: 8px; margin-top: 18px; }

/* Event detail */
.detail { display: flex; flex-direction: column; gap: 12px; padding: 10px 0 4px; }
.detail-kicker { display: flex; align-items: center; justify-content: space-between; }
.pill-type.game { background: var(--accent); color: var(--accent-ink); }
.pill-type.practice, .pill-type.other { background: var(--surface-3); color: var(--text); }
.detail-title { font-size: var(--fs-6); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; overflow-wrap: anywhere; }
.detail-meta { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: var(--fs-3); }
.detail-meta div { display: flex; align-items: center; gap: 8px; }
.detail-meta .ic { width: 18px; height: 18px; }
.notes { background: var(--bg); border-radius: 14px; padding: 12px 14px; color: var(--text); font-size: var(--fs-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-game { display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.row-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg); border-radius: 16px; min-height: 60px; }
.rc-l { font-size: var(--fs-1); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); width: 46px; flex: none; }
.rc-m { flex: 1; font-weight: 750; font-size: var(--fs-2); font-variant-numeric: tabular-nums; }
.rc-r { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--accent-hi); font-weight: 700; font-size: var(--fs-2); }
.rc-r .ic { width: 18px; height: 18px; }
/* Per-game summary in the event detail: yards + TDs, then one line per area that has numbers. */
.sum-card { flex-direction: column; align-items: stretch; gap: 10px; }
.sum-top { display: flex; align-items: baseline; gap: 14px; }
.sum-top .rc-l { align-self: center; }
.sum-big { font-size: var(--fs-1); font-weight: 800; letter-spacing: .1em; color: var(--text-2); white-space: nowrap; }
.sum-big b { font-size: var(--fs-5); letter-spacing: -.03em; color: var(--accent-hi); font-variant-numeric: tabular-nums; margin-right: 2px; }
.sum-big + .sum-big b { color: var(--text); }
.sum-top .rc-r { align-self: center; }
.sum-lines { display: grid; gap: 6px; }
.sum-lines div { display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: baseline; }
.sum-lines span { font-size: var(--fs-1); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.sum-lines b { font-size: var(--fs-2); font-weight: 650; line-height: 1.35; font-variant-numeric: tabular-nums; }
.sum-lines i { font-style: normal; white-space: nowrap; } /* lines break only after a comma, never inside "long 34" */

/* Stat picker */
.pick-label { font-size: var(--fs-1); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin: 16px 2px 8px; }
.pick-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; padding: 10px 12px 10px 14px; margin-bottom: 8px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.pick-row.today { border-color: rgba(var(--accent-hi-rgb), .55); background: rgba(var(--accent-hi-rgb), .08); }
.pick-row > .ic { color: var(--text-3); width: 18px; height: 18px; }
.pr-main { flex: 1; min-width: 0; }
.pr-main b { display: block; font-size: var(--fs-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-main span { font-size: var(--fs-2); color: var(--text-2); }
.form.adhoc { padding-bottom: 0; }

/* Stat sheet */
.ss { max-width: 560px; margin: 0 auto; padding-bottom: 8px; }
.ss-head { display: flex; align-items: center; gap: 10px; min-height: 54px; }
.ss-title { flex: 1; min-width: 0; text-align: center; }
.ss-title b { display: block; font-size: var(--fs-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-title span { font-size: var(--fs-2); color: var(--text-2); }
.ss-score { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin: 6px 0 12px; border-radius: 20px;
  background: radial-gradient(120% 160% at 0% 0%, rgba(var(--accent-hi-rgb), .2) 0%, transparent 60%), var(--surface); border: 1px solid var(--line); }
.ss-pts { display: flex; flex-direction: column; align-items: center; min-width: 78px; }
.ss-pts b { display: inline-block; font-size: var(--fs-7); font-weight: 800; line-height: .95; letter-spacing: -.045em; color: var(--accent-hi); font-variant-numeric: tabular-nums; }
.ss-pts span { font-size: var(--fs-1); font-weight: 800; letter-spacing: .14em; color: var(--text-2); margin-top: 2px; }
.ss-lines { flex: 1; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 4px; text-align: center; }
.ss-lines span { display: block; font-size: var(--fs-1); font-weight: 800; letter-spacing: .1em; color: var(--text-2); }
.ss-lines b { font-size: var(--fs-4); font-weight: 750; font-variant-numeric: tabular-nums; }
.ss-label { font-size: var(--fs-1); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin: 2px 2px 8px; }
/* Offense: Carry is the big one (full width, team color); Catch and Return share a row. */
.ss-plays { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.sbtn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; padding: 0 16px; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--line-2); }
.sbtn.main { grid-column: 1 / -1; min-height: 76px; background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.sbtn-l { min-width: 0; }
.sbtn-l b { display: block; font-size: var(--fs-3); font-weight: 800; line-height: 1.1; }
.sbtn.main .sbtn-l b { font-size: var(--fs-4); }
.sbtn-l small { display: block; font-size: var(--fs-1); font-weight: 750; letter-spacing: .1em; text-transform: uppercase; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbtn-c { font-size: var(--fs-5); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; display: inline-block; }
.sbtn.main .sbtn-c { font-size: var(--fs-6); }
/* Defense: Tackle full width, then a 3x2 grid. Mistakes: two rose-tinted buttons. */
.ss-other { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ss-other.two { grid-template-columns: 1fr 1fr; }
.obtn { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 68px; padding: 0 4px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); }
.obtn b { display: inline-block; font-size: var(--fs-5); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.obtn span { font-size: var(--fs-1); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin-top: 4px; text-align: center; }
.obtn.wide { grid-column: 1 / -1; flex-direction: row-reverse; justify-content: space-between; min-height: 64px; padding: 0 16px; background: var(--surface-2); }
.obtn.wide span { font-size: var(--fs-3); letter-spacing: 0; text-transform: none; color: var(--text); margin: 0; }
.obtn.oops { min-height: 60px; flex-direction: row-reverse; justify-content: space-between; padding: 0 16px; border-color: rgba(251, 113, 133, .3); }
.obtn.oops span { margin: 0; color: var(--loss); }
.obtn.oops b { font-size: var(--fs-4); }
.sbtn::after, .obtn::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.pop { animation: press .22s var(--ease); }
.pop::after { animation: flash .35s ease-out; }
.bump { animation: bump .28s var(--ease); }
@keyframes press { 0% { transform: scale(1); } 35% { transform: scale(.94); } 100% { transform: scale(1); } }
@keyframes flash { 0% { opacity: .22; } 100% { opacity: 0; } }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.22); } 100% { transform: scale(1); } }
.stepper { display: flex; align-items: center; gap: 4px; padding: 3px 4px 3px 12px; min-height: 58px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-2); }
.stepper > span { font-size: var(--fs-1); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin-right: 2px; }
.stepper b { min-width: 34px; text-align: center; font-size: var(--fs-4); font-weight: 800; font-variant-numeric: tabular-nums; }
.step { width: 44px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); }
.step:active { transform: scale(.92); }
.stepper.sm { min-height: 50px; background: transparent; border: 0; padding: 0; }
.stepper.sm .step { height: 42px; }
.btn.undo { min-height: 58px; border-radius: 18px; justify-content: flex-start; gap: 10px; padding: 0 14px; text-align: left; margin-bottom: 8px; }
.btn.undo span { display: flex; flex-direction: column; min-width: 0; }
.btn.undo b { font-size: var(--fs-2); white-space: nowrap; }
.btn.undo small { font-size: var(--fs-1); font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-result { min-height: 52px; }
.ss-result .ic { color: var(--warn); }

/* Yards picker (bottom sheet over the stat sheet): TD toggle, 12 yard chips, a typed box for anything else. */
.yd { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 6px; }
.td-toggle { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-height: 60px; padding: 8px 14px;
  border-radius: 16px; background: var(--bg); border: 1px solid var(--line-2); text-align: left; transition: background .15s, border-color .15s; }
.td-box { grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line-2); display: grid; place-items: center; }
.td-box .ic { width: 18px; height: 18px; stroke-width: 3; opacity: 0; }
.td-toggle b { font-size: var(--fs-3); font-weight: 800; }
.td-toggle small { font-size: var(--fs-2); color: var(--text-2); }
.td-toggle.on { background: var(--accent-2); border-color: transparent; color: var(--accent-2-ink); }
.td-toggle.on small { color: var(--accent-2-ink); opacity: .75; }
.td-toggle.on .td-box { background: var(--accent-2-ink); border-color: var(--accent-2-ink); color: var(--accent-2); }
.td-toggle.on .td-box .ic { opacity: 1; }
.yd-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.yd-chip { min-height: 58px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: var(--fs-4); font-weight: 800; letter-spacing: -.02em;
  text-align: center; font-variant-numeric: tabular-nums; transition: transform .12s var(--ease), opacity .15s; }
.yd-chip:active:not(:disabled) { transform: scale(.94); background: var(--accent); color: var(--accent-ink); }
.yd-chip.neg { color: var(--loss); }
.yd-chip:disabled { opacity: .25; }
.yd-other { display: grid; grid-template-columns: 58px 1fr auto; gap: 8px; }
.yd-sign { min-height: 54px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: var(--fs-5); font-weight: 800; text-align: center; line-height: 1; }
.yd-sign.neg { color: var(--loss); border-color: rgba(251, 113, 133, .45); }
.yd-other input { min-width: 0; min-height: 54px; padding: 0 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-2); font-size: var(--fs-4); font-weight: 800;
  text-align: center; color: var(--text); outline: none; -webkit-appearance: none; appearance: none; font-variant-numeric: tabular-nums; }
.yd-other input::placeholder { color: var(--text-3); font-size: var(--fs-3); font-weight: 600; }
.yd-other input:focus { border-color: rgba(var(--accent-hi-rgb), .75); box-shadow: 0 0 0 3px rgba(var(--accent-hi-rgb), .2); }
.yd-other .btn { min-height: 54px; }

/* Settings */
.settings { max-width: 560px; margin: 0 auto; padding-bottom: 20px; }
.set-label { font-size: var(--fs-1); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin: 22px 4px 8px; }
.set-group { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.set-group.pad { padding: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row > span { font-weight: 600; flex: none; }
.set-row input { flex: 1; min-width: 0; height: 52px; text-align: right; background: transparent; border: 0; outline: none; font-size: var(--fs-3); color: var(--text); padding-right: 8px; }
.set-row input::placeholder { color: var(--text-3); }
.set-row input:focus { color: var(--accent-hi); }
.demo-note { text-align: center; font-size: var(--fs-2); color: var(--warn); margin-top: 4px; }
.share-text { min-height: 180px; }

/* Toast */
#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--sab) + 18px); z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 99px; background: #F5F5F7; color: #0B0B0F; font-weight: 700; font-size: var(--fs-2); text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); transition: transform .25s var(--ease), opacity .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Small phones (iPhone SE / 8 at 375x667) */
@media (max-width: 380px) {
  .top h1, .next-title { font-size: var(--fs-5); }
  .jersey-n { font-size: var(--fs-6); }
  .jersey small { font-size: var(--fs-4); }
  .tile-v { font-size: var(--fs-4); }
  .tile-v.long { font-size: var(--fs-3); line-height: 1.3; }
  .qa { font-size: var(--fs-1); letter-spacing: .02em; }
  .sbtn { min-height: 58px; }
  .obtn { min-height: 62px; }
  .obtn span { letter-spacing: .06em; }
  .stepper { padding-left: 10px; }
  .step { width: 40px; }
  .btn.undo { padding: 0 12px; gap: 8px; }
  .yd-chip { min-height: 54px; }
}
@media (max-height: 700px) {
  .ss-score { padding: 8px 14px; margin-bottom: 8px; }
  .sbtn { min-height: 54px; }
  .sbtn.main { min-height: 64px; }
  .obtn { min-height: 56px; }
  .obtn b { font-size: var(--fs-4); }
  .ss-plays, .ss-other { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- StatJacket additions ---------- */
.chip.tie { background: rgba(163, 174, 198, .16); color: var(--text-2); }
.hexbox { display: block; margin-top: 10px; }
.hexbox > span { display: block; font-size: var(--fs-2); color: var(--text-2); margin-bottom: 6px; }
.hexbox input { text-transform: uppercase; }
.logo-row { display: flex; align-items: center; gap: 14px; }
.logo-prev { width: 56px; height: 56px; object-fit: contain; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); flex: none; }
.logo-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-btns .btn { min-height: 46px; }
.set-group .logo-field { margin: 0; }
.ss-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.ss-shots3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ss-shots3 .sbtn { padding: 0 12px; min-height: 60px; }
.sbtn.made { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.sbtn.miss { background: var(--surface-2); border: 1px solid var(--line-2); }
.obtn.warn { border-color: rgba(251, 191, 36, .6); }
.obtn.warn b, .obtn.warn span { color: var(--warn); }
.obtn.good { border-color: rgba(var(--accent-hi-rgb), .45); }
.ss-other.four { grid-template-columns: repeat(4, 1fr); }
.ss-other.two { grid-template-columns: 1fr 1fr; }
.ss-bottom { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-bottom: 8px; }
.shooting { display: grid; gap: 14px; padding: 16px; }
.shoot-top { display: flex; align-items: baseline; justify-content: space-between; }
.shoot-top span { font-size: var(--fs-1); font-weight: 800; letter-spacing: .1em; color: var(--text-2); }
.shoot-top b { font-size: var(--fs-4); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; border-radius: 8px; background: var(--accent-hi); }
.shoot small { color: var(--text-3); font-size: var(--fs-1); font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 380px) { .swatches { grid-template-columns: repeat(4, 1fr); } .ss-other.four { grid-template-columns: repeat(2, 1fr); } }
.ss-other.five { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ss-other.five .obtn { padding: 0 2px; }
.ss-other:not(.two):not(.four) .obtn.oops, .ss-other.four .obtn.oops, .ss-other.five .obtn.oops { flex-direction: column; justify-content: center; padding: 0 4px; min-height: 68px; }
.ss-other:not(.two) .obtn.oops b { font-size: var(--fs-5); }
.ss-other:not(.two) .obtn.oops span { margin-top: 4px; text-align: center; }
a.btn { text-decoration: none; }

/* ======================================================================================================================
   Varsity polish layer (DESIGN.md). Dark base, team color as the accent, athletic numerals, cards with depth.
   Energy = motion + color. Everything here sits after the base rules so it wins; reduced-motion switches the motion off.
   ====================================================================================================================== */
:root {
  --font-num: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, .055) 0%, rgba(255, 255, 255, .012) 100%);
  --card-edge: inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 0 0 1px rgba(255, 255, 255, .02);
  --card-lift: 0 14px 26px -18px rgba(0, 0, 0, .9);
}
/* numerals: condensed, italic, heavy: scoreboard energy without cartoon shapes */
.jersey-n, .tile-v, .stat b, .high b, .last-nums b, .log-pts b, .ss-pts b, .sbtn-c, .obtn b, .ring-n, .sum-big b, .ev-date b, .log-date b, .w-right b, .shoot-top b, .ss-lines b, .stepper b {
  font-family: var(--font-num); font-style: italic; letter-spacing: -.01em; }
.jersey-n { font-weight: 900; font-size: 76px; line-height: .8; letter-spacing: -.03em; text-shadow: 0 0 28px rgba(var(--accent-hi-rgb), .45); animation: numIn .55s var(--ease) both; }
.jersey small { font-style: normal; font-size: var(--fs-4); font-weight: 800; opacity: .6; margin-right: 3px; vertical-align: 18px; }
.tile-v { font-weight: 900; font-size: 33px; letter-spacing: -.01em; }
.tile-v.long { font-size: var(--fs-4); line-height: 1.2; }
.stat b, .high b { font-weight: 900; font-size: 33px; }
.last-nums b, .log-pts b { font-weight: 850; }
.ss-pts b { font-weight: 900; font-size: 64px; text-shadow: 0 0 26px rgba(var(--accent-hi-rgb), .4); }
.sbtn-c { font-weight: 900; font-size: 32px; }
.obtn b { font-weight: 900; font-size: 32px; }
@keyframes numIn { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }

/* cards with depth: subtle gradient, inner line, soft accent glow on the hero pieces */
.card, .tile, .qa, .ev-row, .log-row, .w-row, .high, .stepper, .set-group, .pick-row, .obtn, .seg {
  background-image: var(--card-bg); box-shadow: var(--card-edge), var(--card-lift); }
.ev-row.past { background-image: none; box-shadow: var(--card-edge); }
.obtn.wide, .sbtn { box-shadow: var(--card-edge); }
.sbtn.main { background-image: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 60%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 16px 30px -16px rgba(var(--accent-rgb), .75); }
.sbtn.made { background-image: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 60%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 12px 24px -14px rgba(var(--accent-rgb), .7); }
.btn.primary { background-image: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 12px 26px -14px rgba(var(--accent-rgb), .8); }
.ss-score { box-shadow: var(--card-edge), 0 18px 34px -22px rgba(var(--accent-rgb), .7); }
.next:not(.practice):not(.other):not(.empty) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 22px 40px -24px rgba(var(--accent-rgb), .85); }
.next.practice, .next.other, .next.empty { box-shadow: var(--card-edge), 0 18px 34px -24px rgba(var(--accent-hi-rgb), .45); }
.next-title { font-family: var(--font-num); font-style: italic; font-weight: 900; font-size: 44px; line-height: .98; letter-spacing: -.01em; }
/* the quiet gradient sweep on Next Up */
.next::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .13) 50%, transparent 62%); transform: translateX(-130%); animation: sweep 7s ease-in-out 1.2s infinite; }
@keyframes sweep { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.kicker { letter-spacing: .14em; }
.sec-head h2 { color: var(--text-2); }
.sec-head h2::before { content: ""; display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--accent); margin-right: 8px; vertical-align: 3px; }
.tabbar { box-shadow: 0 -12px 30px -20px rgba(0, 0, 0, .9); }
.tab { position: relative; }
.tab.on::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 4px 4px; background: var(--accent); box-shadow: 0 6px 16px rgba(var(--accent-rgb), .8); }
.qi { box-shadow: inset 0 0 0 1px rgba(var(--accent-hi-rgb), .22); }

/* numbers pop when a stat is logged */
.bump { animation: bump .34s var(--ease); }
@keyframes bump { 0% { transform: scale(1); text-shadow: 0 0 0 transparent; } 30% { transform: scale(1.34); text-shadow: 0 0 22px rgba(var(--accent-hi-rgb), .9); } 100% { transform: scale(1); } }
.pop::after { animation: flash .4s ease-out; }
.sbtn.main.pop::after, .sbtn.made.pop::after { animation-name: flash; }

/* tab switch: a short crossfade */
#view.enter { animation: viewFade .2s ease-out; }
@keyframes viewFade { from { opacity: 0; } to { opacity: 1; } }

/* empty states: one line + one button */
.empty-state { padding: 44px 24px 24px; }
.empty-state .ic.big { width: 52px; height: 52px; padding: 12px; box-sizing: content-box; border-radius: 22px; background: rgba(var(--accent-hi-rgb), .12); box-shadow: inset 0 0 0 1px rgba(var(--accent-hi-rgb), .28); margin-bottom: 16px; }
.es-line { color: var(--text); font-size: var(--fs-3); font-weight: 650; max-width: 280px; margin: 0 auto 20px; line-height: 1.35; }
.empty-state .btn.lg { min-width: 220px; }

/* ---------- Onboarding ---------- */
.is-onb #view { max-width: 520px; }
.onb { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--sat) + 14px) 0 calc(var(--sab) + 22px); }
.onb-top { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.onb-mark { width: 34px; height: 34px; object-fit: contain; }
.onb-name { flex: 1; font-weight: 800; letter-spacing: -.02em; }
.txt-btn { min-height: 44px; min-width: 44px; padding: 0 8px; font-weight: 700; font-size: var(--fs-2); color: var(--text-2); }
.onb-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; margin: 0 -16px; }
.onb-track::-webkit-scrollbar { display: none; }
.onb-slide { flex: 0 0 100%; scroll-snap-align: center; padding: 0 16px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.onb-art { border-radius: 28px; padding: 22px 20px; margin-bottom: 18px; background: radial-gradient(120% 120% at 100% 0%, rgba(var(--accent-rgb), .3) 0%, transparent 62%), var(--surface);
  box-shadow: var(--card-edge), 0 24px 40px -26px rgba(var(--accent-rgb), .6); border: 1px solid var(--line-2); }
.onb-art svg { display: block; width: 100%; height: auto; max-height: 40vh; }
.onb-slide h2 { font-family: var(--font-num); font-style: italic; font-weight: 900; font-size: 42px; line-height: 1; letter-spacing: -.01em; text-transform: uppercase; }
.onb-slide p { color: var(--text-2); font-size: var(--fs-3); max-width: 340px; line-height: 1.4; }
.onb-dots { display: flex; justify-content: center; gap: 8px; margin: 14px 0 16px; }
.onb-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--surface-3); transition: width .25s var(--ease), background .25s; }
.onb-dots i.on { width: 26px; background: var(--accent); }
.o-f { fill: var(--accent); } .o-s { fill: var(--surface-3); } .o-b { fill: rgba(var(--accent-hi-rgb), .38); } .o-line { fill: var(--accent-ink); opacity: .85; } .o-line2 { fill: var(--accent-ink); opacity: .35; }
.o-ti, .o-tx, .o-cap { font: 800 15px var(--font-num); letter-spacing: .1em; } .o-ti { fill: var(--accent-ink); } .o-tx { fill: var(--text); font-size: 17px; } .o-cap { fill: var(--text-2); }
.o-ni { font: italic 900 46px var(--font-num); fill: var(--accent-ink); } .o-nx { font: italic 900 34px var(--font-num); fill: var(--text); }
.o-big { font: italic 900 70px var(--font-num); fill: var(--accent-hi); } .o-card { font: italic 900 70px var(--font-num); fill: var(--accent-ink); }
.o-r1 { fill: rgba(255, 255, 255, .85); } .o-r2 { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 3; animation: ripple 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.o-ar { fill: none; stroke: var(--text); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes ripple { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .next::before { display: none; } .jersey-n { animation: none; } }

/* Fills that carry text use --accent-fill (the team color darkened just enough for 4.5:1 text). */
.btn.primary, .sbtn.main, .sbtn.made, .icon-btn.accent, .pill-type.game, .jersey-pos { background-color: var(--accent-fill); }
.next:not(.practice):not(.other):not(.empty) { background: linear-gradient(135deg, rgb(var(--accent-fill-rgb)) 0%, rgba(var(--accent-fill-rgb), .8) 100%); }
.next.practice .pill-type, .next.other .pill-type, .next.empty .pill-type { color: var(--text); }
.ev-row.game .ev-date span, .ev-row.today .ev-date span { color: var(--text); }
