/* 3x5 Football — index cards under the Friday night lights.
 * Palette: chrome #0F1813 / turf #1C4B30 / chalk #EFECE1 / cream #FBF5E0
 *          rule #A9C4DA / margin red #CC4B3F / amber #FFB627
 * Type: Graduate (varsity display) · IBM Plex Mono (scoreboard) · Caveat (handwriting)
 */
:root {
  --chrome: #0F1813;
  --chrome-2: #16221B;
  --turf: #1C4B30;
  --turf-dark: #143A24;
  --chalk: #EFECE1;
  --chalk-dim: #B9B7AC;
  --cream: #FBF5E0;
  --cream-shade: #EFE7CB;
  --rule: #A9C4DA;
  --margin: #CC4B3F;
  --amber: #FFB627;
  --ink: #26303B;
  --ink-soft: #52606E;
  --good: #7BC47F;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, #1B2A20 0%, var(--chrome) 60%),
    var(--chrome);
  color: var(--chalk);
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
}
.wrap { max-width: 560px; margin: 0 auto; padding: 12px 12px 48px; }
h1, h2, .display { font-family: 'Graduate', 'IBM Plex Mono', serif; letter-spacing: 0.04em; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ---------- home / lobby ---------- */
.masthead { text-align: center; margin: 26px 0 6px; }
.masthead h1 {
  /* the "3x5 FOOTBALL" wordmark — stack it and let it scale with
     the viewport so it never wraps mid-word on a phone. */
  font-size: clamp(27px, 8.8vw, 46px);
  line-height: 0.95; letter-spacing: 0.01em;
  margin: 0; color: var(--chalk);
  text-shadow: 0 2px 0 #000, 0 0 26px rgba(255, 182, 39, 0.18);
}
.masthead h1 .ttl-b { display: block; color: var(--amber); }
.masthead.compact { margin: 26px 0 10px; }
.masthead.compact h1 { font-size: clamp(15px, 4.4vw, 21px); line-height: 1.1; }
.masthead.compact h1 .ttl-b { display: inline; }
.tagline { color: var(--chalk-dim); font-size: 13px; margin: 4px 0 22px; }
.menu-card { margin: 14px 0; }
.field-row { display: flex; gap: 8px; margin: 8px 0; }
input[type=text] {
  flex: 1; padding: 12px 12px; font-family: inherit; font-size: 16px;
  background: var(--chrome-2); color: var(--chalk);
  border: 1px solid #2C3B31; border-radius: 6px;
}
input[type=text]::placeholder { color: #5E6E63; }
.btn {
  display: inline-block; border: 0; border-radius: 6px;
  padding: 12px 18px; font-size: 15px; font-weight: 600;
  background: var(--turf); color: var(--chalk);
  border-bottom: 3px solid var(--turf-dark);
}
.btn:active { transform: translateY(1px); border-bottom-width: 2px; }
.btn.amber { background: var(--amber); color: #201703; border-bottom-color: #B87F14; }
.btn.ghost { background: transparent; border: 1px solid #33443A; border-bottom-width: 1px; color: var(--chalk-dim); }
.btn.big { width: 100%; padding: 15px; font-size: 17px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.code-echo { font-family: 'Graduate'; font-size: 40px; letter-spacing: 0.28em; color: var(--amber); text-align: center; margin: 8px 0; }
.subtle { color: var(--chalk-dim); font-size: 13px; }
.center { text-align: center; }
.errline { color: #F08A7E; font-size: 13px; min-height: 18px; margin-top: 6px; }

/* ---------- the index card (signature) ---------- */
.card {
  position: relative;
  background:
    repeating-linear-gradient(to bottom,
      transparent 0, transparent 27px,
      var(--rule) 27px, var(--rule) 28px),
    var(--cream);
  background-position: 0 14px;
  border-radius: 5px;
  box-shadow: 0 1px 0 #fff inset, 0 6px 18px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.5);
  color: var(--ink);
  padding: 14px 14px 12px 26px;
}
.card::before { /* red margin line */
  content: ''; position: absolute; top: 0; bottom: 0; left: 18px;
  width: 1.5px; background: var(--margin); opacity: 0.75;
}
.card .pin { /* little tape corner */
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 74px; height: 16px; background: rgba(233, 214, 160, 0.85);
  box-shadow: 0 1px 2px rgba(0,0,0,0.25); border-radius: 2px;
}
.hand { font-family: 'Caveat', cursive; }

/* player card */
.pcard { padding-top: 10px; min-height: 118px; }
.pcard .pos-tab {
  position: absolute; top: -9px; right: 10px;
  font-family: 'Graduate'; font-size: 11px; letter-spacing: 0.1em;
  background: var(--ink); color: var(--cream); padding: 3px 8px; border-radius: 3px;
}
.pcard .pname { font-family: 'Caveat'; font-size: 24px; line-height: 1; color: #1E2833; margin: 0; }
.pcard .pnick { font-family: 'Graduate'; font-size: 11px; color: var(--margin); letter-spacing: 0.06em; margin: 2px 0 6px; }
.pcard .pblurb { font-size: 11.5px; line-height: 1.5; color: var(--ink-soft); font-family: 'IBM Plex Mono'; }
.pcard.taken { filter: grayscale(0.9) contrast(0.82); opacity: 0.55; }
.pcard.taken .stamp {
  position: absolute; inset: auto 8px 26px auto; transform: rotate(-11deg);
  font-family: 'Graduate'; font-size: 15px; letter-spacing: 0.14em;
  color: var(--margin); border: 2.5px solid var(--margin);
  padding: 2px 9px; border-radius: 3px; opacity: 0.9; background: rgba(251,245,224,0.6);
}
.pcard.pickable { cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease; }
.pcard.pickable:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 10px 22px rgba(0,0,0,0.55); }
.pcard.dim { opacity: 0.5; }

/* ---------- scoreboard ---------- */
.scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: linear-gradient(#182420, #121B16);
  border: 1px solid #24332A; border-radius: 8px;
  padding: 10px 12px; margin-bottom: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.sb-team { text-align: center; }
.sb-team .tname { font-size: 12px; color: var(--chalk-dim); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; margin: 0 auto; }
.sb-team .tscore { font-family: 'Graduate'; font-size: 34px; color: var(--amber); line-height: 1.05; text-shadow: 0 0 14px rgba(255,182,39,0.35); }
.sb-team.has-ball .tname::after { content: ' ●'; color: var(--amber); }
.sb-mid { text-align: center; padding: 0 12px; }
.sb-mid .qtr { font-family: 'Graduate'; font-size: 13px; color: var(--chalk); }
.sb-mid .clk { font-size: 20px; color: var(--chalk); letter-spacing: 0.06em; }
.sb-mid .clk.running { color: var(--good); }
.to-pips { font-size: 10px; letter-spacing: 3px; color: var(--amber); }
.to-pips .spent { color: #3A4A40; }

/* ---------- field strip (broadcast-style) ---------- */
.fieldstrip {
  position: relative; height: 84px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(#1F5232, #17402A);
  border: 1px solid #2A5A3C; margin-bottom: 4px;
}
.fieldstrip .ez { position: absolute; top: 0; bottom: 0; width: 6%; background: rgba(0,0,0,0.35); z-index: 1; }
.fieldstrip .ez.l { left: 0; border-right: 2px solid var(--chalk); }
.fieldstrip .ez.r { right: 0; border-left: 2px solid var(--chalk); }
.fieldstrip .yl {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: rgba(239,236,225,0.28); pointer-events: none;
}
.fieldstrip .yardnum {
  position: absolute; top: 5px; transform: translateX(-50%);
  font-family: 'Graduate'; font-size: 9px; letter-spacing: 0.04em;
  color: rgba(239,236,225,0.5); pointer-events: none;
}
.fieldstrip .hash {
  position: absolute; bottom: 4px; width: 1px; height: 5px;
  background: rgba(239,236,225,0.3); pointer-events: none;
}
.fieldstrip .hash.h5 { height: 8px; background: rgba(239,236,225,0.5); }
.fieldstrip .los {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--chalk);
  box-shadow: 0 0 6px rgba(239,236,225,0.55); opacity: 0.9; z-index: 2;
  transition: left 350ms ease 780ms;
}
.fieldstrip .ltg {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--amber);
  box-shadow: 0 0 8px rgba(255,182,39,0.8); z-index: 2;
  transition: left 300ms ease 780ms;
}
.fieldstrip .ball {
  position: absolute; top: 46%; transform: translate(-50%, -50%);
  font-size: 18px; z-index: 3;
  transition: left 780ms cubic-bezier(0.3, 0.7, 0.35, 1);
}
/* reveal choreography drives the ball; lines hold until the world advances */
.fieldstrip .ball._x {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.7));
}
.fieldstrip .dir { position: absolute; bottom: 12px; font-size: 10px; color: rgba(239,236,225,0.75); z-index: 1; }

/* ---------- play banner: what just happened ---------- */
.playbanner {
  margin: 6px 0 10px; padding: 10px 12px;
  border-left: 4px solid #3A4F42; background: var(--chrome-2);
  border-radius: 0 6px 6px 0; font-size: 14px; line-height: 1.45; color: var(--chalk);
  animation: bannerPop 380ms ease;
}
.playbanner .pb-clock { color: #6F8377; font-size: 11px; margin-right: 8px; }
.playbanner.k-score { border-left-color: var(--amber); background: #262B18; }
.playbanner.k-turnover { border-left-color: var(--margin); background: #2A1D1A; }
.playbanner.k-period, .playbanner.k-final { border-left-color: #8FC5E8; }
.playbanner.k-info { border-left-color: #55705F; color: var(--chalk-dim); }
@keyframes bannerPop {
  from { opacity: 0; transform: translateY(-6px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

/* ---------- situation + call sheet ---------- */
.situation { text-align: center; margin: 4px 0 10px; }
.situation .dd { font-family: 'Graduate'; font-size: 18px; color: var(--chalk); }
.situation .role { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.situation .role.off { color: var(--amber); }
.situation .role.def { color: #8FC5E8; }

.callsheet { margin: 0 0 14px; transform: rotate(-0.35deg); }
.callsheet .cs-head { font-family: 'Graduate'; font-size: 12px; letter-spacing: 0.12em; color: var(--ink-soft); margin-bottom: 6px; }
.playbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 4px; }
.playbtn {
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  border-radius: 6px; padding: 13px 6px; font-family: 'Graduate'; font-size: 17px;
  letter-spacing: 0.06em;
}
.playbtn.small { font-size: 13px; padding: 9px 4px; }
.playbtn.sel { background: var(--ink); color: var(--cream); }
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.chip {
  border: 1.5px dashed var(--ink-soft); background: transparent; color: var(--ink);
  padding: 7px 10px; border-radius: 999px; font-size: 13px; font-family: 'IBM Plex Mono';
}
.chip.sel { border-style: solid; background: var(--margin); border-color: var(--margin); color: var(--cream); }
.tinylabel { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 8px; }
.to-row { margin-top: 8px; font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.to-row input { transform: scale(1.25); accent-color: var(--margin); }
.written { font-family: 'Caveat'; font-size: 26px; color: #203040; min-height: 34px; margin-top: 6px; transform: rotate(-0.6deg); }
.lockbtn {
  margin-top: 8px; width: 100%; border: 0; border-radius: 6px;
  background: var(--margin); color: var(--cream);
  font-family: 'Graduate'; font-size: 17px; letter-spacing: 0.1em; padding: 13px;
  border-bottom: 3px solid #96352C;
}
.lockbtn:disabled { opacity: 0.4; }
.lockedmsg { text-align: center; padding: 14px 6px 4px; }
.lockedmsg .hand { font-size: 28px; color: #203040; }
.fgnote { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- log ---------- */
.loghead { font-family: 'Graduate'; font-size: 12px; letter-spacing: 0.14em; color: var(--chalk-dim); margin: 14px 0 6px; }
.log { list-style: none; margin: 0; padding: 0; }
.log li {
  padding: 8px 10px; border-left: 3px solid #2A3A30; margin-bottom: 6px;
  background: var(--chrome-2); border-radius: 0 5px 5px 0; font-size: 13px; color: var(--chalk-dim);
}
.log li .lc { color: #6F8377; font-size: 11px; margin-right: 8px; }
.log li.k-score { border-left-color: var(--amber); color: var(--chalk); background: #23291B; }
.log li.k-turnover { border-left-color: var(--margin); color: var(--chalk); }
.log li.k-period, .log li.k-final { border-left-color: #8FC5E8; color: var(--chalk); }
.log li.k-draft { border-left-color: #55705F; }

/* ---------- draft ---------- */
.draftbanner { text-align: center; margin: 10px 0 12px; }
.draftbanner .who { font-family: 'Graduate'; font-size: 20px; color: var(--amber); }
.draftbanner .cnt { font-size: 12px; color: var(--chalk-dim); }
.cardgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .cardgrid { grid-template-columns: 1fr; } }
.rostertray { margin-top: 16px; }
.rostertray h3 { font-family: 'Graduate'; font-size: 13px; color: var(--chalk-dim); margin: 10px 0 6px; letter-spacing: 0.1em; }
.rosterline { font-size: 13px; color: var(--chalk); margin: 2px 0; }
.rosterline .pos { color: var(--amber); display: inline-block; width: 42px; }

/* ---------- final ---------- */
.finalbox { text-align: center; margin: 26px 0; }
.finalbox .fscore { font-family: 'Graduate'; font-size: 30px; color: var(--amber); margin: 12px 0; }

/* spectator oversize */
body.spectator .sb-team .tscore { font-size: 52px; }
body.spectator .masthead h1 { font-size: clamp(23px, 6.6vw, 36px); }

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

/* ---------- game bar: code + leave ---------- */
.gamebar {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--chalk-dim); margin: 0 0 8px; gap: 10px;
}
.gamebar .gcode { letter-spacing: 0.12em; }
.gamebar .gcode b { color: var(--amber); letter-spacing: 0.22em; font-size: 14px; }
.gamebar .leavebtn {
  background: transparent; border: 1px solid #33443A; color: var(--chalk-dim);
  border-radius: 5px; padding: 5px 10px; font-size: 12px; font-family: inherit;
}
/* ---------- resume banner ---------- */
.resume-card { margin: 14px 0 4px; }
.resume-card .rc-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.resume-card .rc-code { font-family: 'Graduate'; font-size: 22px; letter-spacing: 0.2em; color: var(--margin); }
/* ---------- draft position sections ---------- */
.possec { margin-bottom: 18px; }
.possec-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: 'Graduate'; font-size: 13px; letter-spacing: 0.12em;
  color: var(--chalk); margin: 0 2px 8px;
}
.possec-head .left-count { font-family: 'IBM Plex Mono'; font-size: 12px; color: var(--amber); }
.possec-head .left-count.none { color: var(--chalk-dim); }
.possec-cards { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.possec-cards .pcard { flex: 0 1 calc(50% - 5px); min-width: 150px; }

.sb-mid .sb-code {
  font-size: 10px; letter-spacing: 0.3em; color: var(--chalk-dim);
  margin-top: 2px; border-top: 1px solid #26352C; padding-top: 3px;
}

/* ---------- snap-clock note on the call sheet ---------- */
.clocknote {
  margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft);
  background: rgba(38, 48, 59, 0.06); border-left: 3px solid var(--ink-soft);
  padding: 7px 9px; border-radius: 0 4px 4px 0;
}
.clocknote b { color: var(--ink); }
.clocknote.urgent {
  color: #8C2F26; border-left-color: var(--margin); background: rgba(204, 75, 63, 0.1);
  animation: bannerPop 300ms ease;
}
.clocknote.urgent b { color: #8C2F26; }
.to-row.urgent { outline: 2px solid var(--margin); outline-offset: 3px; border-radius: 4px; }

.fieldstrip .ball { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.7)); }

/* ---------- the whistle ---------- */
.tobtn {
  display: block; width: 100%; margin-top: 8px; padding: 11px;
  font-family: 'Graduate'; font-size: 13px; letter-spacing: 0.08em;
  background: var(--ink); color: var(--cream);
  border: 2px solid var(--ink); border-radius: 6px;
  box-shadow: 0 2px 5px rgba(38, 48, 59, 0.3);
}
.tobtn:active { filter: brightness(1.15); }
.tobtn.urgent { animation: whistlePulse 1s ease infinite; }
@keyframes whistlePulse {
  0%, 100% { box-shadow: 0 2px 5px rgba(38,48,59,0.3); }
  50% { box-shadow: 0 0 0 3px rgba(255,182,39,0.75); }
}
.tobtn:disabled { opacity: 0.5; }

/* ---------- live clock extras ---------- */
.sb-mid .clk-wait {
  font-size: 9.5px; letter-spacing: 0.08em; color: var(--chalk-dim);
  margin-top: 2px; animation: waitPulse 1.6s ease infinite;
}
@keyframes waitPulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
.sb-mid .clk.rolling { color: var(--amber); text-shadow: 0 0 10px rgba(255,182,39,0.5); }

.tobtn.runout {
  background: transparent; color: var(--ink-soft);
  border: 2px dashed var(--ink-soft); box-shadow: none;
  font-size: 12px; padding: 9px;
}
.tobtn.runout:active { background: rgba(38,48,59,0.06); filter: none; }

/* ---------- pace ---------- */
.pacerow { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pacerow .tinylabel { margin: 0 4px 0 0; }
.chip.pace.sel { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pacetag {
  margin-top: 5px; font-size: 11px; letter-spacing: 0.1em;
  font-family: 'Graduate';
}
.pacetag.hurry { color: var(--amber); animation: waitPulse 1.2s ease infinite; }
.pacetag.slow { color: var(--rule); }

/* ---------- box score ---------- */
.sheettabs { display: flex; gap: 8px; margin: 14px 0 8px; }
.boxscore {
  background: var(--chrome-2); border: 1px solid #26352C; border-radius: 6px;
  padding: 12px; font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  color: var(--chalk); margin-bottom: 14px;
}
/* the quarter-by-quarter line above the stats */
.linescore { margin: 2px 0 10px; font-family: 'IBM Plex Mono'; font-size: 12.5px; }
.ls-row { display: grid; grid-template-columns: 1.2fr repeat(var(--ls-cols, 4), 1fr) 1fr; gap: 6px; padding: 3px 0; border-bottom: 1px dotted #26352C; }
.ls-row span, .ls-row b { text-align: right; }
.ls-row .ls-t { text-align: left; color: var(--chalk-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-row.ls-head { font-family: 'Graduate'; font-size: 10px; letter-spacing: 0.1em; color: var(--chalk-dim); border-bottom: 1px solid #3A4F42; }
.ls-row .ls-tot { color: var(--amber); font-weight: 600; }
.halftime .linescore { max-width: 300px; margin: 0 auto 14px; }
.bs-table { margin-bottom: 4px; }
.bs-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 6px; padding: 3px 0; border-bottom: 1px dotted #26352C; }
.bs-row.head { font-family: 'Graduate'; font-size: 11px; letter-spacing: 0.08em; color: var(--amber); border-bottom: 1px solid #3A4F42; }
.bs-l { color: var(--chalk-dim); }
.bs-v { text-align: right; }
.bs-teamhead { font-family: 'Graduate'; font-size: 11px; letter-spacing: 0.1em; color: var(--amber); margin: 12px 0 4px; }
.bs-player { padding: 2px 0; color: var(--chalk-dim); line-height: 1.5; }
.bs-player b { color: var(--chalk); }
.bs-player .pos {
  display: inline-block; min-width: 30px; font-size: 10px; color: var(--rule);
}

/* ---------- lineup / subs ---------- */
.lineup { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.lineup .tinylabel { margin: 0; }
.lu-slot { font-size: 13px; color: var(--ink-soft); }
.lu-slot .pos { font-size: 10px; color: var(--margin); margin-right: 3px; }
.lu-slot b { color: var(--ink); }
.chip.subchip { border-style: dashed; }
.chip.pace.spent { opacity: 0.45; text-decoration: line-through; }

/* ---------- call sheet zones ---------- */
.pillrow { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pill {
  font-family: 'Graduate'; font-size: 10.5px; letter-spacing: 0.06em;
  padding: 6px 11px; border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  border: 1.5px solid var(--ink-soft);
}
.pill.sel { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.sideline {
  margin-top: 12px; padding-top: 8px;
  border-top: 2px dashed rgba(38, 48, 59, 0.25);
}
.slstrip {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  width: 100%; text-align: left; padding: 6px 2px;
  background: transparent; border: none; font-family: inherit;
  font-size: 12px; color: var(--ink-soft); cursor: pointer;
}
.slstrip b { color: var(--ink); font-weight: 600; }
.slstrip .pos { font-size: 9.5px; color: var(--margin); margin-right: 2px; }
.slstrip .dot { opacity: 0.4; }
.slstrip .sl-tog {
  margin-left: auto; font-family: 'Graduate'; font-size: 9.5px;
  letter-spacing: 0.12em; color: var(--ink-soft);
  border: 1px solid rgba(38,48,59,0.3); border-radius: 999px; padding: 3px 9px;
}
.slpanel { padding: 4px 0 2px; }
.slpanel .lineup { margin-top: 4px; }
.slpanel .pacerow { margin-top: 8px; }
/* ---------- final actions ---------- */
.final-actions { display: flex; flex-direction: column; gap: 9px; margin: 16px 0 18px; }

/* ---------- the read + the other look ---------- */
.playbanner .pb-read {
  margin-top: 6px; padding-top: 5px; border-top: 1px dotted rgba(239,236,225,0.15);
  font-size: 12px; color: var(--chalk-dim);
}
.playbanner .pb-read b { color: var(--chalk); font-weight: 600; }
.playbanner .pb-badge {
  font-family: 'Graduate'; font-size: 10px; letter-spacing: 0.08em;
  padding: 1px 7px; border-radius: 999px; margin-right: 6px;
}
.playbanner .pb-read.hit .pb-badge { background: rgba(255,182,39,0.18); color: var(--amber); }
.playbanner .pb-read.miss .pb-badge { background: rgba(239,236,225,0.08); color: var(--chalk-dim); }
.readtag {
  display: inline-block; width: 15px; text-align: center; margin-right: 4px;
  font-size: 11px; font-weight: 700;
}
.readtag.hit { color: var(--amber); }
.readtag.miss { color: #55705F; }

/* ---------- the huddle ---------- */
.resultblock {
  margin-top: 10px; padding: 10px 12px; border-radius: 6px;
  background: var(--chrome); color: var(--chalk);
  border-left: 4px solid #3A4F42; font-size: 13.5px; line-height: 1.5;
}
.resultblock .rb-clock { font-size: 10.5px; color: #6F8377; margin-bottom: 3px; }
.resultblock.k-score { border-left-color: var(--amber); }
.resultblock.k-turnover { border-left-color: var(--margin); }
.resultblock.k-period, .resultblock.k-final { border-left-color: #8FC5E8; }
.resultblock.k-info { border-left-color: #55705F; color: var(--chalk-dim); }
.resultblock .pb-read { border-top-color: rgba(239,236,225,0.12); }
.hudbtn {
  display: block; width: 100%; margin-top: 12px; padding: 13px;
  font-family: 'Graduate'; font-size: 15px; letter-spacing: 0.1em;
  background: var(--amber); color: #2A1F04;
  border: none; border-radius: 6px;
  box-shadow: 0 2px 6px rgba(255, 182, 39, 0.4);
}
.hudbtn:active { filter: brightness(0.94); }
.backhud {
  display: block; margin: 10px auto 0; padding: 4px 10px;
  background: transparent; border: none; font-family: inherit;
  font-size: 12px; color: var(--ink-soft); text-decoration: underline dotted;
}
.playbanner.k-stage { border-left-color: #55705F; color: var(--chalk-dim); }
.playbanner.k-stage i { font-style: italic; }

/* ---------- snap line under the clock ---------- */
.sb-mid .sb-snap {
  font-size: 9px; letter-spacing: 0.14em; color: var(--chalk-dim);
  margin-top: 2px; border-top: 1px solid #26352C; padding-top: 3px;
}
.sb-mid .sb-snap.warn { color: var(--margin); animation: waitPulse 1.2s ease infinite; }
/* sideline tab: dark-context lineup */
.sidepane .lineup .tinylabel { color: var(--chalk-dim); }
.sidepane .lu-slot { color: var(--chalk-dim); }
.sidepane .lu-slot b { color: var(--chalk); }
.sidepane .chip { border-color: #3A4F42; color: var(--chalk-dim); background: transparent; }
.sidepane .chip.sel { background: var(--chalk); color: var(--chrome); border-color: var(--chalk); }
.sidepane .pacerow .tinylabel { color: var(--chalk-dim); }
.sidepane .subtle { margin-top: 8px; }
.callsheet.huddle .hudbtn { margin-top: 16px; }

/* ---------- ball flight ---------- */
@keyframes ballArc {
  0% { transform: translate(-50%, -50%); }
  45% { transform: translate(-50%, -230%) rotate(20deg); }
  100% { transform: translate(-50%, -50%) rotate(40deg); }
}
@keyframes ballBigArc {
  0% { transform: translate(-50%, -50%); }
  40% { transform: translate(-50%, -330%) rotate(30deg); }
  100% { transform: translate(-50%, -50%) rotate(60deg); }
}
@keyframes ballBounce {
  0% { transform: translate(-50%, -50%); }
  30% { transform: translate(-50%, 10%) scale(0.94); }
  60% { transform: translate(-50%, -110%); }
  100% { transform: translate(-50%, -50%); }
}
.fieldstrip .ball.arc { animation: ballArc 780ms cubic-bezier(0.3,0.6,0.4,1); }
.fieldstrip .ball.bigarc { animation: ballBigArc 1100ms cubic-bezier(0.3,0.6,0.4,1); }
.fieldstrip .ball.bounce { animation: ballBounce 380ms ease; }
@media (prefers-reduced-motion: reduce) {
  .fieldstrip .ball.arc, .fieldstrip .ball.bigarc, .fieldstrip .ball.bounce { animation: none; }
}

/* ---------- halftime curtain ---------- */
.halftime {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 24, 19, 0.96);
  display: flex; align-items: center; justify-content: center;
  animation: bannerPop 400ms ease;
}
.ht-inner { width: min(420px, 88vw); text-align: center; }
.ht-title {
  font-family: 'Graduate'; font-size: 44px; letter-spacing: 0.18em;
  color: var(--amber); text-shadow: 0 0 24px rgba(255,182,39,0.35);
}
.ht-score { margin: 10px 0 18px; font-size: 17px; color: var(--chalk); }
.ht-score b { font-family: 'Graduate'; font-size: 26px; color: var(--amber); margin: 0 4px; }
.ht-dash { color: var(--chalk-dim); margin: 0 6px; }
.ht-stats {
  font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; color: var(--chalk);
  border-top: 1px solid #26352C; border-bottom: 1px solid #26352C;
  padding: 10px 0; margin-bottom: 20px;
}
.ht-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; padding: 4px 0; }
.ht-row span:first-child { text-align: right; }
.ht-row span:last-child { text-align: left; }
.ht-row .ht-l { color: var(--chalk-dim); font-size: 10px; letter-spacing: 0.14em; align-self: center; }
.halftime .hudbtn { max-width: 320px; margin: 0 auto; }
/* stage badge: the defense's call, verdict withheld */
.pb-badge.dcall {
  background: rgba(169, 196, 218, 0.14); color: var(--rule);
  margin-right: 8px;
}

/* ---------- FG pill: out-of-range state ---------- */
.pill.dim {
  opacity: 0.45;
  border-color: rgba(38, 48, 59, 0.2);
  color: var(--ink-soft);
}
.pill.dim.sel { opacity: 0.9; }   /* if selected while out of range, still legible */
.fgnote.warn { color: var(--margin); }

/* ---------- simulate rest ---------- */
hr.simdivider {
  margin: 14px 0 10px; border: none;
  border-top: 1px solid rgba(38, 48, 59, 0.2);
}
.simchip { margin-top: 6px; display: block; width: 100%; text-align: center; }
.simask {
  font-size: 12px; color: var(--chalk-dim); margin-bottom: 6px;
}

/* --- run-out-the-clock: armed state + the defense's last-chance warning --- */
.tobtn.runout.armed {
  background: #6b2d2d;
  border-color: #a04b4b;
  color: #ffd9d9;
  animation: runout-pulse 1.4s ease-in-out infinite;
}
@keyframes runout-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.72; } }
.runout-warn {
  margin: 8px 0 2px;
  padding: 9px 11px;
  border: 1px solid #a04b4b;
  border-radius: 6px;
  background: #2a1414;
  color: #ffd9d9;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.rosterline .ptag { opacity: 0.55; font-style: italic; }

/* stopped-clock label: same slot as SNAP AT, deliberately muted — it's status,
   not an alarm */
.sb-snap.stopped { color: var(--chalk-dim); opacity: 0.85; letter-spacing: 0.06em; }

/* ---------- dice pane: the rolls that decided each play ---------- */
.dicepane .diceplay { font-size: 13px; margin: 4px 0 10px; color: var(--chalk); }
.dicecard {
  border: 1px solid #2C3B31; border-radius: 6px; padding: 9px 11px; margin: 8px 0;
  background: var(--chrome-2); font-family: 'IBM Plex Mono', monospace; font-size: 12px;
}
.dicecard.read { border-color: #6b4d1e; }
.dicecard.unread { opacity: 0.8; }
.dc-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.dc-who { font-weight: 600; color: var(--chalk); }
.dc-what { color: var(--chalk-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; text-align: right; }
.dc-line { margin: 3px 0; line-height: 1.4; }
.dc-line.dim, .dicecard .dim { color: var(--chalk-dim); }
.dicebar { position: relative; height: 8px; margin: 6px 0 4px; background: #1c2620; border-radius: 4px; overflow: hidden; }
.dicebar .zone { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 182, 39, 0.22); }
.dicebar .pip { position: absolute; top: -1px; width: 3px; height: 10px; margin-left: -1px; background: var(--amber); border-radius: 1px; box-shadow: 0 0 6px rgba(255, 182, 39, 0.6); }
.dicetrail { list-style: none; margin: 4px 0 8px; padding: 0; font-size: 12px; }
.dicetrail li { padding: 4px 0; border-bottom: 1px solid #1f2a24; display: flex; gap: 8px; align-items: baseline; }
.dicetrail .lc { flex: none; }
.dm { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--chalk-dim); white-space: nowrap; }
.log .dm { margin-left: 8px; opacity: 0.75; }

/* ---------- the call sheet: type + target, one tap ---------- */
.callgroup { margin: 8px 0 4px; }
.callgroup-head { font-family: 'Graduate', 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.12em; color: var(--chalk-dim); margin: 0 0 5px 2px; }
.callchips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.callchip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 8px 4px 7px; min-height: 52px;
  background: var(--chrome-2); color: var(--chalk); border: 1px solid #2C3B31; border-radius: 6px;
  font-family: 'IBM Plex Mono', monospace; cursor: pointer; text-align: center;
}
.callchip .cc-main { font-family: 'Graduate', 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.04em; line-height: 1.1; }
.callchip .cc-sub { font-size: 9.5px; color: var(--chalk-dim); line-height: 1.15; }
.callchip.sel { border-color: var(--amber); background: #3a2d10; box-shadow: 0 0 0 1px var(--amber) inset; }
.callchip.sel .cc-sub { color: var(--chalk); }
@media (max-width: 380px) { .callchip .cc-sub { font-size: 8.5px; } .callchip .cc-main { font-size: 11px; } }
.pb-badge.ocall { margin-right: 6px; opacity: 0.85; }
.runout-warn.subnote { border-color: #6b4d1e; background: #2a2114; color: #ffe9b8; }
.callnote { margin: 6px 2px 2px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; line-height: 1.4; color: var(--chalk-dim); }

/* =====================================================================
   UI pass — the coach's index card
   The call sheet is a cream index card; everything on it is ink on card:
   ruled boxes for the calls, a filled ink stamp for the one you picked, a
   pencilled note underneath, the call written by hand, a red stamp to lock.
   ===================================================================== */
.callsheet .callgroup { margin: 9px 0 0; }
.callsheet .callgroup-head {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Graduate'; font-size: 11px; letter-spacing: 0.1em;
  color: var(--ink-soft); margin: 0 0 5px;
}
.callsheet .callgroup-head::after { content: ''; flex: 1; height: 1px; background: rgba(38,48,59,0.18); }
.callsheet .callchips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.callsheet .callchip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 54px; padding: 7px 3px 6px;
  background: rgba(255,255,255,0.35); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 4px;
  font-family: 'IBM Plex Mono'; text-align: center;
  box-shadow: none;
}
.callsheet .callchip .cc-main { font-family: 'Graduate'; font-size: 11.5px; letter-spacing: 0.03em; line-height: 1.1; color: var(--ink); }
.callsheet .callchip .cc-sub { font-size: 9px; line-height: 1.2; color: var(--ink-soft); }
.callsheet .callchip.any { border-style: dashed; border-color: var(--ink-soft); }
.callsheet .callchip.sel { background: var(--ink); border-color: var(--ink); }
.callsheet .callchip.sel .cc-main { color: var(--cream); }
.callsheet .callchip.sel .cc-sub { color: rgba(251,245,224,0.8); }
.callsheet .callchip:active { transform: translateY(1px); }
@media (max-width: 380px) {
  .callsheet .callchip .cc-main { font-size: 10.5px; }
  .callsheet .callchip .cc-sub { font-size: 8.5px; }
}
/* the pencilled note under the chips */
.callsheet .callnote {
  font-family: 'Caveat', cursive; font-size: 17px; line-height: 1.25;
  color: #3A4654; margin: 8px 2px 0; transform: rotate(-0.3deg);
}
/* notices on the card are ink on cream, not the chrome's dark red */
.callsheet .runout-warn, .callsheet .runout-warn.subnote {
  background: rgba(204,75,63,0.08); border: 1.5px solid var(--margin); color: #7A2A22;
  font-family: 'Caveat', cursive; font-size: 17px; line-height: 1.25; padding: 7px 10px; margin: 8px 0 2px;
}
.callsheet .pillrow { margin-top: 10px; }
.callsheet .pill.dim { opacity: 0.55; }
.callsheet .fgnote { font-family: 'Caveat', cursive; font-size: 16px; color: #3A4654; margin-top: 5px; }
.callsheet .fgnote.warn { color: #8C2F26; }
.callsheet .written { margin-top: 10px; }

/* ---------- draft cards: what the decks say ---------- */
.pcard .pdeck {
  margin: 7px 0 2px; font-family: 'IBM Plex Mono'; font-size: 10px; line-height: 1.45;
  color: var(--ink); letter-spacing: 0.01em;
}
.pcard .pdeck b { font-weight: 600; color: #1E2833; }
.pcard .pdeck .bar { display: inline-block; letter-spacing: 1px; color: var(--margin); }

/* ---------- the draw: each card is an index card with the number drawn ---------- */
.dicecard {
  display: grid; grid-template-columns: 62px 1fr; gap: 0 10px; align-items: start;
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent 21px, rgba(169,196,218,0.55) 21px, rgba(169,196,218,0.55) 22px),
    var(--cream);
  background-position: 0 10px;
  color: var(--ink); border: 0; border-radius: 4px;
  box-shadow: 0 1px 0 #fff inset, 0 4px 12px rgba(0,0,0,0.4);
  padding: 9px 11px 9px 10px;
}
.dicecard.read { outline: 2px solid var(--amber); outline-offset: -2px; }
.dicecard.unread { opacity: 0.85; }
.dicecard .dc-num {
  grid-row: 1 / span 3; align-self: center;
  font-family: 'Graduate'; font-size: 34px; line-height: 1; color: var(--margin);
  text-align: center; border-right: 1.5px solid rgba(204,75,63,0.6); padding-right: 8px;
}
.dicecard .dc-num small { display: block; font-family: 'IBM Plex Mono'; font-size: 8.5px; letter-spacing: 0.08em; color: var(--ink-soft); margin-top: 3px; }
.dicecard .dc-head { grid-column: 2; margin-bottom: 4px; }
.dicecard .dc-who { color: #1E2833; }
.dicecard .dc-what { color: var(--ink-soft); }
.dicecard .dc-line { grid-column: 2; color: var(--ink); }
.dicecard .dc-line b { color: #1E2833; }
.dicecard .dc-line.dim, .dicecard .dim { color: var(--ink-soft); }
.dicecard .dicebar { grid-column: 2; background: rgba(38,48,59,0.12); }
.dicecard .dicebar .zone { background: rgba(123,196,127,0.35); }
.dicecard .dicebar .pip { background: var(--margin); box-shadow: 0 0 4px rgba(204,75,63,0.6); }
.dicepane .diceplay { font-family: 'Caveat', cursive; font-size: 18px; color: var(--chalk); margin: 2px 0 8px; }

/* ---------- sideline: who's on the field, with their decks ---------- */
.sidepane .lineup { display: flex; flex-direction: column; gap: 6px; }
.sidepane .lu-slot { display: flex; flex-direction: column; gap: 1px; padding: 6px 0 2px; }
.sidepane .lu-slot .pos { color: var(--amber); font-size: 11px; letter-spacing: 0.1em; }
.sidepane .lu-deck { display: block; font-family: 'IBM Plex Mono'; font-size: 10.5px; color: var(--chalk-dim); letter-spacing: 0.01em; }
.sidepane .lu-deck b { color: var(--chalk); font-weight: 600; }
.sidepane .lu-deck .bar { color: var(--amber); }
.sidepane .subchip { text-align: left; border-radius: 6px; padding: 7px 10px; line-height: 1.3; }
.sidepane .subchip .lu-deck { margin-top: 2px; }
.playbanner .pb-badge i { font-style: normal; opacity: 0.75; font-weight: 400; margin-left: 3px; }

/* ---------- the ladder: what every read would have done to this play ----------
   Four rungs, one number each: +22 / −6 / 0 inc / INT. The rung that
   actually happened is lit. */
.playbanner .ladder {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
}
.playbanner .ladder li {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; border-radius: 4px;
  background: rgba(239,236,225,0.05); border: 1px solid rgba(239,236,225,0.1);
  color: var(--chalk-dim);
}
.playbanner .ladder li .ll { font-size: 9.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.playbanner .ladder li .lr { font-family: 'Graduate'; font-size: 17px; line-height: 1; color: var(--chalk); }
.playbanner .ladder li.to .lr { color: #F08A7E; }
.playbanner .ladder li.na { opacity: 0.4; }
.playbanner .ladder li.actual {
  background: rgba(255,182,39,0.14); border-color: var(--amber); color: var(--chalk);
}
.playbanner .ladder li.actual .lr { color: var(--amber); }
.playbanner .ladder li.actual .ll::before { content: '▶ '; color: var(--amber); }
.playbanner .pb-read .pb-badge.ocall { margin-right: 6px; }

/* drive sheet: the four numbers after every play line */
.log .lm { margin-left: 8px; font-family: 'IBM Plex Mono'; font-size: 11px; white-space: nowrap; color: #6F8377; }
.log .lm b { font-weight: 400; color: #8A9A90; }
.log .lm b.act { color: var(--amber); font-weight: 600; }
.log .lm b.to { color: #F08A7E; }
.log .lm i { font-style: normal; margin: 0 3px; opacity: 0.5; }
.playbanner .ladder li.na { opacity: 0.55; }
.playbanner .ladder li.na .lr { font-size: 13px; color: var(--chalk-dim); }
.playbanner .ladder li .lw { font-size: 8.5px; line-height: 1.15; color: var(--chalk-dim); text-align: center; }

/* ---------- personnel: who's on the field ---------- */
.callsheet .unitrow { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 2px; }
.callsheet .unitchip {
  padding: 8px 6px; border: 1.5px dashed var(--ink-soft); border-radius: 4px; background: transparent;
  font-family: 'Graduate'; font-size: 11px; letter-spacing: 0.06em; color: var(--ink-soft);
}
.callsheet .unitchip.sel { border-style: solid; border-color: var(--margin); color: var(--margin); background: rgba(204,75,63,0.06); }
.callsheet .callchips.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* defense chips carry a label only; the result boxes do the explaining */
.callsheet .callchips.plain .callchip { min-height: 40px; padding: 9px 4px; }
.callsheet .callchip.blitz { border-color: var(--margin); }
.callsheet .callchip.blitz .cc-main { color: var(--margin); }
.callsheet .callchip.blitz.sel { background: var(--margin); border-color: var(--margin); }
.callsheet .callchip.blitz.sel .cc-main { color: var(--cream); }
/* the ladder in the setup: boxes drawn, the earned rung lit, values still face-down */
.playbanner .ladder.setup li .lr { color: rgba(239,236,225,0.25); }
.playbanner .ladder.setup li.actual .lr { color: rgba(255,182,39,0.45); }
.playbanner .ladder li.blank .lr { letter-spacing: 0.1em; }

/* THE DRAW: yards are the hero on the offense card */
.dicecard .dc-num.yds b { display: block; font-size: 30px; line-height: 1; color: #1E2833; }
.dicecard .dc-num.yds small { color: var(--ink-soft); }
/* the four boxes, on cream */
.dicecard .ladder {
  grid-column: 2; list-style: none; margin: 6px 0 2px; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
}
.dicecard .ladder li {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 3px;
  border: 1px solid rgba(38,48,59,0.35); border-radius: 3px; background: rgba(255,255,255,0.3); color: var(--ink-soft);
}
.dicecard .ladder li .ll { font-size: 8.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.dicecard .ladder li .lr { font-family: 'Graduate'; font-size: 15px; line-height: 1; color: #1E2833; }
.dicecard .ladder li .lw { font-size: 7.5px; text-align: center; color: var(--ink-soft); }
.dicecard .ladder li.to .lr { color: var(--margin); }
.dicecard .ladder li.na { opacity: 0.5; }
.dicecard .ladder li.actual { border: 1.5px solid var(--margin); background: rgba(204,75,63,0.08); color: var(--ink); }
.dicecard .ladder li.actual .lr { color: var(--margin); }
.dicecard .ladder li.actual .ll::before { content: '▶ '; color: var(--margin); }

/* THE DRAW: previous plays, and the deck laid out */
.drawhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.drawhead .drawlatest { padding: 4px 9px; font-size: 11px; }
.dicetrail li { cursor: pointer; }
.dicetrail li.cur { color: var(--amber); }
.dicetrail li:hover { background: rgba(239,236,225,0.04); }
.log .dm { cursor: pointer; }
.deckstrip {
  grid-column: 2; display: grid; grid-template-columns: repeat(20, 1fr); gap: 1.5px; margin: 7px 0 2px;
}
.deckstrip .dk { display: block; aspect-ratio: 1; border-radius: 1px; background: #B9B7AC; }
.deckstrip .dk.t-complete, .deckstrip .dk.t-gain { background: #6F9A78; }
.deckstrip .dk.t-scramble { background: #7FA9B8; }
.deckstrip .dk.t-incomplete, .deckstrip .dk.t-break { background: #C7C4B7; }
.deckstrip .dk.t-shave { background: #DACB9E; }
.deckstrip .dk.t-mult { background: #E6B25A; }
.deckstrip .dk.t-set, .deckstrip .dk.t-sack { background: #D48A78; }
.deckstrip .dk.t-int, .deckstrip .dk.t-fumble { background: var(--margin); }
.deckstrip .dk.hit { outline: 2px solid #1E2833; outline-offset: -1px; transform: scale(1.35); z-index: 1; position: relative; }
/* a thousand-card deck: fifty to a row, a dense field; the drawn card pops */
.deckstrip { grid-template-columns: repeat(50, 1fr); gap: 1px; }
.deckstrip .dk.hit { transform: scale(2.2); outline-width: 1px; }
.dicecard .stripwhat { grid-column: 2; font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; }
.dicecard .cardreadout { grid-column: 2; font-family: 'Caveat', cursive; font-size: 16px; color: #3A4654; min-height: 20px; margin-top: 3px; }
.dicecard .ladder li[data-level] { cursor: pointer; }
.dicecard .ladder li.viewing { outline: 2px dashed var(--ink-soft); outline-offset: 1px; }
.deckstrip .dk { cursor: pointer; }
/* the card you tapped to read — a black ring, like the drawn card wears */
.deckstrip .dk.on { outline: 1.5px solid #1E2833; outline-offset: 0; transform: scale(1.4); z-index: 2; position: relative; pointer-events: none; }
.cbdeck .cardreadout { font-family: 'Caveat', cursive; font-size: 16px; color: #3A4654; min-height: 20px; margin-top: 4px; }
.cbdeck .cb-cardcap { font-family: 'IBM Plex Mono'; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-top: 6px; }
.cbdeck .ladder { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; font-family: 'IBM Plex Mono'; }
.cbdeck .ladder li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 3px; border-radius: 4px; background: rgba(30,40,51,0.05); border: 1px solid rgba(30,40,51,0.2); color: var(--ink-soft); }
.cbdeck .ladder li .ll { font-size: 8.5px; letter-spacing: 0.04em; text-transform: uppercase; text-align: center; }
.cbdeck .ladder li .lr { font-family: 'Graduate'; font-size: 14px; line-height: 1; color: #1E2833; }
.cbdeck .ladder li.to { background: rgba(179,64,47,0.08); border-color: #B3402F; }
.cbdeck .ladder li.to .lr { color: #B3402F; }
.cbdeck .ladder li .lw { font-size: 8.5px; line-height: 1.15; color: var(--ink-soft); text-align: center; }

/* ---------- the card browser on the home page ---------- */
.cardbrowser { margin: 34px 0 10px; border-top: 1px solid #24332A; padding-top: 18px; }
.cb-head { font-family: 'Graduate'; font-size: 18px; letter-spacing: 0.06em; color: var(--amber); text-align: center; margin-bottom: 4px; }
.cb-group { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.cb-pos { font-family: 'Graduate'; font-size: 11px; letter-spacing: 0.1em; color: var(--chalk-dim); width: 34px; flex: none; }
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cb-chips .chip { border-color: #3A4F42; color: var(--chalk-dim); background: transparent; }
.cb-chips .chip.sel { background: var(--amber); border-color: var(--amber); color: #201703; }
.cb-chips.cb-decks { margin: 10px 0 6px; }
.cb-chips.small .chip { font-size: 11px; padding: 5px 9px; }
.cbcard { margin-top: 12px; }
.cbdeck { margin-top: 10px; padding-left: 26px; }
.cb-deckhead { font-family: 'Graduate'; font-size: 11px; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 4px; }
.cb-stats, .cb-comp { font-family: 'IBM Plex Mono'; font-size: 11px; line-height: 1.5; color: var(--ink-soft); }
.cb-stats b, .cb-comp b { color: #1E2833; font-weight: 600; }
.cb-comp { margin: 2px 0 6px; }
.cbdeck .deckstrip { grid-column: auto; }
.cbdeck .cardreadout { grid-column: auto; }
.cbdeck .stripwhat { grid-column: auto; }
.cb-note { font-family: 'Caveat', cursive; font-size: 16px; color: #3A4654; margin-top: 6px; }
.cb-kick { margin-top: 10px; }
.cb-table { border-collapse: collapse; font-family: 'IBM Plex Mono'; font-size: 12px; color: var(--chalk); }
.cb-table th { font-weight: 400; color: var(--chalk-dim); text-align: left; padding: 2px 14px 2px 0; border-bottom: 1px solid #2A3A30; }
.cb-table td { padding: 2px 14px 2px 0; }
.cb-kick .cb-deckhead { color: var(--chalk-dim); }
.cb-kick .cb-note { color: var(--chalk-dim); }
.cb-table tr.cliff td { color: #C98A80; }
.playbanner .ladder li.beaten.actual { border-color: #F08A7E; background: rgba(240,138,126,0.12); }
.playbanner .ladder li.beaten.actual .lr, .playbanner .ladder li.beaten.actual .ll::before { color: #F08A7E; }
.deckstrip .dk.t-boost { background: #7BC47F; }
/* kickoff and return decks */
.deckstrip .dk.t-inplay, .deckstrip .dk.t-ret { background: #6F9A78; }
.deckstrip .dk.t-touchback, .deckstrip .dk.t-fc { background: #C7C4B7; }
.deckstrip .dk.t-oob { background: #E6B25A; }
.deckstrip .dk.t-pin { background: #6F9A78; }
.deckstrip .dk.t-td { background: var(--amber); }
.deckstrip .dk.t-fgGood, .deckstrip .dk.t-punt { background: #6F9A78; }
.deckstrip .dk.t-fgOpen { background: #A9C7A0; }
.deckstrip .dk.t-fgMiss { background: #D48A78; }
/* the one-box result on an offense / kick card, and a box you can tap for its deck */
.ladder.one { display: flex; justify-content: flex-start; margin: 6px 0 4px; }
.ladder.one li { min-width: 120px; }
.cbdeck .ladder li[data-level] { cursor: pointer; }
.cbdeck .ladder li.viewing { box-shadow: 0 0 0 2px var(--amber) inset; }
.cb-table tr[data-dist] { cursor: pointer; }
.cb-table tr.sel td { background: rgba(230,178,90,0.25); font-weight: 600; }
.deckstrip .dk.t-clean { background: #C7C4B7; }
.cb-note.dim { opacity: 0.7; font-size: 14px; }

/* the public board on the home screen */
.games-board { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.gb-row { display: grid; grid-template-columns: 58px 1fr auto auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 6px;
  background: rgba(30,40,51,0.05); border: 1px solid rgba(30,40,51,0.15); cursor: pointer; font-family: 'IBM Plex Mono'; font-size: 12px; }
.gb-row:hover { background: rgba(230,178,90,0.18); }
.gb-row .gb-code { font-family: 'Graduate'; letter-spacing: 0.12em; font-size: 14px; }
.gb-row .gb-who em { font-style: normal; color: #B3402F; font-weight: 600; }
.gb-row .gb-who .dim { color: var(--ink-soft); }
.gb-row .gb-status { color: var(--ink-soft); font-size: 11px; white-space: nowrap; }
.gb-row .gb-act { font-family: 'Graduate'; font-size: 11px; letter-spacing: 0.08em; color: #1E2833; }
.gb-row.open .gb-act { color: #B3402F; }
.menu-card.dimcard { opacity: 0.6; }

/* the coaching staff */
.staffpanel { margin-top: 10px; padding-top: 8px; border-top: 1px dotted #26352C; }
.staffrow { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-family: 'IBM Plex Mono'; font-size: 12px; }
.staffrow.away { opacity: 0.55; }
.staffrow .st-name { flex: 1; }
.staffrow .st-rolename { color: var(--chalk-dim); font-size: 11px; }
.staffrow select.st-role { background: rgba(239,236,225,0.06); color: var(--chalk); border: 1px solid #3A4F42; border-radius: 4px; font-family: 'IBM Plex Mono'; font-size: 11px; padding: 2px 4px; }
.staffrow .chip.st-remove { font-size: 10px; }
.staffrow.req .chip.st-accept { border-color: var(--amber); color: var(--amber); }
.staffbanner { position: sticky; top: 0; z-index: 50; background: #E6B25A; color: #1E2833; font-family: 'IBM Plex Mono'; font-size: 12px; padding: 6px 12px; text-align: center; }
.staffbanner.declined { background: #D48A78; }

/* the other side's call is in */
.theirturn { margin: 0 0 8px; padding: 8px 12px; border-radius: 6px; background: rgba(255,182,39,0.16); border: 1px solid var(--amber); color: var(--amber);
  font-family: 'Graduate'; font-size: 12px; letter-spacing: 0.06em; text-align: center; animation: theirturn-pulse 1.4s ease-in-out infinite; }
@keyframes theirturn-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,182,39,0); } 50% { box-shadow: 0 0 0 6px rgba(255,182,39,0.22); } }
@media (prefers-reduced-motion: reduce) { .theirturn { animation: none; } }
/* the spectator's call status */
.callstatus { margin-top: 4px; font-family: 'IBM Plex Mono'; font-size: 11px; color: var(--chalk-dim); }
.callstatus .cl.in { color: #7BC47F; }
.callstatus .cl.wait { color: var(--amber); }
.staffrow .chip.st-hand { font-size: 10px; }

/* ------------------------------------------------ approval desk, naming, forfeit, presence */
.lobbydesk { max-width: 460px; margin: 14px auto 0; text-align: left; }
.lobbydesk .staffrow { font-size: 13px; }
.namecard { margin: 10px auto 14px; max-width: 440px; padding: 12px 14px 10px; }
.namecard .field-row input { flex: 1; min-width: 0; background: rgba(239,236,225,0.9); border: 1px solid #B8B2A0; border-radius: 5px; padding: 8px 10px; font-family: 'IBM Plex Mono'; font-size: 14px; color: #26303B; }
.staffrow.tn .tn-input { flex: 1; min-width: 0; background: rgba(239,236,225,0.06); color: var(--chalk); border: 1px solid #3A4F42; border-radius: 4px; font-family: 'IBM Plex Mono'; font-size: 12px; padding: 3px 6px; }
.chip.forfchip { border-color: #7A3A3A; color: #E8A0A0; margin-top: 8px; }
.chip.forfchip:hover { background: rgba(160,60,60,0.18); }
.forfeitcard .btn { width: 100%; }
.frozenline { border: 1px dashed #5A788F; background: rgba(90,130,160,0.12); color: #B9D2E4; border-radius: 6px; padding: 8px 10px; margin: 0 0 10px; font-family: 'IBM Plex Mono'; font-size: 12px; line-height: 1.45; }
.frozentag { font-family: 'IBM Plex Mono'; font-size: 10px; letter-spacing: 0.04em; color: #B9D2E4; border: 1px solid #4A6478; border-radius: 999px; padding: 2px 8px; margin-left: 8px; white-space: nowrap; }
.reqbadge { font-family: 'IBM Plex Mono'; font-size: 10px; font-weight: 700; letter-spacing: 0.05em; color: #201703; background: var(--amber); border: none; border-radius: 999px; padding: 3px 9px; margin-left: 8px; cursor: pointer; animation: reqpulse 1.6s ease-in-out infinite; }
@keyframes reqpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,182,39,0.55); } 50% { box-shadow: 0 0 0 6px rgba(255,182,39,0); } }
@media (prefers-reduced-motion: reduce) { .reqbadge { animation: none; } }
.supersededov { position: fixed; inset: 0; z-index: 240; background: rgba(20,26,32,0.82); display: flex; align-items: center; justify-content: center; padding: 20px; }
.supersededov .card { max-width: 380px; width: 100%; }


/* ------------------------------------------------ installed app (PWA) */
body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.updatetoast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 260; display: flex; align-items: center; gap: 10px; background: #1A241D; border: 1px solid #3A4F42; border-radius: 10px; padding: 9px 12px; box-shadow: 0 6px 18px rgba(0,0,0,0.45); font-family: 'IBM Plex Mono'; font-size: 12px; color: var(--chalk); }
.connbar { position: fixed; top: 0; left: 0; right: 0; z-index: 250; text-align: center; background: #5A2A24; color: #F3D9C9; border-bottom: 1px solid #7A3A3A; padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 6px; font-family: 'IBM Plex Mono'; font-size: 12px; letter-spacing: 0.02em; }
.installrow { text-align: center; margin: 18px 0 6px; }
@media (display-mode: standalone) { .installrow { display: none; } }

/* ---- phase 4: the resume lobby ---- */
.yg-row { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-top: 1px dashed rgba(38,48,59,.18); }
.yg-row:first-of-type { border-top: 0; }
.yg-line { flex: 1; font-size: 13px; color: #26303B; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yg-row.final .yg-line { color: #6a7480; }
.yg-go { padding: 4px 10px; font-size: 12px; }
.yg-x { padding: 4px 8px; font-size: 12px; }
.gb-row .gb-status { min-width: 0; }
.auth-card .txt { min-width: 0; }
.auth-card #g-signin { margin-top: 6px; }
.auth-card .subtle { margin: 4px 2px 0; font-size: 12px; }
