/* Pennant Chase — broadcast presentation.
   Late-innings network look: deep navy-black, one amber accent, condensed
   grotesque type with tabular numerals. Chrome sits at the edges; the middle of
   the frame belongs to the field. */

:root {
  --sky: #060a12;
  --ink: #eef3f8;
  --dim: #8fa3b8;
  --amber: #f5b301;
  --chrome: #c3d0dd;
  --line: rgba(195, 208, 221, .22);
  --bug: rgba(8, 14, 24, .92);
  --red: #e5484d;
  --green: #5ea87a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--sky);
  color: var(--ink);
  font-family: Barlow, system-ui, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

#app { position: fixed; inset: 0; }
.screen { position: absolute; inset: 0; overflow: hidden; }
.screen[hidden] { display: none; }

/* ---------------- at-bat: park + overlay ---------------- */
.park {
  position: absolute; inset: 0;
  background-image: url('../../public/art/park-night.jpg');
  background-size: cover; background-position: center;
}
.grade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 62%, transparent 30%, rgba(3, 6, 14, .55) 100%),
    linear-gradient(180deg, rgba(3, 6, 14, .5) 0%, transparent 22%, transparent 62%, rgba(3, 6, 14, .42) 100%);
}
#field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* No pointer on the field. Everything here is keyboard or a click anywhere, and
   an arrow hovering over the strike zone is just something in the way. */
#gameScreen { cursor: none; }

/* ---------------- score bug ---------------- */
.bug {
  position: absolute; top: 20px; left: 20px; display: flex; align-items: stretch;
  background: var(--bug); border: 1px solid var(--line); border-radius: 3px;
  box-shadow: 0 8px 34px rgba(0, 0, 0, .6); overflow: hidden;
  backdrop-filter: blur(8px); z-index: 3;
}
.bug .teams { display: flex; flex-direction: column; }
.bug .row {
  display: flex; align-items: center; gap: 14px; padding: 7px 14px;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 600;
  letter-spacing: .06em; font-size: 19px; line-height: 1;
}
.bug .row + .row { border-top: 1px solid var(--line); }
.bug .row.active { background: linear-gradient(90deg, rgba(245, 179, 1, .16), transparent); }
.bug .abbr { width: 46px; }
.bug .runs { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 21px; min-width: 24px; text-align: right; }
.bug .inn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 16px; border-left: 1px solid var(--line); gap: 3px;
}
.bug .inn .half { font-size: 11px; color: var(--amber); letter-spacing: .16em; font-weight: 600; }
.bug .inn .num { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 700; line-height: 1; }

/* ---------------- count / bases ---------------- */
.state {
  position: absolute; top: 20px; right: 20px; z-index: 3;
  background: var(--bug); border: 1px solid var(--line); border-radius: 3px;
  padding: 12px 16px; display: flex; gap: 22px; align-items: center;
  box-shadow: 0 8px 34px rgba(0, 0, 0, .6); backdrop-filter: blur(8px);
}
.state .grp { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.state .lbl { font-size: 10px; letter-spacing: .18em; color: var(--dim); font-weight: 600; }
.dots { display: flex; gap: 5px; }
.dot { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line); transition: .18s; }
.dot.on { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 10px rgba(245, 179, 1, .7); }
.dot.out.on { background: var(--red); border-color: var(--red); box-shadow: 0 0 10px rgba(229, 72, 77, .7); }
/* A real diamond: second at the top, first on the right, third on the left,
   home implied at the bottom. Rotating one square container put the bags in an
   L instead. */
.diamond { width: 48px; height: 34px; position: relative; }
.base {
  position: absolute; width: 13px; height: 13px;
  border: 1.5px solid var(--line); transform: rotate(45deg); transition: .2s;
}
.base.on { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 12px rgba(245, 179, 1, .8); }
.b2 { top: 0; left: 50%; margin-left: -6.5px; }
.b1 { right: 2px; bottom: 0; }
.b3 { left: 2px; bottom: 0; }
/* No home plate marker: nothing is ever shown there, and an outline that never
   lights implies a state the game does not have. */

.approach {
  position: absolute; top: 114px; right: 20px; z-index: 3;
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px;
  letter-spacing: .2em; font-weight: 600; color: var(--chrome);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .9);
}
.lev {
  position: absolute; top: 96px; right: 20px; z-index: 3;
  font-family: 'Barlow Condensed', sans-serif; font-size: 12px;
  letter-spacing: .22em; font-weight: 700; color: var(--amber);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .9);
}

/* ---------------- batter card ---------------- */
.batter {
  position: absolute; left: 20px; bottom: 20px; min-width: 342px; z-index: 3;
  background: var(--bug); border: 1px solid var(--line); border-radius: 3px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .65); backdrop-filter: blur(8px); overflow: hidden;
}
.batter .head {
  display: flex; align-items: baseline; gap: 10px; padding: 11px 16px 9px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(245, 179, 1, .14), transparent 70%);
}
.batter .pos { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 700; color: var(--amber); letter-spacing: .12em; }
.batter .nm { font-family: 'Barlow Condensed', sans-serif; font-size: 25px; font-weight: 600; letter-spacing: .02em; }
.batter .bats { font-size: 11px; color: var(--dim); letter-spacing: .1em; margin-left: auto; }
.batter .stats { display: flex; }
.batter .st { flex: 1; padding: 9px 14px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--line); }
.batter .st:last-child { border-right: 0; }
.batter .st b { font-family: 'Barlow Condensed', sans-serif; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.batter .st span { font-size: 9.5px; letter-spacing: .16em; color: var(--dim); font-weight: 600; }
.form { padding: 8px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.form .bar { flex: 1; height: 4px; background: rgba(255, 255, 255, .09); border-radius: 2px; overflow: hidden; position: relative; }
.form .fill { position: absolute; top: 0; bottom: 0; left: 50%; background: var(--amber); transition: .4s cubic-bezier(.2, .8, .2, 1); }
.form .tag { font-size: 10px; letter-spacing: .14em; color: var(--dim); font-weight: 600; min-width: 68px; }

/* ---------------- timing ---------------- */
.timing {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.meter {
  width: 280px; height: 8px; background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line); border-radius: 4px; position: relative; overflow: hidden;
}
.meter .perfect { position: absolute; left: 50%; top: 0; bottom: 0; width: 12%; transform: translateX(-50%); background: rgba(245, 179, 1, .34); }
.meter .good { position: absolute; left: 50%; top: 0; bottom: 0; width: 40%; transform: translateX(-50%); background: rgba(245, 179, 1, .11); }
.meter .early, .meter .late { position: absolute; top: 0; bottom: 0; width: 30%; font: 600 8px Barlow, sans-serif; color: var(--dim); letter-spacing: .12em; display: flex; align-items: center; }
.meter .early { left: 3px; } .meter .late { right: 3px; justify-content: flex-end; }
.meter .mark { position: absolute; top: -4px; bottom: -4px; width: 2.5px; background: #fff; box-shadow: 0 0 10px #fff; opacity: 0; transition: opacity .3s; }
.verdict { font-family: 'Barlow Condensed', sans-serif; font-size: 15px; letter-spacing: .16em; font-weight: 700; height: 18px; text-transform: uppercase; }
.cue { font-size: 11px; letter-spacing: .2em; color: var(--dim); font-weight: 600; text-transform: uppercase; height: 15px; }
.cue b { color: var(--amber); font-weight: 700; }

/* ---------------- pitcher ---------------- */
.pitchinfo {
  position: absolute; right: 20px; bottom: 20px; text-align: right; z-index: 3;
  background: var(--bug); border: 1px solid var(--line); border-radius: 3px;
  padding: 11px 16px; backdrop-filter: blur(8px); box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
  min-width: 200px;
}
.pitchinfo .who { font-size: 10px; letter-spacing: .16em; color: var(--dim); font-weight: 600; margin-bottom: 5px; }
.pitchinfo .nm { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 600; }
.pitchinfo .meta { font-size: 10.5px; color: var(--dim); letter-spacing: .06em; margin-top: 3px; }
.pitchinfo .gas { display: flex; align-items: center; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.pitchinfo .gas span { font-size: 9px; letter-spacing: .18em; color: var(--dim); font-weight: 600; }
.pitchinfo .gas .bar { width: 90px; height: 4px; background: rgba(255, 255, 255, .1); border-radius: 2px; overflow: hidden; }
.pitchinfo .gas .bar b { display: block; height: 100%; background: var(--green); transition: .35s; }

/* ---------------- play-by-play ticker ---------------- */
.ticker {
  position: absolute; left: 50%; top: 20px; transform: translateX(-50%); z-index: 3;
  display: flex; flex-direction: column; gap: 3px; align-items: center;
  font-size: 12px; color: var(--dim); letter-spacing: .04em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .9); pointer-events: none;
}
.ticker div { opacity: .55; }
.ticker div:last-child { opacity: 1; color: var(--chrome); }
.ticker div.us { color: var(--amber); }

.distance {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, 90px); z-index: 4;
  font-family: 'Barlow Condensed', sans-serif; font-size: 17px; letter-spacing: .22em;
  color: var(--amber); font-weight: 700; text-shadow: 0 2px 20px rgba(0, 0, 0, .95);
  pointer-events: none;
}

/* ---------------- result ---------------- */
.result {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%) scale(.94);
  text-align: center; opacity: 0; pointer-events: none; z-index: 4;
  transition: opacity .3s, transform .45s cubic-bezier(.2, .9, .25, 1);
}
.result.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.result .code {
  font-family: 'Barlow Condensed', sans-serif; font-size: clamp(58px, 9vw, 124px);
  font-weight: 700; letter-spacing: .03em; line-height: .9;
  text-shadow: 0 6px 50px rgba(0, 0, 0, .9);
}
.result .desc { margin-top: 10px; font-size: 16px; letter-spacing: .04em; color: var(--chrome); text-shadow: 0 2px 20px rgba(0, 0, 0, .9); }
.result.big .code { color: var(--amber); }
.result.bad .code { color: var(--dim); }

/* ---------------- loading ---------------- */
.boot {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; z-index: 20;
  background: var(--sky);
}
/* `display: flex` above outranks the user-agent's `[hidden] { display: none }`,
   so setting the attribute alone left the splash covering a running game. */
.boot[hidden] { display: none; }
.boot h1 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 46px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
}
.boot h1 em { color: var(--amber); font-style: normal; }
.boot p { font-size: 12px; letter-spacing: .22em; color: var(--dim); text-transform: uppercase; }

/* ---------------- shell: summoned menu ---------------- */
/* No persistent header. A bar across the top of a broadcast is the one piece of
   this interface that admits it is a web page -- it takes height from the field
   and fights the score bug for the same corner. The menu is summoned instead,
   and arrives as a graphics package over the game. */

/* Sits with the other input prompts rather than in a corner of its own. The eye
   is already at the bottom centre reading "SPACE to step in"; a chip floating
   over the top-left had nothing to do with anything near it. */
.menuCue {
  display: flex; align-items: center; gap: 7px; margin-top: 2px;
  background: none; border: 0; color: var(--dim); cursor: pointer; padding: 2px 6px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: .2em; transition: .18s; opacity: .5;
}

.menuCue:hover { opacity: 1; color: var(--ink); border-color: rgba(245,179,1,.5); }
.menuCue:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; opacity: 1; }
.menuCue kbd {
  font-family: 'Barlow Condensed', sans-serif; font-size: 9.5px; letter-spacing: .1em;
  border: 1px solid var(--line); border-radius: 2px; padding: 1px 4px; color: var(--dim);
}


.menu {
  position: absolute; inset: 0; z-index: 40;
  background: rgba(4, 7, 14, .82); backdrop-filter: blur(14px) saturate(.7);
  display: flex; align-items: center; justify-content: center;
  animation: menuIn .22s cubic-bezier(.2, .8, .2, 1);
}
.menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; } to { opacity: 1; } }

.menuInner { width: min(560px, 88vw); }
.menuBrand {
  font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 700;
  letter-spacing: .34em; text-transform: uppercase; color: var(--dim);
  margin-bottom: 22px;
}
.menuBrand em { color: var(--amber); font-style: normal; }

.menuNav { display: flex; flex-direction: column; }
.menuNav button, .menuFoot button {
  display: flex; align-items: baseline; gap: 14px; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--ink); cursor: pointer; padding: 15px 4px; transition: .16s;
  animation: menuRow .3s cubic-bezier(.2, .8, .2, 1) backwards;
}
.menuNav button:nth-child(1) { animation-delay: .02s; }
.menuNav button:nth-child(2) { animation-delay: .06s; }
.menuNav button:nth-child(3) { animation-delay: .10s; }
.menuNav button:nth-child(4) { animation-delay: .14s; }
@keyframes menuRow { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.menuNav button b {
  font-family: 'Barlow Condensed', sans-serif; font-size: 25px; font-weight: 600;
  letter-spacing: .02em;
}
.menuNav button span, .menuFoot button span { font-size: 12px; color: var(--dim); margin-left: auto; }
.menuNav button:hover, .menuFoot button:hover { padding-left: 14px; color: var(--amber); }
.menuNav button:hover span, .menuFoot button:hover span { color: var(--amber); }
.menuNav button:focus-visible, .menuFoot button:focus-visible {
  outline: 2px solid var(--amber); outline-offset: -2px;
}
.menuNav button.on b { color: var(--amber); }

/* Two equal columns rather than a shared flex row -- the descriptions wrapped
   into each other when they competed for the same space. */
.menuFoot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; margin-top: 20px; }
.menuFoot button {
  border-bottom: 0; padding: 8px 4px; font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
  animation: none; gap: 12px; align-items: baseline;
}
.menuFoot button span {
  margin-left: auto; text-transform: none; letter-spacing: .02em;
  font-family: Barlow, sans-serif; white-space: nowrap;
}
.menuFoot button:hover { padding-left: 4px; }

/* Data screens own the whole viewport, with their own way back. */
.backBtn {
  background: none; border: 1px solid var(--line); border-radius: 3px; cursor: pointer;
  color: var(--dim); padding: 6px 12px; font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; transition: .15s;
}
.backBtn:hover { color: var(--amber); border-color: rgba(245,179,1,.5); }
.backBtn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.screen.panel { background: #070b14; overflow: hidden; }
.pane { position: absolute; inset: 0; display: flex; flex-direction: column; }
.paneHead {
  display: flex; align-items: baseline; gap: 16px; padding: 18px 22px 12px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.paneHead h1 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 700;
  letter-spacing: .04em;
}
.paneHead .hint { font-size: 11.5px; color: var(--dim); letter-spacing: .04em; margin-left: auto; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.seg button {
  background: none; border: 0; color: var(--dim); cursor: pointer; padding: 6px 12px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .16em;
}
.seg button.on { background: var(--amber); color: #1a1204; }
.scroll { flex: 1; overflow: auto; padding: 14px 22px 40px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  position: sticky; top: 0; z-index: 2; background: #0b1220; text-align: right;
  font-family: 'Barlow Condensed', sans-serif; font-size: 10.5px; letter-spacing: .14em;
  color: var(--dim); font-weight: 600; padding: 8px 8px; cursor: pointer;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl th.left, .tbl th:not(.num) { text-align: left; }
.tbl th:hover { color: var(--ink); }
.tbl th.on { color: var(--amber); }
.tbl td { padding: 6px 8px; border-bottom: 1px solid rgba(195,208,221,.08); white-space: nowrap; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.left { text-align: left; }
.tbl td.dim { color: var(--dim); }
.tbl td.up { color: var(--green); } .tbl td.down { color: var(--red); }
.tbl tbody tr:hover { background: rgba(255,255,255,.045); }
.tbl tr.mine { background: rgba(245,179,1,.10); }
.tbl tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--amber); }

.divBlock { margin-bottom: 26px; }
.divBlock h2 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: .22em;
  color: var(--amber); font-weight: 700; margin-bottom: 7px; text-transform: uppercase;
}

/* ---------------- team ---------------- */
.teamCols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
.teamCols h2 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: .22em;
  color: var(--amber); font-weight: 700; margin: 16px 0 7px; text-transform: uppercase;
}
.teamCols h2:first-child { margin-top: 0; }
.slot { display: flex; align-items: center; gap: 8px; }
.slot > b {
  font-family: 'Barlow Condensed', sans-serif; font-size: 13px; color: var(--dim);
  width: 16px; text-align: right; flex: none;
}
.prow {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  padding: 7px 10px; border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; transition: .13s; border-bottom: 1px solid rgba(195,208,221,.08);
}
.prow:hover { background: rgba(255,255,255,.05); }
.prow.picked { background: rgba(245,179,1,.16); border-color: var(--amber); }
.prow.bench { opacity: .82; }
.ppos {
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700;
  color: var(--amber); letter-spacing: .1em; width: 26px; flex: none;
}
.pname { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 1; font-size: 13px; }
.pmeta { font-size: 10.5px; color: var(--dim); flex: none; letter-spacing: .04em; }
.bars { display: flex; gap: 2px; flex: none; }
.bars i {
  display: block; width: 5px; height: 16px; border-radius: 1px;
  background: linear-gradient(to top, var(--amber) var(--v), rgba(255,255,255,.10) var(--v));
}
.pline { display: flex; gap: 9px; flex: none; font-variant-numeric: tabular-nums; font-size: 11.5px; color: var(--chrome); }
.pline .stat { min-width: 40px; text-align: right; }
.pform { font-size: 9.5px; letter-spacing: .12em; color: var(--dim); width: 80px; text-align: right; flex: none; }
.pform.hot { color: var(--amber); } .pform.cold { color: var(--red); }

/* ---------------- title ---------------- */
.title { position: absolute; inset: 0; z-index: 50; overflow: hidden; }
.title[hidden] { display: none; }
.titleArt {
  position: absolute; inset: -2%;
  background: url('../../public/art/title.jpg') center/cover;
  animation: titleDrift 34s ease-in-out infinite;
}
@keyframes titleDrift {
  0%, 100% { transform: scale(1.02) translateX(0); }
  50% { transform: scale(1.055) translateX(-1%); }
}
/* Deepens the left third so the type always has a dark field under it. */
.titleGrade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4,7,14,.94) 0%, rgba(4,7,14,.72) 34%, transparent 62%),
    linear-gradient(180deg, rgba(4,7,14,.6) 0%, transparent 24%, transparent 70%, rgba(4,7,14,.75) 100%);
}
.titleInner {
  position: absolute; left: clamp(32px, 7vw, 110px); top: 50%;
  transform: translateY(-50%); width: min(520px, 46vw);
}
.title .kicker {
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .34em; text-transform: uppercase; color: var(--amber);
  margin-bottom: 14px;
}
.title h1 {
  font-family: 'Barlow Condensed', sans-serif; font-size: clamp(52px, 7.4vw, 96px);
  font-weight: 700; line-height: .88; letter-spacing: .01em; text-transform: uppercase;
  text-shadow: 0 8px 60px rgba(0,0,0,.9);
}
.title h1 em { display: block; color: var(--amber); font-style: normal; }
.title .lede {
  margin-top: 20px; font-size: 14.5px; line-height: 1.62; color: var(--chrome);
  text-shadow: 0 2px 24px rgba(0,0,0,.9); max-width: 44ch;
}
.titleActions { margin-top: 34px; display: flex; flex-direction: column; }
.titleActions button {
  display: block; width: 100%; text-align: left; background: none; cursor: pointer;
  border: 0; border-top: 1px solid var(--line); padding: 16px 4px; color: var(--ink);
  transition: .16s;
}
.titleActions button:last-child { border-bottom: 1px solid var(--line); }
.titleActions button b {
  display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 22px;
  font-weight: 600; letter-spacing: .04em;
}
.titleActions button span { display: block; font-size: 12px; color: var(--dim); margin-top: 3px; }
.titleActions button:hover { padding-left: 14px; }
.titleActions button:hover b, .titleActions button:hover span { color: var(--amber); }
.titleActions button:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.titleActions button[disabled] { opacity: .4; cursor: default; }
.titleActions button[disabled]:hover { padding-left: 4px; }
.titleActions button[disabled]:hover b, .titleActions button[disabled]:hover span { color: inherit; }
.titleFoot {
  margin-top: 20px; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--dim);
}

/* ---------------- title extras ---------------- */
.depth { margin-top: 18px; display: flex; align-items: center; gap: 14px; }
.depth > span { font-size: 11.5px; color: var(--dim); letter-spacing: .04em; }
.depth .seg { border-color: var(--line); }
.titleCode {
  margin-top: 6px; font-family: 'Barlow Condensed', sans-serif; font-size: 11px;
  letter-spacing: .2em; color: var(--dim);
}
.titleCode b { color: var(--amber); font-weight: 600; }

/* ---------------- final card ---------------- */
.finalCard {
  position: absolute; inset: 0; z-index: 45;
  background: rgba(4, 7, 14, .88); backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  animation: menuIn .3s cubic-bezier(.2, .8, .2, 1);
}
.finalCard[hidden] { display: none; }
.finalInner { width: min(520px, 88vw); text-align: center; }
.finalKicker {
  font-family: 'Barlow Condensed', sans-serif; font-size: 12px; letter-spacing: .38em;
  color: var(--amber); font-weight: 600; margin-bottom: 16px;
}
.finalScore {
  display: flex; align-items: center; justify-content: center; gap: 26px;
  font-family: 'Barlow Condensed', sans-serif; margin-bottom: 14px;
}
.finalScore .side { display: flex; align-items: baseline; gap: 12px; }
.finalScore .ab { font-size: 17px; letter-spacing: .2em; color: var(--dim); }
.finalScore .rn { font-size: 54px; font-weight: 700; line-height: 1; }
.finalScore .side.won .ab { color: var(--ink); }
.finalScore .side.won .rn { color: var(--amber); }
.finalNote { font-size: 13.5px; color: var(--chrome); margin-bottom: 26px; line-height: 1.6; }
.finalActions { display: flex; flex-direction: column; }
.finalActions button {
  display: flex; align-items: baseline; gap: 14px; width: 100%; text-align: left;
  background: none; border: 0; border-top: 1px solid var(--line);
  color: var(--ink); cursor: pointer; padding: 14px 4px; transition: .16s;
}
.finalActions button:last-child { border-bottom: 1px solid var(--line); }
.finalActions button b {
  font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 600; letter-spacing: .03em;
}
.finalActions button span { font-size: 12px; color: var(--dim); margin-left: auto; }
.finalActions button:hover { padding-left: 14px; color: var(--amber); }
.finalActions button:hover span { color: var(--amber); }
.finalActions button:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }

/* Keyboard focus on menus, so arrow keys read clearly. */
.menuNav button:focus, .titleActions button:focus, .finalActions button:focus {
  outline: none; background: rgba(245, 179, 1, .10);
}
.menuNav button:focus b, .titleActions button:focus b, .finalActions button:focus b { color: var(--amber); }

/* ---------------- off-season report ---------------- */
.finalReport { text-align: left; margin-bottom: 24px; }
.finalReport[hidden] { display: none; }
.finalReport section { margin-bottom: 16px; }
.finalReport h3 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; letter-spacing: .22em;
  color: var(--amber); font-weight: 700; text-transform: uppercase; margin-bottom: 7px;
}
.finalReport .row {
  display: flex; align-items: baseline; gap: 10px; font-size: 12.5px;
  padding: 3.5px 0; border-bottom: 1px solid rgba(195, 208, 221, .08);
}
.finalReport .row .who { color: var(--ink); }
.finalReport .row .pos { color: var(--amber); font-family: 'Barlow Condensed', sans-serif; font-size: 10.5px; letter-spacing: .1em; width: 26px; }
.finalReport .row .note { margin-left: auto; color: var(--dim); font-size: 11.5px; }
.finalReport .row .note.up { color: var(--green); }
.finalReport .row .note.down { color: var(--red); }
.finalReport .none { font-size: 12px; color: var(--dim); font-style: italic; }

/* The narrative voice: set apart from the numbers around it. */
.storyLine {
  display: inline-block; margin-top: 10px; font-style: italic;
  color: var(--amber); font-size: 13.5px; line-height: 1.5;
}
.titleStory {
  margin-top: 18px; font-size: 12.5px; line-height: 1.6; color: var(--dim);
  font-style: italic; max-width: 46ch;
}

/* ---------------- the moment ---------------- */
.moment {
  position: absolute; inset: 0; z-index: 12; display: flex;
  align-items: center; justify-content: center; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(4,7,14,.62) 0%, rgba(4,7,14,.88) 70%);
  animation: menuIn .35s cubic-bezier(.2, .8, .2, 1);
}
.moment[hidden] { display: none; }
.momentInner { text-align: center; max-width: min(620px, 84vw); }
.momentKicker {
  font-family: 'Barlow Condensed', sans-serif; font-size: 12px; letter-spacing: .40em;
  color: var(--amber); font-weight: 700; margin-bottom: 18px;
}
.momentSituation {
  font-family: 'Barlow Condensed', sans-serif; font-size: clamp(30px, 4vw, 46px);
  font-weight: 600; line-height: 1.08; letter-spacing: .01em;
  text-shadow: 0 6px 44px rgba(0,0,0,.9);
}
.momentStakes {
  margin-top: 14px; font-size: 15px; color: var(--chrome); font-style: italic;
  text-shadow: 0 2px 22px rgba(0,0,0,.9);
}
.momentCue {
  margin-top: 30px; font-size: 11px; letter-spacing: .22em; color: var(--dim);
  font-weight: 600; text-transform: uppercase;
}
.momentCue b { color: var(--amber); }

/* ---------------- taking the job ---------------- */
/* Two panes: the clubs on the left, what you would be taking on at the right.
   Sixteen buttons that differ only by name is not a decision -- the detail pane
   is what turns a list into a choice. */
.pick, .hub { position: absolute; inset: 0; z-index: 50; overflow: hidden; }
.pick[hidden], .hub[hidden] { display: none; }
.pickArt, .hubArt {
  position: absolute; inset: -2%;
  background: url('../../public/art/title.jpg') center/cover;
  filter: saturate(.55) brightness(.42);
}
.pickGrade, .hubGrade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4,7,14,.92) 0%, rgba(4,7,14,.78) 40%, rgba(4,7,14,.94) 100%);
}
.pickInner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: clamp(22px, 4vh, 46px) clamp(28px, 6vw, 92px);
  animation: menuIn .34s cubic-bezier(.2,.8,.2,1);
}
.pickHead h2 {
  font-family: 'Barlow Condensed', sans-serif; font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 700; line-height: 1.02; text-transform: uppercase; letter-spacing: .01em;
  margin-top: 10px;
}
.pickHead h2 em { display: block; color: var(--amber); font-style: normal; }

.pickBody {
  flex: 1; min-height: 0; display: grid; gap: clamp(24px, 4vw, 64px);
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.05fr);
  margin-top: clamp(16px, 3vh, 34px);
}

.pickList { overflow-y: auto; padding-right: 8px; }
.pickList .divHead {
  font-family: 'Barlow Condensed', sans-serif; font-size: 10px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--dim); padding: 10px 0 4px;
}
.pickList .divHead:first-child { padding-top: 0; }
.pickList button {
  display: flex; align-items: baseline; gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
  color: var(--ink); padding: 7px 6px 7px 0; transition: .15s;
}
.pickList button .swatch {
  width: 3px; align-self: stretch; border-radius: 2px; flex: none;
  background: var(--club, var(--line));
}
.pickList button b {
  font-family: 'Barlow Condensed', sans-serif; font-size: 17.5px; font-weight: 600;
  letter-spacing: .02em;
}
.pickList button i { font-style: normal; font-size: 12px; color: var(--dim); }
.pickList button .proj { margin-left: auto; font-size: 11px; color: var(--dim); white-space: nowrap; }
.pickList button:hover, .pickList button.on { padding-left: 10px; }
.pickList button:hover b, .pickList button.on b { color: var(--amber); }
.pickList button.on .proj { color: var(--chrome); }
.pickList button:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }

.pickDetail { display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.pickDetail .tag {
  display: inline-block; align-self: flex-start; font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--sky);
  background: var(--club, var(--amber)); padding: 4px 10px; border-radius: 2px;
}
.pickDetail h3 {
  font-family: 'Barlow Condensed', sans-serif; font-size: clamp(30px, 4vw, 52px);
  font-weight: 700; line-height: .96; text-transform: uppercase; margin: 14px 0 4px;
}
.pickDetail h3 em { display: block; color: var(--club, var(--amber)); font-style: normal; }
.pickDetail .pitch { font-size: 14px; line-height: 1.66; color: var(--chrome); max-width: 46ch; margin-top: 14px; }
.pickDetail ul { list-style: none; margin-top: 16px; }
.pickDetail li {
  font-size: 12.5px; color: var(--dim); padding: 7px 0 7px 16px; position: relative;
  border-top: 1px solid var(--line);
}
.pickDetail li::before { content: '—'; position: absolute; left: 0; color: var(--club, var(--amber)); }
.pickDetail .takeBtn {
  margin-top: 22px; align-self: flex-start; background: none; cursor: pointer;
  border: 1px solid var(--club, var(--amber)); border-radius: 3px; color: var(--ink);
  padding: 12px 26px; font-family: 'Barlow Condensed', sans-serif; font-size: 15px;
  font-weight: 700; letter-spacing: .18em; text-transform: uppercase; transition: .16s;
}
.pickDetail .takeBtn:hover { background: var(--club, var(--amber)); color: var(--sky); }
.pickDetail .takeBtn:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.pickFoot {
  display: flex; align-items: center; gap: 20px; margin-top: clamp(14px, 2.4vh, 26px);
  padding-top: 16px; border-top: 1px solid var(--line);
}
.pickFoot span { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }

/* ---------------- the season hub ---------------- */
.hubInner {
  position: absolute; left: clamp(32px, 7vw, 110px); top: 50%; transform: translateY(-50%);
  width: min(560px, 52vw); animation: menuIn .3s cubic-bezier(.2,.8,.2,1);
}
.hub .kicker {
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .34em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px;
}
.hubInner h2 {
  font-family: 'Barlow Condensed', sans-serif; font-size: clamp(38px, 5.4vw, 68px);
  font-weight: 700; line-height: .92; text-transform: uppercase;
  text-shadow: 0 8px 60px rgba(0,0,0,.9);
}
.hubLine {
  margin-top: 10px; font-family: 'Barlow Condensed', sans-serif; font-size: 15px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--chrome);
}
.hubStory {
  margin-top: 14px; font-size: 13.5px; line-height: 1.62; color: var(--dim); max-width: 46ch;
  min-height: 2.6em;
}
.hub .titleActions { margin-top: 26px; }

/* ---------------- settings ---------------- */
/* Centred, not stranded left. Every other panel is a wide data table that
   fills the viewport; this one is a short column, so left-aligning it in a
   full-width pane read as a layout that had failed rather than one that chose
   to be narrow. */
.settingsBody { max-width: 680px; margin: 0 auto; padding: 26px 22px 60px; width: 100%; }
.settingsHead { max-width: 680px; margin: 0 auto; width: 100%; display: flex;
  align-items: baseline; gap: 16px; padding: 0 22px; }
.settingsHead .backBtn { margin-left: auto; }
.settingsHead h2 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 700;
  letter-spacing: .04em;
}
/* Centred vertically as well. `safe` so that when a career exists and the reset
   block pushes it past the viewport, it falls back to scrolling from the top
   rather than clipping the first rows off-screen. */
.paneBody.settingsBody {
  overflow-y: auto; display: flex; flex-direction: column;
  justify-content: safe center; flex: 1; min-height: 0;
}
.mixer { display: flex; flex-direction: column; }
.mixRow {
  display: grid; grid-template-columns: 1fr 220px 44px; align-items: center; gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.mixName {
  font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 600;
  letter-spacing: .02em;
}
.mixName i {
  display: block; font-style: normal; font-family: Barlow, sans-serif;
  font-size: 12px; font-weight: 400; color: var(--dim); margin-top: 2px;
}
.mixRow output {
  font-variant-numeric: tabular-nums; font-size: 13px; color: var(--dim); text-align: right;
}
.mixRow input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 2px;
  background: var(--line); border-radius: 2px; cursor: pointer;
}
.mixRow input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--amber); cursor: pointer;
}
.mixRow input[type=range]::-moz-range-thumb {
  width: 15px; height: 15px; border: 0; border-radius: 50%; background: var(--amber); cursor: pointer;
}
.mixRow input[type=range]:focus-visible { outline: 2px solid var(--amber); outline-offset: 6px; }

.danger { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(229,72,77,.35); }
.danger h3 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--red); font-weight: 700;
}
.danger p { margin-top: 10px; font-size: 13px; line-height: 1.62; color: var(--dim); max-width: 56ch; }
.danger p b { color: var(--chrome); font-weight: 600; }
.dangerBtn {
  margin-top: 18px; background: none; border: 1px solid rgba(229,72,77,.5); border-radius: 3px;
  color: var(--red); cursor: pointer; padding: 10px 20px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; transition: .15s;
}
.dangerBtn:hover, .dangerBtn.on { background: var(--red); color: #fff; }
.dangerBtn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.confirmRow { display: flex; gap: 12px; align-items: center; margin-top: 18px; }
.confirmRow .backBtn { margin-top: 0; }

.prefRow {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 0 4px;
}
#lengthPick { margin-right: auto; }
#lengthPick > span { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }

/* ---------------- the spoken pitch ---------------- */
.pitchBtn {
  display: flex; align-items: center; gap: 10px; margin-top: 20px;
  background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--dim);
  font-family: 'Barlow Condensed', sans-serif; font-size: 11.5px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; transition: .16s; width: min(340px, 100%);
}
.pitchBtn:hover, .pitchBtn.on { color: var(--amber); }
.pitchBtn:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.pitchIcon {
  width: 0; height: 0; flex: none; margin-left: 2px;
  border-left: 9px solid currentColor; border-top: 6px solid transparent;
  border-bottom: 6px solid transparent; transition: .16s;
}
.pitchBtn.on .pitchIcon {
  width: 9px; height: 11px; margin-left: 0; border: 0; background: currentColor;
  clip-path: polygon(0 0,35% 0,35% 100%,0 100%,0 0,65% 0,100% 0,100% 100%,65% 100%,65% 0);
}
.pitchBar { flex: 1; height: 1px; background: var(--line); overflow: hidden; }
.pitchBar i { display: block; height: 100%; background: var(--amber); transform: scaleX(0);
  transform-origin: left; transition: transform .25s linear; }

/* A grand slam is the biggest thing that happens in a game; the card says so. */
.result.slam .code { color: var(--amber); text-shadow: 0 0 34px rgba(245,179,1,.55); }
.result.slam { animation: slamPulse .7s cubic-bezier(.2,.8,.2,1) 2; }
@keyframes slamPulse { 0%,100% { transform: scale(1); } 40% { transform: scale(1.045); } }

/* ---------------- save codes ---------------- */
.codes { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.codes h3 {
  font-family: 'Barlow Condensed', sans-serif; font-size: 13px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--amber); font-weight: 700;
}
.codes p { margin-top: 10px; font-size: 13px; line-height: 1.62; color: var(--dim); max-width: 56ch; }
.codes .theCode {
  font-family: 'Barlow Condensed', sans-serif; font-size: 22px; letter-spacing: .18em;
}
.codes .theCode b { color: var(--amber); font-weight: 700; }
.codes .fine { font-size: 11.5px; opacity: .8; }
.restoreRow { display: flex; gap: 10px; align-items: center; margin-top: 16px; max-width: 420px; }
.restoreRow input {
  flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 3px;
  color: var(--ink); padding: 10px 12px; font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
}
.restoreRow input:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.restoreRow input::placeholder { color: var(--dim); opacity: .5; letter-spacing: .12em; }
.restoreMsg { margin-top: 12px; font-size: 12.5px; }
.restoreMsg.ok { color: var(--green); }
.restoreMsg.bad { color: var(--red); }

/* Save codes are click-to-copy. */
.titleCode[role="button"], .theCode[role="button"] { cursor: pointer; user-select: text; }
.titleCode[role="button"]:hover b, .theCode[role="button"]:hover b { text-decoration: underline dotted; }
.titleCode[role="button"]:focus-visible, .theCode[role="button"]:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px;
}
b.copied { color: var(--green); }
b.copyfail { color: var(--amber); }
