/* One shared compact layout for the outdoor world and every interior. */
#mobile-menu-toggle,.mobile-control-name{display:none}
#mobile-menu:not([open]){display:none}
@media(max-width:900px),(max-height:520px){
 body.compact-controls{--mobile-paper:#fff9ee;--mobile-ink:#503d2e;--mobile-line:#b38c5d80;--mobile-button:#f5ead8;--mobile-edge:12px}
 html[data-loading-theme=dark] body.compact-controls{--mobile-paper:#292333;--mobile-ink:#f7e8d0;--mobile-line:#c8a36d88;--mobile-button:#3a3043}
 body.compact-controls>header{padding:10px max(12px,env(safe-area-inset-right));padding-top:max(10px,env(safe-area-inset-top));height:64px;gap:8px;flex-wrap:nowrap;pointer-events:none;z-index:20}
 body.compact-controls>header>a{pointer-events:auto;max-width:calc(100vw - 80px);font-size:12px;min-height:44px;display:flex;align-items:center}
 body.compact-controls>header .brand-logo{width:28px;height:28px;flex:none}
 body.compact-controls>header .top-actions,body.compact-controls>header>div{display:none}
 body.compact-controls #mobile-menu-toggle{display:grid;place-items:center;position:fixed;top:max(10px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));width:44px;height:44px;padding:10px;border:1px solid var(--mobile-line);border-radius:50%;color:var(--mobile-ink);background:var(--mobile-paper);z-index:24;box-shadow:0 3px 14px #16102129}
 .menu-lines{display:grid;gap:5px;width:20px}.menu-lines i{display:block;height:2px;border-radius:2px;background:currentColor}
 body.compact-controls #mobile-menu{position:fixed;inset:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) auto auto;margin:0;width:min(360px,calc(100vw - 20px));max-width:none;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:0 16px 16px;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;background:var(--mobile-paper);color:var(--mobile-ink);border:1px solid var(--mobile-line);border-radius:18px;box-shadow:0 16px 60px #100a244d;text-align:left}
 #mobile-menu::backdrop{background:#11142455;backdrop-filter:none}
 #mobile-menu .mobile-menu-head{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;background:var(--mobile-paper);z-index:1;padding:12px 0;border-bottom:1px solid var(--mobile-line)}
 #mobile-menu #mobile-menu-title{font:500 19px/1.5 'Microsoft YaHei',sans-serif;margin:0;letter-spacing:1px;color:inherit}
 #mobile-menu #mobile-menu-close{width:44px;height:44px;flex:none;font-size:26px;border-radius:50%;padding:0;background:var(--mobile-button);color:inherit;border:1px solid var(--mobile-line)}
 #mobile-menu .mobile-menu-group{padding-top:13px}#mobile-menu h3{margin:0 0 8px;font:500 12px/1.5 sans-serif;color:inherit;opacity:.8;letter-spacing:1px}
 #mobile-menu .mobile-menu-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #mobile-menu .mobile-menu-items>button,#mobile-menu .mobile-menu-items>a,#mobile-menu #scene-language,#mobile-menu .scene-language{position:static!important;inset:auto!important;transform:none!important;margin:0!important;max-width:none!important;min-width:0!important;width:100%!important;min-height:46px!important;height:auto!important;padding:10px 8px!important;display:flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--mobile-line)!important;border-radius:12px!important;background:var(--mobile-button)!important;color:var(--mobile-ink)!important;font:500 13px/1.5 sans-serif!important;letter-spacing:0!important;text-decoration:none;white-space:normal;text-align:center}
 #mobile-menu [hidden]{display:none!important}
 #mobile-menu .scene-language{padding:0!important;border:0!important;background:none!important}
 #mobile-menu #scene-language{font-size:16px!important;display:block;cursor:pointer}
 #mobile-menu #scene-language option{color:var(--mobile-ink);background:var(--mobile-paper)}
 #mobile-menu .mobile-control-name{display:inline;font:inherit!important;letter-spacing:0!important}
 #mobile-menu #return{font-size:17px!important}
 #mobile-menu #chant-label{display:inline}
 #mobile-menu #memorial-finder{position:static;transform:none;grid-column:1/-1;display:flex;flex-wrap:wrap;margin:0;padding:9px;border-radius:12px;background:var(--mobile-button);color:inherit;white-space:normal;gap:7px}
 #mobile-menu #memorial-finder label{display:block;width:100%}#mobile-menu #find-slot{flex:1;width:70px;min-width:0;min-height:44px;font-size:16px;color:inherit;background:var(--mobile-paper)}#mobile-menu #memorial-finder button{min-height:44px;padding:8px 12px}#mobile-menu #find-status{position:static;white-space:normal;min-width:0;width:100%;text-shadow:none}
 body.compact-controls #movement-controls,body.compact-controls #room-pad{position:fixed;left:max(12px,env(safe-area-inset-left));right:auto;bottom:calc(16px + env(safe-area-inset-bottom));width:176px;height:112px;display:grid;grid-template-columns:112px 52px;align-items:center;gap:12px;z-index:16;touch-action:none}
 body.compact-controls #movement-controls .joystick-pad,body.compact-controls #room-pad .joystick-pad{width:112px;height:112px;margin:0}
 body.compact-controls #movement-controls .joystick-caption,body.compact-controls #room-pad .joystick-caption,body.compact-controls .joystick-wake{display:none}
 body.compact-controls #movement-controls .altitude,body.compact-controls #room-pad .altitude{display:flex;flex-direction:column;gap:8px;opacity:1;pointer-events:auto}
 body.compact-controls #movement-controls .altitude button,body.compact-controls #room-pad .altitude button{width:52px;height:48px;min-height:48px;margin:0;padding:3px 1px;border-radius:14px;font-size:14px;line-height:1.2;color:var(--mobile-ink);background:var(--mobile-paper);border:1px solid var(--mobile-line);touch-action:none;pointer-events:auto}
 body.compact-controls #movement-controls.is-idle .joystick-pad,body.compact-controls #room-pad.is-idle .joystick-pad{opacity:.68;transform:none}
 body.compact-controls #movement-controls.is-idle .joystick-thumb,body.compact-controls #room-pad.is-idle .joystick-thumb{opacity:1}
 body.compact-controls #places-toggle{right:max(12px,env(safe-area-inset-right));bottom:calc(16px + env(safe-area-inset-bottom));width:102px;max-width:calc(100vw - 204px);min-height:48px;padding:9px 7px;font-size:12px;border-radius:16px;z-index:17;letter-spacing:0;white-space:normal;background:var(--mobile-paper);color:var(--mobile-ink)}
 body.compact-controls #places-nav{top:auto;right:max(12px,env(safe-area-inset-right));bottom:calc(142px + env(safe-area-inset-bottom));width:min(260px,calc(100vw - 24px));max-height:calc(100dvh - 224px - env(safe-area-inset-top) - env(safe-area-inset-bottom));z-index:21}
 body.compact-controls #live-dock{left:auto;right:max(12px,env(safe-area-inset-right));bottom:calc(78px + env(safe-area-inset-bottom));z-index:17;gap:0}
 body.compact-controls #live-dock #live-lotus{width:48px;height:48px;min-height:48px;margin:0;padding:0;background:var(--mobile-paper);border:1px solid var(--mobile-line)}
 body.compact-controls #live-dock .live-floating-lotus{left:12px}
 body.compact-controls #live-panel{position:fixed;left:12px;right:12px;bottom:calc(144px + env(safe-area-inset-bottom));width:auto;max-height:calc(100dvh - 220px - env(safe-area-inset-bottom));background:var(--mobile-paper);color:var(--mobile-ink)}
 body.compact-controls.live-panel-open #movement-controls,body.compact-controls.live-panel-open #room-pad{opacity:1;pointer-events:auto}
 body.compact-controls #live-screen{left:12px;bottom:calc(166px + env(safe-area-inset-bottom));width:calc(100vw - 24px);max-width:340px}
 body.compact-controls #explore-hud{left:50%;right:auto;bottom:calc(144px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);width:max-content;flex-wrap:wrap;justify-content:center;gap:6px;padding:0;border:0;border-radius:16px;background:transparent;backdrop-filter:none;pointer-events:none;z-index:15;white-space:normal}
 body.compact-controls #explore-hud #location{display:none}
 body.compact-controls #explore-hud button{pointer-events:auto;min-height:44px;background:var(--mobile-paper);color:var(--mobile-ink);border:1px solid var(--mobile-line);font-size:12px;padding:8px 12px}
 body.compact-controls>footer,body.compact-controls #room-hint{display:none}
 body.compact-controls #scene-intro,body.compact-controls #room-title{top:calc(64px + env(safe-area-inset-top));left:12px;max-width:calc(100vw - 24px);padding:6px 10px;background:transparent;text-shadow:0 1px 6px #101c2f;pointer-events:none;color:#fff7e4}
 body.compact-controls #scene-intro h1,body.compact-controls #room-title h1{font-size:21px;line-height:1.4;letter-spacing:2px;margin:0;color:#fff7e4;max-width:calc(100vw - 24px)}
 body.compact-controls #room-title>span,body.compact-controls #scene-intro>.eyebrow{display:none}
 body.compact-controls #scene-intro.is-expanded,body.compact-controls #room-title.is-expanded{max-height:30dvh;overflow:auto;pointer-events:auto;color:var(--mobile-ink);background:var(--mobile-paper);text-shadow:none;border-radius:12px}
 body.compact-controls #scene-intro.is-expanded h1,body.compact-controls #room-title.is-expanded h1,body.compact-controls #scene-intro.is-expanded p,body.compact-controls #room-title.is-expanded p{color:var(--mobile-ink);font-size:14px;line-height:1.7}
 body.compact-controls #saints-status{top:114px;bottom:auto;right:12px;max-width:calc(100vw - 24px);font-size:11px;z-index:4}
 body.compact-controls .music-panel{top:calc(64px + env(safe-area-inset-top));right:12px;left:auto;width:min(330px,calc(100vw - 24px));max-height:calc(100dvh - 220px);overflow:auto;z-index:25}
}
@media(max-height:520px){body.compact-controls #scene-intro,body.compact-controls #room-title{display:none}body.compact-controls #live-panel{left:auto;right:12px;width:min(330px,calc(100vw - 224px));top:64px;bottom:78px;max-height:none}body.compact-controls #places-nav{top:64px;bottom:78px;max-height:none;width:250px}body.compact-controls #live-screen{left:202px;width:calc(100vw - 340px);bottom:20px}body.compact-controls #explore-hud{left:200px;right:128px;transform:none;bottom:16px;width:auto;max-width:none}}
