:root{color-scheme:dark;--bg:#090d12;--panel:#151b22;--line:#5b4c37;--gold:#e3a858;--text:#f4e9d8;--muted:#b8ae9e;--red:#ad4f46;font-family:Georgia,'Times New Roman',serif}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 60% 10%,#263039,#090d12 68%);color:var(--text);min-height:100vh}button{font:inherit;cursor:pointer;color:var(--text);background:#20252b;border:1px solid #7c6548;padding:.7rem 1rem;border-radius:3px}button:hover{border-color:var(--gold);background:#34302b}button:focus-visible{outline:3px solid var(--gold);outline-offset:3px}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:linear-gradient(#be7c37,#8a4c21);border-color:#dfaa64;color:#fff;font-weight:bold;letter-spacing:.08em}.secondary{background:#192029}.text-button{border:0;background:none;text-decoration:underline;color:var(--muted)}[hidden]{display:none!important}.top{height:72px;padding:12px clamp(16px,3vw,48px);display:flex;align-items:center;gap:18px;border-bottom:1px solid #655038;background:#10151a}.logo{width:76px;max-height:46px;object-fit:contain}.edition{font:700 1rem system-ui;letter-spacing:.22em;color:var(--gold)}.edition small{display:block;font:10px system-ui;color:var(--muted);letter-spacing:.18em;margin-top:4px}.head-actions{margin-left:auto;display:flex;gap:7px}.head-actions button{min-width:48px;font:700 12px system-ui}.screen{min-height:calc(100vh - 72px)}.launcher{display:grid;grid-template-columns:minmax(330px,42%) 1fr}.launch-panel{padding:clamp(28px,7vw,100px);display:flex;flex-direction:column;align-items:flex-start;justify-content:center;background:linear-gradient(100deg,#181d23,#11171c);border-right:1px solid var(--line)}h1{font-size:clamp(3rem,6vw,6rem);line-height:.94;text-transform:uppercase;margin:18px 0 28px;text-shadow:3px 4px #5d3928}.eyebrow{font:700 11px system-ui;letter-spacing:.25em;color:var(--gold);text-transform:uppercase}.launch-panel p:not(.eyebrow){max-width:37ch;line-height:1.55;color:var(--muted)}.launch-panel .primary{margin-top:25px;min-width:220px}.launch-panel .secondary{margin-top:10px}.micro{font:11px system-ui!important;margin-top:30px}.launch-scene,.scene-art{position:relative;overflow:hidden;background:radial-gradient(circle at 64% 27%,#82725c 0,#28313b 18%,#101b25 48%,#090d12 76%)}.launch-scene:after,.scene-art:after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(0deg,transparent 0 3px,#0002 4px);pointer-events:none}.moon{position:absolute;width:90px;height:90px;background:#d3ad78;filter:blur(2px);border-radius:50%;top:18%;right:26%;box-shadow:0 0 110px #dea660}.skyline{position:absolute;bottom:0;left:0;right:0;height:60%;display:flex;align-items:end;gap:1%;filter:drop-shadow(0 -5px 18px #151923)}.skyline i{width:18%;background:linear-gradient(90deg,#0c1118,#20252b);height:65%}.skyline i:nth-child(2){height:90%}.skyline i:nth-child(3){height:57%}.skyline i:nth-child(4){height:100%}.skyline i:nth-child(5){height:75%}.skyline i:nth-child(6){height:97%}.skyline i:nth-child(7){height:50%}.scene-label{position:absolute;bottom:24px;right:25px;font:11px system-ui;letter-spacing:.3em;color:#b9a17e}.loading{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px}.loading img{width:96px;height:96px;max-width:25vw;max-height:25vw;object-fit:contain;animation:none}.game{padding:22px clamp(16px,3vw,52px);max-width:1550px;margin:auto}.hud{display:flex;justify-content:space-between;gap:20px;align-items:end}.hud h2{margin:4px 0;font-size:clamp(25px,3vw,42px)}.stats{display:flex;gap:10px}.stats div{border:1px solid var(--line);background:#151b22;padding:8px 17px;min-width:105px}.stats small{display:block;font:10px system-ui;color:var(--muted);text-transform:uppercase;letter-spacing:.1em}.stats strong{font:700 23px system-ui;color:var(--gold)}.districts{display:flex;gap:8px;margin:20px 0}.district{flex:1;padding:10px;border:1px solid #665237;background:#171b20;font:12px system-ui}.district.owned{border-color:var(--gold);color:var(--gold)}.scene-grid{display:grid;grid-template-columns:1fr 1fr;min-height:460px;border:1px solid var(--line);background:var(--panel)}.scene-art{min-height:430px;background:radial-gradient(circle at 70% 35%,#8b664c,#29303b 30%,#0d141b 77%)}.art-frame{position:absolute;inset:8%;border:1px solid #9d754f;display:flex;align-items:center;justify-content:center}.art-frame:before,.art-frame:after{content:"";position:absolute;width:35%;height:30%;border:1px solid #9d754f;transform:skew(-14deg);bottom:12%;background:#141c2499}.art-frame:before{left:10%}.art-frame:after{right:6%;height:48%}.art-frame span{position:absolute;top:15px;left:15px;color:var(--gold);font:11px system-ui;letter-spacing:.2em}.art-frame b{position:relative;z-index:1;font-size:6rem;color:#d3a05e77}.story{padding:clamp(22px,4vw,55px);display:flex;flex-direction:column}.story h3{font-size:clamp(26px,3vw,42px);margin:10px 0 20px}.story p:not(.eyebrow){white-space:pre-line;line-height:1.65;font-size:clamp(16px,1.5vw,19px);color:#ded1be;max-width:60ch}#choices{margin-top:auto;display:grid;gap:10px}#choices button{text-align:left;line-height:1.4;padding:13px 16px}.gamefoot{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:18px;font:12px system-ui;color:var(--muted)}.ending{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:30px}.ending h2{font-size:clamp(3rem,7vw,7rem);margin:10px}.ending p{white-space:pre-line;max-width:55ch;line-height:1.7;color:var(--muted)}dialog{border:1px solid var(--gold);background:#161d24;color:var(--text);max-width:min(560px,90vw);padding:25px;box-shadow:0 0 0 100vmax #000b}dialog::backdrop{background:#000a}dialog p{line-height:1.6}.action-track{position:relative;height:44px;background:#202832;border:1px solid var(--line);margin:20px 0;overflow:hidden}.action-target{position:absolute;top:0;bottom:0;width:20%;background:#ab713d}.action-marker{position:absolute;top:0;bottom:0;width:4px;background:#fff;left:0}@media(max-width:760px){.top{height:auto;min-height:65px;padding:8px}.logo{width:54px}.edition{font-size:10px;letter-spacing:.1em}.launcher,.scene-grid{grid-template-columns:1fr}.launch-panel{padding:35px 24px}.launch-scene{min-height:250px;grid-row:1}.hud{align-items:stretch;flex-direction:column}.stats{gap:5px}.stats div{min-width:0;flex:1;padding:7px}.stats strong{font-size:18px}.districts{flex-wrap:wrap}.district{min-width:31%}.scene-art{min-height:220px}.story{min-height:390px}.gamefoot{flex-wrap:wrap}}@media(prefers-reduced-motion:no-preference){.moon{animation:glow 5s ease-in-out infinite alternate}@keyframes glow{to{box-shadow:0 0 140px #f1ba65}}}

/* One viewport for gameplay; text advances inside a fixed reading surface. */
.game{height:calc(100dvh - 72px);min-height:0;display:flex;flex-direction:column;overflow:hidden}
.game .hud,.game .districts,.game .gamefoot{flex-shrink:0}
.game .districts{margin:12px 0}.game .scene-grid{flex:1;min-height:0;overflow:hidden}
.game .scene-art{min-height:0}.game .story{min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:clamp(15px,2.4vw,34px)}
.story .eyebrow{margin:0 0 7px;flex-shrink:0}.story h3{margin:0 0 10px;line-height:1.08;flex-shrink:0}
.reading-window{flex:1;min-height:0;overflow:hidden}.reading-window #narrative{margin:0;white-space:pre-line;line-height:1.48;font-size:clamp(15px,1.4vw,18px)}
.page-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;margin:8px 0;flex-shrink:0;font:12px system-ui;color:var(--muted)}
.page-controls button{min-width:80px;min-height:42px;padding:7px}.page-controls .invisible{visibility:hidden}
#choices{flex-shrink:0;margin-top:0}#choices.reading{visibility:hidden;pointer-events:none}#choices button{padding:9px 12px;min-height:42px;font-size:clamp(13px,1.15vw,16px)}
.game .gamefoot{margin-top:8px}.game .gamefoot button{min-height:40px}
@media(max-width:760px){.top{height:65px;min-height:65px}.game{height:calc(100dvh - 65px);padding:8px 12px}.game .hud{gap:3px}.game .hud h2{font-size:20px;margin:0}.game .hud .eyebrow{font-size:9px}.game .stats div{padding:3px 7px}.game .stats strong{font-size:16px}.game .districts{margin:6px 0;gap:4px}.game .district{min-width:0;padding:6px 4px;font-size:10px}.game .scene-grid{display:flex;flex-direction:column}.game .scene-art{flex:0 0 100px;min-height:0}.game .art-frame b{font-size:40px}.game .story{flex:1;padding:12px}.game .story h3{font-size:23px}.reading-window #narrative{font-size:15px;line-height:1.4}.game .gamefoot{margin-top:4px}.game .gamefoot button{min-height:36px;padding:5px 8px}}
@media(max-height:690px){.game .scene-art{flex-basis:64px}.game .story{padding:8px 12px}.game .story h3{font-size:20px;margin-bottom:4px}.game .story .eyebrow{font-size:9px}.game .districts{margin:4px 0}.page-controls{margin:3px 0}.reading-window #narrative{font-size:14px;line-height:1.33}#choices button{min-height:37px;padding:5px 8px}}
@media(max-height:560px){.game .scene-art,.game .districts{display:none}.game .story{padding:7px 10px}.game .story h3{font-size:18px;margin-bottom:3px}.game .hud h2{font-size:18px}.game .stats div{padding:2px 5px}.game .gamefoot{margin-top:2px}.page-controls{min-height:36px}.page-controls button{min-height:34px}#choices{gap:5px}#choices button{min-height:34px}}
/* Fixed app shell: the gameplay cannot extend below the browser viewport. */
body.playing{height:100dvh;min-height:0;overflow:hidden}
body.playing #app{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body.playing .top{flex:0 0 72px;height:72px;min-height:0}
body.playing #game{flex:1 1 auto;height:auto;min-height:0;max-height:none;overflow:hidden}
.game.compact-reading .scene-art,.game.compact-reading .districts{display:none}
.game.compact-reading .hud h2{display:none}
@media(max-width:760px){body.playing .top{flex-basis:65px;height:65px}}
body.playing #game{width:100%;margin:0 auto}
/* Visual study 0007: warm brass against ink-blue, with art reserved for story scenes. */
:root{--gold:#e9b774;--muted:#c3b5a2;--panel:#121923;--line:#806647}
body{background:radial-gradient(circle at 50% -15%,#293646,#080c11 70%)}
.top{background:linear-gradient(90deg,#111820,#0b1016);border-bottom-color:#8b673e;box-shadow:0 5px 25px #0007;position:relative;z-index:2}
.edition{color:#f0c488;letter-spacing:.22em}.edition small{color:#9c8d78}
.launch-panel{position:relative;background:linear-gradient(115deg,#151d28 0%,#0a1018 96%);box-shadow:inset -1px 0 #b78955}
.launch-panel:before{content:"";position:absolute;top:9%;bottom:9%;left:clamp(14px,3vw,40px);width:1px;background:linear-gradient(transparent,#b58752,transparent)}
.launch-panel h1{color:#f8eddc;text-shadow:0 4px 0 #4d3225,0 15px 35px #000b;letter-spacing:.025em}
.launch-panel .eyebrow{border-bottom:1px solid #88623d;padding-bottom:12px;letter-spacing:.35em}
.launch-panel .primary{background:linear-gradient(120deg,#d59854,#9d592b);box-shadow:inset 0 1px #ffdcaa,0 9px 30px #0008}
.launch-scene{background-image:linear-gradient(90deg,#11192355,transparent 45%),url('assets/scenes/who_owns_the_night_keyart.png');background-size:cover;background-position:62% center}
.launch-scene .moon,.launch-scene .skyline{display:none}
.launch-scene:after{background:linear-gradient(0deg,#071017a8,transparent 28%),linear-gradient(90deg,#0b12194d,transparent 40%)}
.scene-label{z-index:1;text-shadow:0 2px 8px #000;bottom:30px}
.game .hud{padding:4px 0 8px;border-bottom:1px solid #8c6a44}
.game .hud h2{color:#f5ead9;text-shadow:0 2px 12px #0007}
.stats div{background:linear-gradient(135deg,#19232e,#111820);border:1px solid #796044;box-shadow:inset 0 1px #ffffff0a}
.stats strong{color:#f1bd78}.district{background:linear-gradient(#1a222c,#111922);border-color:#5a4a39}
.district.owned{border-color:#d9a160;background:#27231e;color:#f3c17d}
.game .scene-grid{background:#121a24;border:1px solid #9b7548;box-shadow:0 14px 50px #0009,inset 0 1px #f5c17b42}
.scene-art[data-art]{background-size:cover;background-repeat:no-repeat}
.scene-art[data-art="harbor"]{background-image:linear-gradient(0deg,#0810197d,transparent 55%),url('assets/scenes/port_meridian_harbor.png');background-position:64% center}
.scene-art[data-art="press"]{background-image:linear-gradient(0deg,#08101977,transparent 50%),url('assets/scenes/mara_printing_press.png');background-position:41% center}
.scene-art[data-art] .art-frame{inset:4%;border-color:#e3b474aa;pointer-events:none}
.scene-art[data-art] .art-frame:before,.scene-art[data-art] .art-frame:after,.scene-art[data-art] .art-frame b{display:none}
.scene-art[data-art] .art-frame span{background:#0d1721d9;border-left:2px solid #e8ad65;padding:8px 10px;top:10px;left:10px;color:#f7d3a2;text-shadow:0 1px 3px #000}
.scene-art:after{background:linear-gradient(90deg,#07101833,transparent 38%),linear-gradient(0deg,#07101866,transparent 30%)}
.game .story{background:radial-gradient(circle at 100% 0,#25303c 0,#151e29 45%,#101720 100%);border-left:1px solid #a3794b}
.story h3{color:#fff3df;text-shadow:0 2px 12px #0008}
.story .eyebrow{color:#f3bb75}.reading-window #narrative{color:#eee2d0;letter-spacing:.004em}
.page-controls{border-top:1px solid #6a543d;padding-top:7px;color:#e2ba86}
#choices button{background:linear-gradient(90deg,#1d2935,#17212c);border-color:#987149;box-shadow:inset 3px 0 #b7834c}
#choices button:hover,#choices button:focus-visible{background:#33313a;border-color:#e8b56d;box-shadow:inset 4px 0 #e8b56d}
.gamefoot{color:#c7aa86}
@media(max-width:760px){.launch-panel:before{display:none}.game .story{border-left:0;border-top:1px solid #a3794b}.scene-art[data-art="press"]{background-position:40% 42%}.scene-art[data-art="harbor"]{background-position:60% center}}
/* Evidence notebook keeps the investigation in the same fixed-height game shell. */
.game.case-mode .scene-art{background:radial-gradient(circle at 50% 20%,#35404a,#161e28 58%,#0c121a);padding:clamp(18px,3vw,46px)}
.game.case-mode .art-frame{display:none}
.case-board{height:100%;border:1px solid #b68d59;background:linear-gradient(135deg,#222b34,#101720);box-shadow:inset 0 0 0 6px #101820,inset 0 0 0 7px #795a3d,0 16px 35px #0009;padding:clamp(16px,2.5vw,36px);display:flex;flex-direction:column;justify-content:center;gap:clamp(9px,1.7vw,22px)}
.case-board h4{font:700 clamp(11px,1.1vw,15px) system-ui;letter-spacing:.25em;color:#e9b774;margin:0 0 8px;border-bottom:1px solid #94734c;padding-bottom:12px}
.case-clue{font:clamp(12px,1.25vw,17px)/1.4 Georgia,serif;padding:clamp(8px,1vw,15px);border:1px solid #66543c;background:#111a25;color:#aeaba4}
.case-clue.found{border-color:#c5925a;background:#2c2926;color:#f0d4aa}
.case-mode #choices button{min-height:36px;padding:7px 10px}
@media(max-width:760px){.game.case-mode .scene-art{flex:0 0 116px;padding:6px}.case-board{padding:9px;gap:4px;box-shadow:inset 0 0 0 3px #101820,inset 0 0 0 4px #795a3d}.case-board h4{font-size:9px;margin:0;padding-bottom:3px}.case-clue{font:10px/1.2 system-ui;padding:3px 6px}.case-mode #choices{gap:5px}.case-mode #choices button{font-size:12px;min-height:34px;padding:5px 7px}}
@media(max-height:690px){.game.case-mode .scene-art{flex-basis:82px}.case-board h4{display:none}.case-clue{padding:2px 5px}}
@media(max-height:560px){.game.case-mode .scene-art{display:none}}
/* DEV stays outside the game shell and never creates a page scrollbar. */
#devToggle{font-size:10px;color:#d7b487;border-color:#6c573d}#devToggle[aria-pressed="true"]{background:#654222;color:#fff}
.dev-panel{position:fixed;z-index:20;right:12px;top:80px;width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 92px);overflow:hidden;background:#101820f7;border:1px solid #d7a364;box-shadow:0 20px 70px #000d;padding:14px;font:12px/1.3 system-ui;color:#f1e6d5;display:flex;flex-direction:column;gap:10px}
.dev-head{display:flex;align-items:center;justify-content:space-between;letter-spacing:.15em;color:#f5bf7d}.dev-head button{min-width:36px;padding:5px}.dev-panel p{margin:0}.dev-grid{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:end}.dev-grid label{display:flex;flex-direction:column;gap:3px}.dev-grid select,.dev-grid input{background:#1c2935;color:#fff0dc;border:1px solid #886746;min-height:36px;padding:5px;font:13px system-ui;min-width:0}.dev-grid button{min-height:36px;padding:5px 8px;font-size:12px}.dev-stats{grid-template-columns:repeat(3,1fr)}.dev-flags{grid-template-columns:repeat(2,1fr)}.dev-flags label{flex-direction:row;align-items:center}.dev-flags input{min-height:0;accent-color:#d8a05d}.dev-state{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#cbbba7}.dev-panel #devStatus{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:760px){.head-actions{gap:3px}.head-actions button{min-width:36px;padding:7px 5px}.dev-panel{top:69px;max-height:calc(100dvh - 75px);gap:6px;padding:9px}.dev-panel button{padding:4px}}
@media(max-height:570px){.dev-panel #devWarning,.dev-panel .dev-state{display:none}.dev-panel{gap:4px}.dev-grid button,.dev-grid select,.dev-grid input{min-height:30px}}
.challenge-choice{display:block;width:100%;text-align:left;margin:8px 0;min-height:44px;border-left:3px solid #b7834c}

.scene-art[data-art="plates"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/printing_plates_escape.png');background-position:43% center}
.scene-art[data-art="court"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/courthouse_witnesses.png');background-position:57% center}

.scene-art[data-art="rosa"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/rosa_north_quay_gate.png');background-position:40% center}
.scene-art[data-art="council"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/blue_room_council.png');background-position:48% center}
.scene-art[data-art="sable"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/sable_final_ledger.png');background-position:66% center}
.scene-art[data-art="crate"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/warehouse_false_bottom.png');background-position:51% center}
.scene-art[data-art="bridge"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/bridge_midnight.png');background-position:50% center}

.scene-art[data-art="archive"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/city_hall_archive.png');background-position:49% center}
.scene-art[data-art="cinema"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/astoria_cinema.png');background-position:51% center}
.scene-art[data-art="courtroom"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/public_courtroom.png');background-position:49% center}
.scene-art[data-art="office"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/empty_dock_office.png');background-position:55% center}
.scene-art[data-art="letters"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/rosa_relocation_letters.png');background-position:50% center}

.scene-art[data-art="family"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/hidden_family_cellar.png');background-position:48% center}
.scene-art[data-art="sableCoffee"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/sable_courtesy_warehouse.png');background-position:44% center}
.scene-art[data-art="order"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/unsigned_order_steps.png');background-position:47% center}

.scene-art[data-art="tram"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/tram_stop_departure.png');background-position:53% center}
.scene-art[data-art="exchange"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/telephone_exchange.png');background-position:56% center}
.scene-art[data-art="clerk"]{background-image:linear-gradient(0deg,#08101977,transparent 58%),url('assets/scenes/clerks_home.png');background-position:52% center}
