@charset "UTF-8";
:root{color-scheme:dark;--ink:#101512;--paper:#e9e4d6;--muted:#a6afa5;--gold:#c7a773;--cyan:#8db7a9;--line:rgba(201,178,134,.18);--story-size:16px;--title-size:clamp(38px,4.1vw,60px);font-family:'DM Sans',sans-serif;background:var(--ink);color:var(--paper);font-synthesis:none}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:0}
body{margin:0;background:radial-gradient(ellipse at 77% 34%,#1f292219,transparent 55%),var(--ink)}
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:8;opacity:.035;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23ffffff' filter='url(%23n)' opacity='.7' d='M0 0h180v180H0z'/%3E%3C/svg%3E")}
button,a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
a{color:inherit;text-decoration:none}button{font:inherit;color:inherit;cursor:pointer}
button:focus-visible,a:focus-visible{outline:2px solid var(--cyan);outline-offset:6px}
::selection{background:#b7996470;color:#fff}[hidden]{display:none!important}
.skip-link{position:fixed;top:10px;left:15px;z-index:30;background:var(--paper);color:var(--ink);padding:12px;transform:translateY(-150%)}.skip-link:focus{transform:none}

/* Match the game masthead's original mark and wordmark, without a tagline. */
.masthead{height:104px;position:fixed;inset:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 5.1%;gap:20px;z-index:10;background:linear-gradient(var(--ink) 65%,#101512df);border-bottom:1px solid var(--line);backdrop-filter:blur(12px)}
.brand{display:flex;gap:12px;align-items:center;font-size:14px;letter-spacing:3px;font-weight:700}.brand-mark{font-size:32px;color:#efb968;line-height:1}
.masthead .primary-nav{display:flex;align-items:center;gap:28px;font-size:14px;white-space:nowrap}
.masthead .primary-nav a{padding:12px 0 9px;border-bottom:2px solid transparent;color:var(--muted)}
.masthead .primary-nav a:hover{color:var(--paper)}
.masthead .primary-nav a[aria-current="page"]{border-bottom-color:var(--gold);color:var(--paper)}

/* Two reading sizes throughout: a chapter heading and ordinary narrative. */
.chronicle{position:relative;width:42%;margin-left:7%;z-index:3;max-width:570px}
.chapter{min-height:110svh;display:flex;flex-direction:column;justify-content:center;padding:145px 0 115px;max-width:470px}
.opening{padding-top:150px;min-height:100svh}
h1,h2{font:500 var(--title-size)/1.09 Manrope,sans-serif;letter-spacing:-.045em;margin:0 0 30px;text-wrap:balance}
#title-prologue:focus{outline:none}
p{max-width:380px;font-size:var(--story-size);line-height:1.75;color:var(--muted);margin:0 0 20px;text-wrap:pretty}
.chapter strong{color:var(--paper);font-weight:500}
.prologue{min-height:170svh;display:block;padding-top:23svh}
@media(min-width:761px){.prologue-copy{position:sticky;top:calc(104px + 7svh)}}

/* One fixed illustration stays tied to the existing scroll position. */
.stage{position:fixed;width:55%;height:calc(100svh - 168px);right:1%;top:104px;z-index:2;isolation:isolate;overflow:hidden}
.stage-aura{position:absolute;inset:8% 0 0;background:radial-gradient(ellipse at 50% 47%,#977c3e18,transparent 61%);z-index:-1}
#story-canvas{display:block;width:100%;height:100%;position:absolute;inset:0;outline:0}
.scene-fallback{position:absolute;inset:15% 15% 24%;text-align:center;color:var(--gold)}
.scene-fallback svg{max-height:70%;width:100%;filter:drop-shadow(0 0 12px #75b8ae44)}
.scene-fallback p{color:var(--gold);margin:0 auto 8px}.scene-fallback small{color:var(--muted);font-size:var(--story-size)}

.chapter-rail{position:fixed;inset:auto 0 0;height:64px;background:#101512f2;border-top:1px solid var(--line);z-index:10;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 5.1%;backdrop-filter:blur(10px);font-size:14px}
.rail-progress{position:absolute;inset:0 0 auto;height:1px}.rail-progress span{display:block;width:100%;height:100%;background:var(--gold);transform:scaleX(0);transform-origin:left}
.current-chapter{display:flex;align-items:center;gap:10px}.chapter-divider{color:#758274}#chapter-number{color:var(--gold)}#chapter-name{margin-left:8px;color:var(--muted)}
html[data-chapter="prologue"] .chapter-divider{visibility:hidden}
.scroll-reminder{color:var(--gold);font-size:14px;text-transform:lowercase}.scroll-reminder span{margin-left:10px}
.story-controls{display:flex;align-items:center;gap:24px}
.playback-control,.sound-control{border:0;background:transparent;color:var(--muted);font-size:14px;min-height:44px;padding:10px 0;white-space:nowrap}
.playback-control:hover,.sound-control:hover{color:var(--paper)}.sound-control[aria-pressed="true"]{color:var(--gold)}

.ending .challenge{color:var(--paper);margin:8px 0 0}
.play-link{display:flex;justify-content:space-between;align-items:center;max-width:360px;min-height:60px;margin-top:20px;padding:14px 22px;gap:32px;border:1px solid #ddc18e;border-radius:4px;background:linear-gradient(120deg,#ddc18e,#bc985e);color:#171c16;font-size:var(--story-size);font-weight:600;box-shadow:inset 0 1px 0 #f4dfb966,0 6px 24px #00000020;transition:transform .2s ease,box-shadow .2s ease}
.play-link:hover{transform:translateY(-2px);box-shadow:inset 0 1px 0 #f4dfb966,0 9px 30px #00000035}
.play-arrow{font-weight:400}
.no-script{position:fixed;top:108px;right:10px;padding:10px;font-size:14px;color:var(--gold);z-index:9;background:var(--ink)}

/* Automatic type-in dialog supplies focus containment and native Escape. */
.story-entry{position:fixed;inset:0;margin:0;width:100%;max-width:none;height:100%;max-height:none;border:0;padding:0;color:var(--paper);background:linear-gradient(90deg,#101512f5 0%,#101512bf 36%,#10151220 76%),linear-gradient(0deg,#101512e6,transparent 35%,transparent 75%,#101512b3);overflow:auto}
.story-entry::backdrop{background:transparent}
.story-entry[open]{display:flex;align-items:center}
html[data-story-entry="true"]{overflow:hidden}
html[data-story-entry="true"] .chronicle,html[data-story-entry="true"] .masthead{visibility:hidden}
html[data-story-entry="true"] .current-chapter,html[data-story-entry="true"] .rail-progress,html[data-story-entry="true"] .scroll-reminder{visibility:hidden}
html[data-story-entry="true"] .stage{width:85%;right:-10%;top:0;height:100svh}

@media(min-width:1600px){.chronicle{margin-left:10%}.stage{right:3%;width:52%}}
@media(max-width:1100px) and (min-width:761px){.chronicle{margin-left:5%;width:43%}.chapter{padding-right:15px}.stage{right:0;width:52%}.scroll-reminder{display:none}}
@media(max-height:760px) and (min-width:761px){.chapter{min-height:120svh;padding-top:135px;padding-bottom:100px}.prologue{min-height:185svh}.prologue-copy{position:static}}
@media(max-width:760px){
 :root{--title-size:40px}
 html{scroll-padding-top:calc(30svh + 65px)}
 .masthead{height:65px;padding:0 5%;gap:12px}.brand{font-size:11px;letter-spacing:2px;gap:8px}.brand-mark{font-size:26px}
 .masthead .primary-nav{gap:15px}
 .stage{top:65px;left:0;right:0;width:100%;height:30svh;background:radial-gradient(ellipse at center,#263026,var(--ink) 72%);z-index:5;border-bottom:1px solid var(--line)}
 .chronicle{width:auto;max-width:none;margin:0 8%;padding-top:calc(30svh + 65px)}
 .chapter,.opening{min-height:100svh;max-width:520px;padding:30px 0 100px;justify-content:flex-start}
 .prologue{min-height:150svh}.ending{min-height:115svh}.chapter h1,.chapter h2{margin-bottom:24px}
 p{max-width:440px}.chapter-rail{height:60px;padding:0 5%;gap:10px}
 .current-chapter{gap:5px}#chapter-number,.chapter-divider{display:none}#chapter-name{margin:0}
 .story-controls{gap:16px}.playback-control,.sound-control,.chapter-rail{font-size:12px}
 .scroll-reminder{display:none}.scene-fallback{inset:5% 15% 12%}.stage-aura{inset:0}
 .story-entry{background:linear-gradient(0deg,#101512 5%,#101512d9 40%,#10151200 90%);align-items:flex-end!important}
 html[data-story-entry="true"] .stage{width:100%;right:0;top:0;height:65svh}
}
@media(max-width:370px){.brand{letter-spacing:1px;gap:4px}.masthead .primary-nav{gap:12px}.story-controls{gap:10px}:root{--title-size:36px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}
html[data-reduced-motion="true"]{scroll-behavior:auto}
html[data-reduced-motion="true"] *,html[data-reduced-motion="true"] *::before,html[data-reduced-motion="true"] *::after{animation:none!important;transition:none!important}

/* Hold the prose during the long mobile approach only when it fits below the scene. */
@media(max-width:760px) and (min-height:800px){.prologue-copy{position:sticky;top:calc(30svh + 85px)}}
@media(max-width:760px) and (max-height:799px){.prologue{min-height:0;padding-bottom:70px}}

/* Cinematic prologue: upright, scroll-controlled prose before the camera tour. */
body{overflow-x:clip}
html[data-cinematic="true"] .prologue{min-height:400svh;padding:0;max-width:none}
html[data-cinematic="true"] .prologue-viewport{position:fixed;inset:104px 0 64px;z-index:6;overflow:hidden;pointer-events:none;visibility:var(--crawl-visibility,visible);opacity:var(--crawl-opacity,1);mask-image:linear-gradient(transparent,#000 9%,#000 92%,transparent)}
html[data-cinematic="true"] .prologue-copy{position:relative;top:20%;width:35%;max-width:500px;margin:0 0 0 7%;transform-origin:50% 0;transform:translateY(var(--crawl-rise,0));will-change:transform,opacity}
html[data-cinematic="true"] .prologue-copy h1,html[data-cinematic="true"] .prologue-copy p{font:400 22px/1.7 'DM Sans',sans-serif;letter-spacing:0;max-width:none;margin:0 0 30px;color:var(--muted);text-align:left;text-wrap:wrap}
html[data-cinematic="true"] .stage{opacity:var(--intro-scene-opacity,0);transform:none;transform-origin:center}
html[data-cinematic="true"] #taverna{opacity:var(--friends-visible,0)}
html[data-cinematic="true"][data-story-entry="true"] .stage{opacity:0;transform:none}
html[data-cinematic="true"][data-story-entry="true"] .prologue-viewport{visibility:hidden}
[data-typing]{position:relative}
.copy-reserve{visibility:hidden}
.copy-ink{position:absolute;inset:0;white-space:pre-line;text-wrap:wrap}
.copy-accessible{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
[data-typing-active="true"]>.copy-ink::after{content:"";display:inline-block;width:1px;height:.85em;background:currentColor;margin-left:3px;vertical-align:baseline;opacity:.7}
@media(max-width:760px){
 html[data-cinematic="true"] .prologue{min-height:400svh;padding:0}
 html[data-cinematic="true"] .prologue-viewport{inset:calc(30svh + 65px) 0 60px}
 html[data-cinematic="true"] .prologue-copy{top:8%;width:84%;margin:0 auto}
 html[data-cinematic="true"] .prologue-copy h1,html[data-cinematic="true"] .prologue-copy p{font-size:17px;line-height:1.65;margin-bottom:25px}
 html[data-cinematic="true"] .stage{transform:none}
}
@media(max-height:650px){html[data-cinematic="true"] .prologue-copy{top:8%}html[data-cinematic="true"] .prologue-copy h1,html[data-cinematic="true"] .prologue-copy p{font-size:16px;line-height:1.5;margin-bottom:16px}}
html[data-reduced-motion="true"][data-cinematic="true"] .prologue-viewport{overflow:auto;mask-image:none;pointer-events:auto}
html[data-reduced-motion="true"][data-cinematic="true"] .prologue-copy{top:8%;transform:none;padding-bottom:30px}
html[data-reduced-motion="true"] [data-typing-active="true"]>.copy-ink::after{display:none}

/* The timed type-in shares the native entry dialog and its keyboard focus trap. */
.opening-sequence{display:block;position:fixed;top:calc(20svh + 70.4px);left:7%;width:35%;max-width:500px}
.opening-line{font:400 22px/1.7 'DM Sans',sans-serif;color:var(--muted);max-width:none;min-height:4.95em}
#opening-ink::after{content:"";display:inline-block;width:2px;height:1em;margin-left:4px;background:currentColor;vertical-align:-.1em}
html[data-opening-phase="typing"] .opening-sequence{display:block}
html[data-opening-phase="typing"] .story-entry{background:var(--ink);align-items:center!important}
html[data-opening-phase="typing"] .stage{visibility:hidden}
@media(max-width:760px){.opening-sequence{top:calc(35.6svh + 55px);left:8%;width:84%}.opening-line{font-size:17px;line-height:1.65}}

.opening-line strong{color:var(--paper);font-weight:500}

/* Leave enough scroll room for the final paragraph to reach the reading band. */
.chapter.ending{padding-bottom:55svh}
.story-entry:focus{outline:none}

/* Give the suspended grid a reading pause before the next sentence adds depth. */
[data-invention="lift"]{margin-bottom:24svh}
[data-invention="unfold"]{margin-bottom:12svh}

.opening-line{opacity:var(--opening-copy-opacity,1)}

/* Playback controls remain reachable while the non-modal opening is showing. */
.story-entry{z-index:11}
.chapter-rail{z-index:12}
.playback-control{min-width:70px;text-align:right}
