/* Combat floating information must never become a grid row. */
.battle-screen .enemy-intent-tooltip[data-ui-frame]{position:fixed!important;z-index:150;max-height:calc(100dvh - 16px);overflow:auto;pointer-events:none;--ui-corner:28px;--ui-edge:7px;padding:18px 20px}
.battle-screen .enemy-intent-arrows{position:fixed!important;inset:0;width:100vw;height:100dvh;pointer-events:none}
/* Keep each panel's established dimensions while using the shared painted frame. */
.battle-screen [data-ui-frame="battle-panel"]{position:relative;--ui-corner:30px;--ui-edge:7px}
.battle-screen .battle-bottom[data-ui-frame]{padding:16px 18px;gap:18px;overflow:auto;background-color:#080c12!important}
.battle-screen .battle-log[data-ui-frame]{padding:16px 18px;line-height:1.7}
.battle-screen .battle-desc[data-ui-frame]{padding:12px 16px;margin:6px 0;min-height:3em;white-space:normal}
.battle-screen .battle-order[data-ui-frame]{padding:16px 6px;overflow:auto;--ui-corner:18px;--ui-edge:4px}
.battle-screen .battle-field[data-ui-frame="battlefield"]{position:relative;background-image:var(--battle-background,url(combat/backstreet-dusk-background.webp))!important;background-size:cover!important;background-position:var(--battle-background-position,center bottom)!important;background-color:#29231f!important;background-repeat:no-repeat!important;--ui-corner:38px;--ui-edge:8px;border:0}
.battle-screen .battle-field[data-ui-frame="battlefield"]>.map-frame-overlay{z-index:1}
.battle-screen .battle-team{position:relative;z-index:2}
.battle-screen .battle-command[data-ui-frame="battle-card"]{padding:8px 5px;--ui-corner:22px;--ui-edge:5px;align-self:stretch}
.battle-screen .battle-command[aria-pressed=true]{color:#ffe0a0;filter:drop-shadow(0 0 4px #e6b76666)}
.battle-screen .battle-command[aria-pressed=true]>.ui-clean-frame{filter:brightness(1.45)}
.battle-screen .battle-command small{min-height:1.4em}
.battle-screen .battle-controls{align-items:stretch}
.battle-screen .battle-confirm-stack{align-self:center}
/* Painted brass dials: actual crosshair and changing timer text stay crisp. */
.battle-screen .enemy-intent-mark{width:40px;height:40px;min-width:40px;min-height:40px;max-width:40px;max-height:40px;padding:9px;border:0;border-radius:0;background:transparent url(ui/enemy-intent-dial.webp) center/contain no-repeat;color:#ffc1a3;box-shadow:none;filter:drop-shadow(0 2px 2px #0009)}
.battle-screen .enemy-intent-icon{width:22px;height:22px;stroke-width:2;pointer-events:none}
.battle-screen .enemy-intent-mark[aria-expanded=true],.battle-screen button.enemy-intent-mark:hover{filter:brightness(1.25) drop-shadow(0 0 5px #ff776780);border:0;box-shadow:none}
.battle-screen .battle-unit-slot>.corpse-timer{display:grid;place-items:center;padding:0;background:transparent url(ui/enemy-corpse-dial.webp) center/contain no-repeat;border:0;border-radius:0;color:#f4dbb0;font-size:14px;font-family:Georgia,serif;text-shadow:0 1px 2px #000;line-height:1}
@media(max-width:760px){.battle-screen .battle-bottom[data-ui-frame]{padding:12px;gap:10px}.battle-screen .battle-command[data-ui-frame]{padding:7px 3px}.battle-screen .enemy-intent-mark{width:34px;height:34px;min-width:34px;min-height:34px;max-width:34px;max-height:34px;padding:7px}.battle-screen .enemy-intent-icon{width:20px;height:20px}}

/* Ground selection rings replace the floating diamonds. */
.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{content:"";display:block;left:50%;top:auto!important;bottom:-3px;width:72%;max-width:110px;height:18px;transform:translateX(-50%);border-radius:50%;border:2px solid #efd08b;background:radial-gradient(ellipse,#d4ac5730,transparent 65%);box-shadow:0 0 7px #e8ba6c88,inset 0 0 6px #e8ba6c55;filter:none;z-index:0;pointer-events:none}
.battle-screen .battle-unit.current .battle-sprite::after{border-color:#b8e2ee;background:radial-gradient(ellipse,#85bfd72b,transparent 65%);box-shadow:0 0 7px #8fc7dd88,inset 0 0 6px #8fc7dd55}
.battle-screen .battle-sprite canvas{z-index:1}
.battle-screen .battle-field[data-ui-frame="battlefield"]>.map-frame-overlay{inset:-8px!important}
/* Skill paintings already include their own frame. */
.battle-screen .battle-command{border:0;background:none;box-shadow:none;padding:8px 3px}
.battle-screen .battle-command[aria-pressed=true]{border:0;background:none;box-shadow:none}
.battle-screen .battle-command>.ui-clean-frame{display:none!important}
.battle-screen .battle-command[aria-pressed=true] .skill-icon{filter:drop-shadow(0 0 5px #ecc67d99)}
/* A pressure dial feeds a narrow brass action rail. Portrait order stays live. */
.battle-screen .battle-order{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:5px;height:100%;max-height:none;margin:0;padding:4px 3px 12px;border:0;overflow:auto;background:none}
.battle-screen .battle-order::before{content:"";position:absolute;z-index:-1;top:54px;bottom:8px;left:50%;width:12px;transform:translateX(-50%);border:2px solid #8e7046;border-radius:8px;background:repeating-linear-gradient(to bottom,transparent 0 11px,#d8b77a99 11px 12px),linear-gradient(90deg,#30271d,#c5a56a 25%,#473a28 50%,#b08c52 78%,#30271d);box-shadow:inset 0 0 0 2px #12171c,0 2px 5px #0009;pointer-events:none}
.order-pressure-gauge{display:block;width:58px;height:58px;max-width:100%;flex:0 0 auto;filter:drop-shadow(0 2px 3px #000a)}
.battle-screen .battle-order .order-token{position:relative;flex:0 0 auto;width:40px;height:40px;max-width:40px;max-height:40px;border-radius:50%;padding:2px;border:2px solid #9f8251;background:linear-gradient(135deg,#241e17,#131b23);box-shadow:0 2px 4px #0009}
.battle-screen .battle-order .order-token::after{content:"";position:absolute;right:-7px;top:50%;width:5px;height:2px;background:#c4a268}
.battle-screen .battle-order .order-token.next{border-color:#eed499;box-shadow:0 0 7px #d9af6d66,inset 0 0 0 1px #fff0bf}
.battle-screen .battle-order .order-token.next::after{right:-10px;width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:7px solid #ecd095;background:none;transform:translateY(-50%)}
@media(max-width:760px){.order-pressure-gauge{width:44px;height:44px}.battle-screen .battle-order{gap:4px;padding:2px 1px 8px}.battle-screen .battle-order::before{top:40px;width:9px}.battle-screen .battle-order .order-token{width:32px;height:32px;max-width:32px;max-height:32px}.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{height:12px}.battle-screen .battle-field[data-ui-frame="battlefield"]>.map-frame-overlay{inset:-6px!important}}

/* A selected command remains readable even when its action is unavailable. */
.battle-screen .battle-command.skill-unavailable[aria-pressed=true] .skill-icon{filter:drop-shadow(0 0 5px #ecc67d99)!important}
.battle-screen .battle-command.skill-unavailable[aria-pressed=true]{opacity:1;color:#ffe0a0}
/* Nine fixed slots: turn diamond plus up to eight portraits, without scrolling. */
.battle-screen .battle-order{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:20px repeat(8,minmax(0,1fr));align-items:center;justify-items:center;gap:2px;padding:2px 3px;overflow:hidden;min-height:0;max-height:394px}
.battle-screen .battle-order::before{top:24px;bottom:4px}
.battle-screen .battle-order .order-diamond{display:block;width:12px;height:12px;margin:0;border:2px solid #f3d392;transform:rotate(45deg);background:#c29a5333;box-shadow:0 0 7px #dcb46a}
.battle-screen .battle-order .order-diamond.ally{border-color:#bdeaff;background:#78b7d233;box-shadow:0 0 7px #8ecde9}
.battle-screen .battle-order .order-token{width:auto;height:100%;max-width:40px;max-height:40px;min-height:0;aspect-ratio:1;flex:none}
/* Compact the HP-to-lantern, command-to-description and description-to-range gaps. */
.battle-screen .tp-pips{height:22px;padding:0;margin:0}
.battle-screen .tp-pips i{height:21px}
.battle-screen .battle-bottom>div:first-child{gap:2px}
.battle-screen .battle-command{padding:3px 3px 1px}
.battle-screen .battle-bottom .battle-desc{background:none!important;border:0;box-shadow:none;outline:0;padding:2px 0;margin:0;min-height:0;line-height:1.45}
.battle-screen .battle-desc>.ui-clean-frame{display:none!important}
.battle-screen .battle-range-detail{margin:0;padding:2px 0;line-height:1.4}
/* Make room outside the painted map; the frame is larger than the map itself. */
.battle-screen .battle-field[data-ui-frame="battlefield"]{width:calc(100% - 24px);height:calc(100% - 18px);margin:4px 12px 14px;align-self:start;overflow:visible}
.battle-screen .battle-field[data-ui-frame="battlefield"]>.map-frame-overlay{inset:-12px!important;width:calc(100% + 24px)!important;height:calc(100% + 24px)!important}
/* Layered ground aura, small glints and a gentle pulse under the actor. */
.battle-screen .battle-unit.current{--ground-light:#a7e5ff;--ground-glow:#72caff66}
.battle-screen .battle-unit.target{--ground-light:#ffe2a1;--ground-glow:#edc26366}
.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{height:20px;width:76%;bottom:-4px;border:1px solid var(--ground-light);background:radial-gradient(ellipse,transparent 44%,var(--ground-glow) 52%,transparent 67%),radial-gradient(ellipse,var(--ground-glow),transparent 72%);box-shadow:0 0 0 3px #0c152444,0 0 0 4px var(--ground-glow),0 0 12px var(--ground-glow),inset 0 0 8px var(--ground-glow);animation:ground-aura 2.2s ease-in-out infinite}
.battle-screen .battle-unit.current .battle-sprite::before,.battle-screen .battle-unit.target .battle-sprite::before{content:"";position:absolute;z-index:0;left:50%;bottom:0;width:80%;height:34px;transform:translateX(-50%);pointer-events:none;background:radial-gradient(circle at 16% 70%,var(--ground-light) 0 1px,transparent 2px),radial-gradient(circle at 83% 55%,var(--ground-light) 0 1px,transparent 2px),radial-gradient(circle at 38% 25%,var(--ground-light) 0 1px,transparent 2px);filter:drop-shadow(0 0 3px var(--ground-light));animation:ground-glints 2.2s ease-in-out infinite}
@keyframes ground-aura{0%,100%{opacity:.75;transform:translateX(-50%) scale(.97)}50%{opacity:1;transform:translateX(-50%) scale(1.03)}}
@keyframes ground-glints{0%,100%{opacity:.3}50%{opacity:.9}}
@media(max-width:760px){.battle-screen .battle-order{max-height:330px}.battle-screen .battle-order .order-token{max-width:32px;max-height:32px}.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{height:14px}.battle-screen .tp-pips i{height:19px}}
@media(prefers-reduced-motion:reduce){.battle-screen .battle-sprite::before,.battle-screen .battle-sprite::after{animation:none!important}}

/* Unavailable skills keep monochrome art in every selection state. */
.battle-screen .battle-command.skill-unavailable .skill-icon,.battle-screen .battle-command.skill-unavailable[aria-pressed=true] .skill-icon{filter:grayscale(1) brightness(.55)!important}
.battle-screen .battle-command.skill-unavailable[aria-pressed=true]{color:#cfbf9e;filter:none}
/* Fill the complete glass chamber, leaving only the metal end caps exposed. */
.battle-screen .battle-unit-slot>.battle-health{padding:2px 15px}
.backstreet-screen .route-health-frame{padding:2px 13px}
.battle-screen .battle-health progress,.backstreet-screen .route-health-frame progress{height:100%;background:#251816}
/* Shared dialog headings sit nearer their lower dividing rule. */
.supplies-dialog .supplies-head{padding-top:22px;align-items:flex-end}
.supplies-dialog .supplies-head h2{margin-bottom:0}
.backstreet-event-dialog h2{padding-top:22px;margin-bottom:8px}
.route-formation-dialog .supplies-head h2::after{margin-top:8px}
/* A painted, continuous instrument spine with eight portrait sockets. */
.battle-screen .battle-order{background:transparent url(ui/turn-order-ornate.webp) center/100% 100% no-repeat;padding:8px 6px;max-height:394px}
.battle-screen .battle-order::before{display:none}
.battle-screen .battle-order .order-token{border-color:#8d774f;box-shadow:0 2px 4px #000b,inset 0 0 0 1px #dbbf7a55}
.battle-screen .battle-order .order-token::after{display:none}
/* Perspective diamonds retain an unmistakable angular silhouette. */
.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{height:28px;width:80%;max-width:115px;border:0;border-radius:0;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);background:linear-gradient(150deg,transparent 35%,var(--ground-light) 48%,transparent 61%),linear-gradient(30deg,transparent 35%,var(--ground-glow) 48%,transparent 61%),radial-gradient(ellipse,var(--ground-glow),transparent 70%);box-shadow:none;filter:drop-shadow(0 0 4px var(--ground-light));bottom:-7px;animation:ground-aura 2.2s ease-in-out infinite}
.battle-screen .battle-unit.current .battle-sprite::before,.battle-screen .battle-unit.target .battle-sprite::before{bottom:-6px;height:30px;width:82%;background:var(--ground-glow);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%,50% 0,50% 12%,10% 50%,50% 88%,90% 50%,50% 12%);filter:drop-shadow(0 0 5px var(--ground-light))}
/* Align the frame's inner edge with the outside of the map in one geometry. */
.battle-screen .battle-field[data-ui-frame="battlefield"]>.map-frame-overlay{inset:-10px!important;width:calc(100% + 20px)!important;height:calc(100% + 20px)!important}
@media(max-width:760px){.battle-screen .battle-order{padding:6px 4px;max-height:330px}.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{height:20px}.supplies-dialog .supplies-head,.backstreet-event-dialog h2{padding-top:16px}}

/* Join the lower map rail directly to the upper action-panel rail. */
.battle-screen .battle-field[data-ui-frame="battlefield"]{height:calc(100% + 6px);margin-bottom:0}
/* Lower the portrait sequence into the painted rail sockets. */
.battle-screen .battle-order{grid-template-rows:44px repeat(8,minmax(0,1fr));gap:0;padding:10px 6px 24px}
.battle-screen .battle-order .order-token{height:calc(100% + 8px);max-height:42px;max-width:42px;z-index:1}
.battle-screen .battle-order .order-token.next{z-index:2}
/* Real hollow painted selection assets replace all generated glow effects. */
.battle-screen .battle-unit.current .battle-sprite::before,.battle-screen .battle-unit.target .battle-sprite::before{display:none!important}
.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{content:"";width:82%;max-width:120px;height:34px;bottom:-7px;top:auto!important;border:0;border-radius:0;clip-path:none;box-shadow:none;filter:none;animation:none;opacity:1;transform:translateX(-50%);background:transparent url(ui/selection-light-woven-gold.webp) center/100% 100% no-repeat}
.battle-screen .battle-unit.current .battle-sprite::after{background-image:url(ui/selection-light-woven-blue.webp)}
@media(max-width:760px){.battle-screen .battle-order{grid-template-rows:36px repeat(8,minmax(0,1fr));padding:8px 4px 20px}.battle-screen .battle-order .order-token{max-width:34px;max-height:34px}.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{height:24px}}

/* Dim the painted energy rim and center its opening on the feet. */
.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{bottom:-17px;filter:brightness(.48) saturate(.8)}
@media(max-width:760px){.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{bottom:-12px}}

/* Dedicated turn and circular playback controls. */
.battle-screen .battle-round-art{display:grid;place-items:center;box-sizing:border-box;width:156px;height:52px;padding:8px 18px;margin:0 8px 0 0;background:transparent url(ui/combat-round-cartouche-v2.webp) center/100% 100% no-repeat;border:0;letter-spacing:1px;font-size:17px;line-height:1;white-space:nowrap}
.battle-screen .battle-top .battle-orb-control{display:grid;place-items:center;position:static;box-sizing:border-box;width:48px;height:48px;min-width:48px;padding:11px;transform:none;background:transparent url(ui/combat-control-orb-v2.webp) center/contain no-repeat;border:0;border-radius:0;box-shadow:none;color:#b9a16b;cursor:pointer}
.battle-control-icon{width:24px;height:24px;fill:currentColor;stroke:none;pointer-events:none}
.battle-gear-icon{fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
.battle-screen .battle-top .battle-orb-control:hover{color:#e0cb9b}
.battle-screen .battle-top .battle-orb-control[aria-pressed=true]{color:#91b8ce;filter:drop-shadow(0 0 3px #6092ad66)}
/* Place the live turn diamond at the center of the painted diamond socket. */
.battle-screen .battle-order{display:block;padding:0}
.battle-screen .battle-order .order-diamond{position:absolute;top:7.55%;left:50%;width:16px;height:16px;box-sizing:border-box;margin:0;transform:translate(-50%,-50%) rotate(45deg);z-index:3}
.battle-screen .battle-order .order-token{position:absolute;left:50%;top:calc(19% + var(--order-slot)*8.75%);transform:translate(-50%,-50%);width:42px;height:42px;max-width:42px;max-height:42px;box-sizing:border-box}
/* Keep the action panel a two-column grid, without an extra scrolling layout shell. */
.battle-screen .battle-bottom[data-ui-frame]{overflow:hidden;grid-template-columns:minmax(0,1fr) minmax(210px,24%);align-items:start;max-height:none;height:auto;min-height:0}
.battle-screen .battle-bottom>.battle-command-panel{display:flex;flex-direction:column;align-items:stretch;gap:3px;min-width:0;max-width:100%}
.battle-screen .battle-bottom .battle-controls{display:flex;flex-wrap:wrap;align-items:center;margin:0;gap:10px;min-width:0}
.battle-screen .battle-bottom .battle-desc{white-space:normal;overflow:visible;overflow-wrap:anywhere;width:100%;min-height:0;margin:0;padding:2px 0;grid-column:auto;grid-row:auto}
.battle-screen .battle-bottom .battle-log{min-width:0;max-height:160px;margin:0;overflow-x:hidden;overflow-y:auto;overflow-wrap:anywhere}
.battle-screen .battle-bottom .battle-log .ui-frame-scroll{overflow-x:hidden!important;scrollbar-width:thin}
.battle-screen .battle-bottom .battle-confirm-stack{flex:0 0 100px;align-self:center;margin-left:auto;height:auto}
.battle-screen .battle-bottom [data-confirm]{height:auto;min-height:38px;font-size:14px}
@media(max-width:1000px){.battle-screen .battle-bottom[data-ui-frame]{grid-template-columns:minmax(0,1fr)}.battle-screen .battle-bottom .battle-log{display:none}}
@media(max-width:760px){.battle-screen .battle-order .order-token{width:34px;height:34px;max-width:34px;max-height:34px}.battle-screen .battle-order .order-diamond{width:12px;height:12px}.battle-screen .battle-round-art{width:120px;height:44px;font-size:13px}.battle-screen .battle-top .battle-orb-control{width:40px;height:40px;min-width:40px;padding:9px}.battle-control-icon{width:21px;height:21px}.battle-screen .battle-bottom .battle-controls{gap:5px}.battle-screen .battle-bottom .battle-confirm-stack{flex-basis:88px}}

.battle-screen .battle-round-art,.battle-screen .battle-top .battle-orb-control{filter:brightness(.72) saturate(.8)}

/* Stable battle geometry across turns, skill descriptions, and log lengths. */
.battle-screen{padding:12px 1.5%;grid-template-columns:54px minmax(0,1fr);grid-template-rows:64px minmax(0,1fr) 236px;column-gap:4px;row-gap:6px;overflow:hidden}
.battle-screen .battle-top{min-height:0;max-height:64px;box-sizing:border-box;flex-wrap:nowrap}
.battle-screen .battle-round-art{flex:0 0 156px;background-size:100% 100%;filter:brightness(.9) saturate(.85)}
.battle-screen .battle-top .battle-orb-control{flex:0 0 48px;overflow:visible;background-size:100% 100%;filter:brightness(.9) saturate(.85)}
.battle-screen .battle-order{height:100%;max-height:none;min-height:0}
.battle-screen .battle-order .order-token{top:var(--order-position);width:40px;height:40px;max-width:40px;max-height:40px}
.battle-screen .battle-field[data-ui-frame="battlefield"]{width:calc(100% - 12px);margin-left:6px;margin-right:6px;height:calc(100% + 6px)}
.battle-screen .battle-bottom[data-ui-frame]{height:236px;min-height:236px;max-height:236px;grid-template-columns:minmax(0,1fr) minmax(260px,36%);padding:14px 16px;gap:14px;overflow:hidden;align-items:stretch}
.battle-screen .battle-bottom>.battle-command-panel{height:100%;min-height:0;display:flex;flex-direction:column;gap:4px}
.battle-screen .battle-bottom .battle-controls{height:112px;min-height:112px;flex:0 0 112px;flex-wrap:nowrap;justify-content:flex-start;gap:8px;overflow:hidden}
.battle-screen .battle-bottom .battle-controls[hidden]{display:none!important}
.battle-screen .battle-bottom .battle-command{width:clamp(44px,5vw,82px);flex:0 1 82px;min-width:40px;padding:1px}
.battle-screen .battle-bottom .skill-icon{width:min(72px,100%);height:auto;aspect-ratio:1}
.battle-screen .battle-bottom .battle-command b{font-size:clamp(11px,1vw,14px);white-space:nowrap}
.battle-screen .battle-bottom .battle-confirm-stack{flex:0 0 100px;margin-left:2px;align-self:center;height:40px}
.battle-screen .battle-bottom [data-confirm]{height:40px;width:100%;min-height:40px;padding:8px;font-size:14px;letter-spacing:0}
.battle-screen .battle-bottom .battle-desc{flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;line-height:1.5}
.battle-screen .battle-bottom .battle-range-detail{flex:0 0 24px;height:24px;white-space:nowrap;overflow-x:auto;overflow-y:hidden;font-size:12px}
.battle-screen .battle-bottom .battle-log{display:block;height:100%;min-height:0;max-height:100%;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;align-self:stretch}
.battle-screen .battle-bottom.enemy-turn .battle-command-panel{justify-content:center}
.battle-screen .battle-bottom.enemy-turn .battle-desc{flex:0 0 auto;text-align:center;font-size:18px;color:#d1bc92}
@media(max-width:1000px){.battle-screen .battle-bottom[data-ui-frame]{grid-template-columns:minmax(0,1fr) minmax(220px,32%)}.battle-screen .battle-bottom .battle-controls{gap:4px}.battle-screen .battle-bottom .battle-confirm-stack{flex-basis:84px}.battle-screen .battle-bottom [data-confirm]{font-size:12px}}
@media(max-width:760px){.battle-screen{grid-template-columns:44px minmax(0,1fr);grid-template-rows:54px minmax(0,1fr) 238px;padding:8px 10px;gap:4px}.battle-screen .battle-top{gap:6px;padding-bottom:4px}.battle-screen .battle-round-art{flex-basis:114px;width:114px;height:42px}.battle-screen .battle-top .battle-orb-control{flex-basis:38px;width:38px;height:38px;min-width:38px}.battle-screen .battle-playback-actions{gap:4px}.battle-screen .battle-exit-actions{gap:4px}.battle-screen .battle-exit-actions .seal{padding:6px;min-width:42px;font-size:12px}.battle-screen .battle-bottom[data-ui-frame]{height:238px;min-height:238px;max-height:238px;grid-template-columns:minmax(0,1fr);grid-template-rows:148px minmax(0,1fr);padding:10px;gap:6px}.battle-screen .battle-bottom .battle-controls{height:78px;min-height:78px;flex-basis:78px}.battle-screen .battle-bottom .battle-command{flex-basis:62px;min-width:32px}.battle-screen .battle-bottom .skill-icon{width:min(46px,100%)}.battle-screen .battle-bottom .battle-log{display:block;padding:8px 12px;font-size:11px;line-height:1.4}.battle-screen .battle-bottom .battle-range-detail{font-size:10px;flex-basis:18px;height:18px}.battle-screen .battle-order .order-token{width:32px;height:32px;max-width:32px;max-height:32px}.battle-screen .battle-field[data-ui-frame="battlefield"]{margin-left:4px;margin-right:4px;width:calc(100% - 8px)}}

.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{filter:brightness(.78) saturate(.85);opacity:.9}

/* A flatter, softly colored painted light ring around the feet. */
.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{height:24px;bottom:-12px;filter:brightness(.68) saturate(.5) contrast(.82);opacity:.8}
@media(max-width:760px){.battle-screen .battle-unit.current .battle-sprite::after,.battle-screen .battle-unit.target .battle-sprite::after{height:18px;bottom:-9px}}

/* Description and range sit together; unused space remains below them. */
.battle-screen .battle-bottom:not(.enemy-turn) .battle-desc{flex:0 1 auto;max-height:60px;min-height:0;margin:0;padding:0;line-height:1.5}
.battle-screen .battle-bottom:not(.enemy-turn) .battle-command-panel::after{content:"";display:block;flex:1 1 auto;min-height:0}
.battle-screen .battle-bottom .battle-range-detail{padding:0;margin:0}
.battle-screen .battle-bottom>.battle-command-panel{gap:3px}
.battle-screen .battle-top .battle-gear-icon{width:22px;height:22px;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.game-info-tooltip[data-ui-frame="tooltip"]{position:fixed!important;z-index:300;--ui-corner:28px;padding:18px 22px;max-width:calc(100vw - 16px)}
@media(max-width:760px){.battle-screen .battle-bottom:not(.enemy-turn) .battle-desc{max-height:42px}.battle-screen .battle-top .battle-gear-icon{width:19px;height:19px}}

/* Spend the fixed panel height on larger command art and bottom-aligned details. */
.battle-screen .battle-top{border-bottom:0!important}
.battle-screen .battle-bottom>.battle-command-panel{gap:3px}
.battle-screen .battle-bottom:not(.enemy-turn) .battle-command-panel::after{display:none;content:none}
.battle-screen .battle-bottom .battle-controls{height:148px;min-height:148px;flex-basis:148px;gap:8px;overflow-x:auto;overflow-y:hidden}
.battle-screen .battle-bottom .battle-command{flex:0 0 94px;width:94px;min-width:94px}
.battle-screen .battle-bottom .skill-icon{width:88px;height:88px;aspect-ratio:1;margin-bottom:3px}
.battle-screen .battle-bottom .battle-command b{font-size:15px;line-height:19px}
.battle-screen .battle-bottom .battle-command small{margin-top:3px;min-height:28px;height:28px;line-height:1}
.battle-screen .battle-bottom:not(.enemy-turn) .battle-desc{margin-top:auto;flex:0 1 auto;max-height:42px;min-height:0}
.battle-screen .battle-bottom .battle-range-detail{flex:0 0 24px;height:24px}
.battle-screen .skill-cost-meter{position:relative;display:inline-block;width:60px;height:28px;box-sizing:border-box;background:transparent url(ui/skill-cost-lamp-slot.webp) center/100% 100% no-repeat;vertical-align:middle}
.battle-screen .skill-cost-meter>span{position:absolute;left:40%;right:8%;top:0;bottom:0;display:grid;place-items:center;font-size:15px;color:#dbc596;letter-spacing:0;font-family:Georgia,serif;text-shadow:0 1px 2px #000}
@media(max-width:1000px){.battle-screen .battle-bottom .battle-command{flex-basis:70px;width:70px;min-width:70px}.battle-screen .battle-bottom .skill-icon{width:64px;height:64px}}
@media(max-width:760px){.battle-screen .battle-bottom .battle-controls{height:96px;min-height:96px;flex-basis:96px}.battle-screen .battle-bottom .battle-command{flex-basis:56px;width:56px;min-width:56px}.battle-screen .battle-bottom .skill-icon{width:50px;height:50px}.battle-screen .battle-bottom .battle-command b{font-size:11px;line-height:15px}.battle-screen .skill-cost-meter{width:48px;height:23px}.battle-screen .skill-cost-meter>span{font-size:12px}.battle-screen .battle-bottom .battle-command small{height:23px;min-height:23px}.battle-screen .battle-bottom:not(.enemy-turn) .battle-desc{max-height:24px}}

.battle-screen .skill-cost-meter>span{top:40%;bottom:18%;font-size:12px;line-height:1}
@media(max-width:760px){.battle-screen .skill-cost-meter>span{font-size:10px}}

/* One continuous edge between the map and action area. */
.battle-screen .battle-field[data-ui-frame="battlefield"]{width:100%;margin:0;height:calc(100% + 6px)}
.battle-screen .battle-field[data-ui-frame="battlefield"]>.map-frame-overlay{inset:0!important;width:100%!important;height:100%!important}
.battle-screen .battle-bottom[data-ui-frame]{grid-column:2;--ui-corner:38px;--ui-edge:9.5px}
.battle-screen .skill-cost-meter{width:66px;height:32px}
.battle-screen .skill-cost-meter>span{left:32%;right:16%;top:40%;bottom:20%;font-size:11px;line-height:1}
.battle-screen .battle-bottom .battle-command small{height:32px;min-height:32px}
.battle-screen .bag-icon img{display:block;width:100%;height:100%;object-fit:contain;border:0;transform:none;padding:0}
@media(max-width:760px){.battle-screen .battle-field[data-ui-frame="battlefield"]{width:100%;margin:0;height:calc(100% + 4px)}.battle-screen .skill-cost-meter{width:50px;height:25px}.battle-screen .skill-cost-meter>span{font-size:10px}.battle-screen .battle-bottom .battle-command small{height:25px;min-height:25px}}

.battle-screen .battle-bottom .battle-controls{height:152px;min-height:152px;flex-basis:152px}
@media(max-width:760px){.battle-screen .battle-bottom .battle-controls{height:96px;min-height:96px;flex-basis:96px}}

/* Keep all battle rails continuous and at the same corner scale. */
.battle-screen .battle-field[data-ui-frame="battlefield"],.battle-screen .battle-bottom[data-ui-frame]{box-sizing:border-box;min-width:0;border:0;border-radius:0}
.battle-screen .battle-bottom[data-ui-frame]>.ui-clean-frame{inset:0!important;width:100%!important;height:100%!important}
.battle-screen .skill-cost-meter{width:80px;height:40px;background-size:contain;background-position:center}
.battle-screen .skill-cost-meter>span{left:30%;right:16%;top:42%;bottom:24%;font-size:14px;line-height:1}
.battle-screen .battle-bottom .battle-command small{height:40px;min-height:40px;display:flex;align-items:center;justify-content:center;padding:0}
@media(max-width:760px){.battle-screen .skill-cost-meter{width:54px;height:27px}.battle-screen .skill-cost-meter>span{font-size:11px}.battle-screen .battle-bottom .battle-command small{height:27px;min-height:27px}}

/* Command art, titles and cost meters occupy explicit rows without a scroll strip. */
.battle-screen{grid-template-rows:64px minmax(0,1fr) 270px}
.battle-screen .battle-bottom[data-ui-frame]{height:270px;min-height:270px;max-height:270px;grid-template-columns:minmax(0,1fr) minmax(240px,30%)}
.battle-screen .battle-bottom .battle-controls{display:grid;grid-template-columns:repeat(var(--command-count,6),minmax(0,1fr));gap:6px;align-items:start;height:164px;min-height:164px;flex:0 0 164px;padding:0;margin:0;overflow:visible;scrollbar-width:none}
.battle-screen .battle-bottom .battle-controls::-webkit-scrollbar{display:none}
.battle-screen .battle-bottom .battle-command{display:grid;grid-template-rows:88px 22px 40px;gap:3px;justify-items:center;align-items:center;width:100%;min-width:0;max-width:none;height:156px;box-sizing:border-box;padding:0;margin:0;align-self:start;border:0;border-radius:0;background:none;box-shadow:none}
.battle-screen .battle-bottom .skill-icon{display:block;width:min(88px,100%);height:auto;aspect-ratio:1;margin:0;align-self:center;background:none;border:0;border-radius:0}
.battle-screen .battle-bottom .battle-command b{display:block;margin:0;line-height:22px;font-size:15px}
.battle-screen .battle-bottom .battle-command small{margin:0;min-width:0;width:100%;height:40px;min-height:40px;overflow:visible}
.battle-screen .battle-bottom .skill-cost-meter{width:min(80px,100%);height:40px}
.battle-screen .battle-bottom .battle-confirm-stack{width:100%;min-width:0;height:40px;margin:0;align-self:center}
.battle-screen .battle-bottom .bag-icon .skill-inner img{display:block;width:100%;height:100%;object-fit:cover;border:0;border-radius:0;padding:0;background:none}
.battle-screen .battle-bottom .battle-range-detail{white-space:normal;overflow:hidden;min-height:24px}
.battle-screen .battle-bottom .battle-desc{scrollbar-width:none}
.battle-screen .battle-bottom .battle-desc::-webkit-scrollbar{display:none}
@media(max-width:1000px){.battle-screen .battle-bottom[data-ui-frame]{grid-template-columns:minmax(0,1fr) minmax(180px,28%)}.battle-screen .battle-bottom .battle-command b{font-size:12px}}
@media(max-width:760px){.battle-screen{grid-template-rows:54px minmax(0,1fr) 290px}.battle-screen .battle-bottom[data-ui-frame]{height:290px;min-height:290px;max-height:290px;grid-template-columns:minmax(0,1fr);grid-template-rows:174px minmax(0,1fr)}.battle-screen .battle-bottom .battle-controls{height:112px;min-height:112px;flex-basis:112px;gap:4px}.battle-screen .battle-bottom .battle-command{height:104px;grid-template-rows:54px 17px 27px;gap:3px}.battle-screen .battle-bottom .skill-icon{width:min(54px,100%)}.battle-screen .battle-bottom .battle-command b{font-size:11px;line-height:17px}.battle-screen .battle-bottom .battle-command small{height:27px;min-height:27px}.battle-screen .battle-bottom .skill-cost-meter{width:min(54px,100%);height:27px}.battle-screen .battle-bottom:not(.enemy-turn) .battle-desc{max-height:36px}.battle-screen .battle-bottom .battle-range-detail{height:18px;min-height:18px;flex-basis:18px}}

/* Move only the painted lower map edge into the existing gap. */
.battle-screen .battle-field[data-ui-frame="battlefield"]>.map-frame-overlay{height:calc(100% + 14px)!important;max-height:none!important}
.battle-screen .skill-cost-meter>span{transform:translateY(-2px)}

/* Keep the extended map rail above the following panel's opaque background. */
.battle-screen .battle-field[data-ui-frame="battlefield"]{z-index:3;overflow:visible!important}
.battle-screen .battle-bottom[data-ui-frame]{z-index:2}
.battle-screen .battle-bottom .battle-controls{transform:translateY(12px)}

/* Fill the existing extended lower map frame without moving units or the command layout. */
.battle-screen .battle-field[data-ui-frame="battlefield"]::before{content:""!important;display:block!important;position:absolute;inset:0 0 -14px;z-index:0;pointer-events:none;background-image:var(--battle-background,url(combat/backstreet-dusk-background.webp));background-position:var(--battle-background-position,center bottom);background-size:cover;background-repeat:no-repeat;background-color:#29231f}
.battle-screen .battle-team.ally{transform:translateX(8px)}
.battle-screen .battle-bottom .battle-confirm-stack{display:grid;grid-template-rows:88px 22px 40px;gap:3px;justify-items:center;align-items:center;height:156px;align-self:start}
.battle-screen .battle-bottom .battle-confirm-crest{display:block;width:min(88px,100%);height:auto;aspect-ratio:1;border:0!important;outline:0;padding:0;margin:0;background:none!important;box-shadow:none!important;border-radius:50%;cursor:pointer;align-self:center}
.battle-screen .battle-confirm-crest img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.battle-screen .battle-confirm-crest:hover:not(:disabled),.battle-screen .battle-confirm-crest:focus-visible:not(:disabled){filter:brightness(1.14) drop-shadow(0 0 5px #dbc18d80)}
.battle-screen .battle-confirm-crest:disabled{filter:grayscale(1) brightness(.5);opacity:.6;cursor:default}
.battle-screen .battle-confirm-stack>b{margin:0;font-size:15px;line-height:22px;color:#e8dcc5;white-space:nowrap}
@media(max-width:760px){.battle-screen .battle-bottom .battle-confirm-stack{height:104px;grid-template-rows:54px 17px 27px}.battle-screen .battle-bottom .battle-confirm-crest{width:min(54px,100%)}.battle-screen .battle-confirm-stack>b{font-size:11px;line-height:17px}}

/* Explicit cells override the former confirmation button's column 3 / rows 2–4. */
.battle-screen .battle-bottom .battle-confirm-stack{grid-template-columns:minmax(0,1fr)}
.battle-screen .battle-bottom .battle-confirm-crest[data-confirm]{grid-column:1;grid-row:1;width:min(88px,100%);height:auto;min-height:0;max-height:88px;justify-self:center;align-self:center;font:inherit}
.battle-screen .battle-bottom .battle-confirm-stack>b{grid-column:1;grid-row:2;display:block;justify-self:center;align-self:center;color:#88bce9;pointer-events:none}
.battle-screen .battle-bottom .battle-confirm-crest:disabled+b{color:#85898f;opacity:.65}
@media(max-width:1000px){.battle-screen .battle-bottom .battle-confirm-stack>b{font-size:12px}}
@media(max-width:760px){.battle-screen .battle-bottom .battle-confirm-crest[data-confirm]{width:min(54px,100%);max-height:54px}.battle-screen .battle-bottom .battle-confirm-stack>b{font-size:11px}}
/* Full-width battle panels with split horizontal order. */
.battle-screen{grid-template-columns:minmax(0,1fr);grid-template-rows:82px minmax(0,1fr) 270px;padding:12px 18px;row-gap:8px;column-gap:0;overflow:hidden}
.battle-screen .battle-top{grid-column:1;grid-row:1;display:grid;grid-template-columns:220px minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:0;border:0;min-width:0}
.battle-screen .battle-top .battle-round{grid-column:1;position:static}
.battle-screen .battle-top .battle-playback-actions{grid-column:3}
.battle-screen .battle-top .battle-exit-actions,.battle-screen .battle-top>[data-close]{grid-column:4}
.battle-screen .battle-order{position:absolute;top:23px;left:50%;transform:translateX(-50%);grid-column:auto;grid-row:auto;width:min(760px,calc(100% - 590px));height:58px;max-height:none;display:grid;grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr);align-items:center;padding:0 30px;margin:0;border:0;box-sizing:border-box;overflow:visible;background:transparent url(ui/turn-order-horizontal-v1.webp) center/100% 100% no-repeat;z-index:5}
.battle-screen .battle-order::before{display:none!important}
.battle-screen .order-side{display:flex;align-items:center;gap:clamp(4px,1vw,14px);min-width:0;height:100%;padding:0 7px}
.battle-screen .order-allies{flex-direction:row-reverse;justify-content:flex-start}
.battle-screen .order-enemies{flex-direction:row;justify-content:flex-start}
.battle-screen .battle-order .order-token{position:relative;left:auto;top:auto;transform:none;flex:0 1 44px;width:44px;height:auto;aspect-ratio:1;min-width:0;max-width:44px;max-height:44px;padding:2px;margin:0;overflow:visible;color:#e3ce9d}
.battle-screen .battle-order .order-token canvas{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
.battle-screen .battle-order .order-token small{position:absolute;right:-3px;bottom:-4px;display:grid;place-items:center;width:15px;height:15px;border-radius:50%;background:#14202b;border:1px solid #aa8a54;font:10px Georgia,serif;line-height:1}
.battle-screen .battle-order .order-token.next{border-color:#bde6f3;box-shadow:0 0 9px #8ebbdc99}
.battle-screen .battle-order .order-token.enemy.next{border-color:#e9b49e;box-shadow:0 0 9px #d9937488}
.battle-screen .battle-order .order-diamond{position:relative;grid-column:2;grid-row:1;left:auto;top:auto;justify-self:center;align-self:center;transform:rotate(45deg);width:17px;height:17px;margin:0}
.battle-screen .battle-order .order-allies{grid-column:1;grid-row:1}
.battle-screen .battle-order .order-enemies{grid-column:3;grid-row:1}
.battle-screen .battle-field[data-ui-frame="battlefield"]{grid-column:1;grid-row:2;width:100%;height:100%;min-height:0;margin:0;padding-bottom:4px;box-sizing:border-box}
.battle-screen .battle-field[data-ui-frame="battlefield"]::before{inset:0}
.battle-screen .battle-field[data-ui-frame="battlefield"]>.map-frame-overlay{inset:0!important;width:100%!important;height:100%!important;max-height:100%!important}
.battle-screen .battle-bottom[data-ui-frame],.battle-screen .battle-result[data-ui-frame]{grid-column:1;grid-row:3;width:100%;height:100%;min-height:0;max-height:none;box-sizing:border-box;margin:0;align-self:stretch}
.battle-screen .battle-result{display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:30px 32px;background:#080c12;overflow:hidden}
.battle-screen .battle-result h3{margin:0;text-align:center}
.battle-screen .battle-result .battle-rewards{overflow:auto;align-self:stretch;flex:1;min-height:0;margin:16px 0}
.battle-screen .battle-result>[data-close],.battle-screen .battle-result>[data-retry]{width:auto;margin:0}
@media(max-width:1100px){.battle-screen .battle-top{grid-template-columns:160px minmax(0,1fr) auto auto}.battle-screen .battle-order{width:calc(100% - 490px);padding:0 18px}.battle-screen .order-side{gap:4px;padding:0 3px}.battle-screen .battle-order .order-token{max-width:36px}.battle-screen .battle-round-art{width:155px;flex-basis:155px;font-size:16px}}
@media(max-width:760px){.battle-screen{padding:8px 10px;grid-template-columns:minmax(0,1fr);grid-template-rows:116px minmax(0,1fr) 290px;gap:6px}.battle-screen .battle-top{align-self:start;height:46px;grid-template-columns:120px minmax(0,1fr) auto auto;gap:4px}.battle-screen .battle-order{top:62px;width:min(540px,calc(100% - 36px));height:48px;padding:0 22px;grid-template-columns:minmax(0,1fr) 30px minmax(0,1fr)}.battle-screen .battle-order .order-token{max-width:32px;max-height:32px}.battle-screen .battle-order .order-diamond{width:13px;height:13px}.battle-screen .battle-field[data-ui-frame="battlefield"]{width:100%;height:100%;margin:0}.battle-screen .battle-bottom[data-ui-frame]{grid-template-rows:174px minmax(0,1fr)}.battle-screen .battle-result{padding:22px}}

/* Preserve the rail's native proportions and join the map to the lower panel. */
.battle-screen{grid-template-rows:58px minmax(0,1fr) 270px;row-gap:0}
.battle-screen .battle-order{top:12px;height:52px;background-image:url(ui/turn-order-horizontal-fit-v2.webp);background-size:contain;background-position:center;background-repeat:no-repeat}
.battle-screen .battle-bottom[data-ui-frame],.battle-screen .battle-result[data-ui-frame]{padding-top:18px}
@media(max-width:760px){.battle-screen{grid-template-rows:108px minmax(0,1fr) 290px;row-gap:0}.battle-screen .battle-order{top:58px;height:44px}.battle-screen .battle-bottom[data-ui-frame]{padding-top:10px}}

/* Reset the former vertical track's implicit rows and center each half on its rail. */
.battle-screen .battle-order{grid-template-rows:minmax(0,1fr);justify-items:stretch;align-content:stretch;gap:0}
.battle-screen .battle-order .order-side{width:100%;box-sizing:border-box;justify-self:stretch;align-self:stretch;padding:0;gap:8px;transform:translateY(1px)}
.battle-screen .battle-order .order-token{flex:0 1 44px}
.battle-screen .battle-order .order-diamond{transform:translateY(4px) rotate(45deg)}
.battle-screen .battle-field[data-ui-frame="battlefield"]::before{inset:0 0 -14px}
.battle-screen .battle-field[data-ui-frame="battlefield"]>.map-frame-overlay{height:calc(100% + 14px)!important;max-height:none!important}
@media(max-width:760px){.battle-screen .battle-order .order-side{gap:4px}.battle-screen .battle-order .order-token{flex-basis:32px}}
.battle-screen .battle-order{grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr)}
@media(max-width:760px){.battle-screen .battle-order{grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr)}}

/* Small vertical correction and matching circular exit controls. */
.battle-screen .battle-order .order-diamond{transform:translateY(1px) rotate(45deg)}
.battle-exit-icon{fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.battle-screen .battle-top .battle-orb-control.battle-withdraw{color:#ef9288;filter:sepia(.7) saturate(2) hue-rotate(315deg) brightness(.9)}
.battle-screen .battle-top .battle-orb-control.battle-withdraw:hover{color:#ffc6b9;filter:sepia(.7) saturate(2) hue-rotate(315deg) brightness(1.1)}
.battle-screen .battle-top .battle-orb-control:disabled{opacity:.4;cursor:default;filter:grayscale(1)}

/* Enemy actor uses the same woven foot light with a red tint. */
.battle-screen .battle-unit.enemy.current .battle-sprite::after{background-image:url(ui/selection-light-woven-gold.webp);filter:sepia(1) saturate(3.5) hue-rotate(315deg) brightness(.68) contrast(.82);opacity:.85}

/* Enemy action uses the red counterpart of the player action brand. */
.battle-screen .battle-enemy-action{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;padding:4px 0}
.battle-screen .battle-enemy-action img{display:block;width:88px;height:88px;object-fit:contain;filter:drop-shadow(0 0 5px #9d182c55)}
.battle-screen .battle-enemy-action b{font-weight:500;font-size:18px;line-height:1.4;letter-spacing:3px;color:#ec7777;text-shadow:0 1px 2px #200509}
.battle-screen .battle-bottom.enemy-turn .battle-desc:empty{display:none}
@media(max-width:760px){.battle-screen .battle-enemy-action img{width:64px;height:64px}.battle-screen .battle-enemy-action b{font-size:16px}}

.battle-screen .battle-result h3{margin-top:8px;color:#8bbbd9;text-shadow:0 1px 2px #09121d}

.battle-screen .battle-result-heading{display:flex;flex-direction:column;align-items:center;gap:4px;flex:none;width:100%;text-align:center}
.battle-screen .battle-victory-troupe-mark{display:block;width:64px;height:64px;object-fit:contain;pointer-events:none}
.battle-screen .battle-result .battle-result-heading h3{margin:0;color:#8bbbd9;text-align:center}

/* Settlement stays in the command panel; rewards use compact slots. */
.battle-screen .battle-result,.battle-screen .battle-result[data-ui-frame]{grid-column:1;grid-row:3;width:100%;height:100%;min-height:0;margin:0;align-self:stretch;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:4px;padding:18px 32px 20px;overflow:hidden}
.battle-screen .battle-result .battle-rewards{width:100%;flex:1;min-height:0;margin:4px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;overflow:auto}
.battle-screen .battle-result-actions{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;max-width:100%;flex:none}
.battle-screen .battle-result-actions>button{margin:0}
body .battle-result .reward-items{margin:0;gap:6px;padding:0;max-width:100%}
body .battle-result .reward-items>.item-tile{flex:0 0 48px;width:48px!important;height:48px!important;min-width:48px;min-height:48px!important;max-width:48px;max-height:48px}
body .battle-result .reward-items>.item-tile .item-icon{width:26px!important;height:26px!important}
body .battle-result .reward-items>.item-tile>small{font-size:10px!important}
@media(max-width:760px){.battle-screen .battle-result,.battle-screen .battle-result[data-ui-frame]{padding:18px 22px 20px}}

.battle-test-heading{flex-wrap:wrap;gap:10px}.battle-test-heading h3{margin-right:auto}

/* Exploration party positions: match the formation screen's four soldiers. */
.route-formation-dialog{transform:translateY(-14px)}
.route-formation-dialog .supplies-head{align-items:center;padding-top:12px}
.route-formation-dialog .supplies-head h2{transform:translateY(-6px)}
.route-formation-dialog .route-position-pieces{position:static;display:flex;align-items:center;justify-content:center;gap:5px;margin:0;width:auto;height:30px}
.route-formation-dialog .route-position-pieces .party-position-piece{width:18px;height:26px;flex:none}
.route-formation-dialog .route-formation-slot{grid-template-rows:30px 48px auto;align-content:start}
@media(max-width:560px){.route-formation-dialog{transform:translateY(-8px)}.route-formation-dialog .route-position-pieces{gap:2px}.route-formation-dialog .route-position-pieces .party-position-piece{width:14px;height:22px}}

/* Keep formation controls together, and optically center portraits in the painted cells. */
.route-formation-dialog .supplies-head{gap:14px}
.route-formation-dialog .route-formation-reset{margin-left:auto}
.route-formation-dialog .route-formation-slot>img,.route-formation-dialog .route-formation-slot>strong{transform:translateX(-8px)}
@media(max-width:560px){.route-formation-dialog .supplies-head{gap:10px}.route-formation-dialog .route-formation-slot>img,.route-formation-dialog .route-formation-slot>strong{transform:translateX(-5px)}}

/* Center victory reward artwork within its frame. */
body .battle-result .reward-items>.item-tile>b{transform:translateY(3px)}
