/* Sound controls are attached to dialogs, never the hunting map. */
.battle-sound-controls{display:flex;align-items:center;justify-content:center;gap:10px;max-width:100%;margin:12px 0;color:#455c51;text-shadow:none;pointer-events:auto}
.battle-sound-controls button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px 12px;flex-shrink:0;border:1px solid #dce4de;border-radius:20px;background:#fff;color:#455c51;font-size:12px;font-weight:600;line-height:1.3}
.battle-sound-controls button::before{content:'';width:6px;height:6px;border-radius:50%;background:#809c87;flex-shrink:0}
.battle-sound-controls button[aria-pressed="false"]::before{background:#afb8b2}
.battle-sound-controls input[type="range"]{width:86px;min-width:50px;min-height:40px;margin:0;padding:0;accent-color:#63856d;border:0;background:transparent;cursor:pointer}
.battle-sound-controls button:focus-visible,.battle-sound-controls input:focus-visible{outline:3px solid #e3aa64;outline-offset:3px}
.battle-overlay .battle-heading .battle-sound-controls{gap:7px;margin:4px 0 0}
.battle-overlay .battle-sound-controls button{min-height:36px;padding:7px 10px;border-color:#ffffff70;background:#193829e6;color:#fff;font-size:11px;box-shadow:0 2px 8px #10261922}
.battle-overlay .battle-sound-controls input[type="range"]{width:72px;min-height:36px;accent-color:#d8ebcf}
.skill-sound-preview{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 16px;margin-top:18px}
.skill-sound-preview .battle-sound-controls{margin:0}
.skill-sound-preview>.secondary{min-height:40px;padding:9px 14px;font-size:12px}
.menu-sheet>.battle-sound-controls{border-top:1px solid #e4e9e5;margin:16px 0 0;padding-top:16px}
@media(max-width:380px){.battle-overlay .battle-sound-controls{gap:5px}.battle-overlay .battle-sound-controls button{padding:7px 8px;font-size:10px}.battle-overlay .battle-sound-controls input[type="range"]{width:58px}}
@media(max-height:520px) and (orientation:landscape){.battle-overlay .battle-heading .eyebrow{display:none}.battle-overlay .battle-heading .battle-sound-controls{margin-top:0}.battle-overlay .battle-sound-controls button,.battle-overlay .battle-sound-controls input[type="range"]{min-height:30px}}

/* Mobile battle sound lives in a small screen-corner control, clear of the HUD.
   Clear the heading transform before positioning its absolute child. */
@media(max-width:767px), (max-width:1024px) and (max-height:520px) and (hover:none) and (pointer:coarse){
 .battle-overlay .battle-heading:has(>.battle-sound-controls){left:0;right:0;top:max(8px,env(safe-area-inset-top,0px));width:100%;max-width:none;transform:none;box-sizing:border-box;padding:42px 64px 0;gap:2px}
 .battle-overlay .battle-heading:has(>.battle-sound-controls)>.eyebrow{max-width:100%;font-size:9px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .battle-overlay .battle-heading:has(>.battle-sound-controls)>h2{max-width:100%;font-size:18px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .battle-overlay .battle-heading>.battle-sound-controls{position:absolute;left:max(8px,env(safe-area-inset-left,0px));top:0}
 .dialog:has(>.technique-scene) .skill-sound-preview>.battle-sound-controls{position:fixed;left:max(8px,env(safe-area-inset-left,0px));top:max(8px,env(safe-area-inset-top,0px));z-index:20}
 .battle-overlay .battle-heading>.battle-sound-controls,.dialog:has(>.technique-scene) .skill-sound-preview>.battle-sound-controls{justify-content:flex-start;gap:5px;width:max-content;max-width:calc(100vw - max(8px,env(safe-area-inset-left,0px)) - max(64px,env(safe-area-inset-right,0px)));min-height:36px;box-sizing:border-box;margin:0;padding:0 5px;border:1px solid #dce4de;border-radius:20px;background:#ffffffed;color:#455c51;box-shadow:0 2px 9px #10261926;white-space:nowrap;pointer-events:auto}
 .battle-overlay .battle-heading>.battle-sound-controls button,.dialog:has(>.technique-scene) .skill-sound-preview>.battle-sound-controls button{min-height:36px;padding:4px 5px;border:0;border-radius:18px;background:transparent;color:#455c51;font-size:10px;line-height:1.2;gap:4px;box-shadow:none;white-space:nowrap}
 .battle-overlay .battle-heading>.battle-sound-controls button::before,.dialog:has(>.technique-scene) .skill-sound-preview>.battle-sound-controls button::before{width:5px;height:5px}
 .battle-overlay .battle-heading>.battle-sound-controls input[type="range"],.dialog:has(>.technique-scene) .skill-sound-preview>.battle-sound-controls input[type="range"]{width:60px;min-width:50px;min-height:36px;flex:0 0 60px;accent-color:#63856d}
 .battle-overlay .battle-panel:has(.battle-heading>.battle-sound-controls) .fighter-status{top:calc(max(12px,env(safe-area-inset-top,0px)) + 90px)}
 .dialog:has(>.technique-scene){padding-top:max(60px,calc(env(safe-area-inset-top,0px) + 48px))}
}
/* Phone landscape keeps the centered battle title alongside the corner control. */
@media(min-width:568px) and (max-width:767px) and (max-height:520px), (min-width:568px) and (max-width:1024px) and (max-height:520px) and (hover:none) and (pointer:coarse){
 .battle-overlay .battle-heading:has(>.battle-sound-controls){padding-top:4px;min-height:36px}
 .battle-overlay .battle-heading:has(>.battle-sound-controls)>.eyebrow{display:none}
 .battle-overlay .battle-panel:has(.battle-heading>.battle-sound-controls) .fighter-status{top:calc(max(8px,env(safe-area-inset-top,0px)) + 44px)}
}
