/* SCOZI design system
   Layout: one column, phone first, max 760px. The SCOZI shell is charcoal + volt; the team's own color
   shows up only where the team does (name chip, jersey chips, their side of the scoreboard). */
:root {
  --ink: #121417;        /* floor */
  --ink-2: #1A1D23;      /* raised panels */
  --ink-3: #23272F;      /* pressed / inputs */
  --line: #2F343D;
  --chalk: #F5F6F1;      /* primary text */
  --dust: #9AA1AC;       /* secondary text */
  --volt: #D9FF3D;       /* SCOZI brand */
  --volt-ink: #121417;   /* text on volt */
  --hot: #FF4D5A;        /* live, danger */
  --team: #FF7A1A;       /* replaced per team */
  --team-ink: #121417;
  --board: #0A0C0F;      /* scoreboard black */
  --display: 'Anton', 'Arial Narrow', Impact, sans-serif;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, sans-serif;
  --r: 6px; --r-lg: 14px;
  --tabs-h: 64px;
  --slant: -8deg;
  --cut: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  color-scheme: dark;
  /* legacy aliases used by older rules and inline styles */
  --bg: var(--ink); --raised: var(--ink-2); --text: var(--chalk); --muted: var(--dust); --accent: var(--volt); --on-accent: var(--volt-ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--chalk);
  font: 17px/1.45 var(--body);
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 24px);
  min-height: 100vh;
}
a { color: var(--volt); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--volt); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--volt); color: var(--volt-ink); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* court-line art used behind heroes and the welcome screen */
.court-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 260' fill='none' stroke='%23D9FF3D' stroke-width='2' stroke-opacity='.14'%3E%3Cpath d='M20 0v260M380 0v260'/%3E%3Cpath d='M60 0a140 140 0 0 0 280 0'/%3E%3Crect x='140' y='0' width='120' height='120'/%3E%3Ccircle cx='200' cy='120' r='40'/%3E%3Ccircle cx='200' cy='28' r='8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right -40px top -10px; background-size: 420px auto;
}

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--chalk); text-decoration: none; min-width: 0; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.wordmark { font: 400 22px/1 var(--display); color: var(--volt); letter-spacing: .04em; transform: skewX(var(--slant)); display: inline-block; }
.brand-name { font: 700 15px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .04em; color: var(--chalk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 10px; border-left: 2px solid var(--team); }
.brand-name:empty { display: none; }
.coach-link { flex: none; color: var(--chalk); text-decoration: none; font: 700 14px/1 var(--cond); text-transform: uppercase; letter-spacing: .06em; padding: 9px 12px; background: var(--ink-3); clip-path: var(--cut); }
.coach-link.on { color: var(--volt-ink); background: var(--volt); }
main { max-width: 760px; margin: 0 auto; padding: 10px 16px 0; outline: none; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--board); border-top: 1px solid var(--line);
}
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font: 700 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .06em; color: var(--dust); text-decoration: none; }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabs a.on { color: var(--volt); }
.tabs a.on::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; background: var(--volt); }
.badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--hot); color: #fff; font: 700 11px/18px var(--body); text-align: center; }
@media (min-width: 820px) {
  body { padding-bottom: 40px; }
  .tabs { position: sticky; top: 58px; bottom: auto; height: auto; max-width: 760px; margin: 0 auto; border: 0; background: transparent; padding: 0 16px; gap: 6px; }
  .tabs a { flex-direction: row; font-size: 14px; padding: 12px 0; border-bottom: 2px solid transparent; }
  .tabs a.on { border-color: var(--volt); } .tabs a.on::before { display: none; }
  .badge { position: static; margin-left: 6px; }
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: .95; margin: 0; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: 46px; margin: 14px 0 14px; text-transform: uppercase; }
h2 { font-size: 26px; margin: 30px 0 12px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
h2::before { content: ""; width: 8px; height: 26px; background: var(--volt); transform: skewX(var(--slant)); flex: none; }
h2.tight { margin: 0 0 6px; }
h3 { font-size: 22px; text-transform: uppercase; }
p { margin: 0 0 12px; }
.muted { color: var(--dust); }
.small { font-size: 14px; }
.num { font-family: var(--display); font-weight: 400; font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.eyebrow { font: 700 13px/1 var(--cond); text-transform: uppercase; letter-spacing: .12em; color: var(--dust); }

/* ---------- hero board (home) ---------- */
.board {
  position: relative; overflow: hidden;
  margin: 6px -16px 0; padding: 22px 20px 24px;
  background: var(--ink-2); border-bottom: 4px solid var(--volt);
}
.board.court-bg { background-color: var(--ink-2); }
@media (min-width: 600px) { .board { margin: 6px 0 0; border-radius: var(--r-lg); } }
.board .when { font: 700 13px/1 var(--cond); text-transform: uppercase; letter-spacing: .12em; color: var(--dust); display: flex; align-items: center; gap: 8px; }
.board .matchup { font: 400 clamp(52px, 14vw, 88px)/.86 var(--display); margin: 12px 0 8px; text-transform: uppercase; transform: skewX(var(--slant)); transform-origin: left; }
.board .matchup .vs { display: block; font: 700 .34em/1.2 var(--cond); color: var(--volt); letter-spacing: .14em; margin: 4px 0 2px; }
.board .matchup .us { color: var(--team); }
.board .where { font-size: 16px; }
.countdown { display: flex; gap: 18px; margin-top: 18px; }
.countdown b { display: block; font: 400 44px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--volt); }
.countdown span { font: 700 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .1em; color: var(--dust); }
.board .final { font: 400 76px/1 var(--display); margin: 10px 0 4px; font-variant-numeric: tabular-nums; }
.board.live { background-color: var(--board); border-color: var(--hot); }
.board.live .live-score { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 6px; }
.board.live .live-score span { display: block; font: 700 14px/1 var(--cond); text-transform: uppercase; letter-spacing: .08em; color: var(--dust); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board.live .live-score b { font: 400 clamp(72px, 24vw, 110px)/.9 var(--display); font-variant-numeric: tabular-nums; color: var(--volt); }
.board.live .live-score div:first-child b { color: var(--chalk); }
.board.live .live-score div:first-child span { color: var(--team); }

.record { display: flex; gap: 24px; margin: 22px 0 4px; align-items: flex-end; }
.record div b { display: block; font: 400 46px/1 var(--display); }
.record div span { font: 700 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .1em; color: var(--dust); }

/* ---------- tags, status ---------- */
.tag { display: inline-block; font: 700 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .08em; padding: 4px 8px; border-radius: 3px; border: 1px solid var(--line); color: var(--dust); margin-left: 6px; vertical-align: 2px; }
.tag.live { background: var(--hot); color: #fff; border-color: var(--hot); padding-left: 18px; position: relative; }
.tag.live::before { content: ""; position: absolute; left: 7px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- rows: ticket-stub schedule ---------- */
.rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 0 12px 0 0; color: var(--chalk); text-decoration: none; background: var(--ink-2); border-radius: var(--r); overflow: hidden; min-height: 64px; }
.row .date { align-self: stretch; display: grid; place-content: center; text-align: center; line-height: 1; border-right: 2px dashed var(--line); padding: 8px 4px; background: var(--ink-3); }
.row .date b { display: block; font: 400 28px/1 var(--display); }
.row .date span { font: 700 11px/1.3 var(--cond); text-transform: uppercase; letter-spacing: .1em; color: var(--dust); }
.row .title { font-weight: 700; }
.row .sub { color: var(--dust); font-size: 14px; }
.row .res { font: 400 24px/1 var(--display); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.res .W { color: var(--volt); } .res .L { color: var(--dust); }
.past { opacity: .8; }
.rows > li > .row.coach-row { padding-right: 8px; }

/* leaders */
.leaders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .leaders { grid-template-columns: repeat(4, 1fr); } }
.leaders a { background: var(--ink-2); padding: 14px; color: var(--chalk); text-decoration: none; border-radius: var(--r); border-top: 3px solid var(--team); }
.leaders b { font: 400 40px/1 var(--display); display: block; color: var(--volt); }
.leaders .k { font: 700 12px/1.3 var(--cond); text-transform: uppercase; letter-spacing: .08em; color: var(--dust); }

/* notes */
.note { padding: 14px 0; border-bottom: 1px solid var(--line); }
.note h3 { margin-bottom: 6px; text-transform: none; font-family: var(--body); font-weight: 700; font-size: 19px; }
.note .body { white-space: pre-wrap; }
.pin { color: var(--volt); font: 700 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .12em; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 15px; }
th, td { padding: 10px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--dust); font: 700 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .08em; cursor: pointer; user-select: none; }
th.sorted { color: var(--volt); }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--ink); }
td a { color: var(--chalk); text-decoration: none; font-weight: 700; }
td .jn { font: 400 16px/1 var(--display); color: var(--team); display: inline-block; min-width: 28px; }
tr.total td { font-weight: 700; border-top: 2px solid var(--line); }

.seg { display: inline-flex; max-width: 100%; overflow-x: auto; background: var(--ink-2); padding: 3px; margin-bottom: 12px; clip-path: var(--cut); }
.seg button, .seg a { background: none; border: 0; padding: 8px 14px; color: var(--dust); cursor: pointer; font: 700 14px/1 var(--cond); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; text-decoration: none; display: inline-block; }
.seg button.on, .seg a.on { background: var(--volt); color: var(--volt-ink); clip-path: var(--cut); }

/* ---------- photos ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 0 -16px; }
@media (min-width: 600px) { .grid { margin: 0; gap: 6px; grid-template-columns: repeat(4, 1fr); } }
.grid button { padding: 0; border: 0; background: var(--ink-2); aspect-ratio: 1; cursor: zoom-in; overflow: hidden; }
.grid img { width: 100%; height: 100%; object-fit: cover; }
.lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(6, 7, 9, .96); display: flex; flex-direction: column; }
.lightbox .lb-img { flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px; min-height: 0; }
.lightbox img { max-height: 100%; object-fit: contain; }
.lightbox .lb-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.lightbox .lb-cap { flex: 1; font-size: 15px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); border: 0; color: #fff; width: 44px; height: 64px; font-size: 28px; cursor: pointer; }
.lb-prev { left: 0; } .lb-next { right: 0; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border: 0; background: var(--ink-3); color: var(--chalk); text-decoration: none; cursor: pointer; font: 700 15px/1 var(--cond); text-transform: uppercase; letter-spacing: .07em; clip-path: var(--cut); }
.btn.primary { background: var(--volt); color: var(--volt-ink); }
.btn.ghost { background: transparent; color: var(--volt); clip-path: none; padding-inline: 10px; }
.btn.danger { background: color-mix(in srgb, var(--hot) 18%, var(--ink-2)); color: #FF9BA3; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.btn.big { min-height: 64px; font-size: 20px; }
.btn:disabled { opacity: .45; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
form.stack, .stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font: 700 13px/1.2 var(--cond); text-transform: uppercase; letter-spacing: .08em; color: var(--dust); }
label > input, label > select, label > textarea { font: 400 17px/1.4 var(--body); text-transform: none; letter-spacing: 0; }
input, select, textarea { width: 100%; background: var(--ink-3); border: 1px solid var(--line); border-bottom: 2px solid var(--line); border-radius: var(--r); padding: 12px; color: var(--chalk); font-size: 17px; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--volt); }
textarea { min-height: 110px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; color: var(--chalk); font: 400 16px/1.3 var(--body); text-transform: none; letter-spacing: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--volt); }
.panel { background: var(--ink-2); border-radius: var(--r-lg); padding: 18px; margin: 14px 0; }
.empty { padding: 28px 0; color: var(--dust); }
.error { color: #FF9BA3; min-height: 1.5em; font-size: 15px; }
.label-like { font: 700 13px/1.2 var(--cond); text-transform: uppercase; letter-spacing: .08em; color: var(--dust); margin-bottom: 6px; }
.linkish { all: unset; color: var(--volt); text-decoration: underline; cursor: pointer; }
details summary { cursor: pointer; font-weight: 700; }

/* ---------- welcome / gate ---------- */
.gate { display: grid; gap: 16px; max-width: 460px; margin: 0 auto; padding: 18px 0 20px; }
.gate h1 { font-size: clamp(84px, 26vw, 130px); line-height: .82; margin: 10px 0 0; transform: skewX(var(--slant)); transform-origin: left; color: var(--chalk); }
.gate .h-mid { font-size: 44px; transform: none; }
.tagline { font: 700 22px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .1em; color: var(--volt); margin: 0; }
.lede { font-size: 18px; color: var(--dust); }
.gate .panel .btn { justify-self: start; }
.big-code { font-size: 26px; letter-spacing: .14em; color: var(--volt); }
.code-in { font: 400 34px/1 var(--display); letter-spacing: .3em; text-align: center; }
.gate input#joinCode { font: 400 30px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; text-align: center; }

/* ---------- live board (game page) ---------- */
.led { background-color: var(--board); background-image: radial-gradient(circle, rgba(255,255,255,.045) 1px, transparent 1.2px); background-size: 6px 6px; }
.live-board { margin: 6px -16px 4px; padding: 16px 16px 14px; border-bottom: 4px solid var(--line); }
.live-board.is-live { border-color: var(--hot); }
@media (min-width: 600px) { .live-board { margin: 6px 0 4px; border-radius: var(--r-lg); } }
.lb-status { font: 700 13px/1 var(--cond); text-transform: uppercase; letter-spacing: .12em; color: var(--dust); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.lb-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; text-align: center; }
.lb-team span { display: block; font: 700 13px/1 var(--cond); text-transform: uppercase; letter-spacing: .08em; color: var(--dust); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-team:first-child span { color: var(--team); }
.lb-team b { display: block; font: 400 72px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--volt); margin-top: 6px; }
.lb-team small, .lb-mid small { display: block; font-size: 12px; color: var(--dust); margin-top: 4px; }
.lb-mid { padding-top: 24px; min-width: 88px; }
.lb-mid b { font: 400 34px/1 var(--display); color: var(--chalk); }
.lb-res { font: 400 44px/1 var(--display); color: var(--volt); }
.lb-note { color: var(--dust); text-align: center; margin-top: 10px; }

/* plays */
.plays { list-style: none; margin: 0; padding: 0; }
.play { display: grid; grid-template-columns: 72px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.play .pw { color: var(--dust); font: 700 13px/1 var(--cond); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.play .pt { min-width: 0; }
.play.theirs .pt { color: var(--dust); }
.play.scoring .pt { font-weight: 700; color: var(--chalk); }
.play.scoring.theirs .pt { color: var(--dust); }
.play .ps { font: 400 20px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--volt); }
.plays.keeper .play { grid-template-columns: 64px 1fr auto auto; }
.oncourt { color: var(--volt); font-size: 10px; margin-right: 4px; vertical-align: 2px; }

/* court */
.court { width: 100%; max-width: 460px; height: auto; display: block; margin: 8px auto; border-radius: var(--r); }
.court.tap { cursor: crosshair; touch-action: manipulation; }
.c-floor { fill: var(--ink-2); }
.c-lines { fill: none; stroke: color-mix(in srgb, var(--chalk) 42%, transparent); stroke-width: 3; }
.c-paint { fill: color-mix(in srgb, var(--volt) 10%, transparent); }
.c-rim { stroke: var(--volt); stroke-width: 4; }
.shot-make { fill: var(--volt); stroke: var(--ink); stroke-width: 2.5; }
.shot-miss { fill: none; stroke: var(--hot); stroke-width: 3.5; stroke-linecap: round; opacity: .85; }
.shot-make.dim, .shot-miss.dim { opacity: .18; }
.shot-pending { fill: none; stroke: var(--chalk); stroke-width: 4; stroke-dasharray: 6 5; }
.shot-filter { max-width: 320px; margin: 4px 0 6px; }

/* ---------- scorekeeper ---------- */
.sk { padding-bottom: 20px; }
.sk-head { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 10px; }
.sk-board { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; text-align: center; border-radius: var(--r-lg); padding: 16px 8px; border: 1px solid var(--line); }
.sk-side { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.sk-name { font: 700 13px/1 var(--cond); text-transform: uppercase; letter-spacing: .08em; color: var(--dust); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-side:first-child .sk-name { color: var(--team); }
.sk-side > b { font: 400 64px/1 var(--display); color: var(--volt); }
.sk-side small { font-size: 12px; color: var(--dust); }
.sk-side small.warn { color: var(--hot); font-weight: 700; }
.sk-clock { display: grid; justify-items: center; gap: 6px; padding-top: 4px; min-width: 110px; }
.sk-period { font: 700 16px/1 var(--cond); letter-spacing: .14em; color: var(--chalk); background: var(--ink-3); padding: 4px 8px; }
.clock-read { background: none; border: 0; padding: 0; font: 400 44px/1 var(--display); color: var(--chalk); cursor: pointer; font-variant-numeric: tabular-nums; }
.clock-btn { min-height: 40px; padding: 6px 14px; font-size: 13px; }
.clock-form { display: flex; align-items: center; gap: 4px; }
.clock-form input { width: 54px; padding: 6px; text-align: center; font-size: 18px; }
.sk-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.sk-row h3 { font-size: 18px; }
.sk-hint { text-align: center; color: var(--dust); font-size: 14px; min-height: 1.4em; margin: 6px 0; }
.opp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.opp-row span { flex-basis: 100%; }
.opp-row button { flex: 1; min-height: 44px; padding: 0 6px; border: 1px solid var(--line); background: var(--ink-2); color: var(--chalk); font: 700 15px/1 var(--cond); letter-spacing: .04em; cursor: pointer; clip-path: var(--cut); }

/* jersey chips */
.players-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin: 12px 0; }
.players-pick button { position: relative; min-height: 72px; border: 0; background: var(--ink-2); cursor: pointer; padding: 10px 4px 6px; border-radius: var(--r); overflow: hidden; }
.players-pick button::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--team); }
.players-pick b { font: 400 32px/1 var(--display); display: block; color: var(--chalk); }
.players-pick span { font: 700 12px/1.2 var(--cond); text-transform: uppercase; letter-spacing: .06em; color: var(--dust); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.players-pick .pf { font-family: var(--body); text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--volt); }
.players-pick button.on { background: var(--team); }
.players-pick button.on b, .players-pick button.on span, .players-pick button.on .pf { color: var(--team-ink); }
.players-pick button.on::before { background: var(--team-ink); opacity: .25; }
.players-pick.bench button { opacity: .7; }
.players-pick button.sub { outline: 2px dashed var(--line); outline-offset: -2px; }

/* stat pad */
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad.pad4 { grid-template-columns: repeat(4, 1fr); }
.pad button { min-height: 60px; border: 0; background: var(--ink-2); color: var(--chalk); font: 700 14px/1.1 var(--cond); text-transform: uppercase; letter-spacing: .06em; cursor: pointer; touch-action: manipulation; clip-path: var(--cut); }
.pad button.make { background: var(--volt); color: var(--volt-ink); font-size: 16px; }
.pad button.miss { background: var(--ink-3); color: var(--dust); }
.pad button:active { transform: scale(.97); }
.pad button:disabled { opacity: .3; }
details.quick { margin: 10px 0; }
details.quick summary { color: var(--dust); font-size: 14px; padding: 6px 0; font-weight: 400; }
details.quick .pad { grid-template-columns: repeat(4, 1fr); margin-top: 6px; }
details.quick .pad button { min-height: 48px; font-size: 13px; }
.period-actions { justify-content: center; }

/* bottom sheet */
.sheet { position: fixed; inset: 0; z-index: 45; background: rgba(6, 7, 9, .6); display: flex; align-items: flex-end; justify-content: center; }
.sheet-in { width: 100%; max-width: 520px; background: var(--ink-2); border-top: 4px solid var(--volt); padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.sheet-in.tall { max-height: 88vh; overflow-y: auto; }
.sheet-btns { display: flex; gap: 10px; }
.sheet-btns .btn { flex: 1; }

/* rotation */
.warn-text { color: var(--hot); }
.pt-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.pt-chip { font-size: 14px; padding: 4px 10px; background: var(--ink-2); border-left: 3px solid var(--team); }
.pt-chip.low { border-left-color: var(--hot); }
.rot-list { list-style: none; margin: 8px 0 0; padding: 0; }
.rot-list li { display: grid; grid-template-columns: 86px 1fr; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rot-list li.locked { opacity: .45; }
.rot-list li.current { opacity: 1; background: color-mix(in srgb, var(--volt) 10%, transparent); padding-inline: 6px; }
.rot-when { font: 700 12px/1.2 var(--cond); text-transform: uppercase; letter-spacing: .06em; color: var(--dust); font-variant-numeric: tabular-nums; }
.rot-list li.current .rot-when { color: var(--volt); }
.rot-players, .rot-swap { display: flex; flex-wrap: wrap; gap: 6px; }
.rot-swap { grid-column: 1 / -1; align-items: center; padding: 6px 0 2px; }
.rp { min-height: 34px; padding: 4px 10px; border: 0; background: var(--ink-3); color: var(--chalk); font: 700 14px/1 var(--cond); letter-spacing: .03em; cursor: pointer; clip-path: var(--cut); }
.rp:disabled { cursor: default; opacity: 1; }
.rp.on { background: var(--volt); color: var(--volt-ink); }
.rp.add, .rp.ghost { background: transparent; color: var(--dust); outline: 1px dashed var(--line); outline-offset: -1px; clip-path: none; }
.rot-panel { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.rot-panel.due { border: 2px solid var(--volt); background: color-mix(in srgb, var(--volt) 10%, var(--ink)); }
.rot-panel.due .rot-head b { color: var(--volt); font: 400 30px/1 var(--display); text-transform: uppercase; }
.rot-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rot-io { display: grid; gap: 4px; margin-top: 8px; font-size: 17px; }
.rot-io em { font-style: normal; color: var(--dust); display: inline-block; width: 38px; font: 700 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .1em; }
.rot-panel .actions { margin: 10px 0 0; }

/* ---------- team chat ---------- */
.pinned-note { display: grid; gap: 2px; padding: 10px 14px; margin: 4px 0 10px; background: var(--ink-2); color: var(--chalk); text-decoration: none; border-left: 4px solid var(--volt); }
.chat .msgs { list-style: none; margin: 0; padding: 4px 0 8px; display: grid; gap: 3px; }
.chat.compact .msgs { max-height: 360px; overflow-y: auto; padding-right: 4px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.msg { display: grid; justify-items: start; max-width: 86%; }
.msg.head { margin-top: 10px; }
.msg.mine { justify-self: end; justify-items: end; }
.msg-who { font: 700 12px/1 var(--cond); text-transform: uppercase; letter-spacing: .06em; color: var(--dust); margin: 0 6px 4px; }
.msg.mine .msg-who { text-align: right; }
.msg-time { margin-left: 8px; opacity: .8; letter-spacing: .02em; }
.coach-tag { display: inline-block; font-size: 11px; padding: 2px 6px; background: var(--team); color: var(--team-ink); margin-left: 6px; vertical-align: 1px; }
.msg-body { all: unset; box-sizing: border-box; display: block; max-width: 100%; padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--ink-2); color: var(--chalk); font-size: 16px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; cursor: pointer; }
.msg-body:focus-visible { outline: 3px solid var(--volt); }
.msg.coach .msg-body { box-shadow: inset 3px 0 0 var(--team); }
.msg.mine .msg-body { background: var(--volt); color: var(--volt-ink); border-radius: 14px 14px 4px 14px; }
.msg.mine .msg-body a { color: var(--volt-ink); }
.msg-rx, .msg-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
.rx { min-height: 30px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--ink); color: var(--chalk); font-size: 14px; cursor: pointer; }
.rx.on { border-color: var(--volt); background: color-mix(in srgb, var(--volt) 16%, var(--ink)); }
.rx.pick { font-size: 20px; min-width: 40px; min-height: 40px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 0; background: var(--ink); position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); z-index: 5; }
.chat.compact .composer { position: static; }
@media (min-width: 820px) { .composer { bottom: 0; } }
.composer textarea { min-height: 46px; max-height: 140px; resize: none; padding: 11px 12px; line-height: 1.35; border-radius: 999px; }
.composer .btn { flex: none; }
.as { margin-top: -2px; }
.center-row { justify-content: center; }
.cheer-sec { margin-top: 26px; }

/* ---------- accounts & teams ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 10px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; padding: 0; cursor: pointer; box-shadow: 0 0 0 2px var(--line); }
.swatch.on { box-shadow: 0 0 0 3px var(--chalk); }
.inline-color { display: flex; align-items: center; gap: 10px; color: var(--dust); font: 400 15px/1.3 var(--body); text-transform: none; letter-spacing: 0; }
.inline-color input { width: 52px; height: 40px; padding: 2px; }
.team-row { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 12px 12px 0; cursor: pointer; background: var(--ink-2); border-radius: var(--r); }
.team-row:focus-visible { outline: 3px solid var(--volt); }
.team-row.current .title { color: var(--volt); }
.team-dot { width: 100%; align-self: stretch; border-radius: var(--r) 0 0 var(--r); border: 0 !important; }
.block { display: block; }
.join-inline { display: flex; gap: 8px; align-items: stretch; max-width: 460px; }
.join-inline input { flex: 1; min-width: 0; }
.join-inline .btn { flex: none; }
.danger-zone { margin-top: 28px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--hot) 40%, var(--line)); border-radius: var(--r); }
.danger-zone summary { color: #FF9BA3; }
.danger-zone[open] { display: grid; gap: 10px; }
.footer-links { display: flex; gap: 18px; margin-top: 30px; }
.share { border: 2px solid var(--volt); }
.join-code { font: 400 56px/1 var(--display); letter-spacing: .16em; color: var(--volt); margin: 8px 0 2px; transform: skewX(var(--slant)); transform-origin: left; }
.welcome-new { border-left: 4px solid var(--volt); }
.coach-row { grid-template-columns: 58px 1fr auto; }
.coach-row .date b { color: var(--team); }

/* ---------- leagues ---------- */
.lg-letter { display: grid; place-content: center; align-self: stretch; background: var(--ink-3); border-right: 2px dashed var(--line); font: 400 24px/1 var(--display); color: var(--volt); }
.row.ours { box-shadow: inset 4px 0 0 var(--team); }
.row.ours .title { color: var(--volt); }
.rows > li > .team-row.current { border-radius: var(--r) var(--r) 0 0; }
.lg-panel { margin: 0; border-radius: 0 0 var(--r) var(--r); border-top: 1px solid var(--line); }
tr.mine td { color: var(--volt); font-weight: 700; }
.check-list { gap: 8px; }
.row .sub a { color: var(--volt); }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 14px); transform: translate(-50%, 20px); background: var(--volt); color: var(--volt-ink); padding: 10px 18px; font: 700 15px/1.2 var(--cond); text-transform: uppercase; letter-spacing: .06em; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100% - 32px); clip-path: var(--cut); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

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

.row .date.jersey b { color: var(--team); }
.row .date.jersey { background: var(--ink-2); }
