html {
  background: #050a08;
}

body {
  position: relative;
  isolation: isolate;
  background: transparent;
}

.scene-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 72% 8%, #103221 0%, transparent 56%),
    radial-gradient(ellipse at 5% 77%, #0b241a 0%, transparent 47%),
    #050a08;
}

.scene-backdrop::before,
.scene-backdrop::after {
  content: '';
  position: absolute;
  inset: -18%;
  opacity: .78;
  transform-origin: center;
  background:
    radial-gradient(ellipse at 71% 16%, #18d67838 0%, #08a85815 21%, transparent 48%),
    radial-gradient(ellipse at 28% 74%, #00c6901c 0%, transparent 44%);
  animation: aurora-flow 24s cubic-bezier(.43, .02, .55, .98) infinite alternate;
}

.scene-backdrop::after {
  opacity: .6;
  background:
    radial-gradient(ellipse at 10% 32%, #2ce78e24 0%, transparent 42%),
    radial-gradient(ellipse at 86% 90%, #15b86b31 0%, transparent 45%);
  animation: aurora-flow 29s cubic-bezier(.43, .02, .55, .98) -12s infinite alternate-reverse;
}

.scene-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.motion-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .7rem;
  border: 1px solid #92edbb33;
  border-radius: .55rem;
  background: #14251bc9;
  color: #c2d8cb;
  font: inherit;
  font-size: .75rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.motion-toggle::before {
  content: '';
  width: .37rem;
  height: .37rem;
  border-radius: 50%;
  background: #72e6a4;
  box-shadow: 0 0 .65rem #37d58280;
}

.motion-toggle:hover {
  background: #203e2d;
  color: #edfff4;
  border-color: #92edbb66;
}

.motion-toggle[aria-pressed='true']::before {
  background: #9eaca3;
  box-shadow: none;
}

@keyframes aurora-flow {
  0% { transform: translate3d(-7%, -4%, 0) rotate(-9deg) scale(1.04); opacity: .38; }
  55% { transform: translate3d(3%, 4%, 0) rotate(2deg) scale(1.12); opacity: .82; }
  100% { transform: translate3d(8%, -1%, 0) rotate(10deg) scale(.99); opacity: .58; }
}

html[data-motion='paused'] *,
html[data-motion='paused'] *::before,
html[data-motion='paused'] *::after {
  animation: none !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  .scene-backdrop::before,
  .scene-backdrop::after { animation: none; }
  .motion-toggle { display: none; }
}
