/* Android lab only: same compiled game, small controls, unobstructed shot view. */
html,body{height:100%;height:100dvh}button{min-height:44px;touch-action:manipulation}
header{background:transparent;left:auto;right:8px;top:env(safe-area-inset-top,0px);width:auto;flex-wrap:nowrap;padding:6px;gap:6px;pointer-events:none}header button{pointer-events:auto;background:#102d30e8}
#lab-badge{font-size:11px;color:#edc470;margin-right:4px;align-self:center}
footer{left:8px;right:8px;bottom:env(safe-area-inset-bottom,0px);background:transparent;padding:6px 0;flex-wrap:nowrap;gap:6px;pointer-events:none}footer button{pointer-events:auto;background:#102d30e8;min-width:44px}footer button:disabled{display:none}#course-state{font-size:11px;background:#081c20bf;border-radius:8px;padding:7px;flex:1;flex-basis:auto;max-width:320px}footer #next{margin-left:auto}
#intro{margin:60px auto 58px;max-height:calc(100dvh - 120px);width:min(720px,calc(100% - 24px));padding:16px}.modes{grid-template-columns:repeat(3,1fr)}
#lab-drawer{display:none;position:fixed;top:58px;right:12px;bottom:58px;width:min(360px,calc(100vw - 24px));background:#0b2428fa;border:1px solid #6b9a93;border-radius:12px;padding:16px;overflow:auto;z-index:8;box-shadow:0 8px 36px #0009}#lab-drawer.open{display:block}#lab-drawer h2{font-size:18px}#lab-drawer .row{gap:8px}#lab-drawer #connection{display:block;max-width:none;margin:8px 0}#lab-drawer p{font-size:12px}#lab-drawer h1{font-size:14px;white-space:normal}
.loaded #island-panel,.loaded #island-shot,.loaded #shot-panel,.loaded #pin-panel,.loaded #play-message,.loaded #island-message{display:none!important}
.loaded.mode-island.lab-details #island-panel,.loaded.mode-island.lab-details #island-shot,.loaded.mode-course.lab-details #shot-panel,.loaded.mode-course.lab-details #pin-panel{display:block!important;top:58px}
#island-result,#island-summary{right:12px;top:58px;width:min(280px,calc(100vw - 24px));max-height:calc(100dvh - 116px);overflow:auto;padding:10px 12px}#ir-feet{font-size:30px}#ir-rank{margin:5px 0}#ir-launch{display:none}#island-result dl{margin:6px 0}#island-result button{min-height:44px}#island-setup{max-height:calc(100dvh - 116px);top:50%;transform:translate(-50%,-50%);padding:12px}#island-setup p{font-size:12px}#island-paused{top:58px;font-size:12px;max-width:45%;text-align:center}
body[data-lab-phase="Flight"] footer{opacity:.25}body[data-lab-phase="Flight"] footer:focus-within,body[data-lab-phase="Flight"] footer:hover{opacity:1}
.lab-scene-only>:not(canvas):not(header){display:none!important}.lab-scene-only header>:not(#lab-tools){display:none!important}
@media(max-width:600px){.modes{grid-template-columns:1fr}#lab-badge{display:none}#course-state{max-width:150px;font-size:10px}footer button{padding:7px 9px}#island-setup{width:calc(100vw - 24px)}}
/* Handheld production layout: controls float over the scene; no full-width bars. */
header{z-index:10}#lab-badge{font-size:11px;background:#081c20b8;padding:6px;border-radius:6px}
#intro{margin:58px auto 16px;max-height:calc(100dvh - 76px)}
#intro>.row:empty{display:none}#intro details{margin-top:10px}#intro .modes{margin:10px 0}
#intro .mode{min-height:90px;padding:12px}#intro .mode strong{font-size:18px}
footer #course-state{flex:0 1 auto;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body:not(.loaded) footer,.phase-setup footer,.mode-island.result-open footer{display:none}
body[data-lab-phase="Flight"] footer{display:none}
#lab-drawer{z-index:9;top:58px;bottom:12px}#lab-drawer button{min-height:44px}
#island-result,#island-summary{top:58px;max-height:calc(100dvh - 70px)}
#island-paused{cursor:pointer;pointer-events:none}
.paused #lab-tools{background:#edc470;color:#172a2a}
@media(orientation:landscape) and (max-height:560px){
 #intro .modes{grid-template-columns:repeat(3,1fr)}
 #intro{padding:12px 16px}#intro h2{font-size:20px}
 #intro>details,#intro>#notice{font-size:12px}
 #island-setup{width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 72px);top:56%;padding:10px 14px}
 #island-setup h2{font-size:19px}#island-setup .row{margin:6px 0}#island-setup p{margin:5px 0}
 #island-setup .segmented{margin:6px 0}#pb-line:empty{display:none}
}
