:root{--bg:#101811;--panel:#223021;--light:#d9e4c3;--text:#e4e8d5;--muted:#a2b094;--line:#566b46;--gold:#d5b37c;--mono:'SFMono-Regular',Consolas,'Liberation Mono',monospace;--font:Arial,Helvetica,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:13px var(--font);overflow:hidden;-webkit-font-smoothing:antialiased;height:100dvh}button,a{font:inherit;color:inherit;-webkit-tap-highlight-color:transparent}button{background:none;border:0;cursor:pointer}a{text-decoration:none}button:hover,a:hover{color:var(--gold)}button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--gold);outline-offset:4px}[hidden]{display:none!important}#gameShell{height:100dvh;position:relative;overflow:hidden;background:radial-gradient(ellipse at 52% 56%,#23302370 0%,#111b12 58%,#0c140e 100%)}#gameShell:before{content:'';position:absolute;inset:0;pointer-events:none;opacity:.07;background-image:radial-gradient(#b8cf9a .6px,transparent .7px);background-size:25px 25px}.hud{position:absolute;z-index:3;top:max(24px,env(safe-area-inset-top));left:32px;right:32px;display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.brand{font-weight:600;font-size:25px;letter-spacing:-1.5px;line-height:1}.brand span{color:var(--gold)}.brand small{display:block;font:8px var(--mono);letter-spacing:2px;color:#8ca27b;margin-top:12px}.top-actions{display:flex;gap:10px;align-items:flex-start}.top-actions button{font:10px var(--mono);padding:10px 13px;background:#1e2b1ddb;border:1px solid #475e37;box-shadow:2px 2px #080f07;min-width:83px}.top-actions button span{color:#afc194;margin-left:7px}.clock{text-align:right;padding-left:20px;min-width:135px;font:14px var(--mono);letter-spacing:1px;line-height:1.2;color:#cdd6b7}.clock small{display:block;font-size:7px;letter-spacing:1px;color:#80956e;margin-top:9px}#roomStage{position:absolute;inset:56px 30px 100px;display:flex;justify-content:center;align-items:center;isolation:isolate}#world{height:100%;width:100%;display:block;overflow:visible;user-select:none;touch-action:none;outline:none;max-width:1450px}#world:focus-visible{filter:drop-shadow(0 0 6px #aaca7750)}.scene-object{cursor:pointer;transition:filter .15s}.scene-object:hover,.scene-object:focus-visible{filter:brightness(1.25) drop-shadow(0 0 6px #bbd78a30);outline:none}.lamp-glow{transition:opacity .5s}.lamp-off .lamp-glow{opacity:0}.lamp-off #world{filter:brightness(.83)}#world-labels text{font:10px var(--mono);letter-spacing:.1px}#world-labels rect{fill:#1e2c1dec;stroke:#70865c;stroke-width:.7}#world-labels{transition:opacity .15s}.labels-off #world-labels{opacity:0}.object-tooltip{position:absolute;pointer-events:none;z-index:4;background:#d7e0ba;color:#25351d;border:1px solid #5b7044;box-shadow:2px 2px #0b150a70;font:10px var(--mono);padding:7px 10px;white-space:nowrap;transform:translate(-50%,-130%);opacity:0}.object-tooltip.visible{opacity:1}.greeting{position:absolute;z-index:3;bottom:26px;left:30px;width:344px;display:flex;align-items:flex-start;gap:13px;padding:16px;background:#1e2c1de8;border:1px solid #526643;box-shadow:4px 4px #080f07;color:#d1dcb9}.speaker{font:9px var(--mono);letter-spacing:1px;color:#c5cf9e}.greeting p{font-size:12px;line-height:1.6;margin:8px 0 0;color:#aebf9b}.portrait{width:38px;height:44px;flex-shrink:0;border:1px solid #5b7345;display:flex;justify-content:center;align-items:center;background:#344b2c}.pixel-face{width:19px;height:21px;background:#b58c61;box-shadow:0 -5px #1b2118,3px -3px #1b2118,-3px -3px #1b2118;position:relative}.pixel-face:before{content:'';position:absolute;left:3px;right:3px;top:8px;height:3px;background:linear-gradient(90deg,#273022 0 25%,transparent 25% 75%,#273022 75%)}.pixel-face:after{content:'';position:absolute;bottom:3px;left:6px;width:7px;height:2px;background:#856445}.game-menu{position:absolute;bottom:36px;left:50%;transform:translateX(-50%);display:flex;background:#263624ed;border:1px solid #6a7b54;box-shadow:4px 4px #080f07;z-index:4;padding:4px;gap:0}.game-menu button,.game-menu a{font:11px var(--mono);padding:13px 17px;white-space:nowrap;display:block;border-right:1px solid #4d6240}.game-menu button:last-child{border:0;font-size:15px;padding:10px 15px}.game-menu span{color:#adc391;margin-right:7px;font-size:14px}.game-menu button:hover,.game-menu a:hover{background:#354931}.room-hint{position:absolute;bottom:37px;right:32px;display:flex;flex-direction:column;gap:11px;font:9px var(--mono);color:#839b71;text-align:right;line-height:1.5}.room-hint kbd{font-size:8px}kbd{font:9px var(--mono);border:1px solid #5c7046;padding:3px 5px;color:#b7c99a;background:#263820;box-shadow:0 2px #142310;line-height:1.2}.interaction-prompt{position:absolute;bottom:135px;left:50%;transform:translateX(-50%);z-index:3;display:flex;align-items:center;gap:13px;background:#2b3d23f2;border:1px solid #8b9f68;box-shadow:3px 3px #071205;padding:10px 13px;font:11px var(--mono);white-space:nowrap}.interaction-prompt>span:last-child{color:var(--gold)}.interaction-prompt kbd{color:#e0e6c5;background:#344927}.touch-pad{display:none;position:absolute;bottom:109px;left:22px;width:102px;height:68px;z-index:5;grid-template-columns:repeat(3,32px);grid-template-rows:repeat(2,32px);gap:4px}.touch-pad button{border:1px solid #647c4e;background:#263b22e8;font:19px var(--mono);touch-action:none;user-select:none;box-shadow:2px 2px #0b1707}.touch-pad button[data-direction=up]{grid-column:2}.touch-pad button[data-direction=left]{grid-column:1;grid-row:2}.touch-pad button[data-direction=down]{grid-column:2;grid-row:2}.touch-pad button[data-direction=right]{grid-column:3;grid-row:2}.touch-pad button.pressed{background:#64794c;color:#e4ebcc}.toast{position:absolute;top:87px;left:50%;transform:translateX(-50%);z-index:6;padding:8px 13px;background:#1e301af2;border:1px solid #627c48;font:10px var(--mono);opacity:0;pointer-events:none;transition:opacity .15s;white-space:nowrap}.toast.visible{opacity:1}.window-backdrop{position:fixed;inset:0;z-index:10;background:#060d0555}.game-window{position:fixed;z-index:11;left:50%;top:50%;transform:translate(-50%,-50%);width:min(560px,calc(100vw - 36px));max-height:calc(100dvh - 56px);background:#233221;border:2px solid #829465;box-shadow:7px 7px #080f07,0 25px 100px #0008;display:flex;flex-direction:column}.window-titlebar{background:#4d6540;color:#e1e8cc;display:flex;align-items:center;gap:9px;padding:10px 11px;cursor:grab;user-select:none;touch-action:none;border-bottom:2px solid #11220f;flex-shrink:0}.window-titlebar h1{font:12px var(--mono);font-weight:700;margin:0;flex:1;line-height:1.5}.window-icon{font-size:18px;color:#c0cf9d}.window-titlebar button{font:21px var(--mono);background:#263c22;border:1px solid #9bac7b;box-shadow:2px 2px #172710;width:27px;height:25px;line-height:20px;flex-shrink:0}.window-label{font:8px var(--mono);color:#98af80;padding:18px 23px 0;letter-spacing:1px;flex-shrink:0}.window-content{overflow-y:auto;overscroll-behavior:contain;padding:15px 23px 24px;line-height:1.8;scrollbar-color:#607a49 #1d2a1a;scrollbar-width:thin}.window-content p{font-size:13px;color:#b0c39d;line-height:1.9;margin:0 0 18px}.window-content .lede{font-size:15px;color:#d8e2c3;line-height:1.8}.window-content h3{font:11px var(--mono);color:#d0deb5;margin:20px 0 10px}.pipeline{border:1px solid #56703d;background:#1b2c18;padding:19px;display:flex;flex-direction:column;gap:9px;text-align:center;font:11px var(--mono);color:#bdd1a3;margin:22px 0}.pipeline b{font-weight:400;color:#7b995d}.link-button{display:inline-block;padding:9px 13px;border:1px solid #819666;background:#354b2b;font:10px var(--mono);color:#e1e8c9;box-shadow:2px 2px #15230f;margin-top:8px}.link-button:hover{background:#486139}.window-footer{border-top:1px solid #597345;padding:12px 17px;display:flex;justify-content:space-between;gap:15px;align-items:center;font:9px var(--mono);color:#8faa75;background:#1c2c18;flex-shrink:0}.window-footer kbd{font-size:7px}.window-footer button{font-size:10px;color:#c2d3a7}.note-card{padding:15px 0;border-bottom:1px solid #4b623a}.note-card:first-child{padding-top:0}.note-card strong{font:12px var(--mono);color:#d2dfb8}.note-card p{font-size:12px;margin:8px 0 0}.index-list{display:flex;flex-direction:column;gap:9px}.index-list button{border:1px solid #617b46;background:#293f22;padding:14px;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:15px;font:12px var(--mono)}.index-list small{font-size:8px;color:#91ac73;display:block;margin-top:6px}.index-list span:last-child{color:var(--gold)}.help-rows{display:grid;grid-template-columns:110px 1fr;gap:14px;font:11px var(--mono);color:#c0d2a5}.help-rows span:nth-child(2n){color:#93ac78}canvas{display:block;max-width:100%;height:auto;border:1px solid #658448;background:#1d371c;touch-action:none}.game-scores{display:flex;align-items:center;gap:20px;font:10px var(--mono);padding-top:17px;color:#a3bd84}.game-scores strong{font-size:20px;color:#e2e8c7;margin-left:5px}.game-scores button{margin-left:auto;background:#587344;border:1px solid #9dae7a;padding:8px 13px;color:#eff1d9;font:10px var(--mono)}.small-note,.window-content .small-note{font:9px var(--mono);color:#8faa73;line-height:1.7;margin:14px 0 0}.board-tools{display:flex;align-items:center;gap:12px;margin-top:13px}.board-tools .small-note{margin:0;flex:1}.board-tools button{border:1px solid #7d9360;padding:6px 10px;font:9px var(--mono);background:#334e28}.no-script{position:fixed;z-index:30;inset:0;background:#1d2f1a;display:grid;place-content:center;padding:30px;gap:20px;font:16px var(--mono)}.no-script a{color:#c8dd9f}.actor-body{transform-origin:0 -27px}.labels-off .object-marker{opacity:0}@media(max-width:1250px){.greeting{width:280px;gap:10px}.greeting p{font-size:11px}.room-hint{font-size:8px}.room-hint .key-hints{display:none}.game-menu button,.game-menu a{padding:12px 13px;font-size:10px}.room-hint{right:24px}.hud{left:25px;right:25px}.greeting{left:25px}}@media(max-width:1000px){.room-hint{display:none}.game-menu{left:auto;right:25px;transform:none;bottom:30px}.greeting{bottom:28px;width:295px}#roomStage{inset:76px 8px 137px}.interaction-prompt{bottom:144px}}@media(pointer:coarse){.touch-pad{display:grid}}@media(max-width:650px){.hud{gap:10px;left:18px;right:18px;top:max(20px,env(safe-area-inset-top))}.brand{font-size:24px}.brand small{font-size:7px;margin-top:9px}.clock{display:none}.top-actions{gap:5px}.top-actions button{padding:8px;font-size:8px;min-width:54px}.top-actions button span{display:block;margin-left:0;margin-top:4px}.greeting{top:86px;bottom:auto;left:18px;right:18px;width:auto;padding:11px 12px;gap:11px}.portrait{height:35px;width:31px}.pixel-face{transform:scale(.8)}.greeting p{font-size:11px;margin:5px 0 0;line-height:1.5}.speaker{font-size:8px}#roomStage{inset:150px -29px 191px}#world-labels text{font-size:12px}#world-labels rect{stroke-width:1}.game-menu{left:18px;right:18px;bottom:max(24px,env(safe-area-inset-bottom));justify-content:space-around;padding:5px}.game-menu button,.game-menu a{flex:1;text-align:center;font-size:10px;padding:13px 8px}.game-menu button:last-child{flex:0;padding:9px 15px}.interaction-prompt{bottom:112px;left:auto;right:19px;transform:none;max-width:calc(100vw - 153px);gap:8px;padding:11px 9px;font-size:9px;white-space:normal;text-align:left}.interaction-prompt kbd{display:none}.touch-pad{display:grid;bottom:104px}.toast{top:160px;font-size:9px;max-width:calc(100vw - 40px);white-space:normal;text-align:center}.game-window{max-height:calc(100dvh - 36px);width:calc(100vw - 28px)}.window-content{padding:15px 17px 20px}.window-label{padding-left:17px}.window-content .lede{font-size:14px}.window-titlebar h1{font-size:11px}.window-footer{padding:12px;font-size:8px}.window-footer button{font-size:9px}.game-scores{gap:12px;font-size:9px}.game-scores strong{font-size:17px}.board-tools{gap:8px}.board-tools .small-note{font-size:8px}.object-tooltip{font-size:9px;padding:5px 7px}.help-rows{grid-template-columns:92px 1fr;gap:12px;font-size:10px}}@media(max-height:570px) and (min-width:651px){.hud{top:15px}.brand{font-size:19px}.brand small{margin-top:6px}.greeting{padding:10px;width:280px;bottom:18px}.greeting p{font-size:10px}.game-menu{bottom:21px}.game-menu button,.game-menu a{padding:10px}.interaction-prompt{bottom:105px}#roomStage{inset:45px 0 90px}.touch-pad{bottom:100px}.clock{font-size:11px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}

@media(max-width:650px) and (max-height:500px){.hud{top:13px}.brand{font-size:20px}.brand small{font-size:6px;margin-top:6px}.top-actions button{padding:7px 9px;font-size:8px}#roomStage{inset:50px 0 91px}.greeting{top:auto;bottom:18px;right:auto;width:236px;padding:9px;gap:9px}.greeting p{font-size:9px;line-height:1.45}.speaker{font-size:7px}.portrait{width:27px;height:30px}.game-menu{left:auto;right:18px;bottom:21px;padding:3px}.game-menu button,.game-menu a{font-size:9px;padding:11px 10px;flex:none}.game-menu span{display:none}.game-menu button:last-child{padding:8px 12px}.touch-pad{bottom:103px;left:18px;transform:scale(.85);transform-origin:bottom left}.interaction-prompt{bottom:109px;right:18px;font-size:9px;max-width:200px;padding:8px}.toast{top:56px}.window-content .lede{font-size:13px}.window-titlebar{padding:6px 10px}.window-label{padding-top:12px}.window-footer{padding:9px 12px}}

@media(max-width:540px) and (max-height:500px){.greeting{width:195px;padding:8px;gap:8px}.greeting p{font-size:8px}.portrait{display:none}.game-menu a{font-size:0}.game-menu a span{display:inline;font-size:14px;margin:0}.game-menu button,.game-menu a{padding-left:9px;padding-right:9px}.interaction-prompt{max-width:195px}}

.inline-link{color:var(--gold);text-decoration:underline;text-underline-offset:3px}.inline-link:hover{color:var(--light)}

.contact-links{display:flex;flex-wrap:wrap;gap:10px}.contact-links .link-button{margin-top:0}
.window-content>.link-button+.link-button{margin-left:10px}

#world-labels text{fill:#f2f5de;font-weight:500;letter-spacing:0}#world-labels rect{fill:#152614;stroke:#bed59b;stroke-width:1}#world-labels path{stroke:#bed59b;stroke-width:1}
.game-menu{background:#233920;border-color:#a3bb80;padding:5px}.game-menu button,.game-menu a{font-size:14px;color:#f0f4dc;min-height:48px;padding:12px 18px;border-color:#788f5e}.game-menu span{color:#d0e5b3;font-size:18px}.game-menu button:last-child{font-size:20px;min-width:48px;padding:10px 15px}.game-menu button:hover,.game-menu a:hover{background:#49603a;color:#fff8d4}
.object-tooltip{font-size:14px;padding:8px 11px}.interaction-prompt{font-size:13px;color:#eef4d9}.link-button{font-size:12px;padding:10px 14px}
@media(max-width:650px){.game-menu button,.game-menu a{font-size:14px;padding:12px 10px;min-width:0}.game-menu button:last-child{min-width:44px;padding:10px 12px}.object-tooltip{font-size:13px}.interaction-prompt{font-size:12px}}
@media(max-width:540px) and (max-height:500px){.greeting{display:none}.game-menu{left:18px;right:18px}.game-menu button{flex:1}.game-menu button:last-child{flex:0}}

.hud{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:20px;row-gap:12px}.hud .game-menu{position:static;transform:none;left:auto;right:auto;bottom:auto;justify-self:center;align-self:start;margin:0}.social-footer{position:absolute;z-index:4;left:50%;bottom:24px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 20px;background:#233920f2;border:1px solid #a3bb80;box-shadow:4px 4px #080f07;max-width:calc(100vw - 36px);width:max-content}.social-heading{font:10px var(--mono);letter-spacing:1.6px;color:#bdd3a2}.social-footer nav{display:flex;gap:20px;flex-wrap:wrap;justify-content:center}.social-footer a{font:14px var(--mono);color:#eef3d9;white-space:nowrap;line-height:1.5}.social-footer a:hover{color:#e9c692}.hud .game-menu button{min-height:44px}#roomStage{inset:112px 30px 132px}.interaction-prompt{bottom:137px}.touch-pad{bottom:128px}
@media(max-width:1250px){.clock{display:none}.hud{column-gap:14px}}
@media(max-width:1000px){#roomStage{inset:112px 8px 132px}.hud .game-menu{justify-self:center}}
@media(max-width:650px){.hud{grid-template-columns:auto minmax(0,1fr);gap:8px;top:max(18px,env(safe-area-inset-top))}.hud .brand{font-size:22px}.hud .brand small{letter-spacing:1px;font-size:9px;margin-top:8px}.hud .game-menu{justify-self:end;padding:2px}.hud .game-menu button{font-size:14px;padding:10px 8px;flex:none;min-height:42px}.hud .game-menu span{display:none}.hud .game-menu button:last-child{font-size:18px;min-width:34px;padding:8px}.top-actions{grid-column:1/-1;justify-self:end;gap:7px}.top-actions button{font-size:10px;min-width:64px;padding:7px 9px}.top-actions button span{display:inline;margin-left:5px;margin-top:0}.social-footer{bottom:max(16px,env(safe-area-inset-bottom));padding:12px 14px;gap:9px;max-width:calc(100vw - 36px)}.social-footer nav{gap:8px 14px}.social-footer a{font-size:13px}#roomStage{inset:calc(156px + max(18px,env(safe-area-inset-top))) -29px calc(138px + max(16px,env(safe-area-inset-bottom)))}.touch-pad{bottom:136px}.interaction-prompt{bottom:146px}.toast{top:165px}}
@media(max-width:650px) and (max-height:500px){.hud{top:max(12px,env(safe-area-inset-top));grid-template-columns:auto minmax(0,1fr) auto;column-gap:8px;row-gap:6px}.hud .brand{font-size:19px}.hud .brand small{font-size:7px;margin-top:6px}.hud .game-menu{justify-self:center}.hud .game-menu button{font-size:12px;min-height:34px;padding:8px 7px}.hud .game-menu button:last-child{font-size:16px;min-width:30px;padding:6px}.top-actions{grid-column:auto;justify-self:end;gap:4px}.top-actions button{font-size:9px;min-width:48px;padding:6px}.top-actions button span{margin-left:3px}.social-footer{padding:9px 14px;gap:6px;bottom:max(12px,env(safe-area-inset-bottom))}.social-heading{font-size:9px}.social-footer a{font-size:12px}.social-footer nav{gap:8px 14px}#roomStage{inset:calc(68px + max(12px,env(safe-area-inset-top))) 0 calc(96px + max(12px,env(safe-area-inset-bottom)))}.touch-pad{bottom:96px}.interaction-prompt{bottom:106px}.toast{top:80px}}
@media(max-width:540px) and (max-height:500px){.hud{grid-template-columns:auto minmax(0,1fr)}.top-actions{grid-column:1/-1}#roomStage{top:calc(118px + max(12px,env(safe-area-inset-top)))}}

@media(max-width:380px) and (min-height:501px){.hud .game-menu button{font-size:13px;padding-left:7px;padding-right:7px}}

.hud{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.hud .brand{grid-column:1;grid-row:1;justify-self:start}.hud .game-menu{grid-column:2;grid-row:1;justify-self:center}.hud .top-actions{grid-column:3;grid-row:1;justify-self:end}
@media(min-width:891px) and (max-width:1100px){.hud .game-menu button{padding-left:12px;padding-right:12px}}
@media(max-width:890px){.hud{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.hud .game-menu{grid-column:1/-1;grid-row:1}.hud .brand{grid-column:1;grid-row:2}.hud .top-actions{grid-column:2;grid-row:2}#roomStage{top:184px}}
@media(max-width:650px){#roomStage{top:calc(156px + max(18px,env(safe-area-inset-top)))}}
@media(max-width:380px){.hud .brand{font-size:19px}.hud .top-actions{gap:4px}.hud .top-actions button{font-size:9px;min-width:48px;padding:6px 4px}.hud .top-actions button span{margin-left:3px}}
@media(min-width:651px) and (max-width:890px) and (max-height:570px){.hud{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.hud .brand{grid-column:1;grid-row:1}.hud .game-menu{grid-column:2;grid-row:1}.hud .top-actions{grid-column:3;grid-row:1;gap:4px}.hud .game-menu button{font-size:12px;min-height:36px;padding:8px}.hud .game-menu span{display:none}.hud .game-menu button:last-child{font-size:16px;min-width:34px;padding:6px}.hud .top-actions button{font-size:9px;min-width:48px;padding:6px 4px}.hud .top-actions button span{margin-left:3px}#roomStage{top:112px}}
@media(max-width:650px) and (max-height:500px){#roomStage{top:calc(118px + max(12px,env(safe-area-inset-top)))}}
@media(min-width:541px) and (max-width:650px) and (max-height:500px){.hud{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}.hud .brand{grid-column:1;grid-row:1}.hud .game-menu{grid-column:2;grid-row:1}.hud .top-actions{grid-column:3;grid-row:1}#roomStage{top:calc(68px + max(12px,env(safe-area-inset-top)))}}


/* Readable controls and character dialogue. */
.hud .brand{font-size:32px;color:#f6f5df}
.hud .brand small{font-size:13px;line-height:1.2;letter-spacing:.8px;color:#e1ebca;margin-top:8px}
.hud .game-menu{border-color:#d0dfa5;background:#1b3119}
.hud .game-menu button{font-size:16px;min-height:48px;padding:12px 18px;color:#fff7df}
.hud .game-menu button:last-child{font-size:22px;min-width:48px}
.hud .top-actions button{font-size:12px;min-width:84px;padding:10px 12px;border-color:#8ea879;color:#f2f3d9;background:#20371d}
.hud .top-actions button span{color:#dceac3}
.clock small{font-size:11px;color:#cfdfb9}
.social-footer{border-color:#c9dda2;background:#1c321b;gap:10px;padding:14px 22px}
.social-heading{font-size:12px;color:#e2edc9;letter-spacing:1.4px}
.social-footer a{font-size:16px;color:#fff7df;padding:3px 0}
#world-labels text{fill:#fff7df;font-weight:600}
#world-labels rect{fill:#132c18;stroke:#d0dfa5;stroke-width:1.25}
#world-labels path{stroke:#b7cd92;opacity:.7;pointer-events:none}
.object-label rect,.object-label text{pointer-events:all}
.object-label:focus-visible rect{stroke:#fff8dc;stroke-width:2.5}
.labels-off .object-label{visibility:hidden}
.labels-off .object-label *{pointer-events:none}
.object-tooltip{font-size:15px}
.interaction-prompt{font-size:14px;bottom:153px}
.character-dialogue{position:absolute;z-index:2;visibility:hidden;width:320px;max-width:calc(100vw - 28px);padding:12px 14px;border:1px solid #cedba6;border-radius:6px;background:#f3f0d7;color:#192b1c;box-shadow:3px 4px #060f0a99;transform:translate(-50%,-100%);pointer-events:none}
.character-dialogue.positioned{visibility:visible}
.character-dialogue:after{content:'';position:absolute;left:var(--tail-x,50%);bottom:-7px;width:12px;height:12px;background:#f3f0d7;border-right:1px solid #cedba6;border-bottom:1px solid #cedba6;transform:translateX(-50%) rotate(45deg)}
.character-dialogue p{margin:0;font-size:15px;line-height:1.45;color:#192b1c}
.character-dialogue button{display:block;margin:6px 0 0;padding:0;pointer-events:auto;font:600 14px/1.5 var(--mono);color:#27462c;text-decoration:underline;text-underline-offset:3px}
.character-dialogue button:hover{color:#0a1f12}
.character-dialogue button:focus-visible{outline-color:#27462c;outline-offset:3px}
#roomStage{top:112px;bottom:140px}
@media(max-width:1100px){
  .hud{grid-template-columns:minmax(0,1fr) minmax(0,1fr);row-gap:12px}
  .hud .game-menu{grid-column:1/-1;grid-row:1}
  .hud .brand{grid-column:1;grid-row:2}
  .hud .top-actions{grid-column:2;grid-row:2}
  #roomStage{top:156px}
}
@media(max-width:650px){
  .hud{row-gap:8px}
  .hud .brand{font-size:28px}
  .hud .brand small{font-size:12px;margin-top:6px}
  .hud .game-menu button{font-size:16px;padding:10px 12px;min-height:44px}
  .hud .game-menu button:last-child{font-size:21px;min-width:40px}
  .hud .top-actions button{font-size:11px;min-width:72px;padding:8px}
  .social-footer{padding:12px 16px;gap:8px}
  .social-heading{font-size:11px}
  .social-footer nav{display:grid;grid-template-columns:repeat(2,auto);gap:8px 22px}
  .social-footer a{font-size:15px;padding:0}
  .character-dialogue{width:280px;padding:10px 13px}
  .character-dialogue p{font-size:14px}
  #roomStage{top:174px;bottom:154px}
  .touch-pad{bottom:138px}
  .interaction-prompt{bottom:150px}
}
@media(max-width:540px){
  .hud .brand{grid-column:1/-1;grid-row:2;font-size:26px}
  .hud .top-actions{grid-column:1/-1;grid-row:3;justify-self:center}
}
@media(max-width:650px) and (max-height:500px){
  .hud{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);row-gap:8px}
  .hud .brand{grid-column:1;grid-row:1;font-size:23px}
  .hud .brand small{font-size:12px;margin-top:6px}
  .hud .game-menu{grid-column:2;grid-row:1}
  .hud .game-menu button{font-size:14px;min-height:38px;padding:8px 9px}
  .hud .game-menu button:last-child{font-size:18px;min-width:34px;padding:6px}
  .hud .top-actions{grid-column:3;grid-row:1;gap:4px}
  .hud .top-actions button{font-size:11px;min-width:52px;min-height:38px;padding:5px}
  .hud .top-actions button span{display:block;margin:0}
  .social-footer{padding:9px 14px;gap:6px}
  #roomStage{top:80px;bottom:120px}
  .touch-pad{bottom:124px}
  .interaction-prompt{bottom:134px}
}
@media(max-width:540px) and (max-height:650px){
  body{overflow-y:auto}
  #gameShell{height:max(100dvh,680px)}
}
@media(max-width:540px) and (max-height:500px){
  .hud{grid-template-columns:auto minmax(0,1fr)}
  .hud .game-menu{grid-column:1/-1;grid-row:1}
  .hud .brand{grid-column:1;grid-row:2}
  .hud .top-actions{grid-column:2;grid-row:2;justify-self:end}
  #roomStage{top:112px}
}
@media(max-width:650px) and (max-height:500px){
  body{overflow-y:auto}
  #gameShell{height:max(100dvh,680px)}
}
@media(min-width:651px) and (max-height:570px){
  body{overflow-y:auto}
  #gameShell{height:max(100dvh,560px)}
  .hud{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
  .hud .brand{grid-column:1;grid-row:1;font-size:26px}
  .hud .brand small{font-size:12px;margin-top:6px}
  .hud .game-menu{grid-column:2;grid-row:1}
  .hud .game-menu button{font-size:14px;min-height:38px;padding:8px 9px}
  .hud .game-menu span{display:none}
  .hud .game-menu button:last-child{font-size:18px;min-width:34px;padding:6px}
  .hud .top-actions{grid-column:3;grid-row:1;gap:4px}
  .hud .top-actions button{font-size:11px;min-width:60px;padding:6px}
  .hud .top-actions button span{display:block;margin:0}
  .clock{display:none}
  #roomStage{top:80px;bottom:120px}
}


/* A brief, rounded greeting above the scene. */
.character-dialogue{z-index:6;width:180px;height:180px;max-width:calc(100vw - 28px);padding:20px;border-radius:50%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;opacity:1;transition:opacity .18s ease}
.character-dialogue p{font-size:14px;line-height:1.3}
.character-dialogue button{font-size:13px;line-height:1.3;margin-top:5px}
.character-dialogue.dismissing{opacity:0;pointer-events:none}
.character-dialogue.dismissing button{pointer-events:none}
.room-hint{font-size:15px;line-height:1.6;gap:9px;color:#e1ebcc;bottom:30px;pointer-events:none}
.room-hint .key-hints{display:block}
.room-hint kbd{font-size:13px;line-height:1.3;padding:4px 6px;color:#f3f6df;border-color:#9db580}
@media(max-width:1100px){.room-hint{display:none}}

/* The desk phone uses the room's palette; the feed keeps original photographs. */
.phone-mode{width:min(430px,calc(100vw - 28px))}
.phone-mode .window-label{display:none}
.phone-mode .window-content{padding:16px 24px 20px;overflow:hidden;min-height:0}
.phone-ui{height:min(570px,calc(100dvh - 172px));min-height:140px;background:#263d2a;border:8px solid #0b150f;outline:1px solid #7f9573;border-radius:27px;box-shadow:5px 6px #091109;display:flex;flex-direction:column;padding:10px 12px 8px;overflow:hidden;color:#edf0d9}
.phone-status{display:flex;justify-content:space-between;align-items:center;gap:10px;flex:none;font:10px var(--mono);height:17px;color:#c0d0ad}
.phone-speaker{height:5px;width:50px;background:#0d1b11;border-radius:4px}
#phoneScreens{display:flex;flex-direction:column;flex:1;min-height:0}
.phone-profile{display:flex;gap:12px;align-items:center;padding:13px 0 12px;flex:none}
.phone-profile-icon{display:grid;place-items:center;width:35px;height:35px;border:1px solid #6d8a61;background:#375333;color:#e7e4bc;font:600 15px var(--mono)}
.phone-profile strong{display:block;font-size:16px;letter-spacing:-.3px}
.phone-profile div>span{display:block;margin-top:3px;font:11px var(--mono);color:#bbccaa}
.phone-tabs{display:flex;gap:6px;flex:none;margin-bottom:12px;border:1px solid #7e986e;padding:3px;border-radius:12px}
.phone-tabs button{flex:1;padding:8px 10px;font:13px var(--mono);border-radius:8px;color:#d5e2c6;min-width:0}
.phone-tabs button[aria-selected="true"]{background:#d3dcb4;color:#20341f;font-weight:600}
.phone-panels{overflow:auto;overscroll-behavior:contain;min-height:0;flex:1;scrollbar-width:thin;scrollbar-color:#82956c #263d2a}
.phone-panels [role="tabpanel"]{outline-offset:-2px}
.phone-post{margin-bottom:18px;background:#1c3020;border:1px solid #51694b;border-radius:9px;overflow:hidden}
.phone-photo-button{display:block;width:100%;padding:0;cursor:zoom-in}
.phone-post img,.phone-post video{display:block;width:100%;height:auto;max-height:380px;object-fit:cover}
.phone-post-copy{padding:12px}
.phone-post-copy p{font-size:14px;line-height:1.5;margin:0;color:#edf0d9}
.phone-post-copy .phone-post-meta{font:10px/1.6 var(--mono);color:#b5c7a5;margin-bottom:6px}
.phone-empty{font-size:14px;line-height:1.5;text-align:center;margin:35px 8px;color:#c4d3b2}
.phone-contacts{display:flex;flex-direction:column;gap:8px;padding:2px 0 4px}
.phone-contacts a{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 12px;background:#1b3020;border:1px solid #66815b;border-radius:8px;font:14px var(--mono);color:#f1f1d9;min-height:48px}
.phone-contacts a:hover{background:#354d2d;color:#e6c58b}
#phonePhotoViewer{display:flex;flex-direction:column;flex:1;min-height:0;gap:10px;padding-top:8px}
#phonePhotoBack{align-self:flex-start;flex:none;font:13px var(--mono);padding:7px 9px;border:1px solid #78956a;border-radius:6px;color:#edf0d9}
#phonePhotoImage{display:block;flex:1;min-height:0;width:100%;height:100%;object-fit:contain}
#phonePhotoCaption{flex:none;font-size:14px;line-height:1.4;margin:0;max-height:25%;overflow:auto;color:#edf0d9}
.phone-home-indicator{height:4px;width:74px;border-radius:5px;background:#9db185;flex:none;align-self:center;margin-top:10px}
@media(max-width:650px){.phone-mode .window-content{padding:12px 17px 16px}}
@media(max-height:500px){.phone-ui{padding-top:6px}.phone-profile{padding:6px 0}.phone-profile-icon{width:27px;height:27px;font-size:12px}.phone-profile strong{font-size:14px}.phone-profile div>span{display:none}.phone-tabs{margin-bottom:7px}.phone-tabs button{padding:6px 8px}.phone-status{height:12px;font-size:9px}.phone-mode .window-content{padding-top:10px;padding-bottom:12px}}
.phone-photo-mode{width:min(1080px,calc(100vw - 28px));left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important}
.phone-photo-mode .phone-ui{height:min(680px,calc(100dvh - 160px));border:0;outline:none;border-radius:0;box-shadow:none;background:#15261b;padding:8px 12px 12px}
.phone-photo-mode .phone-status,.phone-photo-mode .phone-home-indicator{display:none}
.phone-photo-mode #phonePhotoViewer{padding-top:0}

/* Compact room captions; navigation and controls retain their larger type. */
#world-labels text{font-weight:400;fill:#e0e7cc}
#world-labels rect{fill:#172b1de8;stroke:#a7ba88;stroke-width:.8}
#world-labels path{stroke-width:.7;opacity:.4}
.object-label{transition:opacity .12s ease,filter .15s ease}
.object-tooltip,.interaction-prompt,.toast{transition:opacity .12s ease}
.object-label.player-overlap,.object-tooltip.visible.player-overlap,.interaction-prompt.player-overlap,.toast.visible.player-overlap,.character-dialogue.player-overlap:not(.dismissing){opacity:.16}
.object-label.player-overlap rect,.object-label.player-overlap text,.interaction-prompt.player-overlap,.character-dialogue.player-overlap button{pointer-events:none}

.object-tooltip{font-size:12px;padding:6px 8px}

/* Lately: location above media, date below; only visible videos play. */
.phone-post img{object-fit:contain;background:#122219}
.phone-post-location{margin:0;padding:10px 12px;font:12px/1.5 var(--mono);color:#d6e5c3;background:#263e2c}
.phone-video-embed{position:relative;aspect-ratio:16/9;min-height:200px;background:#122219}
.phone-video-embed img,.phone-video-embed iframe{position:absolute;inset:0;width:100%;height:100%;max-height:none;border:0}
.phone-video-embed iframe{pointer-events:none}
.phone-video-preview{display:inline-block;margin-top:8px;font:11px/1.5 var(--mono);color:#dce8c4;text-decoration:underline;text-underline-offset:3px}
.phone-post-copy .phone-post-meta{font-size:11px;color:#c5d5b5}


/* Project inspection windows share the room palette but have distinct interiors. */
.game-window.project-mode{width:min(840px,calc(100vw - 36px))}
.project-mode .window-label{padding-top:14px}
.project-mode .window-content{padding-top:12px;min-height:0}
.project-experience{min-width:0}
.project-experience button{line-height:1.45}
.project-tabs{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 16px;border-bottom:1px solid #587049;padding-bottom:9px}
.project-tabs button{font:11px var(--mono);padding:10px 14px;border:1px solid transparent;color:#b3c5a3;min-height:40px}
.project-tabs button[aria-selected=true]{background:#d5dfbd;color:#243520;border-color:#d5dfbd;box-shadow:2px 2px #10200f}
.project-tabs button:hover:not([aria-selected=true]){background:#30452a;border-color:#617b4d}
.project-experience [role=tabpanel]:focus-visible{outline-offset:2px}
.project-evidence-bar{display:flex;align-items:center;gap:8px;font:9px var(--mono);color:#d3dfbd;padding:0 0 12px;flex-wrap:wrap}
.project-evidence-bar>span:last-child{margin-left:auto;color:#94ad80}
.project-status-dot{width:6px;height:6px;background:#b6cb8f;box-shadow:0 0 7px #b6cb8f50;border-radius:50%}
.project-video{aspect-ratio:16/9;background:#101c12;border:1px solid #688451;overflow:hidden}
.project-video iframe,.project-video video{width:100%;height:100%;display:block;border:0}
.project-video video{object-fit:contain;background:#101c12}
.glasses-video{aspect-ratio:17/30;max-width:300px;max-height:65svh;margin:0 auto}
.window-content .project-intro{font-size:16px;color:#e0e8cd;line-height:1.6;margin:17px 0}
.project-human-note{padding:0 0 3px}
.project-human-note>span,.project-gesture>span,.project-fact-pair span,.gpu-question>span,.gpu-machine>span{font:9px var(--mono);letter-spacing:1px;color:#bdcb9e}
.project-human-note p{margin:0;font-size:12px;line-height:1.8}
.project-source{font:10px var(--mono);color:#c6d3a8;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.project-links{display:flex;flex-wrap:wrap;gap:10px;border-top:1px solid #4b643a;margin-top:20px;padding-top:10px}
.project-links .link-button{margin-top:0}
.project-stepper{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0}
.project-stepper button{flex:1;min-width:85px;padding:12px 10px;border:1px solid #597449;background:#1b2c18;font:11px var(--mono);text-align:left;color:#b8cda2}
.project-stepper button span{display:block;color:#7f9b69;font-size:8px;margin-bottom:5px}
.project-stepper button[aria-pressed=true]{background:#3e5732;border-color:#b2c88b;color:#f0f2de}
.project-detail{border:1px solid #617e49;background:#1c2c19;padding:18px 20px;margin:0 0 14px;min-height:144px}
.project-detail h3{margin:0 0 9px;font-size:13px;color:#e3ebca}
.project-detail p{margin:0 0 12px;font-size:13px;line-height:1.7}
.project-detail .project-detail-note{color:#91ac7a;font-size:11px}
.project-gesture{padding:16px 0 0}
.project-switch{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0 14px}
.project-switch button{border:1px solid #647f50;padding:9px 12px;font:10px var(--mono);min-height:38px}
.project-switch button[aria-pressed=true]{background:#456035;border-color:#b8ca91;color:#eef1d8}
.project-gesture p{font-size:12px;min-height:42px}
.inspection-tabs{margin-bottom:10px}
.inspection-tabs button{padding:9px 11px;font-size:10px}
.inspection-figure{margin:0}
.inspection-image-wrap{position:relative;isolation:isolate;background:#172515;border:1px solid #647b4c;width:min(100%,var(--photo-width));aspect-ratio:var(--photo-ratio);margin:auto}
.inspection-image-wrap img{width:100%;height:100%;object-fit:contain;display:block}
.inspection-diagram .inspection-image-wrap{background:#f1f0e9}
.inspection-marker{position:absolute;transform:translate(-50%,-50%);width:36px;height:36px;border:2px solid #e5e9c3;background:#263b22e8;box-shadow:0 0 0 5px #10200e66,2px 2px #091208;font:12px var(--mono);color:#f1f1d7;border-radius:50%;z-index:1}
.inspection-marker[aria-pressed=true]{background:#d3dcaf;color:#1c3015}
.inspection-figure figcaption{font:9px var(--mono);color:#a7bd8e;line-height:1.8;margin:9px 0 14px;text-align:center}
.inspection-figure figcaption a{margin-left:8px;font-size:9px}
.inspection-part-select{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.inspection-part-select button{flex:1;min-width:116px;min-height:39px;background:#1d2e19;border:1px solid #5a7444;font:10px var(--mono);padding:9px}
.inspection-part-select button[aria-pressed=true]{border-color:#bacd94;background:#3b532f;color:#e9edcf}
.project-fact-pair{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0}
.project-fact-pair>div{border-left:2px solid #799b58;padding-left:13px}
.project-fact-pair p{font-size:11px;margin:7px 0 0;line-height:1.65}
.project-disclosure{border-top:1px solid #536c3f;padding:13px 0;margin-top:10px}
.project-disclosure summary{cursor:pointer;font:11px var(--mono);color:#d4dfb8;min-height:30px;padding:7px 0}
.project-disclosure summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.project-disclosure[open]>summary{margin-bottom:13px}
.project-disclosure p{font-size:12px;line-height:1.75}
.gpu-question{padding:7px 0 12px}
.gpu-question h2{font:24px var(--mono);color:#e7ecd4;line-height:1.4;font-weight:400;letter-spacing:-.6px;margin:12px 0}
.gpu-question p{font-size:12px;margin:0 0 7px}
.benchmark-panel{border:1px solid #789557;background:#192917;padding:19px;margin-bottom:20px}
.benchmark-heading{display:flex;justify-content:space-between;gap:15px;font:9px var(--mono);color:#a5bb88}
.benchmark-heading strong{color:#d4dfb8;font-size:10px;white-space:nowrap}
.benchmark-bars{margin:25px 0 19px;display:grid;gap:19px}
.benchmark-row{display:grid;grid-template-columns:40px 1fr 118px;gap:13px;align-items:center;font:11px var(--mono)}
.benchmark-row>span{color:#c0d0a4}
.benchmark-track{height:20px;background:#293e22;overflow:hidden;border:1px solid #344e29}
.benchmark-fill{height:100%;background:#b0c987;box-shadow:inset 0 -5px #0002}
.benchmark-row:nth-child(2) .benchmark-fill{background:#c5aa76}
.benchmark-row strong{text-align:right;font-size:13px;color:#e1e8c9;white-space:nowrap}
.window-content .benchmark-hint{font-size:11px;margin:0 0 18px}
.benchmark-reference{border-top:1px dashed #4d6839;padding-top:12px}
.benchmark-reference>span{font:8px var(--mono);letter-spacing:1px;color:#a7b98c}
.benchmark-reference p{font-size:10px;line-height:1.6;margin:7px 0 0;color:#99b07f}
.gpu-machine{margin:12px 0 0}
.gpu-machine>h3{font-size:13px;font-weight:400;color:#cddbb4}
.interview-desktop-bar{display:flex;justify-content:space-between;gap:10px;align-items:center;background:#101e12;border:1px solid #506c3c;font:9px var(--mono);padding:12px 14px;margin-bottom:15px;color:#809b6b}
.interview-desktop-bar strong{color:#bacba6;font-weight:400}
.interview-desktop-bar>span:first-child{color:#c3ac79;letter-spacing:3px}
.interview-desktop-bar>span:last-child{font-size:8px}
.window-content .interview-sample-label{font-size:12px;line-height:1.7;color:#b8c9a1;margin:0 0 17px}
.interview-role{display:flex;justify-content:space-between;gap:12px;font:9px var(--mono);color:#9cb883;margin:15px 0}
.interview-role>span:first-child{color:#d3dfbb}
.interview-message{padding:15px 18px;border:1px solid #5a7844;background:#1b2b18;margin:13px 0;max-width:88%}
.interview-message>span{font:8px var(--mono);letter-spacing:1px;color:#95b177}
.interview-message p{font-size:13px;line-height:1.75;color:#d1ddba;margin:7px 0 0}
.interview-message.candidate{margin-left:auto;background:#2c4123;border-color:#769459}
.feedback-summary{padding:5px 0 14px;margin-bottom:3px}
.feedback-summary>span{font:9px var(--mono);color:#97b47c}
.feedback-summary h3{font:15px var(--font);line-height:1.6;margin:7px 0 0}
.feedback-categories>div{border-bottom:1px solid #476135;padding:15px 0}
.feedback-categories section{min-width:0}
.feedback-categories h3{margin:0 0 6px;font-size:11px}
.feedback-categories p{font-size:12px;line-height:1.7;margin:0}
.interview-architecture{display:grid;gap:17px}
.interview-architecture>section{min-width:0}
.interview-architecture span{font:9px var(--mono);color:#8eaa73}
.interview-architecture h3{font-size:11px;margin:9px 0}
.interview-architecture p{font-size:11px;line-height:1.7}
@media(max-width:650px){
  .game-window.project-mode{width:calc(100vw - 28px)}
  .project-mode .window-content{padding:12px 14px 18px}
  .project-tabs{gap:3px}
  .project-tabs button{font-size:10px;padding:9px 10px;min-height:42px}
  .project-evidence-bar{font-size:8px;gap:6px}
  .project-evidence-bar>span:last-child{margin-left:0}
  .window-content .project-intro{font-size:14px}
  .project-human-note p{font-size:12px}
  .project-stepper{gap:5px}
  .project-stepper button{min-width:70px;padding:10px 8px;font-size:10px}
  .project-detail{padding:14px;min-height:0}
  .project-detail p{font-size:12px}
  .inspection-tabs button{padding:8px 9px;font-size:9px}
  .inspection-marker{width:40px;height:40px}
  .inspection-part-select button{min-width:105px;font-size:9px;min-height:42px}
  .project-fact-pair{grid-template-columns:1fr;gap:13px}
  .gpu-question h2{font-size:19px}
  .benchmark-panel{padding:14px 11px}
  .benchmark-heading{font-size:8px;gap:8px}
  .benchmark-heading strong{font-size:8px}
  .benchmark-row{grid-template-columns:33px 1fr 88px;gap:8px;font-size:10px}
  .benchmark-row strong{font-size:10px}
  .benchmark-track{height:17px}
  .interview-desktop-bar{padding:10px;font-size:8px}
  .interview-desktop-bar>span:last-child{display:none}
  .interview-role{font-size:8px;flex-wrap:wrap}
  .interview-message{max-width:95%;padding:12px 14px}
  .interview-message p{font-size:12px}
  .interview-architecture{grid-template-columns:1fr}
  .project-links{gap:8px}
  .project-links .link-button{font-size:10px}
}

.touch-pad{touch-action:none}

/* Touch controls have their own space; room captions stay compact. */
@media(pointer:coarse){
  #world{touch-action:pan-y}
  button,a{touch-action:manipulation}
  .touch-pad{display:grid;width:156px;height:102px;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(2,48px);gap:6px;transform:none;left:max(12px,env(safe-area-inset-left));bottom:140px}
  .touch-pad button{touch-action:none;font-size:22px}
  .hud .game-menu button,.hud .top-actions button{min-height:44px;min-width:44px}
  .hud .game-menu button:last-child{min-width:44px}
  .social-footer a{display:flex;align-items:center;justify-content:center;min-height:44px}
  .interaction-prompt{min-height:48px;right:max(12px,env(safe-area-inset-right));left:auto;transform:none;max-width:calc(100vw - 186px);bottom:160px;font-size:14px}
  .interaction-prompt kbd{display:none}
  .character-dialogue{width:148px;height:148px;padding:14px}
  .character-dialogue p{font-size:12px;line-height:1.3}
  .character-dialogue button{font-size:12px;line-height:1.3;padding:4px 0}
  .game-window{width:min(560px,calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
  .window-titlebar{cursor:default;padding:6px 10px;touch-action:pan-y}
  .window-titlebar h1{font-size:14px}
  .window-titlebar button{width:44px;height:44px;font-size:26px}
  .window-footer{padding:6px 12px;min-height:56px}
  .window-footer>span{display:none}
  .window-footer button{margin-left:auto;min-height:44px;font-size:12px}
  .window-content,.phone-panels{touch-action:pan-y;-webkit-overflow-scrolling:touch}
  .phone-tabs button,#phonePhotoBack,.board-tools button,.game-scores button,.link-button{min-height:44px;min-width:44px}
  .phone-mode .window-content{padding:10px 12px 12px}
  .phone-mode{width:min(430px,calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)))}
  .phone-ui{height:min(570px,calc(100dvh - 162px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))}
  .phone-photo-mode .phone-ui{height:min(680px,calc(100dvh - 158px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))}
  .board-tools{flex-wrap:wrap}
  .board-tools .small-note{min-width:100px}
}
@media(pointer:coarse) and (max-width:650px){
  .hud{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right))}
  #roomStage{top:184px;bottom:246px}
  .social-footer{bottom:max(12px,env(safe-area-inset-bottom));padding:8px 16px;gap:4px}
  .social-footer nav{gap:0 22px}
  .touch-pad{bottom:164px}
  .interaction-prompt{bottom:184px}
  .phone-mode .window-content{padding-left:8px;padding-right:8px}
}
@media(pointer:coarse) and (min-width:651px) and (max-height:500px){
  body{overflow:hidden}
  #gameShell{height:100dvh}
  .hud{top:max(10px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
  .hud .brand{grid-column:1;grid-row:1}
  .hud .game-menu{grid-column:2;grid-row:1}
  .hud .top-actions{grid-column:3;grid-row:1}
  #roomStage{top:76px;bottom:96px}
  .touch-pad{bottom:max(12px,env(safe-area-inset-bottom))}
  .social-footer{bottom:max(12px,env(safe-area-inset-bottom));padding:6px 12px;gap:2px}
  .social-footer nav{gap:12px;flex-wrap:nowrap}
  .social-footer a{font-size:13px}
  .social-heading{font-size:10px}
  .interaction-prompt{bottom:26px;max-width:176px;font-size:12px}
  .phone-ui{min-height:0}
  .phone-profile{display:none}
  #boardCanvas{max-height:calc(100dvh - 260px);width:auto;margin-inline:auto}
  .window-content:has(#tennisCanvas){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 18px;align-items:start}
  .window-content:has(#tennisCanvas) .lede{grid-column:1;grid-row:1;margin:0;font-size:13px;line-height:1.6}
  #tennisCanvas{grid-column:2;grid-row:1;max-height:120px;width:auto;justify-self:center}
  .window-content:has(#tennisCanvas) .game-scores{grid-column:2;grid-row:2;padding-top:0;gap:8px}
  .window-content:has(#tennisCanvas) .small-note{grid-column:1;grid-row:2;margin:0;font-size:11px;line-height:1.5}
}

/* In portrait, size the drawing from its width rather than the spare height.
   The room is 780 SVG units wide inside its 930 × 740 viewBox. */
@media(pointer:coarse) and (orientation:portrait) and (max-width:1100px){
  body{overflow-y:auto}
  #gameShell{
    --room-top:156px;
    --room-box-width:calc((100vw - 24px) * 930 / 780);
    --room-box-height:calc((100vw - 24px) * 740 / 780);
    height:max(100dvh,calc(var(--room-top) + var(--room-box-height) + 246px));
  }
  #roomStage{top:var(--room-top);bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:var(--room-box-width);height:var(--room-box-height)}
  #world{flex:none;max-width:none}
}
@media(pointer:coarse) and (orientation:portrait) and (max-width:650px){
  #gameShell{--room-top:184px}
}
