/* =====================================================================
   Pocket Presence UI
   One token set. Gold means "selected / important" and nothing else.
   Team colors only appear on team elements. One radius. One motion speed.
   ===================================================================== */
:root {
  /* surfaces */
  --bg-0: #0a111e;            /* panels */
  --bg-1: #111a2b;            /* raised rows, cards */
  --bg-2: #1a2539;            /* hover */
  --scrim: rgba(4, 8, 16, 0.45);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  /* content */
  --text: #f2f5f9;            /* 17.4:1 on --bg-0 */
  --text-2: #a7b2c3;          /* 8.6:1 on --bg-0 */
  --text-3: #7d8aa0;          /* 5.1:1 on --bg-0, labels only */
  /* signal */
  --gold: #f5c518;            /* 11.2:1 on --bg-0 */
  --gold-ink: #10141c;
  --good: #3ddc84;
  --bad: #ff5a4a;
  /* teams */
  --home: #1d3a72;
  --home-2: #4f9dff;
  --away: #c81f2e;
  --away-2: #ffffff;
  /* type */
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  /* shape + motion */
  --r: 3px;
  --t: 160ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --cut: 12px;                /* the angled broadcast cut */
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05070c; color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd, .kb {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: var(--r); background: rgba(255,255,255,.92); color: var(--gold-ink);
  font: 800 13px/1 var(--display); letter-spacing: .02em;
}
.eyebrow { font: 700 13px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
button { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- crosshair + power meter ---------- */
#crosshair { position: fixed; left: 50%; top: 50%; width: 120px; height: 120px; transform: translate(-50%, -50%); pointer-events: none; }
.xh-dot { fill: #fff; stroke: rgba(0,0,0,.55); stroke-width: 1.5; }
.xh-lines { stroke: #fff; stroke-width: 2; opacity: .9; filter: drop-shadow(0 0 1px rgba(0,0,0,.8)); }
.meter-track { fill: none; stroke: rgba(10,17,30,.55); stroke-width: 7; opacity: 0; transition: opacity var(--t); }
.meter-fill { fill: none; stroke: var(--good); stroke-width: 5; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 60px 60px; stroke-dasharray: 0 999; }
#crosshair.charging .meter-track { opacity: 1; }
#crosshair.nothrow .xh-dot { fill: var(--bad); }
#meterLabel {
  position: absolute; top: 104px; left: 50%; transform: translateX(-50%);
  padding: 3px 8px; border-radius: var(--r); background: rgba(10,17,30,.72);
  font: 800 15px/1 var(--display); letter-spacing: .06em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
#meterLabel:empty { display: none; }

/* ---------- receiver tags ---------- */
#tags { position: fixed; inset: 0; pointer-events: none; }
.tag {
  position: absolute; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 6px;
  padding: 2px 8px 2px 2px; background: rgba(10,17,30,.82); border-radius: var(--r);
  font: 700 15px/20px var(--display); letter-spacing: .03em; white-space: nowrap;
  border-left: 3px solid var(--text-3); transition: opacity var(--t);
}
.tag .dot { min-width: 26px; height: 20px; border-radius: 2px; display: grid; place-items: center; font: 800 13px/1 var(--display); color: var(--gold-ink); background: var(--text-2); }
.tag .rt { color: var(--text-2); font-weight: 600; font-size: 13px; letter-spacing: .06em; }
.tag.open { border-left-color: var(--good); } .tag.open .dot { background: var(--good); }
.tag.mid { border-left-color: var(--gold); } .tag.mid .dot { background: var(--gold); }
.tag.covered { border-left-color: var(--bad); } .tag.covered .dot { background: var(--bad); color: #fff; }
.tag.dim { opacity: .25; }

/* ---------- big-play banner (TD, INT, turnovers) ---------- */
#banner {
  position: fixed; top: 13%; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none;
  min-width: min(560px, 92vw); padding: 14px 40px 16px;
  background: var(--bg-0); clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  border-top: 3px solid var(--gold);
  animation: slabIn 420ms var(--ease) both;
}
#banner.team-home { border-top-color: var(--home-2); }
#banner.team-away { border-top-color: var(--away); }
#banner .b-kicker { font: 700 13px/1 var(--display); letter-spacing: .2em; color: var(--text-3); text-transform: uppercase; }
#banner .b-kicker:empty { display: none; }
#banner .b-head { font: 900 clamp(40px, 6vw, 72px)/1 var(--display); letter-spacing: .02em; text-transform: uppercase; margin-top: 4px; }
#banner.td .b-head { color: var(--gold); }
#banner .b-sub { margin-top: 6px; font: 600 17px/1.3 var(--body); color: var(--text); }
#banner .b-note { margin-top: 2px; font: 500 14px/1.3 var(--body); color: var(--text-2); }
#banner .b-sub:empty, #banner .b-note:empty { display: none; }
@keyframes slabIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(-10px) scaleX(.9); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scaleX(1); }
}

/* ---------- routine play notice (lower third) ---------- */
#notice {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); pointer-events: none;
  display: flex; align-items: stretch; background: var(--bg-0); border-radius: var(--r); overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: noticeIn 220ms var(--ease) both;
}
#notice::before { content: ''; width: 4px; background: var(--text-3); }
#notice.good::before { background: var(--good); }
#notice.bad::before { background: var(--bad); }
#notice.gold::before { background: var(--gold); }
#notice .n-head { padding: 9px 14px; font: 800 22px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
#notice .n-sub { padding: 9px 16px 9px 0; font: 600 15px/22px var(--body); color: var(--text-2); white-space: nowrap; }
#notice .n-sub:empty { display: none; }
@keyframes noticeIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- prompts + toasts ---------- */
#prompt {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); padding: 8px 14px;
  background: rgba(10,17,30,.82); border-radius: var(--r); pointer-events: none; text-align: center; max-width: 92vw;
  font: 600 15px/22px var(--body); color: var(--text-2);
}
#prompt kbd { margin: 0 2px; }
#toast {
  position: fixed; top: 62%; left: 50%; transform: translateX(-50%); pointer-events: none;
  padding: 6px 12px; background: rgba(10,17,30,.78); border-radius: var(--r);
  font: 800 18px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}

/* ---------- score bug (broadcast) ---------- */
#scorebug {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: flex; align-items: stretch; height: 48px; background: var(--bg-0);
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  box-shadow: 0 10px 30px rgba(0,0,0,.45); font-family: var(--display); font-variant-numeric: tabular-nums;
}
.sb-team { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 112px; padding: 0 14px 0 22px; }
.sb-team.home { background: var(--home); }
.sb-team.away { background: var(--away); padding-left: 16px; }
.sb-team::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.sb-team.home::after { background: var(--home-2); }
.sb-team.away::after { background: var(--away-2); opacity: .85; }
.sb-team.poss .sb-abbr::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 7px 3px 0; background: var(--gold); transform: rotate(45deg); }
.sb-abbr { font-weight: 800; font-size: 19px; letter-spacing: .06em; }
.sb-score { font-weight: 900; font-size: 32px; line-height: 1; }
.sb-time, .sb-sit { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 0 16px; border-left: 1px solid var(--line); }
.sb-qtr { font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: .12em; color: var(--text-3); text-transform: uppercase; }
.sb-clock { font-weight: 800; font-size: 24px; line-height: 1; }
.sb-down { font-weight: 800; font-size: 20px; line-height: 1; color: var(--gold); white-space: nowrap; }
.sb-spot { font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: .1em; color: var(--text-3); white-space: nowrap; }
.sb-pc { display: grid; place-items: center; min-width: 58px; padding: 0 20px 0 12px; border-left: 1px solid var(--line); font-weight: 800; font-size: 22px; }
.sb-pc.low { color: var(--bad); }

/* ---------- player card ---------- */
#playercard { position: fixed; left: 20px; bottom: 20px; display: flex; align-items: stretch; height: 48px; background: var(--bg-0); border-radius: var(--r); overflow: hidden; }
.pc-badge { width: 44px; display: grid; place-items: center; background: var(--home); box-shadow: inset 0 -3px 0 var(--home-2); font: 900 18px/1 var(--display); letter-spacing: .04em; }
.pc-body { padding: 0 14px 0 12px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.pc-name { font: 800 16px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.pc-name span { color: var(--text-3); font-weight: 700; margin-left: 4px; }
.pc-line { font: 600 13px/1 var(--body); color: var(--text-2); font-variant-numeric: tabular-nums; }
#keyhint { position: fixed; right: 20px; bottom: 36px; font: 600 13px/1 var(--body); color: rgba(255,255,255,.5); pointer-events: none; }

/* ---------- play call (playbook) ---------- */
#playcall {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); width: min(1160px, 96vw);
  background: var(--bg-0); border-radius: var(--r); padding: 14px 16px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.5);
  max-height: calc(100vh - 120px); display: flex; flex-direction: column;
}
.pcall-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
#pcallTitle { font: 800 15px/1 var(--display); letter-spacing: .14em; color: var(--text-2); text-transform: uppercase; }
.pcall-hint { font: 500 13px/1 var(--body); color: var(--text-3); }
#pcallTabs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.pcat-row { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.pcat-row .kb { margin: 0 6px 8px; }
.pcat {
  position: relative; padding: 4px 16px 12px; border: none; background: none; cursor: pointer;
  font: 900 22px/1 var(--display); letter-spacing: .04em; color: var(--text-3); transition: color var(--t);
}
.pcat:hover { color: var(--text); }
.pcat.sel { color: var(--text); }
.pcat.sel::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--gold); }
.pcat.off { opacity: .3; cursor: default; }
.psub-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.psub-row .kb { opacity: .7; }
.ptab {
  height: 32px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: transparent; cursor: pointer;
  font: 700 15px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.ptab:hover { color: var(--text); border-color: var(--text-3); }
.ptab.sel { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
#pcallCards { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; overflow-y: auto; min-height: 0; padding: 2px; }
.pcard {
  position: relative; display: flex; flex-direction: column; text-align: left; cursor: pointer;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); padding: 0; overflow: hidden;
  transition: border-color var(--t), transform var(--t) var(--ease), background var(--t);
}
.pcard:hover, .pcard:focus-visible { border-color: var(--gold); background: var(--bg-2); transform: translateY(-2px); outline: none; }
.pcard .pc-top { display: flex; align-items: center; gap: 8px; padding: 9px 10px 6px; min-width: 0; }
.pcard .k { flex: none; }
.pcard .nm { font: 800 18px/1.05 var(--display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .fm { padding: 0 10px 8px; font: 600 12px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.pcard svg { display: block; width: 100%; height: auto; background: #1d4a2a; border-top: 1px solid var(--line); }
.pcard.special { min-height: 150px; justify-content: center; align-items: center; text-align: center; gap: 6px; }
.pcard.special .k { position: absolute; top: 9px; left: 10px; }
.pcard.special .big { font: 900 34px/1 var(--display); letter-spacing: .04em; }
.pcard.special .sm { font: 600 14px/1.2 var(--body); color: var(--text-2); }
.pcard.special.off { opacity: .4; cursor: default; }
.pcard.special.off:hover { transform: none; border-color: var(--line); background: var(--bg-1); }
.pempty { color: var(--text-2); font: 600 15px/1.4 var(--body); padding: 20px 6px; }

/* ---------- overlays ---------- */
#vignette { position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 160px rgba(0,0,0,.5); transition: box-shadow .2s; }
#vignette.hit { box-shadow: inset 0 0 220px rgba(190,0,0,.6); }
#fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .3s; }
#fade.on { opacity: 1; }

/* ---------- buttons ---------- */
.btn {
  height: 44px; padding: 0 22px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg-1); cursor: pointer;
  font: 800 18px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: background var(--t), border-color var(--t);
}
.btn:hover { background: var(--bg-2); border-color: var(--text-3); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.primary:hover { background: #ffd43b; }
.btn kbd { background: rgba(0,0,0,.14); color: inherit; }
.btn:not(.primary) kbd { background: rgba(255,255,255,.12); color: var(--text-2); }

/* ---------- modal card (drives, PAT, quarter breaks, final) ---------- */
#modal { position: fixed; inset: 0; display: grid; place-items: center; background: var(--scrim); }
.modal-card {
  width: min(540px, 92vw); background: var(--bg-0); border-radius: var(--r); padding: 22px 26px 22px;
  border-top: 3px solid var(--gold); box-shadow: 0 24px 60px rgba(0,0,0,.55); animation: cardIn 240ms var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.m-kicker { font: 700 13px/1.2 var(--display); letter-spacing: .16em; color: var(--text-3); text-transform: uppercase; }
.m-title { font: 900 40px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; margin: 6px 0 12px; }
.m-body { font: 500 16px/1.5 var(--body); color: var(--text-2); }
.m-body b { color: var(--text); }
.m-body .score { display: flex; gap: 0; margin: 12px 0 10px; font: 900 22px/1 var(--display); font-variant-numeric: tabular-nums; }
.m-body .score span { padding: 8px 14px; color: var(--text) !important; }
.m-body .score .h { background: var(--home); box-shadow: inset 0 -3px 0 var(--home-2); }
.m-body .score .a { background: var(--away); box-shadow: inset 0 -3px 0 rgba(255,255,255,.85); }
.m-body .score span:last-child:not(.h):not(.a) { background: var(--bg-1) !important; font-weight: 800; color: var(--text-2) !important; }
.m-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- start menu (centered title screen over the live stadium) ---------- */
#menu {
  position: fixed; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 32px 20px;
  /* darker at the edges and behind the content, the stadium stays visible in between */
  background:
    radial-gradient(ellipse 70% 60% at 50% 52%, rgba(5,8,14,.62) 0%, rgba(5,8,14,.38) 55%, rgba(5,8,14,.72) 100%),
    linear-gradient(180deg, rgba(5,8,14,.55) 0%, rgba(5,8,14,0) 22%, rgba(5,8,14,0) 70%, rgba(5,8,14,.7) 100%);
}
.menu-inner { width: min(1120px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; }
.menu-kicker { font: 700 13px/1 var(--display); letter-spacing: .32em; color: var(--gold); }
#menu h1 {
  margin: 10px 0 16px; font: 900 clamp(48px, 7.4vw, 96px)/.9 var(--display); letter-spacing: .01em; white-space: nowrap;
  text-shadow: 0 6px 24px rgba(0,0,0,.5);
}
/* broadcast-style matchup bar */
.matchup { display: inline-flex; align-items: stretch; height: 40px; margin-bottom: 26px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.matchup span { display: grid; place-items: center; min-width: 168px; padding: 0 18px; font: 800 20px/1 var(--display); letter-spacing: .07em; }
.matchup .home { background: var(--home); box-shadow: inset 0 -3px 0 var(--home-2); }
.matchup .away { background: var(--away); box-shadow: inset 0 -3px 0 rgba(255,255,255,.85); }
.matchup em { display: grid; place-items: center; width: 38px; background: var(--bg-0); color: var(--text-3); font: 800 12px/1 var(--display); font-style: normal; letter-spacing: .08em; }
/* settings: one even bar, wraps into clean rows on smaller screens */
.opts {
  width: 100%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
  padding: 16px 18px 18px; margin-bottom: 22px; text-align: left;
  background: rgba(10,17,30,.84); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.opts label { display: flex; flex-direction: column; gap: 8px; min-width: 0; font: 700 12px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.opts select {
  -webkit-appearance: none; appearance: none; width: 100%; height: 42px; padding: 0 34px 0 12px;
  background: var(--bg-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a7b2c3' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer;
  font: 600 15px/1 var(--body); letter-spacing: 0; text-transform: none; text-overflow: ellipsis;
  transition: border-color var(--t), background-color var(--t);
}
.opts select:hover { border-color: var(--text-3); }
.opts select:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
@media (max-width: 1060px) { .opts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.opt-slider { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r); }
.opt-slider .slider { flex: 1; width: auto; min-width: 0; height: 28px; }
.opt-slider output { min-width: 34px; text-align: right; font: 700 15px/1 var(--display); letter-spacing: .02em; color: var(--text); font-variant-numeric: tabular-nums; }
/* main buttons */
.menu-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.menu-buttons .btn { height: 52px; min-width: 228px; padding: 0 28px; font-size: 22px; letter-spacing: .1em; transition: transform 120ms var(--ease), background var(--t), border-color var(--t), box-shadow var(--t); }
.menu-buttons .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.menu-buttons .btn:active { transform: translateY(1px) scale(.99); box-shadow: none; }
.menu-buttons .btn:not(.primary) { background: var(--bg-0); border-color: var(--line-2); }
.menu-buttons .btn:not(.primary):hover { border-color: var(--text-2); }
#btnFriend[aria-expanded="true"] { border-color: var(--gold); }
/* compact controls guide */
.menu-keys { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 22px 0 0; padding: 0; }
.menu-keys li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; background: rgba(10,17,30,.72); border-radius: var(--r); font: 600 13px/1 var(--body); color: var(--text-2); }
.menu-keys kbd { min-width: 0; height: 24px; padding: 0 8px; gap: 5px; display: inline-flex; align-items: center; background: rgba(255,255,255,.1); color: var(--text); border: 1px solid var(--line-2); font-size: 12px; letter-spacing: .08em; }
.menu-keys kbd svg { display: block; }
/* ---------- sliders + switches (shared) ---------- */
.slider, .opts input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
.slider::-webkit-slider-runnable-track, .opts input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--gold) var(--fill, 32%), var(--line-2) var(--fill, 32%)); }
.slider::-moz-range-track, .opts input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }
.slider::-moz-range-progress, .opts input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--gold); }
.slider::-webkit-slider-thumb, .opts input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); }
.slider::-moz-range-thumb, .opts input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); }
.switch { -webkit-appearance: none; appearance: none; flex: none; width: 44px; height: 24px; margin: 0; border-radius: 12px; background: var(--line-2); position: relative; cursor: pointer; transition: background var(--t); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform var(--t) var(--ease), background var(--t); }
.switch:checked { background: var(--gold); }
.switch:checked::after { transform: translateX(20px); background: var(--gold-ink); }

/* ---------- pause ---------- */
#pause { position: fixed; inset: 0; display: grid; place-items: center; background: var(--scrim); z-index: 20; }
.pause-panel {
  display: grid; grid-template-columns: 300px 1fr; width: min(820px, 94vw); max-height: calc(100vh - 110px); overflow: auto;
  margin-bottom: 60px;
  background: var(--bg-0); border-radius: var(--r); box-shadow: 0 24px 60px rgba(0,0,0,.55); animation: cardIn 200ms var(--ease) both;
}
.pause-left { padding: 26px 22px 24px; border-right: 1px solid var(--line); }
.pause-right { padding: 26px 26px 18px; }
.pause-score { margin: -2px 0 18px; font: 500 15px/1.5 var(--body); color: var(--text-2); font-variant-numeric: tabular-nums; }
.pause-score b { display: block; margin-bottom: 4px; font: 900 30px/1 var(--display); color: var(--text); letter-spacing: .02em; }
.pause-menu { display: flex; flex-direction: column; gap: 6px; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 14px;
  border: none; border-left: 3px solid transparent; border-radius: var(--r); background: var(--bg-1); cursor: pointer; text-align: left;
  font: 800 20px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--text);
  transition: background var(--t), border-color var(--t);
}
.menu-item:hover, .menu-item:focus-visible { background: var(--bg-2); border-left-color: var(--gold); outline: none; }
.menu-item.primary { background: var(--gold); color: var(--gold-ink); }
.menu-item.primary:hover { background: #ffd43b; border-left-color: transparent; }
.menu-item kbd { background: rgba(255,255,255,.12); color: var(--text-2); }
.menu-item.primary kbd { background: rgba(0,0,0,.14); color: var(--gold-ink); }
.menu-item.confirm { background: var(--bad); color: #fff; }
.set-row { padding: 4px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.set-label { display: flex; justify-content: space-between; margin-bottom: 10px; font: 700 15px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.set-value { color: var(--text); font-variant-numeric: tabular-nums; }
.slider-ends { display: flex; justify-content: space-between; font: 600 12px/1 var(--body); color: var(--text-3); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; gap: 3px; background: var(--bg-1); border-radius: var(--r); }
.segmented button {
  height: 38px; border: none; border-radius: 2px; background: transparent; cursor: pointer;
  font: 800 17px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2);
  transition: background var(--t), color var(--t);
}
.segmented button:hover { color: var(--text); background: var(--bg-2); }
.segmented button[aria-checked="true"] { background: var(--gold); color: var(--gold-ink); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; cursor: pointer; font: 600 16px/1.3 var(--body); color: var(--text); border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: none; }

/* ---------- help ---------- */
#help { position: fixed; inset: 0; display: grid; place-items: center; background: var(--scrim); z-index: 30; }
.help-card { width: min(680px, 94vw); max-height: 92vh; overflow: auto; background: var(--bg-0); border-radius: var(--r); border-top: 3px solid var(--gold); padding: 22px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.help-card h2 { margin: 0 0 12px; font: 900 34px/1 var(--display); letter-spacing: .03em; }
.help-card table { width: 100%; border-collapse: collapse; }
.help-card td { padding: 9px 4px; border-bottom: 1px solid var(--line); vertical-align: top; font: 500 15px/1.45 var(--body); color: var(--text-2); }
.help-card td:first-child { width: 32%; white-space: nowrap; font: 800 16px/1.4 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.help-tip { margin: 16px 0; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--bg-1); font: 500 15px/1.45 var(--body); color: var(--text-2); }

#loading { position: fixed; inset: 0; display: grid; place-items: center; background: #05070c; font: 800 24px/1 var(--display); letter-spacing: .2em; color: var(--text-2); z-index: 50; }

/* ---------- responsive ---------- */
@media (max-width: 1150px) { #keyhint { display: none; } }
@media (max-width: 900px) {
  #playercard { display: none; }
  .pause-panel { grid-template-columns: 1fr; }
  .pause-left { border-right: none; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .sb-team { min-width: 84px; padding: 0 10px 0 16px; gap: 8px; }
  .sb-score { font-size: 24px; }
  .sb-time, .sb-sit { padding: 0 10px; }
  .sb-spot { display: none; }
  .pcat { font-size: 18px; padding: 4px 10px 10px; }
  #pcallCards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
body.paused #playcall, body.paused #tags, body.paused #crosshair, body.paused #prompt { visibility: hidden; }

/* ---------- multiplayer menu (opens under the buttons) ---------- */
.mp-panel { display: grid; grid-template-columns: 1fr 1fr; width: min(640px, 100%); margin: 16px auto 0; background: rgba(10,17,30,.9); border: 1px solid var(--line); border-radius: var(--r); text-align: left; box-shadow: 0 12px 32px rgba(0,0,0,.35); animation: cardIn 200ms var(--ease) both; }
.mp-col { padding: 16px 18px; }
.mp-col .btn { height: 42px; width: 100%; font-size: 18px; }
.mp-col + .mp-col { border-left: 1px solid var(--line); }
.mp-code { margin: 12px 0 2px; font: 900 40px/1 var(--display); letter-spacing: .2em; color: var(--gold); font-variant-numeric: tabular-nums; }
.mp-code:empty { display: none; }
.mp-status { margin-top: 10px; font: 500 13px/1.4 var(--body); color: var(--text-2); }
.mp-join { display: flex; gap: 8px; }
#mpCodeIn { width: 100%; min-width: 0; height: 42px; padding: 0 12px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--text); font: 800 22px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; text-align: center; }
#mpCodeIn:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
#mpCodeIn + .btn { width: auto; padding: 0 18px; }
@media (max-width: 560px) { .mp-panel { grid-template-columns: 1fr; } .mp-col + .mp-col { border-left: none; border-top: 1px solid var(--line); } }
@media (max-width: 600px) { .opts { grid-template-columns: 1fr 1fr; gap: 12px 10px; padding: 14px; } .opts select { font-size: 14px; padding: 0 28px 0 10px; background-position: right 9px center; } }
@media (max-width: 520px) { .menu-buttons .btn { min-width: 0; flex: 1; padding: 0 12px; font-size: 19px; white-space: nowrap; } .matchup span { min-width: 0; font-size: 16px; padding: 0 12px; } #menu h1 { white-space: normal; } }

/* ---------- instant replay ---------- */
#replayTag {
  position: fixed; top: 22px; left: 22px; display: flex; align-items: center; gap: 10px; pointer-events: none;
  padding: 8px 14px 8px 12px; background: var(--bg-0); clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  border-left: 4px solid var(--gold); animation: tagIn 220ms var(--ease) both;
}
@keyframes tagIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.rp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: rpBlink 1s steps(2, start) infinite; }
.rp-word { font: 900 24px/1 var(--display); letter-spacing: .12em; }
.rp-skip { margin-left: 8px; font: 600 13px/1 var(--body); color: var(--text-2); }
@keyframes rpBlink { to { visibility: hidden; } }
body.replaying #vignette { box-shadow: inset 0 0 220px rgba(0,0,0,.65); }

/* ---------- position picker ---------- */
.ppos-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding-top: 2px; }
.ppos-label { font: 800 13px/1 var(--display); letter-spacing: .14em; color: var(--text-3); margin-right: 4px; }
.ppos { height: 28px; min-width: 44px; padding: 0 9px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg-1); cursor: pointer;
  font: 800 14px/1 var(--display); letter-spacing: .06em; color: var(--text-2); transition: background var(--t), color var(--t), border-color var(--t); }
.ppos:hover { color: var(--text); border-color: var(--text-3); }
.ppos.sel { background: var(--text); color: var(--gold-ink); border-color: var(--text); }
.pc-badge.def { background: var(--away); box-shadow: inset 0 -3px 0 rgba(255,255,255,.85); font-size: 15px; }

/* ---------- position selects (menu + pause) ---------- */
.set-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.set-two .set-label { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.set-two .set-note { grid-column: 1 / -1; font: 500 13px/1.3 var(--body); color: var(--text-3); }
.pause-settings select.pos-select, .set-two select { height: 38px; padding: 0 8px; background: var(--bg-1); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r); font: 600 15px/1 var(--body); text-transform: none; letter-spacing: 0; }
