.saturn-live-sky {
  position:absolute;
  inset:0;
  display:block;
  overflow:hidden;
  pointer-events:none;
  background-color:#080817;
  background-image:linear-gradient(100deg,#0404143d,#08061427 60%,#08061433),url('/assets/saturn-sky.webp');
  background-position:52% 48%;
  background-size:cover;
  background-repeat:no-repeat;
}

.saturn-sky-star {
  position:absolute;
  width:var(--star-diameter);
  height:var(--star-diameter);
  border-radius:50%;
  background:#f5f4ff;
  color:#aac9fc;
  box-shadow:0 0 3px .65px currentColor,0 0 8px .25px currentColor;
  opacity:.68;
}
.saturn-sky-star:nth-child(4n) {color:#d6b29c;background:#fff7e6}
.saturn-sky-star:nth-child(7n) {color:#c5b5e4}
.saturn-sky-star:nth-child(7n + 5)::before,
.saturn-sky-star:nth-child(7n + 5)::after {
  position:absolute;left:50%;top:50%;content:'';
  width:8px;height:.65px;opacity:.53;
  transform:translate(-50%,-50%);
  background:linear-gradient(90deg,transparent,currentColor,transparent);
}
.saturn-sky-star:nth-child(7n + 5)::after {width:5px;transform:translate(-50%,-50%) rotate(90deg)}

/* The lanes are inclined in CSS pixels so meteors preserve a shallow, straight
   trajectory in the tall phone sky and the wide desktop hero alike. */
.saturn-meteor-lane {
  position:absolute;display:block;pointer-events:none;height:2px;
  left:88%;top:8%;width:clamp(100px,30cqw,410px);
  transform:rotate(-15deg);transform-origin:0 0;
  --flight-duration:17s;--flight-phase:-1.1s;
  --trail-length:clamp(40px,8.7cqw,112px);
}
.saturn-meteor-lane.lane-low {
  left:53%;top:66%;width:clamp(90px,33cqw,420px);transform:rotate(-13deg);
  --flight-duration:23s;--flight-phase:-15.3s;--trail-length:clamp(40px,7.4cqw,97px);
}
.saturn-meteor-lane.lane-far {
  left:107%;top:53%;width:clamp(70px,27cqw,340px);transform:rotate(-17deg);
  --flight-duration:31s;--flight-phase:-16.1s;--trail-length:clamp(26px,5.5cqw,76px);
}
.saturn-meteor-flight {
  position:absolute;inset:0;opacity:0;
}
.saturn-meteor-flight::before,.saturn-meteor-flight::after {content:'';position:absolute}
.saturn-meteor-flight::before {
  left:0;top:-.45px;height:2.2px;width:var(--trail-length);
  background:linear-gradient(90deg,#fff6df 0%,#d1def2 9%,#98baddbd 29%,#a8b7d248 62%,transparent);
  clip-path:polygon(0 45%,7% 0,38% 25%,100% 51%,44% 70%,7% 100%,0 73%);
}
.saturn-meteor-flight::after {
  left:0;top:-.72px;width:2.7px;height:2.7px;border-radius:50%;
  background:#fff8e9;box-shadow:0 0 3px 1px #ffe3bcbd,0 0 9px 2px #a3c9ed67;
}
.lane-far .saturn-meteor-flight::after {width:1.8px;height:1.8px}
.saturn-live-sky ~ .saturn-meteor {display:none}

@keyframes saturn-stellar-glint {
  0%,100% {opacity:.44}
  48% {opacity:.82}
  61% {opacity:.96}
}
@keyframes saturn-slow-meteor {
  0% {transform:translateX(0);opacity:0}
  4% {opacity:.85}
  17% {opacity:1}
  27% {opacity:.7}
  34% {transform:translateX(-100%);opacity:0}
  100% {transform:translateX(-100%);opacity:0}
}
@media(prefers-reduced-motion:no-preference) {
  html:is([data-motion=subtle],[data-motion=cinematic]) .saturn-sky-star {
    animation:saturn-stellar-glint var(--star-cycle) ease-in-out var(--star-phase) infinite;
  }
  html:is([data-motion=subtle],[data-motion=cinematic]) .saturn-meteor-flight {
    animation:saturn-slow-meteor var(--flight-duration) linear var(--flight-phase) infinite;
  }
}
html[data-saturn-paused] .saturn-live-sky *,
html .saturn-live-sky:not([data-in-view]) *,
html[data-quiet=true] body.has-messages .cosmic-backdrop .saturn-live-sky * {
  animation-play-state:paused;
}
