/* The match has an ON/OFF switch; the title only shows a playback recovery button if autoplay is blocked. */
.shogi-sound-toggle {
  position: fixed;
  z-index: 270;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #b7cebb;
  border-radius: 999px;
  background: #24523fed;
  color: #fff9eb;
  box-shadow: 0 3px 12px #0007;
  font: 800 13px/1.3 "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.shogi-sound-toggle[hidden] { display: none !important; }
.shogi-sound-toggle:focus-visible { outline: 3px solid #f4d083; outline-offset: 3px; }
/* The title screen occupies the full viewport and overlays normal page content. */
.shogi-sound-toggle-title {
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 300;
  max-width: calc(100vw - 24px);
  font-size: 12px;
  padding: 8px 12px;
}
/* Keep sound controls in the match layout, not floating over the clock or
   the bottom-right double-tap cut-in skip target. */
.match-info-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  margin: 3px 1px 6px;
}
.match-info-top .opponent-name {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.shogi-sound-toggle-match {
  position: static;
  z-index: auto;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
  box-shadow: 0 2px 6px #0003;
}
body.setup-before-play .match-info-top,
html.encounter-replay:not(.replay-started) .match-info-top {
  display: none !important;
}
@media(max-width:560px){
  .shogi-sound-toggle{min-height:40px;padding:8px 12px;font-size:12px}
  .shogi-sound-toggle-match{min-height:32px;padding:6px 9px;font-size:11px}
}

