/* Weather remains behind controls and never intercepts map/tile input. */
.battle-board-wrap{position:relative;overflow:hidden}
.weather-layer{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden;isolation:isolate}
.weather-layer:before,.weather-layer:after,.weather-particles{content:"";position:absolute;inset:-20%;pointer-events:none}
.weather-layer:before{background:#101b37;opacity:var(--night-opacity,0);transition:opacity 1.8s}
.weather-layer[data-phase=dusk]:before{background:#74341c}
.weather-layer[data-phase=dawn]:before{background:#414661}
.weather-layer[data-weather=rain] .weather-particles,.weather-layer[data-weather=storm] .weather-particles{background-image:linear-gradient(112deg,transparent 47%,#b8d4d858 49%,#b8d4d858 51%,transparent 53%);background-size:29px 63px;opacity:.5;animation:weather-rain .65s linear infinite}
.weather-layer[data-weather=storm] .weather-particles{background-size:21px 57px;opacity:.65;animation-duration:.42s}
.weather-layer[data-weather=fog]:after{background:radial-gradient(ellipse at 20% 60%,#c0c9ba55,transparent 55%),radial-gradient(ellipse at 75% 20%,#bacab73d,transparent 60%);animation:weather-fog 16s ease-in-out infinite alternate}
.weather-layer[data-weather=snow] .weather-particles,.weather-layer[data-weather=ash] .weather-particles{background-image:radial-gradient(#d7dedaba 1px,transparent 2px),radial-gradient(#d7dedaaa 1px,transparent 2px);background-size:53px 67px,89px 71px;background-position:0 0,24px 30px;animation:weather-snow 6s linear infinite}
.weather-layer[data-weather=ash] .weather-particles{opacity:.6;filter:sepia(1);animation-duration:9s}
.weather-layer[data-weather=indoors] .weather-particles{display:none}
.weather-layer.weather-still .weather-particles,.weather-layer.weather-still:after{animation:none;opacity:.2}
#battle-turn-flash{z-index:3}
@keyframes weather-rain{to{transform:translate(-29px,63px)}}
@keyframes weather-snow{to{transform:translate(53px,67px)}}
@keyframes weather-fog{to{transform:translate(5%,3%)}}
@media(prefers-reduced-motion:reduce){.weather-particles,.weather-layer:after{animation:none!important;opacity:.2}}
.sound-button{min-width:32px;min-height:30px;padding:3px 6px;font-size:16px;flex-shrink:0}
.sound-dialog,.weather-dialog{max-width:680px;line-height:1.5}
.sound-dialog button,.weather-dialog button{width:auto;margin:0;background:#303c2c;color:#dce3c6;border-color:#708060 #182218 #182218 #708060}
.sound-dialog>header,.weather-dialog>header{height:auto;min-height:0;padding-left:0;padding-right:0}
.sound-dialog>header>div,.weather-dialog>header>div{flex:1;min-width:0}
.sound-dialog>header button,.weather-dialog>header button{flex:0 0 auto;padding:6px 12px}
.audio-meter{display:flex;align-items:center;gap:8px;font-size:10px;color:#a4b594;margin-top:6px;white-space:nowrap}.audio-meter meter{width:auto;min-width:0;flex:1;height:8px}
.game-hud #clock{cursor:pointer;border-bottom:1px dotted #a4b18b;flex-shrink:0}
.sound-dialog,.weather-dialog{color:#d7dcc9;background:#171e19;border:2px solid #68715b;padding:20px;width:min(680px,94vw);max-height:92dvh;box-shadow:0 0 0 4px #0b100e,0 15px 70px #000a}
.sound-dialog::backdrop,.weather-dialog::backdrop{background:#050b08ba}
.sound-dialog header,.weather-dialog header{display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid #4c5947;padding-bottom:10px;margin-bottom:14px}
.sound-dialog header h2,.weather-dialog header h2{margin:0;font-size:20px}.sound-dialog header small,.weather-dialog header small{font-size:9px;letter-spacing:2px;color:#9aab8b}
.sound-dialog header button,.weather-dialog header button{min-height:36px;min-width:44px}
.sound-content{display:grid;grid-template-columns:1.15fr 1fr;gap:20px}.sound-sliders label{display:grid;grid-template-columns:1fr 42px;gap:5px;padding:5px 0;font-size:13px}.sound-sliders output{text-align:right;color:#c6bb86}.sound-sliders input{grid-column:1/-1;width:100%;height:24px;accent-color:#b9be91;cursor:pointer}
.sound-options{display:flex;flex-direction:column;gap:10px;font-size:12px}.sound-options button{min-height:34px}.sound-options label{line-height:1.7}.sound-options input{accent-color:#b9be91}.sound-options p{color:#a3ac98;line-height:1.6;margin:0}.sound-tests{display:grid;grid-template-columns:1fr 1fr;gap:6px}.sound-tests button{font-size:11px;padding:6px}.sound-options a{color:#bcc59f}.sound-status{font-size:11px;color:#abb998;line-height:1.5;margin:12px 0 0;border-top:1px solid #414d3b;padding-top:10px}
.weather-current{display:flex;align-items:center;gap:20px}.weather-glyph{font-size:56px;color:#b8c5a9}.weather-current h2{margin:5px 0;font-size:28px}.weather-current h2 b{font-weight:400;color:#b9ab84}.weather-current p,.weather-current small{color:#aebba4;margin:0;font-size:12px}#weather-description{font-size:13px;line-height:1.6}#weather-body{display:grid;grid-template-columns:1fr 1fr;gap:20px;background:#222c22;padding:12px}#weather-body>div{display:grid;grid-template-columns:1fr auto;gap:8px;font-size:12px}#weather-body progress,#weather-body small{grid-column:1/-1;width:100%;accent-color:#87afbb}#weather-body small{color:#aebba4;line-height:1.5}.weather-forecast{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.weather-forecast>div{display:grid;gap:7px;border:1px solid #414d3b;padding:10px}.weather-forecast small{font-size:10px;color:#aebba4}.weather-forecast strong{font-size:14px}.weather-forecast span{font-size:12px;color:#c2b790}.weather-footnote{font-size:11px;color:#9bab90;line-height:1.5}
@media(orientation:landscape){.landscape-shell>.game-hud{gap:calc(8 * var(--scene-u))!important}.sound-button{font-size:calc(15 * var(--scene-u));width:calc(32 * var(--scene-u));min-height:calc(30 * var(--scene-u));padding:2px}.sound-dialog,.weather-dialog{padding:14px 18px;max-height:94dvh}.weather-current h2{font-size:22px}.weather-glyph{font-size:40px}.weather-dialog header{margin-bottom:8px;padding-bottom:6px}.weather-forecast>div{padding:7px}.weather-dialog h3{margin:10px 0;font-size:13px}}
@media(max-width:500px) and (orientation:portrait){.sound-content{grid-template-columns:1fr}.weather-forecast{gap:4px}#weather-body{gap:10px}}
@media(orientation:landscape){.landscape-shell .battle-header{display:grid;grid-template-columns:minmax(0,1fr) calc(32 * var(--scene-u));gap:0 calc(5 * var(--scene-u))}.landscape-shell .battle-header>div:first-child{grid-column:1;min-width:0}.landscape-shell .battle-header h2{overflow:hidden;text-overflow:ellipsis}.landscape-shell .battle-header .sound-button{grid-column:2;grid-row:1/3;min-height:0;height:calc(30 * var(--scene-u))}.landscape-shell .battle-header .battle-round{grid-column:1;text-align:left;font-size:calc(9 * var(--scene-u))}}
@media(orientation:landscape) and (max-height:500px){
 .sound-dialog{padding:10px 16px}.sound-dialog header{margin-bottom:8px;padding-bottom:6px}.sound-dialog header h2{font-size:18px}.sound-dialog button{padding:5px 10px;line-height:1.3;min-height:30px}.sound-options{gap:6px}.sound-sliders label{padding:3px 0;gap:0;font-size:12px}.sound-sliders input{height:20px}.sound-status{margin-top:8px;padding-top:6px}.sound-dialog .audio-meter{margin-top:3px}
 .weather-dialog{padding:10px 16px}.weather-dialog header{margin-bottom:6px;padding-bottom:5px}.weather-dialog header h2{font-size:18px}.weather-current h2{font-size:20px;margin:3px 0}.weather-current .weather-glyph{font-size:32px}.weather-current p,.weather-current small{font-size:11px}#weather-description{margin:8px 0;font-size:12px;line-height:1.4}#weather-body{padding:8px}.weather-dialog h3{margin:6px 0}.weather-forecast>div{padding:6px;gap:3px}.weather-footnote{margin:6px 0 0;font-size:10px!important}
}
