.battle-screen{--battle-gold:#e2c58b;max-width:1120px;margin:auto}.battle-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:5px 0 22px}.battle-overline{font:9px/1.5 Arial,sans-serif;letter-spacing:1.8px;color:#ac9773;text-transform:uppercase}.battle-heading h1{font:500 33px/1.2 var(--font-body);color:#e8d7b5;margin:8px 0}.battle-heading p{font:12px Arial,sans-serif;color:#8fa496;margin:0}.battle-heading p b{color:#d1ba90;font-weight:400}.battle-back{display:flex;align-items:center;gap:7px;font:11px Arial,sans-serif;color:#c8b58e;min-height:44px}.battle-back rpg-icon{width:18px;height:18px}.battle-dashboard{display:flex;align-items:center;gap:25px;background:linear-gradient(110deg,#22312cbb,#142126);border:1px solid #9c80564d;border-radius:10px;padding:15px 20px;margin-bottom:17px}.battle-ap{display:grid;grid-template-columns:auto auto;align-items:center;column-gap:18px}.battle-ap>span{font:11px Arial,sans-serif;color:#b8b8a3}.ap-gems{display:flex;gap:7px;grid-row:2;margin-top:9px}.ap-gems i{width:11px;height:11px;transform:rotate(45deg);border:1px solid #8f785044;background:#0c1717}.ap-gems .filled{background:linear-gradient(135deg,#f4dba0,#a6874d);border-color:#efd899;box-shadow:0 0 8px #c4aa5733}.battle-ap>strong{grid-column:2;grid-row:1/3;font:500 32px var(--font-body);color:#ecd6a4}.battle-ap strong small{font:11px Arial,sans-serif;color:#81938b;margin-left:5px}.battle-move-budget{display:flex;align-items:center;gap:10px;border-left:1px solid #90785244;padding-left:25px;color:#8fbaa3}.battle-move-budget>rpg-icon{width:24px;height:24px}.battle-move-budget span{font:11px/1.5 Arial,sans-serif;color:#9aa99b}.battle-move-budget b{font-weight:400;color:#dbcaab;margin-left:7px}.battle-move-budget small{display:block;color:#78968a;font-size:10px;margin-top:3px}.battle-resources{margin-left:auto;display:flex;gap:17px;flex-wrap:wrap;font:11px Arial,sans-serif}.battle-resources span{display:flex;gap:5px;align-items:center}.battle-resources rpg-icon{width:15px;height:15px}.battle-resources .hp{color:#e19a84}.battle-resources .mana{color:#82b5cf}.battle-resources .stamina{color:#e0bd75}.battle-field-panel{overflow:hidden;padding:0;border-radius:12px}.battle-field-toolbar{display:flex;align-items:center;justify-content:space-between;padding:8px 18px;background:#101c20}.battle-field-toolbar>span{display:flex;gap:8px;align-items:center;font:10px Arial,sans-serif;letter-spacing:1.5px;color:#c8b790}.battle-field-toolbar small{font-size:9px;letter-spacing:0;color:#6e8a7a;margin-left:5px}.battle-live-dot{width:5px;height:5px;background:#88b995;border-radius:50%;box-shadow:0 0 7px #87bd8e88}.battle-text-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;background:none;padding:7px 2px;font:11px Arial,sans-serif;color:#b6b49b}.battle-text-button rpg-icon{width:16px;height:16px}.battle-board-scroll{overflow:auto;max-height:70vh;background:#253c2d;scrollbar-color:#947c50 #132620;overscroll-behavior:contain}.battle-map{display:block;width:100%;min-width:740px;height:auto;isolation:isolate}.battle-board-scroll.overview .battle-map{min-width:0}.battle-cell{cursor:pointer;outline:none}.battle-cell polygon{stroke:#efdfb440;stroke-width:1.1;fill:#07251e05;transition:fill .12s,stroke .12s}.battle-cell.reachable polygon{fill:#558e6057;stroke:#e2ddab62}.battle-cell.cost-2 polygon{fill:#b1994742}.battle-cell.cost-3 polygon{fill:#bd7f3542}.battle-cell.blocked polygon{fill:#1825205c;stroke:#7c91834d}.battle-cell.enemy-cell polygon{fill:#9f302f5c;stroke:#c579655e}.battle-cell.hero-cell polygon{fill:#4f9b8f55;stroke:#dce6bca3;stroke-width:2}.battle-cell:hover polygon,.battle-cell:focus-visible polygon{fill:#cfb97777;stroke:#ffe6ac;stroke-width:2}.battle-cell.selected polygon{stroke:#ffe7a9;stroke-width:2;fill:#c6aa435c}.cell-price{font:12px Arial,sans-serif;fill:#e4e3bfad;pointer-events:none;paint-order:stroke;stroke:#1d3326;stroke-width:2px}.battle-route-line,.battle-route-halo{fill:none;stroke-linejoin:round;stroke-linecap:round;pointer-events:none}.battle-route-halo{stroke:#e6d197;stroke-width:10;opacity:.3;filter:url(#route-glow)}.battle-route-line{stroke:#ffdda0;stroke-width:3;stroke-dasharray:7 6}.route-step circle{fill:#293b2c;stroke:#f5dba2;stroke-width:1.5}.route-step text{fill:#ffe8ae;font:9px Arial,sans-serif}.destination-ring{fill:#ecd09220;stroke:#ffdf91;stroke-width:2.5;pointer-events:none}.unit-shadow{fill:#06120bc9}.unit-ring{fill:#253c2eea;stroke:#bcddc6;stroke-width:2}.enemy .unit-ring{fill:#422c27eb;stroke:#d7977d}.unit-health{fill:#8ec798}.enemy .unit-health{fill:#cf7f69}.unit-label{fill:#f0e0bb;font:bold 10px Arial,sans-serif;paint-order:stroke;stroke:#12201a;stroke-width:3px}.battle-legend{display:flex;flex-wrap:wrap;align-items:center;gap:15px;padding:12px 18px;background:#142125;border-top:1px solid #a0814c33;font:10px Arial,sans-serif;color:#aeb69e}.battle-legend>span{display:flex;align-items:center;gap:5px}.battle-legend i{width:8px;height:8px;border:1px solid #dad6ad66;transform:rotate(30deg);border-radius:2px}.legend-one{background:#4e8360}.legend-two{background:#ac974d}.legend-three{background:#ad7c39}.legend-enemy{background:#a25749}.battle-legend small{font:9px Arial,sans-serif;color:#779084;margin-left:auto}.battle-route-summary{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:19px;background:linear-gradient(110deg,#23342b,#142126);border-top:1px solid #a0814c33;min-height:101px}.battle-route-summary>div{min-width:0}.battle-route-summary .battle-overline{font-size:9px;letter-spacing:1px}.battle-route-summary strong{display:block;margin:6px 0;color:#edd7ac;font:500 21px/1.2 var(--font-body)}.battle-route-summary strong span{color:#8fa292;font-size:14px}.battle-route-summary small{font:10px/1.5 Arial,sans-serif;color:#9eae9d;display:block}.battle-route-summary .game-button{flex:none;min-width:112px}.battle-bottom{display:grid;grid-template-columns:1fr auto;align-items:start;gap:20px;padding:23px 2px 0}.battle-log{list-style:none;padding:0;margin:10px 0 0;font:11px/1.7 Arial,sans-serif;color:#82988c}.battle-log li+li{margin-top:4px;color:#6d8378}.battle-turn-actions{display:flex;flex-direction:column;align-items:center;gap:3px}.battle-turn-actions .game-button{font-size:13px}.battle-demo-note{font:10px/1.7 Arial,sans-serif;color:#758a7c;padding-top:15px;border-top:1px solid #a5805022;margin-top:19px}
@media(max-width:600px){.battle-heading{gap:12px;margin-bottom:16px}.battle-heading h1{font-size:27px}.battle-heading .battle-overline{font-size:8px;letter-spacing:1.4px}.battle-heading p{font-size:10px}.battle-back{font-size:0}.battle-back rpg-icon{width:23px;height:23px}.battle-dashboard{padding:13px 12px;gap:15px;flex-wrap:wrap}.battle-ap{column-gap:16px}.battle-ap>span{font-size:10px}.battle-move-budget{padding-left:15px;gap:6px}.battle-move-budget>rpg-icon{width:20px;height:20px}.battle-move-budget span{font-size:10px}.battle-move-budget b{margin-left:2px}.battle-resources{margin:0;border-top:1px solid #92784b22;width:100%;padding-top:10px;justify-content:space-between}.battle-field-toolbar{padding:5px 12px}.battle-board-scroll{max-height:59vh}.battle-legend{padding:10px 12px;gap:12px;font-size:9px}.battle-legend small{width:100%;margin:0;font-size:8px}.battle-route-summary{padding:14px 12px;gap:9px}.battle-route-summary strong{font-size:18px}.battle-route-summary .battle-overline{font-size:8px}.battle-route-summary small{font-size:9px}.battle-route-summary .game-button{min-width:83px;font-size:13px;padding:10px 12px}.battle-bottom{grid-template-columns:1fr;gap:15px;padding-top:17px}.battle-turn-actions{flex-direction:row;justify-content:space-between}.battle-turn-actions .game-button{font-size:12px}.battle-log{font-size:10px}.battle-demo-note{font-size:9px}.lab-bar{height:auto;min-height:70px;flex-wrap:wrap;padding-block:10px;gap:7px}.lab-bar .screen-switch{flex-wrap:wrap}.lab-bar .screen-switch a{padding:10px 7px;font-size:10px}.lab-brand{letter-spacing:1px}}
@media(prefers-reduced-motion:reduce){.battle-cell polygon{transition:none}}
/* Three provisional skills share a single definition and targeting flow. */
.battle-skills-panel{padding:16px 18px 13px;margin-bottom:17px}.battle-skills-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:12px}.battle-skills-heading h2{font:500 20px var(--font-body);margin:4px 0 0;color:#e4cea8}.battle-skills-heading .active{color:#a9d6bd}.battle-skills{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.battle-skill{display:flex;align-items:center;gap:12px;min-width:0;text-align:left;padding:11px;background:linear-gradient(130deg,#28362f99,#142126);border:1px solid #a5805044;border-radius:8px;min-height:89px}.battle-skill:not(:disabled):hover{border-color:#c9b07c;background:#2e4036}.battle-skill.active{border-color:#e3c590;box-shadow:0 0 0 1px #b08e4c66;background:linear-gradient(130deg,#4b453088,#1d302b)}.battle-skill-art{position:relative;display:block;width:54px;height:54px;flex:none}.battle-skill-art img{width:100%;height:100%;object-fit:cover;display:block;border:1px solid #c0a16b88;border-radius:6px}.battle-skill-art>small{position:absolute;bottom:-5px;right:-5px;background:#15221e;border:1px solid #8a7851;border-radius:4px;color:#e6cd97;padding:1px 4px;font:9px Arial,sans-serif}.battle-skill-copy{display:flex;flex-direction:column;gap:6px;min-width:0}.battle-skill-copy strong{font:500 17px/1.2 var(--font-body);color:#e8d7b4}.battle-skill-copy small{font:10px/1.4 Arial,sans-serif;color:#b7c2a6}.battle-skill-copy em{font:9px/1.4 Arial,sans-serif;color:#829c8e;font-style:normal}.battle-skills-note{font:10px/1.65 Arial,sans-serif;color:#8da493;margin:12px 0 0}.battle-cell.skill-range polygon{fill:#b59d4c24;stroke:#d5c98c80}.battle-cell.valid-target.enemy-cell polygon{fill:#c16c364f;stroke:#f7be7b;stroke-width:2}.battle-cell.valid-target.selected polygon{fill:#dfb85a5c;stroke:#ffe3a0;stroke-width:2.5}.battle-area-preview{fill:#7dc7e357;stroke:#b6ecf2;stroke-width:1.5;pointer-events:none}.unit-hp{fill:#edd5b0;font:8px Arial,sans-serif;paint-order:stroke;stroke:#14221c;stroke-width:3px}.battle-fallen{opacity:.8}.battle-fallen path{fill:none;stroke:#a4aa92;stroke-width:3}.battle-fallen text{fill:#bbc4b0;font:8px Arial,sans-serif;paint-order:stroke;stroke:#13231a;stroke-width:3px}.battle-cast-effect path{stroke:#ffd58b;stroke-width:6;stroke-linecap:round;filter:drop-shadow(0 0 5px #f5883288);animation:cast-flash .6s ease-out}.battle-cast-effect.fireball path{stroke:#ffb25a;stroke-width:9}.battle-cast-effect polygon{fill:#8ccee64d;stroke:#c2f5ff;stroke-width:2;animation:cast-flash .7s ease-out}.battle-cast-effect text{fill:#ffdaa3;font:bold 13px Arial,sans-serif;paint-order:stroke;stroke:#283024;stroke-width:4px;animation:damage-flash .5s ease-out}.skill-target-summary .game-button{min-width:125px}.battle-victory{color:#b8d99e!important}.battle-skills-panel:has(.battle-skill.active) .battle-skills-heading h2{color:#f0d7a6}@keyframes cast-flash{from{opacity:0}35%{opacity:1}to{opacity:.7}}@keyframes damage-flash{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.battle-skills-panel{padding:12px}.battle-skills{gap:7px}.battle-skill{flex-direction:column;align-items:flex-start;padding:9px 7px;gap:9px;min-height:137px}.battle-skill-art{width:46px;height:46px;align-self:center}.battle-skill-copy{gap:5px;width:100%;text-align:center}.battle-skill-copy strong{font-size:12px;min-height:29px}.battle-skill-copy small{font-size:9px}.battle-skill-copy em{font-size:8px}.battle-skills-note{font-size:9px}.battle-skills-heading h2{font-size:18px}.battle-skills-heading .battle-text-button{font-size:10px}.skill-target-summary{align-items:flex-start;flex-wrap:wrap}.skill-target-summary>div{flex:1;min-width:170px}.skill-target-summary .game-button{min-width:110px}.skill-target-summary strong{font-size:18px}}
@media(prefers-reduced-motion:reduce){.battle-cast-effect *{animation:none!important}}
/* Test projectile: one flight, followed by a brief impact. */
.battle-cast-effect.fireball .fireball-flight{animation:fireball-flight 700ms cubic-bezier(.3,.05,.7,.95) both;filter:drop-shadow(0 0 7px #ff7a16)}
.battle-cast-effect.fireball .fireball-tail{fill:#ff7215;stroke:none;filter:none;animation:none}
.fireball-halo{fill:#ff6b1b55}.fireball-core{fill:#ffb52e}.fireball-heart{fill:#fff3ba}.fireball-spark{fill:#ffd86b}
.fireball-impact{animation:fireball-impact 450ms ease-out both;transform-box:fill-box;transform-origin:center;filter:drop-shadow(0 0 8px #ff7c22)}
.fireball-impact-ring{fill:#ff8f2444;stroke:#ffd274;stroke-width:2}.fireball-impact-core{fill:#ffe6a0}
.battle-cast-effect.fireball .fireball-impact-rays{stroke:#ffbd5e;stroke-width:3;filter:none;animation:none}
@keyframes fireball-flight{0%{opacity:0;transform:translate(0,0)}8%{opacity:1}95%{opacity:1}100%{opacity:0;transform:translate(var(--flight-x),var(--flight-y))}}
@keyframes fireball-impact{0%{opacity:0;transform:scale(.4)}12%{opacity:1}100%{opacity:0;transform:scale(2.7)}}
@keyframes fireball-damage{0%,53%{opacity:0;transform:translateY(6px)}65%,85%{opacity:1}100%{opacity:0;transform:translateY(-12px)}}
@media(prefers-reduced-motion:reduce){.battle-cast-effect.fireball .fireball-flight{display:none}.battle-cast-effect.fireball .fireball-impact{animation:fireball-impact 200ms ease-out both!important;animation-delay:0ms!important}.battle-cast-effect.fireball text{animation:none!important}}
/* Short local effects for the two other test skills. */
.melee-swipe{animation:melee-swipe 450ms ease-out both;filter:drop-shadow(0 0 5px #ffda98)}
.battle-cast-effect .melee-swipe-glow{fill:#ffe3a078;stroke:none;animation:none;filter:none}
.battle-cast-effect .melee-swipe-core{fill:none;stroke:#fff2d1;stroke-width:3;animation:none;filter:none}
.battle-cast-effect .melee-impact{stroke:#ffdc91;stroke-width:2;animation:none;filter:none}
.frost-wave{animation:frost-wave 750ms ease-out both;fill:#a4e9ff18;stroke:#bbf3ff;stroke-width:2;filter:drop-shadow(0 0 5px #6dc9f4)}
.frost-wave-inner{stroke:#d8fbff88;stroke-width:1}
.frost-shards{animation:frost-shards 650ms ease-out both;filter:drop-shadow(0 0 4px #73d4ff)}
.battle-cast-effect .frost-shards polygon{fill:#c9f5ff;stroke:#77cbea;stroke-width:1;animation:none}
.battle-cast-effect .frost-shards .frost-shard-side{fill:#84ceeeaa}
@keyframes melee-swipe{0%{opacity:0;transform:translateX(-14px) rotate(-35deg)}25%{opacity:1}100%{opacity:0;transform:translateX(9px) rotate(30deg)}}
@keyframes frost-wave{0%{opacity:0;transform:scale(.08)}15%{opacity:.9}100%{opacity:0;transform:scale(1.45)}}
@keyframes frost-shards{0%{opacity:0;transform:translateY(10px) scale(.3)}25%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-16px) scale(.7)}}
@keyframes melee-damage{0%,25%{opacity:0;transform:translateY(6px)}40%,75%{opacity:1}100%{opacity:0;transform:translateY(-12px)}}
@keyframes frost-damage{0%,30%{opacity:0;transform:translateY(6px)}50%,80%{opacity:1}100%{opacity:0;transform:translateY(-12px)}}
@media(prefers-reduced-motion:reduce){.battle-cast-effect .melee-swipe,.battle-cast-effect .frost-wave,.battle-cast-effect .frost-shards{animation:quiet-effect 200ms ease-out both!important;animation-delay:0ms!important}@keyframes quiet-effect{from{opacity:.7}to{opacity:0}}}

.battle-field-panel+.battle-skills-panel{margin-top:17px;margin-bottom:0}#battle-route-panel:empty{display:none}
/* Unified controls below the battle map. */
.battle-controls{position:relative;padding:14px 16px;margin-top:12px}.battle-control-status{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-bottom:12px;border-bottom:1px solid #a18c5533}.battle-control-ap{display:grid;grid-template-columns:auto auto;gap:4px 12px;align-items:center}.battle-control-ap>span{font:10px Arial,sans-serif;color:#aabb9e}.battle-control-ap>strong{font:26px/1 var(--font-body);color:#eed5a0;grid-column:2;grid-row:1/3}.battle-control-ap strong small{font:10px Arial,sans-serif;color:#8fa38a;margin-left:4px}.battle-control-ap .ap-gems{grid-row:2;margin-top:2px;gap:6px}.battle-control-ap .ap-gems i{width:8px;height:8px}.battle-control-resources{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px 17px;font:11px Arial,sans-serif;color:#b6c1a6}.battle-control-resources>span{display:flex;align-items:center;gap:5px}.battle-control-resources rpg-icon{width:14px;height:14px}.battle-control-resources .hp{color:#e0a08c}.battle-control-resources .mana{color:#8ac1d8}.battle-control-resources .stamina{color:#dfc181}.battle-control-resources>small{flex-basis:100%;text-align:right;font:9px Arial,sans-serif;color:#8da28b}.battle-control-resources b{font-weight:400;color:#c9c8aa}.battle-command-row{display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr 1.4fr;gap:8px;margin-top:12px}.battle-command{min-width:0;min-height:76px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;padding:9px 5px;border-radius:8px;border:1px solid #b59c6155;background:linear-gradient(145deg,#2d4032,#1b2c25);color:#dfcda6}.battle-command rpg-icon{width:21px;height:21px}.battle-command>span{font:12px/1.2 var(--font-body);text-align:center}.battle-command>small{font:9px/1.3 Arial,sans-serif;text-align:center;color:#9fb399}.battle-command>img{width:29px;height:29px;border-radius:6px;border:1px solid #c0a36c88}.battle-command:disabled{opacity:.4}.battle-command:disabled img{filter:grayscale(.6)}.battle-command:not(:disabled):hover,.battle-command.active{background:#40573d;border-color:#d6bd80}.battle-command-skill:not(:disabled){border-color:#cbb778;background:linear-gradient(145deg,#3b654c,#203e31)}.battle-command-end{border-color:#b29d6255}.battle-command-end.suggested{border-color:#ead49a;background:#3a5941}.battle-selection-line{margin-top:11px;display:flex;align-items:baseline;gap:10px;min-height:16px}.battle-selection-line>strong{font:12px var(--font-body);color:#d7c69e}.battle-selection-line>small{font:10px/1.5 Arial,sans-serif;color:#8fa68f}.battle-skill-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;border-top:1px solid #a18c5533;margin-top:12px;padding-top:12px}.battle-skill-option{display:flex;align-items:center;gap:9px;min-width:0;padding:9px;border:1px solid #9d875444;border-radius:7px;background:#1c3026;color:#e0cba1;text-align:left;min-height:60px}.battle-skill-option img{width:40px;height:40px;border-radius:6px;flex:none}.battle-skill-option span{min-width:0;flex:1}.battle-skill-option strong{font:13px/1.2 var(--font-body);display:block}.battle-skill-option small{font:9px/1.5 Arial,sans-serif;color:#9aad94;display:block;margin-top:5px}.battle-skill-option.active{border-color:#e2c88b;background:#344a32}.battle-skill-option:disabled{opacity:.4}.battle-skill-option>rpg-icon{width:16px;height:16px;color:#d8c692}.battle-inspection{display:flex;align-items:center;gap:10px;padding:12px;margin-top:10px;background:#1c3126;border-radius:7px}.battle-inspection p{font:11px/1.6 Arial,sans-serif;color:#c0c7ac;margin:0}.battle-inspection>rpg-icon{width:20px;color:#dcc58b;flex:none}.battle-camera-overlay{position:absolute;top:9px;right:9px;z-index:5}.battle-camera-overlay .map-camera-controls{padding:3px;border-radius:8px;background:#15271d8c;gap:2px;opacity:.78;transition:opacity .15s}.battle-camera-overlay:hover .map-camera-controls,.battle-camera-overlay:focus-within .map-camera-controls{opacity:1}.battle-camera-overlay .map-camera-controls button{width:29px;min-height:30px;background:#1b302599;border-color:#9b906644}.battle-camera-overlay .map-camera-controls rpg-icon{width:14px;height:14px}.battle-camera-overlay .map-camera-controls span{font-size:9px;min-width:31px}.battle-bottom>.battle-text-button{align-self:start;justify-self:end}
@media(max-width:600px){.battle-controls{padding:11px 10px;margin-top:9px}.battle-control-status{gap:10px}.battle-control-ap{column-gap:8px}.battle-control-ap>span{font-size:9px}.battle-control-ap>strong{font-size:25px}.battle-control-resources{gap:7px 10px;font-size:9px}.battle-control-resources rpg-icon{width:12px;height:12px}.battle-control-resources>small{font-size:8px}.battle-command-row{gap:5px;grid-template-columns:1.15fr 1fr 1fr 1fr 1.3fr}.battle-command{padding:7px 3px;min-height:77px;gap:5px}.battle-command>span{font-size:10px}.battle-command>small{font-size:8px}.battle-command>rpg-icon{width:20px;height:20px}.battle-command>img{width:26px;height:26px}.battle-selection-line{flex-direction:column;gap:4px}.battle-selection-line>strong{font-size:11px}.battle-selection-line>small{font-size:9px}.battle-skill-picker{grid-template-columns:1fr}.battle-skill-option img{width:36px;height:36px}.battle-camera-overlay .map-camera-controls button{width:28px;min-height:30px}.battle-bottom>.battle-text-button{justify-self:start}}
.battle-control-ap{flex-shrink:0}.battle-control-ap>span,.battle-control-ap>strong{white-space:nowrap}
.battle-command-row{grid-auto-rows:90px}.battle-selection-line{min-height:32px}@media(max-width:600px){.battle-command-row{grid-auto-rows:96px}.battle-selection-line{min-height:40px}}
/* Skill selection floats above the controls without changing their height. */
.battle-controls{overflow:visible;z-index:10}.battle-controls .battle-skill-picker{position:absolute;bottom:calc(100% + 8px);right:10px;width:min(360px,calc(100% - 20px));max-height:min(360px,55dvh);overflow-y:auto;overscroll-behavior:contain;grid-template-columns:1fr;margin:0;padding:10px;gap:7px;border:1px solid #c4a775;border-radius:10px;background:linear-gradient(135deg,#263c30,#15271f);box-shadow:0 8px 28px #0009;z-index:20}
.map-camera-disclosure{display:flex;align-items:center;gap:4px}.battle-camera-overlay .map-camera-controls[hidden]{display:none}.battle-camera-overlay .map-camera-toggle{display:grid;place-items:center;width:30px;height:30px;min-height:30px;border:1px solid #9b906655;border-radius:7px;background:#15271da6;color:#dcc58d;opacity:.8}.battle-camera-overlay .map-camera-toggle rpg-icon{width:15px;height:15px}.battle-camera-overlay .map-camera-toggle:hover,.battle-camera-overlay .map-camera-toggle[aria-expanded=true]{opacity:1;background:#263e2ee6}
.battle-control-resources{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:1;max-width:620px;gap:7px 15px}.battle-control-resources resource-bar{min-width:0}.battle-control-resources .resource-caption{font:10px Arial,sans-serif;letter-spacing:0;gap:6px;margin-bottom:5px}.battle-control-resources .resource-caption em{font-size:9px}.battle-control-resources .resource-track{height:7px}.battle-control-resources>small{grid-column:1/-1}.battle-control-resources .stamina .resource-fill{background:linear-gradient(#eed18b,#b28b42 50%,#d9b963);box-shadow:0 0 10px #d9b96355}@media(max-width:600px){.battle-control-resources{gap:7px;grid-template-columns:1fr}.battle-control-resources resource-bar{display:grid;grid-template-columns:102px minmax(0,1fr);align-items:center;gap:7px}.battle-control-resources .resource-caption{font-size:8px;margin:0;gap:3px}.battle-control-resources .resource-caption em{font-size:8px}.battle-control-resources .resource-track{height:6px}}
.battle-controls .battle-inspection{position:absolute;bottom:calc(100% + 8px);right:10px;width:min(360px,calc(100% - 20px));max-height:55dvh;overflow-y:auto;overscroll-behavior:contain;display:block;margin:0;padding:12px 14px;border:1px solid #c4a775;border-radius:10px;background:linear-gradient(135deg,#263c30,#15271f);box-shadow:0 8px 28px #0009;z-index:20}.battle-inspection-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.battle-inspection-heading strong{font:15px var(--font-body);color:#e0cba1}.battle-inspection-heading button{display:grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid #9d875444;border-radius:6px;background:#15271f;color:#dfcda6;font:24px/1 Arial,sans-serif}
.battle-command-row{grid-template-columns:1.2fr 1fr 1fr 1fr 1fr 1.4fr}.quick-slot-number{font:10px Arial,sans-serif;color:#b5a177}.battle-quick-setup{padding:9px 4px;text-align:center;color:#d6bd80;font-size:12px}@media(max-width:600px){.battle-command-row{grid-template-columns:1.15fr .85fr 1fr 1fr 1fr 1.2fr;gap:4px}.battle-command>span{font-size:9px}.battle-command>small{font-size:8px}.battle-command{padding-inline:2px}}
.battle-scene-toggle{display:grid;place-items:center;width:30px;height:30px;border:1px solid #9b906655;border-radius:7px;background:#15271da6;color:#dcc58d}.battle-scene-toggle rpg-icon{width:16px;height:16px}.battle-camera-overlay{display:flex;gap:5px;align-items:start}.battle-scene-editor{position:absolute;bottom:calc(100% + 8px);right:10px;width:min(420px,calc(100% - 20px));max-height:55dvh;overflow:auto;overscroll-behavior:contain;z-index:30;padding:12px;border:1px solid #c4a775;border-radius:10px;background:linear-gradient(135deg,#263c30,#15271f);box-shadow:0 8px 28px #0009}.battle-scene-editor header{display:flex;justify-content:space-between;align-items:center;gap:10px}.battle-scene-editor header strong,.battle-scene-editor header small{display:block}.battle-scene-editor header small{font:8px Arial,sans-serif;color:#9bab90;letter-spacing:1px;margin-bottom:6px}.battle-scene-editor header strong{font-size:17px;color:#e0cba1}.battle-scene-editor header>button{width:36px;height:36px;border:1px solid #9d875444;border-radius:6px;background:#15271f;color:#dfcda6;font:24px Arial,sans-serif;flex:none}.battle-scene-editor p{font:11px/1.6 Arial,sans-serif;color:#b5c1a4}.battle-scene-editor>small{font:10px Arial,sans-serif;color:#aab798}.scene-edit-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:10px}.scene-edit-actions .game-button{font-size:11px;min-height:40px}.scene-filters{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:10px 0}.scene-filters input,.scene-filters select{min-width:0;width:100%;height:36px;padding:6px;border:1px solid #9d875455;border-radius:6px;background:#15271f;color:#d4c6a4;font:11px Arial,sans-serif}.scene-catalog{display:grid;gap:6px}.scene-catalog>button{display:flex;gap:10px;align-items:center;text-align:left;padding:8px;border:1px solid #9d875444;border-radius:7px;background:#1a3024;color:#e0cba1}.scene-catalog svg{width:44px;height:48px;flex:none}.scene-catalog strong{font-size:13px}.scene-catalog small{display:block;font:10px/1.5 Arial,sans-serif;color:#a0b296;margin-top:4px}.scene-hit{fill:#10241901;stroke:transparent;stroke-width:2}.scene-selected>.scene-hit{stroke:#ebd190;fill:#ebd19015}.scene-facing{fill:#e6c780;stroke:#243526;stroke-width:1}.scene-preview{opacity:.5}.scene-preview .scene-hit{stroke:#e6c780;stroke-dasharray:4 3}.battle-scene-object{cursor:pointer}.battle-scene-object:focus-visible>.scene-hit{stroke:#ebd190}
@media(hover:hover) and (pointer:fine){.battle-scene-toggle{display:none}}
.battle-control-fields{display:contents;border:0;padding:0;margin:0;min-width:0}.battle-cast-effect .battle-damage-popup{animation:battle-damage-popup 800ms ease-out both}@keyframes battle-damage-popup{0%,55%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-24px)}}
.battle-scene-object .scene-visual{pointer-events:none}.battle-scene-object>.scene-hit{pointer-events:all}

.scene-footprint{fill:#8ad8b12b;stroke:#b3ebcd;stroke-width:2;stroke-dasharray:5 3;pointer-events:none}.scene-footprint.invalid{fill:#d861542b;stroke:#e59480}

/* Ground vegetation has no floating shadow; SVG drop filters can clip distant ground sprites. */
.battle-scene-object.scene-surface .object-art-painted{filter:none}

.battle-map[data-selection-mode="inspect"] .battle-scene-object:hover>.scene-hit{stroke:#dac494;fill:#dac49415}.battle-map[data-selection-mode="move"] .battle-scene-object{cursor:inherit}.battle-map[data-selection-mode="skill"] .battle-scene-object{cursor:inherit}

/* Object frames belong to inspection/editor selection, never native click focus. */
.battle-scene-object,.battle-scene-object:focus,.battle-scene-object:focus-visible{outline:none}
.battle-scene-object.scene-selected,.battle-map[data-selection-mode="inspect"] .battle-scene-object.scene-inspected{outline:1px solid #f0ede4;outline-offset:2px}


/* Native cursors share one 32px design and hotspot. Dragging retains !important priority. */
[data-map-camera="battle"] .battle-map [data-map-cursor="move"]{cursor:url("/assets/cursors/move-v1.svg") 3 2, pointer}
[data-map-camera="battle"] .battle-map [data-map-cursor="inspect"]{cursor:url("/assets/cursors/inspect-v1.svg") 3 2, help}
[data-map-camera="battle"] .battle-map [data-map-cursor="attack"]{cursor:url("/assets/cursors/attack-v1.svg") 3 2, pointer}
[data-map-camera="battle"] .battle-map [data-map-cursor="magic"]{cursor:url("/assets/cursors/magic-v1.svg") 3 2, pointer}
[data-map-camera="battle"] .battle-map [data-map-cursor="magic-area"]{cursor:url("/assets/cursors/magic-area-v1.svg") 3 2, pointer}
[data-map-camera="battle"] .battle-map [data-map-cursor="item"]{cursor:url("/assets/cursors/item-v1.svg") 3 2, pointer}
[data-map-camera="battle"] .battle-map [data-map-cursor="blocked"]{cursor:url("/assets/cursors/move-blocked-v1.svg") 3 2, not-allowed}
[data-map-camera="battle"] .battle-map [data-map-cursor="busy"]{cursor:progress}

.battle-turn-order{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:0 0 12px}.battle-turn-chip{min-width:0;padding:9px 12px;border:1px solid #987c4c40;border-radius:8px;background:#14221e;color:#96a69d;font:12px Arial,sans-serif}.battle-turn-chip span,.battle-turn-chip small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.battle-turn-chip small{font-size:9px;margin-top:5px;color:#8d9e8a}.battle-turn-chip.current{border-color:#e1c38b;background:#3f3b2766;color:#f0d9b0;box-shadow:inset 0 0 14px #d7b5770d}.battle-turn-chip.current small{color:#c7b894}.battle-turn-chip.defeated{opacity:.4}.battle-unit.acting .unit-ring{stroke:#f7dd9f;stroke-width:3}.battle-unit.defeated{opacity:.45}.enemy-route-line{fill:none;stroke:#d6a779;stroke-width:3;stroke-dasharray:7 5;opacity:.7}.enemy-arrow-flight{animation-name:enemy-projectile;animation-timing-function:linear;animation-fill-mode:both}.enemy-arrow-flight path{fill:none;stroke:#f4ce92;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 2px #14170f)}.enemy-damage-popup{fill:#efb29d}
@keyframes enemy-projectile{0%{transform:translate(0,0);opacity:1}88%{opacity:1}100%{transform:translate(var(--enemy-x),var(--enemy-y));opacity:0}}

@media(max-width:600px){.battle-turn-order{gap:4px;margin-bottom:8px}.battle-turn-chip{padding:7px 5px;font-size:10px}.battle-turn-chip small{font-size:8px}}
@media(prefers-reduced-motion:reduce){.enemy-arrow-flight{animation:none!important;opacity:0}.battle-unit[style*="npcWalk"]{animation:none!important}}

/* Compact mobile action medallions; labels remain available to screen readers. */
@media(max-width:600px){
 .battle-command-row{grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:auto;align-items:center;justify-items:center;gap:5px;margin-top:12px}
 .battle-command{position:relative;width:100%;max-width:48px;aspect-ratio:1;min-height:0;padding:0;gap:0;border-radius:50%;border-color:#b59c6177;background:radial-gradient(circle at 35% 25%,#3d5140,#1b2c25 78%);box-shadow:inset 0 0 0 3px #14251c88,0 2px 5px #09150d66}
 .battle-command>span,.battle-command>small{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
 .battle-command>rpg-icon{width:21px;height:21px;flex:none}
 .battle-command>img{width:calc(100% - 10px);height:calc(100% - 10px);object-fit:cover;border-radius:50%;border:1px solid #c0a36c88}
 .battle-command.active{border-color:#e3c88b;box-shadow:inset 0 0 0 3px #14251c88,0 0 0 2px #d6bd8026;background:radial-gradient(circle at 35% 25%,#60704a,#2c4431 78%);color:#ffe5ad}
 .battle-command-end{color:#d9bb82;border-color:#b99a6088}
 .battle-command-end.suggested{border-color:#efd49a;box-shadow:inset 0 0 0 3px #14251c88,0 0 8px #d6bd8033}
 .battle-command-confirm:not(:disabled),.battle-command-skill:not(:disabled){border-color:#d6c18a;background:radial-gradient(circle at 35% 25%,#4c7756,#203e31 78%)}
 .battle-command:focus-visible{outline:2px solid #ffe3a0;outline-offset:3px}
}
