/* ═══════════════════════════════════════════════════════════
   Hitohira Hana — Lyrics page (original songs)
   Loads after main.css and before the theme file; uses only the
   design-system variables so every theme keeps working.
   ═══════════════════════════════════════════════════════════ */

.lyrics-page {
  --lyr-warm: #f7b9a4;
  --lyr-warm-soft: rgba(247, 185, 164, 0.28);
  --lyr-active-bg: color-mix(in srgb, var(--rose-soft) 70%, var(--surface));
  --lyr-line-ja: clamp(19px, 2.3vw, 24px);
}

/* ── Hero ── */
.lyr-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: calc(var(--site-max) + var(--page-pad-x2));
  margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(34px, 6vw, 72px)) var(--page-pad) clamp(36px, 6vw, 72px);
}
.lyr-hero__copy { min-width: 0; }
.lyr-hero .hero__badge { margin-bottom: 18px; }
.lyr-hero__title { line-height: 0.92; }
.lyr-hero__title .hero__jp { font-size: clamp(18px, 2.6vw, 26px); }
.lyr-hero__feeling {
  font-family: var(--font-jp);
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--bloom-deep);
  margin: 18px 0 0;
  letter-spacing: 0.02em;
}
.lyr-hero__lead { max-width: 640px; margin: 16px 0 0; }
.lyr-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.lyr-hero__note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  max-width: 560px;
}

.lyr-hero__visual {
  display: grid;
  gap: 16px;
  justify-items: center;
}
.lyr-cover {
  margin: 0;
  width: min(100%, 440px);
  position: relative;
}
.lyr-cover img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.5deg);
  transition: transform 0.5s var(--ease);
  background: var(--paper);
}
.lyr-cover:hover img { transform: rotate(0deg) scale(1.01); }
.lyr-cover figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.lyr-hero__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ── Stage layout ── */
.lyr-stage { padding: clamp(16px, 3vw, 32px) 0 clamp(56px, 8vw, 96px); }
.lyr-stage__layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

/* ── Player card ── */
/* The aside stretches the full height of the sheet so the sticky card rides
   along the whole way down (a start-aligned aside is only as tall as the card,
   which leaves sticky nothing to stick to and the player scrolls out of view). */
.lyr-player { align-self: stretch; }
.lyr-player__sticky {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  max-height: calc(100vh - var(--nav-h) - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, var(--bloom-soft));
  border: 1px solid color-mix(in srgb, var(--bloom) 14%, transparent);
  box-shadow: var(--shadow);
}
.lyr-player__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--night-deep);
  isolation: isolate;
}
.lyr-player__poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.lyr-player__poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}
.lyr-player__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(77, 44, 59, 0) 40%, rgba(77, 44, 59, 0.55) 100%);
}
.lyr-player__poster-hint {
  position: relative;
  z-index: 1;
  align-self: end;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 248, 250, 0.92);
  color: var(--rose-deep);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.lyr-player__embed,
.lyr-player__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.lyr-player__embed[hidden] { display: none; }
.lyr-player__frame.is-live .lyr-player__poster { display: none; }

.lyr-player__now {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eyebrow-color);
}
.lyr-player__state { display: inline-flex; align-items: center; gap: 8px; }
.lyr-player__state::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
  transition: background var(--transition), box-shadow var(--transition);
}
.lyr-player.is-playing .lyr-player__state::before {
  background: var(--rose);
  box-shadow: 0 0 0 4px var(--petal-glow);
  animation: lyr-pulse 1.6s infinite;
}
.lyr-player.is-buffering .lyr-player__state::before { background: var(--gold); }
@keyframes lyr-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--petal-glow); }
  55% { box-shadow: 0 0 0 6px rgba(244, 166, 192, 0); }
}
.lyr-player__pos { font-variant-numeric: tabular-nums; color: var(--ink-soft); }

.lyr-player__line {
  margin: 0;
  font-family: var(--font-jp);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--night-deep);
  min-height: 3em;
}
.lyr-player__controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.lyr-btn { width: 100%; }
.lyr-btn__icon { font-size: 0.95em; line-height: 1; }
.lyr-player__rule {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.lyr-player__full {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}
.lyr-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.lyr-link::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.lyr-link--yt::before { background: var(--youtube); }
.lyr-link--sp::before { background: var(--spotify); }
.lyr-link--ap::before { background: #fa2d48; }
.lyr-link--dz::before { background: #a238ff; }
.lyr-link:hover { border-color: var(--rose); color: var(--rose-deep); background: #fff; }
.lyr-player__fallback {
  margin: 0;
  font-size: 12.5px;
  color: var(--rose-deep);
}

/* ── Lyric sheet ── */
.lyr-sheet { min-width: 0; }
.lyr-sheet__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 14px 24px;
  margin-bottom: 10px;
}
.lyr-sheet__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.05;
  color: var(--headline-color);
}
.lyr-sheet__title small {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 6px;
}
.lyr-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.lyr-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}
.lyr-toggle input { accent-color: var(--rose-deep); width: 16px; height: 16px; margin: 0; }
.lyr-trans-pick {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}
.lyr-trans-pick button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.lyr-trans-pick button.is-active { background: var(--rose-deep); color: #fff; }
.lyr-sheet__hint {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: var(--ink-soft);
  max-width: 720px;
}

.lyr-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.lyr-lines__loading {
  padding: 24px;
  text-align: center;
  color: var(--ink-soft);
}
.lyr-section {
  display: grid;
  gap: 6px;
  padding-top: 14px;
}
.lyr-section + .lyr-section { margin-top: 10px; }
.lyr-section__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eyebrow-color);
  opacity: 0.85;
  padding-left: 16px;
  margin-bottom: 2px;
}
.lyr-section__label:empty { display: none; }

.lyr-line {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: start;
  width: 100%;
  text-align: left;
  padding: 10px 14px 10px 10px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.lyr-line:hover {
  background: color-mix(in srgb, var(--surface) 80%, var(--bloom-soft));
  border-color: color-mix(in srgb, var(--bloom) 18%, transparent);
}
.lyr-line:focus-visible { outline-offset: 2px; }
.lyr-line.is-current {
  background: var(--lyr-active-bg);
  border-color: color-mix(in srgb, var(--rose) 45%, transparent);
  box-shadow: var(--shadow-sm);
}
.lyr-line.is-playing {
  border-color: var(--rose);
  box-shadow: 0 10px 30px var(--petal-glow);
}
.lyr-line.is-sung .lyr-line__ja { color: var(--ink-soft); }

.lyr-line__play {
  grid-row: 1 / span 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  color: var(--rose-deep);
  font-size: 12px;
  font-weight: 800;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.lyr-line:hover .lyr-line__play,
.lyr-line.is-current .lyr-line__play {
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: #fff;
  border-color: transparent;
}
.lyr-line.is-playing .lyr-line__play { animation: lyr-pulse 1.6s infinite; }
.lyr-line__play .lyr-line__num {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.lyr-line__play .lyr-line__tri { display: none; }
.lyr-line:hover .lyr-line__num,
.lyr-line.is-current .lyr-line__num { display: none; }
.lyr-line:hover .lyr-line__tri,
.lyr-line.is-current .lyr-line__tri { display: inline; }
.lyr-line.is-playing .lyr-line__tri { font-size: 11px; letter-spacing: -1px; }

.lyr-line__ja {
  font-family: var(--font-jp);
  font-size: var(--lyr-line-ja);
  font-weight: 600;
  line-height: 1.55;
  color: var(--night-deep);
  transition: color var(--transition);
}
.lyr-line__romaji {
  grid-column: 2;
  font-size: 13px;
  font-style: italic;
  color: var(--bloom-deep);
  line-height: 1.45;
}
.lyr-line__tr {
  grid-column: 2;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.lyr-line__tr[lang="en"] { font-family: var(--font-body); }
.lyr-line__time {
  grid-column: 3;
  grid-row: 1;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
  opacity: 0;
  transition: opacity var(--transition);
  white-space: nowrap;
  margin-top: 6px;
}
.lyr-line:hover .lyr-line__time,
.lyr-line.is-current .lyr-line__time { opacity: 0.85; }
.lyr-line__ext {
  grid-column: 3;
  grid-row: 2;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--rose-deep);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition);
}
.lyr-line.is-current .lyr-line__ext { opacity: 1; }
.lyr-lines.hide-romaji .lyr-line__romaji,
.lyr-lines.hide-translation .lyr-line__tr { display: none; }

/* ── Mid/bottom call to action ── */
.lyr-cta {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  padding: clamp(18px, 3vw, 26px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--lyr-warm) 40%, var(--surface)) 0%, color-mix(in srgb, var(--bloom-soft) 70%, var(--surface)) 100%);
  border: 1px solid color-mix(in srgb, var(--rose) 22%, transparent);
  box-shadow: var(--shadow-sm);
}
.lyr-cta__copy { display: grid; gap: 4px; }
.lyr-cta__copy strong {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 26px);
  color: var(--night-deep);
  line-height: 1.2;
}
.lyr-cta__copy span { font-size: 14px; color: var(--ink-soft); }
.lyr-cta__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lyr-sheet__source {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--ink-faint);
}

/* ── Other originals ── */
.lyr-more { padding-top: clamp(40px, 6vw, 72px); }
.lyr-more .hana-orig__grid { max-width: 980px; margin: 0 auto; }

/* ── Toast for copy-link ── */
.lyr-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--night-deep);
  color: var(--cream);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 60;
}
.lyr-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ── Responsive ── */
@media (max-width: 980px) {
  .lyr-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-h) + 28px);
  }
  .lyr-hero__lead,
  .lyr-hero__note { margin-left: auto; margin-right: auto; }
  .lyr-hero__actions { justify-content: center; }
  .lyr-hero__visual { order: -1; }
  .lyr-cover { width: min(72vw, 360px); }
  .lyr-stage__layout { grid-template-columns: 1fr; }
  /* On one column the aside itself sticks, so the compact player rides along
     while the sheet scrolls underneath it. */
  .lyr-player {
    position: sticky;
    top: calc(var(--nav-h) + 6px);
    z-index: 5;
  }
  .lyr-player__sticky {
    position: static;
    grid-template-columns: 120px minmax(0, 1fr);
    grid-template-areas:
      "frame now"
      "frame line"
      "controls controls"
      "mode mode"
      "rule rule"
      "full full"
      "fallback fallback";
    gap: 8px 12px;
    padding: 12px;
  }
  .lyr-player__frame { grid-area: frame; aspect-ratio: 1 / 1; }
  .lyr-player__now { grid-area: now; }
  .lyr-player__line { grid-area: line; font-size: 15.5px; min-height: 0; }
  .lyr-player__controls { grid-area: controls; }
  .lyr-mode { grid-area: mode; justify-self: start; }
  .lyr-player__rule { grid-area: rule; }
  .lyr-player__full { grid-area: full; }
  .lyr-player__fallback { grid-area: fallback; }
  .lyr-player__poster-hint { display: none; }
}
@media (max-width: 640px) {
  .lyr-hero__title { font-size: clamp(44px, 15vw, 64px); }
  .lyr-line { grid-template-columns: 30px minmax(0, 1fr); padding: 9px 10px 9px 8px; }
  .lyr-line__play { width: 28px; height: 28px; }
  .lyr-line__time,
  .lyr-line__ext { display: none; }
  .lyr-cta { grid-template-columns: 1fr; }
  .lyr-player__sticky { grid-template-columns: 96px minmax(0, 1fr); }
  .lyr-player__controls { grid-template-columns: 1fr 1fr; }
  .lyr-player__rule { display: none; }
  .lyr-player__full { padding-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .lyr-player.is-playing .lyr-player__state::before,
  .lyr-line.is-playing .lyr-line__play { animation: none; }
  .lyr-cover img,
  .lyr-cover:hover img { transform: none; transition: none; }
}


/* ── Review drafts (machine transcription, unconfirmed) ── */
.lyr-review-banner {
  position: relative;
  z-index: 3;
  margin-top: var(--nav-h);
  background: linear-gradient(90deg, color-mix(in srgb, var(--gold-soft) 80%, #fff), color-mix(in srgb, var(--rose-soft) 70%, #fff));
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
  color: var(--night-deep);
  font-size: 14px;
  line-height: 1.55;
}
.lyr-review-banner .wrap { display: grid; gap: 4px; padding-top: 12px; padding-bottom: 12px; }
.lyr-review-banner strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.lyr-review-banner strong::before { content: "⚠"; font-size: 15px; }
.lyrics-page--review .lyr-hero { padding-top: clamp(28px, 5vw, 56px); }
.lyrics-page--review .lyr-toggles,
.lyrics-page--review .lyr-cta,
.lyrics-page--review .lyr-line__romaji,
.lyrics-page--review .lyr-line__tr { display: none !important; }
.lyrics-page--review .lyr-line__ja::after {
  content: attr(data-flag);
  display: inline-block;
  margin-left: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--rose-deep);
  vertical-align: middle;
}
.lyrics-page--review .lyr-line.is-uncertain .lyr-line__ja { color: var(--ink-soft); text-decoration: underline dotted var(--rose); text-underline-offset: 4px; }
.lyrics-page--review .lyr-line.is-unintelligible .lyr-line__ja { color: var(--ink-faint); font-style: italic; }
.lyrics-page--review .lyr-player__sticky::before {
  content: attr(data-review-label);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

/* ── Review hub (drafts list) ── */
.lyrics-page--hub .lyr-player,
.lyrics-page--hub .lyr-sheet__hint,
.lyrics-page--hub .lyr-sheet__source,
.lyrics-page--hub .lyr-hero__visual,
.lyrics-page--hub #lyr-listen-links,
.lyrics-page--hub .lyr-hero__note { display: none; }
.lyrics-page--hub .lyr-hero { grid-template-columns: 1fr; }
.lyrics-page--hub .lyr-stage__layout { grid-template-columns: 1fr; max-width: 860px; }
.lyr-hub__item { list-style: none; }
.lyr-hub__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 92%, var(--bloom-soft));
  border: 1px solid color-mix(in srgb, var(--bloom) 14%, transparent);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.lyr-hub__card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--rose) 40%, transparent); color: var(--ink); }
.lyr-hub__title { font-family: var(--font-jp); font-size: 20px; font-weight: 600; color: var(--night-deep); }
.lyr-hub__meta { grid-column: 1; font-size: 13px; color: var(--ink-soft); }
.lyr-hub__cta { grid-column: 2; grid-row: 1 / span 2; font-size: 13px; font-weight: 700; color: var(--rose-deep); white-space: nowrap; }

/* ── Karaoke tokens + furigana (petal-style fill: base text under a clipped lit copy) ── */
.lyrics-page { --song-a: #f7b9a4; --song-b: #ef8fa5; --song-c: #f2c67a; }
.lyr-tok {
  --tp: 0%;
  position: relative;
  display: inline-grid;
  vertical-align: bottom;
  transition: filter 120ms ease, transform 120ms ease;
}
.lyr-tok__base,
.lyr-tok__fill { grid-area: 1 / 1; white-space: nowrap; }
.lyr-tok__fill {
  color: var(--rose-deep);
  clip-path: inset(0 calc(100% - var(--tp)) 0 0);
  text-shadow: 0 0 18px color-mix(in srgb, var(--song-b) 55%, transparent);
  transition: clip-path 40ms linear;
  pointer-events: none;
}
.lyr-tok__fill rt { color: var(--rose-deep); }
.lyr-tok.is-current { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--song-b) 45%, transparent)); transform: translateY(-0.03em); }
.lyr-tok__gap { white-space: pre; }
.lyr-line__ja ruby, .lyr-player__line ruby { ruby-position: over; ruby-align: center; }
.lyr-line__ja rt, .lyr-player__line rt {
  font-size: 0.48em;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--bloom-deep);
  line-height: 1;
  padding-bottom: 0.12em;
  user-select: none;
}
.lyr-line__ja rp, .lyr-player__line rp { display: none; }
.lyr-hide-ruby .lyr-line__ja rt, .lyr-hide-ruby .lyr-player__line rt { display: none; }
.lyr-line__ja { line-height: 1.75; }
.lyr-hide-ruby .lyr-line__ja { line-height: 1.55; }
.lyr-player__line { line-height: 1.9; font-size: 19px; }
.lyr-hide-ruby .lyr-player__line { line-height: 1.5; }
/* the player card blooms while a line is playing */
.lyr-player.is-playing .lyr-player__sticky {
  box-shadow: 0 18px 48px color-mix(in srgb, var(--song-b) 26%, transparent), var(--shadow);
  border-color: color-mix(in srgb, var(--song-b) 45%, transparent);
}
.lyr-player.is-playing .lyr-player__frame { box-shadow: 0 0 0 2px color-mix(in srgb, var(--song-c) 60%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .lyr-tok, .lyr-tok__fill { transition: none; }
  .lyr-tok.is-current { transform: none; filter: none; }
}

/* ── Listening mode: play through (default) / one line at a time ── */
.lyr-mode {
  display: inline-flex;
  align-self: start;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.55);
}
.lyr-mode button {
  appearance: none;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.lyr-mode button:hover { color: var(--rose-deep); }
.lyr-mode button.is-active {
  background: #fff;
  color: var(--rose-deep);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 1px color-mix(in srgb, var(--rose) 35%, transparent);
}
.lyr-mode button:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
/* the rule under the controls explains whichever mode is on */
.lyr-player__rule-line { display: none; }
.lyr-player.is-line-mode .lyr-player__rule-line { display: inline; }
.lyr-player.is-line-mode .lyr-player__rule-through { display: none; }

/* ── Song progress: a slim line under the video that tracks the playhead ── */
.lyr-player__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.22);
  z-index: 2;
  pointer-events: none;
}
.lyr-player__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--rose) 0%, var(--rose-deep) 100%);
  transition: width 0.12s linear;
}
.lyr-player__frame:not(.is-live) .lyr-player__progress { display: none; }

/* ── The playing line is the pause button: its glyph turns into ❚❚ ── */
.lyr-line.is-live .lyr-line__tri { font-size: 10px; letter-spacing: -1px; }
.lyr-line.is-live .lyr-line__num { display: none; }
.lyr-line.is-live .lyr-line__tri { display: inline; }

/* Short desktop viewports: the card must still fit beside the sheet */
@media (min-width: 981px) and (max-height: 820px) {
  .lyr-player__sticky { gap: 10px; padding: 14px; }
  .lyr-player__rule { display: none; }
  .lyr-player__line { font-size: 15px; }
}
@media (min-width: 981px) and (max-height: 700px) {
  .lyr-player__full { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lyr-player__progress-bar { transition: none; }
}

/* ── Emote rain: two layers of DOM sprites (assets/js/lyrics-rain.js) ──
   back  · ambient drift behind the content, like the site petals (z −1)
   front · line cues, cheer, peek, finale above the sheet and the player card
           but below the nav (z 40) — nothing covers them any more.
   All motion is CSS animations parameterised by custom properties set per sprite. */
.lyr-rain {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  --h: 100vh;
}
.lyr-rain--back { z-index: -1; }
.lyr-rain--front { z-index: 40; }
.lyr-sprite {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size, 40px);
  height: var(--size, 40px);
  opacity: var(--op, 1);
  animation-fill-mode: both;
  transition: opacity 1.1s ease;
}
/* retiring (scene change): fade out, then the script removes it */
.lyr-sprite.is-gone { opacity: 0 !important; }
.lyr-sprite__wob {
  display: block;
  width: 100%;
  height: 100%;
  animation: lyr-wob var(--wobDur, 4s) ease-in-out infinite alternate;
}
.lyr-sprite__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 2px 5px rgba(77, 44, 59, 0.16));
  animation: lyr-sway var(--swayDur, 2s) ease-in-out infinite alternate;
}
/* music notes and other symbols may turn — slowly; faces never do */
.lyr-sprite__img.is-tumble {
  animation: lyr-tumble var(--spinDur, 14s) linear infinite;
  animation-direction: var(--spinDir, normal);
}
/* ambient drift: top → bottom with a sideways lean, wobble and sway on top */
.lyr-sprite--fall {
  animation-name: lyr-fall, lyr-fade-in;
  animation-duration: var(--dur, 12s), 1.4s;
  animation-timing-function: linear, ease;
}
@keyframes lyr-fade-in {
  from { opacity: 0; }
  to   { opacity: var(--op, 1); }
}
/* cues / cheer / pop: bloom in, rise along an arc, settle and fade */
.lyr-sprite--pop {
  animation-name: lyr-pop;
  animation-duration: var(--life, 3000ms);
}
/* choreographies (one per cue, see lyrics-rain.js): glide, bubble, drop, peek-up, orbit, bow, rocket */
.lyr-sprite--ride { animation-name: lyr-ride; animation-duration: var(--dur, 4s); animation-timing-function: linear; }
.lyr-sprite--rise { animation-name: lyr-rise; animation-duration: var(--life, 3600ms); animation-timing-function: ease-out; }
.lyr-sprite--drop { animation-name: lyr-drop; animation-duration: var(--life, 2200ms); }
.lyr-sprite--peekup { animation-name: lyr-peekup; animation-duration: var(--life, 2600ms); }
.lyr-sprite--bow { animation-name: lyr-bow; animation-duration: var(--life, 4000ms); animation-timing-function: ease-in-out; }
.lyr-sprite--rocket { animation-name: lyr-rocket; animation-duration: var(--life, 800ms); animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1); }
/* orbit: the wrapper circles, the image counter-rotates, so the face stays upright all the way round */
.lyr-sprite--orbit { animation-name: lyr-orbit-fade; animation-duration: var(--life, 3200ms); animation-timing-function: linear; }
.lyr-sprite--orbit .lyr-sprite__wob { animation: lyr-orbit-spin var(--orbit, 2.4s) linear infinite; }
.lyr-sprite--orbit .lyr-sprite__img { animation: lyr-counter var(--orbit, 2.4s) linear infinite; }
@keyframes lyr-ride {
  0%   { transform: translate3d(var(--x), var(--y), 0); opacity: 0; }
  8%   { opacity: var(--op, 0.96); }
  92%  { opacity: var(--op, 0.96); }
  100% { transform: translate3d(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy, 0px)), 0); opacity: 0; }
}
@keyframes lyr-rise {
  0%   { transform: translate3d(var(--x), var(--y), 0) scale(0.6); opacity: 0; }
  12%  { transform: translate3d(var(--x), calc(var(--y) - var(--rise) * 0.1), 0) scale(1); opacity: var(--op, 0.96); }
  80%  { opacity: var(--op, 0.96); }
  100% { transform: translate3d(var(--x), calc(var(--y) - var(--rise)), 0) scale(1.05); opacity: 0; }
}
@keyframes lyr-drop {
  0%   { transform: translate3d(var(--x), calc(var(--y) - var(--drop)), 0); opacity: 0; animation-timing-function: ease-in; }
  15%  { opacity: var(--op, 0.96); }
  55%  { transform: translate3d(var(--x), var(--y), 0); animation-timing-function: ease-out; }
  68%  { transform: translate3d(var(--x), calc(var(--y) - 14px), 0); animation-timing-function: ease-in; }
  80%  { transform: translate3d(var(--x), var(--y), 0); opacity: var(--op, 0.96); }
  100% { transform: translate3d(var(--x), calc(var(--y) + 6px), 0); opacity: 0; }
}
@keyframes lyr-peekup {
  0%   { transform: translate3d(var(--x), calc(var(--y) + 28px), 0) scale(0.8); opacity: 0; animation-timing-function: ease-out; }
  18%  { transform: translate3d(var(--x), calc(var(--y) - var(--lift)), 0) scale(1.06); opacity: var(--op, 0.96); }
  30%  { transform: translate3d(var(--x), calc(var(--y) - var(--lift) + 8px), 0) scale(1); }
  78%  { transform: translate3d(var(--x), calc(var(--y) - var(--lift) + 8px), 0) scale(1); opacity: var(--op, 0.96); animation-timing-function: ease-in; }
  100% { transform: translate3d(var(--x), calc(var(--y) + 28px), 0) scale(0.85); opacity: 0; }
}
@keyframes lyr-orbit-fade {
  0%   { opacity: 0; }
  12%  { opacity: var(--op, 0.96); }
  85%  { opacity: var(--op, 0.96); }
  100% { opacity: 0; }
}
@keyframes lyr-orbit-spin {
  from { transform: rotate(0deg) translateX(var(--r, 28px)); }
  to   { transform: rotate(360deg) translateX(var(--r, 28px)); }
}
@keyframes lyr-counter {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}
@keyframes lyr-bow {
  0%   { transform: translate3d(var(--x), calc(var(--y) + 140px), 0); opacity: 0; }
  14%  { transform: translate3d(var(--x), var(--y), 0); opacity: var(--op, 0.98); }
  24%  { transform: translate3d(var(--x), calc(var(--y) - 14px), 0); }
  34%  { transform: translate3d(var(--x), var(--y), 0); }
  44%  { transform: translate3d(var(--x), calc(var(--y) - 14px), 0); }
  54%  { transform: translate3d(var(--x), var(--y), 0); }
  64%  { transform: translate3d(var(--x), calc(var(--y) - 14px), 0); }
  74%  { transform: translate3d(var(--x), var(--y), 0); }
  86%  { transform: translate3d(var(--x), var(--y), 0); opacity: var(--op, 0.98); }
  100% { transform: translate3d(var(--x), calc(var(--y) + 140px), 0); opacity: 0; }
}
@keyframes lyr-rocket {
  0%   { transform: translate3d(var(--x), var(--y), 0) scale(0.7); opacity: 0; }
  15%  { opacity: var(--op, 0.96); transform: translate3d(var(--x), calc(var(--y) - var(--rise) * 0.15), 0) scale(1); }
  100% { transform: translate3d(var(--x), calc(var(--y) - var(--rise)), 0) scale(0.9); opacity: 0.25; }
}
.lyr-rain--front .lyr-sprite__img { filter: drop-shadow(0 4px 10px rgba(77, 44, 59, 0.22)); }
/* Hana peeks in from the edge of the screen; tap her for hearts */
.lyr-sprite--peek {
  top: var(--y, 40vh);
  left: 0;
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
  animation: lyr-peek 4.8s ease-in-out both;
  filter: drop-shadow(0 6px 14px rgba(77, 44, 59, 0.28));
}
.lyr-sprite--peek.is-right { left: auto; right: 0; }
.lyr-sprite--peek.is-bottom { top: auto; bottom: 0; left: var(--x, 40vw); }
.lyr-sprite--peek .lyr-sprite__wob { animation: none; }
.lyr-sprite--peek.is-right .lyr-sprite__wob { transform: scaleX(-1); }
.lyr-sprite--peek .lyr-sprite__img { animation-duration: 2.8s; }
.lyr-sprite--peek.is-popped { animation: lyr-peek-pop 0.32s ease-out both; pointer-events: none; }
.lyr-rain.is-paused .lyr-sprite,
.lyr-rain.is-paused .lyr-sprite__wob,
.lyr-rain.is-paused .lyr-sprite__img { animation-play-state: paused; }
@keyframes lyr-fall {
  from { transform: translate3d(var(--x, 0px), -90px, 0); }
  to   { transform: translate3d(calc(var(--x, 0px) + var(--dx, 0px)), calc(var(--h) + 90px), 0); }
}
@keyframes lyr-wob {
  from { transform: translateX(calc(var(--wob, 12px) * -1)); }
  to   { transform: translateX(var(--wob, 12px)); }
}
@keyframes lyr-sway {
  from { transform: rotate(calc(var(--tilt, 0deg) - var(--sway, 4deg))); }
  to   { transform: rotate(calc(var(--tilt, 0deg) + var(--sway, 4deg))); }
}
@keyframes lyr-tumble {
  from { transform: rotate(var(--rot0, 0deg)); }
  to   { transform: rotate(calc(var(--rot0, 0deg) + 360deg)); }
}
@keyframes lyr-pop {
  0% {
    transform: translate3d(var(--x), var(--y), 0) scale(0.35);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.17, 0.84, 0.44, 1);
  }
  14% {
    transform: translate3d(calc(var(--x) + var(--vx) * 0.3), calc(var(--y) + var(--vy) * 0.75), 0) scale(1.12);
    opacity: var(--op, 0.96);
    animation-timing-function: ease-out;
  }
  34% {
    transform: translate3d(calc(var(--x) + var(--vx) * 0.6), calc(var(--y) + var(--vy)), 0) scale(1);
    opacity: var(--op, 0.96);
    animation-timing-function: ease-in;
  }
  72% { opacity: var(--op, 0.96); }
  100% {
    transform: translate3d(calc(var(--x) + var(--vx)), calc(var(--y) + var(--vy) + var(--fall)), 0) scale(0.9);
    opacity: 0;
  }
}
/* --pin / --px hold whole "x, y, z" argument lists so one keyframe set serves left, right and bottom */
@keyframes lyr-peek {
  0%        { transform: translate3d(var(--pin)); }
  22%, 74%  { transform: translate3d(var(--px)); }
  100%      { transform: translate3d(var(--pin)); }
}
@keyframes lyr-peek-pop {
  from { transform: translate3d(var(--px)) scale(1); opacity: 1; }
  to   { transform: translate3d(var(--px)) translateY(-10px) scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .lyr-rain { display: none; } }

/* ── Volume row: the YouTube slider is tiny inside the embed (and hover-only on
   the 120 px tile on phones), so the card carries its own mute + slider ── */
.lyr-volume {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 3ch;
  align-items: center;
  gap: 10px;
  --vol: 100%;
}
.lyr-volume[hidden] { display: none; }
.lyr-volume__mute {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--rose-deep);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.lyr-volume__mute:hover { border-color: var(--rose); background: #fff; }
.lyr-volume__mute svg { width: 18px; height: 18px; }
.lyr-volume__mute .lyr-volume__wave-1,
.lyr-volume__mute .lyr-volume__wave-2,
.lyr-volume__mute .lyr-volume__x { transition: opacity var(--transition); }
.lyr-volume__mute[data-level="0"] .lyr-volume__wave-1,
.lyr-volume__mute[data-level="0"] .lyr-volume__wave-2,
.lyr-volume__mute[data-level="1"] .lyr-volume__wave-2 { opacity: 0; }
.lyr-volume__mute:not([data-level="0"]) .lyr-volume__x { opacity: 0; }
.lyr-volume__mute[data-level="0"] { color: var(--ink-soft); }
.lyr-volume__range {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
.lyr-volume__range:focus-visible { outline: 2px solid var(--rose); outline-offset: 4px; border-radius: 8px; }
.lyr-volume__range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose) 0%, var(--rose-deep) var(--vol), var(--line-strong) var(--vol), var(--line-strong) 100%);
}
.lyr-volume__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--rose-deep);
  box-shadow: 0 1px 4px rgba(77, 44, 59, 0.25);
  transition: transform 0.15s ease;
}
.lyr-volume__range:active::-webkit-slider-thumb { transform: scale(1.15); }
.lyr-volume__range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line-strong); }
.lyr-volume__range::-moz-range-progress { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--rose), var(--rose-deep)); }
.lyr-volume__range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--rose-deep);
  box-shadow: 0 1px 4px rgba(77, 44, 59, 0.25);
}
.lyr-volume.is-muted .lyr-volume__range { opacity: 0.45; }
.lyr-volume__value {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  text-align: right;
}
/* iOS ignores programmatic volume (hardware buttons only): mute stays, the slider goes */
.lyr-volume.is-fixed-volume { grid-template-columns: auto minmax(0, 1fr); }
.lyr-volume.is-fixed-volume .lyr-volume__range,
.lyr-volume.is-fixed-volume .lyr-volume__value { display: none; }
.lyr-volume__fixed { display: none; font-size: 12px; color: var(--ink-faint); }
.lyr-volume.is-fixed-volume .lyr-volume__fixed { display: block; }

/* ── Fun row: cheer fountain + emote-rain level ── */
.lyr-fun {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.lyr-fun[hidden] { display: none; }
.lyr-cheer {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--rose) 40%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--lyr-warm) 55%, #fff) 0%, color-mix(in srgb, var(--rose-soft) 85%, #fff) 100%);
  color: var(--rose-deep);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(77, 44, 59, 0.08);
  transition: transform 0.12s ease, box-shadow var(--transition), border-color var(--transition);
}
.lyr-cheer__emote {
  width: 22px;
  height: 22px;
  object-fit: contain;
  pointer-events: none;
}
.lyr-cheer:hover { border-color: var(--rose); box-shadow: 0 4px 14px var(--petal-glow); }
.lyr-cheer:active, .lyr-cheer.is-bouncing { transform: scale(0.94) rotate(-3deg); }
.lyr-cheer:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.lyr-rain-level {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.lyr-rain-level:hover { color: var(--rose-deep); border-color: var(--rose); }
.lyr-rain-level:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.lyr-rain-level__dots { display: inline-flex; gap: 3px; }
.lyr-rain-level__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background var(--transition);
}
.lyr-rain-level[data-level="soft"] .lyr-rain-level__dots i:nth-child(1),
.lyr-rain-level[data-level="full"] .lyr-rain-level__dots i { background: var(--rose); }
.lyr-rain-level[data-level="off"] { color: var(--ink-faint); }
.lyr-rain-level[hidden] { display: none; }

/* The mode toggle lives in the fun row (mode · cheer · emote level), wrapping as needed */
.lyr-fun .lyr-mode { align-self: center; }
.lyr-cheer[hidden] { display: none; }
@media (max-width: 980px) {
  /* Phone card, kept short so the sheet underneath stays readable: tile + state,
     play/next, volume, one wrapping row of mode · cheer · emotes. The streaming
     links and the explanatory text live in the hero and the CTA already. */
  .lyr-player__sticky {
    grid-template-columns: 100px minmax(0, 1fr);
    grid-template-areas:
      "frame now"
      "frame line"
      "controls controls"
      "volume volume"
      "fun fun"
      "fallback fallback";
    gap: 6px 10px;
    padding: 10px;
  }
  .lyr-volume { grid-area: volume; }
  .lyr-fun { grid-area: fun; gap: 6px 8px; }
  .lyr-player__rule,
  .lyr-player__full { display: none; }
  .lyr-player__line { font-size: 14.5px; line-height: 1.7; }
  .lyr-player__now { font-size: 11px; }
  .lyr-mode button, .lyr-cheer, .lyr-rain-level { padding: 5px 10px; font-size: 12px; }
  .lyr-volume__range { height: 20px; }
}
@media (max-width: 640px) {
  .lyr-player__sticky { grid-template-columns: 84px minmax(0, 1fr); }
  .lyr-player__controls { gap: 8px; }
}
@media (min-width: 981px) and (max-height: 820px) {
  .lyr-volume { gap: 8px; }
}
