.play-game {
  --game-grass: #254d3a;
  --game-field-ink: #f4f1df;
  --game-field-muted: #c3d0be;
  --game-field-line: #edf0d62e;
  width: min(1220px, calc(100% - 40px));
  padding-block: 18px 30px;
  font-size: 14px;
}
[data-theme="dark"] .play-game { --game-grass: #1b3c2f; }
.game-heading, .game-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.game-heading { justify-content: space-between; margin-bottom: 12px; }
.game-heading h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: clamp(24px, 2.5vw, 30px); font-weight: 650; letter-spacing: -.035em; line-height: 1.2; }
.game-beta { display: inline-flex; flex: none; align-items: center; padding: 5px 7px; border: 1px solid var(--ink); border-radius: 4px; color: var(--ink); background: var(--surface); font: 700 11px/1 var(--sans); letter-spacing: .06em; }
.game-mode-label { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.game-heading-actions { font-size: 13px; }
.game-heading-actions a { text-underline-offset: 3px; }
.game-button, .game-roster-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--action-neutral, var(--surface));
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
}
.game-button:hover, .game-roster-toggle button:hover { background: var(--surface); }
.game-button--primary, .game-button.primary {
  border-color: transparent;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.game-button--primary:hover, .game-button.primary:hover { background: color-mix(in srgb, var(--ink) 82%, var(--paper)); }
.game-layout .game-button--primary, .game-layout .game-button.primary { background: #f4f1df; color: #193b2b; }
.game-layout .game-button--primary:hover, .game-layout .game-button.primary:hover { background: #fff; }
.game-sound-toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.play-game button:disabled { opacity: .5; cursor: default; }
.play-game :focus-visible, .game-card-dialog :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.game-notice { margin-block: 10px; color: var(--muted); line-height: 1.5; }
.game-notice:empty { display: none; }

/* Keep the roster, game options and opponent on one setup surface. */
.play-game:has(> .game-lobby) { max-width: 1080px; }
.play-game:has(> .game-lobby) > .game-heading { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 0; }
.game-lobby { min-width: 0; }
.game-lobby-setup {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(288px, 1fr);
  align-items: start; gap: clamp(24px, 3.2vw, 44px); padding-block: 20px 24px;
}
.game-match-settings { min-width: 0; border-inline-start: 1px solid var(--line); padding-inline-start: clamp(20px, 2.5vw, 32px); }
.game-team-selection, .game-opponents, .game-rule-options { min-width: 0; }
.game-team-heading, .game-opponent-row, .game-rule-switches, .game-inline-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
}
.game-team-heading, .game-opponent-row { justify-content: space-between; }
.game-team-heading { margin-bottom: 12px; min-height: 36px; }
.game-lobby h2 { margin: 0; font: 600 20px/1.25 var(--sans); letter-spacing: -.025em; }
.game-match-settings > h2 { display: flex; align-items: center; min-height: 36px; margin-bottom: 12px; }
.game-lobby .game-submitted-team { font-size: 16px; font-weight: 550; }
.game-lobby-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.game-lobby-fields label, .game-friend-select { display: grid; align-items: start; gap: 5px; min-width: 0; font-size: 13px; }
.game-lobby-fields :is(select, input), .game-friend-select select {
  appearance: none; box-sizing: border-box; display: block; width: 100%; min-width: 0; height: 40px; margin: 0; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--paper); font: inherit; line-height: 22px;
}
.game-lobby-fields select, .game-friend-select select {
  padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%2373777b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 11px center; background-repeat: no-repeat; text-overflow: ellipsis;
}
.game-team-preview { display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); gap: 4px; padding: 16px 0 0; }
.game-preview-card { min-width: 0; width: 100%; padding: 0; border: 0; border-radius: 4px; background: transparent; }
.game-team-ready, .game-team-error { margin-top: 7px; color: var(--muted); font-size: 13px; }
.game-rule-options { margin: 0; }
.game-rule-switches { margin-top: 10px; gap: 4px 20px; }
.game-icon-rule-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; font-size: 13px; font-weight: 500; }
.game-icon-rule-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.game-strategy-setup { flex: 1 1 260px; min-width: 0; }
.game-opponent-heading small { color: var(--muted); font-size: 12px; }
.game-opponents { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.game-opponents h2 { margin-bottom: 8px; font-size: 16px; }
.game-opponent-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; }
.game-opponents h3, .game-friend-select > span { margin: 0; font-size: 14px; font-weight: 550; }
.game-opponent-row { min-height: 36px; }
.game-friend-controls { margin-top: 8px; }
.game-friend-controls:has([data-game-challenge]) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.game-friend-select { grid-template-columns: minmax(0, 1fr); gap: 5px; }
.game-friend-controls [data-game-challenge] { height: 40px; }
.game-invitation p { margin-bottom: 12px; color: var(--muted); }
.game-lobby-back { padding: 4px 0; margin-top: 12px; font: inherit; font-size: 13px; color: var(--muted); border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.game-lobby > .game-notice:not(:empty) { margin: 0 0 16px; }
.game-lobby > :is(.game-records,.game-rules) { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.game-lobby > details > summary { color: var(--ink); font-weight: 550; cursor: pointer; }
.game-lobby .game-saved-games { padding-block: 16px; }
.game-lobby .game-saved-games li:last-child { border: 0; }
.game-card-dialog.game-adjust-dialog { width: min(600px, calc(100vw - 32px)); }
.game-adjust-dialog > p { margin-block: 12px 20px; color: var(--muted); }
.game-adjust-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.game-adjust-batter { grid-column: 1 / -1; }
.game-adjust-dialog label { display: grid; gap: 6px; min-width: 0; font-size: 13px; }
.game-adjust-dialog :is(input, select) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 40px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink); font: inherit; }
.game-adjust-bases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 12px; padding: 0; border: 0; }
.game-adjust-bases legend { padding: 0 0 10px; font-size: 13px; font-weight: 600; }
.game-adjust-bases:disabled { opacity: .5; }
.game-adjust-note, .game-adjust-error { margin-block: 12px; font-size: 12px; }
.game-adjust-note { color: var(--muted); }
.game-adjust-error { color: var(--ink); font-weight: 600; }
.game-adjust-error:empty { display: none; }
.game-adjust-dialog footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 15px; border-top: 1px solid var(--line); }
.game-adjust-dialog footer p { flex: 1 1 200px; max-width: 28ch; color: var(--muted); font-size: 12px; }
@media(max-width: 500px) { .game-adjust-bases { grid-template-columns: minmax(0, 1fr); } .game-adjust-dialog :is(input, select) { font-size: 16px; } }
.game-strategy-setup label { display: flex; align-items: center; gap: 7px; min-height: 36px; }
.game-strategy-setup input[type="radio"] { width: 16px; height: 16px; accent-color: var(--ink); }
.game-strategy-setup p { margin-top: 6px; color: var(--muted); font-size: 13px; }
.game-card-dialog.game-deck-dialog { width: min(850px, calc(100% - 28px)); }
.game-deck-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-block: 16px; }
.game-deck-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.game-deck-card img { flex: none; width: 54px; height: 76px; object-fit: contain; }
.game-deck-card > span { flex: 1; min-width: 0; }
.game-deck-card strong, .game-deck-card small { display: block; }
.game-deck-card strong { font-size: 14px; font-weight: 600; }
.game-deck-card small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.game-deck-card input { flex: none; width: 48px; min-height: 38px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); font: inherit; }
.game-deck-dialog footer { position: sticky; bottom: -18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-block: 12px; background: var(--paper); border-top: 1px solid var(--line); }
.game-strategy-discards { display: grid; gap: 7px; margin-block: 12px; padding: 10px; border: 1px solid var(--line); }
.game-strategy-discards label { display: flex; align-items: center; gap: 7px; min-height: 32px; }
.game-strategy-hand { display: flex; flex: 1 1 0; flex-direction: column; gap: 7px; height: 0; min-height: 0; overflow-y: auto; padding: 4px 3px 10px; overscroll-behavior: contain; scrollbar-width: thin; }
.game-hand-card { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px; border: 1px solid var(--game-field-line); border-radius: 5px; background: transparent; color: var(--game-field-ink); text-align: left; font: inherit; }
.game-hand-card img { flex: none; width: 38px; aspect-ratio: 5 / 7; object-fit: contain; border-radius: 2px; }
.game-hand-card strong { display: block; font-size: 12px; font-weight: 500; line-height: 1.25; }
.game-hand-card small { display: block; margin-top: 4px; color: var(--game-field-muted); font-size: 11px; line-height: 1.25; }
.game-hand-card.is-playable { border-color: #eadfa3; background: #fff1; }
.game-hand-card.is-playable small { color: #eadfa3; }
.game-hand-counts { margin-bottom: 8px; line-height: 1.4; }
.game-last-strategy { display: block; margin-top: 4px; color: var(--game-field-muted); font-size: 11px; }
@media (max-width: 680px) {
  .game-deck-cards { grid-template-columns: minmax(0, 1fr); }
  .game-strategy-hand { flex: none; height: auto; max-height: 320px; }
}

.game-play-area { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: stretch; gap: 16px; }
.game-board { min-width: 0; }
.game-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px 24px;
  min-height: 48px;
  padding: 6px 18px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
.game-score-team { display: flex; align-items: center; min-width: 0; gap: 12px; font-size: 15px; line-height: 1.2; }
.game-score-team:last-child { justify-content: flex-end; text-align: right; }
.game-score-team > :not(.game-runs) { min-width: 0; overflow-wrap: anywhere; }
.game-score-team small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.game-runs { flex: none; font-size: 30px; font-weight: 600; line-height: 1; }
.game-status { display: grid; justify-items: center; gap: 2px; text-align: center; font-size: 13px; white-space: nowrap; }
.game-status small, .game-status > span + span { color: var(--muted); font-size: 12px; }
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  padding: 12px 14px 8px;
  border: 1px solid #416950;
  border-radius: 0 0 9px 9px;
  background: var(--game-grass);
  color: var(--game-field-ink);
}
.game-main { min-width: 0; }
.game-field {
  position: relative;
  isolation: isolate;
  width: min(100%, 680px);
  max-width: 100%;
  height: clamp(250px, calc(100dvh - 460px), 380px);
  margin-inline: auto;
}
.game-field > svg, .game-field-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.game-defense, .game-runner {
  position: absolute;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 44px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--game-field-ink);
  transform: translate(-50%, -50%);
  text-align: center;
  line-height: 1.15;
}
.game-defense small, .game-defense > span:not(.card-crop):not(.game-card-art),
.game-runner small, .game-runner > span:not(.card-crop):not(.game-card-art) { font-size: 10px; }
.game-defense[data-position="LF"] { left: 20%; top: 15.18%; }
.game-defense[data-position="CF"] { left: 50%; top: 8.2%; }
.game-defense[data-position="RF"] { left: 80%; top: 15.18%; }
.game-defense[data-position="SS"] { left: 35%; top: 30.36%; }
.game-defense[data-position="2B"] { left: 65%; top: 30.36%; }
.game-defense[data-position="3B"] { left: 15%; top: 53.57%; }
.game-defense[data-position="1B"] { left: 85%; top: 53.57%; }
.game-defense[data-position="P"] { left: 50%; top: 53.57%; }
.game-defense[data-position="C"] { left: 50%; top: 94.64%; }
.game-card-art { display: grid; place-items: center; width: 100%; aspect-ratio: 5 / 7; min-width: 0; }
.game-card-missing { display: grid; place-items: center; width: 100%; aspect-ratio: 5 / 7; padding: 3px; border: 1px solid var(--game-field-line, var(--line)); border-radius: 3px; background: var(--surface); color: var(--muted); font-size: 10px; text-align: center; }
.game-card-art > img { width: 100%; height: 100%; object-fit: contain; border-radius: 3px; }
.game-card-art > .card-crop { width: var(--card-slot-width); height: var(--card-slot-height); }
:is(.game-defense, .game-runner) > img,
:is(.game-defense, .game-runner) > .card-crop { width: 100%; height: auto; border-radius: 3px; }
:is(.game-defense, .game-runner) > img { aspect-ratio: 5 / 7; object-fit: contain; }
.game-defense:is(:hover, :focus-visible), .game-runner:is(:hover, :focus-visible) { z-index: 5; outline: 2px solid #eadfa3; outline-offset: 3px; }
.game-runner { z-index: 3; width: 48px; padding: 2px; border: 1px solid #eadfa3; background: #19372b; border-radius: 4px; box-shadow: 0 2px 5px #0004; }
.game-runner--first { left: 72%; top: 55.36%; }
.game-runner--second { left: 50%; top: 27.68%; }
.game-runner--third { left: 28%; top: 55.36%; }
.game-runner--home { left: 50%; top: 83.04%; }
.game-runner-scoring, .game-runner-retired { pointer-events: none; }
.game-fielding-team { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.game-field:has(> .game-fielding-team) > .game-defense { visibility: hidden; }
.game-runner small { color: #f6e8ac; }

.game-ball-layer { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.game-ball, .game-ball-shadow { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; }
.game-ball { width: 10px; height: 10px; z-index: 1; }
.game-ball svg { display: block; width: 100%; height: 100%; }
.game-ball-shadow { width: 9px; height: 4px; background: #071c12; border-radius: 50%; filter: blur(.7px); }
@media (prefers-reduced-motion: reduce) { .game-ball-layer { display: none; } }

/* Compact screens keep the matchup below the diamond with one central roll action. */
.game-duel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(100%, 680px);
  margin: 3px auto 0;
  padding: 8px 0;
  border-top: 1px solid var(--game-field-line);
}
.game-duel-card { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; line-height: 1.3; }
.game-duel-card:last-child { flex-direction: row-reverse; text-align: right; }
.game-duel-card > :is(button, a, .game-card-art, .card-crop, img) { flex: 0 0 72px; width: 72px; }
.game-duel-card > :is(button, a) { display: block; padding: 0; border: 0; border-radius: 3px; background: transparent; }
.game-duel-card > :is(button, a) > img { width: 100%; height: auto; border-radius: 3px; }
.game-duel-card > .card-crop, .game-duel-card > :is(button, a) > .card-crop { width: 72px; height: auto; }
.game-duel-card strong { display: block; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.game-duel-card small { display: block; margin-top: 3px; color: var(--game-field-muted); font-size: 11px; }
.game-player-icons { display: flex; flex-wrap: wrap; gap: 3px; max-width: 100%; margin-top: 3px; padding: 3px 0; border: 0; background: transparent; }
.game-duel-card:last-child .game-player-icons { margin-inline-start: auto; }
.game-player-icon-list { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.game-player-icon-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.game-player-icon-list small { display: block; color: var(--muted); line-height: 1.3; }
.game-roll { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; justify-items: center; gap: 4px 8px; text-align: center; min-width: 180px; max-width: 220px; }
.game-die { position: relative; display: grid; place-items: center; width: 48px; height: 48px; color: #19372b; font-variant-numeric: tabular-nums; }
.game-die > svg { position: absolute; inset: 0; width: 100%; height: 100%; color: #e9dfbb; }
.game-die path { fill: #e9dfbb; stroke: #516346; stroke-width: 2; stroke-linejoin: round; }
.game-die > :is(span, strong, output) { position: relative; z-index: 1; font-size: 21px; font-weight: 650; line-height: 1; }
.game-roll .game-button { min-height: 34px; padding: 6px 12px; }
.game-roll > small { grid-column: 1 / -1; color: var(--game-field-muted); font-size: 11px; }
.game-ability-options { grid-column: 1 / -1; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.game-ability-option { display: inline-flex; align-items: center; justify-content: center; gap: 5px; max-width: 100%; padding: 5px 9px; border: 1px solid var(--game-field-line); border-radius: 5px; background: #12382b; color: var(--game-field-ink); font: inherit; font-size: 12px; line-height: 1.25; cursor: pointer; }
.game-ability-option:is(:hover,:focus-visible) { border-color: var(--game-field-muted); }
.game-ability-option:disabled { opacity: .6; cursor: default; }
.game-play-result { width: min(100%, 680px); margin: 4px auto 0; text-align: center; color: var(--game-field-ink); font-size: 13px; line-height: 1.4; }
.game-batting-order {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 8px 3px;
  list-style: none;
}
.game-batting-order > * { position: relative; flex: 0 0 56px; width: 56px; min-width: 0; }
.game-batting-order > * + * { margin-left: -13px; }
.game-batting-order button, .game-roster-cards button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  text-align: center;
}
.game-batting-order :is(button, a) > img, .game-roster-cards :is(button, a) > img { width: 100%; height: auto; border-radius: 3px; }
.game-batting-order :is(button, a) > .card-crop, .game-roster-cards :is(button, a) > .card-crop { width: 100%; height: auto; }
.game-batting-order > :is(button, a) { width: 56px; }
.game-batting-order > :is(button, a) > .card-crop { width: 100%; height: auto; }
.game-batting-order small { display: block; font-size: 10px; color: var(--game-field-muted); }
.game-batting-order > :is(:hover, :focus-within), .game-roster-cards > :is(:hover, :focus-within) { z-index: 5; }
.game-batting-order :is([aria-current="true"], [aria-current="step"], .is-active) { outline: 2px solid #eadfa3; outline-offset: 2px; }
.game-layout :focus-visible { outline-color: #eadfa3; }
.game-defense { opacity: .68; transition: opacity 120ms ease; }
.game-defense:is(:hover, :focus-visible) { opacity: 1; }

.game-opponent { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding-left: 12px; border-left: 1px solid var(--game-field-line); }
.game-opponent h2 { margin-bottom: 7px; font-size: 14px; line-height: 1.3; font-weight: 500; overflow-wrap: anywhere; }
.game-opponent > p { color: var(--game-field-muted); font-size: 12px; }
.game-roster-toggle { display: flex; gap: 4px; margin-bottom: 7px; }
.game-roster-toggle button { flex: 1; min-width: 0; min-height: 32px; padding: 6px; border-color: var(--game-field-line); background: transparent; color: var(--game-field-muted); font-size: 11px; }
.game-roster-toggle button[aria-pressed="true"], .game-roster-toggle button[aria-selected="true"] { background: #edf1dc; color: #183725; border-color: #edf1dc; }
.game-roster-cards {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  height: 0;
  margin: 0;
  padding: 8px 14px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #9bb6a2 transparent;
  list-style: none;
}
.game-roster-cards > * { position: relative; flex: 0 0 auto; width: 64px; }
.game-roster-cards > :is(button, a) { width: 64px; }
.game-roster-cards > * + * { margin-top: -43px; }
.game-roster-cards > :is(button, a) > .card-crop { width: 100%; height: auto; }
.game-roster-cards small { display: block; font-size: 10px; line-height: 1.15; }
.game-log { margin-top: 10px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.game-log summary { width: fit-content; cursor: pointer; color: var(--ink); }
.game-log :is(ol, ul) { max-height: 180px; overflow-y: auto; margin: 9px 0 0; padding-left: 22px; }
.game-log li { padding-block: 3px; }
.game-log li small { color: var(--muted); white-space: nowrap; }
.game-bottom-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 18px; margin-top: 10px; }
.game-bottom-bar .game-log { flex: 1; min-width: 0; margin: 0; padding-top: 7px; border: 0; }
.game-rules { margin-top: 10px; font-size: 12px; color: var(--muted); }
.game-rules summary { width: fit-content; cursor: pointer; color: var(--ink); }
.game-rules p { max-width: 90ch; margin-block: 8px; }
.game-rules a { text-underline-offset: 3px; }
.game-saved-games { margin-top: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.game-saved-games h2 { font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.game-saved-games > p { margin-top: 8px; color: var(--muted); }
.game-saved-games ul { margin: 8px 0 0; padding: 0; list-style: none; }
.game-saved-games li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.game-saved-games li > div { min-width: 0; overflow-wrap: anywhere; }
.game-saved-games li strong, .game-saved-games li span { display: block; }
.game-saved-games li span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.game-saved-games li .game-button { flex: none; }

.game-card-dialog {
  width: min(430px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 18px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 48px #0004;
  font-size: 14px;
}
.game-card-dialog::backdrop { background: #0008; }
.game-card-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.game-card-dialog h2 { font-size: 20px; font-weight: 500; }
.game-card-dialog .game-card-art { width: min(100%, 270px); margin: 14px auto; }
.game-card-dialog > img, .game-card-dialog > .card-crop { width: min(100%, 270px); height: auto; margin: 14px auto; }
.game-card-dialog p { margin-block: 6px; color: var(--muted); }
.game-pitcher-workload, .game-arm-ratings { font-variant-numeric: tabular-nums; }
.game-pitcher-workload.is-tired b { display: block; color: #f8d897; font-weight: 600; }
.game-bullpen-trigger {
  margin: 2px 0; padding: 3px 0; border: 0; background: none; color: var(--game-field-ink);
  font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.game-bullpen-trigger:disabled { opacity: .6; cursor: default; }
.game-bullpen-dialog { width: min(440px, calc(100vw - 28px)); }
.game-bullpen-dialog fieldset { margin: 0; padding: 0; border: 0; }
.game-bullpen-dialog legend { margin-bottom: 8px; color: var(--muted); }
.game-bullpen-dialog label {
  display: grid; grid-template-columns: auto 28px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer;
}
.game-bullpen-dialog label .game-card-art, .game-bullpen-dialog label .game-card-missing { width: 28px; margin: 0; }
.game-bullpen-dialog label strong, .game-bullpen-dialog label small { display: block; }
.game-bullpen-dialog label small, .game-arm-ratings { color: var(--muted); font-size: 12px; }
.game-bullpen-dialog footer { display: flex; justify-content: flex-end; margin-top: 16px; }
.game-card-dialog.game-undo-dialog { width: min(470px, calc(100vw - 32px)); }
.game-undo-dialog .game-undo-action { margin-block: 16px 10px; color: var(--ink); font-weight: 550; }
.game-undo-dialog footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.game-history-actions { display: inline-flex; align-items: center; flex: none; flex-wrap: nowrap; gap: 4px; }
.game-heading-actions :is(.game-adjust-button, .game-history-button, .game-sound-toggle) { width: 36px; height: 36px; min-width: 36px; padding: 0; }
.game-heading-actions :is(.game-adjust-button, .game-history-button, .game-sound-toggle) svg { flex: none; }
body:has(.game-card-dialog[open]) { overflow: hidden; }

@media (hover: hover) and (pointer: fine) {
  .game-batting-order > :hover { transform: translateY(-5px); }
  .game-roster-cards > :hover { transform: translateX(-4px); }
}
.game-card-preview { display: none; }
/* Magnify within the matchup rail, leaving the field and roll controls clear. */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .game-active-card { position: relative; aspect-ratio: 5 / 7; user-select: none; }
  .game-duel:has(.game-active-card:is(:hover, :focus-visible)) { position: relative; z-index: 10; }
  .game-active-card:is(:hover, :focus-visible) { position: static; }
  .game-active-card:is(:hover, :focus-visible) > .game-card-preview {
    display: block;
    position: absolute;
    grid-column: 1 / -1;
    grid-row: 1;
    left: 0;
    top: 0;
    z-index: 2;
    width: auto;
    height: min(392px, calc(100% - 6px));
    max-width: 100%;
    aspect-ratio: 5 / 7;
    pointer-events: none;
  }
  .game-card-preview > .game-card-art {
    border-radius: 4px;
    box-shadow: 0 12px 32px #0008, 0 0 0 1px #eadfa380;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .game-batting-order > *, .game-roster-cards > * { transition: transform 160ms cubic-bezier(.22,.61,.36,1); }
}
/* Put the matchup beside the diamond so its larger cards share the field's height. */
@media (min-width: 901px) {
  .play-game { --game-active-size: 114px; padding-top: 10px; }
  .game-heading { margin-bottom: 8px; }
  .game-heading > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; }
  .game-mode-label { margin: 0; }
  .game-layout { padding-top: 16px; }
  .game-main {
    display: grid;
    grid-template-columns: max(calc(2 * var(--game-active-size) + 12px), clamp(230px, 23vw, 280px)) minmax(0, 1fr);
    column-gap: 18px;
    align-items: start;
  }
  .game-field { grid-column: 2; grid-row: 1; width: 100%; height: clamp(280px, calc(100dvh - 366px), 500px); margin-bottom: 18px; }
  .game-defense { width: 50px; }
  .game-defense[data-position="CF"] { top: 6%; }
  .game-defense[data-position="C"] { top: 95%; }
  .game-runner { width: 48px; }
  .game-duel {
    grid-column: 1; grid-row: 1 / 4;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: start;
    align-content: stretch;
    align-self: stretch;
    min-height: 0;
    gap: 16px 12px;
    width: 100%; margin: 0; padding: 0; border: 0;
  }
  .game-duel-card, .game-duel-card:last-child { flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
  .game-duel-card:first-child { grid-column: 1; grid-row: 1; }
  .game-duel-card:last-child { grid-column: 2; grid-row: 1; }
  .game-duel-card > :is(button, a, .game-card-art, .card-crop, img) { flex: none; width: var(--game-active-size); }
  .game-duel-card > .card-crop, .game-duel-card > :is(button, a) > .card-crop { width: var(--game-active-size); }
  .game-duel-card strong { font-size: 14px; line-height: 1.25; }
  .game-duel-card:last-child .game-player-icons { margin-inline-start: 0; }
  .game-duel-card small { margin: 0 0 3px; font-size: 12px; }
  .game-roll { grid-column: 1 / -1; grid-row: 2; justify-self: center; width: 100%; max-width: 240px; }
  .game-roll > small { font-size: 12px; line-height: 1.35; }
  .game-play-result { grid-column: 2; grid-row: 2; margin-top: 2px; }
  .game-batting-order { grid-column: 2; grid-row: 3; padding-top: 6px; }
  .game-layout--strategy .game-field { height: clamp(260px, calc(100dvh - 420px), 450px); }
}
@media (min-width: 1100px) and (min-height: 850px) {
  .play-game { --game-active-size: 132px; }
  .game-defense { width: 60px; }
  .game-runner { width: 56px; }
}
@media (min-width: 1100px) and (min-height: 950px) {
  .play-game { --game-active-size: 144px; }
  .game-defense { width: 64px; }
  .game-runner { width: 60px; }
}
@media (min-width: 901px) and (max-height: 700px) {
  .play-game { --game-active-size: 100px; }
  .game-defense { width: 44px; }
  .game-runner { width: 44px; }
}
@media (min-width: 901px) and (max-height: 660px) {
  .play-game { --game-active-size: 92px; }
  .game-defense { width: 40px; }
  .game-defense[data-position="CF"] { top: 5%; }
  .game-defense[data-position="C"] { top: 95.5%; }
  .game-runner { width: 40px; }
}
@media (max-width: 740px) {
  .game-lobby-setup { grid-template-columns: minmax(0,1fr); gap: 18px; padding-block: 16px 20px; }
  .game-lobby-fields { gap: 8px 12px; }
  .game-lobby-fields :is(input, select), .game-friend-select select { font-size: 16px; }
  .game-team-preview { grid-template-columns: repeat(10, minmax(43px, 1fr)); overflow-x: auto; overscroll-behavior-inline: contain; padding: 10px 1px 4px; }
  .game-match-settings { border-inline-start: 0; border-top: 1px solid var(--line); padding: 14px 0 0; }
  .game-match-settings > h2 { min-height: 0; }
}
@media (max-width: 360px) {
  .game-roster-choice { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 900px) {
  .play-game { width: calc(100% - 28px); }
  .game-layout { gap: 10px; padding-inline: 10px; }
  .game-opponent { padding-left: 9px; }
  .game-field { width: 560px; min-width: 560px; height: auto; aspect-ratio: 1000 / 560; }
  .game-main { overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: #9bb6a2 transparent; }
  .game-duel { min-width: 560px; }
  .game-defense { width: 36px; }
  .game-runner { width: 40px; }
}
@media (max-width: 680px) {
  .game-heading { align-items: flex-start; }
  .game-heading-actions { gap: 7px 10px; }
  .game-scoreboard { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; padding: 10px; }
  .game-score-team { gap: 7px; font-size: 13px; }
  .game-runs { font-size: 26px; }
  .game-status { font-size: 12px; }
  .game-status small, .game-status > span + span { font-size: 10px; }
  .game-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .game-main { padding-bottom: 6px; }
  .game-duel { gap: 8px; }
  .game-duel-card { gap: 6px; }
  .game-duel-card strong { font-size: 13px; }
  .game-opponent { padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--game-field-line); }
  .game-roster-toggle { width: min(100%, 240px); }
  .game-roster-toggle button { min-height: 36px; font-size: 12px; }
  .game-roster-cards { flex: none; flex-direction: row; align-items: flex-start; height: auto; padding: 8px 5px; overflow: auto hidden; }
  .game-roster-cards > * { flex: 0 0 44px; width: 44px; }
  .game-roster-cards > :is(button, a) { width: 44px; }
  .game-roster-cards > * + * { margin: 0 0 0 -9px; }
  .game-batting-order { margin-left: 0; min-width: 410px; justify-content: center; }
  .game-card-dialog { padding: 14px; }
}

/* The guide and conversation live in a separate rail beside the playmat. */
.game-sidebar { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; contain: size; overflow: hidden; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.game-side-panel { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; }
.game-side-panel + .game-side-panel { border-top: 1px solid var(--line); padding-top: 8px; }
.game-side-panel.is-collapsed { flex: 0 0 auto; }
.game-side-panel > h2 { flex: none; margin: 0; }
.game-panel-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 32px; padding: 3px 0; border: 0; background: transparent; color: var(--ink); text-align: left; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.game-panel-toggle span { width: 22px; text-align: center; font-size: 18px; font-weight: 400; }
.game-panel-body { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; padding-top: 4px; }
.game-sidebar .game-panel-body[hidden] { display: none; }
.game-side-panel.game-chat-panel { flex-grow: 1.4; }
.game-side-panel.game-chat-panel.is-collapsed { flex-grow: 0; }
.game-helper > .game-panel-body { display: block; overflow-y: auto; scrollbar-width: thin; }
.game-roster-pane .game-panel-body > h2 { margin: 3px 0 6px; font-size: 13px; font-weight: 500; }
.game-helper strong { font-size: 13px; font-weight: 600; }
.game-helper p { margin-top: 6px; font-size: 13px; line-height: 1.5; }
.game-helper small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.game-helper .game-play-result { width: auto; margin: 8px 0; color: var(--ink); text-align: left; font-size: 12px; }
.game-helper summary { cursor: pointer; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.game-helper label { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; }
.game-helper select { width: 100%; min-width: 0; padding: 5px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.game-guide-sources { margin-top: 6px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.game-roster-pane { overflow: hidden; }
.game-bench-help { margin-bottom: 6px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.game-bench-cards { display: flex; flex: 1 1 0; flex-wrap: wrap; align-content: start; gap: 6px; min-height: 0; overflow-y: auto; padding: 3px; scrollbar-width: thin; }
.game-bench-card { flex: none; width: 48px; padding: 0; border: 0; border-radius: 3px; background: transparent; touch-action: none; }
.game-bench-card[draggable="true"] { cursor: grab; }
.game-play-area .roster-drop-allowed { outline: 1px dashed #eadfa3; outline-offset: 3px; }
.game-play-area .roster-drop-target { outline: 3px solid #eadfa3; opacity: 1; }
.game-play-area .roster-drop-invalid { outline: 2px solid #ed9b8a; }
.game-play-area .roster-drag-source { opacity: .45; }
.game-card-dialog.game-reserve-dialog { width: min(560px, calc(100vw - 28px)); }
.game-reserve-layout { display: grid; grid-template-columns: minmax(88px, 28%) minmax(0, 1fr); gap: 18px; align-items: start; }
.game-reserve-scan { min-width: 0; }
.game-reserve-scan .game-card-art { width: 100%; margin: 0 0 8px; }
.game-reserve-scan > a { font-size: 12px; }
.game-substitution-choice { display: grid; gap: 10px; min-width: 0; }
.game-substitution-choice [hidden] { display: none; }
.game-substitution-choice .game-button { justify-self: start; }
.game-substitution-choice p { font-size: 13px; line-height: 1.45; }
.game-substitution-choice label { display: grid; gap: 5px; }
.game-substitution-choice select { width: 100%; min-width: 0; min-height: 38px; padding: 6px; font: inherit; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 5px; }
@media (max-width: 460px) {
  .game-reserve-layout { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .game-reserve-scan { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .game-reserve-scan .game-card-art { width: 52px; margin: 0; }
  .game-reserve-scan .game-player-icon-list { flex: 1 1 110px; margin: 0; }
  .game-substitution-choice select { font-size: 16px; }
}
.game-sidebar .game-roster-toggle button { border-color: var(--line); color: var(--muted); }
.game-sidebar .game-roster-toggle { padding: 3px; gap: 2px; border-radius: 6px; background: var(--surface); }
.game-sidebar .game-roster-toggle button { border: 0; border-radius: 4px; font-size: 12px; }
.game-sidebar .game-roster-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.game-sidebar .game-hand-card { border-color: var(--line); color: var(--ink); }
.game-sidebar .game-hand-card small, .game-sidebar .game-hand-counts { color: var(--muted); }
.game-sidebar .game-hand-card.is-playable { border-color: var(--ink); background: var(--surface); }
.game-sidebar .game-hand-card.is-playable small { color: var(--ink); }
.game-sidebar .game-hand-counts { font-size: 11px; margin-bottom: 5px; }
.game-sidebar :focus-visible { outline-color: var(--accent); }
.game-chat { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; gap: 6px; }
.game-chat-messages { flex: 1; min-height: 25px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.game-chat-message { margin: 0 16px 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--surface); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.game-chat-message.is-mine { margin-right: 0; margin-left: 16px; border: 0; background: color-mix(in srgb, var(--ink) 9%, var(--paper)); }
.game-chat-message strong { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.game-chat-status { color: var(--muted); font-size: 12px; }
.game-chat-status:empty { display: none; }
.game-chat-form { display: grid; flex: none; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding-top: 6px; }
.game-chat-form input, .game-chat-form button { min-width: 0; min-height: 34px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--paper); font: inherit; font-size: 13px; }
.game-chat-form button { border-color: transparent; background: var(--ink); color: var(--paper); }
@media (min-width: 901px) {
  .game-main { grid-template-rows: auto auto; }
  .game-duel { grid-row: 1 / 3; }
  .game-batting-order { grid-row: 2; }
  .game-field, .game-layout--strategy .game-field { height: clamp(260px, calc(100dvh - 420px), 450px); }
}
@media (max-width: 900px) {
  .game-play-area { grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; }
}
@media (max-width: 680px) {
  .game-layout { grid-template-columns: minmax(0, 1fr); }
  .game-play-area { grid-template-columns: minmax(0, 1fr); }
  .game-sidebar { contain: none; height: 600px; max-height: 85dvh; }
  .game-roster-pane { flex: 1 1 0; }
  .game-chat-form input { font-size: 16px; }
}

/* The line score and icon ledger share the top edge of the field. */
.game-icon-panel {
  min-width: 0; color: var(--ink); background: var(--paper);
  border-inline: 1px solid var(--line); font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.game-icon-panel summary, .game-icon-panel.is-off {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; padding: 7px 14px;
}
.game-icon-panel summary { cursor: pointer; list-style: none; }
.game-icon-panel summary::-webkit-details-marker { display: none; }
.game-icon-panel summary strong::after { content: '▸'; margin-left: 7px; color: var(--muted); }
.game-icon-panel details[open] summary strong::after { content: '▾'; }
.game-icon-panel summary { align-items: center; }
.game-icon-team { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px 7px; min-width: 0; }
.game-icon-team b { color: var(--muted); font-weight: 550; overflow-wrap: anywhere; }
.game-icon-strip { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px; }
.game-icon-strip img { width: 17px; height: 17px; object-fit: contain; }
.game-icon-panel.is-off span { color: var(--muted); }
.game-icon-inventory { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; padding: 8px 14px 12px; border-top: 1px solid var(--line); max-height: 170px; overflow: auto; }
.game-icon-inventory h3 { font-size: 12px; margin-bottom: 5px; }
.game-icon-inventory ul, .game-log-list, .game-roster-sheet { list-style: none; margin: 0; padding: 0; }
.game-icon-inventory li { display: grid; align-items: center; grid-template-columns: 20px minmax(0,1fr) auto; gap: 7px; padding-block: 4px; }
.game-icon-inventory small { font-size: 10px; color: var(--muted); }
.game-icon-inventory li small:last-child { display: block; }
.game-icon-count { color: var(--muted); }
.game-icon-art.is-spent { filter: grayscale(1); opacity: .46; }
.game-icon-choices { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 14px 7px; }
.game-icon-choices button { border-color: var(--line); background: var(--surface); color: var(--ink); min-height: 28px; }
.game-icon-choices button:is(:hover,:focus-visible) { border-color: var(--accent); }
.game-side-panel.game-log-panel { flex-grow: .8; }
.game-side-panel.game-log-panel.is-collapsed { flex-grow: 0; }
.game-log-list, .game-roster-sheet { flex: 1 1 0; min-height: 0; overflow: auto; scrollbar-width: thin; }
.game-log-list li { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 4px; padding: 6px 0; font-size: 12px; line-height: 1.4; }
.game-log-list li + li, .game-roster-sheet li + li { border-top: 1px solid var(--line); }
.game-log-list small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.game-roster-pane .game-roster-toggle { width: 100%; flex: none; margin-bottom: 4px; }
.game-roster-player { display: grid; width: 100%; min-height: 37px; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 3px; border: 0; border-radius: 4px; background: transparent; color: var(--ink); text-align: start; font: 550 12px/1.35 var(--sans); }
.game-roster-player:is(:hover,:focus-visible) { background: var(--surface); }
.game-roster-player small { max-width: 8ch; color: var(--muted); font: 500 10px/1.2 var(--sans); }
.game-roster-player[draggable="true"] { cursor: grab; touch-action: none; }
.game-roster-sheet + .game-bench-help { margin: 6px 0 0; }
.game-bottom-bar:empty { display: none; }
.game-bottom-bar { justify-content: end; }
@media (max-width: 680px) {
  .game-icon-inventory { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .game-icon-panel summary { gap: 4px 10px; padding-inline: 10px; }
}

.game-records { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; }
.game-records h2 { font-size: 20px; }
.game-records > p { margin-top: 6px; color: var(--muted); }
.game-records table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.game-records table + table { margin-top: 16px; }
.game-records th, .game-records td { padding: 8px 5px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.game-records th:first-child { width: 55%; text-align: left; overflow-wrap: anywhere; }
.game-records tbody th { font-weight: 500; }
.game-records thead th, .game-records small { color: var(--muted); }
.game-records summary { cursor: pointer; }
.game-records ol { padding-left: 22px; margin: 6px 0; }
.game-records li { margin-block: 3px; }

.game-lineup-room .game-series-length {display:inline-flex;align-items:center;gap:8px}
.game-lineup-room {max-width:820px;margin:16px auto 32px}
.game-lineup-room h2 {font-size:22px;margin:0 0 18px}
.game-lineup-room h2 span {color:var(--muted);font-size:16px;font-weight:500}
.game-lineup-room h3 {margin:0 0 8px;font-size:16px}
.pregame-columns {display:grid;grid-template-columns:minmax(0,1fr) minmax(160px,30%);gap:clamp(14px,4vw,48px)}
.pregame-order {list-style:none;margin:0;padding:0}
.pregame-order li {display:grid;grid-template-columns:1.4em 28px 2em minmax(0,1fr) auto;gap:7px;align-items:center;padding:5px 0;border-top:1px solid var(--line)}
.pregame-position,.pregame-number {color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.pregame-arrows {display:flex;gap:3px}
.pregame-arrows button {width:30px;height:32px;background:var(--surface);border-radius:5px}
.pregame-arrows button:disabled {opacity:.33}
.pregame-card,.pregame-pitcher-card {display:block;padding:0;border:0;background:none}
.pregame-card {width:28px}
.pregame-pitcher-card {width:min(130px,100%);margin:4px auto 8px}
.pregame-starter {display:flex;flex-direction:column;align-items:stretch;gap:8px}
.pregame-order select,.pregame-starter select,.game-lineup-room .game-series-length select {min-width:0;height:34px;color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:5px}
.pregame-order select:disabled {opacity:1;color:var(--ink)}
.game-series-strip {display:flex;align-items:center;flex-wrap:wrap;gap:6px 16px;padding:8px 0;margin:0 0 8px;border-bottom:1px solid var(--line);font-size:13px}
.game-series-strip span {color:var(--muted)}
.game-series-strip .game-button {margin-inline-start:auto}
@media(max-width:620px){.pregame-columns {grid-template-columns:1fr}.pregame-starter {max-width:320px}.pregame-pitcher-card {display:none}}
.game-log-panel:has(.game-bench-help) { flex: 0 0 auto; }
.game-side-panel.game-roster-pane:not(.is-collapsed) { flex-grow: 1.3; }
.game-duel-stat:empty { display: none; }

.game-heading .game-beta { margin-inline-start:8px; }
