/* A single quiet, touch-sized control; no separate audio toolbar. */
#game-audio-toggle {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: calc(8px + env(safe-area-inset-right, 0px));
  z-index: 8;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 11px;
  border: 1px solid rgb(216 228 222 / 15%);
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: rgb(16 25 30 / 68%);
  color: #c5d2cd;
  box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#game-audio-toggle[hidden] { display: none; }
#game-audio-toggle svg { display: block; width: 21px; height: 21px; overflow: visible; pointer-events: none; }
#game-audio-toggle path { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
#game-audio-toggle .audio-muted,
#game-audio-toggle[aria-pressed="true"] .audio-waves { display: none; }
#game-audio-toggle[aria-pressed="true"] .audio-muted { display: block; }
#game-audio-toggle[aria-pressed="true"] { color: #aab9b2; }
#game-audio-toggle:active { background: rgb(57 75 76 / 88%); }
#game-audio-toggle:focus-visible { outline: 2px solid #c6eadb; outline-offset: 3px; }

/* Only the non-3D recovery layout has adjacent zoom/fullscreen buttons. Keep
   their complete touch targets clear of the global switch, including a notch. */
.mobile-focused .mobile-toolbar { padding-right: 62px; }

@media (hover: hover) {
  #game-audio-toggle:hover { color: #edf6ef; background: rgb(40 56 60 / 88%); border-color: rgb(216 228 222 / 32%); }
}

@media (forced-colors: active) {
  #game-audio-toggle { color: ButtonText; background: ButtonFace; border-color: ButtonText; }
  #game-audio-toggle:focus-visible { outline-color: Highlight; }
}
