/* Safe-area-aware thumb controls, including small phones and landscape. */
#screen,#stickPad,#actionDeck button{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:none}
/* Keep the royal curtain call at the top beside the result, without a blank
   letterbox caused by the taller desktop score panel. */
body[data-view=result] .stage{align-items:start;align-content:start}
body[data-view=result] .stage canvas{height:auto;aspect-ratio:464/320;object-position:top}
body[data-view=result] .screenfoot{display:none}
@media(max-width:760px),(max-width:980px) and (max-height:550px),(pointer:coarse) and (max-width:1400px){
 body.live[data-view=race]{overscroll-behavior:none}
 body.live[data-view=race] .cabinet{box-shadow:none}
 /* The main container already owns all four safe-area insets. */
 #stickPad i{will-change:transform}
 #actionDeck button{transition:none;min-width:0}
}
@media(max-width:350px){
 body.live[data-view=race] .stageShell{grid-template-columns:96px minmax(0,1fr)}
 body.live[data-view=race] #actionDeck{padding:6px 5px;gap:5px;grid-template-columns:minmax(0,1.25fr) minmax(62px,1fr)}
 #actionDeck .pocketAction strong{font-size:12px}
 body.live[data-view=race] #panel h2{font-size:15px}
}
