:root{color-scheme:dark;--background:#0a100e;--paper:#ded9cb;--muted:#b5b7a9;--accent:#c3b594;--stroke:#ada68d55;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px}
*{box-sizing:border-box}
body{margin:0;background:var(--background);color:var(--paper);overflow:hidden}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #f5e5b4;outline-offset:3px}
button:disabled{opacity:.38;cursor:not-allowed}
[hidden]{display:none!important}
#stage{position:fixed;inset:0;background:#111a16;touch-action:none}
#stage canvas{display:block;width:100%;height:100%}
#stage:after{content:"";inset:0;position:absolute;background:radial-gradient(ellipse at 50% 45%,transparent 31%,#0008 100%);pointer-events:none}
#reticle{position:fixed;inset:0;pointer-events:none;display:grid;place-items:center;z-index:2}
#reticle span{width:5px;height:5px;outline:1px solid #111b17;background:#d2d0bdc0;border-radius:50%;box-shadow:0 0 8px #0009}
#hud{position:fixed;inset:0;z-index:4;padding:clamp(16px,3vw,42px);pointer-events:none;display:flex;flex-direction:column;justify-content:space-between}
#hud button{pointer-events:auto}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.eyebrow{font-size:.69rem;letter-spacing:.18em;text-transform:uppercase;color:var(--accent);font-weight:700}
h1{font-weight:400;letter-spacing:.035em;font-size:clamp(1.16rem,2.05vw,1.85rem);margin:8px 0}
#clock{font-size:.78rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:0}
nav{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.small-btn{border:1px solid var(--stroke);background:#0b1512dd;color:var(--paper);font-size:.75rem;padding:10px 12px;text-transform:uppercase;letter-spacing:.07em}
.small-btn:hover{background:#33413a}
kbd{border:1px solid #a3a29044;border-radius:2px;padding:0 4px;font:inherit;color:#adab9b}
.bottom-bar{display:flex;gap:15px;align-items:end;justify-content:space-between}
#hint{max-width:460px;font-size:.72rem;color:#d5d5c8;line-height:1.8;text-shadow:0 2px 8px #000}
.interaction{background:#101a16eb;border:1px solid #b4aa8a99;padding:13px 21px;min-width:min(330px,65vw);color:var(--paper);text-align:left;display:flex;flex-direction:column;gap:5px}
.interaction strong{font-weight:500}
#subtitle{position:fixed;z-index:5;bottom:120px;left:50%;transform:translateX(-50%);min-width:170px;max-width:min(650px,85vw);padding:12px 18px;text-align:center;font-size:.82rem;line-height:1.5;background:#101816ec;border:1px solid var(--stroke);opacity:0;transition:opacity .2s;pointer-events:none}
#subtitle.show{opacity:1}
.overlay{position:fixed;z-index:15;inset:0;background:#030605e6;display:grid;place-items:center;padding:20px;backdrop-filter:blur(6px)}
.dialog{width:min(720px,96vw);max-height:88vh;overflow:auto;background:#171e1a;border:1px solid #8c8c785f;padding:clamp(20px,4vw,45px);box-shadow:0 20px 80px #000e}
.dialog h2{font-size:clamp(1.45rem,2.7vw,2.2rem);font-weight:400;margin:13px 0 20px}
#modalBody{white-space:pre-wrap;line-height:1.8;font-size:.97rem;color:#dbd9ce}
#modalBody p{margin:0 0 1em}
.dialog-actions{margin-top:27px;display:flex;flex-wrap:wrap;gap:9px}
.primary,.secondary{padding:12px 19px;border:1px solid #c8bd94;letter-spacing:.08em;text-transform:uppercase;font-weight:650;font-size:.76rem}
.primary{background:#c9bea0;color:#17201a}
.secondary{background:transparent;color:#e6dfcc}
.primary:hover{background:#ece0b8}.secondary:hover{background:#465047}
.landing{position:fixed;z-index:20;inset:0;display:flex;align-items:center;padding:clamp(28px,8vw,110px);background:linear-gradient(98deg,#0b1512f4 0%,#101917ec 49%,#060b09a8 100%)}
.landing-inner{max-width:550px}
.landing h2{font-size:clamp(4.2rem,9vw,8.5rem);font-weight:250;line-height:.9;letter-spacing:.04em;margin:28px 0}
.landing h2 em{color:#b8a98e;font-style:normal}
.landing p{line-height:1.85;color:#c9c8ba;max-width:430px;font-size:.94rem}
.landing .fine-print{font-size:.72rem;opacity:.72;margin-top:25px}
.landing button{margin-top:20px}
.error{position:fixed;z-index:100;inset:0;background:#18231f;color:#fff;padding:8vw;white-space:pre-wrap;font:1rem/1.8 ui-monospace,monospace;overflow:auto}
.debug{position:fixed;z-index:14;right:0;top:0;bottom:0;width:min(390px,100vw);overflow:auto;background:#10191af5;border-left:1px solid #526464;padding:18px;font:.8rem/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;color:#d6ddd6;box-shadow:0 0 50px #0009}
.debug h2{font-size:1.04rem;margin:0 0 8px;font-weight:650}
.debug fieldset{border:1px solid #73857d77;padding:12px;margin:13px 0}
.debug legend{padding:0 7px;color:#d2c39e;font-weight:650}
.debug label{display:flex;gap:8px;align-items:center;justify-content:space-between;margin:9px 0}
.debug input[type=number],.debug select,.debug textarea{background:#090f10;color:#e9e6d4;border:1px solid #66756b;min-width:0;padding:6px;max-width:180px}
.debug textarea{max-width:100%;width:100%;min-height:104px;resize:vertical}
.debug button{background:#243833;border:1px solid #74877a;color:#f3eee0;padding:7px 10px;margin:4px 3px 4px 0;font-size:.79rem}
.debug button:hover{background:#38524a}
.debug pre{background:#060d0e;border:1px solid #3c5553;padding:9px;max-height:190px;overflow:auto;white-space:pre-wrap;font-size:.73rem}
.debug .stat{color:#cfbd91;font-size:.77rem;overflow-wrap:anywhere}
.debug .checkbox-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.debug .checkbox-grid label{font-size:.72rem;overflow-wrap:anywhere;justify-content:flex-start}
.debug .toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px}
@media(max-width:760px){nav{max-width:62%}.small-btn{padding:8px;font-size:.66rem}.topbar{gap:10px}.interaction{min-width:190px}#hint{font-size:.69rem}.landing h2{font-size:4.3rem}}
@media(pointer:coarse){#hint:after{content:" Touch and drag the scene to look. Keyboard or external controller required to move."} }
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}

/* Readable text at narrow widths and large zoom: no HUD, dialog, or label overflows. */
.heading,.topbar nav,.bottom-bar>*{min-width:0}
.topbar .heading{flex:1 1 250px;overflow-wrap:anywhere}
.topbar nav{flex:0 1 auto;max-width:min(440px,54vw)}
#location,#clock,#hint,#interactLabel,#subtitle,.eyebrow,.dialog h2,.landing p{overflow-wrap:anywhere}
.bottom-bar{flex-wrap:wrap}
.interaction{min-width:0;width:min(420px,100%);max-width:100%}
#hint{flex:1 1 220px;min-width:0}
.dialog,.landing-inner{min-width:0;max-width:100%;overflow-wrap:anywhere}
#modalBody{overflow-wrap:anywhere;word-break:normal}
#subtitle{width:max-content;max-width:calc(100vw - 32px);white-space:normal}
.landing h2{overflow-wrap:anywhere;max-width:100%}
@media(max-width:760px){
 .topbar{flex-wrap:wrap;gap:9px}
 .topbar nav{max-width:100%;flex:1 1 100%;justify-content:flex-start;gap:5px}
 #hud{padding:clamp(12px,3vw,20px)}
 .landing h2{font-size:clamp(2.8rem,13vw,4.3rem)}
 .interaction{padding:10px 12px}
 #subtitle{bottom:clamp(120px,23vh,200px)}
}
@media(max-width:400px){
 .small-btn{padding:7px 6px;font-size:.63rem}
 .eyebrow{letter-spacing:.10em}
 .dialog{padding:20px 16px}
}

/* The apartment laptop is a usable, keyboard-accessible workstation. */
.computer-mode .dialog{width:min(990px,98vw);padding:clamp(14px,2.5vw,30px);max-height:92vh}
.computer-mode .dialog h2{margin:4px 0 12px;font-size:1.55rem}
.computer-mode #modalBody{white-space:normal;line-height:1.5}
.computer-desktop{background:#101b1d;border:1px solid #607673;padding:clamp(12px,2vw,22px);font-size:.9rem}
.computer-status{color:#b8c9c2;letter-spacing:.07em;font-size:.78rem;margin:0 0 12px}
.computer-tabs{display:flex;flex-wrap:wrap;gap:5px;padding-bottom:12px;border-bottom:1px solid #506764}
.computer-tabs button{padding:8px 12px;font-size:.76rem;letter-spacing:0}
.computer-tabs button[aria-pressed=true]{background:#c9bea0;color:#14201c}
.computer-workspace{min-height:240px;max-height:55vh;overflow:auto;padding:12px 0}
.computer-workspace h3{font-size:1rem;font-weight:600;margin:4px 0 12px}
.computer-workspace h4{font-size:.92rem;font-weight:600;margin:0 0 10px}
.computer-list{display:flex;flex-direction:column;gap:5px;margin-bottom:14px}
.computer-list button{text-align:left;padding:9px 12px;background:#1c302e;color:#e0ece6;border:1px solid #60736a;letter-spacing:0;font-size:.86rem;text-transform:none}
.computer-list button:hover{background:#36504b}
.computer-detail{background:#091310;border:1px solid #445a53;padding:14px;min-height:110px;white-space:pre-wrap;overflow-wrap:anywhere}
.computer-detail p{margin:0 0 14px;line-height:1.65}
.computer-search{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:13px}
.computer-search input,.computer-workspace textarea{color:#eaf0e9;background:#0c1917;border:1px solid #71857c;padding:9px;min-width:0}
.computer-search input{flex:1 1 190px}
.computer-workspace textarea{display:block;width:100%;margin:6px 0 15px;resize:vertical;line-height:1.5}
@media(max-width:600px){.computer-workspace{max-height:52vh}.computer-mode .dialog{max-height:96vh}.computer-tabs button{flex:1 1 27%}.computer-status{letter-spacing:0}}

/* Only show the computer affordance when the player can physically reach the desk. */
.computer-shortcut{background:#111e1bee;color:#f2ead6;border:1px solid #c8bd94;padding:13px 18px;white-space:nowrap;font-size:.83rem;letter-spacing:.04em;font-weight:600}
.computer-shortcut:hover{background:#2b4940}
.computer-shortcut kbd{margin-left:8px}
@media(max-width:760px){.computer-shortcut{padding:11px;font-size:.76rem}}
