    :root {
      color-scheme: dark;
      --space: #020307;
      --light: #f8ead1;
      --warm: #d9b98a;
    }

    *, *::before, *::after { box-sizing: border-box; }
    html, body { margin: 0; width: 100%; min-height: 100%; }
    html { background: var(--space); }
    body {
      min-height: 100svh;
      overflow: hidden;
      background:
        radial-gradient(ellipse 44% 48% at 50% 51%, rgba(43, 38, 39, .19), transparent 75%),
        radial-gradient(ellipse 100% 100% at 50% 48%, #080a10 0%, var(--space) 79%);
    }

    #sky {
      position: fixed;
      inset: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
    }

    main {
      position: relative;
      display: grid;
      place-items: center;
      min-height: 100svh;
      isolation: isolate;
    }

    /* The entire constellation is a quiet replay button: no visible UI. */
    .scene {
      position: relative;
      display: block;
      width: min(610px, 90vw, 83svh);
      aspect-ratio: 1;
      padding: 0;
      border: 0;
      background: none;
      color: inherit;
      cursor: default;
      -webkit-tap-highlight-color: transparent;
      isolation: isolate;
      opacity: 1;
      transition: opacity 1.35s ease-in-out;
    }
    .scene.fading { opacity: 0; }
    .scene.resetting { transition: none; }
    .scene:focus { outline: none; }
    .scene:focus-visible { outline: 1px solid rgba(237, 213, 174, .62); outline-offset: 15px; border-radius: 50%; }

    .aurora {
      position: absolute;
      z-index: -1;
      inset: 11%;
      background: radial-gradient(circle, rgba(207, 167, 104, .095), rgba(117, 92, 85, .028) 38%, transparent 71%);
      filter: blur(25px);
      opacity: .65;
    }

    .orbit {
      position: absolute;
      left: 50%;
      top: 51%;
      border-radius: 50%;
      pointer-events: none;
      opacity: 0;
      transform: translate(-50%, -50%) rotate(-28deg);
    }
    .orbit--outer {
      z-index: 0;
      width: 109%;
      height: 40%;
      border: 1px solid rgba(223, 193, 156, .26);
      box-shadow: 0 0 23px rgba(189, 153, 111, .045), inset 0 0 24px rgba(189, 153, 111, .04);
    }
    .orbit--inner {
      z-index: 0;
      width: 94%;
      height: 33%;
      border: 1px solid rgba(216, 183, 144, .095);
    }
    .orbit--foreground {
      z-index: 3;
      width: 109%;
      height: 40%;
      border: 1px solid transparent;
      border-bottom-color: rgba(235, 198, 153, .26);
      filter: drop-shadow(0 0 4px rgba(207, 159, 97, .12));
    }
    .scene.playing .orbit { animation: orbit-appear 2.3s 5.05s ease-out forwards; }

    .constellation {
      position: relative;
      z-index: 2;
      display: block;
      width: 100%;
      height: 100%;
      overflow: visible;
    }
    .s-path { stroke: none; fill: none; }
    .s-glow, .s-trace {
      fill: none;
      stroke-linecap: round;
      stroke-dasharray: var(--path-length, 1000);
      stroke-dashoffset: var(--path-length, 1000);
    }
    .s-glow { stroke: #d7ad72; stroke-width: 12; opacity: .075; filter: url(#softBlur); }
    .s-trace { stroke: #f2d9aa; stroke-width: .8; opacity: .23; }
    .scene.playing .s-glow,
    .scene.playing .s-trace { animation: trace 5.1s .27s cubic-bezier(.24, .1, .4, 1) both; }

    .star-inner {
      opacity: 0;
      transform: scale(.04);
      transform-box: fill-box;
      transform-origin: center;
    }
    .scene.playing .star-inner {
      animation: ignite .92s var(--delay) cubic-bezier(.16,.7,.22,1) forwards;
    }
    .star-halo { fill: url(#starHalo); }
    .star-core { fill: #fff9ed; }
    .star-faint .star-core { fill: #d6bb91; }
    .star-ray { stroke: #fce6c3; stroke-width: .58; stroke-linecap: round; opacity: .88; }
    .star-faint .star-ray { opacity: .5; }

    @keyframes trace {
      from { stroke-dashoffset: var(--path-length, 1000); }
      to { stroke-dashoffset: 0; }
    }
    @keyframes ignite {
      0% { opacity: 0; transform: scale(.06); }
      28% { opacity: 1; transform: scale(2.1); }
      52% { opacity: 1; transform: scale(.82); }
      76% { opacity: 1; transform: scale(1.13); }
      100% { opacity: var(--star-opacity, 1); transform: scale(1); }
    }
    @keyframes orbit-appear {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @media (max-width: 520px) {
      .scene { width: min(96vw, 76svh); }
      .orbit--outer, .orbit--foreground { width: 104%; }
      .orbit--inner { width: 89%; }
    }
    @media (prefers-reduced-motion: reduce) {
      .scene { transition: none; }
      .star-inner { opacity: var(--star-opacity, 1); transform: scale(1); }
      .s-glow, .s-trace { stroke-dashoffset: 0; }
      .orbit { opacity: 1; }
      .scene.playing .star-inner, .scene.playing .s-glow, .scene.playing .s-trace,
      .scene.playing .orbit { animation: none; }
    }
