html,body{overscroll-behavior:none}#gameScreen{touch-action:none;overscroll-behavior:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}#gameScreen #world{display:none}.hall-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none}.hall-location{position:absolute;top:calc(65px + env(safe-area-inset-top));left:15px;right:15px;text-align:center;pointer-events:none;color:#c1c7d0;text-shadow:0 2px 5px #000;z-index:5}.hall-location b{font:500 12px Cinzel,Georgia,serif;letter-spacing:.18em}.hall-location small{display:block;font:italic 12px Georgia;margin-top:6px;opacity:.7}.hall-prompt{position:absolute;left:50%;bottom:calc(220px + env(safe-area-inset-bottom));transform:translateX(-50%);text-align:center;z-index:7;pointer-events:none;color:#dde1e6;background:#0b0d13d9;border:1px solid #626b77;padding:9px 14px;font:12px Georgia;max-width:90%;width:max-content}.hall-prompt:empty{display:none}.hall-loading{position:absolute;inset:0;display:grid;place-content:center;background:#08090cf0;text-align:center;color:#bfc7d0;z-index:10;padding:25px;font:16px Georgia}.hall-loading:empty{display:none}.hall-loading button{margin-top:20px}.hall-settings{margin-top:16px}.hall-settings input[type=range]{padding:0;accent-color:#9aa6b5}.hall-settings label{display:flex;justify-content:space-between;align-items:center;font-size:13px}.hall-settings select{font-size:14px}.hall-help{font-size:12px;line-height:1.6;color:#aab0bb}.hall-settings summary{cursor:pointer;color:#d2d7df;font-family:Georgia;padding:10px 0}.hall-controls{position:absolute;right:12px;top:calc(110px + env(safe-area-inset-top));z-index:6;display:flex;gap:5px}.hall-controls button{min-width:38px;min-height:38px;border:1px solid #65707d;background:#0d111bd9;color:#cbd2db;font:18px Georgia}.hall-controls .running{background:#303844}#gameScreen .joystick{background:#10121999;border-color:#a0a8b15c;box-shadow:inset 0 0 20px #0005}#gameScreen .nub{background:radial-gradient(circle,#7d8896,#262d37);border-color:#b4becb;box-shadow:0 0 10px #9da5b333}#gameScreen .chip,#gameScreen .skill,#gameScreen .orn{background:#0e1119df;border-color:#67717e}.hall-contextlost{z-index:20}#gameScreen #talk{top:calc(153px + env(safe-area-inset-top))}body:has(#gameScreen.active) #shell{max-width:none}#hallErrorBack{min-height:44px}.hall-metrics{font:11px monospace;color:#8a939f;padding-top:10px}
@media(min-width:800px){#gameScreen .bottom{left:24px;right:24px;bottom:24px}#gameScreen .actionline{right:24px;bottom:170px}#gameScreen .hall-prompt{bottom:245px}.hall-location b{font-size:15px}}
@media(max-height:500px){#gameScreen .joystick{width:94px;height:94px}#gameScreen .skill{min-height:44px}.hall-location{top:52px}.hall-location small{display:none}.hall-controls{top:82px}.hall-prompt{bottom:160px}#gameScreen .actionline{bottom:110px}.hall-controls button{min-height:30px}}
/* Phase A controls: the existing silver interface is retained; visual approval is pending. */
.academy-settings{width:min(92vw,480px);max-height:86dvh;overflow:auto;overscroll-behavior:contain;color:#d5dae2;background:linear-gradient(145deg,#171b24,#080a10);border:1px solid #929da9;padding:20px 23px;box-shadow:0 0 0 4px #10141c,0 18px 70px #000c;font-family:Georgia,serif}.academy-settings::backdrop{background:#030509c9;backdrop-filter:blur(3px)}.academy-settings header{display:flex;align-items:center;justify-content:space-between;gap:15px}.academy-settings h2{font:500 23px Cinzel,Georgia,serif;margin:0}.academy-settings fieldset{border:1px solid #4a525f;padding:12px 15px 18px;margin:18px 0}.academy-settings legend{font:500 12px Cinzel,Georgia,serif;letter-spacing:.12em;padding:0 8px;color:#b9c4d2}.academy-settings label{display:flex;align-items:center;justify-content:space-between;gap:14px;color:#c7cfda;font-size:14px;margin-top:12px}.academy-settings output{font:12px Georgia;color:#aab7c6;white-space:nowrap}.academy-settings input[type=range]{padding:0;accent-color:#9eacbe;min-height:35px;margin:0 0 5px;touch-action:pan-y}.academy-settings select{font-size:15px;min-height:44px}.academy-settings button{min-height:40px}.academy-settings .settings-check{justify-content:flex-start}.academy-settings input[type=checkbox]{width:18px;height:18px;accent-color:#a7b6c8}.academy-settings header button{font-size:27px;line-height:1}.academy-settings .orn{margin-top:9px}.entry-language .entry-music{width:38px;height:38px}.hall-canvas{outline:none}#stick{touch-action:none;overscroll-behavior:none;-webkit-user-select:none;user-select:none}.academy-settings [hidden]{display:none!important}

/* Keep the WebGL scene behind the HUD but above the screen background. */
#gameScreen>.hall-canvas{position:absolute;inset:0;z-index:0;display:block;width:100%;height:100%;pointer-events:auto}
#gameScreen>.hall-diagnostic:not([hidden]){position:absolute;z-index:30;top:calc(185px + env(safe-area-inset-top));left:12px;right:12px;max-height:30vh;overflow:auto;padding:12px;background:#150e19f2;border:1px solid #c3a8bb;color:#f5e4f1;font:13px/1.5 monospace;overflow-wrap:anywhere}
#gameScreen>.hall-diagnostic[hidden]{display:none}

/* Mobile play layout: reserve the center for the avatar and hall. */
@media(max-width:600px) and (orientation:portrait){
 #gameScreen .hall-controls{top:calc(96px + env(safe-area-inset-top));right:10px;gap:6px}
 #gameScreen .actionline{left:8px;right:8px;bottom:calc(208px + env(safe-area-inset-bottom));display:flex;gap:5px;justify-content:space-between}
 #gameScreen .actionline .orn{flex:1 1 0;min-width:0;font-size:clamp(11px,3.2vw,14px);padding-left:0;padding-right:0}
 #gameScreen .weapon-actions{right:8px;width:min(47vw,190px);bottom:calc(100px + env(safe-area-inset-bottom));gap:4px}
 #gameScreen .weapon-actions .skill{min-height:54px}
 #gameScreen .weapon-actions img{height:23px}
 #gameScreen .weapon-actions .rpg-attack-label{font-size:11px}
 #gameScreen .bottom{left:10px;right:10px;bottom:calc(12px + env(safe-area-inset-bottom))}
 #gameScreen .joystick{width:min(29vw,116px);height:min(29vw,116px)}
 #gameScreen .rightcontrols{max-width:49vw}
 #gameScreen .hall-prompt{bottom:calc(270px + env(safe-area-inset-bottom));max-width:85vw}
 #gameScreen #talk{max-width:88vw}
 #gameScreen .hall-location{top:calc(108px + env(safe-area-inset-top));font-size:11px}
}
