.foundry-sound-toggle {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 150;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(17, 17, 15, 0.82);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.28);
  color: #fff;
  font: 600 14px/1 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 180ms ease,
    background-color 180ms ease;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.foundry-sound-toggle.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.foundry-sound-toggle:hover {
  background: rgba(17, 17, 15, 0.94);
}

.foundry-sound-toggle:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.foundry-sound-toggle:disabled {
  cursor: wait;
}

.foundry-sound-toggle.is-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
}

.foundry-sound-toggle__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: currentColor;
}

.foundry-sound-toggle__icon path:nth-child(n + 2) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.foundry-sound-status {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .foundry-sound-toggle {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    min-height: 46px;
    padding: 11px 16px;
    font-size: 13px;
  }
}

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