/* 音のオン・オフボタン(sound.js が .game-shell の中に置く)。
   はじめの画面では右上、遊んでいる間は吹き出しの下の右端。 */
.sound-toggle{
  position:absolute;z-index:30;
  top:max(var(--space-12,12px),env(safe-area-inset-top));right:12px;
  width:40px;height:40px;padding:0;border-radius:50%;
  display:grid;place-items:center;cursor:pointer;
  background:var(--color-paper-card,#f8ecd5);
  border:2px solid var(--color-palette-003,#9c754b);
  box-shadow:0 2px 0 var(--color-palette-012,#886c4933),0 2px 6px #26170c33;
  color:var(--color-ink-main,#563723);
  -webkit-tap-highlight-color:transparent;
}
.sound-toggle:active{transform:translateY(1px);box-shadow:0 1px 0 var(--color-palette-012,#886c4933)}
.sound-toggle:focus-visible{outline:2px solid var(--color-board-green,#697943);outline-offset:2px}
.sound-toggle-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sound-toggle-icon .speaker{fill:currentColor}
.sound-toggle-icon .cross{display:none}
.sound-toggle.is-off .wave{display:none}
.sound-toggle.is-off .cross{display:inline}
.sound-toggle.is-off{color:var(--color-text-muted,#7a6146)}
/* 遊んでいる間は、上の吹き出しにかからないよう下げる */
.game-shell:has(.wrap.playing) .sound-toggle{top:calc(max(var(--space-12,12px),env(safe-area-inset-top)) + 140px)}
.game-shell.full-ending-scene .sound-toggle{top:max(var(--space-12,12px),env(safe-area-inset-top))}
/* 結果の画面では、上の札にかからないよう右下へ */
.game-shell:has(.wrap.results) .sound-toggle{top:auto;bottom:max(12px,env(safe-area-inset-bottom))}
