@import url('./style.css');
:root{color-scheme:dark;--gold:#ecc781;--line:#56748255;--ink:#071b26}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 30% 0,#193e50 0,transparent 65%),#07131d;color:#eaf1ed;font:16px/1.55 system-ui,sans-serif}button,select{font:inherit;color:inherit;background:#122d3a;border:1px solid #718991;border-radius:8px;min-height:46px;padding:10px 16px}button{cursor:pointer}button:hover:not(:disabled){border-color:var(--gold);background:#254556}button:disabled{opacity:.45;cursor:default}a{color:inherit}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #f4d590;outline-offset:4px}[hidden]{display:none!important}.skip{position:absolute;top:-90px;z-index:10}.skip:focus{top:4px;background:#fff;color:#000;padding:14px}.mast{display:flex;align-items:center;gap:24px;max-width:1560px;margin:auto;padding:22px 32px;border-bottom:1px solid var(--line)}.mast>a{text-decoration:none;font-family:Georgia,serif;font-size:22px;letter-spacing:3px;color:var(--gold)}.mast>a span{font:10px system-ui;letter-spacing:2px;display:block;color:#bdd0d8}.mast nav{display:flex;gap:22px;margin-left:auto;font-size:13px}.mast nav a{text-decoration:none}.local{font-size:10px;letter-spacing:1px;border:1px solid var(--line);padding:7px;color:#a3bdc7}main{max-width:1500px;margin:auto;padding:32px}.title-row{display:flex;justify-content:space-between;align-items:end;margin-bottom:24px}.eyebrow{font:11px/1.5 system-ui;letter-spacing:2px;color:var(--gold);margin:0 0 8px}h1{font:clamp(30px,3.5vw,52px)/1.1 Georgia,serif;margin:0;font-weight:normal}h2{font:clamp(23px,2vw,31px)/1.2 Georgia,serif;margin:0 0 10px}.edition{color:#adbec5;text-align:right;font-size:13px;margin:0}.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 292px;gap:24px;align-items:start}.encounter{min-width:0;background:#0c202bf0;border:1px solid #62859855;border-radius:14px;overflow:hidden;box-shadow:0 18px 60px #0005}.stage{position:relative;aspect-ratio:16/9;background:#061018;isolation:isolate;overflow:hidden}.stage canvas{width:100%;height:100%;display:block}.stage-top,.stage-bottom{position:absolute;left:22px;right:22px;display:flex;justify-content:space-between;gap:12px;font-size:10px;letter-spacing:2px;pointer-events:none}.stage-top{top:19px}.stage-top>span:first-child{color:#b8cbd1}.stage-top>span:last-child{color:#f4d18d}.stage-bottom{bottom:18px;color:#c5d4d6}.stage-bottom>span:last-child{letter-spacing:0;color:#879ca4}.aim{position:absolute;top:18%;left:61%;text-align:center;color:#efca92;opacity:0;transition:opacity .1s;pointer-events:none;font:10px/1 system-ui;letter-spacing:2px}.aim i{display:block;width:76px;height:76px;border:1px solid #ffd196;border-radius:50%;margin:12px auto;box-shadow:0 0 30px #f2ae3033}.aim i:after{content:'↓';font-size:36px;line-height:72px}body[data-phase=telegraph] .aim,body[data-phase=window] .aim{opacity:1}body[data-phase=window] .aim{color:white}.narrative{padding:24px 28px 6px;min-height:151px;border-top:1px solid #6c94a34d}.narrative p:last-child{margin:0;color:#bfced0;max-width:69ch;font-size:15px}.controls{display:flex;align-items:stretch;gap:12px;padding:20px 28px 8px;flex-wrap:wrap}.primary{background:linear-gradient(110deg,#e9d2a0,#c8a261);color:#15232a;border:0;font-weight:650;min-width:200px}.primary:hover:not(:disabled){background:#f4dca6;color:#15232a}.primary span{padding-left:20px}.block{background:#193c4b;min-width:195px;font-size:22px;letter-spacing:3px;border:1px solid #b99b64}.block small{display:block;font:9px/1.5 system-ui;letter-spacing:1px}body[data-phase=window] .block{background:#ead49f;color:#0a202a;box-shadow:0 0 22px #eed59933}.input-notice{font-size:12px;color:#a9c1c9;padding:2px 28px 18px;margin:0;min-height:40px}.companion{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#0c202bb3}.portrait{position:relative;height:250px;overflow:hidden}.portrait img{height:100%;width:100%;object-fit:cover;object-position:78% 30%;transform:scale(1.12)}.portrait:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#0c202b,transparent 55%)}.portrait>span{position:absolute;bottom:10px;left:22px;font:22px Georgia,serif;letter-spacing:3px;z-index:1;color:var(--gold)}.portrait small{font:9px system-ui;letter-spacing:2px}.companion-body{padding:2px 20px 22px}.quote{font:italic 20px/1.5 Georgia,serif;color:#ead8b4;margin:16px 0}.fine{font-size:12px;line-height:1.6;color:#a3bac3}.film-link{width:100%;background:transparent;text-align:left;font-size:12px;padding:10px}.options{border-top:1px solid var(--line);padding-top:18px;margin-top:20px}.options label,details label{display:block;color:#bfcfd2;font-size:12px;margin:8px 0 5px}select{width:100%;font-size:13px}.setting-buttons{display:flex;gap:8px;margin:12px 0}.setting-buttons button{flex:1;font-size:11px;padding:7px}details{border-top:1px solid var(--line);padding-top:15px;margin-top:16px;font-size:12px;color:#b9cbd3}summary{cursor:pointer;color:#e3ded0;min-height:36px}details button{font-size:11px;display:block;margin:8px 0}footer{display:flex;gap:20px;flex-wrap:wrap;font-size:11px;color:#93a9b3;padding:22px 0;align-items:center}footer a{margin-left:auto}.intro-overlay{position:absolute;inset:0;background:#061018;z-index:4;display:flex;flex-direction:column;justify-content:center}.intro-overlay video{max-width:100%;max-height:78%;object-fit:contain}.intro-overlay>div{display:flex;gap:12px;align-items:center;padding:14px;font-size:12px;justify-content:space-between}.intro-overlay button{font-size:12px}.stage[data-feedback=pressed]{box-shadow:inset 0 0 0 4px #ecd499}body[data-motion=reduced] *{scroll-behavior:auto!important;transition:none!important;animation:none!important}@media(max-width:1050px){.play-layout{grid-template-columns:minmax(0,1fr) 240px}.mast{padding:16px 24px}.local{display:none}.portrait{height:200px}main{padding:24px}.companion-body{padding:0 16px 18px}.controls{padding:18px 22px 8px}.narrative{padding:20px 22px 4px}}@media(max-width:760px){main{padding:20px 14px}.mast{padding:16px;gap:12px}.mast nav{gap:12px;font-size:11px}.mast>a{font-size:17px}.title-row{margin-bottom:18px}.edition{display:none}.play-layout{display:block}.companion{margin-top:20px;display:grid;grid-template-columns:130px 1fr}.portrait{height:100%;min-height:200px}.portrait img{object-position:72%}.portrait>span{font-size:17px;left:10px;letter-spacing:1px}.portrait small{font-size:7px;letter-spacing:1px}.companion-body{padding:10px 16px 18px}.quote{font-size:18px}.stage{aspect-ratio:16/9}.stage-top,.stage-bottom{left:14px;right:14px;font-size:8px;letter-spacing:1px}.stage-bottom>span:last-child{display:none}.aim{left:61%;top:18%}.aim i{width:52px;height:52px}.aim i:after{line-height:48px;font-size:28px}.controls{padding:16px 16px 4px;gap:8px}.controls .primary{min-width:0;flex:1}.block{min-width:180px;flex:1}.narrative{padding:18px 16px 4px;min-height:150px}.input-notice{padding:8px 16px 18px}.narrative p:last-child{font-size:14px}}@media(max-width:380px){.mast nav a:first-child{display:none}.companion{display:block}.portrait{height:170px}.portrait img{object-position:80% 30%}.controls button{width:100%}.title-row h1{font-size:28px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Cinematic chapter surface: contained films and readable story outside the frame. */
.chapter-track{padding:13px 22px;color:#b5cacf;border-bottom:1px solid var(--line);font-size:11px;letter-spacing:1px}
.cinematic-panel{background:#081a25}.film-frame{aspect-ratio:16/9;position:relative;background:#020911;overflow:hidden}.film-frame img,.film-frame video{position:absolute;width:100%;height:100%;inset:0;object-fit:contain}.film-copy{padding:24px 28px}.film-copy>p:not(.eyebrow){color:#c5d3d6;max-width:72ch}.film-copy h2{font-size:clamp(27px,3vw,38px)}.film-controls{display:flex;flex-wrap:wrap;gap:10px;margin:22px 0 12px}.film-controls button{font-size:13px}.film-controls .primary{min-width:0}.film-copy [tabindex]:focus{outline:none}.film-copy [tabindex]:focus-visible{outline:2px solid var(--gold);outline-offset:5px}.chapter-ending{padding:24px 28px;border-top:1px solid var(--line);background:linear-gradient(140deg,#14313d,#0a1e2b)}.chapter-ending nav{display:flex;flex-wrap:wrap;gap:18px;margin:24px 0}.chapter-ending nav a{display:inline-block;padding:12px 0;color:var(--gold)}.chapter-ending p{max-width:65ch;color:#c1d0d4}

/* Before Start, the live BLOCK target can be rehearsed without entering the encounter. */
body[data-phase=ready] .block[data-practice=true]{background:#142f3b;border-style:dashed;color:#efdfba}
body[data-phase=ready] .block[data-practice=true][data-practice-acknowledged=true]{border-style:solid;border-color:#efcf87;box-shadow:0 0 18px #efcf8730}
@media(max-width:760px){body[data-phase=ready][data-story-phase=ready] main{padding-bottom:132px}body[data-phase=ready][data-story-phase=ready] .controls{position:fixed;z-index:30;left:0;right:0;bottom:0;justify-content:center;gap:8px;margin:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid #c9ad7155;background:linear-gradient(180deg,#07131de8,#07131d 28%);backdrop-filter:blur(10px)}body[data-phase=ready][data-story-phase=ready] .controls #start,body[data-phase=ready][data-story-phase=ready] .controls #block[data-practice=true]{flex:1 1 0;width:auto;max-width:440px;min-width:0;min-height:60px}body[data-phase=ready][data-story-phase=ready] .controls #start{font-size:14px;padding:8px}body[data-phase=ready][data-story-phase=ready] .controls #block{font-size:17px;letter-spacing:1px}body[data-phase=ready][data-story-phase=ready] .controls #block small{font-size:8px;letter-spacing:.5px}}
@media(max-width:760px){.film-copy,.chapter-ending{padding:22px 16px}.film-copy>p{font-size:14px}.film-copy>p.fine{font-size:12px}.film-controls{gap:8px}.film-controls button{flex:1 1 40%;min-width:0}.chapter-track{padding:12px 16px;font-size:10px}}

/* Hold the matched film pose until player entry; retain the actual aftermath on chapter close. */
.continuity-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;background:#061018;opacity:1}.continuity-frame.is-entering{opacity:0;transition:opacity .32s ease-out}.stage-top,.stage-bottom{z-index:1}

/* Put the onward route beside replay, where the completed encounter is visible. */
.controls .onward{display:flex;align-items:center;justify-content:center;text-decoration:none;padding:10px 16px;border-radius:8px;min-height:46px;text-align:center}

/* Make the no-deadline path an equal, pre-play choice in the first viewport. */
.mode-preflight{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,340px);grid-template-rows:auto auto auto;column-gap:28px;align-items:center;padding:20px 24px;margin:0 0 22px;border:1px solid #d3b87588;border-radius:14px;background:linear-gradient(110deg,#173541,#102630);box-shadow:0 10px 32px #0003}
.mode-preflight>div{grid-column:1;grid-row:1 / span 3}.mode-preflight .eyebrow{margin-bottom:5px}.mode-preflight h2{margin:0 0 5px;font-size:clamp(21px,2.2vw,28px)}.mode-preflight p:last-child{margin:0;color:#c4d3d4;font-size:15px;line-height:1.45}.mode-preflight label{grid-column:2;grid-row:1;color:#e6d5ae;font-weight:650;font-size:14px;margin:0 0 5px}.mode-preflight select{grid-column:2;grid-row:2;width:100%;min-height:52px;padding:10px 14px;border-color:#ddc488;background:#142f3b;color:#fff;font-size:16px;font-weight:650}.mode-preflight .skip-recap-shortcut,.mode-preflight .story-bridge-shortcut{grid-column:2;grid-row:3;width:100%;min-height:46px}.mode-preflight .skip-recap-shortcut{border-color:#b99b64;background:transparent;color:#f0d59a;font-weight:650}
@media(max-width:760px){.mode-preflight{grid-template-columns:1fr;grid-template-rows:auto auto auto auto;gap:8px;padding:14px 16px;margin-bottom:16px}.mode-preflight>div,.mode-preflight label,.mode-preflight select,.mode-preflight .skip-recap-shortcut,.mode-preflight .story-bridge-shortcut{grid-column:1}.mode-preflight>div{grid-row:1}.mode-preflight label{grid-row:2;margin:2px 0 0}.mode-preflight select{grid-row:3}.mode-preflight .skip-recap-shortcut,.mode-preflight .story-bridge-shortcut{grid-row:4}.mode-preflight .eyebrow{font-size:10px;letter-spacing:1px}.mode-preflight h2{font-size:22px}.mode-preflight p:last-child{font-size:14px}}

/* Keep play style editable after the story bridge without letting setup push the first action off-screen. */
.mode-preflight[data-compact="true"]{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,280px);grid-template-rows:auto;padding:8px 14px;margin-bottom:10px;column-gap:12px;box-shadow:none}
.mode-preflight[data-compact="true"]>div{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.mode-preflight[data-compact="true"] label{grid-column:1;grid-row:1;margin:0;align-self:center;font-size:13px}
.mode-preflight[data-compact="true"] select{grid-column:2;grid-row:1;min-height:48px;font-size:14px}
@media(max-width:760px){.mode-preflight[data-compact="true"]{grid-template-columns:minmax(0,1fr) minmax(150px,auto);grid-template-rows:auto;align-items:center;gap:8px;padding:7px 10px;margin-bottom:8px}.mode-preflight[data-compact="true"]>div{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.mode-preflight[data-compact="true"] label{grid-column:1;grid-row:1;margin:0;font-size:12px}.mode-preflight[data-compact="true"] select{grid-column:2;grid-row:1;min-height:48px;padding:8px;font-size:14px}}

/* Keep the single moment-of-action control reachable on narrow touch screens. */
@media(max-width:760px){body[data-phase="intro"] .controls,body[data-phase="telegraph"] .controls,body[data-phase="window"] .controls{position:fixed;z-index:30;left:0;right:0;bottom:0;justify-content:center;gap:8px;margin:0;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid #c9ad7155;background:linear-gradient(180deg,#07131de8,#07131d 28%);backdrop-filter:blur(10px)}body[data-phase="intro"] .controls #block,body[data-phase="telegraph"] .controls #block,body[data-phase="window"] .controls #block{flex:1 1 auto;width:auto;max-width:440px;min-width:170px;min-height:60px}body[data-phase="intro"] .controls #pause,body[data-phase="telegraph"] .controls #pause,body[data-phase="window"] .controls #pause{min-width:88px}}

/* The active-action dock is fixed to the viewport. Add scrollable clearance so
   the last story, settings and footer content can be brought above that dock. */
@media(max-width:760px){body[data-phase="intro"],body[data-phase="telegraph"],body[data-phase="window"]{padding-bottom:calc(80px + env(safe-area-inset-bottom,0px))}}
@media(max-width:380px){body[data-phase="intro"],body[data-phase="telegraph"],body[data-phase="window"]{padding-bottom:calc(135px + env(safe-area-inset-bottom,0px))}}
