/* Decorative light sits inside the isolated page, beneath the playlist and navigation. */
.music-page .music-ambient {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 12% 32%, rgb(255 171 230 / .43), transparent 36%),
    radial-gradient(ellipse at 94% 62%, rgb(180 109 248 / .38), transparent 42%),
    radial-gradient(ellipse at 37% 105%, rgb(255 178 201 / .37), transparent 46%);
}

.music-page .music-ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 29%, #fff9ee 0, #fff9ee .65px, transparent 1.65px) 0 0 / 71px 103px,
    radial-gradient(circle at 78% 66%, #ffedf9 0, #ffedf9 .55px, transparent 1.45px) 22px 35px / 93px 127px,
    radial-gradient(circle at 62% 14%, #e2edff 0, #e2edff .65px, transparent 1.75px) 14px 18px / 167px 89px,
    radial-gradient(circle at 35% 78%, #f6dcff 0, #f6dcff 1.1px, transparent 3px) 0 5px / 193px 169px;
  opacity: .58;
}

.music-page .music-orb {
  position: absolute;
  top: var(--orb-y);
  left: var(--orb-x);
  width: var(--orb-size);
  aspect-ratio: 1;
  translate: -50% -50%;
  opacity: var(--orb-opacity, .82);
}

.music-page .music-orb--flare {
  background: radial-gradient(circle, #fff 0%, var(--orb-light) 7%, transparent 45%);
}

.music-page .music-orb--flare::before {
  content: '';
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0, 54% 40%, 60% 46%, 100% 50%, 60% 54%, 54% 60%, 50% 100%, 46% 60%, 40% 54%, 0 50%, 40% 46%, 46% 40%);
  background: radial-gradient(ellipse at center, #fff 0 9%, var(--orb-shine) 24%, transparent 72%);
}

.music-page .music-orb--glow {
  background: radial-gradient(circle, #fff 0 4%, var(--orb-shine) 8%, var(--orb-light) 20%, transparent 68%);
}

.music-page .music-orb:nth-child(3n + 1) { --orb-shine: #e4faff; --orb-light: #94d6ff; }
.music-page .music-orb:nth-child(3n + 2) { --orb-shine: #ffe3ff; --orb-light: #d2a2ff; }
.music-page .music-orb:nth-child(3n + 3) { --orb-shine: #ffeedf; --orb-light: #ffb8b0; }

.music-page .music-orb:nth-child(1) { --orb-x: 9%; --orb-y: 33%; --orb-size: clamp(5.5rem, 12vw, 10rem); --orb-wait: -.5s; }
.music-page .music-orb:nth-child(2) { --orb-x: 89%; --orb-y: 28%; --orb-size: clamp(6rem, 12vw, 10rem); --orb-wait: -1s; }
.music-page .music-orb:nth-child(3) { --orb-x: 14%; --orb-y: 73%; --orb-size: clamp(4rem, 8vw, 7rem); --orb-wait: -1.3s; }
.music-page .music-orb:nth-child(4) { --orb-x: 94%; --orb-y: 73%; --orb-size: clamp(5rem, 11vw, 9rem); --orb-wait: -.3s; }
.music-page .music-orb:nth-child(5) { --orb-x: 35%; --orb-y: 87%; --orb-size: clamp(3rem, 7vw, 6rem); --orb-wait: -.8s; --orb-opacity: .68; }
.music-page .music-orb:nth-child(6) { --orb-x: 4%; --orb-y: 53%; --orb-size: 3.3rem; --orb-wait: -1.6s; --orb-opacity: .7; }
.music-page .music-orb:nth-child(7) { --orb-x: 20%; --orb-y: 24%; --orb-size: 2.3rem; --orb-wait: -1s; }
.music-page .music-orb:nth-child(8) { --orb-x: 83%; --orb-y: 53%; --orb-size: 4.25rem; --orb-wait: -.7s; }
.music-page .music-orb:nth-child(9) { --orb-x: 97%; --orb-y: 43%; --orb-size: 2.8rem; --orb-wait: -1.2s; --orb-opacity: .7; }
.music-page .music-orb:nth-child(10) { --orb-x: 78%; --orb-y: 89%; --orb-size: 3.6rem; --orb-wait: -.5s; }
.music-page .music-orb:nth-child(11) { --orb-x: 10%; --orb-y: 91%; --orb-size: 2.5rem; --orb-wait: -1.4s; --orb-opacity: .7; }

@media (max-width: 43rem) {
  .music-page .music-orb:nth-child(1) { --orb-x: 3%; --orb-y: 26%; }
  .music-page .music-orb:nth-child(2) { --orb-x: 91%; --orb-y: 27%; }
  .music-page .music-orb:nth-child(3) { --orb-x: 4%; --orb-y: 77%; }
  .music-page .music-orb:nth-child(4) { --orb-x: 96%; --orb-y: 81%; }
  .music-page .music-orb:nth-child(5) { --orb-x: 21%; --orb-y: 91%; }
}

@media (prefers-reduced-motion: no-preference) {
  .music-page .music-orb {
    animation: music-orb-drift 4.8s ease-in-out var(--orb-wait) both;
  }

  .music-page .music-orb:nth-child(even) { animation-direction: reverse; }
}

@keyframes music-orb-drift {
  0%, 100% { transform: none; opacity: var(--orb-opacity, .82); }
  46% { transform: translate(10px, -9px) scale(1.12); opacity: .96; }
  69% { transform: translate(4px, 5px) scale(.91); opacity: .55; }
}
