@layer studio {
/* Only the menu host scrolls. The document itself must not be a second scroll area. */
html:has(body.studio-3d:not(.game-active)),body.studio-3d:not(.game-active) {height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow:hidden!important;}
body.studio-3d:not(.game-active) #geminiMenuHost {position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;}
/* Keep focused level controls clear of the fixed navigation and iPhone home area. */
body.studio-3d:not(.game-active) #geminiMenuHost[data-popup-open] {overflow-y:hidden!important;}
body.studio-3d:not(.game-active) #geminiMenuHost {scroll-padding-bottom:calc(110px + env(safe-area-inset-bottom, 0px));}
}
