/* Safe areas and usable controls, while retaining the monochrome stage UI. */
html,body{overscroll-behavior:none;-webkit-text-size-adjust:100%}
#experience{height:100vh;height:100dvh}
dialog,.store-dialog{overscroll-behavior:contain;max-height:calc(var(--visible-height,100dvh) - 32px);position:fixed;top:calc(var(--visible-top,0px) + var(--visible-height,100dvh)/2);bottom:auto;transform:translateY(-50%);margin:0 auto}
.store-dialog input:not([type=checkbox]),.quality select{font-size:16px}
#settings,.store-dialog,#model-drawer{-webkit-overflow-scrolling:touch}
.store-dialog .close{min-width:44px;min-height:44px;top:4px;right:4px}
.store-dialog input[type=checkbox]{flex:0 0 20px;width:20px;height:20px}
.store-consent{line-height:1.6;min-height:44px}
#support-checkout{display:block;padding:12px 0;color:#e5e5e5;line-height:1.6;overflow-wrap:anywhere}
@media(max-width:700px){
 .header{left:max(16px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));gap:8px}
 .identity{flex:none}.identity>span:first-child{font-size:25px}
 .header-actions{gap:0;min-width:0}.header-actions .store-header-button{padding:8px 9px;min-width:44px;min-height:44px;font-size:11px!important;letter-spacing:0!important}
 .header-actions #help{font-size:0;width:44px;height:44px;flex:none}.header-actions #help::after{content:'?';font:15px Arial;border:1px solid #777;border-radius:50%;display:inline-grid;place-items:center;width:18px;height:18px}
 .header-actions #fullscreen{display:none}.header-actions #settings-toggle{width:44px;height:44px}
 .title-block{top:calc(max(10px,env(safe-area-inset-top)) + 70px);left:max(20px,env(safe-area-inset-left))}
 .title-block h1{font-size:44px;letter-spacing:-2px}.title-block p{font-size:9px}.title-block>span{display:none}
 .bottom{left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom))}
 .scene-strip{margin-bottom:0}.scene-strip button{min-height:44px}.scene-strip>div{gap:6px}
 .journey{gap:10px}.journey input{min-width:0;height:36px}.journey label,.journey>span{font-size:9px}
 .control-row{margin-top:2px;gap:4px}.view-nav button{min-height:44px;padding:10px;gap:4px;justify-content:center}.view-nav button>span{display:none}
 .lens-nav button{min-height:44px;padding:10px 16px}.hide-ui{min-height:44px;padding:8px 0}
 .bottom footer{margin-top:0;font-size:8px}#controls-hint{max-width:80%;font-size:8px}
 .color-modes{left:max(4px,env(safe-area-inset-left));gap:4px;top:42%}.color-modes button{padding:12px;min-height:44px}
 .zoom-controls{right:max(4px,env(safe-area-inset-right));top:42%;gap:0}.zoom-controls .icon{width:44px;height:44px}
 #settings{top:calc(max(10px,env(safe-area-inset-top)) + 50px);right:max(12px,env(safe-area-inset-right));width:min(300px,calc(100vw - 24px));max-height:calc(100dvh - 80px - env(safe-area-inset-bottom));padding:18px}
 #settings .panel-top .icon{width:44px;height:44px}#settings input[type=range]{height:36px;margin-bottom:16px}
 #model-drawer{left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));top:auto;bottom:max(10px,env(safe-area-inset-bottom));width:auto;max-height:calc(100dvh - 150px);overflow:auto;padding:10px 12px 8px}
 .store-heading{gap:0;margin:0}.store-heading>div:first-child{width:auto;flex:1}.store-tools{display:flex;flex-wrap:wrap;gap:4px;width:100%;margin-top:2px}
 .store-tools button{min-height:44px;font-size:11px;padding:8px}.store-tools #store-submit{padding:8px 10px}.store-tools #store-close{margin-left:auto;color:#ddd}
 .community-intro{font-size:10px;line-height:1.5;margin:6px 0 8px}.community-intro>span{display:none}
 #products{touch-action:pan-x;gap:8px;scroll-padding-inline:2px}.store-card{flex:0 0 144px}.store-thumb{height:88px}.store-meta h3{font-size:10px;letter-spacing:.2px}.store-card p{font-size:10px;margin:5px 0}.store-action{min-height:44px;font-size:11px}
 .store-foot{flex-wrap:wrap;font-size:9px;margin:0;gap:4px}.store-foot button{min-height:44px;font-size:11px}
 body.store-open .bottom,body.store-open .zoom-controls,body.store-open .color-modes{opacity:0;pointer-events:none}
 #toast{bottom:calc(210px + env(safe-area-inset-bottom));padding:10px 14px;font-size:11px}body.store-open #toast{display:none}
 #restore-ui{bottom:max(12px,env(safe-area-inset-bottom));right:max(12px,env(safe-area-inset-right));min-height:44px}
 .store-dialog{padding:24px 20px;width:360px}.store-dialog .primary,.store-dialog .text-button,.support-tabs button{min-height:44px}
 .store-dialog input::placeholder{font-size:12px}#move-pad button{width:44px;height:44px}
}
@media(orientation:portrait) and (max-width:700px) and (max-height:650px){
 .journey,.bottom footer,.hide-ui{display:none}
 .scene-strip{position:absolute;right:0;bottom:0;margin:0}.scene-strip>div{display:none}
 .control-row{gap:2px}.lens-nav button{min-height:44px}
 .store-thumb{height:60px}.community-intro{display:none}
}
@media(orientation:landscape) and (max-height:500px){
 .header{top:max(4px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}.header .star,.edition,.title-block{display:none}
 .bottom{bottom:max(4px,env(safe-area-inset-bottom));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right))}.bottom footer,.scene-strip,.journey{display:none}
 .control-row{margin:0;gap:8px;flex-wrap:nowrap;justify-content:center}.view-nav{width:auto}.view-nav button{min-height:44px;padding:8px 14px;gap:0}.view-nav button>span{display:none}.lens-nav{border:0;padding:0}.lens-nav button{min-height:44px}.hide-ui{position:static;min-height:44px}
 .color-modes{top:30%;gap:0;left:max(3px,env(safe-area-inset-left))}.zoom-controls{top:26%;right:max(3px,env(safe-area-inset-right))}
 #model-drawer{top:56px;bottom:max(8px,env(safe-area-inset-bottom));right:max(10px,env(safe-area-inset-right));left:auto;width:310px;max-width:50vw;max-height:none;overflow:auto;padding:8px 10px}
 .store-heading{flex-wrap:wrap;gap:0}.store-heading>div:first-child{width:100%}.store-tools{width:100%;gap:4px;justify-content:space-between;flex-wrap:wrap}.store-tools button{min-height:40px}.community-intro{display:none}.store-card{flex-basis:136px}.store-thumb{height:72px}.store-action{min-height:40px}.store-foot{flex-wrap:wrap}.store-foot button{min-height:40px}
 body.store-open .bottom,body.store-open .zoom-controls,body.store-open .color-modes{opacity:0;pointer-events:none}
 #settings{top:54px;max-height:calc(100dvh - 62px - env(safe-area-inset-bottom))}#toast{bottom:70px}body.store-open #toast{display:none}
}
