/* V1.63Beta: independent SFX control; music remains on its own bus. */
html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle {
  --sfx-control-size: 64px;
  --sfx-control-rgb: 75, 185, 195;
  position: fixed !important;
  left: auto !important;
  right: 150px !important;
  top: auto !important;
  bottom: 12px !important;
  z-index: 1410 !important;
  box-sizing: border-box !important;
  width: var(--sfx-control-size) !important;
  height: var(--sfx-control-size) !important;
  min-width: var(--sfx-control-size) !important;
  min-height: var(--sfx-control-size) !important;
  max-width: var(--sfx-control-size) !important;
  max-height: var(--sfx-control-size) !important;
  padding: 5px 4px 4px !important;
  display: grid !important;
  grid-template-rows: 1fr auto !important;
  place-items: center !important;
  gap: 0 !important;
  overflow: hidden !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 1px solid rgba(var(--sfx-control-rgb), 0.62) !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 50% 35%, rgba(var(--sfx-control-rgb), 0.2), transparent 52%),
    linear-gradient(155deg, rgba(253, 255, 255, 0.94), rgba(216, 235, 236, 0.88)) !important;
  box-shadow:
    0 6px 16px rgba(14, 32, 36, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.58) inset,
    0 0 12px rgba(var(--sfx-control-rgb), 0.14) !important;
  color: rgb(24, 55, 59) !important;
  -webkit-text-fill-color: rgb(24, 55, 59) !important;
  cursor: pointer !important;
  isolation: isolate !important;
  transform: none !important;
  transition: filter 160ms ease, box-shadow 160ms ease, opacity 160ms ease !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle::before,
html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle::after {
  content: "" !important;
  position: absolute !important;
  pointer-events: none !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle::before {
  inset: 3px !important;
  z-index: -1 !important;
  border: 1px solid rgba(var(--sfx-control-rgb), 0.23) !important;
  border-radius: inherit !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle::after {
  left: 18px !important;
  top: 26px !important;
  z-index: 5 !important;
  width: 30px !important;
  height: 2px !important;
  opacity: 0 !important;
  border-radius: 999px !important;
  background: rgba(133, 46, 51, 0.9) !important;
  box-shadow: 0 0 5px rgba(133, 46, 51, 0.22) !important;
  transform: rotate(44deg) !important;
  transition: opacity 150ms ease !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle:hover {
  filter: brightness(1.08) saturate(1.08) !important;
  box-shadow:
    0 7px 18px rgba(14, 32, 36, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.68) inset,
    0 0 16px rgba(var(--sfx-control-rgb), 0.26) !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle:focus-visible {
  outline: 3px solid rgba(var(--sfx-control-rgb), 0.5) !important;
  outline-offset: 3px !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle.is-muted {
  --sfx-control-rgb: 116, 128, 135;
  filter: saturate(0.74) brightness(0.94) !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle.is-muted::after {
  opacity: 1 !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph {
  position: relative !important;
  display: block !important;
  width: 31px !important;
  height: 25px !important;
  margin: 1px 0 0 !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph::before {
  content: "" !important;
  position: absolute !important;
  left: 1px !important;
  top: 5px !important;
  width: 16px !important;
  height: 15px !important;
  background: rgb(var(--sfx-control-rgb)) !important;
  clip-path: polygon(0 32%, 36% 32%, 92% 0, 92% 100%, 36% 68%, 0 68%) !important;
  filter: drop-shadow(0 1px 2px rgba(25, 57, 61, 0.24)) !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph::after,
html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph i {
  content: "" !important;
  position: absolute !important;
  top: 50% !important;
  border: solid rgb(var(--sfx-control-rgb)) !important;
  border-width: 0 2px 0 0 !important;
  border-radius: 0 50% 50% 0 !important;
  transform: translateY(-50%) !important;
  transform-origin: left center !important;
  transition: opacity 150ms ease !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph::after {
  left: 16px !important;
  width: 13px !important;
  height: 22px !important;
  opacity: 0.88 !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph i {
  left: 15px !important;
  width: 8px !important;
  height: 13px !important;
  opacity: 0.72 !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle.is-muted .sound-effects-glyph::after,
html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle.is-muted .sound-effects-glyph i {
  opacity: 0.16 !important;
}

html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-code {
  position: relative !important;
  z-index: 2 !important;
  display: block !important;
  max-width: 100% !important;
  margin: -1px 0 1px !important;
  padding: 0 !important;
  color: rgb(24, 54, 59) !important;
  -webkit-text-fill-color: rgb(24, 54, 59) !important;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif !important;
  font-size: 8px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0.055em !important;
  text-shadow: 0 1px rgba(255, 255, 255, 0.78) !important;
}

html body:not(.maintenance-mode):not(.battle-controls-active) > #vfxQualityToggle.vfx-quality-toggle {
  right: 218px !important;
}

html body:not(.maintenance-mode).battle-controls-active > #soundEffectsToggle.sound-effects-toggle {
  --sfx-control-size: clamp(50px, 4.2vw, 58px);
  --sfx-control-gap: 8px;
  right: calc(max(12px, env(safe-area-inset-right)) + (var(--sfx-control-size) + var(--sfx-control-gap)) * 3) !important;
  bottom: max(10px, env(safe-area-inset-bottom)) !important;
}

html body:not(.maintenance-mode).battle-controls-active > #vfxQualityToggle.vfx-quality-toggle {
  right: calc(max(12px, env(safe-area-inset-right)) + (var(--vfx-control-size) + var(--vfx-control-gap)) * 4) !important;
}

@media (max-width: 720px) {
  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle {
    --sfx-control-size: 50px;
    right: 116px !important;
    bottom: 8px !important;
    padding: 4px 3px 3px !important;
  }

  html body:not(.maintenance-mode):not(.battle-controls-active) > #vfxQualityToggle.vfx-quality-toggle {
    right: 170px !important;
  }

  html body:not(.maintenance-mode).battle-controls-active > #soundEffectsToggle.sound-effects-toggle {
    --sfx-control-size: clamp(40px, 10.6vw, 44px);
    --sfx-control-gap: 6px;
    right: calc(var(--duel-mobile-edge-r, max(8px, env(safe-area-inset-right))) + (var(--sfx-control-size) + var(--sfx-control-gap)) * 3) !important;
    bottom: var(--duel-mobile-bottom, max(8px, env(safe-area-inset-bottom))) !important;
  }

  html body:not(.maintenance-mode).battle-controls-active > #vfxQualityToggle.vfx-quality-toggle {
    right: calc(var(--duel-mobile-edge-r, max(8px, env(safe-area-inset-right))) + (var(--vfx-control-size) + var(--vfx-control-gap)) * 4) !important;
  }

  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph {
    width: 25px !important;
    height: 21px !important;
  }

  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph::before {
    top: 4px !important;
    width: 14px !important;
    height: 13px !important;
  }

  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph::after {
    left: 14px !important;
    width: 10px !important;
    height: 18px !important;
  }

  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph i {
    left: 13px !important;
    width: 7px !important;
    height: 11px !important;
  }

  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-code {
    font-size: 6.5px !important;
  }

  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle::after {
    left: 14px !important;
    top: 21px !important;
    width: 24px !important;
  }
}

@media (max-width: 390px) {
  html body:not(.maintenance-mode).battle-controls-active > #soundEffectsToggle.sound-effects-toggle {
    --sfx-control-size: 40px;
    --sfx-control-gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle,
  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle::after,
  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph::after,
  html body:not(.maintenance-mode) > #soundEffectsToggle.sound-effects-toggle .sound-effects-glyph i {
    transition: none !important;
    animation: none !important;
  }
}
