/* Existing squirrel controller and navigation keep their original layers. */
.nw-rabbit,.forest-rabbit-track{display:none!important;animation:none!important}
.nw-wildlife-overlay{position:fixed;inset:0;z-index:6;pointer-events:none;overflow:hidden;--nw-animal-height:100px}
.nw-wildlife-overlay *{pointer-events:none}
.nw-wildlife-track{position:absolute;left:0;top:0;right:auto;bottom:auto;width:calc(var(--nw-animal-height)*1.176);height:var(--nw-animal-height);transform:translate3d(var(--nw-x,20px),var(--nw-y,200px),0);transform-origin:50% 92%;filter:drop-shadow(0 3px 5px #0514193b);opacity:1;animation:none!important;transition:none!important}
.nw-wildlife-track[hidden]{display:none!important}
.wildlife-pose,.nw-animal-facing{display:block;width:100%;height:100%;transform-origin:50% 92%;animation:none!important;transition:none!important}
.wildlife-pose{transform:translateY(var(--nw-hop,0px)) rotate(var(--nw-lean,0deg)) scale(var(--nw-scale-x,1),var(--nw-scale-y,1))}
.nw-animal-facing{transform:scaleX(var(--nw-facing,1))}
.nw-wildlife-track img{display:block;width:100%;height:100%;max-width:none;object-fit:contain;border:0;border-radius:0;background:none;animation:none!important;transition:none!important}
.nw-pointer-light{position:absolute;left:0;top:0;width:6px;height:6px;border-radius:50%;background:#fff1c1;box-shadow:0 0 8px 3px #edd59ba6,0 0 23px 10px #e9c77b26;opacity:0;transition:opacity .5s;transform:translate(-50%,-50%)}
.nw-pointer-light[data-visible=true]{opacity:.85}
.nw-motion-toggle{font-size:.78rem;padding:8px 12px;min-height:44px;white-space:normal}
body>.header{position:relative;overflow:visible}
body>.header,body.nw-clean-page>.header,body.nw-organized>.header,body.start-forest>.header{z-index:40}
body>.sticky-cta,body.nw-clean-page>.sticky-cta,body.nw-organized>.sticky-cta,body.start-forest>.sticky-cta{z-index:15}
body>.skip,body.nw-clean-page>.skip,body.nw-organized>.skip,body.start-forest>.skip{z-index:70}
body .header .nw-language-menu>nav,body .header .locale-menu>nav,body .header .language-menu>nav{z-index:50}
dialog{max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto}
@media(max-width:640px){.nw-wildlife-overlay{--nw-animal-height:70px}}
.forest-motion-off .nw-wildlife-overlay *{animation:none!important;transition:none!important}
.forest-motion-off .nw-pointer-light{display:none!important}
.forest-tab-hidden .nw-wildlife-overlay *{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.nw-wildlife-overlay *{animation:none!important;transition:none!important}}

/* Background and reading wash → transparent lights → copy and controls.
   These selectors deliberately outrank the page-specific background sheets. */
html:root body .nw-glow-host{position:relative;isolation:isolate!important}
html:root body .nw-glow-host>.nw-quiet-glow{
 position:absolute;inset:0;z-index:2!important;overflow:hidden;
 pointer-events:none!important;user-select:none;
 background:none!important;border:0!important;box-shadow:none!important;
 opacity:1;contain:paint;
}
html:root body .nw-glow-host>:is(.nw-welcome-content,.home-copy,.nw-chat-content){position:relative;z-index:3!important}
html:root body .nw-quiet-glow *{pointer-events:none!important}
html:root body .nw-quiet-glow[hidden],html:root body .nw-quiet-glow [hidden]{display:none!important}
html:root body .nw-quiet-glow>.nw-quiet-spark{
 position:absolute;display:block;margin:0;padding:0;border:0;
 min-width:2px;min-height:2px;border-radius:50%;background:#f0dca6;
 box-shadow:0 0 5px 2px #dfc18166,0 0 12px 3px #dcc48b24;
 opacity:.3;transform-origin:center;
 /* A low steady floor remains visible as the existing WAAPI animation
    softly changes opacity above it; no rapid flashes or extra particles. */
 filter:drop-shadow(0 0 2px #e5c991);
}
html:root body .nw-quiet-glow>.nw-quiet-spark::after{
 content:'';position:absolute;inset:-1px;border-radius:50%;
 background:radial-gradient(circle,#f5e4bc 0%,#e8cd9366 35%,transparent 73%);
}
html:root body .nw-quiet-glow>.nw-quiet-star{background:#e9e2ce;box-shadow:0 0 4px 1px #e2d6b666}
html:root body .nw-quiet-glow>.nw-quiet-star::after{inset:-3px;background:radial-gradient(ellipse,#e9e2ce88,transparent 65%)}
/* Home fireflies brighten individually over the original painted lights.
   Animate only opacity/transform; the forest, faces and reading area stay still. */
html:root body .nw-quiet-glow[data-glow-page="home"]>.nw-firefly{
 background:#fff1bb;
 box-shadow:0 0 5px 2px #f0d78d99,0 0 13px 5px #e9c66b38;
 filter:none;
}
html:root body .nw-quiet-glow[data-glow-page="home"]>.nw-firefly::after{
 inset:-12px;
 background:radial-gradient(circle,#ffe6a866 0%,#efcf7a38 24%,#e9c66b12 48%,transparent 72%);
}
html:root body .nw-quiet-glow>.nw-book-breath{
 position:absolute;width:66px;height:23px;border:0;border-radius:50%;
 background:radial-gradient(ellipse,#dfbd7b88,rgba(208,175,101,.16) 40%,transparent 72%);
 box-shadow:none;opacity:.12;
}
html:root[data-theme="dim"] body .nw-quiet-glow{opacity:.72}
html:root[data-theme="dawn"] body .nw-quiet-glow{opacity:.86}
html:root[data-theme="dawn"] body .nw-quiet-glow>.nw-quiet-spark{background:#e0c38b;box-shadow:0 0 5px 2px #c7a56866}
@media(max-width:700px){
 html:root body .nw-quiet-glow{opacity:.86}
 html:root body .nw-quiet-glow>.nw-quiet-spark{box-shadow:0 0 4px 1px #d8bd7c66}
 html:root body .nw-quiet-glow>.nw-book-breath{width:42px;height:16px}
}
html.forest-motion-off body .nw-quiet-glow{display:none!important}
@media(prefers-reduced-motion:reduce){html:root body .nw-quiet-glow{display:none!important}}
