/* Battle art is presentation-only. Existing commands and battle rules are retained. */
.battle-field{grid-template-rows:auto minmax(230px,1fr) auto;align-content:stretch;gap:.45rem;padding:.5rem .65rem}
.battle-stage{position:relative;min-height:230px;isolation:isolate;overflow:hidden;border:1px solid #506581;border-radius:12px;background:#334e44;container-type:inline-size}
.battle-landscape{position:absolute;inset:0;z-index:-2;background-image:url('../assets/battle/backgrounds.png');background-size:300% 400%;background-position:var(--bg-x) var(--bg-y);image-rendering:pixelated}
.battle-stage:after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,#07121b18,transparent 50%,#07121b44)}
.scene-enemies,.scene-allies{position:absolute;left:5%;right:5%;display:grid;grid-template-columns:repeat(var(--count),minmax(0,1fr));justify-items:center;align-items:end;gap:.3rem;pointer-events:none}
.scene-enemies{top:4%;height:36%;left:7%;right:7%}.scene-allies{bottom:8%;height:42%;left:8%;right:8%}
.scene-actor{position:relative;width:min(100%,112px);height:100%;max-height:145px;display:flex;align-items:flex-end;justify-content:center;isolation:isolate;--unit-height:100%;--unit-width:100%}
.scene-actor.enemy{max-height:138px;width:min(100%,118px)}.scene-actor.scene-boss{width:min(100%,190px);max-height:178px}
.sprite-viewport{position:relative;display:block;overflow:hidden;width:var(--unit-width);height:var(--unit-height);animation:sprite-breathe 2.7s ease-in-out infinite;transform-origin:50% 95%}
.sprite-viewport img{position:absolute;display:block;width:calc(var(--sprite-cols)*100%);height:calc(var(--sprite-rows)*100%);max-width:none;left:calc(var(--sprite-x)*-100%);top:calc(var(--sprite-y)*-100%);image-rendering:pixelated;object-fit:fill;user-select:none}
.sprite-mirror{transform:scaleX(-1);animation:none}
.actor-shadow{position:absolute;bottom:0;width:65%;height:12px;background:#07172377;border-radius:50%;z-index:-1}
.scene-active .actor-shadow{background:#eccb6966;box-shadow:0 0 0 2px #ffe899,0 0 15px #ffe89966}
.scene-active:before{content:'▼';position:absolute;top:-16px;color:#ffe899;text-shadow:1px 2px #071321;font-size:15px;z-index:5}
.scene-name,.scene-status{position:absolute;bottom:-15px;left:50%;transform:translateX(-50%);max-width:145%;padding:1px 4px;border-radius:4px;background:#081220c9;color:#fff;font-size:10px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:1px 1px #000}
.scene-status{bottom:auto;top:-8px;color:#ffedb2;z-index:4;font-size:10px;border:1px solid #73809f66}
.scene-ko{opacity:.5;filter:grayscale(1)!important}.scene-ko .sprite-viewport{animation:none;transform:rotate(-12deg) translateY(6px)}.scene-escaped{visibility:hidden}
.sprite-effect{position:absolute;inset:0;pointer-events:none;animation-delay:var(--effect-delay);z-index:3}
.sprite-effect i{position:absolute;width:8px;height:8px;left:18%;bottom:15%;animation:effect-rise 1.7s ease-out infinite;animation-delay:var(--effect-delay)}
.sprite-effect i:nth-child(2){left:72%;bottom:35%;animation-delay:calc(var(--effect-delay) + .5s)}.sprite-effect i:nth-child(3){left:45%;bottom:55%;animation-delay:calc(var(--effect-delay) + 1s)}
.fx-poison i{background:#a452df;border:2px solid #ddb2ff;border-radius:50%;box-shadow:0 0 6px #9944cc}
.fx-burn i{background:#ffc743;border:2px solid #f36a23;box-shadow:0 -5px #ff9229;transform:rotate(45deg)}
.fx-paralysis i{width:6px;height:25px;background:#ffe961;clip-path:polygon(45% 0,100% 0,65% 40%,100% 40%,0 100%,35% 55%,0 55%);animation:effect-flash .65s steps(2) infinite;filter:drop-shadow(0 0 3px gold)}
.fx-sleep b{position:absolute;right:0;top:5%;color:#b6e8ff;font:bold 18px monospace;text-shadow:2px 2px #15243a;animation:effect-rise 2s infinite}.fx-sleep i{display:none}
.fx-confusion b{position:absolute;top:5%;left:45%;color:#ffd783;font-size:20px;text-shadow:1px 1px #533175;animation:effect-orbit 2s linear infinite}.fx-confusion i{display:none}
.fx-freeze{inset:20% 10% 0;border:2px solid #a8e5ff;background:#91e5ff33;clip-path:polygon(15% 0,80% 7%,100% 68%,85% 100%,0 96%,2% 25%);animation:effect-glow 2s infinite}.fx-freeze i{background:#effaff;width:4px;height:4px}
.fx-curse i{background:#7d347d;box-shadow:0 0 10px 4px #8e359e88;border-radius:50%;width:13px;height:13px}.fx-curse{border-bottom:3px solid #bc67d2;border-radius:50%;animation:effect-glow 1.8s infinite}
.sprite-guard{position:absolute;inset:10% 5% 0;border:2px solid #9ae0ff;border-radius:45% 45% 55% 55%;background:#75bdff22;box-shadow:0 0 8px #75bdff88}
.scene-number{position:absolute;z-index:8;top:15%;color:#fff;font:bold 24px monospace;text-shadow:-2px -2px #371525,2px 2px #371525;animation:damage-float .8s ease-out both}.scene-number.is-heal{color:#95ffb4;text-shadow:1px 2px #124b33}
.scene-hit .sprite-viewport{animation:hit-shake .65s}.scene-healed .sprite-viewport{filter:drop-shadow(0 0 8px #7affbc)}
.scene-impact{position:absolute;inset:25% 10%;border-top:5px solid #fff3c7;transform:rotate(-35deg);animation:impact-flash .5s both}.scene-healed .scene-impact{inset:20%;border:2px solid #94ffd3;border-radius:50%;transform:none;box-shadow:0 0 15px #94ffd3}
.battle-ui .enemy-party{grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr))}.battle-ui .ally-party{grid-template-columns:repeat(4,minmax(0,1fr))}
.battle-ui .combatant{padding:.45rem .55rem;border-radius:9px}.battle-ui .combatant-head h3{font-size:.75rem}.battle-ui .battle-job,.battle-ui .raid-party-job{font-size:.65rem}.battle-ui .effect-row{gap:2px}.battle-ui .effect-chip{font-size:.55rem;padding:.05rem .2rem}
.battle-log{max-height:62px}.battle-header{padding:.5rem .8rem}.battle-commands button{min-height:44px}
.raid-battle-field{grid-template-rows:auto minmax(225px,1fr) auto}.raid-battle-modal .battle-stage{min-height:225px}.raid-battle-modal .scene-boss{width:180px;max-height:180px}
@media(min-width:900px){.battle-stage{min-height:300px}.scene-actor{max-height:170px;width:125px}.scene-actor.enemy{max-height:165px;width:136px}.scene-actor.scene-boss{max-height:215px;width:220px}.scene-name,.scene-status{font-size:12px}}
@media(max-width:520px){.battle-field{padding:.35rem;gap:.35rem;grid-template-rows:auto minmax(205px,1fr) auto}.battle-stage{min-height:205px;border-radius:8px}.scene-allies{left:2%;right:2%;height:37%;bottom:8%}.scene-enemies{left:6%;right:6%;top:5%;height:31%}.scene-actor{width:74px;max-height:100px}.scene-actor.enemy{width:86px;max-height:92px}.scene-actor.scene-boss{width:118px;max-height:110px}.scene-name,.scene-status{font-size:8px;max-width:125%}.scene-active:before{top:-12px;font-size:11px}.battle-ui .ally-party{grid-template-columns:repeat(2,minmax(0,1fr));gap:.25rem}.battle-ui .combatant{padding:.3rem .4rem}.battle-ui .combatant-head h3{font-size:.68rem}.battle-ui .bar-label{font-size:.58rem}.battle-ui .meter{height:4px;margin:.15rem 0}.battle-ui .combatant .battle-job{font-size:.58rem}.battle-log{max-height:47px;padding:.35rem .6rem;font-size:.63rem}.turn-owner{padding:.3rem;font-size:.65rem}.battle-commands{gap:.2rem;padding:.25rem .35rem calc(.25rem + env(safe-area-inset-bottom))}.battle-commands button{font-size:1rem;padding:.25rem .1rem}.raid-battle-modal .battle-stage{min-height:205px}.raid-battle-modal .scene-boss{width:128px;max-height:126px}}
@media(max-height:560px) and (min-width:521px){.battle-stage{min-height:150px}.battle-field{grid-template-rows:auto minmax(150px,1fr) auto}.battle-ui .combatant{padding:.2rem .4rem}.battle-log{max-height:30px}.scene-name{font-size:8px}.battle-header{padding:.25rem .7rem}}
@keyframes sprite-breathe{50%{translate:0 -3px}}
@keyframes effect-rise{0%{translate:0 4px;opacity:0}25%{opacity:1}100%{translate:4px -30px;opacity:0}}
@keyframes effect-flash{0%,100%{opacity:.2}50%{opacity:1}}
@keyframes effect-orbit{0%{translate:-20px 0}50%{translate:20px -6px}100%{translate:-20px 0}}
@keyframes effect-glow{50%{opacity:.55}}
@keyframes damage-float{0%{translate:0 0;opacity:1}70%{opacity:1}100%{translate:0 -35px;opacity:0}}
@keyframes hit-shake{0%,100%{translate:0 0}25%{translate:3px 0}60%{translate:-1px 0}}
@keyframes impact-flash{0%{opacity:1;scale:.5}100%{opacity:0;scale:1.3}}
@media(prefers-reduced-motion:reduce){.battle-stage *,.battle-stage *:before{animation:none!important;transition:none!important}.scene-number{opacity:1}}
/* Preserve the original cell aspect ratio on narrow screens. */
.sprite-viewport{height:auto;aspect-ratio:var(--sprite-aspect,1);flex-shrink:0}
.scene-actor[data-art-key="jobs:1"] .sprite-viewport{clip-path:polygon(12% 0,100% 0,100% 100%,22% 100%,22% 62%,12% 62%)}
.scene-actor.scene-boss{width:min(100%,165px)}
@media(max-width:520px){.scene-actor.scene-boss,.raid-battle-modal .scene-boss{width:min(100%,115px)}}

svg.battle-landscape{width:100%;height:100%;background:none;overflow:hidden}

.scene-actor[data-art-key="extra:3"] .sprite-viewport{clip-path:polygon(0 0,100% 0,100% 76%,79% 87%,65% 100%,35% 100%,21% 87%,0 76%)}
.scene-actor[data-art-key="extra:9"] .sprite-viewport{clip-path:inset(0 0 0 5%)}
.scene-actor[data-art-key="extra:5"] .sprite-viewport{clip-path:inset(2% 0 0)}
.scene-actor[data-art-key="extra:7"] .sprite-viewport{clip-path:polygon(0 0,100% 0,100% 100%,12% 100%,0 88%)}
/* Distinct shapes as well as colors make each action readable. */
.scene-action-banner{position:absolute;top:3px;left:50%;translate:-50% 0;z-index:20;max-width:95%;padding:4px 12px;border:1px solid #e6d398;border-radius:6px;background:#0b1429ed;color:#fff4cd;font-size:12px;font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.scene-performing .actor-shadow{background:#ffd973aa;box-shadow:0 0 12px 3px #ffdf87}
.scene-performing .sprite-viewport{animation:actor-action .7s ease-out}
.action-vfx{position:absolute;inset:5%;z-index:6;pointer-events:none}
/* A curved blade, delayed echo and sparks share the same impact point. */
.vfx-physical{inset:-8%;transform:rotate(-32deg)}
.vfx-physical i{position:absolute;display:block;inset:12% -5%;width:auto;height:auto;border:0;border-top:7px solid #fffce5;border-right:3px solid #b3f5ff;border-radius:50%;background:none;box-shadow:0 -5px 0 #9aeaff88,0 -9px 0 #62bbff33;filter:drop-shadow(0 0 5px #94e6ff);rotate:0deg;transform-origin:50% 50%;animation:blade-sweep 1s linear both}
.vfx-physical i:nth-child(2){display:block;inset:24% -1%;border-top-width:3px;border-right-width:1px;border-color:#94ddff;box-shadow:0 -4px 0 #72bfff44;animation:blade-echo 1s linear both;rotate:12deg}
.vfx-physical i:nth-child(3){display:none}
.vfx-magic{border:3px solid #bca6ff;border-radius:50%;box-shadow:0 0 20px #8757ff,inset 0 0 20px #7767ff;background:radial-gradient(circle,#fff9, #9774ff44 45%,transparent 70%);animation:magic-burst .7s both}
.vfx-magic i{position:absolute;inset:15%;border:2px solid #d5d5ff;rotate:45deg}.vfx-magic i:nth-child(2){rotate:15deg}.vfx-magic i:nth-child(3){inset:-12%;border-radius:50%;border-style:dashed}
.vfx-heal{border-bottom:4px solid #87ffc2;border-radius:50%;background:linear-gradient(0deg,#43ec9b88,transparent);animation:heal-light .7s both}
.vfx-heal i{position:absolute;left:15%;top:50%;width:18px;height:24px;background:#b1ffcc;clip-path:polygon(35% 0,65% 0,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%,0 35%,35% 35%);filter:drop-shadow(0 0 4px #32ff91);animation:heal-rise .7s both}
.vfx-heal i:nth-child(2){left:65%;top:30%}.vfx-heal i:nth-child(3){left:40%;top:65%}
.scene-number{font-size:28px}.scene-ko:has(.scene-number){opacity:1}
.scene-actor[data-art-key="fenrir:0"],.scene-actor[data-art-key="chryps:0"]{width:min(100%,165px)}
@keyframes slash-strike{0%{scale:0 1;opacity:0}20%,55%{scale:1;opacity:1}100%{scale:1.2;opacity:0}}
@keyframes magic-burst{0%{scale:.3;opacity:0;rotate:-30deg}35%{scale:1;opacity:1}100%{scale:1.25;opacity:0;rotate:35deg}}
@keyframes heal-light{0%{opacity:0}35%,75%{opacity:1}100%{opacity:0}}
@keyframes heal-rise{0%{translate:0 15px;opacity:0}30%{opacity:1}100%{translate:0 -30px;opacity:0}}
@keyframes actor-action{0%,100%{translate:0 0}35%{translate:0 -4px}}
@media(max-width:520px){.scene-action-banner{font-size:10px;padding:3px 7px}.scene-number{font-size:23px}.scene-actor[data-art-key="fenrir:0"],.scene-actor[data-art-key="chryps:0"]{width:min(100%,125px)}}
@media(prefers-reduced-motion:reduce){.action-vfx,.action-vfx i{animation:none!important;opacity:1}}

.vfx-magic{border-color:var(--magic-color);box-shadow:0 0 20px var(--magic-color),inset 0 0 20px var(--magic-color)}.vfx-magic i{border-color:var(--magic-color)}

@keyframes blade-sweep{0%{transform:translate3d(-16%,12%,0) rotate(-42deg) scale(.82);opacity:0}18%{opacity:1}65%{opacity:.8}100%{transform:translate3d(16%,-12%,0) rotate(40deg) scale(1.08);opacity:0}}
@keyframes blade-echo{0%{transform:translate3d(-20%,16%,0) rotate(-52deg) scale(.8);opacity:0}26%{opacity:.55}70%{opacity:.35}100%{transform:translate3d(12%,-8%,0) rotate(30deg) scale(1.06);opacity:0}}
.scene-number{animation:damage-float 1.1s ease-out both}
.vfx-magic,.vfx-heal,.vfx-heal i{animation-duration:1s}
.scene-performing .sprite-viewport{animation-duration:1s}
@media(prefers-reduced-motion:reduce){.vfx-physical i{animation:none!important;opacity:1;transform:none}}

/* Approved chunky pixel seals: one transparent atlas, no opaque center or frame. */
.pixel-seal{inset:auto;left:50%;top:50%;translate:-50% -50%;width:138%;max-width:230px;height:auto;aspect-ratio:1;z-index:6;pointer-events:none;--seal-accent:#ffb62c;animation:pixel-seal-arrive 1.05s ease-out both}
.pixel-seal.seal-thunder{--seal-accent:#75edff}.pixel-seal.seal-ice{--seal-accent:#d3f8ff}
.pixel-seal-art{position:absolute;inset:0;display:block;overflow:hidden;image-rendering:pixelated}
.pixel-seal-art img{position:absolute;display:block;top:0;width:300%;height:100%;max-width:none;image-rendering:pixelated;user-select:none}
.pixel-seal-mote{position:absolute;left:50%;top:50%;display:block;width:3px;height:3px;background:var(--seal-accent);animation:pixel-seal-drift .82s ease-out both;animation-delay:var(--mote-delay)}
.seal-thunder .pixel-seal-mote{height:5px;width:2px}.seal-ice .pixel-seal-mote{height:4px;width:4px}
@keyframes pixel-seal-arrive{0%{opacity:0;transform:translateY(8px)}18%,76%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-4px)}}
@keyframes pixel-seal-drift{0%{opacity:0;transform:translate(var(--mote-x),var(--mote-y))}25%,60%{opacity:.9}100%{opacity:0;transform:translate(var(--mote-x),calc(var(--mote-y) - 12px))}}
@media(max-width:520px){.pixel-seal{max-width:180px}}
@media(prefers-reduced-motion:reduce){.pixel-seal{animation:none!important;opacity:1;transform:none}.pixel-seal-mote{display:none}}

/* Flowing combat: each impact remains legible at a shorter action interval. */
.scene-performing.ally .sprite-viewport{animation:flow-ally-strike .55s cubic-bezier(.2,.7,.2,1) both}
.scene-performing.enemy .sprite-viewport{animation:flow-enemy-strike .55s cubic-bezier(.2,.7,.2,1) both}
.scene-hit .sprite-viewport{animation:flow-hit .38s .10s both}
.scene-number{animation:flow-number .95s .10s both;font-style:italic;white-space:nowrap}
.scene-number-tail{z-index:9;pointer-events:none;animation:flow-number-tail .28s ease-out both}
.vfx-physical i,.vfx-physical i:nth-child(2){animation-duration:.62s;animation-timing-function:cubic-bezier(.15,.65,.35,1)}
.vfx-magic{animation-duration:.9s}.vfx-heal,.vfx-heal i{animation-duration:.72s}
.pixel-seal{animation-duration:.92s}.pixel-seal-mote{animation-duration:.68s}
.scene-finishing.enemy{animation:flow-defeat .65s both}
.scene-finishing.enemy .sprite-viewport{animation:flow-hit .38s .10s both}
.scene-finishing.enemy .scene-status{visibility:hidden}
@keyframes flow-ally-strike{0%,100%{translate:0 0}24%{translate:0 -10px}45%{translate:0 -7px}}
@keyframes flow-enemy-strike{0%,100%{translate:0 0}24%{translate:0 9px}45%{translate:0 6px}}
@keyframes flow-hit{0%,100%{translate:0 0}20%{translate:-5px 0;filter:brightness(1.8)}42%{translate:4px 0}65%{translate:-2px 0}}
@keyframes flow-number{0%{opacity:0;transform:translateY(8px) scale(.7)}15%{opacity:1;transform:translateY(-3px) scale(1.16)}30%,70%{opacity:1;transform:translateY(-8px) scale(1)}100%{opacity:0;transform:translateY(-20px) scale(1)}}
@keyframes flow-number-tail{from{opacity:var(--tail-opacity,.6);transform:translateY(0)}to{opacity:0;transform:translateY(-12px)}}
@keyframes flow-defeat{0%,65%{opacity:1;filter:none}100%{opacity:.35;filter:grayscale(1)}}
@media(prefers-reduced-motion:reduce){.scene-performing .sprite-viewport,.scene-hit .sprite-viewport,.scene-finishing.enemy,.scene-number{animation:none!important}.scene-number-tail{display:none}}

.battle-death-warning{flex:0 0 auto;display:grid;gap:4px;padding:9px 12px;border-bottom:2px solid #ffc45b;background:#501e27;color:#fff1bc;font-size:13px;line-height:1.4;text-align:center;overflow-wrap:anywhere}
.battle-death-warning span{font-weight:800;color:#fff}.battle-death-warning[hidden]{display:none}
.raid-result-status{flex:0 0 auto;padding:4px 10px;font-size:11px}.raid-result-status:empty{display:none}
@media(max-width:520px){.battle-death-warning{font-size:11px;padding:6px 8px}}

/* Auto-play presentation speed: affects animation only, not server action limits. */
body[data-battle-speed="2"] .battle-stage .scene-performing .sprite-viewport,
body[data-battle-speed="2"] .battle-stage .scene-hit .sprite-viewport,
body[data-battle-speed="2"] .battle-stage .scene-number,
body[data-battle-speed="2"] .battle-stage .vfx-magic,
body[data-battle-speed="2"] .battle-stage .vfx-physical i{animation-duration:.35s!important}
body[data-battle-speed="4"] .battle-stage .scene-performing .sprite-viewport,
body[data-battle-speed="4"] .battle-stage .scene-hit .sprite-viewport,
body[data-battle-speed="4"] .battle-stage .scene-number,
body[data-battle-speed="4"] .battle-stage .vfx-magic,
body[data-battle-speed="4"] .battle-stage .vfx-physical i{animation-duration:.17s!important}

/* Keep command buttons inside the visible mobile viewport, including after auto stop. */
.app-shell{height:var(--game-viewport-height,100dvh)}
#battle-screen>.battle-ui{flex:1 1 0;height:auto;min-height:0;min-width:0;overflow:hidden}
.battle-ui>.battle-header{flex:0 0 auto;align-items:center;flex-wrap:nowrap;min-height:40px;gap:6px;padding:4px 10px;letter-spacing:normal}
.battle-header>span,.battle-header>strong{white-space:nowrap}
.battle-header>.battle-auto-stop{flex:0 0 auto;min-height:28px;padding:3px 7px}
.battle-ui>.battle-field{flex:1 1 0;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.battle-ui>.turn-owner,.battle-ui>.battle-commands,.battle-ui>.battle-undo,.battle-ui>.raid-result-status,.battle-ui>.raid-after-actions{flex:0 0 auto}
.battle-ui>.battle-commands{grid-template-columns:repeat(5,minmax(0,1fr));padding-bottom:max(8px,env(safe-area-inset-bottom))}
.battle-commands>button{min-width:0;min-height:44px}
.battle-commands>button>span{white-space:nowrap}
.battle-ui>.battle-undo{min-height:32px;padding:4px 10px}
.modal-root.raid-ui-open .modal-card{display:flex;flex-direction:column;height:var(--game-viewport-height,100dvh);max-height:var(--game-viewport-height,100dvh);min-height:0}
.modal-root.raid-ui-open .raid-auto-controls{flex:0 0 auto;position:static;padding:4px 52px 4px 10px}
.modal-root.raid-ui-open .raid-battle-modal{flex:1 1 0;height:auto;min-height:0;overflow:hidden}
.modal-root.raid-ui-open .raid-battle-modal>.battle-header{padding-top:calc(6px + env(safe-area-inset-top));padding-right:58px;padding-left:max(10px,env(safe-area-inset-left));padding-bottom:6px;flex-wrap:nowrap}
.modal-root.raid-ui-open .modal-close{top:calc(6px + env(safe-area-inset-top));width:32px;height:32px}


/* Masho mobile layout fix: the legacy nowrap battle-header rule above forced
   five controls into one shrinking line. The two-row grid keeps the title
   readable and gives stop/queue/auto separate, touch-friendly targets. */
@media (max-width:600px){
 #battle-screen>.battle-ui>.battle-header:has(.masho-run-stop){
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:6px;
  row-gap:6px;
  min-width:0;
  padding:8px 10px;
  flex-wrap:initial;
 }
 #battle-screen>.battle-ui>.battle-header:has(.masho-run-stop)>span{
  grid-column:1 / 5;
  grid-row:1;
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
  font-size:.82rem;
 }
 #battle-screen>.battle-ui>.battle-header:has(.masho-run-stop)>strong{
  grid-column:5 / 7;
  grid-row:1;
  justify-self:end;
  white-space:nowrap;
  font-size:.8rem;
 }
 #battle-screen>.battle-ui>.battle-header:has(.masho-run-stop)>.masho-run-stop{
  grid-column:1 / 3;
  grid-row:2;
 }
 #battle-screen>.battle-ui>.battle-header:has(.masho-run-stop)>.masho-run-queue{
  grid-column:3 / 5;
  grid-row:2;
 }
 #battle-screen>.battle-ui>.battle-header:has(.masho-run-stop)>.battle-auto-stop{
  grid-column:5 / 7;
  grid-row:2;
 }
 #battle-screen>.battle-ui>.battle-header:has(.masho-run-stop):not(:has(.battle-auto-stop))>.masho-run-stop{grid-column:1 / 4}
 #battle-screen>.battle-ui>.battle-header:has(.masho-run-stop):not(:has(.battle-auto-stop))>.masho-run-queue{grid-column:4 / 7}
 #battle-screen>.battle-ui>.battle-header:has(.masho-run-stop)>button{
  justify-self:stretch;
  min-width:0;
  width:100%;
  min-height:44px;
  max-width:100%;
  box-sizing:border-box;
  padding:6px 4px;
  line-height:1.25;
  font-size:.7rem;
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:center;
 }
}
