:root {
  --bg: #eeebe2;
  --surface: #ffffff;
  --ink: #0b2240;
  --muted: #5a6878;
  --line: #d8d3c4;
  --win: #1f7a3a;
  --lose: #c8102e;
  --live: #e8a200;
  --gold: #d99a00;
  --bar: #dcd7c9;
  --accent: #c8102e;
  --accent-ink: #ffffff;
  --navy: #0b2240;
  --turf: #2e7d32;
  --chalk: #ffffff;
  --scoreboard: #ffc72c;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --retro: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) {
    --bg: #081629;
    --surface: #11284a;
    --ink: #f2efe6;
    --muted: #9fb1c6;
    --line: #213e66;
    --win: #4cc36b;
    --lose: #ff5a64;
    --live: #ffc72c;
    --gold: #ffc72c;
    --bar: #23426c;
    --accent: #e3303f;
    --accent-ink: #ffffff;
    --turf: #2c7a31;
  }
}
:root[data-theme="dark"] {
    --bg: #081629;
    --surface: #11284a;
    --ink: #f2efe6;
    --muted: #9fb1c6;
    --line: #213e66;
    --win: #4cc36b;
    --lose: #ff5a64;
    --live: #ffc72c;
    --gold: #ffc72c;
    --bar: #23426c;
    --accent: #e3303f;
    --accent-ink: #ffffff;
    --turf: #2c7a31;
  }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 16px/1.4 var(--body);
  -webkit-text-size-adjust: 100%;
  padding-bottom: env(safe-area-inset-bottom);
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; text-align: inherit; }
input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; width: 100%; }
:focus-visible { outline: 3px solid var(--live); outline-offset: 2px; border-radius: 6px; }

.top {
  position: sticky; top: 0; z-index: 3;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { max-width: 560px; margin: 0 auto; padding-bottom: 8px; }
.brand h1 { margin: 0; font: 400 30px/1.1 var(--retro); letter-spacing: 0.01em; color: var(--accent); text-shadow: 2px 2px 0 var(--stripe1); }
.status { margin: 4px 0 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.status b { color: var(--ink); font-weight: 600; }
.live { color: var(--live); font-weight: 600; }
.tabs { max-width: 560px; margin: 0 auto; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 12px; font: 600 17px/1 var(--display); color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tab[aria-pressed="true"] { color: var(--ink); border-color: var(--win); }

main { max-width: 560px; margin: 0 auto; padding: 14px 16px 40px; }
.panel { background: var(--surface); border-radius: 16px; padding: 20px; margin-top: 8px; }
.panel h2 { margin: 0 0 4px; font: 400 26px/1.15 var(--retro); color: var(--accent); }
.stack { display: grid; gap: 14px; margin-top: 16px; }
.stack label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.primary { background: var(--accent); color: var(--accent-ink); border-radius: 12px; padding: 14px; font-weight: 600; text-align: center; }
.err { color: var(--lose); margin: 0; min-height: 1.2em; font-size: 15px; }
.muted { color: var(--muted); }
.pad { padding: 16px 0; }
.hint { color: var(--muted); font-size: 14px; margin: 12px 2px; }
.link { color: var(--win); text-decoration: underline; font-size: inherit; }
.h { font: 700 22px/1.1 var(--display); margin: 8px 0 10px; }
.h small { font: 500 15px var(--body); color: var(--muted); margin-left: 6px; }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20px); transform: translateX(-50%); z-index: 10;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 15px;
  max-width: calc(100vw - 32px); box-shadow: 0 6px 20px rgb(0 0 0 / 0.25);
}
.toast.bad { background: var(--lose); color: #fff; border-radius: 14px; }

/* my team */
.progress { background: var(--surface); border-radius: 12px; padding: 10px 14px; font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.progress.ok { color: var(--win); font-weight: 600; }
.slots { display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: 52px 1fr 48px; align-items: center; background: var(--surface); border-radius: 12px; min-height: 64px; }
.pos { font: 700 16px/1 var(--display); color: var(--muted); text-align: center; }
.pick { display: grid; padding: 10px 4px; min-height: 64px; align-content: center; }
.pick .empty { color: var(--win); font-weight: 600; }
.slot:not(.filled) { border: 2px dashed var(--line); background: transparent; }
.pname { font-weight: 600; }
.pmeta { display: block; color: var(--muted); font-size: 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: var(--bg); color: var(--muted); vertical-align: 1px; }
.tag.bye { color: var(--gold); }
.tag.inj { color: var(--lose); }
.cap { width: 44px; height: 44px; border-radius: 50%; font-size: 22px; color: var(--muted); opacity: 0.45; text-align: center; }
.cap.on { opacity: 1; }
.cap.on { color: var(--gold); }
.tb { display: grid; gap: 6px; font-weight: 600; font-size: 15px; margin-top: 16px; }
.tb input { max-width: 140px; }

/* picker sheet */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 88vh; height: 88vh;
  border-radius: 18px 18px 0 0; background: var(--bg); color: var(--ink);
  display: none; flex-direction: column;
}
.sheet[open] { display: flex; }
.sheet::backdrop { background: rgb(0 0 0 / 0.45); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.sheet-head h2 { margin: 0; font: 700 22px/1.1 var(--display); }
.close { width: 44px; height: 44px; font-size: 20px; text-align: center; color: var(--muted); }
#picker-search { margin: 4px 16px 8px; width: auto; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 8px; scrollbar-width: none; flex: none; }
.chip { padding: 6px 10px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.plist { overflow-y: auto; padding: 0 16px calc(env(safe-area-inset-bottom) + 16px); display: grid; gap: 6px; align-content: start; flex: 1; }
.prow { background: var(--surface); border-radius: 12px; padding: 10px 14px; display: grid; min-height: 56px; }
.prow.mine { outline: 2px solid var(--win); }
.prow:disabled { opacity: 0.5; cursor: default; }
.prow .why { font-size: 13px; color: var(--lose); }
.prow.remove { color: var(--lose); font-weight: 600; text-align: center; align-content: center; }
@media (min-width: 700px) {
  .sheet { margin: auto; border-radius: 18px; height: 80vh; }
}

/* who's in */
.joined { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.joined li { background: var(--surface); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.joined li span { font-weight: 500; font-size: 14px; }
.ok { color: var(--win); }

/* standings */
.rounds { display: flex; gap: 6px; margin-bottom: 10px; }
.rounds span { flex: 1; text-align: center; font: 600 14px/1 var(--display); padding: 6px 0; border-radius: 8px; background: var(--surface); color: var(--muted); }
.rounds span.cur { background: var(--ink); color: var(--bg); }
.entry { background: var(--surface); border-radius: 12px; margin-bottom: 6px; overflow: hidden; }
.entry.me { box-shadow: inset 4px 0 0 var(--win); }
.erow { display: grid; grid-template-columns: 34px 1fr auto 64px; align-items: center; gap: 8px; width: 100%; padding: 12px 14px 12px 10px; }
.rank { font: 700 22px/1 var(--display); color: var(--muted); text-align: center; }
.ename { font-weight: 600; display: block; }
.alive { display: flex; gap: 3px; }
.alive i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.alive i.on { background: var(--win); }
.total { font: 700 26px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; }
.detail { border-top: 1px solid var(--line); padding: 6px 10px 10px; }
.detail.solo { background: var(--surface); border-radius: 12px; border: 0; }
.srow { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 6px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.srow:last-child { border-bottom: 0; }
.srow b { font: 700 20px/1 var(--display); font-variant-numeric: tabular-nums; }
.srow.dead { opacity: 0.5; }
.srow.live .pmeta { color: var(--live); }
.star { color: var(--gold); }
.rsum { margin: 8px 4px 0; color: var(--muted); font-size: 13px; }
.myhead { display: flex; justify-content: space-between; align-items: center; background: var(--surface); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; color: var(--muted); font-size: 15px; }
.myhead b { font: 700 40px/1 var(--display); color: var(--ink); }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.game { background: var(--surface); border-radius: 10px; padding: 8px 12px; display: grid; gap: 2px; font-weight: 600; }
.game span { display: flex; justify-content: space-between; }
.game small { color: var(--muted); font-weight: 500; }
.game.in small { color: var(--live); }

/* players */
.rates { display: grid; gap: 6px; }
.rate { display: grid; grid-template-columns: 1fr 80px 44px; gap: 10px; align-items: center; background: var(--surface); border-radius: 12px; padding: 10px 14px; }
.rate.dead { opacity: 0.5; }
.rate b { text-align: right; font: 700 20px/1 var(--display); }
.bar { height: 8px; border-radius: 4px; background: var(--bar); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--win); }

.rules ol { padding-left: 20px; display: grid; gap: 10px; }

/* commissioner */
.admin-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; background: var(--surface); border-radius: 12px; padding: 10px 14px; margin-bottom: 6px; }
.admin-row button { font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.admin-row button.danger { color: var(--lose); }
.share { background: var(--surface); border-radius: 12px; padding: 14px; margin-bottom: 14px; display: grid; gap: 8px; }
.share code { word-break: break-all; font-size: 14px; }

/* Player photos */
.face { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--line); }
.face > img:first-child { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.face-team { position: absolute; right: -4px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); padding: 1px; object-fit: contain; }
.face.sm { width: 34px; height: 34px; }
.face.sm .face-team { width: 16px; height: 16px; }
.pick, .prow { display: flex; align-items: center; gap: 12px; }
.prow.remove { justify-content: center; }
.ptext { display: grid; min-width: 0; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* ---- Draft ---- */
.hero {
  width: 100%; display: flex; align-items: center; gap: 14px; margin-bottom: 12px;
  padding: 16px; border-radius: 16px; color: #fff7e8;
  background: linear-gradient(160deg, var(--stripe1) 0 18%, var(--stripe2) 18% 52%, var(--stripe3) 52% 80%, var(--stripe4) 80%);
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
}
.hero.done { background: var(--surface); color: var(--ink); box-shadow: none; border: 2px solid var(--win); }
.hero-big { flex: none; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 0.18); font: 700 24px/1 var(--display); }
.hero-text { display: grid; gap: 2px; }
.hero-text b { font: 700 24px/1.1 var(--display); }
.hero-text span { font-size: 14px; opacity: 0.85; }
.hero.done .hero-text b { color: var(--win); }
.hero-faces { display: flex; flex: none; }
.hero-faces .face { margin-left: -10px; border: 2px solid var(--surface); }
.hero-faces .face:first-child { margin-left: 0; }
.hero-faces .face:nth-child(n+5) { display: none; }
@media (min-width: 400px) { .hero-faces .face:nth-child(n+5) { display: block; } }
.cap-ring { box-shadow: 0 0 0 2px var(--gold); }

.sheet-head { gap: 4px; }
.sheet-title { flex: 1; min-width: 0; }
.kicker { display: block; font: 600 13px/1 var(--body); color: var(--win); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.pick-area { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.strip { display: flex; justify-content: space-between; gap: 4px; padding: 4px 16px 10px; flex: none; }
.st { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 4px 0; border-radius: 10px; }
.st small { font: 600 11px/1 var(--body); color: var(--muted); }
.st.cur { background: var(--surface); box-shadow: inset 0 0 0 2px var(--win); }
.st.cur small { color: var(--win); }
.st-empty { width: 34px; height: 34px; border-radius: 50%; border: 2px dashed var(--line); display: grid; place-items: center; font: 600 11px/1 var(--display); color: var(--muted); }
.st.capt .face { box-shadow: 0 0 0 2px var(--gold); }
.st.pop .face { animation: pop 0.45s ease-out; }
@keyframes pop { 0% { transform: scale(0.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.face.xs { width: 34px; height: 34px; }
.face.lg { width: 72px; height: 72px; }
.face.lg .face-team { width: 26px; height: 26px; }
.prow .wc { font-size: 13px; color: var(--muted); }
.used { margin: 6px 2px 2px; font-size: 13px; color: var(--muted); }
.used b { color: var(--ink); margin-right: 2px; }

.draft-step { overflow-y: auto; padding: 4px 16px calc(env(safe-area-inset-bottom) + 20px); flex: 1; }
.lead { margin: 0 0 14px; font-size: 16px; }
.capgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 16px; }
.capcard { background: var(--surface); border-radius: 14px; padding: 14px 8px; display: grid; justify-items: center; gap: 2px; text-align: center; border: 2px solid transparent; transition: transform 0.15s; }
.capcard .face { margin-bottom: 6px; }
.capcard small { color: var(--muted); font-size: 13px; }
.capcard .wc { font-size: 12px; }
.capcard.on { border-color: var(--gold); transform: scale(1.03); }
.capcard.on b::after { content: ' ★'; color: var(--gold); }
.primary.wide { width: 100%; font-size: 17px; }
.primary:disabled { opacity: 0.5; cursor: default; }
.dial { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 18px 0; }
.dial output { font: 700 84px/1 var(--display); min-width: 120px; text-align: center; font-variant-numeric: tabular-nums; }
.round { width: 60px; height: 60px; border-radius: 50%; background: var(--surface); font: 600 34px/1 var(--display); text-align: center; }
.chips.center { justify-content: center; flex-wrap: wrap; padding: 0; }
.center { text-align: center; }
.team-card { background: var(--surface); border-radius: 14px; padding: 6px 12px; }
.tc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tc-row:last-child { border-bottom: 0; }
.tc-row .star { font-size: 13px; font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.facts div { background: var(--surface); border-radius: 12px; padding: 10px 8px; text-align: center; display: grid; gap: 2px; }
.facts b { font: 700 30px/1 var(--display); }
.facts span { font-size: 12px; color: var(--muted); line-height: 1.25; }
.h.small { font-size: 18px; margin-top: 16px; }
.root { display: grid; gap: 6px; }
.root div { background: var(--surface); border-radius: 10px; padding: 8px 12px; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; }
.root span { font-weight: 600; }
.root small { color: var(--muted); }
.root b { color: var(--win); font-size: 14px; text-align: right; }
#sheet-toast { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 16px); }

.draft-step .primary.wide { position: sticky; bottom: 0; box-shadow: 0 -10px 16px var(--bg); }
.capgrid { grid-template-columns: repeat(3, 1fr); }
.capcard { padding: 10px 4px; }
.capcard .face.lg { width: 56px; height: 56px; }
.capcard b { font-size: 14px; line-height: 1.2; }
.capcard small:not(.wc) { font-size: 12px; }
.root i.both { font-style: normal; color: var(--gold); font-weight: 600; }
@media (min-width: 520px) { .capgrid { grid-template-columns: repeat(4, 1fr); } }

/* draft intro */
.rule-big { background: var(--surface); border: 2px solid var(--gold); border-radius: 16px; padding: 14px; display: grid; gap: 6px; margin-bottom: 14px; }
.rule-big > b { font: 700 24px/1.1 var(--display); }
.rule-big > span { font-size: 15px; }
.ex { display: grid; gap: 6px; margin-top: 6px; }
.ex-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: var(--bg); }
.ex-row.no { opacity: 0.85; }
.ex-row.no .ex-mark { color: var(--lose); }
.ex-row.yes .ex-mark { color: var(--win); }
.ex-mark { font: 700 22px/1 var(--display); width: 18px; text-align: center; }
.ex-plus { color: var(--muted); }
.ex-p { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ex-p > span { display: grid; line-height: 1.1; }
.ex-p small { color: var(--muted); font-size: 12px; }
.steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; font-size: 15px; }
.num { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 700 17px/1 var(--display); color: var(--win); }
.used.rule { color: var(--gold); font-weight: 600; }

/* race */
.race { background: var(--surface); border-radius: 12px; padding: 10px 14px; margin: 0 0 8px; font-size: 15px; }
.race b { color: var(--win); }
.can { color: var(--win); }
.chase { color: var(--muted); font-style: italic; }

.erow .who { display: grid; gap: 0; }

.ghost { width: 100%; margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); font-weight: 600; text-align: center; color: var(--ink); }

/* schedule */
.sround { margin-bottom: 18px; }
.hint.tight { margin: -6px 2px 8px; }
.gday { margin: 10px 2px 6px; font: 600 14px/1 var(--body); color: var(--muted); }
.gcard { background: var(--surface); border-radius: 12px; padding: 8px 12px; margin-bottom: 6px; display: grid; gap: 2px; }
.gcard.in { box-shadow: inset 4px 0 0 var(--live); }
.gs { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; font-weight: 600; }
.gs b { font: 700 22px/1 var(--display); font-variant-numeric: tabular-nums; }
.gs.lost { opacity: 0.45; }
.gs.won b { color: var(--win); }
.gteam small { color: var(--muted); font-size: 12px; font-weight: 600; margin-right: 6px; }
.glogo { width: 26px; height: 26px; object-fit: contain; }
.glogo.sm { width: 20px; height: 20px; vertical-align: -5px; margin-right: 4px; }
.gstat { font-size: 13px; color: var(--muted); }
.gyou { font-size: 13px; color: var(--win); font-weight: 600; border-top: 1px solid var(--line); padding-top: 4px; margin-top: 2px; }
.gbye { display: flex; flex-wrap: wrap; gap: 6px 14px; background: var(--surface); border-radius: 12px; padding: 8px 12px; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.gbye small { color: var(--muted); font-weight: 500; }

@media (max-width: 420px) { .tab { padding: 10px 8px; font-size: 16px; } .tabs { gap: 0; justify-content: space-between; } }

/* live */
.ldot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-left: 5px; vertical-align: 3px; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.updated { display: block; margin: 0 auto 8px; font-size: 13px; color: var(--muted); padding: 4px 10px; }
.you { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; margin-bottom: 4px; }
.you > div { background: var(--surface); border-radius: 12px; padding: 10px 12px; display: grid; align-content: start; }
.you small { color: var(--muted); font-size: 12px; }
.you b { font: 700 28px/1.1 var(--display); }
.you .up { color: var(--win); font-weight: 600; font-size: 12px; }
.you .down { color: var(--lose); font-weight: 600; font-size: 12px; }
.plus { color: var(--win); font: 600 13px/1 var(--body); animation: fadeplus 4s ease-out forwards; }
@keyframes fadeplus { 0%, 80% { opacity: 1; } 100% { opacity: 0.35; } }
.lgame { width: 100%; display: grid; gap: 2px; background: var(--surface); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.lgame.in { box-shadow: inset 4px 0 0 var(--live); }
.lg-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.lg-score { font: 700 18px/1 var(--display); }
.lg-more { font-size: 13px; color: var(--win); margin-top: 4px; }
.lp { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.lp:first-of-type { border-top: 0; }
.lp b { font: 700 20px/1 var(--display); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lp.on .pmeta { color: var(--ink); }
.small { font-size: 13px; }
.race-list { display: grid; gap: 4px; margin-bottom: 8px; }
.rl { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; background: var(--surface); border-radius: 10px; padding: 8px 12px; }
.rl.me { box-shadow: inset 4px 0 0 var(--win); }
.rl b { font: 700 20px/1 var(--display); white-space: nowrap; }
.owners { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.owners span { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--bg); color: var(--muted); font-weight: 600; }
.owners span.mine { color: var(--win); }
.sheet.short { height: auto; max-height: 85vh; }

/* ---- 70s NFL ---- */
/* header: navy with a red-white-red helmet stripe */
.top { background: var(--navy); border-bottom: 0; color: #fff; }
.top::after {
  content: ''; display: block; height: 12px; margin: 0 -16px;
  background: linear-gradient(var(--navy) 0 16%, #fff 16% 33%, var(--accent) 33% 67%, #fff 67% 84%, var(--navy) 84%);
}
.brand h1 { font: italic 800 34px/1 var(--retro); color: #fff; text-transform: uppercase; letter-spacing: 0.01em; }
.kick { margin: 3px 0 0; font: 800 12px/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--scoreboard); }
.status { color: #c7d3e2; }
.status b { color: #fff; }
.top .live { color: var(--scoreboard); }
.tab { color: #a9b8cc; }
.tab[aria-pressed="true"] { color: #fff; border-color: var(--scoreboard); }
.ldot { background: var(--scoreboard); }

/* headings: jersey lettering */
.panel h2, .hero-text b, .sheet-head h2, .h { font-family: var(--retro); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; }
.panel h2 { color: var(--navy); }
.h { color: var(--navy); font-size: 22px; }
.h.small { font-size: 19px; }
@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) .panel h2, :root:not([data-theme="light"]) .h { color: var(--ink); } }
:root[data-theme="dark"] .panel h2, :root[data-theme="dark"] .h { color: var(--ink); }
.kicker { color: var(--accent); }

/* the big button: Astroturf with yard lines */
.hero {
  color: #fff;
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgb(255 255 255 / 0.55) 46px 49px),
    linear-gradient(var(--turf), #24662a);
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / 0.85), 0 6px 18px rgb(0 0 0 / 0.18);
}
.hero-text b { text-shadow: 2px 2px 0 rgb(0 0 0 / 0.35); }
.hero-big { background: var(--navy); color: var(--scoreboard); border: 3px solid #fff; }
.hero.done { background: var(--surface); color: var(--ink); box-shadow: none; border: 3px solid var(--turf); }
.hero.done .hero-text b { text-shadow: none; color: var(--turf); }

/* accents */
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) .chip[aria-pressed="true"] { background: var(--accent); } }
:root[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--accent); }
.rounds span.cur { background: var(--accent); color: #fff; }
.pick .empty, .link, .lg-more, .num { color: var(--accent); }
.st.cur { box-shadow: inset 0 0 0 2px var(--accent); }
.st.cur small { color: var(--accent); }
.rule-big { border-color: var(--accent); }
.entry.me, .rl.me { box-shadow: inset 5px 0 0 var(--accent); }
.alive i.on { background: var(--turf); }
@media (prefers-color-scheme: dark) {:root:not([data-theme="light"]) .alive i.on { background: var(--win); } }
:root[data-theme="dark"] .alive i.on { background: var(--win); }
.bar i { background: var(--accent); }

/* scoreboard: your numbers on the Live tab */
.you > div:first-child { background: var(--navy); color: var(--scoreboard); border: 2px solid var(--scoreboard); }
.you > div:first-child small { color: #c7d3e2; }
.you > div:first-child .plus { color: #fff; }
.total, .you b, .lp b, .rl b, .myhead b { font-variant-numeric: tabular-nums; }
.lgame.in, .gcard.in { box-shadow: inset 5px 0 0 var(--scoreboard); }
@media (prefers-color-scheme: light) {:root:not([data-theme="dark"]) .lgame.in, :root:not([data-theme="dark"]) .gcard.in { box-shadow: inset 5px 0 0 var(--live); } }
:root[data-theme="light"] .lgame.in, :root[data-theme="light"] .gcard.in { box-shadow: inset 5px 0 0 var(--live); }

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
/* theme switch in the header */
.brand { position: relative; }
.theme-btn {
  position: absolute; top: 0; right: 0; height: 32px; padding: 0 10px; border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.35); color: #fff; font: 600 13px/1 var(--body); display: flex; align-items: center; gap: 5px;
}
.theme-btn span { font-size: 15px; }
.brand h1 { padding-right: 44px; }
.theme-btn { min-width: 32px; justify-content: center; padding: 0 8px; }
.theme-btn .lbl { display: none; }
.theme-btn.show .lbl { display: inline; }
.theme-btn.show { background: var(--navy); }

/* demo stage bar */
.demobar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  background: #061528; color: #fff; border-top: 3px solid var(--scoreboard);
  padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px); display: grid; gap: 6px;
}
.db-row { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.db-row > b { font: italic 800 15px/1 var(--display); color: var(--scoreboard); text-transform: uppercase; margin-right: 2px; }
.db-stage { padding: 6px 10px; border-radius: 999px; background: #13294a; color: #c7d3e2; font-size: 13px; font-weight: 600; }
.db-stage[aria-pressed="true"] { background: var(--scoreboard); color: #061528; }
.db-row.sub { font-size: 12px; color: #9fb1c6; justify-content: space-between; }
.db-row.sub a { color: #fff; margin-left: auto; }
.db-tick { padding: 6px 10px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; }
body.has-demobar main { padding-bottom: 120px; }
body.has-demobar .toast { bottom: calc(env(safe-area-inset-bottom) + 100px); }
