*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:#121b29;color:#f8f0dc;font-family:Inter,Arial,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #e9bd83;outline-offset:5px}button{border:0}button:hover{filter:brightness(1.18)}.observatory{height:100svh;min-height:620px;position:relative;overflow:hidden;background:radial-gradient(ellipse at 55% 30%,#26344a,#101825 75%)}#universe{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab}#universe:active{cursor:grabbing}.glass{pointer-events:none;position:absolute;inset:0;background:linear-gradient(110deg,transparent 30%,#b6cbd703 31%,transparent 60%)}header{position:absolute;top:0;left:0;right:0;padding:30px 40px;display:flex;justify-content:space-between;align-items:center;z-index:3}.brand{display:flex;gap:12px;align-items:center;color:#f2d7af;text-decoration:none;font-size:31px}.brand>span{font-size:17px;letter-spacing:4px}.brand small{display:block;font-size:8px;letter-spacing:2px;margin-top:7px;color:#a4adbc}.top-actions{display:flex;gap:8px}.top-actions button{border:1px solid #d6dddf22;border-radius:24px;background:#17213188;padding:10px 15px;font-size:11px;color:#c8cbd1}.world-label{position:absolute;top:125px;left:7%;pointer-events:none}.eyebrow{font-size:9px;letter-spacing:2.8px;color:#a9b9c6}.world-label h1{font-family:Georgia,serif;font-weight:400;font-size:clamp(29px,3vw,44px);margin:15px 0 12px;letter-spacing:-1px}.world-label p{font-size:12px;color:#a6b1c0;line-height:1.8}.view-tools{position:absolute;right:35px;top:40%;display:flex;flex-direction:column;border:1px solid #ddd2;border-radius:30px;overflow:hidden;background:#111d2d77}.view-tools button{background:none;width:36px;height:39px;color:#bdc7d3;font-size:20px}.planet-note{position:absolute;top:63%;left:50%;transform:translateX(-50%);color:#9daeb9;font-size:10px;letter-spacing:.6px;display:flex;align-items:center;gap:7px;white-space:nowrap}.tiny-orbit{width:10px;height:10px;border:1px solid #9daeb9;border-radius:50%}.cabin{position:absolute;bottom:38px;left:0;right:0;height:270px;pointer-events:none}.window-rim{position:absolute;left:-4%;right:-4%;bottom:50px;height:140px;border-bottom:27px solid #777a81;border-radius:0 0 50% 50%;box-shadow:0 11px 0 #303c4c,0 17px 0 #19202c,0 22px 28px #090d17;transform:perspective(600px) rotateX(20deg);background:linear-gradient(0deg,#c5c2ac11,transparent 30%)}.left-wall,.right-wall{position:absolute;bottom:0;width:20%;height:260px;background:linear-gradient(100deg,#707880,#414d5b 60%,#293745);box-shadow:inset -10px 0 15px #1115}.left-wall{left:-10%;transform:skewX(23deg);border-radius:0 60% 0 0}.right-wall{right:-10%;transform:skewX(-23deg);border-radius:60% 0 0 0}.floor{position:absolute;left:0;right:0;bottom:0;height:110px;background:linear-gradient(#36414d,#1d2735);clip-path:polygon(10% 0,90% 0,100% 100%,0 100%)}.crew{position:absolute;left:50%;bottom:96px;width:650px;height:100px;transform:translateX(-50%)}.seat{position:absolute;width:72px;height:98px;bottom:0;filter:drop-shadow(0 14px 8px #0c142899)}.c1{left:30px;transform:rotate(-8deg)}.c2{left:160px;transform:scale(.85) translateY(-15px)}.c3{right:160px;transform:scale(.85) translateY(-15px)}.c4{right:30px;transform:rotate(8deg)}.chair{position:absolute;bottom:0;width:68px;height:47px;border-radius:19px 19px 13px 13px;background:linear-gradient(100deg,#8496a1,#526a78);border:4px solid #344b5b;box-shadow:0 8px 0 #263c4b,inset 0 2px 3px #c5d2d955}.chair:after{content:'';position:absolute;bottom:-19px;left:22px;width:16px;height:15px;background:#263747;border-bottom:5px solid #142231}.person{position:absolute;left:9px;bottom:30px;width:50px;height:70px}.head{position:absolute;top:0;width:48px;height:45px;border-radius:48% 48% 44% 44%;background:radial-gradient(circle at 35% 25%,#e9e4cb,#b5b8aa);box-shadow:inset -7px -3px 8px #545f7933}.head:after{content:'';position:absolute;top:15px;left:5px;right:5px;height:20px;border-radius:12px;background:linear-gradient(145deg,#6d94a3,#354958);border:2px solid #cbd6d0;box-shadow:inset 3px 2px 5px #dceeff55}.body{position:absolute;bottom:0;left:4px;width:42px;height:34px;border-radius:15px;background:#98b8ab}.peach .body{background:#cf9d88}.lavender .body{background:#a49ab6}.cream .body{background:#d2bb8e}.console{pointer-events:auto;position:absolute;bottom:8px;left:50%;transform:translateX(-50%);width:min(540px,88%);border:1px solid #b8baa866;border-radius:24px 24px 17px 17px;background:linear-gradient(160deg,#6d777a,#424f5d 65%);box-shadow:0 8px 0 #1b2b3a,0 20px 40px #0005,inset 0 2px 2px #dce0cf55;padding:12px 20px 14px}.console-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:5px}.ship-selector{display:flex;gap:7px;align-items:center;background:none;padding:4px;font-size:12px;color:#f3e8cb}.status-dot{width:5px;height:5px;border-radius:50%;background:#e0bd78;box-shadow:0 0 7px #e0bd7855}.crew-note{font-size:8px;color:#c5cccf}nav{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}nav button{background:#263646;border:1px solid #b4c0be22;border-radius:11px;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:9px;box-shadow:0 3px 0 #192b39}.nav-icon{font-size:20px;color:#e3c392}footer{position:absolute;bottom:0;left:0;right:0;min-height:38px;background:#142030;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 25px;font-size:8px;color:#93a3b5}footer>div{display:flex;gap:7px;align-items:center}.data-dot{width:4px;height:4px;background:#cba77d;border-radius:50%}footer button{background:none;color:#93a3b5;font-size:8px}footer b{color:#dfccb0;font-weight:400;margin-left:7px;font-variant-numeric:tabular-nums}.shooting-star{position:absolute;top:28%;left:-20%;width:90px;height:30px;z-index:2;background:none;transform:rotate(22deg);animation:meteor 27s linear infinite;cursor:pointer}.shooting-star:before{content:'';position:absolute;right:10px;top:14px;width:85px;height:2px;background:linear-gradient(90deg,transparent,#f7dfa5)}.shooting-star span{position:absolute;right:0;color:#ffe9b6;font-size:20px;filter:drop-shadow(0 0 6px #fff2b8)}@keyframes meteor{0%,76%{left:-20%;opacity:0}77%{opacity:1}85%{left:85%;top:40%;opacity:1}87%,100%{left:110%;opacity:0}}.santa{position:absolute;top:29%;left:62%;font-size:24px;animation:float 4s ease-in-out infinite;pointer-events:none}.santa small{display:block;font-size:9px;color:#cbd0cf;text-align:center}@keyframes float{50%{transform:translateY(-8px)}}dialog{width:min(460px,calc(100% - 32px));max-height:82svh;border:1px solid #c7c5af44;border-radius:24px;padding:22px;background:#263344;color:#f5e9d0;box-shadow:0 30px 100px #0008}dialog::backdrop{background:#080e1caa;backdrop-filter:blur(8px)}.modal-head{display:flex;justify-content:space-between;align-items:center;color:#b4bdbf;font-size:9px;letter-spacing:2px}.modal-head button{font-size:27px;background:none;color:#c6cdcd}.modal-head+div h2{font-family:Georgia,serif;font-weight:400;font-size:28px;margin:15px 0}.modal-copy,.privacy{font-size:12px;line-height:1.8;color:#aebcc7}.privacy{font-size:10px;margin-top:14px}textarea,input{display:block;width:100%;padding:13px;border-radius:12px;border:1px solid #8e9da044;background:#182636;color:#f5e9d0;font:inherit;resize:vertical}textarea{min-height:120px;margin:20px 0 12px}label{display:block;font-size:11px;color:#bfccce;margin:15px 0 8px}.primary{width:100%;background:#dbc39d;color:#273140;border-radius:12px;padding:13px;font-size:12px}.channels{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:12px 0 20px}.channels button{background:#1b293a;border:1px solid #b8c5c522;border-radius:10px;height:43px}.channels .selected{background:#dcc49d;color:#293544}.journal-entry{padding:14px;background:#1b293a;border-radius:12px;margin:10px 0}.journal-entry small{font-size:9px;color:#9baebc}.journal-entry p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.6}.journal-entry button{background:none;color:#acb8c2;font-size:10px}.settings-row{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:18px 0;border-bottom:1px solid #c6ced01a;font-size:12px}.settings-row button{background:#405162;border-radius:9px;padding:9px 13px}.settings-row input{width:20px;height:20px}.record-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}.record-grid div{background:#1a2939;border-radius:12px;padding:14px;font-size:12px;line-height:1.8}.record-grid small{display:block;color:#98aabc;font-size:10px}#toast{position:fixed;bottom:180px;left:50%;transform:translateX(-50%) translateY(10px);background:#e1ceb0;color:#253343;padding:12px 20px;border-radius:25px;font-size:12px;opacity:0;pointer-events:none;transition:.2s;z-index:10;max-width:90%;text-align:center}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}@media(max-width:600px){.observatory{min-height:580px}header{padding:23px 21px}.brand{font-size:24px;gap:8px}.brand>span{font-size:14px;letter-spacing:3px}.brand small{font-size:6px}.top-actions button{padding:8px 10px;font-size:10px}#sound span{display:none}.world-label{top:110px;left:25px}.world-label h1{font-size:31px}.world-label p{max-width:245px;font-size:11px}.eyebrow{font-size:7px;letter-spacing:1.8px}.view-tools{right:17px;top:43%}.view-tools button{width:30px;height:34px}.planet-note{top:61%;font-size:8px}.cabin{height:245px;bottom:50px}.crew{width:390px;bottom:92px;transform:translateX(-50%) scale(.85)}.c1{left:4px}.c2{left:93px;transform:scale(.75) translateY(-20px)}.c3{right:93px;transform:scale(.75) translateY(-20px)}.c4{right:4px}.console{padding:10px 12px 13px;width:91%;bottom:4px}.crew-note{font-size:7px}.ship-selector{font-size:10px}.console-top{margin-bottom:7px}nav button{font-size:8px;min-height:56px}footer{min-height:50px;flex-direction:column;justify-content:center;gap:5px;padding:6px;font-size:7px}footer button{font-size:7px}.window-rim{bottom:65px;border-bottom-width:21px}.left-wall,.right-wall{height:215px}.floor{height:115px}}@media(prefers-reduced-motion:reduce){.shooting-star,.santa{animation:none}.shooting-star{left:75%;top:24%;opacity:1}}

.record-status{font-size:9px;line-height:1.8;color:#899bac;letter-spacing:.2px;margin-top:20px}@media(max-width:600px){.record-status{font-size:8px;margin-top:12px}}
/* V2: the actual Akashic record visual language; the room is rendered in WebGL. */
:root{color-scheme:dark}html,body,.observatory{background:#000;font-family:'Courier New',monospace;color:#d8ecdf}.glass,.window-rim,.left-wall,.right-wall,.floor,.crew,.planet-note,.shooting-star{display:none!important}.brand{color:#65ff92}.brand>span{letter-spacing:5px}.brand small{color:#85ae92}.top-actions button{border-color:#1e482a;background:#030906;border-radius:2px;color:#85ae92}.world-label{top:100px;left:40px}.world-label h1{font:700 21px 'Courier New',monospace;letter-spacing:1px;color:#d8ecdf;margin:12px 0}.world-label p{color:#85ae92;font-size:11px}.eyebrow{color:#65ff92;font-size:8px}.record-status{color:#85ae92;margin-top:12px}.cabin{height:120px;bottom:40px}.console{left:auto;right:24px;transform:none;width:460px;border-radius:3px;background:#030906e8;border:1px solid #1e482a;box-shadow:none;padding:10px 14px}.ship-selector{color:#65ff92}.status-dot{background:#65ff92;box-shadow:none}.crew-note{color:#85ae92}nav button{border-radius:2px;background:#07100a;box-shadow:none;border-color:#1e482a;font-size:9px;color:#d8ecdf}.nav-icon{color:#65ff92}.view-tools{border-radius:2px;border-color:#1e482a;background:#0009;top:37%}.view-tools button{color:#65ff92}footer{background:#000;border-top:1px solid #1e482a;color:#85ae92}footer button{color:#85ae92}footer b{color:#65ff92}.data-dot{background:#65ff92}dialog{border-radius:3px;border-color:#1e482a;background:#020704;color:#d8ecdf}.modal-head+div h2{font:700 23px 'Courier New',monospace;color:#65ff92}.modal-copy,.privacy{color:#85ae92}textarea,input{border-radius:2px;background:#030906;border-color:#1e482a;color:#d8ecdf}.primary{border-radius:2px;background:#65ff92;color:#031207}.channels button,.journal-entry,.record-grid div{border-radius:2px;background:#07100a}.channels .selected{background:#65ff92;color:#031207}.settings-row button{border-radius:2px;background:#163c22}.settings-row{border-color:#1e482a}#toast{border-radius:2px;background:#65ff92;color:#031207}#movementHUD{position:absolute;bottom:100px;left:35px;z-index:4;display:flex;flex-direction:column;gap:12px;color:#85ae92;font:10px 'Courier New',monospace;pointer-events:none}#movementHUD button{pointer-events:auto;background:#65ff92;color:#031207;border:1px solid #65ff92;border-radius:2px;padding:14px;font:700 11px 'Courier New',monospace}#joystick{position:absolute;bottom:160px;left:35px;width:86px;height:86px;border:1px solid #377247;border-radius:50%;background:#06140b66;touch-action:none;z-index:5}#stick{position:absolute;width:36px;height:36px;left:24px;top:24px;border-radius:50%;background:#65ff9266;border:1px solid #65ff92;pointer-events:none}#graphicsError{position:absolute;inset:30% 15%;background:#020704;padding:25px;border:1px solid #65ff92;z-index:9;color:#65ff92;font-size:14px;line-height:1.7}.santa{font-size:22px;z-index:2}.santa small{color:#65ff92}@media(min-width:800px){#joystick{opacity:.5}#joystick:hover{opacity:1}}@media(max-width:600px){header{padding:20px}.world-label{top:90px;left:20px}.world-label h1{font-size:18px}.world-label p{font-size:9px;max-width:200px}.record-status{font-size:7px}.cabin{bottom:48px;height:100px}.console{right:4%;width:92%;bottom:5px;padding:8px 12px}nav button{min-height:45px;font-size:8px}.nav-icon{font-size:17px}#joystick{bottom:174px;left:20px;width:76px;height:76px}#stick{left:19px;top:19px}#movementHUD{bottom:171px;left:115px;right:20px;font-size:8px;line-height:1.7}#movementHUD button{font-size:9px;padding:10px}.view-tools{right:17px;top:31%}footer{font-size:6px}}
/* Native language controls remain usable inside modal dialogs. */
select[data-language-select]{max-width:120px;background:#192436;color:#e5ebe9;border:1px solid #637584;border-radius:8px;padding:7px;font:inherit;font-size:12px}select[data-language-select]:focus-visible{outline:2px solid #b8e8dc;outline-offset:3px}.modal-head select[data-language-select]{margin-left:auto;margin-right:12px}
footer{flex-wrap:wrap}footer .footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 16px}footer .footer-links a{color:#afd0b8;text-decoration:none;font-size:10px;line-height:1.5}footer .footer-links a:hover{text-decoration:underline}footer .footer-links a:focus-visible{outline:2px solid #65ff92;outline-offset:3px}@media(max-width:600px){footer{min-height:72px;padding:5px 9px}.footer-links{max-width:100%}footer .footer-links a{font-size:9px}.cabin{bottom:76px}#movementHUD{bottom:199px}#joystick{bottom:202px}}

@media(min-width:601px) and (max-width:950px){footer{min-height:60px}.cabin{bottom:64px}}
/* Shared control geometry: translation length never changes hit-area placement. */
:root{--deck-footer:136px;--deck-console:132px;--control-edge:24px;--control-gap:8px;--control-cell:56px;--control-bottom:calc(var(--deck-footer) + env(safe-area-inset-bottom,0px) + 16px)}
footer{height:calc(var(--deck-footer) + env(safe-area-inset-bottom,0px));min-height:0;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));overflow-wrap:anywhere}
.cabin{bottom:calc(var(--deck-footer) + env(safe-area-inset-bottom,0px));height:var(--deck-console)}
.console{bottom:8px;max-height:var(--deck-console)}
#movementHUD{left:130px;right:auto;bottom:var(--control-bottom);width:330px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:48px var(--control-cell) var(--control-cell) 28px;gap:var(--control-gap);align-items:stretch;font-size:9px;line-height:1.3;pointer-events:none}
#moveHint{grid-column:1/-1;grid-row:1;align-self:end;overflow-wrap:anywhere;white-space:normal;max-height:48px;overflow:auto;pointer-events:auto}
#movementHUD button{box-sizing:border-box;width:100%;height:var(--control-cell);min-width:0;min-height:var(--control-cell);max-height:var(--control-cell);margin:0;padding:5px!important;display:flex;align-items:center;justify-content:center;text-align:center;font-size:10px;line-height:1.15;white-space:normal;overflow-wrap:anywhere;word-break:normal;hyphens:auto;touch-action:manipulation}
#movementHUD button[hidden]{display:none!important}
#observeButton,#returnButton{grid-column:1;grid-row:2}#seatButton{grid-column:2;grid-row:2}#nicknameToggle{grid-column:3;grid-row:2}
#reactionBar{grid-column:1/-1;grid-row:3;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--control-gap)!important;min-width:0}
#movementHUD>[role="status"]{grid-column:1/-1;grid-row:4;max-height:28px;overflow:auto;overflow-wrap:anywhere;pointer-events:auto}
#joystick{left:var(--control-edge);right:auto;bottom:var(--control-bottom);width:86px;height:86px;touch-action:none;isolation:isolate}
#stick{left:calc(50% - 18px);top:calc(50% - 18px)}
@media(max-width:1050px){
 :root{--deck-footer:184px;--control-edge:16px;--control-bottom:calc(var(--deck-footer) + var(--deck-console) + env(safe-area-inset-bottom,0px) + 16px)}
 footer{flex-direction:column;justify-content:center;gap:5px;padding:7px 12px calc(7px + env(safe-area-inset-bottom,0px));font-size:7px}footer button{font-size:8px}footer>div{justify-content:center;text-align:center}footer .footer-links{gap:3px 12px}footer .footer-links a{font-size:9px}
 .console{left:16px;right:16px;width:auto;transform:none;padding:8px 12px}.console-top{min-width:0}.ship-selector{flex-wrap:wrap;min-width:0}.crew-note{max-width:44%;overflow-wrap:anywhere}nav button{min-width:0;overflow-wrap:anywhere}
 #joystick{left:16px;width:76px;height:76px}
 #movementHUD{left:108px;right:16px;width:auto;max-width:420px;font-size:8px}
 #movementHUD button{font-size:9px}
}
@media(max-width:359px){#movementHUD{left:100px;right:10px;--control-gap:5px}#joystick{left:10px}#movementHUD button{font-size:8px}.console{left:10px;right:10px}}
@media(max-height:640px) and (min-width:700px){.world-label .record-status,.world-label .eyebrow{display:none}.world-label{top:78px}.world-label p{margin:4px 0}.observatory{min-height:620px}}

footer .planet-footer-note{flex-basis:100%;width:100%;color:#afd0b8;text-align:center;text-decoration:none;font-size:10px;line-height:1.45;overflow-wrap:anywhere}footer .planet-footer-note:hover{text-decoration:underline}@media(max-width:1050px){footer .planet-footer-note{flex-basis:auto;max-width:620px;font-size:9px}}

@media(max-width:600px){.observatory{min-height:640px}}@media(max-width:600px) and (max-height:740px){.world-label{top:88px}.world-label .eyebrow,.world-label p,.world-label .record-status{display:none}.world-label h1{font-size:16px;margin:0}}
#wishForm input[type="checkbox"]{display:inline-block;width:18px;height:18px;padding:0;margin:0 8px 0 0;vertical-align:middle;accent-color:#65ff92}#wishForm label:has(input[type="checkbox"]){line-height:1.6;cursor:pointer}#wishForm button{white-space:normal;overflow-wrap:anywhere}

footer .solar-footer-note{flex-basis:100%;width:100%;margin:0;color:#85ae92;text-align:center;font-size:8px;line-height:1.35;overflow-wrap:anywhere}@media(max-width:1050px){footer .solar-footer-note{flex-basis:auto;font-size:8px;max-width:680px}}@media(max-width:600px){.observatory{min-height:680px}}

/* The game stays viewport-sized; narrative/footer follows in document flow. */
html,body{height:auto;min-height:100%;overflow-x:hidden}
.observatory{height:100svh;min-height:0!important}
footer{position:relative;inset:auto;height:auto!important;min-height:0;display:flex;flex-direction:column;align-items:center;gap:14px;padding:24px max(20px,env(safe-area-inset-left,0px)) calc(24px + env(safe-area-inset-bottom,0px));font-size:11px;line-height:1.5}
footer>div{max-width:760px;text-align:center;justify-content:center}footer button{font-size:11px;line-height:1.5}footer .footer-links a{font-size:12px}footer .planet-footer-note{flex-basis:auto;max-width:760px;font-size:13px;line-height:1.7}footer .solar-footer-note{flex-basis:auto;max-width:760px;font-size:11px;line-height:1.5}
:root{--control-bottom:calc(16px + env(safe-area-inset-bottom,0px))}
.cabin{bottom:calc(8px + env(safe-area-inset-bottom,0px));height:132px}
@media(max-width:1050px){:root{--control-bottom:calc(156px + env(safe-area-inset-bottom,0px))}.console{bottom:8px}#movementHUD{grid-template-rows:48px 56px 56px 28px}.observatory .world-label{max-width:calc(100% - 40px)}}
@media(max-width:600px) and (max-height:740px){.world-label{top:88px}.world-label h1{font-size:16px;margin:0}.world-label .eyebrow,.world-label p,.world-label .record-status{display:none}}

/* Center mailbox shares the window-action cell; proximity makes them exclusive. */
#mailboxButton{grid-column:1;grid-row:2}

/* v8 mobile-only repair: the scene owns the visible viewport, not the page footer. */
#mobileMenuToggle,#mobilePanel{display:none}
@media(max-width:700px),(max-width:1050px) and (max-height:500px){
 .observatory{height:100svh;height:100dvh;height:var(--mobile-view-height,100dvh)}
 header{padding:calc(10px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 8px max(12px,env(safe-area-inset-left,0px));gap:8px}
 .brand{gap:6px;font-size:22px}.brand>span{font-size:12px;letter-spacing:2px}.brand small{font-size:6px;letter-spacing:1px}
 .top-actions{gap:5px}.top-actions button{min-height:40px;padding:8px}#sound span{display:none}select[data-language-select]{max-width:100px;min-height:40px;font-size:12px}
 .world-label{top:calc(66px + env(safe-area-inset-top,0px))!important;left:max(12px,env(safe-area-inset-left,0px))!important;pointer-events:none}
 .world-label h1{font-size:14px!important;margin:0!important}.world-label .eyebrow,.world-label p,.world-label .record-status{display:none!important}
 .cabin{display:none}
 #joystick{left:max(12px,env(safe-area-inset-left,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));width:68px;height:68px}
 #movementHUD{left:96px;right:max(12px,env(safe-area-inset-right,0px));bottom:calc(72px + env(safe-area-inset-bottom,0px));width:auto;max-width:340px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:44px;gap:6px}
 #movementHUD button{height:44px;min-height:44px;max-height:44px;font-size:9px}#observeButton,#returnButton{grid-column:1;grid-row:1}#seatButton{grid-column:2;grid-row:1}
 #movementHUD>[role="status"]{grid-column:1/-1;grid-row:2;max-height:22px;font-size:8px}
 #mobileMenuToggle{display:block;position:absolute;right:max(12px,env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:9;min-width:124px;max-width:calc(100% - 108px);min-height:44px;padding:8px 14px;border:1px solid #377247;border-radius:2px;background:#030906ed;color:#b6e7c4;font:12px 'Courier New',monospace}
 #mobilePanel:not([hidden]){display:flex;position:absolute;left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));bottom:calc(72px + env(safe-area-inset-bottom,0px));max-height:calc(var(--mobile-view-height,100dvh) - 156px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior:contain;flex-direction:column;gap:12px;z-index:8;padding:12px;background:#020704f5;border:1px solid #377247;border-radius:3px;pointer-events:auto}
 #mobilePanel .console{position:static;left:auto;right:auto;bottom:auto;width:100%;max-height:none;padding:0;border:0;transform:none}
 #mobilePanel .console-top{flex-wrap:wrap;gap:6px}#mobilePanel .ship-selector{font-size:11px;min-height:40px}#mobilePanel .crew-note{max-width:100%;font-size:8px}
 #mobilePanel nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#mobilePanel nav button{min-height:44px;font-size:10px;flex-direction:row;padding:6px}
 #mobilePanel #reactionBar{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important}
 #mobilePanel #reactionBar button,#mobilePanel #nicknameToggle{min-height:44px;padding:6px!important;background:#163c22;color:#d8ecdf;border:1px solid #377247;font:10px 'Courier New',monospace;white-space:normal;overflow-wrap:anywhere}
 #mobilePanel #nicknameToggle[hidden]{display:none}#mobilePanel #moveHint{font-size:9px;line-height:1.5;max-height:none;overflow:visible}
 #mobilePanel>a{color:#afd0b8;font-size:11px;min-height:36px;display:flex;align-items:center}
 .mobile-menu-open #joystick,.mobile-menu-open #movementHUD{visibility:hidden!important}
 .view-tools{right:max(12px,env(safe-area-inset-right,0px));top:calc(104px + env(safe-area-inset-top,0px));z-index:3}.view-tools button{width:36px;height:36px}
 dialog{position:fixed;top:calc(var(--dialog-view-top,0px) + 12px + env(safe-area-inset-top,0px));bottom:auto;left:50%;right:auto;transform:translateX(-50%);margin:0;width:calc(100% - 24px);max-height:calc(var(--dialog-view-height,100dvh) - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));padding:16px;overflow-y:auto;overscroll-behavior:contain}
 dialog input,dialog textarea{font-size:16px}dialog textarea{min-height:88px}.modal-head{position:sticky;top:-16px;z-index:1;background:#020704;padding:4px 0}.modal-head button{min-width:40px;min-height:40px}
 html.mobile-modal-open{overflow:hidden}#toast{bottom:calc(124px + env(safe-area-inset-bottom,0px));font-size:11px}
 footer{scroll-margin-top:12px}
}
@media(max-width:1050px) and (max-height:500px){
 .world-label{display:none}.view-tools{top:74px;right:12px}.view-tools button{height:32px}
 #mobilePanel:not([hidden]){max-height:calc(var(--mobile-view-height,100dvh) - 128px - env(safe-area-inset-bottom,0px));bottom:calc(64px + env(safe-area-inset-bottom,0px))}
 #movementHUD{bottom:calc(16px + env(safe-area-inset-bottom,0px));right:156px}
}
@media(max-width:700px),(max-width:1050px) and (max-height:500px){#graphicsError{inset:30% 12% auto;padding:16px;font-size:12px;pointer-events:none;z-index:2}}
/* Declare gesture ownership before touchstart; keep footer/menu/modal scrolling untouched. */
#joystick,#joystick *{touch-action:none;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}

/* Repeated zoom taps must stay app clicks, not browser double-tap zoom.
   manipulation preserves pinch zoom and native keyboard activation. */
#zoomIn,#zoomOut{touch-action:manipulation}

/* Compact drawer only: readable auxiliary copy without changing the desktop deck. */
@media(max-width:700px),(max-width:1050px) and (max-height:500px){
 #mobilePanel>*{flex-shrink:0;min-width:0}
 #mobilePanel .crew-note,#mobilePanel #moveHint,#mobilePanel #presenceCount{font-size:11px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
 #mobilePanel .ship-selector{max-width:100%;flex-wrap:wrap;font-size:12px;line-height:1.4}
 #mobilePanel nav button,#mobilePanel #reactionBar button,#mobilePanel #nicknameToggle{font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
}
/* Five shared reactions need two rows in the fixed desktop HUD; compact uses its scroll drawer. */
@media(min-width:701px) and (min-height:501px),(min-width:1051px){
 #movementHUD{grid-template-rows:48px var(--control-cell) calc(var(--control-cell)*2 + var(--control-gap)) 28px}
}
