.music-toggle {
  position: fixed;
  z-index: 20;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  color: #ef750a;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(23, 22, 27, 0.12);
  border-radius: 50%;
  box-shadow: 0 12px 34px rgba(23, 22, 27, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.music-toggle:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 16px 38px rgba(23, 22, 27, 0.2);
}

.music-toggle:focus-visible {
  outline: 3px solid rgba(239, 117, 10, 0.35);
  outline-offset: 4px;
}

.music-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 25px;
  height: 22px;
}

.music-bars span {
  width: 3px;
  height: 7px;
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
  animation: alradeef-sound-wave 900ms ease-in-out infinite alternate;
}

.music-bars span:nth-child(2) { animation-delay: -600ms; }
.music-bars span:nth-child(3) { animation-delay: -300ms; }
.music-bars span:nth-child(4) { animation-delay: -750ms; }

.music-toggle.is-muted .music-bars span {
  animation-play-state: paused;
  height: 3px;
  opacity: 0.55;
}

@keyframes alradeef-sound-wave {
  0% { height: 5px; }
  100% { height: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .music-toggle,
  .music-bars span {
    animation: none;
    transition: none;
  }

  .music-bars span:nth-child(1),
  .music-bars span:nth-child(4) { height: 8px; }
  .music-bars span:nth-child(2),
  .music-bars span:nth-child(3) { height: 16px; }
  .music-toggle.is-muted .music-bars span { height: 3px; }
}

@media (max-width: 520px) {
  .music-toggle {
    width: 48px;
    height: 48px;
  }
}
