/* One journey, distinct scenes. No repeated photographic chapter backgrounds. */
:root{--bg:#100f14;--surface:#1b1920;--ink:#f0e9dd;--muted:#c0b7b0;--accent:#d8b88f;--line:#81705b66}
body{background:var(--bg)}
.introduction,.chapter{position:relative;isolation:isolate;color:var(--ink);background:var(--bg)}
.introduction{background:linear-gradient(#101117,#15141b)}
.chapter-1,.chapter-2,.chapter-3{--bg:#15141b}
.chapter-4,.chapter-5{--bg:#1c181c}
.chapter-6,.chapter-7{--bg:#11171d}
.chapter-8,.chapter-9{--bg:#141820}
.chapter-10,.chapter-11{--bg:#171c22}
.chapter-12{--bg:#1c1d23;background:var(--bg)}
.chapter:not(.wide-scene):before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 0 30%,#c8a27308,transparent 65%)}
.introduction h2:first-child{font-family:ThmanyahDisplay;font-size:clamp(30px,4vw,44px);line-height:1.65;margin:0 0 45px}
.chapter-transition .thought{color:var(--accent)}
.chapter .stage-caption,.chapter .stage-notice,.chapter .stage-sub{color:var(--muted)}
.chapter .explorer{background:transparent}
.chapter .quran,.introduction .quran,.scroll-ending .quran{background:transparent!important;border:0;border-inline-start:1px solid var(--line);padding:8px clamp(20px,3vw,36px);margin-block:48px!important;box-shadow:none}
.quran-text{font-size:clamp(25px,2.1vw,30px);line-height:2.05;overflow-wrap:normal;word-break:normal;text-wrap:pretty}
.quran strong{font-size:15px;line-height:1.8;margin-top:16px;color:var(--accent)}
.opening{height:245svh;background:#101117;--sleep-progress:0}
.opening .room{z-index:-3}
.opening .room picture{opacity:var(--wake-opacity,1);transform:scale(var(--cinema-room-scale,1.04)) translate3d(var(--pointer-x,0px),var(--pointer-y,0px),0);will-change:transform,opacity}
.room img{filter:brightness(.9) saturate(.82);animation:none}
.opening .room-shade{background:linear-gradient(0deg,#101117,transparent 28%,#0b0c1230 75%,#0b0c1266);background-color:transparent!important;opacity:1}
.opening-dream{position:absolute;inset:0;z-index:-2;opacity:var(--dream-opacity,0);overflow:hidden;pointer-events:none;will-change:opacity}
.opening-dream img{width:100%;height:100%;object-fit:cover;object-position:38% center;transform:scale(var(--dream-scale,1.14));will-change:transform;filter:brightness(.66)}
.opening-dream:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#101117,transparent 35%,#10111720),linear-gradient(90deg,transparent,#10111740)}
.opening-stage:before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:#070a10;opacity:var(--sleep-shade,0);will-change:opacity}
.opening-stage:after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 25% 55%,#efbd7138,transparent 63%);opacity:var(--lamp-opacity,.6);animation:none}
.opening-inview:not(.motion-off) .opening-stage:after{animation:lamplight 9s ease-in-out infinite alternate}
@keyframes lamplight{from{filter:opacity(.7)}to{filter:opacity(1)}}
.hero-copy{text-shadow:0 3px 30px #08080be0}.hero h1{font-size:clamp(160px,23vw,330px);line-height:1.2}
.hero-sub{color:#f0e9dd}.hero-bottomline{opacity:var(--cinema-title-alpha,1)}
.start{min-width:110px;min-height:64px}.opening-bridge{text-shadow:0 2px 25px #08080b}
.opening-bridge>p{max-width:900px}.opening-bridge .opening-question{color:#e0d8ce}
.wide-scene .cinema-visual{background:#11171d}
.wide-scene .cinema-visual .stage-photo img{filter:brightness(.78) saturate(.8);object-position:38% center;transform:scale(var(--wide-scale,1.02))}
.wide-scene.chapter-6 .cinema-visual:after{background:linear-gradient(90deg,#11171df2,#11171dc9 43%,#11171d12 76%),linear-gradient(0deg,#11171d,transparent 18%,transparent 82%,#11171d)}
.wide-scene .stage-photo figcaption,.wide-scene.chapter-6 .stage-photo figcaption{color:#dbd1c2;background:transparent;text-shadow:0 1px 8px #000;padding:12px 16px;bottom:28px}
.scroll-ending{background:#1c1d23;isolation:isolate;overflow:clip;color:var(--ink)}
.scroll-ending .prose{background:transparent;padding:28px;text-shadow:0 2px 16px #08080b}
.scroll-ending .dawn-sticky{opacity:var(--dawn-scene-opacity,.35)}.dawn-sticky img{filter:brightness(.7) saturate(.8)}
.portal-room img{filter:brightness(.55) saturate(.8)}
.site-header,.site-header.is-reading{color:#f0e9dd;background:linear-gradient(#100f12a6,#100f1200);backdrop-filter:none;border-bottom:0;transition:background .4s}
.site-header.dream-entered,.site-header.dream-entered.is-reading{background:transparent;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.site-header a,.site-header button{text-shadow:0 2px 8px #000,0 0 18px #100f12;min-height:44px;display:inline-flex;align-items:center}
.site-header:has(button:focus-visible),.site-header:hover{background:#100f1280}
.chapter-compass{background:#100f12b8}.stage-caption{min-height:5.6em}
@media(max-width:850px){
 .opening{height:230svh}.hero h1{font-size:clamp(145px,42vw,210px)}
 .room img{filter:brightness(.82) saturate(.8)}.opening-dream img{object-position:35% center}
 .chapter-visual:not(.cinema-visual){background:var(--bg);border-bottom:1px solid #81705b33}
 .quran-text{font-size:25px;line-height:2}.chapter .quran,.introduction .quran,.scroll-ending .quran{padding-inline:18px 6px;margin-block:40px!important}
 .wide-scene.chapter-6 .cinema-visual:after{background:linear-gradient(0deg,#11171d,transparent 17%,transparent 83%,#11171d),linear-gradient(90deg,#11171dd4,#11171d9e)}
 .wide-scene .stage-photo figcaption,.wide-scene.chapter-6 .stage-photo figcaption{bottom:12px;padding:8px}
 .scroll-ending .prose{padding-inline:16px}.stage-caption{min-height:6.8em}
}
.motion-off .opening-stage:after{animation:none!important}.motion-off .opening-dream{display:none}
.motion-off .opening .room picture{opacity:1!important;transform:none!important}.motion-off .opening-stage:before{opacity:0}
.motion-off .opening{height:auto}
@media(prefers-reduced-motion:reduce){.opening-stage:after{animation:none!important}}
@media print{.introduction,.chapter,.scroll-ending{background:white;color:black}.chapter:before,.reference-return{display:none}}
.sources li{scroll-margin-top:110px;padding-block:18px}
.reference-return{display:block;margin:14px 0 6px;padding:10px 18px;min-height:44px;background:#302a22;color:#fff0d7;border:1px solid #d8b88f80;border-radius:4px;font:inherit;cursor:pointer}
.reference-return[hidden]{display:none}.reference-return:hover{background:#433828}
.backlinks{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:10px}.backlinks a{font-size:13px!important;line-height:1.8;min-height:44px;padding:6px 2px;display:inline-flex;align-items:center;color:#d8b88f}
.reading-return-highlight{outline:2px solid #d8b88f;outline-offset:6px;background:#d8b88f18}
a:focus-visible,button:focus-visible{outline:2px solid #e4c8a3;outline-offset:5px}

/* Keep the opening title inside narrow phone viewports. */
@media(max-width:360px){.hero h1{font-size:clamp(112px,40vw,144px)}}
