/* A compact mode list on the right; setup only appears after choosing a mode. */
#menu.has-game-settings[data-game-settings-menu="baseball"] > .menu-panel {
  top: calc(110px + var(--safe-t)); right: calc(36px + var(--safe-r));
  width: min(450px, 47cqw); max-height: calc(100% - 134px - var(--safe-t) - var(--safe-b));
}
#menu.has-game-settings[data-game-settings-menu="baseball"] > .menu-panel[data-menu-page="home"] { background: transparent; border: 0; box-shadow: none; padding: 0; top: 32%; }
.main-menu, .menu-actions { display: flex; flex-direction: column; gap: 12px; }
.main-menu { overflow-y: auto; padding: 3px; }
.menu-choice { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 64px; padding: 16px 24px; text-align: left; font: 700 24px var(--font); color: var(--cream); background: var(--broadcast); border: 1px solid #b7d4d450; border-left: 4px solid #b7d4d450; border-radius: 7px; cursor: pointer; }
.menu-choice i { font: 400 30px/1 var(--font); color: var(--gold); }
.menu-choice:hover, .menu-choice:focus-visible { color: var(--ink); background: var(--gold); border-color: #fff0bb; outline: 2px solid #fff0bb; outline-offset: 2px; }
.menu-choice:hover i, .menu-choice:focus-visible i { color: var(--ink); }
.menu-heading { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #122b3629; padding-bottom: 12px; margin-bottom: 16px; flex-shrink: 0; }
.menu-heading h2 { font-size: 20px; margin: 0; }
.menu-actions .menu-choice { font-size: 18px; min-height: 54px; padding: 12px 16px; }
.menu-panel select, .pause-auto-aim select { font: inherit; font-size: 16px; color: var(--ink); background: #fffdf7; border: 1px solid #bfd0ce; border-radius: 8px; padding: 9px; max-width: 100%; min-width: 0; }
.auto-aim-options { border: 1px solid #bfd0ce; border-radius: 10px; margin: 20px 0 0; padding: 14px; }
.auto-aim-options legend { font-weight: 700; padding-inline: 6px; }
.auto-aim-options .field, #practice-setup .field { margin-top: 12px; }
.auto-aim-options .note { margin: 12px 0 0; font-size: 13px; line-height: 1.55; }
.pause-auto-aim { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.practice-status { position: absolute; top: calc(20px + var(--safe-t)); left: calc(20px + var(--safe-l)); max-width: min(390px, 46%); padding: 10px 16px; border: 1px solid var(--broadcast-line); border-left: 3px solid var(--gold); border-radius: 9px; background: var(--broadcast); color: var(--cream); pointer-events: none !important; }
.practice-status b, .practice-status span { display: block; }
.practice-status span { font-size: 12px; margin-top: 4px; color: #c4d9d2; }
#hud:has(.practice-status) .bug { display: none; }
@container app (max-height: 520px) and (orientation: landscape) {
  #menu.has-game-settings[data-game-settings-menu="baseball"] > .menu-panel { top: calc(64px + var(--safe-t)); right: calc(18px + var(--safe-r)); max-height: calc(100% - 80px - var(--safe-t) - var(--safe-b)); width: 48cqw; }
  #menu.has-game-settings[data-game-settings-menu="baseball"] > .menu-panel[data-menu-page="home"] { top: 24%; }
  .main-menu { gap: 8px; }
  .menu-choice { min-height: 47px; padding: 9px 18px; font-size: 19px; }
  .menu-heading { margin-bottom: 9px; padding-bottom: 8px; }
  .practice-status { top: 10px; left: 12px; padding: 6px 10px; font-size: 13px; }
  .practice-status span { font-size: 10px; }
}
[data-gamepad-focus] { outline: 3px solid #fbbf24 !important; outline-offset: 3px; }
@container app (max-width: 700px) and (orientation: portrait) {
  #menu.has-game-settings[data-game-settings-menu="baseball"] > .menu-panel { top: calc(145px + var(--safe-t)); right: calc(14px + var(--safe-r)); width: calc(100% - 28px - var(--safe-l) - var(--safe-r)); max-height: calc(100% - 165px - var(--safe-t) - var(--safe-b)); }
  #menu.has-game-settings[data-game-settings-menu="baseball"] > .menu-panel[data-menu-page="home"] { top: 34%; width: 66%; }
  .menu-choice { min-height: 58px; padding: 13px 16px; font-size: 18px; }
}
/* 全壘打大賽's count (game.js showDerby) and its end (derbyFinal) */
.derby-status { display: grid; grid-template-columns: auto auto; column-gap: 16px; align-items: center; }
.derby-status > b { grid-column: 1 / -1; color: var(--gold); font-size: 12px; letter-spacing: .06em; }
.derby-status .derby-count { display: flex; align-items: baseline; gap: 6px; }
.derby-status .derby-count strong { color: var(--cream); font: 700 44px/1 'Barlow Condensed', var(--font); }
.derby-status .derby-count small { color: #c4d9d2; font-size: 12px; }
.derby-status .derby-lights { display: grid; gap: 3px; }
.derby-status .derby-lights > div { display: flex; align-items: center; gap: 4px; }
.derby-status .derby-lights small { width: 26px; color: #c4d9d2; font: 700 12px 'Barlow Condensed', var(--font); letter-spacing: .06em; }
.derby-status .derby-lights i { width: 11px; height: 11px; border: 2px solid currentColor; border-radius: 50%; opacity: .55; }
.derby-status .derby-lights i.on { background: currentColor; opacity: 1; box-shadow: 0 0 7px currentColor; }
.derby-status .derby-lights .b { color: #7fd68a; }
.derby-status .derby-lights .s { color: #ffd16e; }
.derby-status .derby-lights .o { color: #ff6b57; }
.derby-status > span { grid-column: 1 / -1; }
.derby-final { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); min-width: min(320px, 80%); padding: 16px 28px 14px; border: 1px solid var(--broadcast-line); border-top: 3px solid var(--gold); border-radius: 12px; background: var(--broadcast); color: var(--cream); text-align: center; pointer-events: none; animation: derby-final-in .45s cubic-bezier(.2, 1.4, .4, 1) 2.6s both; }
/* (it comes in as the 大賽結束！ call goes: game.js derbyFinal, a 3 s banner) */
.derby-final h3 { margin: 0; color: var(--gold); font: 700 18px 'Barlow Condensed', var(--font); letter-spacing: .08em; }
.derby-final strong { display: block; color: #fff; font: 700 88px/1 'Barlow Condensed', var(--font); }
.derby-final > span { font-size: 14px; }
.derby-final dl { display: flex; justify-content: center; gap: 28px; margin: 12px 0 0; }
.derby-final dt { color: #c4d9d2; font-size: 11px; }
.derby-final dd { margin: 2px 0 0; font-weight: 700; }
.derby-final .derby-record { margin: 12px 0 0; color: #c4d9d2; font-size: 13px; }
.derby-final.best .derby-record { color: var(--gold); font-weight: 700; }
@keyframes derby-final-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 24px)) scale(.92); } }
/* (the count stands taller than the scorebug it replaces: the pitcher's card goes under it, field-hud.css .live-player.foe) */
html.short #hud:has(.derby-status) { --bug-h: 78px; }
/* (the field's panels give the card the screen) */
#hud.derby-over :is(.live-field, .live-matchup) { display: none !important; }
@container app (max-height: 520px) and (orientation: landscape) {
  .derby-status .derby-count strong { font-size: 32px; }
  .derby-final { padding: 10px 20px; }
  .derby-final strong { font-size: 60px; }
}
@media (prefers-reduced-motion: reduce) { .derby-final { animation: derby-final-show 0s 2.6s both; } }
@keyframes derby-final-show { from { opacity: 0; } }
