/* Mobile presentation, shared by all five levels. Desktop cabinet stays unchanged. */
:root{--hh-safe-top:env(safe-area-inset-top,0px);--hh-safe-right:env(safe-area-inset-right,0px);--hh-safe-bottom:env(safe-area-inset-bottom,0px);--hh-safe-left:env(safe-area-inset-left,0px)}
#hhClose,#hhPlayOptions{display:none}
#hhOptions[hidden]{display:none!important}
#hhOptions{position:fixed;inset:0;z-index:1500;display:grid;place-items:center;background:#08111bf2;padding:12px max(12px,var(--hh-safe-right)) 12px max(12px,var(--hh-safe-left));color:#fff0cf;font:15px/1.5 Arial,sans-serif;touch-action:pan-y}
.hh-options-card{box-sizing:border-box;width:min(580px,100%);max-height:100%;overflow:auto;border:2px solid #cdaa62;background:#152734;padding:18px;text-align:center}
.hh-options-card h2{font:18px/1.5 LastCallArcade,monospace;margin:0 0 8px;color:#ffda83}
.hh-options-card p{margin:8px 0}.hh-options-buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:12px}
.hh-options-card button{min-height:44px;min-width:100px;padding:9px 14px;border:1px solid #d7b774;background:#243d4e;color:#ffe2a0;font:bold 13px Arial;cursor:pointer;touch-action:manipulation}
.hh-options-card button:first-child{background:#dcbb72;color:#16212b}.hh-options-card button:focus-visible{outline:3px solid white;outline-offset:2px}
#hhInstallHelp{font-size:14px;text-align:left;background:#0e1c27;padding:12px}#hhInstallHelp[hidden]{display:none}
@media(pointer:coarse){
 html,body{overscroll-behavior:none}
 #hhClose,#hhPlayOptions{display:block;position:fixed;z-index:1300;top:max(0px,var(--hh-safe-top));box-sizing:border-box;padding:0;min-width:44px;width:44px;height:44px;border:0;background:#152638e8;color:#ffe2a0;font:bold 23px Arial;border-radius:0 0 8px 8px;touch-action:manipulation;cursor:pointer}
 #hhClose{left:var(--hh-safe-left)}#hhPlayOptions{right:var(--hh-safe-right);font-size:11px}
 body.menu-visible #hhPlayOptions{display:none}
 body.hh-options-open #hhClose,body.hh-options-open #hhPlayOptions{visibility:hidden}
 body.menu-visible .overlay.menu-open{padding-top:44px!important}
 body.menu-visible .arcade-menu{max-height:calc(var(--hh-visible-height,100dvh) - 50px)!important}
 .arcade-menu-top a,.arcade-menu-top button,#mobileFullscreen{min-height:44px;display:inline-flex;align-items:center}
 .arcade-level{min-height:52px}
 body .rotate-overlay{display:none!important}
 body.hh-portrait-game #rotateOverlay{display:flex!important;z-index:1200!important}
 body.hh-options-open #rotateOverlay{display:none!important}
 #mobileExit{display:none!important}
 body:is(.scooter-playing,.store-playing,.return-playing,.build-playing,.escape-playing) .arcade-hud{
  box-sizing:border-box;height:calc(44px + var(--hh-safe-top));top:0;padding:calc(5px + var(--hh-safe-top)) calc(47px + var(--hh-safe-right)) 2px calc(47px + var(--hh-safe-left));grid-template-columns:1fr 1fr 1.25fr 1fr;background:linear-gradient(#08121eec,#08121ecc 80%,transparent)
 }
 .arcade-hud .arcade-stat{gap:3px}.arcade-hud .stat-label,.arcade-hud .hi-stat .stat-label{font-size:clamp(7px,.85vw,10px);line-height:1.2}
 .arcade-hud .arcade-stat strong{font-size:clamp(12px,1.25vw,16px);line-height:1.3}.arcade-hud .hi-stat strong{font-size:clamp(9px,1vw,12px)}
 .arcade-hud .beer-icon{width:20px;height:20px}.arcade-hud .beer-count{min-height:20px;gap:0}
 #storeGame,#returnGame,#buildGame,#escapeGame{display:block;height:var(--hh-visible-height,100dvh);padding:0}
 .store-floor,.return-scene,.build-scene,.escape-scene{position:absolute;inset:0;--return-hud-height:calc(44px + var(--hh-safe-top))}
 .store-utility,.return-strip,.build-strip,.escape-strip{display:none}
 .store-help,.return-footer,.build-footer,.escape-footer{position:absolute;z-index:20;bottom:0;left:0;right:0;height:auto;min-height:56px;padding:5px calc(8px + var(--hh-safe-right)) calc(5px + var(--hh-safe-bottom)) calc(8px + var(--hh-safe-left));background:none;border:0;pointer-events:none;display:flex;align-items:flex-end;justify-content:space-between}
 .store-pad,.return-pad,.build-pad,.escape-pad,.escape-sprint{pointer-events:auto;gap:6px}
 .store-help>strong,.store-help>.store-bonus,.return-goal,.build-goal,.escape-goal,.store-keyboard,.return-keyboard,.return-tools,.build-keys{display:none}
 .store-help>strong{display:block;align-self:center;max-width:40%;padding:5px 8px;background:#162b32e8;font-size:10px;text-align:center}
 .store-pad button,.return-pad button,.build-pad button,.escape-pad button{box-sizing:border-box;padding:4px;line-height:1.2;width:52px;height:48px;min-height:48px;background:#1b3046ed;box-shadow:0 2px 8px #0008;font-size:23px;border:2px solid #d4b16b;border-radius:8px}
 .build-pad button[data-build=rotate],.build-pad button[data-build=drop]{width:66px;font-size:11px}
 .return-pad .return-accelerate,.return-pad .return-brake{width:70px;font-size:12px}
 .escape-sprint{min-width:84px}.escape-sprint button{min-height:44px;background:#895e2bed}
 .store-list{position:absolute;z-index:14;top:calc(44px + var(--hh-safe-top));left:0;right:0;height:24px;padding:0 8px;background:#162b32e8;border:0;color:#fff3d0;font-size:10px;gap:10px;pointer-events:none}
 .store-supplies{gap:12px}.store-supplies>strong{display:none}
 .return-route{top:calc(48px + var(--hh-safe-top));bottom:auto;left:calc(8px + var(--hh-safe-left));padding:5px 8px;max-width:140px}
 .return-route small{display:none}.return-route strong{font-size:10px}.return-progress{width:115px;margin-top:5px}
 .return-load{top:calc(48px + var(--hh-safe-top));bottom:auto;right:calc(8px + var(--hh-safe-right));width:125px;padding:5px 8px}
 .return-load-track,.return-load small{display:none}.return-hitch{padding-top:3px;margin-top:3px;font-size:8px}.return-hitch-bar{margin-top:3px}.return-hitch-bar i{height:4px}
 .return-fork{top:calc(49px + var(--hh-safe-top))}.return-fork div{font-size:9px;padding:5px}.return-fork small{display:none}
 .return-toast,#escapeToast,.store-toast{bottom:calc(62px + var(--hh-safe-bottom));font-size:11px;max-width:60%;padding:5px 8px}
 body.scooter-playing .stage{--hh-control-dock:0px}
 body.scooter-playing .mobile-controls{inset:0;height:100%;border:0;background:none;pointer-events:none}
 body.scooter-playing .mobile-pad{pointer-events:auto;bottom:calc(6px + var(--hh-safe-bottom))!important}
 body.scooter-playing .mobile-pad.left-pad{left:calc(8px + var(--hh-safe-left))!important;gap:6px}
 body.scooter-playing .mobile-pad.right-pad{right:calc(8px + var(--hh-safe-right))!important}
 body.scooter-playing .mobile-btn{width:64px;min-width:64px;height:48px;background:#1b3046ed}
 body.scooter-playing .mobile-btn.jump-btn{height:48px!important;width:110px!important;min-width:110px!important;font-size:15px!important;background:#1b3046ed}
 .store-card,.return-card,.build-card,.escape-card{max-height:100%;touch-action:pan-y}
 #storeDialog,#returnDialog,#buildDialog,#escapeDialog{z-index:40;padding:48px max(12px,var(--hh-safe-right)) 8px max(12px,var(--hh-safe-left))}
 #escapeDialog.escape-ending{padding:48px 10px 8px}
 .fullscreen-help button{min-height:44px}
}
@media(pointer:coarse) and (orientation:portrait){
 body.menu-visible .arcade-menu-hero{grid-template-columns:1fr}
 body.menu-visible .arcade-rider{display:none}
 body.menu-visible .arcade-menu{height:auto;min-height:0}
}
@media(pointer:coarse) and (max-width:650px){
 .store-pad button,.escape-pad button{width:44px;height:46px;min-height:46px}
 .store-pad,.escape-pad{gap:4px}
 .return-route{max-width:115px}.return-route strong{font-size:9px}.return-progress{width:95px}.return-load{width:113px}
 .build-pad{flex-direction:column}.build-pad button,.build-pad button[data-build=rotate],.build-pad button[data-build=drop]{height:44px;min-height:44px;width:54px;font-size:10px}
 .build-pad button[data-build=left],.build-pad button[data-build=right]{font-size:22px}
 .arcade-hud .hi-stat .stat-label{font-size:6px}.arcade-hud .hi-stat strong{font-size:8px}
}

/* Larger thumb targets for Levels 2–5. Level 1 keeps its approved controls. */
@media(pointer:coarse){
 .store-pad,.return-pad,.build-pad,.escape-pad{gap:8px}
 .store-pad button,.return-pad button,.build-pad button,.escape-pad button{width:clamp(64px,8vw,80px);height:64px;min-height:64px;font-size:30px;border-radius:12px;flex-shrink:0}
 .return-pad .return-accelerate,.return-pad .return-brake{width:100px;font-size:16px}
 .build-pad button[data-build=rotate],.build-pad button[data-build=drop]{width:96px;font-size:15px}
 .escape-sprint{min-width:112px}.escape-sprint button{height:64px;min-height:64px;font-size:16px;border-radius:10px}
 .return-toast,#escapeToast,.store-toast{bottom:calc(82px + var(--hh-safe-bottom))}
}
@media(pointer:coarse) and (max-width:650px){
 .return-pad .return-accelerate,.return-pad .return-brake{width:88px;font-size:14px}
 .build-pad{flex-direction:row}
 .build-pad button,.build-pad button[data-build=rotate],.build-pad button[data-build=drop]{width:56px;height:64px;min-height:64px;font-size:11px}
 .build-pad button[data-build=left],.build-pad button[data-build=right]{font-size:28px}
}
@media(pointer:coarse) and (min-height:600px){
 .store-pad button,.return-pad button,.build-pad button,.escape-pad button,.escape-sprint button{height:72px;min-height:72px}
 .return-toast,#escapeToast,.store-toast{bottom:calc(90px + var(--hh-safe-bottom))}
}
