*{box-sizing:border-box}body{margin:0;background:#0b0910;color:#e9e5ee;font:15px system-ui,sans-serif}button,input,textarea,select{font:inherit}button{color:#e9e5ee;background:#20192c;border:1px solid #554566;border-radius:6px;padding:10px 14px;cursor:pointer}button:hover,button.active{background:#52366d;border-color:#ac83d0}button:disabled{opacity:.4;cursor:default}#game{max-width:1600px;margin:auto;min-height:100dvh;display:flex;flex-direction:column}header,footer,nav,#actions{display:flex;align-items:center;gap:8px;padding:10px 16px;flex-wrap:wrap;background:#100d17}header{justify-content:space-between}header b{letter-spacing:.25em;font-size:23px}small{display:block;color:#a78bc2;font-size:10px;letter-spacing:.18em}#clock{font-variant-numeric:tabular-nums;color:#d9c4ef}#scene{position:relative;overflow:hidden;isolation:isolate;width:100%;aspect-ratio:16/9;background:#15101d;max-height:70dvh;min-height:280px}#background{position:absolute;width:100%;height:100%;object-fit:cover}#hands{position:absolute;bottom:-5%;left:50%;transform:translateX(-50%);width:60%;height:84%;object-fit:contain;object-position:center bottom;pointer-events:none;transition:opacity .2s,transform .3s}#hands.lift{transform:translate(-50%,-12%) scale(1.07)}#location{position:absolute;left:16px;top:16px;background:#100d17dd;padding:8px 12px;border-left:3px solid #9c76c6}#notice{position:absolute;bottom:12px;left:12px;max-width:75%;background:#100d17db;padding:8px 12px;border-radius:4px}#notice:empty{display:none}#fade{position:absolute;inset:0;background:#000;opacity:0;pointer-events:none;transition:opacity 1s;z-index:5}#fade.sleep{opacity:1}#panel{position:absolute;z-index:4;right:2%;top:5%;width:min(490px,96%);max-height:90%;overflow:auto;background:#15111df5;border:1px solid #77618e;border-radius:10px;padding:18px;box-shadow:0 12px 50px #0009}#panel h2{margin:0 0 12px;font-size:20px}#panel p{line-height:1.55}#panel button{margin:4px 4px 4px 0}#panel label{display:block;margin:10px 0}#panel select,#panel textarea{display:block;width:100%;background:#241c32;color:#fff;border:1px solid #66517f;padding:8px;margin-top:5px}#panel .close{float:right}footer{margin-top:auto}#status{flex:1;color:#b8a7ca}nav{border-bottom:1px solid #332744}#actions{min-height:64px}meter{width:100%;height:22px} @media(max-width:650px){header,footer,nav,#actions{padding:7px;gap:5px}button{padding:8px;font-size:12px}#scene{aspect-ratio:4/3;min-height:320px}#hands{width:85%}#panel{padding:12px;top:3%;max-height:94%}header b{font-size:17px}#clock{font-size:12px}}
/* Foreground sprites are anchored by their wrist edge, not the transparent canvas. */
#scene{container-type:size}
#hands{height:auto;width:auto;max-width:48%;max-height:53%;bottom:-1%;left:50%;object-fit:contain;object-position:center bottom;transform:translateX(-50%)}
#hands[data-pose="idle"]{width:37%;max-height:35%;bottom:-12%;max-width:none;transform:translateX(-50%);transform-origin:center bottom}
#hands[data-pose="coffee"],#hands[data-pose="pen"],#hands[data-pose="flask"],#hands[data-pose="tube"],#hands[data-pose="petri"],#hands[data-pose="pipette"],#hands[data-pose="sample"]{left:72%;max-width:42%;max-height:55%;bottom:-7%}
#hands[data-pose="pen"]{max-height:40%;bottom:-8%;left:65%}
#hands[data-pose="badge"]{left:35%;max-height:58%;bottom:-6%}
#hands[data-pose="case"],#hands[data-pose="flower"]{max-width:57%;max-height:53%;bottom:-6%}
#scene[data-room="lobby"] #hands[data-pose="idle"]{visibility:hidden}
#hands.lift{transform:translate(-50%,-12%) scale(1.07)}
@media(max-width:650px){#hands[data-pose="idle"]{width:55%;bottom:-9%}#hands:not([data-pose="idle"]){max-width:65%;max-height:48%}}

/* Match the desk plane and preserve the original aspect ratio. */
#scene #hands[data-pose="idle"]{width:44%;height:auto;max-height:none;bottom:-13%;left:50%;transform:translateX(-50%);filter:brightness(.76) drop-shadow(0 5px 5px #0008)}
#scene[data-room="meeting"] #hands[data-pose="idle"]{width:43%;bottom:-12%}
#scene[data-room="lab"] #hands[data-pose="idle"]{visibility:hidden}
#scene[data-room="control"] #hands[data-pose="idle"]{width:40%;bottom:-13%}
@media(max-width:650px){#scene #hands[data-pose="idle"]{width:53%;bottom:-8%}}
#hotspots{position:absolute;inset:0;pointer-events:none;z-index:2}.hotspot{position:absolute;pointer-events:auto;background:transparent;border:1px solid transparent;color:transparent;padding:0}.hotspot:hover,.hotspot:focus-visible{background:#a78bc233;border-color:#a78bc2;color:white;text-shadow:0 1px 5px #000}.dim-office[data-room="office"] #background{filter:brightness(.65)}#scene.pc-open #hands,#scene.pc-open #hotspots{visibility:hidden}#computer{position:absolute;inset:2%;z-index:7;background:linear-gradient(145deg,#14101e,#241838);border:1px solid #735b91;border-radius:10px;overflow:hidden;box-shadow:0 10px 60px #000b}#computer:not([hidden]){display:flex;flex-direction:column}.pc-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 14px;background:#100c19;border-bottom:1px solid #4f3d62}.pc-bar span{margin-left:auto;color:#bfa5e1}.pc-body{padding:18px;overflow:auto;flex:1}.pc-body h2{margin-top:0}.pc-body h3{margin:12px 0 5px}.pc-body p{line-height:1.55}.pc-body button{margin:4px}.pc-home>div:first-child{text-align:center;letter-spacing:.35em;color:#a78bc2;font-size:clamp(20px,4vw,48px);margin:18px}.pc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;max-width:760px;margin:auto}.pc-grid button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px}.pc-grid b{font-size:30px;color:#c5a5ec}.pc-split{display:grid;grid-template-columns:minmax(180px,36%) 1fr;gap:16px}.pc-list{display:flex;flex-direction:column}.pc-list button{text-align:left}.pc-body textarea{display:block;width:100%;min-height:75px;background:#1b1429;color:white;border:1px solid #66517f;padding:10px}.camera-feed{max-width:300px;width:100%;border:1px solid #59476c}#reminder{position:fixed;right:18px;top:18px;z-index:30;background:#21172f;border:1px solid #b394d8;border-left:4px solid #b394d8;box-shadow:0 8px 40px #000a;border-radius:8px;padding:14px;max-width:min(360px,92vw)}#reminder p{margin:8px 0}#reminder button{margin-right:5px}@media(max-width:650px){.pc-grid{grid-template-columns:repeat(3,1fr);gap:3px}.pc-grid button{padding:6px}.pc-grid b{font-size:22px}.pc-body{padding:9px}.pc-split{grid-template-columns:1fr}.pc-list{max-height:120px;overflow:auto}.pc-bar{padding:5px}.pc-bar span{font-size:10px}}
#reminder[hidden]{display:none!important}#reminder{top:12px;right:12px;width:300px;padding:13px 15px 11px;background:#1a1424f5;overflow:hidden;font-size:13px;border-left:2px solid #aa86d5}.toast-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;color:#b8a4d2;font-size:10px;letter-spacing:.13em}.toast-head button{padding:1px 6px;background:transparent;border:0;font-size:17px}.toast-actions{display:flex;gap:6px}.toast-actions button{font-size:12px;padding:5px 10px}.toast-progress{position:absolute;bottom:0;left:0;height:2px;background:#a78bc2;animation:toast-expire 6.5s linear forwards;transform-origin:left}@keyframes toast-expire{to{transform:scaleX(0)}}
.mail-app{padding:0;display:flex;flex-direction:column;overflow:hidden}.mail-header{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;background:#21182e;border-bottom:1px solid #49385d}.mail-header strong{font-size:17px;letter-spacing:.12em}.mail-header small{font-size:8px;margin-top:3px}.mail-header>span{font-size:12px;color:#baa6d5}.mail-tabs{display:flex;gap:3px;flex-wrap:wrap;padding:5px 12px;border-bottom:1px solid #49385d}.mail-tabs button{font-size:12px;padding:6px 12px}.mail-search{margin:8px 14px;padding:8px 12px;background:#110d1b;border:1px solid #514064;border-radius:6px;color:#eee;width:calc(100% - 28px)}.mail-layout{display:grid;grid-template-columns:minmax(230px,36%) 1fr;min-height:0;flex:1}.mail-list{overflow:auto;border-right:1px solid #49385d;padding:4px}.mail-row{width:100%;margin:0!important;display:grid;grid-template-columns:33px 1fr;gap:6px 9px;text-align:left;border:0;border-bottom:1px solid #392e49;border-radius:0;background:transparent;padding:10px 8px;position:relative}.mail-row.selected{background:#47345c}.mail-row.unread{background:#2b203d;border-left:2px solid #c09ce9}.mail-avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#534064;color:#eee;font-size:11px}.mail-row>div{min-width:0;display:flex;flex-direction:column;gap:3px}.mail-row strong{font-size:12px}.mail-row>div>span{font-size:12px;color:#e3d6f2}.mail-row small{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;letter-spacing:0;font-size:10px;color:#a89bb8}.mail-row time{grid-column:2;font-size:9px;color:#a99ab9}.mail-page{overflow:auto;padding:16px;background:#181222}.mail-letter{background:#f0edf3;color:#251e30;border-radius:3px;box-shadow:0 6px 20px #0005;padding:clamp(16px,3vw,34px);border-top:5px solid #6e518e}.letter-mark{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:15px;border-bottom:1px solid #cfc5da;color:#5b407a}.letter-mark b{letter-spacing:.23em;font-size:19px}.letter-mark span{font-size:9px;letter-spacing:.09em;text-align:right}.mail-letter h2{margin:20px 0 12px;font-size:22px;line-height:1.2}.letter-meta{font-size:11px;color:#61566d;border-bottom:1px solid #d5ccdf;padding-bottom:10px}.letter-meta p{margin:3px 0;overflow-wrap:anywhere}.letter-content{padding:14px 0;line-height:1.7;font-size:15px}.letter-signature{border-top:1px solid #d5ccdf;padding-top:12px;font-size:12px;color:#534364;white-space:pre-line}.letter-signature p{margin:5px 0}.letter-foot{background:transparent;padding:10px 0 0;margin-top:16px;border-top:1px solid #d5ccdf;font-size:9px;color:#887994;letter-spacing:.08em}.mail-reply{padding:14px 0;display:flex;gap:4px;flex-wrap:wrap}.mail-reply>strong,.mail-reply>p{width:100%}.mail-reply button{font-size:12px}@media(max-width:650px){.mail-layout{grid-template-columns:1fr;grid-template-rows:minmax(80px,30%) 1fr}.mail-list{border-right:0;border-bottom:1px solid #49385d}.mail-page{padding:8px}.mail-header{padding:8px}.mail-header strong{font-size:12px}.mail-letter{padding:14px}.mail-letter h2{font-size:17px}.mail-tabs button{padding:4px 6px;font-size:10px}.mail-search{margin:5px 8px;width:calc(100% - 16px)}}

/* Small point markers, without rectangular interaction overlays. */
#hotspots .hotspot{width:24px;height:24px;min-width:0;min-height:0;padding:0;border:0;border-radius:50%;background:transparent;transform:translate(-50%,-50%);box-shadow:none;color:transparent;display:grid;place-items:center}
#hotspots .hotspot::after{content:'';display:block;width:8px;height:8px;border-radius:50%;background:#f0e9fa;box-shadow:0 0 0 3px #c8a9e85c,0 0 10px #d6b8ff}
#hotspots .hotspot:hover,#hotspots .hotspot:focus-visible{background:transparent;border:0;outline:none}
#hotspots .hotspot:hover::after,#hotspots .hotspot:focus-visible::after{background:white;box-shadow:0 0 0 5px #c8a9e879,0 0 14px #d6b8ff}
#scene:has(#panel:not([hidden])) #hotspots{visibility:hidden}
#main-menu[hidden]{display:none!important}#main-menu{position:fixed;inset:0;z-index:100;background:#0d0915 url('assets/office2.png') center/cover no-repeat;display:flex;align-items:center;justify-content:center;overflow:auto}#main-menu::before{content:'';position:absolute;inset:0;background:#100b18b5;pointer-events:none}.menu-cover{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#09070e}.menu-content{position:relative;z-index:1;width:min(760px,94vw);padding:30px;color:#f1e9fa}.menu-home .menu-content{align-self:flex-end;text-align:center;padding:20px 15px 26px}.menu-logo{display:none}.cover-missing .menu-logo{display:block;margin-bottom:25px}.menu-logo h1{font-family:Georgia,serif;font-size:clamp(35px,8vw,95px);letter-spacing:.18em;margin:10px 0}.menu-logo h2{letter-spacing:.18em;font-weight:400}.menu-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;background:#100b18c9;padding:12px;border:1px solid #6f578d;border-radius:8px}.menu-actions button{min-width:125px;background:#1f162ee8;border:1px solid #7e6698}.menu-rules,.menu-settings{align-items:flex-start!important}.menu-rules .menu-content,.menu-settings .menu-content{margin:24px auto;background:#160f22f5;border:1px solid #65507e;border-radius:10px;line-height:1.6}.menu-content li{margin:10px 0}.menu-content h1{letter-spacing:.06em;font-family:Georgia,serif}.menu-content h2{font-size:19px}
/* Framed opening screen and illustrated briefing, matching the laundry layout. */
#main-menu{background:#0d0915;padding:12px;display:grid;place-items:center}
#main-menu::before{display:none}
.menu-frame{position:relative;width:min(1100px,100%,calc((100dvh - 24px)*1.7778));aspect-ratio:16/9;overflow:hidden;border:1px solid #77618e;background:#160f22 url('assets/office2.png') center/cover no-repeat;box-shadow:0 12px 50px #0009}
.menu-home .menu-frame::after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#0d0915ed 0%,#0d0915b0 25%,#0d091500 55%);pointer-events:none}
.menu-cover{object-fit:cover}
.menu-home .menu-content{position:absolute;z-index:3;left:5%;top:50%;transform:translateY(-50%);width:24%;padding:0;text-align:left}
.menu-home .menu-actions{display:grid;grid-template-columns:1fr;gap:7px;padding:0;border:0;background:transparent}
.menu-home .menu-actions button{width:100%;min-width:0;text-align:left;border-radius:4px;padding:clamp(7px,1vw,13px);font-weight:bold;background:#21182ee8}
.menu-home .menu-actions button:first-child{background:#c2aedb;color:#1b1128}
.menu-home.cover-missing .menu-content{width:45%}
.menu-rules .menu-frame::before,.menu-settings .menu-frame::before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#100b18f5,#100b18d9 45%,#100b1833);pointer-events:none}
#main-menu.menu-rules,#main-menu.menu-settings{align-items:center!important}
.menu-rules .menu-content,.menu-settings .menu-content{position:absolute;inset:0;margin:0;width:100%;padding:clamp(14px,3vw,34px);background:none;border:0;display:flex;flex-direction:column;justify-content:space-between}
.tutorial-top,.tutorial-nav{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tutorial-card{max-width:60%;padding:16px 0;overflow:auto}
.tutorial-card h1{font-size:clamp(19px,3vw,38px);margin:0 0 15px}
.tutorial-card p{font-size:clamp(13px,1.8vw,20px);line-height:1.55}
.tutorial-nav span{color:#c3a9dc;font-size:13px}
@media(max-width:600px) and (orientation:portrait){.menu-frame{width:100%;min-height:75dvh;aspect-ratio:auto}.menu-cover{object-fit:contain;object-position:center 25%}.menu-home .menu-frame::after{background:linear-gradient(0deg,#0d0915 0%,#0d0915 34%,transparent 65%)}.menu-home .menu-content{top:auto;bottom:5%;left:8%;width:84%;transform:none}.tutorial-card{max-width:100%;background:#160f22c9;padding:12px}.menu-rules .menu-frame::before{background:#100b1888}}
.menu-rules .tutorial-card{max-width:76%;min-height:0;flex:1;margin:8px 0;padding:12px 18px;background:#100b18b8;border:1px solid #66517f;border-radius:5px}
.menu-rules .tutorial-card h1{font-size:clamp(18px,2.4vw,30px);margin:0 0 8px}
.menu-rules .tutorial-card p{white-space:pre-line;font-size:clamp(11px,1.25vw,16px);line-height:1.45;margin:0}
@media(max-width:600px){.menu-rules .tutorial-card{max-width:100%;padding:10px}}
.menu-home .menu-content{pointer-events:auto}
.menu-rules .menu-content,.menu-confirm .menu-content{box-sizing:border-box;height:100%;min-height:0}
.menu-rules .tutorial-nav,.menu-rules .tutorial-top{flex-shrink:0;position:relative;z-index:5}
.menu-confirm .menu-content{position:relative;margin:auto;background:#160f22ef;border:1px solid #66517f;padding:24px;width:min(560px,90%);top:50%;transform:translateY(-50%)}
/* Explicit viewport dimensions: grid intrinsic sizing must not collapse the frame. */
#main-menu{display:flex;align-items:center;justify-content:center}
#main-menu .menu-frame{flex:none;width:min(1100px,calc(100vw - 24px),calc((100dvh - 24px)*16/9));height:auto;aspect-ratio:16/9;min-width:0;min-height:0}
@media(max-width:600px) and (orientation:portrait){#main-menu .menu-frame{width:calc(100vw - 24px);height:calc(100dvh - 24px);aspect-ratio:auto}}
/* Keep the background and all foreground anchors in one fixed 16:9 coordinate space. */
#game #scene{flex:none;align-self:center;width:min(100%,calc(70dvh * 16 / 9));height:auto;min-height:0;max-height:none;aspect-ratio:16/9}
#game #background{inset:0;object-fit:fill}
@media(max-width:650px){#game #scene{width:100%;height:auto;min-height:0;aspect-ratio:16/9}#scene #hands[data-pose="idle"]{width:44%;bottom:-13%}#scene[data-room="meeting"] #hands[data-pose="idle"]{width:43%;bottom:-12%}#scene[data-room="control"] #hands[data-pose="idle"]{width:40%;bottom:-13%}#scene #hands:not([data-pose="idle"]){max-height:53%}}
/* Howard's eyesight: interfaces remain readable so glasses can always be put back on. */
#scene #background,#scene #hands{transition:filter .25s ease}
#scene.glasses-off #background{filter:blur(9px);transform:scale(1.035)}
#scene.glasses-off.dim-office[data-room="office"] #background{filter:brightness(.65) blur(9px)}
#scene.glasses-off #hands{filter:blur(3px)}
#scene.glasses-off #hotspots{filter:blur(2px)}
#glasses-button[aria-pressed="true"]{border-color:#b69bd4;background:#49345e}
#howard-speech{display:flex;align-items:center;gap:12px;width:min(100%,calc(70dvh * 16 / 9));align-self:center;flex:none;min-height:64px;padding:7px 12px;background:#1a1424;border-top:1px solid #463456}
#howard-speech img{width:50px;height:50px;flex:none;object-fit:cover;object-position:center;border:1px solid #68517e;border-radius:3px}
#howard-speech b{display:block;color:#bda0db;font-size:10px;letter-spacing:1.6px;margin-bottom:4px}
#howard-speech #howard-line{font-size:14px}
@media(max-width:650px){#howard-speech{width:100%;padding:5px 8px;min-height:54px;font-size:12px}#howard-speech img{width:42px;height:42px}}
#howard-speech img{width:44px;height:54px;object-fit:contain;object-position:center;background:#17121e}
@media(max-width:650px){#howard-speech img{width:36px;height:45px}}
.warlock-audio-settings{display:grid;gap:8px;max-width:560px;width:100%;margin:12px auto;overflow:auto;min-height:0}.warlock-audio-settings label{display:grid;grid-template-columns:minmax(90px,1fr) minmax(70px,1.5fr) 42px;align-items:center;gap:8px;font-size:13px}.warlock-audio-settings input{width:100%;accent-color:#b89bd6}.warlock-audio-settings button{margin:0}.menu-settings .menu-content{overflow:auto;justify-content:flex-start;gap:6px}.menu-settings .menu-content>button{flex-shrink:0;align-self:flex-start}.menu-settings .menu-content h1{margin:6px 0}
/* Preserve motion as well as vision transitions; the former filter-only declaration disabled movement. */
#scene #hands{transition:filter .25s ease,transform .35s ease,opacity .2s ease}
#scene #hands.lift{transform:translate(-50%,-12%) scale(1.07)}
#scene #hands[data-pose="coffee"].coffee-motion{animation:howard-sip 2.8s ease-in-out both;transform-origin:50% 65%}
#scene #hands[data-pose="coffee"].coffee-putdown{animation:howard-cup-away .7s ease-in both}
#game.vision-blur #panel,#game.vision-blur #computer,#game.vision-blur #notice,#game.vision-blur #location,#game.vision-blur #howard-speech,#game.vision-blur #clock,#game.vision-blur #status,#game.vision-blur #reminder{filter:blur(4px)}
#game.vision-blur header button:not(#glasses-button),#game.vision-blur #rooms,#game.vision-blur #actions,#game.vision-blur footer button{filter:blur(2.5px)}
#game #glasses-button{position:relative;z-index:31;filter:none}
/* Compact, always visible status dashboard above the room scene. */
#status{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 18px;flex:none;width:100%;padding:8px 16px 10px;background:#100d17;border-top:1px solid #2c2338;border-bottom:1px solid #392c47;font-size:12px;color:#ddd4e7}
.status-item{min-width:0;--metric-color:#aa86ce}
.status-item[data-metric="fatigue"]{--metric-color:#d1a069}
.status-item[data-metric="loyalty"]{--metric-color:#81b49a}
.status-item[data-metric="reputation"]{--metric-color:#b29bd4}
.status-item[data-level="warning"]{--metric-color:#d5a367}
.status-item[data-level="critical"]{--metric-color:#e57980}
.status-label{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:5px;line-height:1.2}
.status-number{color:var(--metric-color);font-variant-numeric:tabular-nums;font-weight:650;flex:none}
.status-track{height:5px;background:#302639;border-radius:4px;overflow:hidden}
.status-fill{height:100%;width:0;background:var(--metric-color);border-radius:4px;transition:width .3s ease,background .25s ease}
footer{justify-content:flex-end}
@media(max-width:700px){#status{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 14px;padding:7px 12px;font-size:11px}}
/* Desktop: use the space alongside the fixed-ratio first-person scene. */
#game-layout{display:grid;grid-template-columns: minmax(155px,1fr) minmax(0,5fr) minmax(155px,1fr);align-items:start;gap:12px;padding:12px;flex:1;min-width:0}
#game-center{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;align-self:start}
#game #game-center #scene,#game-center #howard-speech{width:100%;max-width:100%}
.game-sidebar{display:flex;flex-direction:column;gap:8px;min-width:0;padding:12px;background:#15101e;border:1px solid #392c47;border-radius:6px;max-height:calc(100dvh - 90px);overflow:auto}
.game-sidebar h2{font-size:11px;text-transform:uppercase;letter-spacing:1.5px;color:#bda0db;margin:4px 0}
#left-sidebar #status{grid-template-columns:1fr;padding:0 0 12px;gap:12px;border:0;background:transparent}
#left-sidebar #rooms,#right-sidebar #actions,#quick-controls,#right-sidebar footer{display:grid;grid-template-columns:1fr;gap:7px;padding:0;margin:0;background:transparent}
.game-sidebar button{width:100%;min-width:0;text-align:left;padding:9px 10px;font-size:13px;white-space:normal;line-height:1.2}
#right-sidebar footer{margin-top:5px;border-top:1px solid #392c47;padding-top:10px}
#game.vision-blur #quick-controls button:not(#glasses-button){filter:blur(2.5px)}
@media(min-width:1000px){#game{max-width:none}#game-layout{grid-template-columns:minmax(155px,1fr) minmax(0,min(calc(100vw - 350px),calc((100dvh - 140px)*16/9))) minmax(155px,1fr);gap:10px;padding:10px}#game-center #howard-speech{min-height:60px}}
@media(max-width:999px) and (min-width:761px){#game-layout{grid-template-columns:140px minmax(0,1fr) 140px;gap:6px;padding:6px}.game-sidebar{padding:7px}.game-sidebar button{font-size:12px;padding:7px}}
@media(max-width:760px){#game-layout{display:flex;flex-direction:column;gap:0;padding:0}.game-sidebar{display:contents}#game-layout h2{display:none}#left-sidebar #status{order:0;width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 14px;padding:7px 12px;background:#100d17}#game-center{order:1;width:100%}#left-sidebar #rooms{order:2}#right-sidebar #actions{order:3}#quick-controls{order:4}#right-sidebar footer{order:5}#left-sidebar #rooms,#right-sidebar #actions,#quick-controls,#right-sidebar footer{display:flex;flex-wrap:wrap;width:100%;padding:7px 9px;gap:5px;background:#100d17} .game-sidebar button{width:auto;font-size:12px;padding:8px 10px}#game-center #howard-speech{width:100%}}
/* Coffee: small movement toward the viewer, with no sudden giant zoom. */
#scene #hands[data-pose="coffee"]{left:72%;bottom:-7%;transform-origin:50% 80%}
@keyframes howard-sip{0%{transform:translate(-50%,35%) scale(.98)}18%{transform:translate(-50%,0) scale(1)}34%,49%{transform:translate(-57%,-15%) scale(1.09)}70%,100%{transform:translate(-50%,0) scale(1)}}
@keyframes howard-cup-away{from{transform:translate(-50%,0);opacity:1}to{transform:translate(-50%,50%);opacity:0}}
.mail-group-label{font-size:10px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:#b9a2d0;padding:9px 10px 6px;background:#1a1424;border-bottom:1px solid #392e49}
.mail-row.priority.unread{border-left:3px solid #d6a367;background:#382b31}
.mail-row.priority.selected{background:#493549}
.mail-row .mail-priority-label{color:#e6b781;font-weight:750;letter-spacing:.08em;font-size:9px}
.letter-priority{background:#f6e8d5;color:#754616;border-left:3px solid #c38a46;padding:8px 10px;font-size:11px;font-weight:650}
.mail-tabs{flex-wrap:wrap}
#panel.lab-summary-panel{width:min(560px,96%);padding:12px;max-height:94%;top:3%}
.lab-sheet{color:#302a35;background:#f2eff1;border:1px solid #d5cbd6;padding:14px 16px;font-size:12px;line-height:1.35;box-shadow:0 3px 12px #0002}
.lab-sheet-head{display:flex;justify-content:space-between;align-items:center;gap:6px;border-bottom:2px solid #47334f;padding-bottom:8px;margin-bottom:10px}
.lab-sheet-head strong{font-size:16px;letter-spacing:3px;color:#392643}
.lab-sheet-head small{color:#6e5279;font-size:9px;letter-spacing:.06em}
.lab-sheet h3{margin:10px 0 5px;color:#3e294c;font-size:14px}
.lab-sheet p{margin:5px 0}
.lab-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:10px 0}
.lab-metrics>div{background:#e5dce9;padding:8px;display:grid;gap:3px}
.lab-metrics small{font-size:10px;color:#624c70;letter-spacing:0}
.lab-metrics strong{font-size:15px}
.lab-metrics span{font-size:11px;color:#624c70}
.lab-readings{border-left:3px solid #9176a6;background:#e9e3eb;padding:8px;margin:8px 0}
#panel .lab-sheet label.lab-check,.lab-sheet label.lab-check{display:flex;align-items:center;gap:8px;margin:7px 0;cursor:pointer}
.lab-check input{width:16px;height:16px;flex:none;accent-color:#624477}
#panel .lab-sheet select,#panel .lab-sheet textarea{color:#302a35;background:#fff;border:1px solid #b1a1b6;font-size:12px}
#panel .lab-sheet textarea{min-height:44px}
.lab-sign-warning{color:#e9b18a;font-size:12px}
#panel.lab-summary-panel>button:last-child{width:100%;margin:8px 0 0}
.finance-app{font-size:12px}.fin-top{display:flex;justify-content:space-between;align-items:center;padding:12px;background:#21172e;border-bottom:1px solid #554268}.fin-top strong{letter-spacing:1.6px}.fin-top small{font-size:10px;color:#bba5d0}.fin-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(125px,1fr));gap:7px;margin:12px 0}.fin-totals>div{display:grid;gap:6px;padding:10px;border:1px solid #51405f;background:#251c32}.fin-totals strong{font-size:18px}.fin-totals small{font-size:10px;color:#bda9d1}.fin-dept,.fin-request{padding:10px 12px;border:1px solid #483752;background:#21182c;margin:8px 0}.fin-dept-head{display:flex;justify-content:space-between;gap:8px}.fin-bar{height:6px;background:#100c17;border-radius:4px;margin:8px 0}.fin-bar>div{background:#a27bc9;height:100%;border-radius:4px}.fin-bar>div.fin-danger{background:#d37a78}.fin-controls{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.fin-controls input{width:100px;padding:6px;color:#e9e5ee;background:#15101e;border:1px solid #6b547a;border-radius:4px}.fin-controls button{font-size:11px;padding:6px 9px}.fin-danger,.fin-feedback{color:#f0a09c!important}.fin-ledger{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid #392e49;padding:7px 0}.fin-ledger b{white-space:nowrap}.fin-request p{margin:6px 0}
.agenda-row{border:1px solid #554268;background:#21182c;padding:9px;margin:6px 0;display:flex;flex-wrap:wrap;align-items:center;gap:7px}.agenda-row strong{flex:1 1 60%}.agenda-row small{color:#b6a4ca}.meeting-form{display:grid;gap:8px}.meeting-form input:not([type=checkbox]),.meeting-form select,.meeting-form textarea{width:100%;background:#15101e;color:#eee;border:1px solid #6b547a;padding:8px}.meeting-form label{display:flex;gap:8px;align-items:center}#campaign-toast{position:fixed;right:16px;top:65px;z-index:90;width:min(320px,calc(100vw - 32px));padding:12px 38px 12px 14px;background:#20182c;border:1px solid #765a91;border-radius:8px;box-shadow:0 6px 25px #0008;pointer-events:auto}#campaign-toast[hidden]{display:none}#campaign-toast small,#campaign-toast strong{display:block}#campaign-toast small{color:#c6a9e3;margin-bottom:5px;font-size:11px}#campaign-toast button{position:absolute;right:6px;top:6px;padding:4px 8px}
.os-desktop{background:linear-gradient(135deg,#15131b,#261d35);padding:16px}.os-welcome small{letter-spacing:.16em;color:#b29acb}.os-welcome h2{margin:8px 0}.os-welcome p{margin:3px 0}.os-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:12px 0}.os-summary button{margin:0;text-align:left;display:grid;gap:6px;padding:12px;min-width:0}.os-summary small{color:#c0accf}.os-summary strong{font-size:14px;overflow-wrap:anywhere}.os-apps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:12px 0}.os-apps button{margin:0;min-width:0;display:grid;place-items:center;gap:6px;padding:12px 4px;font-size:12px}.os-apps b{font-size:26px;color:#c5a5ec}.os-personal b{color:#d8b67e}.os-mail{padding:16px;overflow:auto;display:block}.os-mail-row{display:grid;width:100%;text-align:left;gap:5px;margin:0 0 5px!important;border-radius:4px;padding:12px}.os-mail-row.unread{border-left:3px solid #c09ce9;background:#30243e}.os-mail-row small{color:#c7aedf}.os-mail-row strong{font-size:15px}.os-mail-row span{color:#c6bdcf;font-size:12px}.os-letter{background:#f4f1f5;color:#272330;padding:clamp(16px,3vw,32px);max-width:760px;margin:10px auto;border-top:4px solid #71548c;border-radius:4px}.os-letter h2{font-size:23px;margin:12px 0}.os-letter p{font-size:16px;line-height:1.75;white-space:pre-wrap}.os-letter small{color:#6b517e;letter-spacing:.1em}.city-news{background:#f4f0e7;color:#232323}.city-news>div:first-child{background:#dedbd5;padding:7px;color:#444;font-size:12px}.city-news h1{font-family:Georgia,serif;font-size:clamp(22px,3vw,40px);margin:12px 0}.city-news>p{font-size:16px;line-height:1.7}.news-story{width:100%;display:grid;gap:7px;text-align:left;margin:0 0 8px!important;background:#fffdf7;color:#222;border:1px solid #d5cdbf;padding:14px}.news-story strong{font-family:Georgia,serif;font-size:19px}.news-story small{color:#805943}.news-story span{font-size:13px;color:#4f4b47}.personal-grid,.camera-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.personal-grid button,.camera-grid button{display:grid;gap:6px;text-align:left;margin:0}.personal-grid img,.camera-grid img{width:100%;height:auto;object-fit:contain}.personal-full{display:block;max-width:100%;max-height:70vh;margin:12px auto;object-fit:contain}@media(max-width:650px){.os-apps{grid-template-columns:repeat(3,minmax(0,1fr))}.os-summary{grid-template-columns:1fr}.os-summary button{padding:7px}.os-desktop,.os-mail{padding:8px}}
#scene.incident-dark #background{filter:brightness(.46)}.incident-panel{overflow:auto;max-height:94%}.incident-panel small{color:#c7acd9}.incident-row{display:grid!important;gap:4px;text-align:left;width:100%;margin:5px 0!important;padding:9px!important}.incident-row span{font-size:11px;color:#cbb6df}.incident-row strong{font-size:14px}#campaign-toast:has(button:nth-of-type(2)){padding-bottom:42px}#campaign-toast button:nth-of-type(2){top:auto;bottom:6px;right:10px;font-size:11px}#incident-button{overflow-wrap:anywhere}
.tower-panel{max-height:94%;overflow:auto}.tower-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.tower-grid>div{display:grid;gap:6px;background:#21182e;border:1px solid #685080;padding:10px}.tower-grid strong{font-size:20px;color:#d4b9f1}.tower-grid meter{width:100%}.tower-grid small{font-size:11px;color:#c8b2db}.tower-panel label{display:grid;gap:5px;margin:8px 0}.tower-panel select{background:#1e1729;color:white;padding:8px;border:1px solid #755c91}.os-letter p{white-space:pre-wrap;line-height:1.7}.os-letter small{display:block;line-height:1.5}@media(max-width:650px){.tower-grid strong{font-size:14px}.tower-grid>div{padding:5px}.tower-grid small{font-size:9px}}
.os-mail-row.corp-important{border-left:3px solid #df9652;background:#39291f}.os-mail-row.corp-important small{color:#f3ae6d}.os-letter.corp-important-letter{border-top-color:#db8b43}.connect-channel{display:grid!important;gap:5px;width:100%;text-align:left;margin:6px 0!important;padding:12px!important}.connect-channel small{color:#c3b0d6}.connect-channel.corp-pending{border-left:3px solid #e5a05e}.connect-message{padding:10px;margin:8px 0;background:#282031;border:1px solid #493859;border-radius:6px}.connect-message small{color:#c8a8e7}.connect-message p{margin:6px 0;font-size:14px}#scene #panel.conference-panel{position:absolute;top:auto;bottom:0;left:0;right:0;transform:none;width:100%;max-width:none;max-height:58%;padding:10px 15px;background:rgba(25,19,34,.97);border:0;border-top:1px solid #8d70ae;border-radius:0;overflow:auto;box-shadow:0 -6px 24px #0006}.conference-head{display:flex;align-items:center;gap:8px}.conference-head small{flex:1;color:#baa5cd}.conference-head button,.conference-actions button{font-size:12px;padding:6px 9px;margin:2px}.conference-text{padding:7px 0}.conference-text strong,.conference-text small{display:block}.conference-text strong{font-size:16px;color:#d2b4f3}.conference-text small{font-size:11px;color:#ad9cbc}.conference-text p{margin:7px 0;font-size:15px;line-height:1.45}.conference-actions{display:flex;flex-wrap:wrap;gap:4px}@media(max-width:650px){#scene #panel.conference-panel{max-height:76%;padding:5px 8px}.conference-text p{font-size:12px}.conference-text strong{font-size:13px}.conference-head button,.conference-actions button{font-size:10px;padding:4px 5px}}
#panel.live-monitor-panel{width:96%;max-height:94%;top:3%;right:2%;padding:12px}.field-tabs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:8px}.field-tabs button{font-size:12px;padding:6px 9px}#live-field-graph{display:block;width:100%;height:auto;max-height:180px;background:#100d18;margin:5px 0}.field-attachments{border:1px solid #66517f;padding:9px;margin:10px 0}.field-attachments button{display:block;margin:4px 0}#game-center>#panel.conference-docked{position:relative!important;inset:auto!important;transform:none!important;width:100%!important;max-width:none!important;max-height:230px!important;flex:none;overflow:auto;background:#21182c;border:1px solid #755c91;border-radius:0;padding:9px 14px;box-shadow:none;z-index:4}#game-center:has(>#panel.conference-docked:not([hidden])) #howard-speech{display:none}#game-center:has(>#panel.conference-docked:not([hidden])) #scene{max-height:calc(100dvh - 340px)}@media(max-width:760px){#game-center:has(>#panel.conference-docked:not([hidden])) #scene{min-height:180px;max-height:32dvh}#game-center>#panel.conference-docked{max-height:230px!important}}
#panel.study-panel{width:96%;max-height:94%;top:3%;right:2%}.study-row{border:1px solid #554566;border-radius:6px;padding:8px;margin:6px 0}.study-row strong{display:block;color:#d4b9ed;margin:3px 0}.study-row button{font-size:12px;padding:6px 8px}
.save-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%;margin-top:16px}.save-slot{background:#21182de8;border:1px solid #6d5589;border-radius:9px;padding:14px;display:flex;flex-direction:column;gap:8px}.save-slot h2{font-size:18px;margin:0;color:#e3c9f8}.save-slot p{font-size:12px;margin:0;color:#bba9cc}.save-slot button{margin-top:auto}.menu-slots .menu-content{width:100%;max-width:100%;padding:20px;overflow:auto}.menu-slots .menu-frame{background:linear-gradient(145deg,#191323,#322043)}@media(max-width:650px){.save-slots{grid-template-columns:1fr}.menu-slots .menu-content{padding:10px}.save-slot{padding:10px}}
#rooms button.room-needs-attention{position:relative;border-color:#d39254;padding-right:29px}#rooms button .room-alert{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:#ec9b50;color:#21140b;width:17px;height:17px;border-radius:50%;font-size:12px;line-height:17px;font-weight:800;text-align:center;box-shadow:0 0 8px #e7a05466}.unified-schedule .schedule-task{padding:8px 10px;border-left:2px solid #645278;margin:6px 0;background:#251d30}.unified-schedule .schedule-due{border-color:#e39c58;color:#f0bb88}.unified-schedule .schedule-complete{opacity:.7}
.overview-box{background:#251c32;border:1px solid #695482;padding:12px;border-radius:8px;margin:9px 0;color:#e6d9f3}.overview-row{display:flex;justify-content:space-between;align-items:start;gap:12px;padding:7px 0;border-bottom:1px solid #493957;font-size:13px}.overview-row b{text-align:right;color:#e9d7fc}.overview-box p{font-size:13px;color:#d4b8ea}.menu-day-end .menu-frame{background:linear-gradient(145deg,#191323,#322043)}.menu-day-end .menu-content{width:100%;max-width:620px;overflow:auto;padding:20px}.menu-day-end .overview-box{width:100%}
/* Desktop/tablet sidebar: the whole column scrolls, never individual flex children. */
#header-controls{display:flex;align-items:center;gap:8px;flex-shrink:0}#header-controls #training-finish{background:#52366d;border-color:#ac83d0;font-size:13px;padding:8px 12px}
#right-sidebar{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;min-height:0;max-height:calc(100dvh - 84px);scrollbar-width:thin;scrollbar-color:#66517f transparent;overscroll-behavior:contain}
#right-sidebar>h2,#right-sidebar>#actions,#right-sidebar>#quick-controls,#right-sidebar>footer{flex:0 0 auto;min-height:0;position:static}
#right-sidebar button{min-height:34px;height:auto;overflow-wrap:anywhere}
#left-sidebar>*{flex-shrink:0}
#device-notice:not([hidden]){position:fixed;inset:0;z-index:9999;background:#15101e;display:grid;place-items:center;padding:24px;text-align:center}#device-notice>div{max-width:480px}#device-notice h1{font-size:24px;color:#dac4f4}#device-notice p{line-height:1.55;color:#cbbbdc}.phone-blocked #game,.phone-blocked #main-menu{visibility:hidden}
@media(min-width:600px) and (max-width:999px){#game-layout{display:grid;grid-template-columns:130px minmax(0,1fr) 145px;gap:6px;padding:6px;align-items:start}#game-layout .game-sidebar{display:flex;flex-direction:column;max-height:calc(100dvh - 78px);padding:7px;overflow:auto}#game-layout .game-sidebar>h2{display:block}#left-sidebar #status{display:grid;grid-template-columns:1fr;padding:0;width:auto}#left-sidebar #rooms,#right-sidebar #actions,#quick-controls,#right-sidebar footer{display:grid;grid-template-columns:1fr;width:auto;gap:6px;padding:0;background:transparent}#game-layout .game-sidebar button{width:100%;font-size:12px;padding:7px 8px}#game-center{width:100%;min-width:0}#game-center #scene{aspect-ratio:16/9;min-height:0;height:auto}#game-layout #panel h2,#game-layout .pc-body h2{display:block}}
#book-overlay[hidden]{display:none!important}#book-overlay{position:absolute;inset:0;z-index:16;background:#0b0810b8;display:flex;align-items:center;justify-content:center;padding:12px}#scene.book-open #hands,#scene.book-open #hotspots{visibility:hidden}.reading-book{width:min(650px,96%);max-height:96%;overflow:auto;background:#ede4cf;color:#322b25;border:7px solid #392e37;border-radius:4px;padding:clamp(16px,3vw,34px);box-shadow:0 12px 45px #000b;font-family:Georgia,serif}.book-heading,.book-nav{display:flex;align-items:center;justify-content:space-between;gap:12px}.reading-book small{color:#665747;letter-spacing:.08em;font-family:system-ui,sans-serif}.reading-book h2{font-size:clamp(18px,2.4vw,27px);margin:22px 0 12px}.reading-book p{font-size:clamp(15px,1.7vw,20px);line-height:1.75}.reading-book button{background:#d9cbb4;color:#352a25;border-color:#a89a87;padding:7px 12px}.book-nav{border-top:1px solid #b8a98e;margin-top:18px;padding-top:12px;font-size:13px}.book-anomaly{color:#713c55;font-style:italic}#game.vision-blur #book-overlay .reading-book{filter:blur(4px)}
.bookshelf .book-choice{display:block;width:100%;text-align:left;margin:10px 0;padding:16px;background:#d9cbb4}.bookshelf .book-choice strong{display:block;font-family:Georgia,serif;font-size:19px;margin-bottom:8px}.bookshelf .book-choice small{letter-spacing:0}.reading-book>.book-heading+small{margin-top:18px}
/* Release touch layout: safe areas and full-screen readable dialogs. */
#install-app{position:fixed;z-index:101;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));background:#513b70;color:#f2e7ff;font-size:12px;padding:8px 12px}
#install-app[hidden],#install-guide[hidden]{display:none!important}
#install-guide{position:fixed;inset:0;z-index:10001;background:#100b18ee;display:grid;place-items:center;padding:16px;overflow:auto}#install-guide>div{max-width:520px;max-height:100%;overflow:auto;background:#21182e;border:1px solid #735b91;border-radius:10px;padding:20px;line-height:1.55}#install-guide a{display:block;color:#dac4f4;overflow-wrap:anywhere;margin:12px 0}#install-guide button{margin:4px}
.phone-device #game,.tablet-device #game{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);max-width:none}
.phone-device #game-layout{display:grid;grid-template-columns:112px minmax(0,1fr) 132px;gap:5px;padding:5px;align-items:start}
.phone-device #game-layout .game-sidebar{display:flex;flex-direction:column;gap:5px;padding:6px;max-height:none;overflow:visible}
.phone-device #game-layout .game-sidebar>h2{display:block;font-size:9px;margin:2px 0}
.phone-device #left-sidebar #status{display:grid;grid-template-columns:1fr;padding:0;width:auto;font-size:10px;gap:5px}
.phone-device #left-sidebar #rooms,.phone-device #right-sidebar #actions,.phone-device #quick-controls,.phone-device #right-sidebar footer{display:grid;grid-template-columns:1fr;width:auto;gap:4px;padding:0;background:transparent}
.phone-device #game-layout .game-sidebar button{width:100%;font-size:11px;padding:7px 5px;min-height:32px}
.phone-device #game header{position:sticky;top:env(safe-area-inset-top);z-index:19;padding:5px 8px;gap:5px;flex-wrap:nowrap}
.phone-device #game header b{font-size:16px}.phone-device #game header small{font-size:7px}.phone-device #clock{font-size:11px}.phone-device #header-controls{gap:4px}.phone-device #header-controls button{font-size:11px;padding:6px 7px}
.phone-device #game-center{width:100%;min-width:0}.phone-device #game #game-center #scene{width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:16/9}
.phone-device #game-center #howard-speech{min-height:42px;padding:5px;font-size:11px}.phone-device #howard-speech img{width:28px;height:35px}
.phone-device #panel:not(.conference-docked),.phone-device #computer,.phone-device #book-overlay{position:fixed!important;inset:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;z-index:50!important;transform:none!important;overflow:auto}
.phone-device #scene:has(#panel:not([hidden])),.phone-device #scene.pc-open,.phone-device #scene.book-open{isolation:auto;overflow:visible;z-index:40}
.phone-device #panel:not(.conference-docked){padding:12px}.phone-device #panel h2,.phone-device #game-layout .pc-body h2{display:block}
.phone-device #computer{overflow:hidden}.phone-device .pc-body{min-height:0;overflow:auto;font-size:13px}.phone-device .pc-bar{padding:5px;flex-wrap:nowrap}.phone-device .pc-bar button{padding:6px;font-size:11px}.phone-device .os-apps{grid-template-columns:repeat(5,minmax(0,1fr))}.phone-device .os-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
.phone-device #game-center>#panel.conference-docked{max-height:none!important;padding:7px!important;overflow:visible!important}.phone-device .conference-text p{font-size:13px;line-height:1.45}.phone-device .conference-actions button{font-size:11px;padding:7px 5px;min-height:32px}.phone-device #game-center:has(>#panel.conference-docked:not([hidden])) #scene{max-height:none;min-height:0}
.phone-device #main-menu .menu-frame{width:calc(100vw - 16px);height:calc(100dvh - 16px);aspect-ratio:auto}
.phone-device #main-menu .menu-content{max-height:100%;overflow:auto;padding:12px;gap:5px}.phone-device .menu-home .menu-content{max-width:55%}.phone-device .menu-logo h1{font-size:clamp(22px,6vw,42px)}.phone-device .menu-logo h2{font-size:14px}.phone-device .menu-logo p{font-size:11px}.phone-device .menu-actions{gap:5px}.phone-device .menu-actions button{padding:7px;font-size:12px}.phone-device .tutorial-card{max-height:calc(100dvh - 100px);overflow:auto}.phone-device .tutorial-card p{font-size:12px;line-height:1.4}.phone-device .save-slots{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.phone-device .save-slot{padding:7px}.phone-device .save-slot h2{font-size:13px}
.tablet-device #game-layout{grid-template-columns:minmax(125px,15%) minmax(0,1fr) minmax(135px,17%);align-items:start}.tablet-device #game-layout .game-sidebar{max-height:calc(100dvh - 84px);overflow:auto}.tablet-device #game-center #scene{width:100%;max-height:none}
@media (orientation:portrait){.tablet-device #game-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}.tablet-device #left-sidebar{grid-column:1;grid-row:2}.tablet-device #right-sidebar{grid-column:2;grid-row:2}.tablet-device #game-center{grid-column:1/-1;grid-row:1;width:100%}.tablet-device #game-layout .game-sidebar{display:flex;max-height:none;overflow:visible}.tablet-device #game-layout .game-sidebar>h2{display:block}.tablet-device #main-menu .menu-frame{width:calc(100vw - 20px);height:calc(100dvh - 20px);aspect-ratio:auto}.tablet-device #main-menu .menu-content{max-height:95%;overflow:auto}.tablet-device .menu-home .menu-content{top:auto;bottom:5%;left:8%;width:84%;transform:none}.tablet-device .menu-home .menu-frame::after{background:linear-gradient(0deg,#0d0915 0%,#0d0915 40%,transparent 75%)}}
.tablet-device #panel:not(.conference-docked),.tablet-device #computer,.tablet-device #book-overlay{position:fixed!important;inset:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))!important;width:auto!important;max-width:none!important;max-height:none!important;height:auto!important;transform:none!important;z-index:50!important}.tablet-device #scene:has(#panel:not([hidden])),.tablet-device #scene.pc-open,.tablet-device #scene.book-open{isolation:auto;overflow:visible;z-index:40}.tablet-device #panel:not(.conference-docked){overflow:auto}
.phone-device #right-sidebar>h2,.phone-device #right-sidebar>#actions,.phone-device #right-sidebar>#quick-controls,.phone-device #right-sidebar>footer{flex:0 0 auto;min-height:max-content}
.phone-device #right-sidebar>h2{position:static;transform:none}.phone-device #right-sidebar #actions{align-items:stretch}
.phone-device #right-sidebar{overflow:visible!important}
.phone-device #install-app{bottom:max(5px,env(safe-area-inset-bottom));right:max(5px,env(safe-area-inset-right))}
/* Tablet: lock the app viewport; only individual content surfaces scroll. */
html.tablet-device,html.tablet-device body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none;position:fixed;inset:0;-webkit-text-size-adjust:100%;text-size-adjust:100%}
.tablet-device #game{height:100dvh;min-height:0;max-height:100dvh;overflow:hidden}
.tablet-device #game>header{flex:0 0 auto;position:relative;z-index:20;flex-wrap:nowrap}
.tablet-device #game-layout{min-height:0;height:0;flex:1;overflow:hidden;align-items:stretch}
.tablet-device #game-layout .game-sidebar{min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable;align-self:stretch}
.tablet-device #game-layout .game-sidebar>*{flex:0 0 auto;min-height:0}
.tablet-device #right-sidebar>h2,.tablet-device #left-sidebar>h2{position:static}
.tablet-device #game-center{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;display:flex;flex-direction:column;align-items:center}
.tablet-device #game-center #scene{flex:0 0 auto;width:100%;max-height:none}
.tablet-device #game-center #howard-speech{flex:0 0 auto}
.tablet-device #game-center>#panel.conference-docked{min-height:100px;max-height:40dvh!important;flex:0 0 auto;overflow-y:auto;overscroll-behavior:contain}
.tablet-device #game-center:has(>#panel.conference-docked:not([hidden])) #scene{max-height:min(42dvh,100%)}
.tablet-device #panel:not(.conference-docked),.tablet-device #computer,.tablet-device #book-overlay{position:fixed!important;inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;max-height:none!important;overscroll-behavior:contain}
.tablet-device #computer .pc-bar{flex:0 0 auto;position:relative}
.tablet-device #computer .pc-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.tablet-device .reading-book,.tablet-device .menu-content{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.tablet-device #game-center:has(#panel:not([hidden]):not(.conference-docked)),.tablet-device #game-center:has(#computer:not([hidden])),.tablet-device #game-center:has(#book-overlay:not([hidden])){overflow:visible}
.tablet-device #scene{container-type:normal}
.tablet-device #scene:has(#panel:not([hidden]):not(.conference-docked)),.tablet-device #scene.pc-open,.tablet-device #scene.book-open{isolation:auto;overflow:visible;z-index:40}
@media (orientation:portrait){.tablet-device #game-layout{grid-template-rows:minmax(0,55%) minmax(0,1fr);grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.tablet-device #game-center{grid-row:1;grid-column:1/-1}.tablet-device #left-sidebar,.tablet-device #right-sidebar{grid-row:2}.tablet-device #game-center #scene{width:min(100%,calc((55dvh - 70px)*16/9))}.tablet-device #game-center #howard-speech{width:100%}}
