/* Lumora Kids · story chapter (shared scene styles). Static presentation is the default and the no-JavaScript
   fallback; [data-scene-mode=live] adds the native sticky sequence. Palette comes from story-identity.js as
   --sc-* variables; the fallbacks below are Jadav's so the chapter reads correctly before scripts run. */
.story-chapter{--sc-skyA:#fff6cf;--sc-skyB:#eddfb4;--sc-skyC:#d0d6bc;--sc-skyD:#91a68b;--sc-ground:#77885e;--sc-groundLight:#afb18b;--sc-hills:#748b65;--sc-accent:#997c43;--sc-copy:#234c3b;--sc-copyAccent:#7b663b;--sc-paper:#fbf5e8;--sc-progress:0;--sc-open:1;--sc-seed:0;--sc-roots:1;--sc-grow:1;--sc-forest:1;position:relative;color:var(--sc-copy);background:var(--sc-paper);outline:none}
.story-chapter .chapter-intro{text-align:center;padding:58px 22px 40px;position:relative;z-index:3}
.story-chapter .chapter-number{font:700 11px/1.6 Arial,sans-serif;letter-spacing:2px;color:#796443}
.story-chapter .chapter-intro h2{font-size:clamp(32px,4.2vw,54px);line-height:1.15;margin:18px auto;max-width:18ch}
.story-chapter .chapter-intro h2 em{color:#94713c;font-style:italic}
.story-chapter .chapter-intro p{color:#5f6e5b;font-size:15px;margin:0}
.story-chapter .chapter-intro a{text-decoration:underline;text-underline-offset:5px;display:inline-block;min-height:44px;padding:10px 4px;margin:-10px -4px}
.story-chapter .scene-status{font-size:12px;color:#6f6452;margin:8px 0 0}
/* ---- static layout (default) ---- */
.scene-stage{position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 58% 22%,var(--sc-skyA) 0%,var(--sc-skyB) 27%,var(--sc-skyC) 65%,var(--sc-skyD) 100%);padding:45px 7% 0;min-height:640px}
.scene-sky,.scene-sun,.scene-hills,.scene-ground,.scene-forest,.scene-canopy{position:absolute;pointer-events:none}
.scene-sun{left:48%;top:5%;width:min(35vw,420px);height:min(35vw,420px);background:#fff8d0;border-radius:50%;filter:blur(45px);opacity:.55;z-index:-4}
.scene-hills{inset:30% -10% -10%;border-radius:55% 65% 0 0;background:linear-gradient(#8b9d7a55,var(--sc-hills));z-index:-3}
.scene-ground{left:-10%;right:-10%;height:40%;bottom:-20%;background:radial-gradient(ellipse at 50% 0,var(--sc-groundLight),var(--sc-ground) 70%);border-radius:50% 50% 0 0;z-index:0}
.scene-forest{inset:0;z-index:-2;opacity:.35}
.scene-forest span{position:absolute;bottom:8%;width:18%;height:48%;border-radius:55% 45% 40% 45%;background:radial-gradient(ellipse at 35% 25%,#b4b773,#749568 50%,#52785d);box-shadow:25px -20px 0 -12px #97a773,-25px 10px 0 -10px #668865}
.scene-forest span:after{content:'';position:absolute;width:5%;height:64%;left:48%;bottom:-12%;background:#697450;border-radius:80% 30% 0 0}
.scene-forest span:nth-child(1){left:-7%;height:64%}.scene-forest span:nth-child(2){left:9%;height:45%;bottom:14%;opacity:.65}.scene-forest span:nth-child(3){left:30%;height:28%;bottom:17%;opacity:.5}.scene-forest span:nth-child(4){left:51%;height:37%;bottom:13%;opacity:.5}.scene-forest span:nth-child(5){left:68%;height:55%;opacity:.65}.scene-forest span:nth-child(6){left:86%;height:78%}.scene-forest span:nth-child(7){left:76%;height:30%;bottom:22%;opacity:.45}
.growth-art{position:absolute;right:1%;bottom:0;width:450px;max-width:80%;height:420px;overflow:visible;z-index:2;pointer-events:none}
.growth-art .sapling{transform-origin:500px 630px;transform:scale(var(--sc-grow));opacity:clamp(0,var(--sc-grow),1)}
.growth-art .roots path{stroke-dasharray:1;stroke-dashoffset:var(--sc-roots)}
.growth-art .seed-body{transform-origin:500px 615px;transform:translateY(calc(var(--sc-seed) * -95px)) rotate(calc(var(--sc-seed) * -22deg));opacity:calc(1 - var(--sc-grow) * .55)}
.growth-art .care-rings{opacity:calc(var(--sc-grow) * .6);transform-origin:500px 630px;transform:scale(calc(.8 + var(--sc-grow) * .2))}
.scene-canopy{display:none}
.scene-beat{position:relative;z-index:6;width:min(540px,100%);margin:0 0 36px;pointer-events:auto}
.scene-beat .eyebrow{font:700 12px/1.7 Arial,sans-serif;letter-spacing:2.5px;color:#78613c;margin:0 0 8px}
.scene-beat h3{font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:34px;line-height:1.08;letter-spacing:-1.2px;margin:0}
.scene-beat h3 em{color:var(--sc-copyAccent);font-style:italic}
.scene-beat p:last-child{margin:12px 0 0;font-size:17px;line-height:1.8}
.scene-beats{position:relative;z-index:6;padding-bottom:430px}
.scene-footer{position:absolute;z-index:8;bottom:88px;left:5%;right:5%;display:flex;justify-content:flex-start;gap:20px;color:#3c533c;font-size:11px}
.scroll-hint{display:none;letter-spacing:1.5px;font-weight:700}
.scroll-hint span{font-size:19px;margin-left:12px}
.scene-note{max-width:250px}
.scene-progress{display:none;position:absolute;bottom:0;left:0;right:0;height:3px;background:#68846430;z-index:8}
.scene-progress span{display:block;height:100%;width:100%;background:var(--sc-accent);transform:scaleX(var(--sc-progress));transform-origin:left}
.story-chapter .chapter-edge{position:absolute;bottom:-1px;left:0;right:0;height:70px;background:url('assets/painted-paper-edge.svg') center bottom/100% 100% no-repeat;z-index:9;pointer-events:none}
/* ---- live sequence ---- */
.story-chapter[data-scene-mode=live]{--sc-open:0;--sc-seed:1;--sc-roots:1;--sc-grow:0;--sc-forest:0}
.story-chapter[data-scene-mode=live] .scene-track{height:310svh;position:relative}
.story-chapter[data-scene-mode=live] .scene-stage{height:100svh;min-height:620px;position:sticky;top:0;padding:0}
.story-chapter[data-scene-mode=live] .scene-sun{transform:translateY(calc(var(--sc-progress) * 35px))}
.story-chapter[data-scene-mode=live] .scene-hills{transform:translateY(calc(var(--sc-progress) * -25px))}
.story-chapter[data-scene-mode=live] .scene-forest{opacity:var(--sc-forest);transform:scale(calc(1.08 - var(--sc-forest) * .08));transform-origin:60% 80%}
.story-chapter[data-scene-mode=live] .scene-forest span{filter:blur(1px)}
.story-chapter[data-scene-mode=live] .growth-art{height:100%;width:70%;left:36%;right:auto;bottom:-5%;max-width:none;max-height:1000px}
.story-chapter[data-scene-mode=live] .scene-canopy{display:block;width:40%;height:130%;top:-15%;z-index:5;will-change:transform}
.story-chapter[data-scene-mode=live] .scene-canopy img{width:100%;height:100%;object-fit:contain;filter:brightness(.52) saturate(.8)}
.story-chapter[data-scene-mode=live] .scene-canopy-left{left:-15%;transform:translateX(calc(var(--sc-open) * -50%)) rotate(-16deg)}
.story-chapter[data-scene-mode=live] .scene-canopy-right{right:-15%;transform:translateX(calc(var(--sc-open) * 50%)) scaleX(-1) rotate(-12deg)}
.story-chapter[data-scene-mode=live] .scene-beats{padding:0}
.story-chapter[data-scene-mode=live] .scene-beat{position:absolute;left:12%;top:28%;width:37%;max-width:500px;margin:0;opacity:0;transform:translateY(15px);pointer-events:none;transition:opacity .35s,transform .35s}
.story-chapter[data-scene-mode=live] .scene-beat h3{font-size:clamp(38px,4.4vw,65px);letter-spacing:-1.7px}
.story-chapter[data-scene-mode=live] .scene-beat p:last-child{margin-top:25px;max-width:340px}
.story-chapter[data-scene-mode=live] .scene-beat.active{opacity:1;transform:none}
.story-chapter[data-scene-mode=live] .scene-beat:before{content:'';position:absolute;inset:-50px -10px -50px -60px;background:radial-gradient(ellipse,#f3eedbd9 15%,#f3eedb99 45%,transparent 72%);z-index:-1;pointer-events:none}
.story-chapter[data-scene-mode=live] .scene-footer{bottom:28px;justify-content:space-between}
.story-chapter[data-scene-mode=live] .scroll-hint,.story-chapter[data-scene-mode=live] .scene-progress{display:block}
.story-chapter[data-scene-mode=live] .scene-note{text-align:right}
/* ---- responsive ---- */
@media(max-width:900px){.story-chapter[data-scene-mode=live] .scene-beat{left:8%;width:43%}.story-chapter[data-scene-mode=live] .scene-beat h3{font-size:44px}.story-chapter[data-scene-mode=live] .growth-art{left:33%;width:77%}.story-chapter[data-scene-mode=live] .scene-canopy{width:38%}}
@media(max-width:600px){.story-chapter .chapter-intro{padding:44px 20px 30px}.story-chapter .chapter-intro h2{font-size:32px}.story-chapter .chapter-intro p{font-size:14px}.scene-stage{padding:35px 8% 0;min-height:560px}.scene-beats{padding-bottom:350px}.growth-art{width:100%;max-width:100%;height:350px;right:0}.scene-beat h3{font-size:31px}.scene-sun{filter:none;opacity:.18;width:180px;height:180px;left:40%;top:32%}.scene-forest span{height:26%;bottom:12%}.scene-forest span:nth-child(1){height:35%}.scene-forest span:nth-child(2){height:23%}.scene-forest span:nth-child(3){height:18%}.scene-forest span:nth-child(4){height:20%}.scene-forest span:nth-child(5){height:29%}.scene-forest span:nth-child(6){height:37%}.scene-forest span:nth-child(7){height:22%}.scene-footer{bottom:72px;font-size:10px;gap:6px;flex-direction:column;align-items:flex-start}.scene-beats{padding-bottom:380px}.scene-note{max-width:260px;text-align:left}.story-chapter[data-scene-mode=live] .scene-note{text-align:left}.story-chapter .chapter-edge{height:48px}
.story-chapter[data-scene-mode=live] .scene-track{height:265svh}.story-chapter[data-scene-mode=live] .scene-stage{min-height:560px}.story-chapter[data-scene-mode=live] .scene-beat{left:8%;top:10%;width:84%;max-width:none}.story-chapter[data-scene-mode=live] .scene-beat h3{font-size:clamp(32px,9.4vw,42px);letter-spacing:-1px}.story-chapter[data-scene-mode=live] .scene-beat p:last-child{font-size:15px;line-height:1.7;margin-top:15px;max-width:300px}.story-chapter[data-scene-mode=live] .scene-beat:before{inset:-30px}.story-chapter[data-scene-mode=live] .growth-art{left:0;width:100%;height:65%;bottom:2%}.story-chapter[data-scene-mode=live] .scene-canopy{width:35%;height:70%;top:30%;opacity:.8;will-change:auto}.story-chapter[data-scene-mode=live] .scene-canopy-left{left:-18%}.story-chapter[data-scene-mode=live] .scene-canopy-right{right:-18%}.story-chapter[data-scene-mode=live] .scene-forest span{filter:none}.story-chapter[data-scene-mode=live] .scene-footer{bottom:64px}.scroll-hint{font-size:9px;letter-spacing:1px;max-width:125px}}
@media(prefers-reduced-motion:reduce){.story-chapter .scene-beat{transition:none}}
/* The paper reveal: the existing journey section keeps its approved intro; its top edge now rises out of the scene. */
.story-chapter+.journey{border-radius:60% 60% 0 0/35px 35px 0 0;margin-top:-1px;position:relative;z-index:10}
@media print{.story-chapter{display:none!important}}
