/* Do not crop controls or stretch the 3D canvas on small landscape screens. */
html.arena-full-viewport,html.arena-full-viewport body{overflow:hidden!important;overscroll-behavior:none}
html.arena-full-viewport body.arena-race-page{position:fixed;top:var(--arena-screen-top,0px);left:0;width:var(--arena-screen-width,100%);height:var(--arena-screen-height,100dvh)}
body.arena-race-page{display:flex;flex-direction:column;box-sizing:border-box;margin:0;height:100vh;height:100dvh;height:var(--arena-screen-height,100dvh);width:100%;overflow:hidden;overscroll-behavior:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
body.arena-race-page header,body.arena-race-page footer{flex:0 0 auto;min-width:0;gap:5px;padding:6px}
body.arena-race-page #stage{flex:1 1 0;min-height:0;height:auto;min-width:0;overflow:hidden;position:relative}
body.arena-race-page canvas{width:100%;height:100%;display:block;touch-action:none}
body.arena-race-page #credits{flex:0 0 auto;max-height:12vh;overflow:auto}
body.arena-race-page #full{touch-action:manipulation;min-height:36px}
body.arena-race-page #full[aria-pressed=true],#arenaFullBtn[aria-pressed=true]{background:#076f79;color:#fff}
body.arena-race-page #fullHint{font-size:11px;color:#f4d39b;flex:1 1 100%;line-height:1.2}
body.arena-race-page #fullHint[hidden]{display:none}
@media(max-width:820px),(max-height:500px){body.arena-race-page header :is(a,button,select){font-size:12px;padding:5px 7px;min-height:34px}body.arena-race-page header select{max-width:46vw;min-width:0}body.arena-race-page header b{font-size:12px}body.arena-race-page footer button{min-height:44px;padding:5px 9px;font-size:14px;min-width:44px}body.arena-race-page footer :is(small,span){display:none}body.arena-race-page #hud{font-size:12px;top:4px;left:4px;padding:5px 8px;max-width:95%}body.arena-race-page #status{font-size:11px}html.arena-full-active body.arena-race-page header b{display:none}html.arena-full-active body.arena-race-page #credits{font-size:9px;padding:2px 4px;max-height:7vh}}
@media(max-height:400px) and (orientation:landscape){body.arena-race-page header,body.arena-race-page footer{padding:3px;gap:3px}body.arena-race-page header :is(a,button,select){min-height:30px;padding:3px 6px}body.arena-race-page footer button{min-height:36px}body.arena-race-page #fullHint{font-size:10px}}
html.arena-full-active body.arena-playing .game-header h3{display:none}
#arenaFullNotice{position:fixed;top:calc(44px + env(safe-area-inset-top));left:8px;right:8px;z-index:108;pointer-events:none;color:#fff;background:#132c41ed;padding:6px 8px;border-radius:6px;font:12px system-ui;text-align:center}
/* 2.2.4 immersive player: keep HUD and touch controls, remove site chrome. */
html.arena-full-active,html.arena-full-active body{overflow:hidden!important;overscroll-behavior:none;background:#07111d}
html.arena-full-active body.arena-playing .container{top:var(--arena-screen-top,0px);left:var(--arena-screen-left,0px);right:auto;bottom:auto;width:var(--arena-screen-width,100vw);height:var(--arena-screen-height,100dvh)}
html.arena-full-active body.arena-playing #arenaMobileBar{top:var(--arena-screen-top,0px);left:var(--arena-screen-left,0px);right:auto;width:var(--arena-screen-width,100vw);box-sizing:border-box}
html.arena-full-active body.arena-race-page{position:fixed;top:var(--arena-screen-top,0px);left:var(--arena-screen-left,0px);width:var(--arena-screen-width,100vw);height:var(--arena-screen-height,100dvh)}
#arenaRaceOptions{display:none}
#arenaRaceRotate{display:none;color:#ffe0a3;background:#192a3c;padding:4px 9px;font:12px system-ui;text-align:center;flex:0 0 auto}
html.arena-rotate-needed #arenaRaceRotate{display:block}
@media(pointer:coarse),(max-height:500px){
 html.arena-full-active body.arena-race-page header{flex-wrap:wrap;padding:3px;gap:4px;min-height:36px}
 html.arena-full-active body.arena-race-page header #arenaRaceOptions{display:inline-block}
 html.arena-full-active body.arena-race-page header:not(.arena-options-open) :is(select,#reset,#camera,#garage){display:none}
 html.arena-full-active body.arena-race-page #fullHint:not([hidden]){display:block;font-size:10px;flex:1 1 auto}
 html.arena-full-active body.arena-race-page #credits{display:none}
 html.arena-full-active body.arena-race-page #stage{min-height:0;flex:1 1 0}
 html.arena-full-active body.arena-race-page footer{position:absolute;z-index:4;bottom:max(7px,env(safe-area-inset-bottom));left:max(7px,env(safe-area-inset-left));right:max(7px,env(safe-area-inset-right));padding:0;gap:5px;background:transparent;pointer-events:none;justify-content:flex-start;flex-wrap:wrap}
 html.arena-full-active body.arena-race-page footer button{pointer-events:auto;min-width:48px;min-height:44px;background:#16283de6;border:1px solid #8096af;border-radius:10px;padding:7px 10px}
 html.arena-full-active body.arena-race-page footer button:active{background:#057f92}
 html.arena-full-active body.arena-race-page footer [data-key=up]{margin-left:auto}
 html.arena-full-active body.arena-playing .game-view.active{border-radius:0;gap:3px}
 html.arena-full-active body.arena-playing #templeHost iframe{border-radius:0!important}
 html.arena-full-active body.arena-playing #arenaMobileBar button{min-width:44px}
 html.arena-full-active body.arena-playing #arenaRotateHint{white-space:normal;max-width:120px;line-height:1.1}
}
#templeRotate{display:none;position:fixed;top:80px;left:10px;right:10px;z-index:5;text-align:center;pointer-events:none;background:#12251dd9;color:#fff3d4;padding:5px;font:12px system-ui}
html.arena-rotate-needed #templeRotate{display:block}
html.arena-full-active body.arena-temple-page{position:fixed;top:var(--arena-screen-top,0px);left:var(--arena-screen-left,0px);width:var(--arena-screen-width,100vw);height:var(--arena-screen-height,100dvh)}
body.arena-temple-page #hud{top:max(7px,env(safe-area-inset-top));left:max(7px,env(safe-area-inset-left));right:max(7px,env(safe-area-inset-right))}
body.arena-temple-page #controls{bottom:max(7px,env(safe-area-inset-bottom));left:max(7px,env(safe-area-inset-left));right:max(7px,env(safe-area-inset-right))}
