@font-face{font-family:'Press Start 2P';src:url('assets/fonts/PressStart2P-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:block}
:root{--pixel-font:'Press Start 2P',monospace}
:root{color-scheme:dark;--ink:#11191d;--panel:#192227;--border:#344045;--cream:#f2e6ce;--dim:#89908c;--orange:#efa55b;--mint:#97b8a4}*{box-sizing:border-box}body{margin:0;background:#11181c;color:var(--cream);font-family:var(--pixel-font);font-size:13px;background-image:radial-gradient(ellipse at 50% 20%,#26303466,transparent 65%)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;background:none;border:0}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:2px solid var(--orange);outline-offset:3px}button:disabled{cursor:default;opacity:.4}button:hover{color:var(--orange)}[hidden]{display:none!important}#app{max-width:1256px;padding:0 36px;margin:auto}.masthead{height:110px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:13px;color:var(--cream);text-decoration:none;font-size:19px;letter-spacing:2px}.brand b{font-weight:400;color:#8d9b96}.brand small{display:block;font-size:8px;letter-spacing:2px;margin-top:7px;color:#a5a69b}.brand-icon{font-size:24px;border:2px solid var(--orange);color:var(--orange);width:37px;height:37px;display:grid;place-items:center;box-shadow:inset 0 0 0 3px var(--ink);background:#bf7d3f22}.edition{font-size:9px;letter-spacing:2px;color:#aeb1a5;line-height:2.2;text-align:center}.edition span{display:block;color:#687a7d;font-size:8px}.utilities{display:flex;gap:8px;align-items:center}.utilities button{border:1px solid #344146;padding:8px 10px;border-radius:3px;color:#acb6ae}.utilities span{font-size:10px}.machine{border:1px solid #455057;box-shadow:0 25px 65px #0008,0 0 0 6px #192125;border-radius:4px;overflow:hidden;background:var(--panel)}.statusbar{height:35px;background:#1b252a;display:flex;justify-content:space-between;align-items:center;padding:0 19px;font-size:9px;letter-spacing:1.4px;color:#b9b9a9;border-bottom:2px solid #0d1315}.statusbar>div:first-child{display:flex;align-items:center;gap:8px}.live-dot,.save-dot{display:inline-block;width:5px;height:5px;background:var(--orange);box-shadow:0 0 7px #efa55b44}.save-dot{background:var(--mint);margin-right:7px;box-shadow:none}#clock{color:var(--orange)}#stage{position:relative;background:#1c2026;aspect-ratio:2;isolation:isolate;overflow:hidden}#scene{width:100%;height:100%;display:block;image-rendering:pixelated;cursor:crosshair}.scanlines{position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,#0000 0px,#0000 3px,#0002 4px);opacity:.3;z-index:1}#room-label{position:absolute;left:23px;top:20px;pointer-events:none;text-shadow:1px 2px 0 #13191d;color:#f4e3ba;z-index:2}#act-label{font-size:8px;letter-spacing:3px;color:#dfbf81}#room-name{display:block;font-family:var(--pixel-font);font-size:23px;font-weight:400;margin-top:5px}#hover-label{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);background:#11191ee8;padding:7px 12px;border:1px solid #6a7769;font-size:11px;color:#ebd1a5;pointer-events:none;z-index:3;white-space:nowrap}#hover-label:empty{display:none}.scene-tool{position:absolute;right:15px;top:17px;padding:8px 10px;background:#11191dc9;border:1px solid #656e62;font-size:10px;z-index:3}.commandbar{display:flex;align-items:center;gap:15px;border-top:2px solid #0f161a;border-bottom:1px solid #46504f;padding:8px 14px;background:#202b30;min-height:48px}.verbs{display:flex;gap:4px}.verbs button{padding:8px 10px;font-size:14px;border:1px solid transparent}.verbs button.active{border-color:#9b7a4b;background:#bb8b4122;color:var(--orange)}.verbs span{font-size:11px;margin-left:5px}.commandbar kbd{font-size:8px;color:#8a9693;margin-left:10px}#command{flex:1;font-size:9px;letter-spacing:1px;color:#9da59a}#journal-button,#map-button{font-size:16px;white-space:nowrap}#journal-button span,#map-button span{font-size:10px}.lower-panel{display:grid;grid-template-columns:1.18fr 1fr;padding:17px 18px 20px;gap:22px;background:linear-gradient(#1b252a,#192227)}.panel-heading{font-size:9px;letter-spacing:1.7px;color:#c2c3ac;display:flex;justify-content:space-between;gap:8px;margin-bottom:11px}.panel-heading span{font-size:7px;color:#778b8a;letter-spacing:.8px}#characters{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.character{border:1px solid #3d4b4b;background:#162027;padding:6px 3px 5px;text-align:center;position:relative;min-width:0}.character.selected{border-color:var(--orange);background:#b6883a18;box-shadow:inset 0 -2px 0 var(--orange)}.character canvas{width:44px;height:44px;image-rendering:pixelated;display:block;margin:0 auto 5px}.character strong{display:block;font-size:9px;letter-spacing:.7px;font-weight:400}.character small{display:block;font-size:6px;color:#94a39a;margin-top:5px;white-space:nowrap}.char-key{position:absolute;left:5px;top:5px;font-size:7px;color:#7f918e}.inventory{border-left:1px solid #3d4848;padding-left:22px}#items{display:flex;gap:7px;flex-wrap:wrap;align-content:flex-start;min-height:83px}.item{border:1px solid #3b4a4c;min-width:50px;max-width:85px;flex:1;background:#101b20;padding:5px 4px;color:#aeb9ac;position:relative}.item.selected{color:var(--orange);border-color:var(--orange);background:#6c4b2029}.item canvas{width:30px;height:30px;image-rendering:pixelated;display:block;margin:auto}.item span{display:block;font-size:7px;margin-top:4px;text-align:center}.empty{color:#5f7776;padding:25px 5px;font-size:10px}.footerbar{padding:11px 18px;font-size:8px;letter-spacing:.4px;background:#131e23;border-top:1px solid #334044;display:flex;justify-content:space-between;gap:20px;color:#a2b09d}.footerbar>span:last-child{font-size:7px;white-space:nowrap;color:#6e8b81}.page-footer{display:flex;justify-content:space-between;padding:24px 0 30px;font-size:9px;color:#748784;letter-spacing:.5px}.page-footer>span:last-child{font-size:7px;letter-spacing:1.5px}.page-footer b{color:var(--orange);margin-left:15px}#title-screen{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(90deg,#11181aed,#131b1eb8 35%,#141c20a8 65%,#11181ae0);z-index:4;text-align:center}.presenter{font-size:8px;letter-spacing:4px;color:#e4b76c;margin-bottom:12px}h1{margin:0;font-family:var(--pixel-font);font-weight:bold;font-size:clamp(26px,5.2vw,68px);line-height:.82;letter-spacing:-3px;text-shadow:3px 4px #15181a;color:#f5e5c9}h1 small{display:block;font-family:var(--pixel-font);font-size:10px;letter-spacing:7px;line-height:1;margin-bottom:10px}h1 span{font-size:1.2em;letter-spacing:3px}.subtitle{font-size:9px;letter-spacing:4px;color:#e7aa5b;display:flex;gap:14px;align-items:center;margin-top:17px}.subtitle i{height:1px;width:28px;background:#997346}#title-screen p{font-size:10px;line-height:1.8;color:#aab4aa;margin:16px 0}.primary{display:block;background:#edb36d;color:#192025;border:1px solid #ffcf93;padding:12px 23px;min-width:170px;text-align:left;font-size:11px;font-weight:bold;box-shadow:3px 3px #040c0e}.primary:hover{background:#f8c587;color:#111b22}.primary span{float:right}#continue{font-size:9px;margin-top:12px;color:#c5d4ba}.title-meta{position:absolute;bottom:14px;left:20px;right:20px;display:flex;justify-content:space-between;font-size:6px;letter-spacing:1.6px;color:#8d9b91}#cinematic{position:absolute;inset:0;background:linear-gradient(90deg,#10171aec,#11191ac9 60%,#10171a80);z-index:5;padding:12% 8% 7%;max-height:100%;display:flex;flex-direction:column;align-items:flex-start}#cinematic-kicker{font-size:9px;letter-spacing:3px;color:var(--orange)}#cinematic h2{font-family:var(--pixel-font);font-size:36px;font-weight:400;max-width:520px;margin:18px 0}#cinematic p{font-size:12px;line-height:1.9;color:#d3d6c3;max-width:500px;margin:0 0 18px}#cinematic-next{color:var(--orange);border-bottom:1px solid #a8864f;padding:8px 0;font-size:11px}#skip-intro{position:absolute;right:20px;bottom:17px;font-size:9px;color:#a4b6a8}#dialogue{position:absolute;left:8%;right:8%;bottom:16px;background:#111c22f2;border:1px solid #ab946c;box-shadow:4px 5px #0008;z-index:6;padding:15px 19px}.dialogue-top{display:flex;justify-content:space-between;align-items:center}#speaker{font-size:9px;letter-spacing:2px;color:var(--orange)}#dialogue-count{font-size:8px;color:#7f9690}#line{font-size:12px;line-height:1.7;margin:11px 0;white-space:pre-line}#next-line{float:right;font-size:9px;color:#d2bb8e}#next-line span{margin-left:20px}#wheel{position:absolute;z-index:7;background:#152229f5;border:1px solid #c0a16b;padding:8px;display:flex;gap:7px;box-shadow:3px 4px #0008}#wheel button{width:40px;font-size:19px;color:#efc488;padding:5px}#wheel span{font-size:8px;display:block;margin-top:5px}#toast{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);background:#12222af2;border:1px solid #9fb59e;padding:10px 17px;font-size:10px;z-index:8;opacity:0;transition:opacity .2s;pointer-events:none;max-width:90%;white-space:nowrap}#toast.show{opacity:1}dialog{background:#1b292e;color:var(--cream);border:1px solid #8c957e;box-shadow:10px 12px #0006;max-width:620px;width:calc(100% - 36px);padding:32px}dialog::backdrop{background:#060e13bd;backdrop-filter:blur(3px)}.close-modal{position:absolute;top:9px;right:12px;font-size:22px;color:#bac0ae}dialog h2{font-family:var(--pixel-font);font-weight:400;font-size:29px;margin:0 0 15px}dialog p{font-size:11px;line-height:1.85;color:#b6c4b6}dialog .eyebrow{font-size:8px;letter-spacing:2px;color:var(--orange);margin-bottom:11px}.task{border-top:1px solid #3e5050;padding:12px 0;display:flex;gap:11px;font-size:11px;color:#d1d6bf}.task.done{color:#809c87}.task:before{content:'[ ]';color:var(--orange)}.task.done:before{content:'[x]';color:#8ac0a0}.modal-button{display:block;border:1px solid #637366;padding:12px 15px;margin:10px 0;width:100%;text-align:left;font-size:11px;background:#111f2422}.modal-button small{display:block;color:#95a99a;font-size:9px;margin-top:7px;line-height:1.5}.modal-button:hover{background:#b48b4b19}.map-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.map-grid .modal-button{margin:0}.hint{margin-top:15px;padding:13px;background:#e9bc6a10;border-left:2px solid var(--orange);font-size:11px;line-height:1.8}.fine{font-size:9px!important;color:#7e968c!important}input[type=file]{max-width:100%;font:inherit;font-size:10px;margin-top:12px}.frequency{display:flex;gap:8px;margin-top:15px}.frequency button{flex:1;border:1px solid #708b7e;padding:14px 5px;background:#0f2028}.frequency button:hover{color:#f5ba70;border-color:#f5ba70}.fear{color:#eaa8a0!important}body.otherworld{--orange:#d18ba8;--mint:#86b7c6}body.otherworld .machine{border-color:#665169}.monster-warning{animation:pulse 1.5s infinite}@keyframes pulse{50%{opacity:.5}}@media(min-height:1000px){#app{padding-top:25px}.masthead{height:125px}}@media(max-width:850px){#app{padding:0 16px}.masthead{height:80px}.edition{display:none}.brand{font-size:15px}.brand small{font-size:6px}.commandbar{gap:8px;padding:7px 10px}.commandbar kbd{display:none}#command{font-size:7px}.lower-panel{gap:14px;padding:13px}.inventory{padding-left:14px}.character canvas{width:34px;height:34px}.character small{font-size:5px}.panel-heading{font-size:7px;letter-spacing:.7px}.panel-heading span{font-size:5px}.page-footer{font-size:7px}.statusbar{font-size:7px;padding:0 12px}#room-label{left:14px;top:12px}#room-name{font-size:19px}#act-label{font-size:6px}#cinematic{padding:7% 6%}#cinematic h2{font-size:28px;margin:12px 0}#cinematic p{font-size:10px;max-width:80%;line-height:1.7}.title-meta{font-size:5px}}@media(max-width:570px){#app{padding:0 8px}.masthead{height:70px;gap:10px}.utilities{gap:4px}.utilities button{padding:6px}.utilities span{display:none}.brand{font-size:13px;gap:9px}.brand small{font-size:5px;letter-spacing:1px}.brand-icon{width:30px;height:30px;font-size:20px}#place{display:none}.statusbar{height:28px}#stage{aspect-ratio:1.6}#scene{object-fit:cover}.lower-panel{grid-template-columns:1fr;padding:12px;gap:14px}.inventory{border-left:0;border-top:1px solid #354849;padding:12px 0 0}.character canvas{width:40px;height:40px}.character strong{font-size:9px}.character small{font-size:6px}.panel-heading{font-size:8px}.panel-heading span{font-size:6px}#items{min-height:45px}.item{max-width:65px}.item canvas{width:23px;height:23px}.verbs button{padding:6px;font-size:12px}.verbs span{font-size:9px}#command{display:none}#journal-button{margin-left:auto}#map-button span{display:none}.commandbar{min-height:44px}.footerbar{font-size:7px;padding:10px;line-height:1.5}.footerbar>span:last-child{font-size:5px}.page-footer{font-size:6px;gap:10px}.page-footer>span:last-child{font-size:5px}#title-screen h1{font-size:43px}.presenter{font-size:6px;margin-bottom:9px}h1 small{font-size:7px;margin-bottom:6px}.subtitle{font-size:6px;letter-spacing:2px;margin-top:12px}#title-screen p{font-size:8px;margin:9px 0}.primary{font-size:10px;padding:9px 16px;min-width:150px}.title-meta{bottom:10px;font-size:4px;left:12px;right:12px}#room-name{font-size:16px}#dialogue{left:4%;right:4%;bottom:8px;padding:11px 12px}#line{font-size:10px;line-height:1.6;margin:8px 0}#speaker{font-size:8px}#cinematic{padding:8% 6%}#cinematic h2{font-size:23px;margin:10px 0}#cinematic p{font-size:9px;line-height:1.65;max-width:93%;margin-bottom:8px}#cinematic-kicker{font-size:6px}#cinematic-next{font-size:9px}.scene-tool{font-size:8px;padding:6px;top:12px;right:10px}.map-grid{grid-template-columns:1fr}dialog{padding:25px 22px}#hover-label{font-size:8px;max-width:92%;white-space:normal;text-align:center}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Brighter, material-specific adventure palette. */
:root{--ink:#1b2941;--panel:#283a53;--border:#63758c;--cream:#fff0d5;--dim:#b8cbd1;--orange:#ffc56e;--mint:#72d8c3}
body{background-color:#17253c;background-image:radial-gradient(ellipse at 12% 15%,#72528b40,transparent 45%),radial-gradient(ellipse at 86% 15%,#2e96994d,transparent 50%),linear-gradient(145deg,#243049,#142337)}
.brand-icon{border-color:#6cdbcf;color:#80eddd;background:#3e98a633}.brand b{color:#a6d1dc}.brand small{color:#b4b9cd}.edition{color:#e1c3ac}.edition span{color:#91bccc}.utilities button{border-color:#4e738b;background:#2a435a;color:#d7e6df}
.machine{border-color:#8b85a9;box-shadow:0 25px 65px #080d2480,0 0 0 6px #32435e}.machine::before{content:"";display:block;height:3px;background:linear-gradient(90deg,#65d4c6 0 28%,#f2c477 28% 54%,#e68ba1 54% 78%,#a59be5 78%)}
.statusbar{background:#2a4561;color:#e7ddc2;border-bottom-color:#1c344f}.live-dot{background:#70e0c5;box-shadow:0 0 8px #70e0c555}#clock{color:#ffcf87}
.scanlines{opacity:.14}#room-label{text-shadow:1px 2px 0 #244052}#room-name{color:#fff2cf}#act-label{color:#ffe5a4}
#title-screen{background:linear-gradient(90deg,#132c47b8,#172d488c 36%,#182d438c 64%,#172b47ba)}.presenter{color:#9ce7de}h1{color:#fff0cc;text-shadow:3px 4px #27324e}h1 span{color:#f1b0a0}.subtitle{color:#ffdc88}.subtitle i{background:#e2ad71}#title-screen p{color:#e3e6dc;text-shadow:1px 1px #20314b}.primary{background:#ffc46d;border-color:#ffe2aa;color:#28334b;box-shadow:3px 3px #26354f}.primary:hover{background:#ffdb91;color:#24314c}.title-meta{color:#cfddd6}
.commandbar{background:#29465d;border-top-color:#17394e;border-bottom-color:#5e8192}.verbs button[data-action=look]{color:#8de2d9}.verbs button[data-action=talk]{color:#f6b8cd}.verbs button.active{color:#ffe1a2;border-color:#e8b266;background:#dca65e26}#command{color:#bad9d9}.commandbar kbd{color:#9bbbc8}#journal-button{color:#ffd18b}#map-button{color:#a4e1d8}
.lower-panel{background:linear-gradient(120deg,#2c3d5c,#264556)}.panel-heading{color:#ffdda7}.panel-heading span{color:#a9c7d1}.inventory{border-color:#587789}.character{background:#233b55;border-color:#5c7b8b}.character strong{color:var(--person-color,#e8ddd3)}.character small{color:#b2c9d4}.char-key{color:#b2ccd7}.character.selected{border-color:var(--person-color,#ffd18b);background:#8c83bc25;box-shadow:inset 0 -2px 0 var(--person-color,#ffd18b)}
.item{background:#203e53;border-color:#557b8c;color:#e0e6d3}.item.selected{color:#ffe0a0;background:#ad825b33;border-color:#ffcc7b}.empty{color:#a2c6c9}.footerbar{background:#20374f;border-color:#4b6c82;color:#d2ddcc}.footerbar>span:last-child{color:#98c7b8}.page-footer{color:#a7c3ca}
.scene-tool{background:#26425bdc;border-color:#8fc4bb;color:#e1f3d8}#hover-label{background:#213954f2;border-color:#edc280;color:#ffe4af}#wheel{background:#293c5af5;border-color:#f0bd80}#wheel button{color:#ffe0a0}#wheel button[data-verb=look]{color:#8ce0d5}#wheel button[data-verb=talk]{color:#f6b8cc}
#dialogue{background:#243751f5;border-color:#e9bb83}#speaker{color:#ffd087}#line{color:#fff0d9}#next-line{color:#9ce1d4}#toast{background:#26445cf2;border-color:#8fddca;color:#e9ffe0}
#cinematic{background:linear-gradient(90deg,#192a47ed,#293a58c9 60%,#24405370)}#cinematic p{color:#eee8d4}#cinematic-kicker{color:#ffc57b}#cinematic-next{color:#a5ebdf;border-color:#78b7b1}
dialog{background:#293c58;border-color:#bea0be}dialog p{color:#d5dfda}.task{border-color:#58728a;color:#f0e6d2}.task.done{color:#9fdbc0}.modal-button{border-color:#708b9b;background:#24465944}.modal-button small{color:#b4cdd0}.modal-button:hover{background:#af85bd22}.fine{color:#b2c4d0!important}
body.otherworld{--orange:#f3a4da;--mint:#8de2ef;background-image:radial-gradient(ellipse at 18% 20%,#9c4d9240,transparent 50%),linear-gradient(145deg,#292b55,#182a45)}body.otherworld .machine{border-color:#b27fbd}body.otherworld .statusbar{background:#3c3d69}body.otherworld .commandbar{background:#3b426a}body.otherworld .lower-panel{background:linear-gradient(120deg,#3b3e65,#2d425d)}body.otherworld #room-label{color:#ffe1ee}

/* Larger individual portraits, including the current speaker. */
.character canvas{width:64px;height:70px;max-width:100%;object-fit:contain}.character{padding-top:7px;padding-bottom:8px}.character small{font-size:7px;line-height:1.4}.character strong{font-size:10px}
#dialogue.has-portrait{padding-left:112px;min-height:120px}#dialogue-portrait{position:absolute;left:17px;top:15px;width:72px;height:79px;image-rendering:pixelated;border:1px solid #8d9dac;background:#293e58}
@media(max-width:1000px){.character canvas{width:52px;height:57px}.character small{font-size:6px}.character strong{font-size:9px}}
@media(max-width:850px){.character canvas{width:40px;height:44px}.character small{font-size:5px}}
@media(max-width:570px){.character canvas{width:50px;height:55px}.character small{font-size:6px}#dialogue.has-portrait{padding-left:80px;min-height:108px}#dialogue-portrait{left:11px;top:15px;width:56px;height:62px}}

/* The supplied photograph, repainted as pixel art, is the opening image. */
.machine.title-mode #stage{aspect-ratio:auto;background:#1e3450}.machine.title-mode #scene,.machine.title-mode .scanlines,.machine.title-mode .commandbar,.machine.title-mode .lower-panel,.machine.title-mode .footerbar{display:none}
#title-screen{position:relative;inset:auto;display:block;text-align:left;background:#243851}
#title-art{display:block;width:100%;height:auto;max-height:55vh;object-fit:contain;image-rendering:pixelated;background:#1b2e46}
.title-bottom{display:grid;grid-template-columns:1fr auto;gap:28px;align-items:center;padding:21px 35px 18px;border-top:1px solid #bd9565;background:linear-gradient(110deg,#2b405d,#2a4b5c)}
#title-screen .presenter{font-size:8px;letter-spacing:3px;margin-bottom:11px;color:#a8e5d5}
#title-screen .title-heading h1{font-size:clamp(26px,4.2vw,48px);line-height:.83;letter-spacing:-1.5px;margin:0;color:#ffedc8}
#title-screen .title-heading h1 small{font-size:8px;letter-spacing:5px;margin-bottom:7px}
#title-screen .title-heading h1 span{font-size:1.05em;letter-spacing:3px;color:#f3b6a4}
#title-screen .subtitle{font-size:8px;letter-spacing:2px;margin-top:11px;gap:10px}#title-screen .subtitle i{width:20px}
#title-screen .title-actions{min-width:210px;text-align:left}#title-screen .title-actions p{font-size:10px;color:#e0e6d8;line-height:1.8;margin:0 0 12px}#title-screen .primary{min-width:210px;width:100%;padding:12px 18px}#title-screen #continue{margin-top:12px;padding:0;font-size:10px;color:#abdfd1}
#title-screen .title-meta{position:relative;inset:auto;display:flex;gap:20px;justify-content:space-between;padding:10px 35px;background:#1f324b;color:#b1c5cb;font-size:6px;letter-spacing:1.3px}
@media(max-width:570px){#title-art{max-height:52vh}.title-bottom{padding:16px 13px;gap:12px}#title-screen .presenter{font-size:5px;letter-spacing:1.5px;margin-bottom:8px}#title-screen .title-heading h1{font-size:26px}#title-screen .title-heading h1 small{font-size:6px;margin-bottom:6px}#title-screen .subtitle{font-size:5px;letter-spacing:1px;margin-top:10px;gap:5px}#title-screen .subtitle i{width:10px}#title-screen .title-actions{min-width:136px}#title-screen .title-actions p{font-size:7px;line-height:1.7;margin-bottom:9px}#title-screen .primary{min-width:136px;font-size:9px;padding:10px 11px}#title-screen #continue{font-size:7px;margin-top:10px}#title-screen .title-meta{padding:9px 13px;font-size:5px;letter-spacing:.7px;gap:10px}}
@media(max-width:360px){.title-bottom{grid-template-columns:1fr;gap:17px;text-align:center}#title-screen .subtitle{justify-content:center}#title-screen .title-actions{text-align:center;max-width:220px;justify-self:center;width:100%}#title-screen .title-actions p{font-size:8px}}

/* Permanent classic adventure verbs and a readable sentence line. */
.commandbar{display:grid;grid-template-columns:1fr auto auto;gap:8px 15px;padding:10px 16px 13px;background:#142336;border-top:3px solid #101a2a}
#command{grid-column:1;grid-row:1;display:block!important;min-height:20px;font-size:13px;line-height:1.5;letter-spacing:.2px;color:#f0b6df;text-transform:none}
#journal-button{grid-column:2;grid-row:1}#map-button{grid-column:3;grid-row:1}
.verbs{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px 7px}
.verbs button{padding:7px 9px;border:1px solid #344c66;text-align:left;background:#1c3048;color:#8cdec6!important;min-height:31px;font-family:var(--pixel-font);font-weight:bold}
.verbs span{font-size:13px;letter-spacing:0;margin:0}.verbs button.active{border-color:#df97c4;background:#713e6a55;color:#ffb8e3!important;box-shadow:inset 3px 0 #ffb8e3}.verbs button:hover{color:#fff1c5!important;background:#34516c}
#hover-label{display:none}#wheel{display:none!important}
@media(max-width:850px){.commandbar{padding:8px 11px 10px;gap:7px}.verbs{gap:3px 5px}.verbs button{padding:6px}.verbs span{font-size:11px}#command{font-size:11px}}
@media(max-width:570px){.verbs{grid-template-columns:repeat(3,minmax(0,1fr))}.verbs button{min-height:30px}.verbs span{font-size:12px}.commandbar{gap:6px;padding:8px}#command{font-size:11px}#stage{aspect-ratio:2}#scene{object-fit:fill}#room-label{top:8px}#room-name{font-size:13px}#act-label{letter-spacing:1px;font-size:5px}.scene-tool{top:8px}}

/* Quiet title-screen photo dissolves; the original image remains the portrait source. */
.title-gallery{position:relative;aspect-ratio:3/2;max-height:55vh;width:100%;background:#182a43;overflow:hidden}
.title-gallery #title-art,.title-gallery-image{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain;image-rendering:pixelated;opacity:0;transition:opacity 1.8s ease-in-out}
.title-gallery #title-art.is-visible,.title-gallery-image.is-visible{opacity:1}
.gallery-toolbar{position:absolute;bottom:0;left:0;right:0;padding:8px 14px;background:linear-gradient(transparent,#14263cda);display:flex;align-items:center;justify-content:space-between;gap:10px;color:#f7e5c5;font-size:9px}
.gallery-toolbar>div{display:flex;gap:4px}.gallery-toolbar button{background:#20394dc9;border:1px solid #7891a0;padding:4px 9px;font-size:13px;min-width:32px;color:#f4dfba}.gallery-toolbar button:focus-visible{outline:2px solid #ffcf89;outline-offset:2px}
.story-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.story-controls .modal-button{margin:0}.story-field{display:flex;flex-direction:column;gap:8px;font-size:11px;color:#f5dfbf;margin:8px 0}.story-field select{font:inherit;padding:10px;background:#172d43;color:#fff0d2;border:1px solid #8ca5ad;width:100%}.story-sequence,.story-diagram{border:1px solid #607c91;padding:12px;font-size:12px;line-height:1.8;white-space:pre-wrap}.story-diagram{font-family:var(--pixel-font)}#story-feedback{color:#ffc999;min-height:20px}.inventory{max-height:330px;overflow:auto;scrollbar-color:#8ca6b1 #20374c}
@media(max-width:570px){.gallery-toolbar{font-size:6px;padding:5px 7px}.gallery-toolbar button{font-size:11px;min-width:27px;padding:3px 7px}.story-controls{grid-template-columns:1fr}.title-gallery{max-height:52vh}.inventory{max-height:250px}}
@media(prefers-reduced-motion:reduce){.title-gallery #title-art,.title-gallery-image{transition:none}}

/* The other side: rust, ash and dead red light. School and title colours stay intact. */
body.otherworld{--orange:#df9a73;--mint:#bb8b72;--cream:#ecdbc8;--dim:#b19c91;background:#100a0c;background-image:radial-gradient(ellipse at 65% 6%,#5c211e55,transparent 65%),linear-gradient(#1d1012,#0d090b)}
body.otherworld .machine{border-color:#684037;box-shadow:0 25px 65px #000b,0 0 0 6px #211416}
body.otherworld .statusbar{background:#2c191c;border-color:#100a0c;color:#cfb09b}
body.otherworld .commandbar{background:#2a191b;border-color:#56352e}
body.otherworld .lower-panel{background:linear-gradient(#291a1c,#1b1215)}
body.otherworld .footerbar{background:#190f12;border-color:#50312d;color:#c6aa94}
body.otherworld #room-label{color:#e4c3a5}body.otherworld #act-label{color:#cb9c7c}
body.otherworld .scene-tool,body.otherworld #hover-label,body.otherworld #wheel{background:#211215ef;border-color:#98604a;color:#ead0b7}
body.otherworld .character,body.otherworld .item{background:#190f13;border-color:#5d3a32;color:#dfc5ae}
body.otherworld .character.selected,body.otherworld .item.selected{background:#6b342522;border-color:#cf8d65}
body.otherworld .character small,body.otherworld .panel-heading span{color:#b39787}
body.otherworld .inventory{border-color:#5d3a32}
body.otherworld #dialogue,body.otherworld #dialogue-portrait,body.otherworld #toast{background:#241417f5;border-color:#a77859;color:#ead4bd}
body.otherworld #speaker,body.otherworld #cinematic-kicker{color:#e9a37c}
body.otherworld #line,body.otherworld #cinematic p{color:#f0deca}
body.otherworld #next-line,body.otherworld #cinematic-next{color:#e2b992;border-color:#8c5743}
body.otherworld #cinematic{background:linear-gradient(90deg,#130b0df5,#1c0e11df 55%,#1c0d1050)}
body.otherworld dialog{background:#27171b;border-color:#9b6a54;color:#ecd3bb}
body.otherworld dialog p{color:#dac2ad}body.otherworld .modal-button{background:#321e1d44;border-color:#86604d}
body.otherworld .modal-button small,body.otherworld .fine{color:#c3a58e!important}
body.otherworld .task{border-color:#674035;color:#e4cbb3}body.otherworld .task.done{color:#ba8c72}
body.otherworld .story-field select{background:#170d11;border-color:#98634b;color:#ecd2b6}
body.otherworld .verbs button{background:#28171b;border-color:#624035;color:#d7b397!important}
body.otherworld .verbs button.active{background:#64302666;border-color:#cb8a62;color:#f6cfaa!important;box-shadow:inset 3px 0 #cb8a62}
body.otherworld .verbs button:hover{background:#4c2925;color:#fff0d9!important}
body.otherworld .brand-icon{border-color:#a66b50;color:#d4a486;background:#682b2522}
body.otherworld .utilities button{background:#2c1a1c;border-color:#704637;color:#dbbca2}
body.otherworld .machine:before{background:#783629}
body.otherworld #command,body.otherworld #map-button,body.otherworld #journal-button{color:#dab493}
body.otherworld .page-footer,body.otherworld .page-footer>span:last-child{color:#a17c69}

/* Original AXAIA SOFT artwork, displayed without recolouring or cropping. */
.brand-logo{display:block;width:48px;height:48px;object-fit:contain;flex-shrink:0}
@media(max-width:570px){.brand-logo{width:38px;height:38px}}
#score-strip{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:7px 18px;background:#20354c;border-bottom:1px solid #52697d;color:#d6d9c8;font-size:9px;line-height:1.5}#score-open{white-space:nowrap;padding:4px 7px;color:#ffdb9b}.title-mode #score-strip{display:none}body.otherworld #score-strip{background:#211317;border-color:#633c31;color:#d5b59a}body.otherworld #score-open{color:#e1ae83}.score-player{border:1px solid #718193;padding:15px;margin:17px 0}.score-player h3{font-size:15px;line-height:1.5;margin:7px 0}.score-buttons{display:flex;gap:7px}.score-buttons .modal-button{text-align:center;flex:1;padding:10px 4px}.score-volume{display:flex;align-items:center;gap:14px;font-size:11px;margin:8px 0 18px}.score-volume input{max-width:180px;accent-color:#d8aa75}.score-player summary{cursor:pointer;font-size:11px;padding:8px 0}.score-track{display:block;width:100%;padding:10px 0;text-align:left;font-size:10px;line-height:1.5;border-bottom:1px solid #75838b44}.score-track span{color:#caa16d;margin-right:8px}.score-track[aria-pressed=true]{color:#ffe0a4}body.otherworld .score-player{border-color:#855540}@media(max-width:570px){#score-strip{padding:7px 12px;font-size:8px}.score-volume input{max-width:140px}}

/* Fit the complete adventure to the visible viewport, without cropping the scene. */
html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
#app{position:fixed;left:50%;top:50%;width:var(--layout-width,1100px);max-width:none;padding:0 8px;margin:0;transform:translate(-50%,-50%) scale(var(--layout-scale,1));transform-origin:center center}
.masthead{height:64px;gap:14px}.brand-logo{width:40px;height:40px}.brand{font-size:17px}.brand small{font-size:7px}.edition{font-size:8px}.utilities button{padding:7px 9px}
.machine{box-shadow:0 8px 30px #080d2480,0 0 0 3px #32435e}
.statusbar{height:27px;font-size:8px}
#stage,body.vernon-reveal #stage{aspect-ratio:2;min-height:0}
#scene,body.vernon-reveal #scene{position:static;width:100%;height:100%;object-fit:fill;opacity:1}
.commandbar{padding:6px 12px 8px;gap:5px 10px}#command{font-size:12px;min-height:18px}.verbs{gap:3px 6px}.verbs button{min-height:25px;padding:4px 8px}.verbs span{font-size:12px}
.lower-panel{padding:9px 12px 10px;gap:16px;grid-template-columns:1.18fr 1fr}.panel-heading{margin-bottom:6px}.character{padding:4px 2px}.character canvas{width:45px;height:49px;margin-bottom:3px}.character strong{font-size:9px}.character small{font-size:6px;margin-top:3px}
.inventory{overflow:visible;max-height:none;padding-left:16px}.inventory-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.inventory-top .panel-heading{flex:1}#items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;min-height:0}.item{min-width:0;max-width:none;padding:3px}.item canvas{width:25px;height:25px}.item span{font-size:7px;line-height:1.2;margin-top:2px}.empty{grid-column:1/-1;padding:20px 0;font-size:9px}
.viewport-pager{display:flex;align-items:center;justify-content:center;gap:9px;font-size:10px}.viewport-pager button{border:1px solid #8da5ad;padding:3px 8px;min-width:29px;background:#14263c66}.viewport-pager button:disabled{opacity:.35}.inventory .viewport-pager{font-size:8px;gap:4px;margin-bottom:6px}.inventory .viewport-pager button{padding:1px 6px;min-width:22px}
.viewport-page-hidden{display:none!important}
#score-strip{padding:3px 12px;font-size:8px}#score-open{padding:3px 5px}.footerbar{padding:7px 12px;font-size:8px;line-height:1.4;gap:12px}.footerbar>span:last-child{font-size:6px}.page-footer{padding:10px 0;font-size:8px}
.machine.title-mode #stage{aspect-ratio:auto}.title-gallery{height:400px;aspect-ratio:auto;max-height:none}#title-art{max-height:none}.title-bottom{padding:18px 26px;gap:20px}#title-screen .title-heading h1{font-size:43px}#title-screen .title-meta{padding:9px 26px}
#cinematic{padding:5% 6%}#cinematic h2{font-size:30px;margin:10px 0}#cinematic p{font-size:12px;line-height:1.65;max-width:65%;margin:0 0 10px}#cinematic-kicker{font-size:8px}#cinematic-next{font-size:11px;padding:6px 0}#skip-intro{bottom:14px;font-size:9px}
#dialogue{bottom:10px;left:5%;right:5%;padding:12px 15px}#dialogue.has-portrait{padding-left:91px;min-height:101px}#dialogue-portrait{left:12px;top:12px;width:61px;height:67px}#line{font-size:12px;line-height:1.5;margin:9px 0}
#toast{white-space:normal;text-align:center;line-height:1.4}
dialog{position:fixed;inset:auto;left:50%;top:50%;margin:0;width:var(--modal-width,600px);max-width:none;max-height:none;padding:25px 27px 18px;overflow:visible;transform:translate(-50%,-50%) scale(var(--modal-scale,1));transform-origin:center center}
dialog h2{font-size:26px;margin-bottom:12px}dialog p{line-height:1.65}.task{padding:9px 0}.modal-button{padding:10px 12px;margin:8px 0}.map-grid{grid-template-columns:1fr 1fr;gap:6px}.map-grid .modal-button{margin:0}.story-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.story-field select{padding:7px}.score-player{padding:11px;margin:10px 0}.score-track{padding:7px 0}.score-volume{margin-bottom:10px}.score-player h3{font-size:14px}.score-buttons .modal-button{padding:8px 3px}.modal-pages{border-top:1px solid #8da5ad66;margin-top:12px;padding-top:10px;justify-content:space-between}.modal-page-label{max-width:65%;line-height:1.4;text-align:center;font-size:9px}
@media(max-width:600px){
 .masthead{height:56px;gap:8px}.brand{font-size:14px;gap:7px}.brand-logo{width:35px;height:35px}.brand small{font-size:5px;letter-spacing:1px}.edition{display:none}.utilities{gap:4px}.utilities button{padding:6px}.utilities span{display:none}
 .statusbar{height:25px;font-size:7px;padding:0 9px}#place{display:none}.commandbar{padding:6px;gap:5px}#command{font-size:10px}#journal-button,#map-button{font-size:14px}#map-button span{display:inline;font-size:9px}.verbs{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.verbs button{min-height:26px;padding:4px 6px}.verbs span{font-size:11px}
 .lower-panel{grid-template-columns:1fr;gap:8px;padding:8px}.character canvas{width:44px;height:48px}.character small{font-size:5px}.panel-heading{font-size:8px}.inventory{border-left:0;border-top:1px solid #587789;padding:7px 0 0}.inventory-top .panel-heading{margin:0}#items{grid-template-columns:repeat(4,minmax(0,1fr))}.item canvas{width:24px;height:24px}.inventory-top{margin-bottom:6px}.inventory .viewport-pager{margin:0}.empty{padding:8px 0}.footerbar{padding:6px 8px;font-size:7px}.footerbar>span:last-child{font-size:5px}.page-footer{padding:8px 0;font-size:6px}.page-footer>span:last-child{font-size:5px}
 .title-gallery{height:310px}.title-bottom{grid-template-columns:1fr auto;padding:14px 12px;gap:12px;text-align:left}#title-screen .title-heading h1{font-size:27px}#title-screen .title-actions{min-width:130px;width:auto}#title-screen .title-actions p{font-size:7px}#title-screen .primary{min-width:130px;font-size:9px;padding:10px}#title-screen .subtitle{justify-content:flex-start}#title-screen .title-meta{padding:9px 12px;font-size:5px}
 #room-label{left:10px;top:8px}#room-name{font-size:14px}#act-label{font-size:6px}.scene-tool{font-size:8px;padding:5px;top:8px;right:8px}
 #cinematic{padding:12px 16px;background:#160f21de}#cinematic h2{font-size:21px;max-width:100%;margin:7px 0}#cinematic p{max-width:100%;font-size:10px;line-height:1.5;margin-bottom:6px}#cinematic-kicker{font-size:6px}#cinematic-next{font-size:9px;padding:5px 0}#skip-intro{font-size:8px;bottom:11px;right:14px}
 #dialogue{left:3%;right:3%;bottom:6px;padding:8px 10px}#dialogue.has-portrait{padding-left:65px;min-height:80px}#dialogue-portrait{left:8px;top:9px;width:46px;height:51px}#line{font-size:10px;line-height:1.45;margin:6px 0}#speaker{font-size:8px;letter-spacing:1px}#next-line{font-size:8px}
 dialog{padding:24px 18px 15px}.map-grid{grid-template-columns:1fr 1fr}.story-controls{grid-template-columns:1fr 1fr}.modal-button{font-size:10px}.modal-button small{font-size:8px}.story-field{font-size:10px}dialog h2{font-size:23px}
}
@media(max-height:620px) and (min-width:480px){
 .masthead{height:43px}.brand-logo{width:30px;height:30px}.brand{font-size:14px}.brand small{font-size:5px;margin-top:4px}.edition{line-height:1.6}.statusbar{height:22px}
 .commandbar{padding:4px 9px;gap:3px 9px}.verbs button{min-height:22px;padding:2px 6px}.verbs span{font-size:11px}#command{font-size:11px;min-height:16px}.character canvas{width:30px;height:33px}.character small{font-size:5px}.character strong{font-size:8px}.lower-panel{padding:6px 9px;gap:12px}.panel-heading{font-size:7px;margin-bottom:4px}.item canvas{width:20px;height:20px}.item span{font-size:6px}.inventory{padding-left:12px}.footerbar{padding:4px 9px;font-size:7px}.page-footer{padding:6px 0;font-size:7px}#score-strip{padding:1px 9px}
 .title-gallery{height:300px}.title-bottom{padding:12px 23px}#title-screen .title-heading h1{font-size:35px}#title-screen .presenter{margin-bottom:8px}#title-screen .title-meta{padding:7px 23px}
}
/* Short landscape windows use a side panel to keep controls readable. */
@media(max-height:620px) and (min-width:480px){
 .machine:not(.title-mode){display:grid;grid-template-columns:minmax(0,1fr) 300px;align-items:start}
 .machine:not(.title-mode)::before{grid-column:1/-1;grid-row:1}
 .machine:not(.title-mode) .statusbar{grid-column:1/-1;grid-row:2}
 .machine:not(.title-mode) #stage{grid-column:1;grid-row:3/5;width:100%;align-self:center}
 .machine:not(.title-mode) .commandbar{grid-column:2;grid-row:3;width:100%;border-left:1px solid #587789}
 .machine:not(.title-mode) .verbs{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
 .machine:not(.title-mode) .verbs span{font-size:10px}
 .machine:not(.title-mode) #command{font-size:9px}
 .machine:not(.title-mode) #journal-button,.machine:not(.title-mode) #map-button{font-size:12px}
 .machine:not(.title-mode) #journal-button span,.machine:not(.title-mode) #map-button span{font-size:9px}
 .machine:not(.title-mode) .commandbar kbd{display:none}
 .machine:not(.title-mode) .lower-panel{grid-column:2;grid-row:4/6;grid-template-columns:1fr;gap:7px;width:100%;border-left:1px solid #587789}
 .machine:not(.title-mode) .inventory{border-left:0;border-top:1px solid #587789;padding:6px 0 0}
 .machine:not(.title-mode) .inventory-top{margin-bottom:3px}.machine:not(.title-mode) .inventory-top .panel-heading{margin:0}
 .machine:not(.title-mode) #score-strip{grid-column:1;grid-row:5;align-self:end;width:100%}
 .machine:not(.title-mode) .footerbar{grid-column:1/-1;grid-row:6;width:100%}
}

/* Keep utility controls in the game frame; the former masthead takes no space. */
.statusbar{height:34px;gap:12px;padding:0 12px}
.statusbar>div:first-child{flex:1;min-width:0}
.statusbar .utilities{gap:4px;flex-shrink:0}
.statusbar .utilities button{padding:4px 7px;min-width:26px;border-radius:2px;font-size:13px;line-height:1}
.statusbar .utilities span{font-size:8px;letter-spacing:0}
#clock{white-space:nowrap}
.title-gallery{height:448px}
@media(max-width:600px){.statusbar{height:34px;gap:7px;padding:0 7px;letter-spacing:.4px}.statusbar #chapter{font-size:7px;line-height:1.25}.statusbar .utilities{gap:3px}.statusbar .utilities button{padding:4px 5px;min-width:23px}.statusbar .utilities span{display:none}.title-gallery{height:350px}}
@media(max-height:620px) and (min-width:480px){.statusbar{height:32px}.title-gallery{height:330px}}

/* Edge-to-edge game window. Controls use real space, never a scaled outer frame. */
html,body{width:100%;height:100%;overflow:hidden;background:#14242d}#app{position:fixed!important;inset:0!important;width:100vw;height:100dvh;max-width:none!important;margin:0!important;padding:0!important;transform:none!important}
.page-footer,.machine::before{display:none!important}.machine,.machine:not(.title-mode){position:relative;width:100%;height:100%;border:0;box-shadow:none;border-radius:0;display:grid;grid-template-columns:minmax(0,1fr) clamp(215px,21vw,305px);grid-template-rows:34px minmax(0,1fr) 112px 23px 29px;align-items:stretch;overflow:hidden}
.machine .statusbar,.machine:not(.title-mode) .statusbar{grid-column:1/-1;grid-row:1;height:34px;padding:0 12px;gap:12px;font-size:9px;letter-spacing:.5px}.statusbar #chapter{font-size:9px}.statusbar #place{display:none}#story-progress{color:#aee3c8;white-space:nowrap}#threat-status{color:#edc486;white-space:nowrap;font-size:9px}#threat-status.danger{color:#ff9c8b}#clock{font-size:9px}
.machine #stage,.machine:not(.title-mode) #stage{grid-column:1;grid-row:2;aspect-ratio:auto;align-self:stretch;width:100%;min-height:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(#193847,#293e45)}body.otherworld #stage{background:linear-gradient(#180c0e,#271113)}#scene-frame{position:relative;flex:none;overflow:hidden;isolation:isolate}#scene{width:100%;height:100%;object-fit:fill!important}#room-label{left:18px;top:15px}#room-name{font-size:22px}#act-label{font-size:8px}
.machine .commandbar,.machine:not(.title-mode) .commandbar{grid-column:1;grid-row:3;width:auto;display:grid;grid-template-columns:1fr auto auto;grid-template-rows:24px 1fr;padding:6px 12px;gap:3px 12px;min-height:0;border-left:0}.commandbar #command{display:block;min-height:0;grid-row:1;grid-column:1;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.commandbar #journal-button{grid-column:2;grid-row:1;margin:0}.commandbar #map-button{grid-column:3;grid-row:1}.commandbar #journal-button,.commandbar #map-button{font-size:14px}.commandbar #journal-button span,.commandbar #map-button span{font-size:10px;display:inline}.commandbar kbd{display:none}.machine .verbs,.machine:not(.title-mode) .verbs{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px 5px}.verbs button{padding:2px 5px;min-height:0;text-align:left;font-size:11px;white-space:nowrap}.machine .verbs span{font-size:12px;margin-left:3px}
.machine .lower-panel,.machine:not(.title-mode) .lower-panel{grid-column:2;grid-row:2/5;display:flex;flex-direction:column;gap:16px;padding:15px 12px;width:auto;min-height:0;border-left:1px solid #52717a;overflow:hidden}.party{flex:none}.panel-heading{font-size:9px;letter-spacing:1px;line-height:1.4;margin-bottom:8px}.panel-heading span{font-size:7px}.machine #characters{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.character{padding:7px 3px}.character canvas{width:44px;height:48px;margin-bottom:4px}.character strong{font-size:10px}.character small{font-size:6px;margin-top:4px}.character-location{display:block;font-size:7px;line-height:1.3;color:#b5d4c6;margin-top:5px}.character:last-child{grid-column:1/-1;display:grid;grid-template-columns:50px 1fr;grid-template-rows:repeat(3,auto);align-items:center;padding:4px 14px}.character:last-child canvas{grid-column:1;grid-row:1/4}.character:last-child strong,.character:last-child small,.character:last-child .character-location{grid-column:2}.char-key{font-size:8px}#group-travel{border:1px solid #8dafac;padding:6px 10px;color:#bce1d0;font-size:9px;width:100%;margin:0 0 8px;text-align:left}#group-travel[aria-pressed=true]{background:#365b57;color:#f5e7b5}
.machine .inventory,.machine:not(.title-mode) .inventory{border:0;border-top:1px solid #557078;padding:12px 0 0;flex:1;min-height:0}#items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;min-height:0}.item{max-width:none;min-width:0;width:100%;padding:4px}.item canvas{width:28px;height:28px}.item span{font-size:8px;line-height:1.25}.inventory-top{gap:5px}.inventory-top .panel-heading{font-size:8px}.inventory-top .panel-heading span{font-size:6px}
.machine #score-strip,.machine:not(.title-mode) #score-strip{grid-column:1;grid-row:4;width:auto;align-self:stretch;padding:3px 12px;min-height:0;font-size:8px}.machine .footerbar,.machine:not(.title-mode) .footerbar{grid-column:1/-1;grid-row:5;width:auto;padding:6px 12px;font-size:8px;line-height:1.4;min-height:0;overflow:hidden}.footerbar #objective{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.footerbar #save-status{font-size:7px}
#hover-label{display:block;transform:none;bottom:auto;max-width:290px;white-space:normal;text-align:left;border:1px solid #f2d69b;box-shadow:3px 3px #101a23b0;color:#fff0c9;font-size:11px;line-height:1.6;padding:7px 10px;z-index:8}#hover-label:empty{display:none}.scene-tool{right:14px;top:15px;font-size:10px;padding:7px 10px}.nearby-object{border:1px solid #58727a;background:#142a35;padding:12px}.nearby-object>b{font-size:12px;color:#f4d7a6}.nearby-object>div{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.nearby-object .modal-button{width:auto;padding:7px 10px;margin:0;font-size:10px}
.machine.title-mode{grid-template-columns:minmax(0,1fr);grid-template-rows:34px minmax(0,1fr)}.title-mode .statusbar{grid-row:1}.machine.title-mode #stage{grid-column:1;grid-row:2}.title-mode .commandbar,.title-mode .lower-panel,.title-mode #score-strip,.title-mode .footerbar{display:none!important}#title-screen{height:100%;display:flex;flex-direction:column;justify-content:stretch}.title-gallery{width:100%;height:0!important;min-height:0;flex:1}.title-gallery img{object-fit:contain}.title-bottom{flex:none;width:100%;padding:18px 6%;display:flex;align-items:center;justify-content:space-between}.title-meta{position:static!important;flex:none;padding:8px 6%!important;width:100%}.title-heading h1,#title-screen .title-heading h1{font-size:47px}.presenter{font-size:7px}.title-mode #room-label{display:none}
#cinematic{inset:34px 0 0;min-height:0!important;max-height:none!important;padding:0;display:grid;grid-template-rows:minmax(0,1fr) auto;align-items:stretch;transform:none!important;background:#100e12;z-index:20;overflow:hidden}#cinematic-art{width:100%;height:100%;min-height:0;object-fit:contain;image-rendering:pixelated;display:block;background:#100e12}.cinematic-text{padding:22px max(28px,7%);position:relative;background:linear-gradient(#1c2229,#101a21)}#cinematic-kicker{font-size:10px}#cinematic h2{font-size:clamp(23px,3vw,38px);max-width:none;margin:10px 0}#cinematic p{font-size:12px;line-height:1.75;max-width:1100px;margin:0 0 10px}#cinematic-next{font-size:12px}#skip-intro{right:25px;bottom:24px}
#dialogue{position:absolute;inset:auto 4% 8%;z-index:21;transform:none!important;max-height:90%;padding:16px 20px}#dialogue.has-portrait{padding-left:94px;min-height:110px}#dialogue-portrait{width:60px;height:66px;left:15px;top:18px}#line{font-size:13px;line-height:1.65}#speaker{font-size:11px}#next-line{font-size:11px}#story-art{image-rendering:pixelated}#dialogue.story-beat{inset:34px 0 0;border:0;max-height:none;padding:0 7% 20px;display:flex;flex-direction:column;gap:10px;box-shadow:none;background:#111a22}#dialogue.story-beat #story-art{display:block;width:calc(100% + 16.3%);margin-left:-8.15%;height:0;flex:1;min-height:0;object-fit:contain;background:#0e1016}#dialogue.story-beat #story-caption{display:block;color:#dbbca0;font-size:13px;line-height:1.7;font-style:italic}#dialogue.story-beat #dialogue-portrait{display:none}#dialogue.story-beat #line{margin:0}#dialogue.story-beat #next-line{align-self:flex-end;flex:none}
@media(min-width:900px) and (max-height:700px){.machine,.machine:not(.title-mode){grid-template-columns:minmax(0,1fr) 235px;grid-template-rows:32px minmax(0,1fr) 96px 20px 25px}.machine .statusbar{height:32px}.machine .lower-panel{padding:8px;gap:8px}.character{padding:4px 3px}.character canvas{width:32px;height:35px}.character-location{font-size:6px;margin-top:2px}.character small{margin-top:2px}.character:last-child{padding:3px 9px}.panel-heading{margin-bottom:4px}.machine .inventory{padding-top:6px}.item canvas{width:22px;height:22px}.item span{font-size:7px}.machine .verbs span{font-size:11px}.cinematic-text{padding:14px 5%}#cinematic p{font-size:11px}}
@media(max-width:899px){.machine,.machine:not(.title-mode){grid-template-columns:minmax(0,1fr);grid-template-rows:32px minmax(0,1fr) 106px 153px 21px 26px}.machine .statusbar,.machine:not(.title-mode) .statusbar{grid-column:1;grid-row:1;height:32px;gap:8px;padding:0 8px}.statusbar #chapter{font-size:7px}#clock{display:none}#threat-status,#story-progress{font-size:8px}.machine #stage,.machine:not(.title-mode) #stage{grid-column:1;grid-row:2}.machine .commandbar,.machine:not(.title-mode) .commandbar{grid-column:1;grid-row:3;padding:4px 8px}.machine .lower-panel,.machine:not(.title-mode) .lower-panel{grid-column:1;grid-row:4;display:grid;grid-template-columns:1.2fr 1fr;padding:7px 8px;gap:8px;border-left:0;border-top:1px solid #58717b}.machine #characters{grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}.character{padding:4px 1px}.character:last-child{display:block;grid-column:auto;padding:4px 1px}.character canvas{width:28px;height:31px}.character strong{font-size:7px}.character small{display:none}.character-location{font-size:5px;line-height:1.2}.char-key{font-size:5px;left:2px;top:2px}.panel-heading{font-size:7px;margin-bottom:5px}.panel-heading span{display:none}#group-travel{font-size:8px;padding:4px;margin-bottom:4px}.machine .inventory,.machine:not(.title-mode) .inventory{padding:0 0 0 8px;border-top:0;border-left:1px solid #58717b}.inventory-top{margin-bottom:5px}#items{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}.item{padding:2px}.item canvas{width:22px;height:22px}.item span{font-size:6px}.machine #score-strip,.machine:not(.title-mode) #score-strip{grid-column:1;grid-row:5;padding:3px 8px}.machine .footerbar,.machine:not(.title-mode) .footerbar{grid-column:1;grid-row:6;padding:5px 8px;font-size:7px}.footerbar #save-status{display:none}.machine.title-mode{grid-template-rows:32px minmax(0,1fr)}.machine.title-mode #stage{grid-row:2}.title-bottom{padding:14px 5%;gap:12px}.title-heading h1,#title-screen .title-heading h1{font-size:32px}.title-actions p{display:none}.subtitle{font-size:6px;letter-spacing:1px}.title-meta{font-size:5px}.presenter{font-size:5px;letter-spacing:2px}#title-screen .primary{min-width:120px;font-size:10px;padding:10px}.title-actions{max-width:45%}#continue{font-size:8px}#room-label{left:10px;top:8px}#room-name{font-size:16px;margin-top:3px}#act-label{font-size:6px}.scene-tool{font-size:8px;padding:5px;top:10px;right:8px}#hover-label{font-size:9px;max-width:210px;padding:5px 7px}#cinematic,#dialogue.story-beat{top:32px}.cinematic-text{padding:15px 6%}#cinematic h2{font-size:25px;margin:8px 0}#cinematic p{max-width:none;font-size:11px;line-height:1.6}#cinematic-kicker{font-size:8px}#skip-intro{right:20px;bottom:20px}#dialogue{bottom:8%;padding:12px 15px}#dialogue.has-portrait{padding-left:72px;min-height:90px}#dialogue-portrait{width:43px;height:48px;left:12px;top:14px}#line{font-size:11px;line-height:1.6}#speaker{font-size:9px}#dialogue.story-beat #story-caption{font-size:11px}}
@media(max-width:899px) and (orientation:landscape){.machine,.machine:not(.title-mode){grid-template-columns:minmax(0,1fr) 215px;grid-template-rows:30px minmax(0,1fr) 20px 23px}.machine .statusbar{grid-column:1/-1;height:30px}.machine #stage,.machine:not(.title-mode) #stage{grid-row:2}.machine .commandbar,.machine:not(.title-mode) .commandbar{grid-column:2;grid-row:2;padding:4px 6px;display:flex;flex-wrap:wrap;align-content:flex-start;gap:3px;overflow:hidden}.commandbar #command{flex-basis:100%;font-size:8px;line-height:1.3;white-space:normal}.commandbar #journal-button,.commandbar #map-button{font-size:10px}.commandbar #journal-button span,.commandbar #map-button span{font-size:8px}.machine .verbs,.machine:not(.title-mode) .verbs{grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:2px}.verbs button{font-size:9px;padding:3px 1px}.machine .verbs span{font-size:9px}.machine .lower-panel,.machine:not(.title-mode) .lower-panel{grid-column:2;grid-row:2;align-self:end;height:133px;display:flex;flex-direction:column;padding:5px;gap:3px}.lower-panel .panel-heading{display:none}.machine .party{height:74px}#group-travel{padding:2px;font-size:7px;margin-bottom:3px}.character canvas{width:20px;height:22px}.character strong{font-size:6px}.character-location{font-size:5px}.machine .inventory,.machine:not(.title-mode) .inventory{padding:0;border:0}.inventory-top{float:right}.inventory-top .panel-heading{display:none}#items{display:flex;flex-wrap:nowrap;gap:2px;padding-right:43px}.item canvas{width:16px;height:16px}.item span{font-size:5px}.machine #score-strip,.machine:not(.title-mode) #score-strip{grid-row:3;grid-column:1/-1}.machine .footerbar,.machine:not(.title-mode) .footerbar{grid-row:4;grid-column:1/-1}.machine.title-mode{grid-template-columns:1fr;grid-template-rows:30px minmax(0,1fr)}.machine.title-mode #stage{grid-row:2}.title-bottom{padding:8px 6%}.title-heading h1,#title-screen .title-heading h1{font-size:24px}.title-meta{display:none}.cinematic-text{padding:9px 5%}#cinematic h2{font-size:21px;margin:5px 0}#cinematic p{font-size:10px;line-height:1.45;margin-bottom:3px}#cinematic-next{font-size:10px}#cinematic-kicker{font-size:7px}#cinematic,#dialogue.story-beat{top:30px}#dialogue.story-beat{gap:5px;padding-bottom:8px}#dialogue.story-beat #line,#dialogue.story-beat #story-caption{font-size:10px;line-height:1.35}}
/* In portrait orientation, give the space below the panorama to readable controls. */
@media(max-width:899px) and (orientation:portrait){
 .machine:not(.title-mode){grid-template-rows:32px calc(50vw) 120px minmax(0,1fr) 23px 28px}
 #stage{background:#20323c}.machine .verbs span{font-size:12px}.machine .verbs button{padding:3px 2px}.machine .commandbar{gap:4px 8px}
}
@media(max-width:899px) and (orientation:portrait) and (min-height:740px){
 .machine .lower-panel,.machine:not(.title-mode) .lower-panel{padding:12px 8px;grid-template-columns:1fr 1fr;gap:10px}.machine #characters{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.character{padding:8px 2px}.character canvas{width:38px;height:42px}.character strong{font-size:9px}.character-location{font-size:7px;line-height:1.3;margin-top:4px}.character:last-child{grid-column:1/-1;padding:5px 2px}.character:last-child canvas{width:34px;height:38px}.panel-heading{font-size:8px}.char-key{font-size:7px}#group-travel{padding:7px;font-size:9px}.item{padding:6px 2px}.item canvas{width:28px;height:28px}.item span{font-size:8px}.inventory-top{flex-wrap:wrap}.inventory-top .panel-heading{flex-basis:100%}#items{gap:6px}.inventory-top .viewport-pager{margin-bottom:3px}
}
@media(max-width:899px) and (orientation:landscape){.machine .statusbar,.machine:not(.title-mode) .statusbar{grid-column:1/-1}}

body.otherworld .cinematic-text{background:linear-gradient(#291718,#130e11)}
@media(orientation:landscape) and (max-height:480px){
 #cinematic{grid-template-columns:60% 40%;grid-template-rows:minmax(0,1fr)}#cinematic-art{grid-column:1;grid-row:1}.cinematic-text{grid-column:2;grid-row:1;display:flex;flex-direction:column;justify-content:center;padding:14px 20px}#cinematic h2{font-size:24px;line-height:1.1;margin:8px 0}#cinematic p{max-width:none;font-size:10px;line-height:1.6;margin-bottom:8px}#cinematic-next{align-self:flex-start;font-size:11px}#skip-intro{position:static;align-self:flex-end;font-size:9px;padding:5px}#cinematic-kicker{font-size:7px;line-height:1.5}
}

.footerbar #objective{white-space:normal;line-height:1.3}.footerbar{align-items:center}
/* Black control desk and five equal character cards. */
:root{--ink:#050505;--panel:#080807;--border:#49443b;--cream:#f1e5ca;--dim:#a49983;--orange:#e8b86d;--mint:#9bc7a3}body,html{background:#030303;color:#f1e5ca}.machine,.machine:not(.title-mode){background:#050505;grid-template-rows:0 minmax(0,1fr) 112px 23px 34px}
.machine #stage,.machine:not(.title-mode) #stage{background:#030303}.machine .commandbar,.machine .lower-panel,.machine .inventory,.machine #score-strip,.machine .footerbar,.machine .statusbar{background:#050505;background-image:none;border-color:#49443b;color:#d4c6ad}.machine .lower-panel{padding-top:40px}.panel-heading{color:#e6d4b2}.panel-heading span{color:#9a967f}#command{color:#e1d8bf!important}.machine .verbs button{background:#080807;border:1px solid #38362f;color:#9fcfa9;box-shadow:none;border-radius:0}.machine .verbs button:hover{color:#ffdf94;border-color:#b09161;background:#17130b}.machine .verbs button.active{background:#20180b;border-color:#d4ab68;color:#ffe3a0}.machine #journal-button,.machine #map-button{color:#d9cba7}.machine #score-strip{color:#a59e89}.machine #score-strip button{color:#d5c99f}
.machine #characters{display:grid;grid-template-columns:1fr;grid-auto-rows:62px;gap:5px}.machine .character,.machine .character:last-child{display:grid;grid-template-columns:47px minmax(0,1fr);grid-template-rows:18px 11px 15px;gap:0 8px;align-content:center;align-items:center;grid-column:auto;width:100%;height:62px;min-height:0;padding:6px 10px;background:#0a0a08;border:1px solid #484439;box-shadow:none;border-radius:0;text-align:left;overflow:hidden}.machine .character.selected{background:#1a160c;border-color:#edbf75;box-shadow:inset 3px 0 #edbf75}.machine .character:hover{border-color:#d6be89;background:#14140d}.machine .character canvas,.machine .character:last-child canvas{grid-column:1;grid-row:1/4;width:40px;height:44px;margin:0}.machine .character strong,.machine .character:last-child strong{grid-column:2;grid-row:1;font-size:11px;letter-spacing:1px;margin:0;color:#f0dfba}.machine .character small,.machine .character:last-child small{grid-column:2;grid-row:2;display:block;font-size:6px;color:#b0ac91;margin:0}.machine .character-location,.machine .character:last-child .character-location{grid-column:2;grid-row:3;font-size:8px;line-height:1.35;color:#a6caa5;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.machine .char-key{top:3px;left:3px;color:#847d68;font-size:7px}#group-travel{background:#080a06;border-color:#68735c;color:#c9dfb4;padding:7px 10px;letter-spacing:1px}#group-travel[aria-pressed=true]{background:#192313;border-color:#b2cc8e;color:#e3efc4}.machine .item{background:#0a0a08;border-color:#484439;color:#d9cbb0;box-shadow:none;border-radius:0}.machine .item.selected{background:#231a0c;border-color:#d9b470;color:#ffe4a0}.machine .item:hover{background:#14140d;border-color:#c8b07d}.viewport-pager button{background:#080807;border-color:#6b614f;color:#e7cd99}.viewport-pager span{color:#c4b69a}.footerbar #objective{color:#c5bda5}.footerbar .play-status{display:flex;gap:14px;align-items:center;flex:none}#story-progress{font-size:9px;color:#c1dfac;white-space:nowrap}#threat-status{font-size:9px;color:#e1ba7d}.footerbar>span:last-child{font-size:6px}.save-dot{background:#99bb87}
#modal{background:#080807;color:#eee2c5;border:1px solid #a3895d;box-shadow:0 14px 80px #000c}#modal::backdrop{background:#000b}.modal-button,.nearby-object{background:#10100c;color:#ecdbb6;border:1px solid #5a5342;box-shadow:none}.modal-button:hover{border-color:#dbc58d;background:#1c190f;color:#ffebaa}.modal-button small,.fine{color:#b6ac90}.eyebrow{color:#d8b06c}.task{border-color:#443e31;color:#c5bda5}.task.done{color:#abc995}.hint{background:#15180d;border-color:#7e8b59;color:#e1e0b2}.story-field select,.story-controls select{background:#17160e;color:#f0dfb3;border-color:#a58b5e}#dialogue{background:#090907f5;border-color:#b89a65}#speaker{color:#ebc384}#line{color:#efe3c8}#next-line{color:#d8e3b8}#hover-label{background:#060605f2;border-color:#a1895d;color:#f2dfb7;box-shadow:2px 2px #000a}.scene-tool{background:#070806e6;border-color:#807355;color:#e1d3af}.scene-tool:hover{background:#19180d;color:#ffe4a3}#toast{background:#0c0d08;border-color:#a38a58;color:#eddfbd}.title-bottom,#title-screen .title-meta,.cinematic-text{background:#070706;background-image:none}#title-screen{background:#050505}.title-gallery{background:#050505}.gallery-toolbar{background:#070706d9}.gallery-toolbar button{background:#080807;border-color:#75674d;color:#e5d4a9}body.otherworld .character,body.otherworld .item,body.otherworld .commandbar,body.otherworld .lower-panel,body.otherworld .footerbar{background:#070505;border-color:#49372e}body.otherworld #modal{background:#0b0707}body.otherworld .cinematic-text{background:#0c0707}
/* The toolbar is a temporary overlay. Story progress and danger remain below the scene. */
.machine .statusbar,.machine:not(.title-mode) .statusbar{position:absolute;inset:0 0 auto;display:flex;grid-column:1/-1;grid-row:auto;width:100%;height:38px;z-index:44;transform:translateY(-105%);visibility:hidden;pointer-events:none;border-bottom:1px solid #9d8557;transition:transform .16s ease,visibility .16s;padding:0 14px;background:#050504f5}.machine.toolbar-open .statusbar{transform:translateY(0);visibility:visible;pointer-events:auto}#toolbar-toggle{position:absolute;top:6px;right:10px;z-index:45;background:#080806ed;color:#eadab5;border:1px solid #817252;padding:5px 10px;font-size:10px;line-height:1.2;min-height:25px;box-shadow:2px 2px #0008}.toolbar-open #toolbar-toggle{top:43px}.machine .statusbar .utilities{margin-left:auto}.machine .statusbar #chapter{font-size:9px}.machine .statusbar #clock{display:block;font-size:10px}.machine .statusbar .utilities button{color:#eddfc0;border-color:#6d6049}.machine.title-mode{grid-template-rows:0 minmax(0,1fr)}#cinematic{top:0}#dialogue.story-beat{top:0}#dialogue.story-beat{background:#060605}
@media(min-width:900px) and (max-height:700px){.machine,.machine:not(.title-mode){grid-template-rows:0 minmax(0,1fr) 96px 20px 30px}.machine .lower-panel{padding:40px 9px 8px;gap:10px}.machine #characters{grid-auto-rows:48px;gap:4px}.machine .character,.machine .character:last-child{height:48px;grid-template-columns:34px minmax(0,1fr);grid-template-rows:14px 8px 11px;gap:0 7px;padding:4px 7px}.machine .character canvas,.machine .character:last-child canvas{width:29px;height:32px}.machine .character strong,.machine .character:last-child strong{font-size:9px}.machine .character small,.machine .character:last-child small{font-size:5px}.machine .character-location,.machine .character:last-child .character-location{font-size:7px}.machine .inventory{padding-top:8px}.panel-heading{margin-bottom:5px;font-size:8px}#group-travel{padding:5px 8px;font-size:8px}}
@media(max-width:899px){.machine,.machine:not(.title-mode){grid-template-rows:0 minmax(0,1fr) 106px 153px 23px 38px}.machine .lower-panel,.machine:not(.title-mode) .lower-panel{padding:8px;gap:9px}.machine #characters{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:76px;gap:3px}.machine .character,.machine .character:last-child{height:76px;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:4px 1px;text-align:center}.machine .character canvas,.machine .character:last-child canvas{width:29px;height:32px;flex:none}.machine .character strong,.machine .character:last-child strong{font-size:7px;letter-spacing:0}.machine .character small,.machine .character:last-child small{display:none}.machine .character-location,.machine .character:last-child .character-location{font-size:5px;white-space:normal;margin:0;width:100%}.machine.title-mode{grid-template-rows:0 minmax(0,1fr)}.scene-tool{right:86px;top:9px}.footerbar .play-status{gap:8px;flex-direction:column;align-items:flex-end}#story-progress,#threat-status{font-size:7px}.machine .footerbar,.machine:not(.title-mode) .footerbar{padding:4px 8px;gap:10px;font-size:7px;overflow:hidden}.footerbar #objective{white-space:normal;line-height:1.35}.machine .statusbar #chapter{font-size:7px}.machine .statusbar .utilities span{display:none}.machine .statusbar{gap:8px;padding:0 8px}#toolbar-toggle{font-size:9px;min-height:23px;padding:4px 8px}#cinematic,#dialogue.story-beat{top:0}}
@media(max-width:899px) and (orientation:portrait){.machine:not(.title-mode){grid-template-rows:0 calc(50vw) 120px minmax(0,1fr) 23px 40px}}
@media(max-width:899px) and (orientation:portrait) and (min-height:740px){.machine #characters{grid-template-columns:1fr;grid-auto-rows:51px;gap:5px}.machine .character,.machine .character:last-child{height:51px;display:grid;grid-template-columns:32px minmax(0,1fr);grid-template-rows:17px 0 13px;gap:0 5px;padding:5px 6px;text-align:left}.machine .character canvas,.machine .character:last-child canvas{width:29px;height:32px}.machine .character strong,.machine .character:last-child strong{font-size:9px;letter-spacing:.4px}.machine .character-location,.machine .character:last-child .character-location{font-size:6px;white-space:normal}.machine .lower-panel,.machine:not(.title-mode) .lower-panel{padding:11px 8px}}
@media(max-width:899px) and (orientation:landscape){.machine,.machine:not(.title-mode){grid-template-columns:minmax(0,1fr) 215px;grid-template-rows:0 minmax(0,1fr) 20px 31px}.machine .lower-panel,.machine:not(.title-mode) .lower-panel{height:140px;padding:4px;gap:3px}.machine .commandbar,.machine:not(.title-mode) .commandbar{padding-top:31px}.machine .party{height:78px}.machine #characters{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:53px;gap:2px}.machine .character,.machine .character:last-child{height:53px;display:flex;flex-direction:column;justify-content:center;gap:1px;padding:3px 1px}.machine .character canvas,.machine .character:last-child canvas{width:20px;height:22px}.machine .character strong,.machine .character:last-child strong{font-size:6px}.machine .character-location,.machine .character:last-child .character-location{font-size:5px;white-space:nowrap}.machine .footerbar,.machine:not(.title-mode) .footerbar{grid-row:4}.footerbar .play-status{flex-direction:row}.machine.title-mode{grid-template-columns:1fr;grid-template-rows:0 minmax(0,1fr)}.machine .scene-tool{right:10px}.toolbar-open #toolbar-toggle{top:43px}#cinematic,#dialogue.story-beat{top:0}}
@media(prefers-reduced-motion:reduce){.machine .statusbar{transition:none}}

.save-dot,.live-dot{display:none}
@media(max-width:899px) and (orientation:landscape) and (max-height:370px){.machine .lower-panel,.machine:not(.title-mode) .lower-panel{height:126px}.machine .commandbar,.machine:not(.title-mode) .commandbar{padding-top:27px}.machine .verbs button{padding:2px 1px}}
@media(max-width:899px) and (orientation:landscape) and (max-height:330px){.machine .verbs button{padding:1px}.machine .verbs span{font-size:8px}.commandbar #command{font-size:7px}.machine .party{height:73px}.machine .character,.machine .character:last-child{height:49px}.machine #characters{grid-auto-rows:49px}}

.score-player,body.otherworld .score-player{border-color:#5c503c}.score-track{border-color:#5c503c66}.modal-pages{border-color:#5c503c}.modal-page-label{color:#c4b69a}

/* One local 8-bit typeface across the title, controls, forms and story overlays. */
html,body,body *,body *::before,body *::after{font-family:var(--pixel-font)!important;font-synthesis:none!important;font-weight:400!important;font-style:normal!important;font-variant-ligatures:none;letter-spacing:0;text-rendering:geometricPrecision;-webkit-font-smoothing:none}
body{font-size:8px;line-height:1.75}
button,input,select,option,textarea,kbd,pre,code{font-family:var(--pixel-font)!important}
.title-bottom{gap:24px;padding:20px 5%}
.title-heading h1,#title-screen .title-heading h1{font-size:32px;line-height:1.25;letter-spacing:0;text-shadow:3px 3px #17283c}
#title-screen .title-heading h1 span{font-size:1em;letter-spacing:0}
#title-screen .title-heading h1 small{font-size:8px;line-height:1.5;letter-spacing:4px;margin-bottom:4px}
#title-screen .presenter{font-size:8px;line-height:1.5;letter-spacing:1px;margin-bottom:8px}
#title-screen .subtitle{font-size:8px;line-height:1.5;letter-spacing:0;margin-top:8px;gap:8px}
#title-screen .title-actions{width:280px;min-width:0;max-width:42%}
#title-screen .title-actions p,#title-screen #continue{font-size:8px;line-height:1.75}
#title-screen .primary{font-size:8px;line-height:1.5;min-width:0;padding:12px 14px}
#title-screen .title-meta{font-size:8px;line-height:1.5;letter-spacing:0;padding:8px 5%}
.gallery-toolbar{font-size:8px;line-height:1.5}.gallery-toolbar button{font-size:8px;line-height:1.5}
#room-name{font-size:16px;line-height:1.5;margin-top:4px}#act-label{font-size:8px;line-height:1.5;letter-spacing:0}
#toolbar-toggle,.machine .statusbar #chapter,.machine .statusbar #clock,.machine .statusbar .utilities button,.machine .statusbar .utilities span,.scene-tool{font-size:8px;line-height:1.5;letter-spacing:0}
.commandbar #command{font-size:8px;line-height:1.75}.machine .verbs span{font-size:8px;line-height:1.5;margin-left:2px}.machine .verbs button{font-size:8px;padding:2px 4px}
.commandbar #journal-button,.commandbar #map-button,.commandbar #journal-button span,.commandbar #map-button span{font-size:8px;line-height:1.5}
.panel-heading,.inventory-top .panel-heading,.panel-heading span,.inventory-top .panel-heading span,#group-travel{font-size:8px;line-height:1.5;letter-spacing:0}
#group-travel{padding:6px 4px;white-space:normal}
.machine .character strong,.machine .character:last-child strong{font-size:8px;line-height:1.5;letter-spacing:0}
.machine .character small,.machine .character:last-child small{font-size:6px;line-height:1.5}
.machine .character-location,.machine .character:last-child .character-location{font-size:6px;line-height:1.5}
.machine .char-key{font-size:6px}.machine .item span{font-size:8px;line-height:1.5;overflow-wrap:anywhere;min-height:12px}
.viewport-pager button,.viewport-pager span{font-size:8px;line-height:1.5}
.machine #score-strip,.machine #score-strip button,.machine .footerbar,#story-progress,#threat-status,.footerbar #save-status{font-size:8px;line-height:1.5;letter-spacing:0}
#hover-label,#toast{font-size:8px;line-height:1.75}#toast{white-space:normal;text-align:center}
#speaker,#dialogue-count,#next-line{font-size:8px;line-height:1.75;letter-spacing:0}#line,#dialogue.story-beat #line,#dialogue.story-beat #story-caption{font-size:8px;line-height:2}
#cinematic-kicker{font-size:8px;line-height:1.75;letter-spacing:0}#cinematic h2{font-size:16px;line-height:1.5;margin:12px 0}#cinematic p{font-size:8px;line-height:2}#cinematic-next,#skip-intro{font-size:8px;line-height:1.75}
dialog h2{font-size:16px;line-height:1.5}dialog h3{font-size:8px;line-height:1.75}dialog p,.task,.modal-button,.modal-button small,.story-field,.story-sequence,.story-diagram,.hint,.fine,.eyebrow,.nearby-object>b,.nearby-object .modal-button,.score-track,.score-track small{font-size:8px!important;line-height:1.75;letter-spacing:0}
.close-modal{font-size:16px;line-height:1}.story-field select{font-size:8px;line-height:1.75}.story-sequence,.story-diagram{overflow-wrap:anywhere}input[type=file]{font-size:8px}.empty{font-size:8px;line-height:1.75}
@media(max-width:899px){
 .title-heading h1,#title-screen .title-heading h1{font-size:24px}.title-bottom{gap:16px;padding:16px 4%}#title-screen .title-actions{width:220px;max-width:42%}#title-screen .title-meta{font-size:6px}
 #room-name{font-size:12px}#act-label{font-size:6px}.machine .character strong,.machine .character:last-child strong{font-size:6px}.machine .item span{font-size:6px}.machine .footerbar,#story-progress,#threat-status,.machine #score-strip,.machine #score-strip button{font-size:6px}.panel-heading,.inventory-top .panel-heading,.panel-heading span,.inventory-top .panel-heading span{font-size:6px}
}
@media(max-width:600px) and (orientation:portrait){
 .title-bottom{flex-direction:column;align-items:stretch;text-align:center;gap:12px;padding:12px 5%}#title-screen .title-actions{width:100%;max-width:none;text-align:center}#title-screen .subtitle{justify-content:center}#title-screen .title-heading h1{font-size:24px;line-height:1.15}#title-screen .title-actions p{display:none}#title-screen #continue{margin-top:8px}#title-screen .title-meta{font-size:6px;padding:6px 3%!important}.gallery-toolbar{font-size:6px}
 #act-label{display:none}#room-name{font-size:8px}.scene-tool,#toolbar-toggle{font-size:6px}.machine .verbs span{font-size:8px;margin-left:0}.machine .verbs button{padding:2px 1px}.commandbar #journal-button,.commandbar #map-button,.commandbar #journal-button span,.commandbar #map-button span{font-size:6px}#group-travel{font-size:6px}.machine .character strong,.machine .character:last-child strong{font-size:6px}
 #cinematic h2{font-size:16px}.cinematic-text{padding:12px 5%}#skip-intro{position:static;align-self:flex-end;padding:4px}#dialogue.story-beat #line,#dialogue.story-beat #story-caption{line-height:1.75}
}
@media(max-width:899px) and (orientation:portrait) and (min-height:740px){
 .machine .character strong,.machine .character:last-child strong{font-size:8px}.machine #characters{grid-auto-rows:48px;gap:4px}.machine .character,.machine .character:last-child{height:48px;grid-template-rows:16px 0 12px}.machine .character-location,.machine .character:last-child .character-location{font-size:6px}
}
@media(max-width:899px) and (orientation:landscape){
 .machine .verbs span,.commandbar #command{font-size:6px}.machine .verbs button{padding:2px 1px}.commandbar #journal-button,.commandbar #map-button,.commandbar #journal-button span,.commandbar #map-button span,#group-travel{font-size:6px}.machine .character strong,.machine .character:last-child strong{font-size:5px}.machine .character-location,.machine .character:last-child .character-location{font-size:4px}.machine .item span{font-size:5px}.viewport-pager button,.viewport-pager span{font-size:6px}#cinematic h2{font-size:16px}#cinematic p{font-size:8px;line-height:1.75}
}
/* Compact landscape keeps whole action names and two legible inventory slots. */
@media(max-width:899px) and (orientation:landscape){
 .machine .verbs span,.machine:not(.title-mode) .verbs span{font-size:6px;line-height:1.5;margin-left:0}
 .machine .commandbar #command,.machine:not(.title-mode) .commandbar #command{font-size:6px}
 .machine .commandbar #journal-button,.machine .commandbar #map-button,.machine .commandbar #journal-button span,.machine .commandbar #map-button span,.machine:not(.title-mode) .commandbar #journal-button span,.machine:not(.title-mode) .commandbar #map-button span{font-size:6px;line-height:1.5}
 .inventory-top{float:none;height:14px;justify-content:flex-end;margin:0 0 2px}
 #items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding-right:0;gap:3px}
 .machine .item{padding:1px}.machine .item canvas{width:16px;height:16px}.machine .item span{font-size:5px;line-height:1.4;min-height:7px;margin-top:2px}
}
@media(max-width:899px) and (orientation:landscape){.machine .verbs button,.machine:not(.title-mode) .verbs button{font-size:6px;line-height:1.5}}
@media(max-width:899px) and (orientation:landscape) and (max-height:370px){.machine .lower-panel,.machine:not(.title-mode) .lower-panel{height:134px}}
@media(max-width:899px) and (orientation:landscape) and (max-height:330px){.machine .lower-panel,.machine:not(.title-mode) .lower-panel{height:130px}}

/* Desktop UI uses one shared scale, rather than fixed 8 px labels beside a growing scene. */
:root{--ui-unit:1px}
@media(min-width:900px){
 .machine,.machine:not(.title-mode){grid-template-columns:minmax(0,1fr) calc(300 * var(--ui-unit));grid-template-rows:0 minmax(0,1fr) calc(144 * var(--ui-unit)) calc(26 * var(--ui-unit)) calc(36 * var(--ui-unit))}
 .machine.title-mode{grid-template-columns:minmax(0,1fr);grid-template-rows:0 minmax(0,1fr)}
 .machine #stage,.machine:not(.title-mode) #stage{grid-row:2;grid-column:1}
 .machine .commandbar,.machine:not(.title-mode) .commandbar{grid-row:3;grid-column:1;display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:calc(26 * var(--ui-unit)) minmax(0,1fr);padding:calc(8 * var(--ui-unit)) calc(12 * var(--ui-unit));gap:calc(6 * var(--ui-unit)) calc(16 * var(--ui-unit));align-content:stretch;overflow:hidden}
 .machine .commandbar #command,.machine:not(.title-mode) .commandbar #command{font-size:calc(12 * var(--ui-unit));line-height:1.5;min-height:0;align-self:center}
 .machine .commandbar #journal-button,.machine .commandbar #map-button,.machine .commandbar #journal-button span,.machine .commandbar #map-button span,.machine:not(.title-mode) .commandbar #journal-button span,.machine:not(.title-mode) .commandbar #map-button span{font-size:calc(10 * var(--ui-unit));line-height:1.5;align-self:center}
 .machine .verbs,.machine:not(.title-mode) .verbs{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:calc(4 * var(--ui-unit)) calc(6 * var(--ui-unit));align-self:stretch}
 .machine .verbs button,.machine:not(.title-mode) .verbs button{font-size:calc(12 * var(--ui-unit));line-height:1.5;padding:0 calc(10 * var(--ui-unit));min-height:0;display:flex;align-items:center;text-align:left}
 .machine .verbs span,.machine:not(.title-mode) .verbs span{font-size:calc(12 * var(--ui-unit));line-height:1.5;margin:0}
 .machine .lower-panel,.machine:not(.title-mode) .lower-panel{grid-column:2;grid-row:2/5;display:flex;flex-direction:column;align-self:stretch;height:auto;padding:calc(12 * var(--ui-unit));gap:calc(14 * var(--ui-unit));overflow:hidden}
 .machine .party{height:auto;flex:none}
 .panel-heading,.inventory-top .panel-heading{font-size:calc(10 * var(--ui-unit));line-height:1.5;margin-bottom:calc(8 * var(--ui-unit));letter-spacing:0}
 .panel-heading span,.inventory-top .panel-heading span{font-size:calc(8 * var(--ui-unit));line-height:1.5}
 #group-travel{font-size:calc(10 * var(--ui-unit));line-height:1.5;padding:calc(7 * var(--ui-unit)) calc(8 * var(--ui-unit));margin-bottom:calc(8 * var(--ui-unit));white-space:nowrap}
 .machine #characters{grid-template-columns:1fr;grid-auto-rows:calc(68 * var(--ui-unit));gap:calc(6 * var(--ui-unit))}
 .machine .character,.machine .character:last-child{height:calc(68 * var(--ui-unit));display:grid;grid-template-columns:calc(52 * var(--ui-unit)) minmax(0,1fr);grid-template-rows:calc(20 * var(--ui-unit)) calc(13 * var(--ui-unit)) calc(14 * var(--ui-unit));gap:0 calc(10 * var(--ui-unit));padding:calc(8 * var(--ui-unit)) calc(10 * var(--ui-unit));text-align:left;align-content:center;align-items:center}
 .machine .character canvas,.machine .character:last-child canvas{width:calc(44 * var(--ui-unit));height:calc(48 * var(--ui-unit));margin:0;grid-column:1;grid-row:1/4}
 .machine .character strong,.machine .character:last-child strong{grid-column:2;grid-row:1;font-size:calc(12 * var(--ui-unit));line-height:1.5;white-space:nowrap}
 .machine .character small,.machine .character:last-child small{grid-column:2;grid-row:2;display:block;font-size:calc(8 * var(--ui-unit));line-height:1.5;white-space:nowrap}
 .machine .character-location,.machine .character:last-child .character-location{grid-column:2;grid-row:3;font-size:calc(8 * var(--ui-unit));line-height:1.5;white-space:nowrap}
 .machine .char-key{font-size:calc(7 * var(--ui-unit));top:calc(3 * var(--ui-unit));left:calc(3 * var(--ui-unit))}
 .machine .inventory,.machine:not(.title-mode) .inventory{flex:1;max-height:none;min-height:0;padding:calc(12 * var(--ui-unit)) 0 0;border-left:0;border-top:1px solid #49443b;overflow:hidden}
 .machine .inventory-top,.machine:not(.title-mode) .inventory-top{display:flex;flex-wrap:wrap;float:none;height:auto;gap:calc(5 * var(--ui-unit));margin-bottom:calc(8 * var(--ui-unit))}
 .machine .inventory-top .panel-heading,.machine:not(.title-mode) .inventory-top .panel-heading{display:flex;flex-basis:100%;justify-content:space-between;align-items:center;gap:calc(8 * var(--ui-unit));margin:0;white-space:nowrap}
 .machine .inventory .viewport-pager{margin:0 0 0 auto;gap:calc(6 * var(--ui-unit))}
 .viewport-pager button,.viewport-pager span{font-size:calc(9 * var(--ui-unit));line-height:1.5}
 .viewport-pager button,.inventory .viewport-pager button{padding:calc(3 * var(--ui-unit)) calc(6 * var(--ui-unit));min-width:calc(25 * var(--ui-unit))}
 #items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:calc(6 * var(--ui-unit));padding-right:0}
 .machine .item{padding:calc(5 * var(--ui-unit));min-height:calc(62 * var(--ui-unit));height:auto;display:flex;flex-direction:column;align-items:center;justify-content:center}
 .machine .item canvas{width:calc(32 * var(--ui-unit));height:calc(32 * var(--ui-unit));margin:0 auto}
 .machine .item span{font-size:calc(9 * var(--ui-unit));line-height:1.5;min-height:0;margin-top:calc(4 * var(--ui-unit));overflow-wrap:normal;word-break:normal}
 .machine #score-strip,.machine:not(.title-mode) #score-strip{grid-row:4;grid-column:1;font-size:calc(10 * var(--ui-unit));padding:0 calc(12 * var(--ui-unit));gap:calc(12 * var(--ui-unit))}
 .machine #score-strip button{font-size:calc(10 * var(--ui-unit));line-height:1.5;padding:0 calc(6 * var(--ui-unit))}
 .machine .footerbar,.machine:not(.title-mode) .footerbar{grid-row:5;grid-column:1/-1;font-size:calc(9 * var(--ui-unit));line-height:1.5;padding:calc(4 * var(--ui-unit)) calc(12 * var(--ui-unit));gap:calc(16 * var(--ui-unit));align-items:center}
 #story-progress,#threat-status,.footerbar #save-status{font-size:calc(9 * var(--ui-unit));line-height:1.5}
 .footerbar .play-status{gap:calc(14 * var(--ui-unit));flex-direction:row}
 .machine .statusbar,.machine:not(.title-mode) .statusbar{height:calc(40 * var(--ui-unit));padding:0 calc(12 * var(--ui-unit));gap:calc(12 * var(--ui-unit))}
 #toolbar-toggle{top:calc(6 * var(--ui-unit));right:calc(8 * var(--ui-unit));font-size:calc(10 * var(--ui-unit));line-height:1.5;padding:calc(4 * var(--ui-unit)) calc(8 * var(--ui-unit));min-height:calc(25 * var(--ui-unit))}
 .toolbar-open #toolbar-toggle{top:calc(44 * var(--ui-unit))}
 .machine .statusbar #chapter,.machine .statusbar #clock,.machine .statusbar .utilities button,.machine .statusbar .utilities span{font-size:calc(10 * var(--ui-unit));line-height:1.5}
 .scene-tool{font-size:calc(10 * var(--ui-unit));line-height:1.5;top:calc(12 * var(--ui-unit));right:calc(12 * var(--ui-unit));padding:calc(6 * var(--ui-unit)) calc(8 * var(--ui-unit))}
 #room-label{top:calc(12 * var(--ui-unit));left:calc(14 * var(--ui-unit))}
 #room-name{font-size:calc(18 * var(--ui-unit));line-height:1.5}#act-label{font-size:calc(9 * var(--ui-unit));line-height:1.5}
 #hover-label,#toast{font-size:calc(11 * var(--ui-unit));line-height:1.75;padding:calc(8 * var(--ui-unit)) calc(10 * var(--ui-unit));max-width:calc(320 * var(--ui-unit))}
 #dialogue{padding:calc(16 * var(--ui-unit)) calc(20 * var(--ui-unit))}
 #dialogue.has-portrait{padding-left:calc(102 * var(--ui-unit));min-height:calc(110 * var(--ui-unit))}
 #dialogue-portrait{width:calc(60 * var(--ui-unit));height:calc(66 * var(--ui-unit));left:calc(18 * var(--ui-unit));top:calc(18 * var(--ui-unit))}
 #speaker,#dialogue-count,#next-line{font-size:calc(11 * var(--ui-unit));line-height:1.75}
 #line,#dialogue.story-beat #line,#dialogue.story-beat #story-caption{font-size:calc(12 * var(--ui-unit));line-height:1.75}
 .cinematic-text{padding:calc(20 * var(--ui-unit)) 6%}
 #cinematic-kicker,#cinematic-next,#skip-intro{font-size:calc(11 * var(--ui-unit));line-height:1.75}
 #cinematic h2{font-size:calc(24 * var(--ui-unit));line-height:1.5;margin:calc(10 * var(--ui-unit)) 0}
 #cinematic p{font-size:calc(12 * var(--ui-unit));line-height:1.75;max-width:none}
 #skip-intro{right:calc(24 * var(--ui-unit));bottom:calc(22 * var(--ui-unit))}
 #dialogue.story-beat{padding:0 7% calc(20 * var(--ui-unit));gap:calc(10 * var(--ui-unit))}
 #title-screen .title-heading h1{font-size:calc(40 * var(--ui-unit));line-height:1.2}
 #title-screen .presenter,#title-screen .title-heading h1 small,#title-screen .subtitle{font-size:calc(10 * var(--ui-unit))}
 #title-screen .title-actions{width:calc(320 * var(--ui-unit));max-width:42%}
 #title-screen .title-actions p,#title-screen #continue,#title-screen .primary{font-size:calc(11 * var(--ui-unit));line-height:1.75}
 #title-screen .primary{padding:calc(12 * var(--ui-unit)) calc(14 * var(--ui-unit))}
 .title-bottom{padding:calc(20 * var(--ui-unit)) 5%;gap:calc(24 * var(--ui-unit))}
 #title-screen .title-meta,.gallery-toolbar{font-size:calc(9 * var(--ui-unit));line-height:1.5}
 .gallery-toolbar{padding:calc(8 * var(--ui-unit)) calc(12 * var(--ui-unit))}.gallery-toolbar button{font-size:calc(10 * var(--ui-unit));padding:calc(4 * var(--ui-unit)) calc(8 * var(--ui-unit))}
 dialog{padding:calc(25 * var(--ui-unit)) calc(27 * var(--ui-unit)) calc(18 * var(--ui-unit))}
 dialog h2{font-size:calc(24 * var(--ui-unit));line-height:1.5}
 dialog h3,dialog p,.task,.modal-button,.modal-button small,.story-field,.story-sequence,.story-diagram,.hint,.fine,.eyebrow,.nearby-object>b,.nearby-object .modal-button,.score-track,.score-track small,.score-volume,.score-player summary,.story-field select,input[type=file]{font-size:calc(11 * var(--ui-unit))!important;line-height:1.75}
 .modal-button{padding:calc(10 * var(--ui-unit)) calc(12 * var(--ui-unit));margin:calc(8 * var(--ui-unit)) 0}
 .modal-pages{margin-top:calc(12 * var(--ui-unit));padding-top:calc(10 * var(--ui-unit))}.close-modal{font-size:calc(20 * var(--ui-unit));right:calc(12 * var(--ui-unit));top:calc(9 * var(--ui-unit))}
}

/* Speech controls follow the same scalable pixel typography as the game. */
#replay-line{font:inherit;font-size:.75em;color:#9ddfce;background:#080a09;border:1px solid #5b5c45;padding:.45em .6em;margin-left:auto;white-space:nowrap;cursor:pointer}
#replay-line:hover,#replay-line:focus-visible{color:#ffe3a0;border-color:#ffe3a0}
.speech-auto{display:flex;align-items:center;gap:.8em;margin:1em 0;line-height:1.7}
.speech-auto input{width:1.2em;height:1.2em;flex:0 0 auto;accent-color:#b8edd8}

/* Panoramic artwork fills its image region; the original tall photo is no longer used. */
.title-gallery #title-art,.title-gallery .title-gallery-image{object-fit:cover;object-position:50% 25%}
#cinematic[data-scene="intro"] #cinematic-art{object-fit:cover}
/* A portrait viewport gets a genuinely wide image region above the full readable text. */
@media(orientation:portrait){
 .title-mode .title-gallery{flex:0 1 auto;height:auto!important;aspect-ratio:2/1;min-height:0}
 .title-mode .title-bottom{flex:1;flex-direction:column;justify-content:center;gap:22px;text-align:center}
 #title-screen .title-actions{max-width:90%;width:min(320px,90%);text-align:center}
 #title-screen .subtitle{justify-content:center}
 #cinematic[data-scene="intro"]{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
 #cinematic[data-scene="intro"] #cinematic-art{width:100%;height:auto;aspect-ratio:2/1;grid-column:1;grid-row:1}
 #cinematic[data-scene="intro"] .cinematic-text{grid-column:1;grid-row:2;display:flex;flex-direction:column;justify-content:center}
}
/* Short landscape screens keep the whole narrative width instead of cropping away a panel. */
@media(orientation:landscape) and (max-height:480px){
 #cinematic[data-scene="intro"]{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
 #cinematic[data-scene="intro"] #cinematic-art{grid-column:1;grid-row:1}
 #cinematic[data-scene="intro"] .cinematic-text{grid-column:1;grid-row:2;display:block;padding:8px 20px}
 #cinematic[data-scene="intro"] h2{font-size:18px;line-height:1.4;margin:5px 0}
 #cinematic[data-scene="intro"] p{font-size:9px;line-height:1.55;margin:0 0 6px}
 #cinematic[data-scene="intro"] #cinematic-kicker{font-size:7px;line-height:1.4}
 #cinematic[data-scene="intro"] #cinematic-next{font-size:9px;line-height:1.5}
 #cinematic[data-scene="intro"] #skip-intro{position:absolute;right:20px;bottom:8px;font-size:8px}
}
/* Keep the speaker, remaining-line count and replay button visibly separate. */
.dialogue-top{justify-content:flex-start;column-gap:calc(12 * var(--ui-unit));row-gap:calc(8 * var(--ui-unit));flex-wrap:wrap}
#speaker{min-width:0;overflow-wrap:anywhere}
#dialogue-count{flex:0 0 auto;white-space:nowrap;border-left:1px solid #595747;padding-left:calc(12 * var(--ui-unit))}
#dialogue-count:empty{display:none}
#replay-line{flex:0 0 auto;margin-left:auto;max-width:100%}
/* Language selection uses the same pixel font and fits inside the viewport. */
#language-dialog{width:min(660px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:clamp(18px,3vw,38px);background:#080b09;color:#f3e5bf;border:2px solid #d3b46e;box-shadow:0 0 0 5px #050505;font-family:var(--pixel-font,'Press Start 2P'),monospace;text-align:center}
#language-dialog::backdrop{background:#000d}#language-dialog h2{font-size:clamp(14px,2.6vw,24px);line-height:1.8;margin:16px 0}#language-dialog p{font-size:clamp(8px,1.2vw,12px);line-height:1.9}.language-options,.title-languages{display:flex;gap:10px;justify-content:center}.language-options button,.title-languages button{font:inherit;color:#9ae1c9;background:#090c09;border:1px solid #889775;padding:14px 18px;cursor:pointer}.language-options button[aria-pressed=true],.title-languages button[aria-pressed=true]{color:#ffde93;border-color:#ffde93;background:#302714}.title-languages{justify-content:flex-start;margin:0 0 12px}.title-languages button{font-size:clamp(8px,1vw,12px);padding:8px 10px}#language-open{white-space:nowrap}html[lang=de] .character-location{overflow-wrap:anywhere}
