.gate-sound-toggle {
  position: absolute;
  z-index: 4;
  bottom: clamp(22px, 3.5vw, 54px);
  left: clamp(22px, 4.4vw, 76px);
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  background: rgba(10, 0, 1, 0.58);
  color: #fff;
  padding: 10px 17px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font: 800 0.76rem/1 Arial, sans-serif;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.gate-sound-toggle:hover {
  border-color: #e8ff55;
  background: rgba(121, 0, 8, 0.82);
  transform: translateY(-2px);
}

.gate-sound-toggle:focus-visible {
  outline: 3px solid #e8ff55;
  outline-offset: 3px;
}

.gate-sound-bars {
  display: inline-flex;
  height: 18px;
  align-items: center;
  gap: 3px;
}

.gate-sound-bars i {
  display: block;
  width: 3px;
  border-radius: 999px;
  background: #e8ff55;
  animation: gate-sound-wave 820ms ease-in-out infinite alternate;
}

.gate-sound-bars i:nth-child(1) {
  height: 7px;
}

.gate-sound-bars i:nth-child(2) {
  height: 16px;
  animation-delay: -260ms;
}

.gate-sound-bars i:nth-child(3) {
  height: 11px;
  animation-delay: -520ms;
}

.gate-sound-toggle[aria-pressed="false"] .gate-sound-bars i {
  height: 3px;
  animation-play-state: paused;
}

@keyframes gate-sound-wave {
  from { transform: scaleY(0.45); }
  to { transform: scaleY(1); }
}

@media (max-width: 760px) {
  .gate-sound-toggle {
    top: max(18px, env(safe-area-inset-top));
    right: 18px;
    bottom: auto;
    left: auto;
    min-height: 44px;
    padding: 9px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-sound-toggle {
    display: none;
  }
}
