/* Device controls and responsive overrides. */
.run-setup{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:0 0 14px}.run-setup label{display:grid;gap:5px;color:#9db5c4;font-size:11px}.run-setup select,.run-setup input{min-height:44px;max-width:100%;background:#13212c;color:#e5eef7;border:1px solid #344552;border-radius:7px;padding:9px;font:inherit;font-size:12px}.run-setup input{width:175px}.run-setup button{font-size:11px;padding:9px}.run-setup select:focus-visible,.run-setup input:focus-visible{outline:2px solid #61efdc}.stats small{font-size:9px;color:#aac4ce}.run-setup #share-run{margin-left:auto}
@media(max-width:650px){.run-setup{gap:8px}.run-setup label{flex:1;min-width:130px}.run-setup input{width:100%}.run-setup button{flex:1}.run-setup #share-run{margin-left:0}}
@media(orientation:landscape) and (max-height:550px){.run-setup{margin-bottom:5px;gap:5px}.run-setup label{display:flex;align-items:center;gap:5px;flex:none}.run-setup select,.run-setup input{min-height:30px;padding:5px;width:auto;font-size:10px}.run-setup input{width:110px}.run-setup button{min-height:30px;padding:5px 9px;flex:none}.run-setup #share-run{margin-left:auto}.game-shell .stage canvas{height:calc(100dvh - 160px)}.game-shell:fullscreen .stage canvas{height:100%}}
@media(max-width:360px){#touch-controls .direction-pad{grid-template-columns:repeat(3,44px);gap:4px}#touch-controls .touch-actions button{min-width:52px;padding:8px}}
[hidden]{display:none!important}button{min-height:44px}.stats{align-items:center;gap:6px;padding:8px 14px}#quick-pause{min-width:44px;font-size:18px;padding:6px}.stage{position:relative;min-height:0}#overlay{inset:0}canvas{height:auto;max-height:66dvh}#notice:empty{display:none}.help{color:#a9bccb;margin:16px 0}.help summary{font-size:13px;cursor:pointer;padding:8px 0}.help summary:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid #61efdc;outline-offset:3px}dialog{max-height:88dvh;overflow:auto;width:min(550px,94vw)}h3{font-size:15px;margin-top:28px}.options label{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:14px 0;font-size:14px}.options small{display:block;font-size:11px;color:#95adbd;margin-top:3px}.options input[type=checkbox]{width:23px;height:23px;accent-color:#81ecdc;flex-shrink:0}.options select{max-width:53%;padding:9px;background:#172530;color:#e5eef7;border:1px solid #344552;border-radius:7px}.options input[type=range]{max-width:45%;accent-color:#81ecdc}.actions{flex-wrap:wrap}#pad-message{color:#81ecdc;min-height:18px}output{color:#81ecdc;margin-left:7px}
#touch-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-top:1px solid #243440;background:#101a24;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.direction-pad{display:grid;grid-template-columns:repeat(3,52px);grid-template-rows:repeat(2,48px);gap:5px}.direction-pad button{padding:8px;font-size:20px}.direction-pad [data-touch=forward]{grid-column:2}.direction-pad [data-touch=left]{grid-column:1;grid-row:2}.direction-pad [data-touch=back]{grid-column:2;grid-row:2}.direction-pad [data-touch=right]{grid-column:3;grid-row:2}.touch-actions{display:flex;gap:10px}.touch-actions button{min-width:60px;min-height:64px;padding:10px}.touch-actions [data-touch=jump]{background:#20564f;border-color:#65d3cf}#touch-controls button{touch-action:none}#touch-controls button.held{background:#81ecdc;color:#071d23;box-shadow:inset 0 0 0 2px white}body.left-handed #touch-controls{flex-direction:row-reverse}
.game-shell:fullscreen{width:100%;height:100dvh;border-radius:0;display:flex;flex-direction:column;padding:env(safe-area-inset-top) 0 0}.game-shell:fullscreen .stage{flex:1;min-height:0}.game-shell:fullscreen canvas{height:100%;max-height:none;width:100%}.game-shell:fullscreen #touch-controls{flex-shrink:0}
@media(max-width:650px){main{padding:12px max(12px,env(safe-area-inset-right)) 16px max(12px,env(safe-area-inset-left))}header{flex-direction:row;align-items:center;gap:10px}h1{font-size:28px}.stats{padding:6px 8px;font-size:10px;gap:4px}.eyebrow{font-size:8px;letter-spacing:1px}header button{font-size:11px;padding:9px}h2{font-size:23px}footer{gap:8px}footer p{margin:0;line-height:1.6}footer div{width:100%}footer div button{flex:1}#status-label{font-size:9px;margin:4px}#status-copy{font-size:12px;margin:5px}#status-title{margin:6px 0}#play{margin-top:10px}canvas{max-height:49dvh;min-height:220px}.touch-actions{gap:6px}.touch-actions button{min-width:56px}.direction-pad{grid-template-columns:repeat(3,46px)}#touch-controls{padding-left:10px;padding-right:10px;gap:10px}dialog{padding:18px}}
@media(orientation:landscape) and (max-height:550px){main{padding:5px 12px}header{flex-direction:row;align-items:center;margin-bottom:6px}header h1{font-size:20px;margin:0}header .eyebrow{display:none}header button{min-height:34px;padding:6px 12px}.stats{padding:3px 12px}#quick-pause{min-height:32px;height:32px}canvas{height:calc(100dvh - 115px);max-height:none;min-height:140px}.stage{flex:1;min-width:0}.game-shell{display:flex;flex-wrap:wrap}.stats{width:100%;flex-shrink:0}#touch-controls{border-top:0;border-left:1px solid #243440;width:190px;flex-direction:column;justify-content:center;gap:8px;padding:6px}.direction-pad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:3px}.touch-actions button{min-height:44px}body.left-handed #touch-controls{order:-1;flex-direction:column;border-left:0;border-right:1px solid #243440}.stats{order:-2}footer{padding-top:6px}footer #hint{display:none}footer div button{min-height:34px;padding:6px 12px}.game-shell:fullscreen{flex-direction:row;flex-wrap:wrap}.game-shell:fullscreen .stats{height:40px}.game-shell:fullscreen .stage{height:calc(100% - 40px)}.game-shell:fullscreen #touch-controls{height:calc(100% - 40px)}.game-shell:fullscreen canvas{height:100%;min-height:0}#status-copy{font-size:11px;margin:3px}#status-title{font-size:22px;margin:5px}#status-label{font-size:9px;margin:3px}#play{margin-top:8px}}
