/* Scene ownership: illustrations are declared in page HTML only.
   This stylesheet never supplies a fallback forest image. */
:root{--bg:#10272c;--bg-elevated:#173139;--surface:rgba(185,210,198,.045);--border:rgba(190,212,201,.16);--text:#f0ecdf;--text-muted:#bdcbc9;--accent:#e2ca96;--accent-soft:#c2d8cd}
html[data-theme=dim]{--bg:#0c1c22;--bg-elevated:#122830;--text:#dbd9cb;--text-muted:#aebdbb;--accent:#cbb788;--accent-soft:#b6c9bf}
html[data-theme=dawn]{--bg:#e9eee6;--bg-elevated:#f0f2e9;--surface:rgba(61,93,83,.055);--border:rgba(56,83,74,.23);--text:#253b40;--text-muted:#49635f;--accent:#765b2e;--accent-soft:#3c655a}
.forest-ready{background:var(--bg)}
.forest-ready .header{max-width:1440px;gap:18px}
.forest-ready .header nav{gap:20px;flex-wrap:wrap}
.forest-ready .button,.forest-ready button,.forest-ready select{border-radius:24px}
.forest-ready .story-panel{background:var(--bg-elevated);border-radius:20px}
.forest-ready main>.section{background:none;box-shadow:none;border-radius:0}
.forest-ready .quiet-box{background:none;box-shadow:none}
.forest-ready .closing{background:var(--surface)}
/* Legacy hosts retain their layout, without automatically painting scenery. */
.forest-host{position:relative;isolation:isolate;overflow:hidden;max-width:none!important;color:#f0ecdf;background:#10272c;border:0;background-image:none}
.forest-host:before,.forest-host:after{content:none!important;display:none!important}
.forest-host .hero-art,.forest-host.welcome>.moon{display:none}
.forest-host.hero{display:block;min-height:740px;margin:0;padding:80px max(32px,calc((100vw - 1160px)/2)) 130px}
.forest-host.hero>div:not(.hero-art):not(.forest-scene){position:relative;z-index:1;width:min(590px,48%);padding:24px 0;background:none;border:0;border-radius:0;box-shadow:none;isolation:isolate}
.forest-host.hero>div:not(.hero-art):not(.forest-scene):before{content:'';position:absolute;inset:-30px -35px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse closest-side,rgba(10,24,34,.58),rgba(10,24,34,.25) 68%,transparent);border:0;box-shadow:none;filter:none}
.forest-host .definition,.forest-host .tiny,.forest-host .muted{color:#d0dcd4}
.forest-host .eyebrow{color:#e2ca96}
.forest-host .text-link{color:#d4e2d3}
.forest-host .button.primary{background:#e2ca96;color:#21343b;border-color:#e2ca96}
.forest-host.hero h1{font-size:clamp(2.8rem,4.8vw,4.5rem)}
/* Obsolete generated scenes cannot compete with the original HTML image. */
.forest-scene,.forest-moon,.forest-stars,.forest-cloud,.forest-mist,.forest-ground,.forest-leaves,.forest-animals,.forest-fireflies,.forest-animal-track{display:none!important}
.forest-host.nw-static-scene{background:#10272c;background-image:none;padding:0;min-height:0;text-align:left}
.nw-static-scene .nw-scene-image{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center bottom;pointer-events:none;z-index:0;mask-image:linear-gradient(to bottom,#000 0%,#000 94%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 94%,transparent 100%)}
.nw-static-scene .nw-welcome-content{position:relative;z-index:1;width:min(600px,48%);margin:0 max(32px,calc((100vw - 1240px)/2));padding:70px 0 120px;isolation:isolate}
.nw-static-scene .nw-welcome-content:before{content:'';position:absolute;inset:10px -45px 55px;pointer-events:none;z-index:-1;background:radial-gradient(ellipse closest-side,rgba(10,24,34,.68),rgba(10,24,34,.3) 70%,transparent)}
.nw-static-scene h1{font-size:clamp(2.6rem,4.5vw,4rem);margin-top:12px}
.nw-static-scene .definition{margin-left:0;font-size:1rem}
.nw-static-scene .language-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin:28px 0;gap:9px}
.nw-static-scene .language-grid>a{padding:12px;background:rgba(14,32,39,.72);border:1px solid rgba(210,217,190,.22);border-radius:10px;color:#f0ecdf;box-shadow:none}
.nw-static-scene .language-grid small{color:#c9d5ce}
/* Explicit layers outrank older page-local negative z-index declarations.
   Only the last grass edge fades; there is no upper image fade or new wash. */
body[data-locale=en][data-page=home] .en-opening .en-scene,
body[data-locale=zh-cn][data-page=home] .cn-opening .cn-scene{z-index:0;background:none;border:0;border-radius:0;box-shadow:none;mask-image:linear-gradient(to bottom,#000 0%,#000 97%,transparent 100%);-webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 97%,transparent 100%)}
body[data-locale=en][data-page=home] .en-opening .en-copy,
body[data-locale=zh-cn][data-page=home] .cn-opening .cn-copy{z-index:1}
.forest-motion-off .forest-ready *,.forest-motion-off .forest-ready *:before,.forest-motion-off .forest-ready *:after{animation:none!important;transition:none!important}
.forest-tab-hidden .forest-ready *{animation-play-state:paused!important}
@media(max-width:1050px){
 body[data-locale=en][data-page=home] .en-opening,
 body[data-locale=zh-cn][data-page=home] .cn-opening{display:flex;flex-direction:column;align-items:stretch;min-height:0;padding:36px 24px 0}
 body[data-locale=en][data-page=home] .en-opening .en-copy,
 body[data-locale=zh-cn][data-page=home] .cn-opening .cn-copy{width:100%;max-width:700px;margin:auto;padding:0 0 28px;color:var(--text)}
 body[data-locale=en][data-page=home] .en-copy:before,
 body[data-locale=zh-cn][data-page=home] .cn-copy:before{content:none}
 body[data-locale=en][data-page=home] .en-opening .definition,
 body[data-locale=en][data-page=home] .en-opening .tiny,
 body[data-locale=zh-cn][data-page=home] .cn-opening .definition,
 body[data-locale=zh-cn][data-page=home] .cn-opening .tiny{color:var(--text-muted)}
 body[data-locale=en][data-page=home] .en-opening .eyebrow,
 body[data-locale=zh-cn][data-page=home] .cn-opening .eyebrow{color:var(--accent)}
 body[data-locale=en][data-page=home] .en-opening .text-link,
 body[data-locale=zh-cn][data-page=home] .cn-opening .text-link{color:var(--accent-soft)}
 body[data-locale=en][data-page=home] .en-opening .en-scene,
 body[data-locale=zh-cn][data-page=home] .cn-opening .cn-scene{position:relative;inset:auto;width:calc(100% + 48px);margin:0 -24px;height:auto;aspect-ratio:1774/887;flex:none}
 body[data-locale=en][data-page=home] .en-scene img,
 body[data-locale=zh-cn][data-page=home] .cn-scene img{width:100%;height:auto;aspect-ratio:1774/887;object-fit:contain;object-position:center;display:block}
}
@media(max-width:900px){.forest-ready .header{flex-wrap:wrap}.forest-host.hero{padding:65px 24px 120px}.forest-host.hero>div:not(.hero-art):not(.forest-scene){width:52%}.nw-static-scene .nw-welcome-content{width:54%;margin-inline:24px}.nw-static-scene .language-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){
 .forest-host.hero{padding:42px 16px 60px;min-height:0}
 .forest-host.hero>div:not(.hero-art):not(.forest-scene){width:100%;padding:0}
 .forest-host.hero>div:not(.hero-art):not(.forest-scene):before{content:none}
 .forest-host.hero h1{font-size:2.8rem}
 .forest-ready .header nav{gap:12px}
 .forest-host.nw-static-scene{padding-bottom:50vw}
 .nw-static-scene .nw-scene-image{inset:auto 0 0;height:auto;aspect-ratio:2/1;object-fit:contain;mask-image:linear-gradient(to bottom,transparent,#000 12%,#000 94%,transparent);-webkit-mask-image:linear-gradient(to bottom,transparent,#000 12%,#000 94%,transparent)}
 .nw-static-scene .nw-welcome-content{width:auto;margin:0;padding:42px 16px 20px}
 .nw-static-scene .nw-welcome-content:before{content:none}
 .nw-static-scene .language-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .nw-static-scene h1{font-size:2.6rem}
 .forest-ready .actions>.button{width:100%}
 body[data-locale=en][data-page=home] .en-opening,
 body[data-locale=zh-cn][data-page=home] .cn-opening{padding:36px 16px 0}
 body[data-locale=en][data-page=home] .en-opening .en-scene,
 body[data-locale=zh-cn][data-page=home] .cn-opening .cn-scene{width:calc(100% + 32px);margin-inline:-16px}
}
@media(prefers-reduced-motion:reduce){.forest-ready *,.forest-ready *:before,.forest-ready *:after{animation:none!important;transition:none!important}}
