@font-face {
  font-family: Fraunces; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("assets/Fraunces-Italic.ttf") format("truetype");
}
.lyric-panel {
  --lyric-glow: var(--phosphor, #c4afff);
  position: relative; isolation: isolate; margin-top: 1.15rem; min-width: 0;
  border-block: 1px solid #decbfb4d;
  background: radial-gradient(ellipse at 52% 63%, #281b388c, #110e216b 70%);
}
.lyric-toolbar { display: flex; justify-content: space-between; align-items: center; padding: .24rem .65rem; }
.lyric-toolbar h4 {
  display: inline-flex; align-items: center; gap: .45rem; margin: 0;
  font: 500 .78rem/1.25 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: #f2e9ff;
}
.lyric-toolbar h4 span { color: var(--lyric-glow); font: 1.3rem/1 var(--body); }
.lyric-toolbar button {
  color: #eee4f8; min-height: 44px; padding: .35rem .25rem;
  font-size: .86rem; border: 0; background: transparent; text-underline-offset: .25rem;
}
.lyric-toolbar button:is(:hover,:focus-visible) { text-decoration: underline; }
.lyric-window {
  position: relative; height: clamp(11.4rem, 17vw, 14rem); overflow: hidden;
  mask-image: linear-gradient(0deg, transparent, #000 20%, #000 81%, transparent);
}
.lyric-reel {
  position: absolute; width: 100%; top: 0; left: 0; margin: 0; padding: 0; list-style: none;
  transform: translateY(var(--line-offset, 0px)); transition: transform .58s cubic-bezier(.22,.75,.18,1);
}
.lyric-reel li { position: relative; margin: 0; }
.lyric-reel button {
  display: block; width: 100%; min-height: 2.8rem; padding: .55rem 1.15rem .55rem 1.65rem;
  color: #e6dced; text-align: left; background: none; border: 0;
  font: italic 550 clamp(1.22rem, 2.1vw, 1.8rem)/1.18 Fraunces, Georgia, serif;
  font-variation-settings: "SOFT" 64, "WONK" 1;
}
.lyric-reel time { display: none; }
.lyric-text {
  display: block; opacity: .49; transform: scale(.94); transform-origin: left center;
  transition: opacity .42s, transform .52s cubic-bezier(.22,.75,.18,1);
}
.lyric-reel li[aria-current="true"] .lyric-text {
  color: #fff7f7; opacity: 1; transform: none;
  text-shadow: 0 1px 3px #120b21, 0 0 17px color-mix(in srgb, var(--lyric-glow) 48%, transparent);
}
.lyric-reel li[aria-current="true"]::before {
  content: "✦"; position: absolute; pointer-events: none; top: 50%; left: .53rem;
  color: var(--lyric-glow); translate: 0 -50%; font: .83rem/1 var(--body); animation: lyric-star .8s ease-out both;
}
.lyric-reel li.instrumental .lyric-text { font: 500 .9rem/1.5 var(--mono); letter-spacing: .03em; }
.instrumental .lyric-text::before { content: "♫"; margin-right: .45em; color: var(--lyric-glow); }
.lyric-panel:not(.all-lines) .lyric-reel button { pointer-events: none; }
@keyframes lyric-star { from { opacity: .2; scale: .62; rotate: -34deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
.all-lines .lyric-window {
  height: clamp(13.5rem, 34vh, 22rem); overflow-y: auto; mask-image: none;
  overscroll-behavior: contain; scrollbar-color: var(--lyric-glow) #181423; scrollbar-width: thin;
}
.all-lines .lyric-reel { position: relative; transform: none; transition: none; }
.all-lines .lyric-reel button {
  display: grid; grid-template-columns: 2.3rem 1fr; gap: .5rem; align-items: baseline;
  min-height: 44px; padding: .6rem .9rem; border-top: 1px solid #dfbfff22; font-size: 1.12rem;
}
.all-lines .lyric-reel li[aria-current="true"] { background: #d9bbff20; }
.all-lines .lyric-reel li[aria-current="true"]::before { display: none; }
.all-lines .lyric-reel time { display: inline; font: 400 .73rem var(--mono); color: #edddff; }
.all-lines .lyric-text { opacity: .88; transform: none; }
.all-lines button:focus-visible { outline-offset: -2px; }
.motion-off .lyric-reel, .motion-off .lyric-text { transition: none; }
.motion-off .lyric-reel li[aria-current="true"]::before { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .lyric-reel, .lyric-text { transition: none; }
  .lyric-reel li[aria-current="true"]::before { animation: none; }
}

.lyric-constellation {
  display: flex; position: relative; align-items: center; justify-content: space-between;
  width: clamp(2.8rem, 17%, 6rem); height: 1.4rem; pointer-events: none;
  color: var(--lyric-glow);
}
.lyric-constellation::before {
  content: ""; position: absolute; inset: 8% 0; background: currentColor; opacity: .45;
  clip-path: polygon(0 66%, 25% 18%, 50% 51%, 75% 38%, 100% 62%, 100% 66%, 75% 42%, 50% 55%, 25% 22%, 0 70%);
}
.lyric-constellation i {
  position: absolute; top: var(--y); left: var(--x); width: .26rem; height: .26rem;
  background: currentColor; border-radius: 50%; transform: translate(-50%, -50%); opacity: .58;
  transition: scale .45s, opacity .45s, box-shadow .45s;
}
.lyric-constellation i:nth-child(1) { --x: 0%; --y: 65%; }
.lyric-constellation i:nth-child(2) { --x: 25%; --y: 25%; }
.lyric-constellation i:nth-child(3) { --x: 50%; --y: 52%; }
.lyric-constellation i:nth-child(4) { --x: 75%; --y: 42%; }
.lyric-constellation i:nth-child(5) { --x: 100%; --y: 62%; }
.lyric-constellation .is-lit {
  opacity: 1; background: #fffdfa; box-shadow: 0 0 3px 1px #fff5, 0 0 8px 2px currentColor;
}
.lyric-reel li:nth-child(4n+2)[aria-current="true"]::before { content: "\2727"; }
.lyric-reel li:nth-child(4n)[aria-current="true"]::before { content: "\22C6"; }
.motion-off .lyric-constellation i { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .lyric-constellation i { transition: none; }
}
