/* SPACE/02 — document-scrolling nebula, never a viewport-fixed background. */
.site-sky[data-background="nebula"]{background:none}
/* The WebGL2 star/nebula layer can be unavailable (GPU, reduced motion,
   data saving): preserve a colorful document-anchored sky instead of blank
   navy. Mode opacity keeps this fallback off other independent scenes. */
.site-sky[data-background="nebula"]::before{
  opacity:var(--scene-space-opacity,1);
  background-image:
    radial-gradient(ellipse 48% 16% at 60% 8%,rgba(85,50,160,.34),transparent 83%),
    radial-gradient(ellipse 42% 14% at 53% 17%,rgba(14,121,159,.27),transparent 84%),
    radial-gradient(ellipse 48% 18% at 61% 38%,rgba(25,80,164,.22),transparent 82%),
    radial-gradient(ellipse 47% 15% at 47% 59%,rgba(98,38,142,.20),transparent 80%),
    radial-gradient(ellipse 45% 16% at 64% 78%,rgba(12,111,134,.20),transparent 82%),
    radial-gradient(ellipse 46% 16% at 42% 94%,rgba(94,44,143,.19),transparent 85%),
    url("/assets/star-texture.svg");
  background-size:100% 100%,100% 100%,100% 100%,100% 100%,100% 100%,100% 100%,960px 820px;
  background-repeat:no-repeat,no-repeat,no-repeat,no-repeat,no-repeat,no-repeat,repeat;
}
.site-sky--webgl{overflow:hidden}
.space-canvas{
  position:absolute;inset:0;
  width:100%;height:100%;display:block;z-index:0;
  pointer-events:none
}
/* A full-document CSS sky stays behind the opaque WebGL2 canvas.
   In GPU fallback or truncation cases the lower document is never blank. */
/* CSS twinkle-stars occupy the same document plane as the WebGL canvas. */
.site-sky--webgl .site-sky__stars{z-index:3}
.site-sky--webgl::after{
  position:absolute;inset:0;z-index:2;
  background:linear-gradient(90deg,rgba(0,3,13,.18),transparent 62%),
    radial-gradient(ellipse 90% 70% at 50% 50%,transparent 57%,rgba(0,2,8,.42))
}
@media(max-width:780px){
 .site-sky--webgl::after{
   background:linear-gradient(180deg,rgba(0,3,14,.50) 0%,
     rgba(0,3,12,.36) 57%,rgba(0,3,12,.08) 100%)
 }
}
@media(prefers-reduced-motion:reduce){.space-canvas{display:none}}
