.sound-toggle {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 15px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(5,7,7,.88);
  color: #fff;
  box-shadow: 0 10px 35px rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font: 800 .72rem/1 Arial, Helvetica, sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  border-color: #19e875;
  color: #19e875;
  transform: translateY(-2px);
  outline: none;
}

.sound-toggle[aria-pressed="true"] {
  border-color: #19e875;
  color: #19e875;
}

.sound-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 17px;
  height: 18px;
}

.sound-bars i {
  display: block;
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
}

.sound-toggle[aria-pressed="true"] .sound-bars i {
  animation: sound-wave .72s ease-in-out infinite alternate;
}

.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(2) { animation-delay: -.42s; }
.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(3) { animation-delay: -.18s; }
.sound-toggle[aria-pressed="true"] .sound-bars i:nth-child(4) { animation-delay: -.55s; }

@keyframes sound-wave {
  from { transform: scaleY(.65); }
  to { transform: scaleY(2.8); }
}

@media (max-width: 600px) {
  .sound-toggle { min-height: 44px; padding: 9px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .sound-toggle,
  .sound-toggle:hover,
  .sound-toggle:focus-visible { transition: none; transform: none; }
  .sound-toggle[aria-pressed="true"] .sound-bars i { animation: none; }
}
