.story{
  --bg:#FFFFFF; --panel:#FAF7F1; --ink:#6E6250; --gold:#7A5C24; --gold-hi:#A8843A; --line:#E6DCC8; --glow:#F3DFA8; --btn-ink:#FFFFFF;
  --display:Outfit,"Avenir Next","Segoe UI",system-ui,sans-serif; --body:Inter,"Segoe UI",system-ui,sans-serif;
  color-scheme:light;
}
.story[data-phase="dusk"]{--bg:#F4E2C6; --panel:#EFD9B6; --ink:#5A4A33; --gold:#6B4E1B; --gold-hi:#8A6522; --line:#D9C198; --glow:#FFD77A; --btn-ink:#FFFFFF}
.story[data-phase="night"]{--bg:#0F1114; --panel:#181B20; --ink:#C9C2B4; --gold:#D9B76A; --gold-hi:#E8CB86; --line:#2E2C27; --glow:#F2C96B; --btn-ink:#0F1114}
.story{background:var(--bg);color:var(--ink);font-family:var(--body);transition:background-color 1s ease,color 1s ease}
.story .eyebrow{font-family:var(--display);font-size:14px;letter-spacing:.3em;color:var(--gold);transition:color 1s}
.story h1,.story h2,.story h3{font-family:var(--display);margin:0;text-wrap:balance;transition:color 1s}
.story h1{font-weight:200;font-size:clamp(44px,6.4vw,96px);line-height:1.02;letter-spacing:-.03em;color:var(--gold)}
.story h2{font-weight:300;font-size:clamp(34px,4.2vw,62px);line-height:1.05;letter-spacing:-.02em;color:var(--gold-hi)}
.story h3{font-weight:400;font-size:24px;color:var(--gold)}
.story p{margin:0;max-width:34em}
.story .chip{min-height:46px;padding:10px 20px;border-radius:999px;border:1px solid var(--gold-hi);background:transparent;color:var(--gold);font-family:var(--display);letter-spacing:.04em;transition:background-color .3s,color .3s,border-color 1s}
.story .chip:hover{background:var(--panel)}
.story .chip[aria-pressed="true"]{background:var(--gold);color:var(--btn-ink)}
.story{position:relative}
.story .stage{position:sticky;top:0;height:100vh;min-height:560px;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);align-items:center;gap:clamp(16px,3vw,48px);padding:88px clamp(16px,4vw,48px) 32px;overflow:hidden}
.story .copy{position:relative;height:100%}
.story .copy article{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;gap:20px;opacity:0;visibility:hidden;transform:translateY(40px);transition:opacity .7s ease,transform .7s ease,visibility 0s .7s}
.story .copy article.active{opacity:1;visibility:visible;transform:none;transition:opacity .7s ease .15s,transform .7s ease .15s,visibility 0s}
.story .controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.story .status{min-height:1.65em;font-family:var(--display);color:var(--gold);transition:color 1s}
.story .temp{font-family:var(--display);font-weight:200;font-size:44px;color:var(--gold-hi);min-width:3.2em;text-align:center;font-variant-numeric:tabular-nums}
.story .round{width:48px;height:48px;border-radius:50%;padding:0;font-size:22px}
.story .hint{font-family:var(--display);font-size:14px;letter-spacing:.2em;color:var(--gold)}
.story .house{width:100%;height:auto;max-height:calc(100vh - 140px);display:block}
.story .dots{position:absolute;right:clamp(6px,1.4vw,20px);top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:4px;z-index:5}
.story .dots button{width:28px;height:28px;border:0;background:transparent;padding:0;display:grid;place-items:center}
.story .dots button::before{content:"";width:8px;height:8px;border-radius:50%;border:1px solid var(--gold-hi);transition:transform .3s,background-color .3s}
.story .dots button[aria-current="true"]::before{background:var(--gold-hi);transform:scale(1.5)}
.story .house .ln{fill:none;stroke:var(--gold-hi);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;transition:stroke 1s}
.story .house .fillg{fill:var(--gold-hi);stroke:none;transition:fill 1s}
.story .house .wall{fill:var(--bg);transition:fill 1s}
.story .house text{font-family:var(--display);font-size:13px;letter-spacing:2px;fill:var(--gold);transition:fill 1s}
.story .room{fill:var(--glow);opacity:0;transition:opacity .6s ease,fill 1s}
.story .room.on{opacity:.9}
.story .room.dim{opacity:.3}
.story[data-phase="night"] .room.on{filter:drop-shadow(0 0 22px var(--glow))}
.story[data-phase="night"] .room.on{opacity:.8}
.story[data-phase="night"] .house .room.on + .who{stroke:#0F1114}
.story .who{opacity:0;transition:opacity .6s}
.story .room.on + .who{opacity:1}
.story .cur{fill:var(--gold-hi);transform-box:fill-box;transform:scaleX(.12);transition:transform 1.1s ease,fill 1s}
.story .cur.l{transform-origin:left}
.story .cur.r{transform-origin:right}
.story .stage.curtain .cur{transform:scaleX(1)}
.story .sun,.story .moon,.story .nwin,.story .flow,.story .air,.story .spr,.story .cone,.story .det,.story .mesh,.story .drop,.story .valveX{transition:opacity .8s}
.story .moon,.story .flow,.story .air,.story .spr,.story .cone,.story .det,.story .mesh,.story .drop,.story .valveX{opacity:0}
.story[data-phase="night"] .sun{opacity:0}
.story[data-phase="night"] .moon{opacity:1}
.story[data-phase="dusk"] .sun{transform:translateY(150px)}
.story .sun{transition:opacity .8s,transform 1.4s ease}
.story .nwin{fill:var(--glow);opacity:0}
.story[data-phase="night"] .nwin{opacity:.9}
.story .stage.outage .nwin{opacity:0}
.story .stage[data-scene="2"] .air,.story .stage[data-scene="3"] .spr,.story .stage[data-scene="4"] .flow,.story .stage[data-scene="6"] .cone,.story .stage[data-scene="6"] .det,.story .stage[data-scene="8"] .mesh{opacity:1}
.story .stage.outage .flow.bat{opacity:1}
.story .stage.leak .drop{opacity:1}
.story .stage.shut .valveX{opacity:1}
.story .stage.shut .drop{opacity:0}
.story .lvl{fill:var(--gold-hi);transform-box:fill-box;transform-origin:bottom;transform:scaleY(.25);transition:transform 2.4s ease,fill 1s}
.story .stage[data-scene="4"] .lvl{transform:scaleY(.95)}
.story .stage[data-scene="5"] .lvl,.story .stage[data-scene="6"] .lvl,.story .stage[data-scene="7"] .lvl{transform:scaleY(.8)}
.story .stage.outage .lvl{transform:scaleY(.55)}
.story .arm{transform-box:fill-box;transform-origin:left center;transition:transform 1s ease,fill 1s}
.story .stage.gate .arm{transform:rotate(-78deg)}
.story .car{transform:translateX(330px);opacity:0;transition:transform 1.6s ease,opacity .6s}
.story .stage.car-wait .car{transform:translateX(130px);opacity:1}
.story .stage.car-in .car{transform:none;opacity:1}
@keyframes st-dash{to{stroke-dashoffset:-40}}
@keyframes st-sweep{0%,100%{transform:rotate(-16deg)}50%{transform:rotate(14deg)}}
@keyframes st-blink{0%,100%{opacity:.2}50%{opacity:1}}
@keyframes st-fall{0%{transform:translateY(0)}100%{transform:translateY(46px)}}
@keyframes st-rays{to{transform:rotate(360deg)}}
@keyframes st-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(8px)}}
.story .flow,.story .air,.story .spr,.story .mesh .lk{stroke-dasharray:5 7}
@media (prefers-reduced-motion:no-preference){.story .flow,.story .air,.story .spr{animation:st-dash 1.6s linear infinite}
.story .cone{transform-origin:730px 222px;animation:st-sweep 6s ease-in-out infinite}
.story .mesh .lk{animation:st-blink 1.8s ease-in-out infinite}
.story .mesh .lk.b{animation-delay:.6s}
.story .stage.leak .drop{animation:st-fall .9s ease-in infinite}
.story .rays{transform-origin:850px 104px;animation:st-rays 30s linear infinite}
.story .hint{animation:st-bob 2.2s ease-in-out infinite}}
@media (prefers-reduced-motion:reduce){}
.story{--bg:#F7F6F3;--panel:#FFFFFF;--ink:#4A4F59;--gold:#14181F;--gold-hi:#D9480F;--line:#E2DFD8;--glow:#F9C9A8;--btn-ink:#FFFFFF;--display:"Avenir Next","Nunito Sans",system-ui,sans-serif;--body:"Avenir Next","Nunito Sans",system-ui,sans-serif}
.story[data-phase="dusk"]{--bg:#EFE9E1;--panel:#FFFFFF;--ink:#3A3F48;--gold:#14181F;--gold-hi:#C2410C;--line:#DCD5CA;--glow:#F6B183}
.story[data-phase="night"]{--bg:#14181F;--panel:#1C222B;--ink:#C9CCD2;--gold:#F7F6F3;--gold-hi:#E8692F;--line:#2A313C;--glow:#F2A33A;--btn-ink:#FFFFFF}
.story h1{font-weight:700;letter-spacing:-.03em;color:var(--gold)}
.story h2{font-weight:600;color:var(--gold)}
.story .eyebrow,.story .hint{color:#C2410C;font-weight:600}
.story[data-phase="night"] .eyebrow,.story[data-phase="night"] .hint{color:#F08A4B}
.story .house .ln{stroke:#14181F;stroke-width:1.4}.story .house .fillg,.story .lvl,.story .cur{fill:#D9480F}
.story[data-phase="night"] .house .ln{stroke:#C9CCD2}
.story .stage{padding-top:32px}
.story .chip{color:var(--gold);border-color:var(--gold-hi);font-weight:600}
.story .chip[aria-pressed="true"]{background:var(--gold-hi);color:#fff;border-color:var(--gold-hi)}
.story .status{color:var(--gold-hi);font-weight:600}
.story p{color:var(--ink)}
.story .house{background:transparent;border-radius:0;align-self:auto}
@media (max-width:820px){
.story .stage{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,42%) minmax(0,58%);padding-top:16px;gap:8px}
.story .stage .art{order:-1;height:100%}.story .house{max-height:100%;height:100%}
.story .copy article{justify-content:flex-start;gap:12px}
.story h1{font-size:40px}.story h2{font-size:30px}.story{font-size:16px}
.story .dots{display:none}
}
