/* Motion belongs to the full-page scenery, never to portraits or project art.
   The existing audio meter supplies --energy and --pulse; no second loop runs. */
#ambient-world{isolation:isolate}
#ambient-world .ambient-picture,.ambient-on #ambient-world .ambient-picture{animation:ambient-slow-zoom 32s linear infinite alternate;animation-play-state:paused;transform-origin:53% 47%;will-change:auto}
.ambient-on:not(.motion-off):not(.page-hidden) #ambient-world .ambient-picture.is-visible{animation-play-state:running;will-change:transform}

#ambient-world::before,#ambient-world::after{content:"";position:absolute;inset:-18%;z-index:1;pointer-events:none;opacity:0;mix-blend-mode:screen;animation-duration:44s;animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-direction:alternate;animation-play-state:paused;transition:opacity 1.2s;will-change:auto}
#ambient-world::before{background:radial-gradient(ellipse 38% 67% at 29% 48%,#e5c48d99 0%,#e5c48d25 38%,transparent 76%),linear-gradient(112deg,transparent 35%,#f1dcaa32 48%,transparent 60%);animation-name:ambient-warm-light}
#ambient-world::after{background:radial-gradient(ellipse 46% 62% at 76% 40%,#84a7ba99 0%,#84a7ba22 40%,transparent 76%);animation-name:ambient-cool-light;animation-duration:53s}
.ambient-on #ambient-world::before{opacity:.025}
.ambient-on #ambient-world::after{opacity:.018}
.ambient-on:not(.motion-off):not(.page-hidden) #ambient-world::before,.ambient-on:not(.motion-off):not(.page-hidden) #ambient-world::after{animation-play-state:running;will-change:transform,opacity}
/* Quiet envelopes instead of flashes. Muted, paused and hidden states never
   consume the meter values, even if the music itself continues while paused. */
.ambient-on.sound-on:not(.motion-off):not(.page-hidden) #ambient-world::before{opacity:calc(.025 + var(--energy,0)*.035 + var(--pulse,0)*.015)}
.ambient-on.sound-on:not(.motion-off):not(.page-hidden) #ambient-world::after{opacity:calc(.018 + var(--energy,0)*.023 + var(--pulse,0)*.009)}
#ambient-world .vignette{z-index:2}
#ambient-world .grain{z-index:3}
.motion-off #ambient-world .ambient-picture,.page-hidden #ambient-world .ambient-picture{animation-play-state:paused;will-change:auto}
.motion-off #ambient-world::before,.motion-off #ambient-world::after,.page-hidden #ambient-world::before,.page-hidden #ambient-world::after{animation-play-state:paused;will-change:auto}
.page-hidden #ambient-world::before,.page-hidden #ambient-world::after{opacity:0;transition:none}

@keyframes ambient-slow-zoom{from{transform:scale(1) translate3d(-.25%,.15%,0)}to{transform:scale(1.035) translate3d(.25%,-.15%,0)}}
@keyframes ambient-warm-light{from{transform:translate3d(-5%,1%,0) rotate(-4deg)}to{transform:translate3d(6%,-3%,0) rotate(4deg)}}
@keyframes ambient-cool-light{from{transform:translate3d(4%,-2%,0) rotate(3deg)}to{transform:translate3d(-5%,4%,0) rotate(-3deg)}}
@media(prefers-reduced-motion:reduce){#ambient-world .ambient-picture{animation:none!important;transform:none!important;will-change:auto!important}#ambient-world::before,#ambient-world::after{animation:none!important;transform:none!important;opacity:0!important;transition:none!important;will-change:auto!important}}
