/* Artwork stays within its own stacking context; app controls are above it. */
.forest-scene{isolation:isolate;overflow:hidden;background:#e5eedc;container-type:size;pointer-events:none}
.forest-scene:not(.forest-stage){position:relative;width:100%;height:100%;min-height:320px}
.forest-world{position:absolute;top:0;height:100%;width:100%}
.forest-landscape{display:block;width:100%;height:100%;overflow:visible}
.forest-world.is-compact-live .forest-picnic{transform:translateY(-110px)}
.forest-animals{position:absolute;inset:0;isolation:isolate}
.forest-scenery{position:absolute;left:0;top:0;pointer-events:none}
.forest-scenery>svg{display:block;width:100%;height:auto;overflow:visible}
.forest-pollen{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:1;transition:opacity 1.4s ease}
.forest-pollen i{position:absolute;width:3px;height:3px;background:#fffce5;border-radius:50%;opacity:.7;animation:forest-pollen-drift var(--drift) ease-in-out infinite alternate;animation-delay:var(--delay)}
.forest-cloud{animation:forest-cloud-drift 180s ease-in-out infinite alternate}
.forest-cloud-two{animation-duration:240s;animation-delay:-70s}
.forest-hush-veil{position:absolute;inset:0;z-index:2000;background:linear-gradient(0deg,rgba(177,185,162,.8),rgba(238,239,211,.15));opacity:0;transition:opacity 1.4s ease;pointer-events:none}
.forest-scene[data-state="too-loud"] .forest-hush-veil{opacity:.24}
.forest-scene[data-state="too-loud"][data-loud-response="pause"] .forest-hush-veil{opacity:.38}
.forest-scene[data-state="too-loud"] .forest-pollen{opacity:.3}
.forest-scene[data-state="too-loud"] .forest-cloud,.forest-scene[data-state="too-loud"] .forest-pollen i,.forest-scene[data-state="too-loud"] .forest-animal:not(.is-fleeing) *{animation-play-state:paused!important}
.forest-scene.is-suspended *{animation-play-state:paused!important;transition:none!important}
.forest-animal{position:absolute;top:0;left:0;pointer-events:none}
.forest-animal.is-fleeing,.forest-animal.is-goodbye{will-change:transform}
.forest-animal-shadow{position:absolute;bottom:-2%;left:9%;width:82%;height:8%;border-radius:50%;background:#637c52;opacity:.15;transform:scaleY(.7)}
.forest-animal-gait,.forest-animal-pose{position:relative;transform-origin:50% 100%}
.forest-animal-flip{transition:transform .45s ease-in-out;transform-origin:50% 60%}
.forest-animal-arrival{position:relative;animation:forest-animal-arrive 1.4s ease-out both;transform-origin:50% 100%}
.forest-animal-image{position:relative;display:block;width:100%;user-select:none}
.forest-animal-image>svg{display:block;width:100%;height:auto;overflow:visible}
.forest-animal-halo{position:absolute;inset:-18%;border-radius:50%;opacity:0;pointer-events:none;transition:opacity 2s ease}
.forest-arrival-ring{position:absolute;inset:10% -8%;border:2px solid rgba(255,255,235,.7);border-radius:50%;animation:forest-arrival-ring 1.8s ease-out forwards;pointer-events:none}
.forest-animal.is-established .forest-animal-arrival{animation:none}
.forest-animal.is-established .forest-arrival-ring{display:none}
.forest-animal.is-flying .forest-animal-shadow{display:none}
.forest-animal.is-flying .forest-animal-arrival{animation:forest-animal-arrive 1.4s ease-out both,forest-animal-bob var(--animal-bob,7s) ease-in-out 1.4s infinite alternate}
.forest-animal[data-tier="uncommon"] .forest-animal-halo{background:radial-gradient(ellipse,#d2faf578,transparent 68%)}
.forest-animal[data-tier="rare"] .forest-animal-halo{background:radial-gradient(ellipse,#ffe3a6aa,transparent 68%)}
.forest-animal[data-tier="uncommon"]:not(.is-settled) .forest-animal-halo{animation:forest-halo-breathe 3.2s ease-in-out infinite}
.forest-animal[data-tier="rare"]:not(.is-settled) .forest-animal-halo{animation:forest-halo-breathe 2.4s ease-in-out infinite}
.forest-animal.is-settled .forest-animal-halo{animation:forest-halo-settle 2s ease-out forwards}
.forest-sparkles{position:absolute;inset:0;opacity:1;transition:opacity 2s ease}
.forest-animal.is-settled .forest-sparkles{opacity:0}
.forest-sparkles i{position:absolute;width:calc(19px * var(--spark-size));height:calc(19px * var(--spark-size));background:#fff7cc;clip-path:polygon(50% 0,61% 38%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 38%);animation:forest-sparkle 3s ease-in-out infinite;animation-delay:var(--spark-delay);opacity:0}
.forest-startle{display:none;position:absolute;left:50%;bottom:100%;margin-bottom:8px;width:26px;height:29px;border-radius:50% 50% 50% 8px;background:#fff7d9;color:#5c5540;font:700 22px/29px Georgia,serif;text-align:center;transform:translateX(-50%);box-shadow:0 2px 0 rgba(69,70,37,.1)}
.forest-animal.is-fleeing .forest-startle{display:block;animation:forest-startle .3s ease-out both}
.forest-animal.is-bolting .forest-startle{opacity:0;transition:opacity .4s ease}
.forest-animal.is-listening .forest-animal-pose{animation:forest-listen .65s ease-out both}
.forest-animal.is-resuming .forest-animal-pose{animation:forest-resume .6s ease-in-out both}
.forest-animal.is-goodbye{animation:forest-goodbye-fade 2.5s ease-in forwards}
.forest-scene.is-farewell .forest-animal.is-companion .forest-animal-pose{animation:forest-farewell 1.5s ease-in-out 2}
@keyframes forest-cloud-drift{to{transform:translateX(-160px)}}
@keyframes forest-pollen-drift{0%{transform:translate(0,0);opacity:.3}50%{opacity:.7}100%{transform:translate(-32px,-24px);opacity:.25}}
@keyframes forest-animal-arrive{0%{opacity:0;transform:scale(.75)}60%{opacity:1;transform:scale(1.06)}100%{opacity:1;transform:scale(1)}}
@keyframes forest-arrival-ring{from{opacity:.85;transform:scale(.3)}to{opacity:0;transform:scale(2.6)}}
@keyframes forest-animal-bob{from{translate:0 -3px}to{translate:0 3px}}
@keyframes forest-halo-breathe{0%,100%{opacity:.55;transform:scale(.94)}50%{opacity:1;transform:scale(1.04)}}
@keyframes forest-halo-settle{from{opacity:.7}to{opacity:0}}
@keyframes forest-sparkle{0%,45%,100%{opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(0deg)}15%,25%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(45deg)}}
@keyframes forest-startle{from{opacity:0;translate:0 8px;scale:.75}to{opacity:1;translate:0 0;scale:1}}
@keyframes forest-listen{0%{transform:scale(1)}20%{transform:scale(.84,1.05)}45%{transform:translateY(-6%) scale(1.02,1)}70%{transform:scale(1.05,.95)}100%{transform:scale(1)}}
@keyframes forest-resume{0%,100%{transform:rotate(0deg)}20%{transform:rotate(-5deg)}40%{transform:rotate(4deg)}60%{transform:rotate(-3deg)}80%{transform:rotate(1.5deg)}}
@keyframes forest-farewell{0%,100%{transform:rotate(0deg)}30%{transform:rotate(-4deg) translateY(-3px)}60%{transform:rotate(3deg)}}
@keyframes forest-goodbye-fade{0%,60%{opacity:1}100%{opacity:0}}
/* Joint pivots in the trusted SVGs override these fallbacks. Each small group
   moves independently; no layout measurement or JS per-part frame work. */
.forest-animal-image .part-tail{transform-box:fill-box;transform-origin:left center;animation:forest-tail-sway .9s ease-in-out infinite}
.forest-animal-image .part-ears{transform-box:fill-box;transform-origin:bottom center;animation:forest-ear-flick 4.6s ease-in-out infinite}
.forest-animal-image .part-wings{transform-box:fill-box;transform-origin:bottom center;animation:forest-wing-beat 1.8s ease-in-out infinite}
.forest-animal-image .part-wings-far{animation-name:forest-wing-beat-far}
.forest-animal-image .part-head{transform-box:fill-box;transform-origin:bottom left;animation:forest-head-nod 7s ease-in-out infinite}
.forest-animal.is-listening .part-ears{animation:none;transform:scaleY(1.12)}
.forest-animal.is-listening .part-head{animation:none;transform:rotate(-4deg)}
.forest-animal.is-listening .part-tail{animation-duration:2.4s}
.forest-animal.is-listening .part-wings{animation-duration:3.2s}
@keyframes forest-tail-sway{0%,100%{transform:rotate(-7deg)}50%{transform:rotate(7deg)}}
@keyframes forest-ear-flick{0%,78%,94%,100%{transform:rotate(0deg)}82%{transform:rotate(-14deg)}86%{transform:rotate(2deg)}90%{transform:rotate(-9deg)}}
@keyframes forest-wing-beat{0%,100%{transform:rotate(-9deg)}50%{transform:rotate(11deg)}}
@keyframes forest-wing-beat-far{0%,100%{transform:rotate(9deg)}50%{transform:rotate(-11deg)}}
@keyframes forest-head-nod{0%,55%,100%{transform:rotate(0deg)}68%,82%{transform:rotate(5deg)}}
@media(prefers-reduced-motion:reduce){
  .forest-cloud,.forest-pollen i,.forest-animal.is-listening .forest-animal-pose,.forest-animal.is-resuming .forest-animal-pose,.forest-scene.is-farewell .forest-animal.is-companion .forest-animal-pose{animation:none}
  .forest-animal-flip{transition:none}
  .forest-animal.is-flying .forest-animal-arrival{animation:forest-animal-arrive 1.4s ease-out both}
  .forest-animal[data-tier="uncommon"]:not(.is-settled) .forest-animal-halo,.forest-animal[data-tier="rare"]:not(.is-settled) .forest-animal-halo{animation:none;opacity:.7}
  .forest-animal-image .part-tail,.forest-animal-image .part-ears,.forest-animal-image .part-wings,.forest-animal-image .part-head{animation:none;transform:none}
  .forest-sparkles i{animation:none;opacity:.7;transform:translate(-50%,-50%) scale(.7)}
}
