.music-toggle-wrap:hover svg {
  animation: pulse 1s ease-in-out infinite;
  transform-origin: center;
}
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Smaller heart, sized to the label's cap height */
.music-toggle-wrap { gap: 0.35rem; }
.music-icon-wrap,
.heart-on,
.heart-off { width: 0.7rem; height: 0.65rem; }
.heart-on svg,
.heart-off svg { display: block; width: 100%; height: 100%; }
.music-toggle-wrap:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }

/* ON: the heart beats (lub-dub, pause). A quick pop on every click. */
.music-toggle-wrap.is-playing .heart-on svg { animation: heart-beat 1.1s ease-in-out infinite; transform-origin: center; }
@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.28); }
  24% { transform: scale(1); }
  36% { transform: scale(1.16); }
  50% { transform: scale(1); }
}
.music-toggle-wrap.is-popping .music-icon-wrap { animation: heart-pop 0.3s ease-out; }
@keyframes heart-pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .music-toggle-wrap.is-playing .heart-on svg, .music-toggle-wrap.is-popping .music-icon-wrap { animation: none; }
}
/* The beating heart gets its own layer, so it doesn't repaint the frosted (blurred) header 60 times a second. */
.music-toggle-wrap .heart-on svg { will-change: transform; }
