.court-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border:1px solid var(--line);background:#fff;padding:12px 14px;margin-bottom:16px}
.court-toolbar>div{flex:1;min-width:130px}.court-toolbar .eyebrow{display:block;font-size:8px;letter-spacing:.1em;color:var(--muted)}.court-toolbar strong{font:800 23px/1.1 var(--display);display:block;margin-top:4px}.court-toolbar .btn{font-size:11px;min-height:44px}.court-toolbar>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;font-size:11px;font-weight:700;padding-inline:4px}
html[data-court-mode]{scroll-padding-top:calc(85px + env(safe-area-inset-top, 0px))}
html[data-court-mode] :is(.utility-bar,.masthead,.primary-nav,.scoreboard,.site-footer,#side-view,#global-review,.carnival-games,.games-heading){display:none!important}
html[data-court-mode] .page-layout{display:block;max-width:800px;padding:12px max(18px, env(safe-area-inset-right, 0px)) max(30px, env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));margin:0 auto}
html[data-court-mode] .court-toolbar{position:sticky;top:env(safe-area-inset-top, 0px);z-index:40;margin-bottom:10px;background:#172b39;color:#fff;border-color:#172b39;box-shadow:0 3px 12px #0002}
html[data-court-mode] .court-toolbar .eyebrow{color:#d8c49a}html[data-court-mode] .court-toolbar .btn{background:#f2d08d;color:#172b39;border-color:#f2d08d}
html[data-court-mode] :is(.midway-heading,.jumper-heading,.kicker-heading,.pitcher-heading,.horse-heading){display:none}
html[data-court-mode] :is(.jumper-back,.kicker-back,.pitcher-back,.horse-back){display:none}
html[data-court-mode] :is(.midway-stats,.jumper-scoreboard,.kicker-stats,.pitcher-stats,.horse-scoreboard){padding-block:7px;margin-bottom:8px}
html[data-court-mode] :is(.midway-stats,.jumper-scoreboard,.kicker-stats,.pitcher-stats) strong{font-size:26px;margin-top:3px}
html[data-court-mode] :is(.midway-round-banner,.jumper-stage,.kicker-stage,.pitcher-stage,.horse-turn){margin-block:0 8px;padding:8px 10px}
/* Resize the wrapper, preserving the canvas aspect and pointer-coordinate mapping. */
html[data-court-mode] :is(.midway-booth,.jumper-booth,.kicker-stadium,.pitcher-ballpark,.horse-court){width:min(100%,340px);width:min(100%,max(210px,calc(40svh * 12 / 13)));margin:8px auto}
html[data-court-mode] :is(.midway-controls,.jumper-controls,.kicker-controls,.pitcher-controls,.horse-controls){padding:12px;margin-top:8px}
html[data-court-mode] :is(.jumper-main-actions,.kicker-main-actions,.pitcher-main-actions,.horse-main-actions){margin-top:10px;grid-template-columns:1.3fr 1fr;gap:8px}
html[data-court-mode] :is(.jumper-main-actions,.kicker-main-actions,.pitcher-main-actions,.horse-main-actions) .btn{min-height:46px;font-size:12px;padding:10px}
html[data-court-mode] :is(.midway-announcement,.jumper-status,.kicker-status,.pitcher-status,.horse-status){font-size:11px;margin-block:8px;line-height:1.5;min-height:0}
html[data-court-mode] :is(.jumper-shot-dots,.pitcher-history,.kicker-attempts){margin-block:8px}
html[data-court-mode] :is(.jumper-sideline-tools,.horse-trash-tools){margin-block:6px}
html[data-court-mode] :is(.jumper-instructions,.kicker-instructions,.horse-instructions,.midway-control-intro){font-size:11px;margin-block:0 8px}
html[data-court-mode] :is(.midway-ranges,.pitcher-aim-grid){gap:10px}
html[data-court-mode] .jumper-heckle{min-height:0;margin-bottom:8px}
html[data-court-mode] .jumper-heckle>img{height:48px}
.next-move{border:1px solid var(--line);border-left:4px solid var(--red);background:#fff;padding:18px;margin-bottom:24px;display:flex;align-items:center;gap:18px;flex-wrap:wrap}.next-move>div{flex:1;min-width:160px}.next-move .eyebrow{color:var(--red);margin:0 0 5px}.next-move h2{font:800 28px/1 var(--display);margin:0 0 8px}.next-move p{font-size:12px;line-height:1.6;margin:0;color:var(--muted)}.next-move>a:last-child{font-size:12px;font-weight:700}
@media(max-width:450px){
  .court-toolbar{gap:2px 6px;padding:4px 8px}
  .court-toolbar>div{min-width:105px}
  .court-toolbar strong{font-size:20px}
  .court-toolbar .btn{font-size:10px;padding:8px}
  .court-toolbar>a{font-size:10px}
  html[data-court-mode] .page-layout{padding:8px max(12px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px))}
  html[data-court-mode] .court-toolbar strong{font-size:18px}
  .next-move{gap:12px;padding:16px}
}

@media(max-width:600px){
  html[data-court-mode] :is(.midway-booth,.jumper-booth,.kicker-stadium,.pitcher-ballpark,.horse-court){width:min(100%,max(200px,calc(32svh * 12 / 13)))}
  html[data-court-mode] .jumper-booth{width:min(100%,max(180px,calc(30svh * 12 / 13)))}
  html[data-court-mode] .jumper-stage strong{font-size:21px}
  html[data-court-mode] :is(.jumper-status,.kicker-status,.pitcher-status,.horse-status,.midway-announcement){padding:8px}
  html[data-court-mode] .jumper-status{margin-block:4px}
  html[data-court-mode] .jumper-shot-dots{gap:3px;margin-block:4px}
  html[data-court-mode] .jumper-sideline{display:flex;align-items:center;gap:8px}
  html[data-court-mode] .jumper-sideline-tools{flex:none;margin:0}
  html[data-court-mode] .jumper-heckle{flex:1;min-width:0}
  html[data-court-mode] .jumper-controls{padding:8px 10px;margin-top:0}
  html[data-court-mode] .jumper-instructions{margin-bottom:4px}
  html[data-court-mode] .jumper-meter{height:26px}
  html[data-court-mode] .jumper-meter-labels{margin-top:4px}
  html[data-court-mode] .jumper-main-actions{margin-top:6px}
}

html[data-court-mode] .jumper-heckle{padding:8px 10px}html[data-court-mode] .jumper-heckle>img{display:none}html[data-court-mode] .jumper-heckle p{margin-top:3px;line-height:1.45}
@media(max-width:600px){
  html[data-court-mode] .jumper-heckle{margin:0;padding:4px 8px}
}
