/* The same stable viewport as the light scene: browser chrome must not move space. */
.dark-motion{position:fixed;top:0;left:0;width:100%;height:100vh;height:100lvh;z-index:-1;pointer-events:none;overflow:hidden;contain:strict}
.dark-motion canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
html.light .dark-motion{display:none}
html[data-dark-nebula="ready"]:not(.light) .scene svg[data-natural-object^="nebula-"]{visibility:hidden}
html:not(.light) .sky .mw{animation:darkGalaxyDrift 180s ease-in-out infinite alternate;animation-play-state:var(--dark-motion-play,running);transform-origin:60% 50%}
@keyframes darkGalaxyDrift{from{transform:scale(1.02) scaleY(-1) translate3d(-.4%,0,0)}to{transform:scale(1.07) scaleY(-1) translate3d(.6%,.5%,0)}}
@media(max-width:760px){
 html:not(.light) .sky .mw{display:block;opacity:.12}
 /* The old mobile .scene is hidden. Keep a quiet image fallback while WebGL
    loads or recovers, including devices where no WebGL context is available. */
 html:not(.light):not([data-dark-nebula="ready"]) .dark-motion::before{content:"";position:absolute;inset:0;background:url('/assets/dark-theme-v16/assets/nebula-cold.webp') 72% -90px/480px auto no-repeat,url('/assets/dark-theme-v16/assets/nebula-main.webp') 42% bottom/480px auto no-repeat;opacity:.46;filter:blur(1px)}
}
@media(prefers-reduced-motion:reduce){html:not(.light) .sky .mw{animation:none}}
