:root{color-scheme:dark;font-family:Georgia,'Times New Roman',serif;background:#080f13;color:#f2ede2;font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:600 13px/1.2 system-ui,sans-serif;color:#f4f0e5;background:#132029e8;border:1px solid #c1b79765;border-radius:3px;min-height:44px;padding:10px 17px;cursor:pointer;transition:background .15s,outline .15s}button:hover{background:#2c3d43}button:focus-visible,a:focus-visible{outline:3px solid #dfc083;outline-offset:3px}button:disabled{opacity:.45;cursor:default}[hidden]{display:none!important}#game{width:100vw;height:100dvh;display:grid;place-items:center;background:#080f13}#stage{width:min(100vw,177.7778dvh);height:min(56.25vw,100dvh);position:relative;overflow:hidden;background:radial-gradient(ellipse at 75% 35%,#27373a,#0b171d 55%,#080d11)}#plate{position:absolute;width:100%;height:100%;object-fit:contain;transition:opacity .24s ease}#plate:not([src]){display:none}#shade{position:absolute;inset:0;background:linear-gradient(90deg,#061016cf,#07111740 45%,transparent 75%);pointer-events:none}body.playing #shade{background:linear-gradient(#06101682,transparent 24%,transparent 65%,#06101696)}#hud{position:absolute;inset:0 0 auto;display:flex;justify-content:space-between;align-items:start;padding:18px 22px;gap:16px}.place{display:flex;flex-direction:column;gap:5px;text-shadow:0 2px 6px #000}.place span:first-child{font:600 10px/1.3 system-ui,sans-serif;letter-spacing:2px;text-transform:uppercase;color:#d7c097}#scene-title{font-size:17px}nav{display:flex;gap:7px}nav button{min-height:44px;min-width:44px;padding:8px 11px;font-size:11px;background:#101d248c}#caption{position:absolute;left:50%;bottom:14%;transform:translateX(-50%);width:min(760px,82%);padding:13px 24px 15px;border-radius:4px;text-align:center;background:#081217db;box-shadow:0 4px 24px #0003;pointer-events:none}#speaker{font:600 11px/1.4 system-ui,sans-serif;color:#e5c58d;letter-spacing:1px}#line{font-size:clamp(16px,1.9vw,25px);line-height:1.38;margin:5px 0 0}#caption.thought #line{font-style:italic}#caption.narrator #speaker{display:none}#caption.narrator #line{margin-top:0}#choices{position:absolute;inset:auto 3% 5%;display:flex;justify-content:center;flex-wrap:wrap;gap:9px}#choices button{font-size:clamp(12px,1.1vw,16px);min-height:46px;padding:12px 21px;box-shadow:0 3px 20px #0005;background:#12242beF}#choices button[data-kind=optional]{font-weight:400;background:#101b21dE}#choices button[data-kind=route]{border-color:#dfc48d}.panel{position:absolute;left:7.5%;top:50%;transform:translateY(-50%);max-width:72%;text-shadow:0 2px 18px #0008}.eyebrow{font:600 clamp(9px,.9vw,12px)/1.5 system-ui,sans-serif;text-transform:uppercase;letter-spacing:2.5px;color:#dac391;margin:0 0 15px}h1{font-size:clamp(37px,6.5vw,92px);font-weight:400;line-height:.93;letter-spacing:-2.5px;margin:0}h2{font-size:clamp(28px,3vw,44px);font-weight:400;margin:0 0 14px}.chapter-name{font-size:clamp(17px,2vw,28px);font-style:italic;letter-spacing:.5px;margin:18px 0;color:#ddc99e}.menu-copy{font-size:clamp(14px,1.2vw,18px);line-height:1.5;margin-bottom:23px}.menu-buttons{display:flex;gap:10px}.primary{background:#d3b985;color:#142026;border-color:#dec89b;min-width:150px}.primary:hover{background:#ebd9b2}.menu-buttons button{min-height:46px}#menu-note,.casting-link{font:11px/1.5 system-ui,sans-serif;color:#dbd9d0b0}#menu-note{margin:13px 0 8px}.casting-link{text-underline-offset:4px}.modal-panel{position:absolute;inset:0;z-index:10;background:#071018e8;display:grid;place-items:center;text-align:center;padding:24px;backdrop-filter:blur(10px)}.modal-panel p{line-height:1.6;margin:0 0 25px;color:#d9d8cf}.modal-panel button{margin:5px}#portrait{z-index:30;background:#0c171f;backdrop-filter:none}.rotate-icon{display:block;font:64px/1.2 system-ui;margin-bottom:15px;color:#d3b985}.end-panel{position:absolute;left:4%;bottom:6%;padding:24px 29px;background:#091923e8;border:1px solid #d3b98545;border-radius:4px}.end-panel .eyebrow{margin-bottom:10px}.end-panel h2{margin-bottom:6px}.end-panel p{margin:0 0 17px}.end-panel button{margin-right:8px}#save-status{position:absolute;bottom:11px;right:16px;font:10px/1.4 system-ui,sans-serif;letter-spacing:.4px;color:#d9e3e5a8;pointer-events:none}#media-note{position:absolute;right:16px;bottom:30px;font:10px/1.4 system-ui,sans-serif;color:#ecd6a3;background:#111c23cE;padding:5px 8px;border-radius:3px;pointer-events:none}@media(max-height:520px) and (orientation:landscape){#hud{padding:9px 14px}.place{gap:2px}.place span:first-child{font-size:8px}#scene-title{font-size:13px}nav{gap:4px}nav button{min-height:44px;min-width:44px;font-size:10px;padding:7px 9px}#caption{bottom:17%;padding:9px 15px 10px;width:83%}#line{font-size:17px;line-height:1.3}#speaker{font-size:10px}#choices{bottom:3.5%;gap:6px}#choices button{min-height:44px;padding:9px 13px;font-size:12px}.panel{left:7%}.eyebrow{margin-bottom:10px}h1{font-size:clamp(37px,7vw,61px);letter-spacing:-1.7px}.chapter-name{margin:10px 0;font-size:20px}.menu-copy{margin:0 0 12px;font-size:13px}.menu-buttons button{min-height:44px}.primary{min-width:135px}#menu-note{margin:7px 0 4px;font-size:10px}.casting-link{font-size:10px}.end-panel{padding:16px 22px;bottom:6%}.end-panel h2{font-size:26px}#save-status{bottom:4px;font-size:9px}#media-note{bottom:17px}.modal-panel p{margin-bottom:13px}}@media(orientation:portrait) and (max-width:760px){#stage{width:100vw;height:100dvh}#plate{object-fit:contain}.panel{max-width:86%}#portrait h2{font-size:32px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
:root #menu{left:43%;max-width:53%}
@media(max-height:520px) and (orientation:landscape){#choices button{max-width:48%;flex:0 1 auto}#menu{left:43%;max-width:54%}}
/* Captions and actions share normal flow: wrapped buttons reserve their own space. */
#dialogue{position:absolute;inset:auto 3% 5%;display:flex;flex-direction:column;align-items:center;gap:12px;pointer-events:none}
#dialogue #caption{position:static;transform:none;width:min(760px,88%);margin:0}
#dialogue #choices{position:static;inset:auto;width:100%;pointer-events:auto}
#choices:empty{display:none}
@media(max-height:520px) and (orientation:landscape){#dialogue{bottom:3.5%;gap:9px}#dialogue #caption{width:88%}}
/* Speaker identity remains legible in a still-image conversation. */
#speaker{display:inline-block;font:700 clamp(12px,1.1vw,15px)/1.35 system-ui,sans-serif;letter-spacing:.5px;padding:3px 9px;border:1px solid #e5c58d66;border-radius:3px;background:#14232cf0}
#caption.narrator #speaker{display:inline-block}
#caption.narrator #line{margin-top:5px}
#caption.thought{border-left:3px solid #9fcad7}
#caption.thought #speaker{color:#c4e4ee;border-color:#9fcad766}
@media(max-height:520px) and (orientation:landscape){#speaker{font-size:12px;padding:2px 7px}}

/* Chapter selection: one playable night, four deliberately unopened chapters. */
.menu-buttons{flex-wrap:wrap}
.chapter-picker{width:min(540px,94vw);max-height:calc(100dvh - 40px);overflow-y:auto;padding:6px 12px}
.chapter-picker .eyebrow{margin-bottom:8px}.chapter-picker h2{margin-bottom:18px}
#chapter-list{display:grid;gap:8px;margin-bottom:15px}
.chapter-option{display:flex;align-items:center;gap:20px;width:100%;min-height:64px;text-align:left;padding:10px 18px;border-color:#c8aa7359;background:#17262ce8}
.chapter-option:not(:disabled):hover{background:#30434a;border-color:#d9bc80}
.chapter-option:disabled{opacity:.5;cursor:default;background:#101b20}
.chapter-number{font:26px/1 Georgia,serif;color:#dbbe87;min-width:35px}
.chapter-copy{display:flex;flex-direction:column;gap:5px}
.chapter-copy strong{font:20px/1.15 Georgia,serif;font-weight:400}.chapter-copy>span{font:11px/1.3 system-ui,sans-serif;color:#bdc4c2}
@media(max-height:520px){.chapter-picker{max-height:calc(100dvh - 20px)}.chapter-picker h2{font-size:26px;margin-bottom:10px}.chapter-option{min-height:50px;padding:7px 14px}.chapter-copy strong{font-size:17px}#chapter-list{gap:5px;margin-bottom:8px}.chapter-picker .eyebrow{font-size:9px}}

/* Silent movement dissolves run on the pausable presentation clock. */
#plate{transition:none}#plate-previous{position:absolute;width:100%;height:100%;object-fit:contain;pointer-events:none}

/* Local storefront returns use the existing pagehide save and pause lifecycle. */
.all-games-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 17px;border:1px solid #c1b79765;border-radius:3px;background:#132029e8;color:#f4f0e5;font:600 13px/1.2 system-ui,sans-serif;text-decoration:none;white-space:nowrap}
.all-games-link:hover{background:#2c3d43}
.menu-links,.panel-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.panel-actions{justify-content:center}
.panel-actions button{margin:0}
.end-panel{max-width:92%}.end-panel .panel-actions{justify-content:flex-start}
.menu-links .casting-link{padding:10px 0}
.chapter-picker>.panel-actions{margin-bottom:12px}
@media(max-height:520px) and (orientation:landscape){#menu .menu-buttons button{min-width:0;flex:1 1 auto}}

