@font-face { font-family: "Zilla Slab"; font-weight: 500; src: url(/type/zilla-500.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Zilla Slab"; font-weight: 700; src: url(/type/zilla-700.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Courier Prime"; font-weight: 400; src: url(/type/courier-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Courier Prime"; font-weight: 700; src: url(/type/courier-700.woff2) format("woff2"); font-display: swap; }

:root {
  --ground: #0e2a20;
  --surface: #143628;
  --raised: #1c4433;
  --line: #2f5c48;
  --ink: #f4efe2;
  --soft: #b4c4b6;
  --accent: #ffd23f;
  --accent-ink: #14251d;
  --paper: #f1e9d6;
  --paper-line: #c9bda2;
  --pencil: #2b2a26;
  --wall: #0b3b2c;
  --plaque: #0b2219;
  --hot: #ff6e4a;
  --warm: #ffd23f;
  --cold: #7fc4e8;
  --radius: 2px;
  --dock: 84px;
  --display: "Zilla Slab", Georgia, serif;
  --sans: "Zilla Slab", Georgia, serif;
  --mono: "Courier Prime", ui-monospace, monospace;
}

body { margin: 0; padding-bottom: calc(var(--dock) + 8px); background: var(--ground); color: var(--ink); font: 500 16px/1.35 var(--sans); }

.mast { display: flex; align-items: center; gap: 12px; padding: 9px 20px; }
.brand { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.wordmark { font: 700 29px/1 var(--display); letter-spacing: -.005em; }

.ticker { border-block: 1px solid var(--line); background: var(--plaque); }
#games { display: flex; gap: 6px; padding: 7px 20px; overflow-x: auto; scrollbar-width: none; }
.tip { display: grid; grid-template-columns: 50px; gap: 1px; padding: 3px; background: none; border: 1px solid var(--line); }
.tip { grid-template-columns: 48px 48px; }
.tip.on { border-color: var(--accent); }
.tip:disabled { opacity: .5; cursor: default; }
.chip-away, .chip-home { padding: 1px 0; background: var(--wall); color: var(--ink); font: 700 15px var(--mono); text-align: center; }
.chip-time { grid-column: 1 / -1; font: 400 11.5px var(--mono); color: var(--soft); text-align: center; }

.park { display: grid; grid-template-columns: 300px minmax(380px, 1fr) minmax(380px, 1fr); gap: 18px; align-items: start; padding: 16px 20px; max-width: 1640px; margin: 0 auto; }

.card { position: sticky; top: 12px; max-height: calc(100vh - var(--dock) - 28px); overflow-y: auto; padding: 12px 12px 14px; background: var(--paper); color: var(--pencil); scrollbar-width: thin; }
.card h2 { font: 700 24px/1 var(--display); }
.card-sub { margin: 2px 0 8px; font-size: 14px; color: #5e5a4f; }
.team { margin-top: 10px; }
.team h3 { padding-bottom: 2px; border-bottom: 2px solid var(--pencil); font: 700 17px var(--display); }
.team table { width: 100%; margin-bottom: 6px; border-collapse: collapse; font-family: var(--mono); font-size: 13.5px; }
.team thead th { padding: 3px 4px 1px; font: 700 11.5px var(--mono); text-align: left; border-bottom: 1px solid var(--pencil); }
.team td, .team tbody th { padding: 0 4px; border-bottom: 1px solid var(--paper-line); font-weight: 400; }
.team .no { width: 30px; color: #6b6657; }
.team .val { width: 56px; text-align: right; }
.team tbody th { text-align: left; }
.team tbody button { width: 100%; min-height: 27px; padding: 0; background: none; border: 0; font: 400 13.5px var(--mono); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; }
.team tbody tr:hover { background: #e6dcc3; }
.team tr.on { background: #f7d873; }
.team tr.on button { font-weight: 700; }
.card :focus-visible { outline-color: var(--pencil); }

.field { display: grid; gap: 9px; min-width: 0; }
.plate { display: flex; align-items: center; gap: 12px; }
.cap { flex: none; display: grid; place-items: center; width: 62px; height: 46px; background: var(--bg); color: var(--fg); border-radius: 30px 30px 3px 3px; font: 700 15px var(--mono); }
.plate h1 { font: 700 clamp(26px, 2.8vw, 36px)/1.02 var(--display); }
.plate p { font: 400 13.5px var(--mono); color: var(--soft); }
.flag { background: #3b3518; border-left: 3px solid var(--accent); }
.tabs { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 3px; }
.tabs button { flex: none; padding: 2px 8px; background: var(--wall); border: 1px solid var(--line); color: var(--soft); font: 700 13.5px var(--mono); }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }

.park-wrap { overflow: hidden; border: 3px solid var(--wall); }
.diamond { display: block; width: 100%; height: auto; max-height: calc(100vh - 350px); min-height: 300px; margin: 0 auto; }
.stands { fill: #24302c; }
.row { stroke: #333f3a; stroke-width: 3; }
.grass { fill: #3f8a4a; }
.mow { fill: none; stroke: #47964f; stroke-width: 20; }
.dirt { fill: #b98a5a; }
.infield { fill: #3f8a4a; }
.foul { stroke: #fff; stroke-width: 2.5; }
.bag { fill: #fff; }
.mound { fill: #b98a5a; stroke: #a0764b; }
svg .plate { fill: #fff; }
.wall-line { fill: none; stroke: var(--accent); stroke-width: 6; }
.wall-tag { font: 700 15px var(--display); fill: var(--accent-ink); paint-order: stroke; stroke: var(--accent); stroke-width: 7px; }
.ball { cursor: pointer; outline: none; }
.hide { fill: #fbf7ec; stroke-width: 4; transition: stroke-width .12s ease; }
.ball.hot .hide { stroke: var(--hot); }
.ball.warm .hide { stroke: #e6a800; }
.ball.cold .hide { stroke: #3f8fc0; }
.ball.none .hide { stroke: #777; }
.stitch { fill: none; stroke: #c9341f; stroke-width: 1.5; stroke-dasharray: 3 2.5; pointer-events: none; }
.ball text { fill: #14251d; pointer-events: none; }
.ball-line { font: 700 12.5px var(--mono); }
.ball-pct { font: 400 12px var(--mono); }
.ball:hover .hide, .ball:focus-visible .hide, .ball.focus .hide { stroke-width: 7; }
.ball.on .hide { fill: var(--accent); stroke: var(--wall); }
.park-key { font-size: 13.5px; color: var(--soft); }

.lines { display: grid; gap: 12px; min-width: 0; }
.book { padding: 9px 10px; background: var(--paper); color: var(--pencil); }
.book-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.book-head h3 { font: 700 16px var(--display); }
.book-head p { font: 400 13px var(--mono); }
.book-head strong { font-weight: 700; }
.boxes { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); border-top: 1px solid var(--pencil); border-left: 1px solid var(--pencil); }
.boxes li { position: relative; display: grid; justify-items: center; height: 46px; padding-top: 3px; border-right: 1px solid var(--pencil); border-bottom: 1px solid var(--pencil); }
.mini-diamond { position: absolute; top: 12px; left: 50%; width: 20px; height: 20px; transform: translateX(-50%) rotate(45deg); border: 1px solid var(--paper-line); }
.boxes .hit .mini-diamond { background: #f7d873; border-color: var(--pencil); }
.boxes b { position: relative; font: 700 16px/20px var(--mono); margin-top: 8px; }
.boxes small { position: absolute; bottom: 0; left: 2px; font: 400 8.5px var(--mono); color: #6b6657; }

.ladder-wrap { max-height: calc(100vh - 360px); min-height: 220px; background: var(--paper); color: var(--pencil); }
.ladder { font-family: var(--mono); }
.ladder thead th { background: var(--paper); box-shadow: inset 0 -2px 0 var(--pencil); font-family: var(--mono); font-weight: 700; }
.ladder tbody th, .ladder td { border-bottom: 1px solid var(--paper-line); }
.ladder .alt { color: #5e5a4f; }
.ladder tr:hover td, .ladder tr:hover th, .ladder tr.focused td, .ladder tr.focused th { background: #e6dcc3; }
.ladder tr.picked td, .ladder tr.picked th { background: #f7d873; }
.ladder { --hot: #d8431f; --warm: #c28f00; --cold: #2f7fae; }
.add { background: var(--paper); border-color: var(--pencil); color: var(--pencil); }
.add:hover:not(:disabled) { background: var(--pencil); color: var(--paper); }
.add[aria-pressed="true"] { background: var(--pencil); border-color: var(--pencil); color: var(--paper); }
.stamp { color: var(--soft); }

.wall { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 16px; height: var(--dock); padding: 0 20px; background: var(--wall); border: 0; border-top: 4px solid var(--accent); color: #fff; text-align: left; }
.wall-title { flex: none; font: 700 22px var(--display); }
.innings { flex: 1; display: flex; gap: 3px; min-width: 0; overflow: hidden; }
.inning { flex: none; display: grid; justify-items: center; width: 44px; }
.inning small { font: 700 11px var(--mono); color: #cfe0d4; }
.inning b { display: grid; place-items: center; width: 42px; height: 38px; background: var(--plaque); color: #fff; font: 700 21px var(--mono); }
.inning.up b { background: #fff; color: var(--plaque); }
.totals { flex: none; display: flex; gap: 12px; }
.totals span { display: grid; justify-items: end; }
.totals small { font: 700 11px var(--mono); color: #cfe0d4; }
.totals b { font: 700 26px/1 var(--mono); color: var(--accent); }
.wall-open { flex: none; padding: 7px 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }

.sheet { position: fixed; z-index: 35; top: 0; right: 0; bottom: calc(var(--dock) + 4px); width: 390px; background: var(--surface); border-left: 3px solid var(--wall); animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(26px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head h2 { font: 700 26px var(--display); }
.x:hover { border-color: var(--accent); color: var(--accent); }
.scoreboard { display: grid; justify-items: center; gap: 6px; padding: 12px; background: var(--wall); }
.scoreboard p:first-child { font-size: 14px; color: #cfe0d4; }
.numbers { display: flex; gap: 3px; }
.plaque { display: grid; place-items: center; width: 44px; height: 58px; background: var(--plaque); color: #fff; font: 700 36px var(--mono); }
.fair { font: 700 14px var(--mono); }
.est strong { color: var(--accent); font-weight: 700; }
.verdict.past { background: var(--accent); color: var(--accent-ink); }
.verdict.short { background: var(--raised); }
.verdict strong { font: 700 21px var(--display); }
.suggest h3 { font: 700 19px var(--display); }

.out-row th, .out-row td, .out-row strong { color: #94896f; }
.out-row .meter { background: linear-gradient(90deg, #94896f var(--w), transparent var(--w)); opacity: .3; }
.add:disabled { opacity: 1; color: #94896f; border-color: var(--paper-line); cursor: not-allowed; }
.ball.locked { cursor: not-allowed; }
.ball.locked .hide { fill: #cfcabd !important; stroke: #99927f !important; stroke-width: 3 !important; }
.ball.locked .stitch { stroke: #99927f; }

.nextman { --x-panel: var(--paper); --x-ink: var(--pencil); }
.sheet .xray, .sheet .sweat { --x-panel: var(--raised); }

tr.jumped { --jump: #c28f00; }

@media (max-width: 1320px) {
  .park { grid-template-columns: 280px minmax(0, 1fr); }
  .card { grid-column: 1; grid-row: 1 / span 2; }
  .field { grid-column: 2; grid-row: 1; }
  .lines { grid-column: 2; grid-row: 2; }
  .ladder-wrap { max-height: none; }
  .diamond { max-height: none; }
}

@media (max-width: 860px) {
  .park { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
  .field { order: -1; }
  .card { position: static; max-height: 280px; grid-row: auto; grid-column: auto; }
  .field { grid-row: auto; grid-column: auto; }
  .lines { grid-column: auto; grid-row: auto; }
}

@media (max-width: 640px) {
  :root { --dock: 66px; }
  .mast { padding: 8px 14px; }
  .search { flex: 1; width: auto; }
  #games { padding-inline: 14px; }
  .wall { padding: 0 12px; gap: 10px; }
  .innings, .totals small { display: none; }
  .wall-title { font-size: 19px; }
  .wall-open { margin-left: auto; }
  .totals { flex: 1; justify-content: space-between; }
  .totals b { font-size: 22px; }
  .sheet { left: 0; width: auto; top: 44px; border-left: 0; border-radius: 8px 8px 0 0; }
  .book-col, .ladder.priced .fair-col { display: none; }
  .ladder th, .ladder td { padding-inline: 5px; }
  .bar-cell { min-width: 84px; }
  .act { width: 52px; }
  .diamond { min-height: 0; }
}
