.sound-dock {
  position: fixed; z-index: 8; right: max(72px, calc(env(safe-area-inset-right) + 72px));
  bottom: max(18px, env(safe-area-inset-bottom));
}
.sound-control {
  display: grid; place-items: center; width: 42px; height: 42px; padding: 10px;
  border: 1px solid #4c553d66; border-radius: 50%; color: #414a36;
  background: #f7edceeb; backdrop-filter: blur(4px);
}
.sound-control:hover { background: #fff5df; }
.sound-control:focus-visible { outline: 2px solid #414a36; outline-offset: 4px; }
.sound-control[aria-pressed="true"] { background: #d5ddc4; }
.sound-control svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sound-on-icon, .sound-control[aria-pressed="true"] .sound-off-icon { display: none; }
.sound-control[aria-pressed="true"] .sound-on-icon { display: block; }
.sound-hint {
  position: absolute; bottom: calc(100% + 12px); right: -12px; padding: 8px 12px;
  border: 1px solid #87856c; border-radius: 10px; background: #eee2c1; color: #414a36;
  white-space: nowrap; font: 400 .875rem/1.4 Arial, Helvetica, sans-serif;
  box-shadow: 0 3px 10px #3b35251a;
}
.sound-hint::after {
  content: ''; position: absolute; right: 26px; bottom: -5px; width: 8px; height: 8px;
  border-right: 1px solid #87856c; border-bottom: 1px solid #87856c;
  background: #eee2c1; transform: rotate(45deg);
}
/* Keep the single master switch accessible inside whichever native dialog is open. */
dialog .sound-dock { right: max(18px, env(safe-area-inset-right)); }
@media (hover: none), (pointer: coarse), (max-aspect-ratio: 4/3) {
  .office-page .sound-dock { right: max(18px, env(safe-area-inset-right)); bottom: max(72px, calc(env(safe-area-inset-bottom) + 72px)); }
}
