/* Full-screen moonlit arena. Scoped so the rest of the game keeps its own layout. */
body.battle-mode{overflow:hidden;background:#102733}
body.battle-mode .prototype-ribbon,body.battle-mode .shell>.topbar{display:none!important}
body.battle-mode #battleScreen.active{position:fixed;inset:0;z-index:45;display:block;width:100vw;height:100svh;min-height:680px;padding:0;margin:0;overflow:hidden;background:#e8dcc4;color:#f6e8c6}
body.battle-mode .battle-screen:before,body.battle-mode .battle-screen:after{content:"";position:absolute;z-index:0;inset:0 0 auto;height:91px;background:linear-gradient(180deg,#fff7e7,#e8dbc0);pointer-events:none}
body.battle-mode .battle-screen:after{inset:auto 0 0;height:53px;border-top:2px solid #bfa16e;background:linear-gradient(#f6ead3,#e7d7b7)}
body.battle-mode .battle-status{position:absolute;z-index:10;top:0;left:0;right:0;height:82px;min-height:0;padding:8px clamp(18px,3vw,60px);display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;border:0;border-bottom:3px double #a88750;border-radius:0;background:linear-gradient(180deg,#fff9e9,#e9dac0);box-shadow:0 3px 13px #07131c66;color:#4c3424}
body.battle-mode .battle-back{justify-self:start;min-height:43px;padding:7px 16px;border:1px solid #aa8750;border-radius:25px;background:#173640;color:#f4dfb3;font-size:14px;box-shadow:inset 0 0 0 2px #d4b56d38}
body.battle-mode .battle-heading{text-align:center;min-width:300px}
body.battle-mode .battle-heading strong{font:700 clamp(28px,3vw,46px)/1 var(--display);letter-spacing:.17em;color:#452819;text-shadow:0 2px #fff7df}
body.battle-mode .battle-heading small{margin-top:4px;font-size:12px;letter-spacing:.14em;color:#8e6c45}
body.battle-mode .battle-stat-pills{justify-self:end;margin:0;gap:7px}
body.battle-mode .battle-stat-pills span{padding:4px 8px;border:0;background:transparent;color:#6a4d2e;font-size:13px;white-space:nowrap}
body.battle-mode .battle-stat-pills span:last-child{display:none}
body.battle-mode .battle-stat-pills b{font-size:23px;color:#8c5529}
body.battle-mode .battle-critical{display:none}
body.battle-mode .battlefield{position:absolute;inset:79px 12px 50px;display:block;min-height:0!important;padding:0;border:3px solid #b99658;border-radius:45% 45% 8% 8% / 12% 12% 4% 4%;background:#102c3b url('../assets/image-001.webp') center 57%/cover no-repeat;box-shadow:0 0 0 5px #eee0c1,0 0 0 7px #a78148,0 15px 35px #10222acc;overflow:hidden;isolation:isolate}
body.battle-mode .battlefield:before{z-index:0;background:linear-gradient(90deg,#061e2bbd 0%,#0a25361f 33%,#0a243020 67%,#061e2bbd 100%),linear-gradient(0deg,#082431dc 0%,transparent 49%,#051a2e41 100%)}
body.battle-mode .battlefield:after{content:"";position:absolute;inset:10px;border:1px solid #e0bc754f;border-radius:inherit;z-index:8;pointer-events:none}
body.battle-mode .enemy-info{position:absolute;z-index:6;top:18px;left:clamp(28px,4vw,80px);right:clamp(28px,4vw,80px);padding:8px 10px;background:transparent;align-items:flex-start;text-shadow:0 2px 6px #03171d}
body.battle-mode .enemy-name{font-size:21px;color:#fff0cb}
body.battle-mode .enemy-name small{font-size:12px;color:#d9d1b1}
body.battle-mode .enemy-meta{max-width:38%;gap:3px}
body.battle-mode .enemy-meta span{padding:3px 7px;border-color:#ddc78a66;background:#102b35ad;color:#e6dfcc;font-size:11px}
body.battle-mode .hp-track{width:clamp(170px,22vw,290px);height:9px;margin-top:7px;border-color:#e7c379a8;background:#071a22;box-shadow:0 0 9px #ba963e55}
body.battle-mode .hp-track i{background:linear-gradient(90deg,#9e3933,#dc7b5e,#f2b57c)}
body.battle-mode .enemy-art{left:70%;top:20%;width:clamp(250px,28vw,450px);height:clamp(230px,29vw,420px);z-index:3;opacity:.93;filter:drop-shadow(0 0 21px #7acbc0a3) drop-shadow(0 22px 18px #031922);animation:arena-enemy-breathe 4.3s ease-in-out infinite}
body.battle-mode .enemy-art:after{left:16%;right:16%;bottom:1%;height:11%;border-color:#b3d9d099;box-shadow:0 0 30px #9ee1ce9c}
body.battle-mode .battlefield.battle-impact .enemy-art{animation:arena-enemy-hit .65s ease-out}
body.battle-mode .battle-hero-figure{position:absolute;z-index:4;left:28%;bottom:30%;width:clamp(260px,34vw,520px);height:min(60%,600px);padding:0;border:0;background:none;cursor:pointer;transform:translateX(-50%);filter:drop-shadow(0 24px 20px #02171ac4);transition:filter .25s}
body.battle-mode .battle-hero-figure:hover{filter:drop-shadow(0 0 22px #e9bd66aa) drop-shadow(0 20px 18px #02171acc)}
body.battle-mode .battle-hero-halo{position:absolute;z-index:0;left:12%;right:12%;bottom:3%;height:28%;border:2px solid color-mix(in srgb,var(--battle-element),#f5d797 50%);border-radius:50%;transform:perspective(180px) rotateX(58deg);box-shadow:0 0 20px color-mix(in srgb,var(--battle-element),#f6d78a 55%),0 0 50px #d4a55988,inset 0 0 22px #dfaa57b0;animation:arena-halo 3.4s ease-in-out infinite}
body.battle-mode .battle-hero-art,body.battle-mode .battle-hero-mesh{position:absolute;z-index:1;inset:0;width:100%;height:100%;object-fit:contain;object-position:center bottom;pointer-events:none;filter:drop-shadow(0 0 10px #ecc36d76)}
body.battle-mode .battle-hero-art{animation:arena-idle 3.8s ease-in-out infinite}
body.battle-mode .battle-hero-mesh{display:none}
body.battle-mode .battle-hero-figure.has-mesh .battle-hero-art{visibility:hidden}
body.battle-mode .battle-hero-figure.has-mesh .battle-hero-mesh{display:block}
body.battle-mode .battle-hero-figure.is-previewing{animation:arena-anticipate 1.4s ease-in-out}
body.battle-mode .battle-hero-figure.is-casting{animation:arena-strike 1.2s ease-in-out}
body.battle-mode .battle-hero-figure.is-hit{animation:arena-hero-hit .55s ease-out}
body.battle-mode .battle-hero-plaque{position:absolute;z-index:4;left:50%;bottom:-19px;transform:translateX(-50%);min-width:150px;padding:5px 15px;border:1px solid #ddb971;border-radius:18px;background:#12323be8;color:#fce2a2;font:700 16px var(--display);white-space:nowrap;box-shadow:0 3px 15px #03151bad}
body.battle-mode .battle-realm-sign{position:absolute;right:5%;top:16%;z-index:2;color:#e2be7a;font:700 15px var(--display);letter-spacing:.2em;text-shadow:0 1px 8px #051e28}
body.battle-mode .formation-chip{z-index:5;right:3%;top:33%;max-width:220px;padding:7px 10px;border-color:#c6aa66a8;border-radius:7px;background:#102a38d8;color:#ebd59e;font-size:12px}
body.battle-mode .formation-chip small{font-size:11px}
body.battle-mode .field-callout{z-index:5;left:50%;top:auto;bottom:clamp(260px,32%,340px);transform:translateX(-50%);max-width:none;min-width:270px;padding:7px 27px;border:1px solid #ddbb72;border-radius:22px;background:#153a43db;text-align:center;color:#fff2d4;font-size:15px;box-shadow:0 0 19px #e4bb7277;white-space:nowrap}
body.battle-mode .field-callout strong{display:inline;color:#ffdf97;margin-right:10px}
body.battle-mode .ally-row{position:absolute;z-index:6;top:68px;left:clamp(30px,4vw,80px);width:min(33%,450px);display:flex;gap:7px;padding:0;background:none}
body.battle-mode .ally{min-height:0;width:auto;flex:1 1 0;padding:5px 6px;border-color:#cfb67a7d;border-radius:8px;background:#112b35dc;color:#efdfb8;box-shadow:0 4px 12px #051e2d88;gap:5px}
body.battle-mode .ally.selected{border-color:#f2d28c;box-shadow:0 0 0 1px #ecc876,0 0 15px #e6be6a88;transform:none}
body.battle-mode .ally-avatar{display:none}
body.battle-mode .ally-text b{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.battle-mode .ally-text b em{display:none}
body.battle-mode .vital-line{font-size:10px;color:#d0d2c1;margin-top:2px}
body.battle-mode .vital-track{height:3px;margin-top:2px;background:#203f46}
body.battle-mode .battle-live-log{z-index:5;top:auto;left:auto;right:3%;bottom:clamp(230px,27%,300px);max-width:260px;max-height:90px;overflow:hidden;padding:5px 8px;border-left:1px solid #d9bb75;background:#0b2b3699;font-size:11px;line-height:1.4}
body.battle-mode .battle-enemy-roster{position:absolute;z-index:6;right:4%;top:70px;max-width:35%;margin:0}
body.battle-mode .battle-enemy-roster button{min-height:32px;padding:4px 8px;flex-basis:130px}
body.battle-mode .battle-enemy-roster span,body.battle-mode .battle-enemy-roster small{font-size:10px}
body.battle-mode .boss-intent{z-index:7;right:3%;top:39%;padding:8px 10px;max-width:210px;font-size:11px}
body.battle-mode .action-panel{position:absolute;z-index:9;left:50%;bottom:57px;transform:translateX(-50%);width:min(1190px,88%);max-height:28%;min-height:160px;display:grid;grid-template-columns:150px minmax(0,1fr) 144px;gap:11px;align-items:stretch;padding:12px 15px 7px;border:2px solid #dfbf7d;border-radius:20px 20px 7px 7px;background:linear-gradient(180deg,#102f3bea,#0a222de8);color:#f3e2bd;box-shadow:0 0 0 3px #10252a88,0 9px 26px #031820d9;overflow:auto;scrollbar-width:thin}
body.battle-mode .actor-summary{padding:6px 2px;color:#e8d19a}
body.battle-mode .actor-summary .eyebrow{font-size:10px;letter-spacing:.14em;color:#bcad86}
body.battle-mode .actor-summary h3{font-size:21px;line-height:1.25;margin:6px 0;color:#f8e6b9}
body.battle-mode .actor-summary p{font-size:12px;color:#b6d1cc}
body.battle-mode .skills{gap:7px}
body.battle-mode .skill{min-height:69px;padding:7px 6px;display:flex;flex-direction:column;justify-content:center;gap:3px;border:1px solid #ad8d58;border-radius:50% 50% 15% 15% / 24% 24% 12% 12%;background:linear-gradient(145deg,#543829e6,#261f24ee);color:#f7e9ca;text-align:center;transition:transform .18s,box-shadow .18s,background .18s}
body.battle-mode .skill.selected,body.battle-mode .skill:hover:enabled{transform:translateY(-5px);border-color:#f9d88a;background:linear-gradient(145deg,#7b4d2a,#3c2927);box-shadow:0 0 0 2px #e2bb6e75,0 0 23px #f2bf63a8}
body.battle-mode .skill:disabled{background:#1a3038;color:#a2afa9;opacity:.68}
body.battle-mode .skill-emblem{width:28px;height:28px;font-size:16px;margin:auto;border-color:#ddb96e;background:#18343b;color:#f1d89d}
body.battle-mode .skill-copy b{font-size:12px;color:inherit}
body.battle-mode .skill-copy small,body.battle-mode .skill-copy>span{font-size:10px;color:#cab891;margin:0}
body.battle-mode .action-confirm{display:flex;flex-direction:column;gap:6px}
body.battle-mode .action-confirm .primary-button{min-height:43px;border:1px solid #f4d489;border-radius:7px;background:linear-gradient(145deg,#eac780,#aa7736);color:#302521;font-size:14px;font-weight:700;box-shadow:0 0 17px #eac47191}
body.battle-mode .action-confirm .primary-button:disabled{opacity:.62;box-shadow:none}
body.battle-mode .action-confirm .secondary-button{min-height:31px;padding:5px;border-color:#a78b59;background:#25454a;color:#e8d0a0;font-size:11px}
body.battle-mode .battle-command{grid-template-columns:1fr 185px;gap:6px;padding:5px 0 0;border-color:#c9a86c55;color:#d1d5c6}
body.battle-mode .battle-skill-description small{font-size:11px;color:#f1d289}
body.battle-mode .battle-skill-description p{font-size:11px;line-height:1.35;margin:2px 0}
body.battle-mode .battle-passive{font-size:10px;color:#a9d8c5}
body.battle-mode .battle-target-picker label{font-size:10px;margin:0}
body.battle-mode .battle-target-picker select{min-height:28px;padding:2px 6px;background:#16323b;color:#f4e5c4;border-color:#ae9562;font-size:11px}
body.battle-mode .battle-skill-reference{display:none}
body.battle-mode .battle-footer{position:absolute;z-index:10;left:0;right:0;bottom:0;min-height:52px;display:flex;align-items:center;gap:8px;padding:6px clamp(30px,5vw,95px);border:0;border-top:2px solid #d5b875;border-radius:0;background:linear-gradient(180deg,#f8ecd4ed,#eadab7f4);color:#523e2a;box-shadow:0 -5px 14px #081b2788}
body.battle-mode .footer-tips{display:flex;align-items:center;gap:15px;font-size:11px}
body.battle-mode .control-ring{display:none}
body.battle-mode .battle-toggles{margin-left:auto;display:flex;gap:7px}
body.battle-mode .tiny-toggle{min-height:31px;padding:3px 10px;border:1px solid #9b774a;border-radius:18px;background:#18343b;color:#f1dfb9;font-size:11px}
body.battle-mode .battle-cast-banner{position:absolute;z-index:12;left:50%;top:21%;transform:translateX(-50%) scale(.92);padding:8px 24px;border:1px solid #f1d18c;border-radius:25px;background:#122f3ee8;color:#fff2c8;font:700 clamp(20px,2.1vw,32px) var(--display);letter-spacing:.1em;white-space:nowrap;text-shadow:0 0 12px #eac176;box-shadow:0 0 33px #f0d080a0;opacity:0;pointer-events:none;transition:opacity .24s,transform .24s}
body.battle-mode .battlefield[data-phase="windup"] .battle-cast-banner,body.battle-mode .battlefield[data-phase="impact"] .battle-cast-banner,body.battle-mode .battlefield[data-phase="retaliate"] .battle-cast-banner,body.battle-mode .battlefield[data-phase="preview"] .battle-cast-banner{opacity:1;transform:translateX(-50%) scale(1)}
body.battle-mode .battle-impact-layer{position:absolute;inset:0;z-index:7;pointer-events:none}
body.battle-mode .battle-projectile{position:absolute;left:42%;top:53%;width:27%;height:10px;border-radius:50%;background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--battle-element),white 55%) 38%,#fff 75%,transparent);box-shadow:0 0 17px 8px color-mix(in srgb,var(--battle-element),#f5cb78 45%),0 0 44px 12px #d6b76199;transform:rotate(-14deg) scaleX(.05);transform-origin:left;opacity:0}
body.battle-mode .battle-impact-bloom{position:absolute;left:69%;top:46%;width:160px;height:160px;border:3px solid #fff1a9;border-radius:50%;box-shadow:0 0 34px #fff0a7,0 0 80px #eebf7c;background:radial-gradient(circle,#fff8d8cc,transparent 58%);transform:translate(-50%,-50%) scale(.1);opacity:0}
body.battle-mode .battlefield[data-phase="impact"] .battle-projectile{animation:arena-projectile .72s ease-out forwards}
body.battle-mode .battlefield[data-phase="impact"] .battle-impact-bloom{animation:arena-bloom .72s ease-out forwards}
body.battle-mode .battle-float-value{position:absolute;z-index:14;left:70%;top:36%;color:#ffdda0;font:700 35px var(--display);text-shadow:0 2px 4px #351c12,0 0 15px #ffc969;pointer-events:none;animation:arena-float 1.5s ease-out forwards}
body.battle-mode .battle-float-value.ally{left:29%;top:33%;color:#fc9e8c}
@keyframes arena-idle{50%{transform:translateY(-10px) rotate(.7deg)}}
@keyframes arena-halo{50%{opacity:.6;transform:perspective(180px) rotateX(58deg) scale(1.13)}}
@keyframes arena-enemy-breathe{50%{transform:translateX(-50%) translateY(-8px) scale(1.025)}}
@keyframes arena-enemy-hit{20%{transform:translateX(calc(-50% + 25px)) scale(1.07);filter:brightness(2)}55%{transform:translateX(calc(-50% - 14px))}100%{transform:translateX(-50%)}}
@keyframes arena-anticipate{35%{transform:translateX(-50%) translateY(12px) scale(.98)}70%{transform:translateX(-50%) translateY(-14px) scale(1.04)}}
@keyframes arena-strike{45%{transform:translateX(-41%) translateY(-12px) scale(1.08)}75%{transform:translateX(-50%)}}
@keyframes arena-hero-hit{28%{transform:translateX(calc(-50% - 23px));filter:brightness(1.6)}65%{transform:translateX(calc(-50% + 8px))}}
@keyframes arena-projectile{20%{opacity:1;transform:rotate(-14deg) scaleX(.2)}70%{opacity:1;transform:rotate(-14deg) scaleX(1)}100%{opacity:0;transform:rotate(-14deg) scaleX(1)}}
@keyframes arena-bloom{20%{opacity:0}52%{opacity:1;transform:translate(-50%,-50%) scale(.5)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.6)}}
@keyframes arena-float{15%{opacity:1;transform:translateY(-10px) scale(1.25)}100%{opacity:0;transform:translateY(-85px) scale(.95)}}
@media(max-width:1050px){body.battle-mode .battle-stat-pills span:nth-child(2){display:none}body.battle-mode .battle-hero-figure{left:30%;bottom:32%;height:55%}body.battle-mode .enemy-art{left:72%;top:24%;width:31vw}body.battle-mode .action-panel{width:94%;grid-template-columns:105px minmax(0,1fr) 105px;padding:8px}body.battle-mode .skill-copy>span{display:none}body.battle-mode .actor-summary h3{font-size:17px}body.battle-mode .battle-live-log{display:none}}
@media(max-width:760px){body.battle-mode{overflow:auto}body.battle-mode #battleScreen.active{position:relative;height:auto;min-height:100svh;overflow:visible;padding:0 0 62px}body.battle-mode .battle-status{position:relative;height:72px;grid-template-columns:auto 1fr auto;padding:5px 11px}body.battle-mode .battle-back{padding:5px 9px;font-size:11px}body.battle-mode .battle-heading{min-width:0}body.battle-mode .battle-heading strong{font-size:23px}body.battle-mode .battle-heading small{font-size:10px;letter-spacing:0}body.battle-mode .battle-stat-pills span{font-size:10px;padding:0}body.battle-mode .battle-stat-pills b{font-size:16px}body.battle-mode .battlefield{position:relative;inset:auto;display:block;margin:10px 9px 0;min-height:880px!important;border-radius:22px;background-position:center top}body.battle-mode .enemy-info{top:12px;left:10px;right:10px;padding:0}body.battle-mode .enemy-name{font-size:15px}body.battle-mode .enemy-name small{display:block;margin:0;font-size:10px}body.battle-mode .enemy-meta{display:none}body.battle-mode .ally-row{top:75px;left:10px;width:53%}body.battle-mode .enemy-art{position:absolute;left:75%;top:145px;width:44%;height:220px;transform:translateX(-50%)}body.battle-mode .battle-hero-figure{left:32%;bottom:auto;top:145px;width:56%;height:260px}body.battle-mode .battle-hero-plaque{font-size:11px;bottom:-11px;min-width:100px}body.battle-mode .formation-chip{top:380px;right:10px;max-width:175px}body.battle-mode .field-callout{top:407px;bottom:auto;min-width:0;width:80%;white-space:normal;font-size:11px;padding:5px}body.battle-mode .battle-live-log{display:none}body.battle-mode .battle-enemy-roster{top:105px;right:9px;max-width:40%}body.battle-mode .boss-intent{top:320px;right:9px;max-width:160px}body.battle-mode .action-panel{position:absolute;left:8px;right:8px;bottom:57px;transform:none;width:auto;max-height:none;display:grid;grid-template-columns:1fr;padding:9px;gap:6px;border-radius:14px}body.battle-mode .actor-summary{display:none}body.battle-mode .skills{grid-template-columns:repeat(4,1fr);gap:4px}body.battle-mode .skill{min-height:69px;padding:4px 1px}body.battle-mode .skill-copy b{font-size:10px}body.battle-mode .skill-emblem{width:24px;height:24px;font-size:14px}body.battle-mode .action-confirm{display:grid;grid-template-columns:1fr 1fr}body.battle-mode .action-confirm .primary-button,body.battle-mode .action-confirm .secondary-button{min-height:35px;font-size:11px}body.battle-mode .battle-command{grid-template-columns:1fr 120px}body.battle-mode .battle-skill-description p{font-size:10px}body.battle-mode .battle-footer{min-height:52px;padding:4px 8px}body.battle-mode .footer-tips{font-size:9px;gap:4px}body.battle-mode .footer-tips>span:last-child{display:none}body.battle-mode .tiny-toggle{font-size:10px;padding:3px 7px}body.battle-mode .battle-cast-banner{top:17%;font-size:15px;max-width:85%;white-space:normal;text-align:center}body.battle-mode .battle-projectile{left:43%;top:35%}body.battle-mode .battle-impact-bloom{left:75%;top:30%;width:95px;height:95px}body.battle-mode .battle-float-value{left:75%;top:24%;font-size:23px}body.battle-mode .battle-float-value.ally{left:30%}}
@media(prefers-reduced-motion:reduce){body.battle-mode .battle-hero-art,body.battle-mode .battle-hero-halo,body.battle-mode .enemy-art,body.battle-mode .battle-hero-figure{animation-duration:.01ms!important;transition:none!important}}

/* Immersive stage: floating vitals and rune commands, with no enclosing frame. */
body.battle-mode #battleScreen.active{background:#071c29}
body.battle-mode .battle-screen:before,body.battle-mode .battle-screen:after{display:none}
body.battle-mode .battlefield{inset:0;border:0;border-radius:0;box-shadow:none;background-position:center 54%}
body.battle-mode .battlefield:after{display:none}
body.battle-mode .battlefield:before{background:linear-gradient(180deg,#031622b8 0%,#03162232 19%,transparent 42%,#031a24b8 100%),linear-gradient(90deg,#03172378,transparent 35%,transparent 65%,#03172378)}
body.battle-mode .battle-status{height:82px;grid-template-columns:1fr auto 1fr;padding:7px clamp(20px,3vw,58px);border:0;background:linear-gradient(180deg,#071b28ed,#0a2435cc 75%,transparent);box-shadow:none;color:#f3e1bf}
body.battle-mode .battle-heading strong{color:#f9e6bb;text-shadow:0 2px 12px #f2be7191}
body.battle-mode .battle-heading small{color:#c9c6b2}
body.battle-mode .battle-stat-pills span{color:#e5d5b9}
body.battle-mode .battle-stat-pills b{color:#f7d28e}
body.battle-mode .battle-back{border-color:#d3b572aa;background:#0b2633bd;color:#f4dfb9}
body.battle-mode .enemy-info{top:104px;left:auto;right:clamp(25px,4vw,80px);width:clamp(260px,27vw,385px);display:block;padding:9px 13px;border-left:2px solid #dbb879;background:linear-gradient(90deg,#0a2636ca,#0a263600);text-align:right}
body.battle-mode .enemy-info>div:first-child{display:flex;flex-direction:column;align-items:flex-end}
body.battle-mode .enemy-name{font-size:20px}
body.battle-mode .enemy-name small{display:block;margin:2px 0 0;font-size:12px}
body.battle-mode .enemy-meta{max-width:none;margin-top:8px;justify-content:flex-end}
body.battle-mode .enemy-meta span{font-size:11px}
body.battle-mode .hp-track{width:min(100%,310px);height:10px;margin-top:8px}
body.battle-mode .ally-row{top:112px;left:clamp(25px,4vw,80px);width:min(37%,500px);gap:7px}
body.battle-mode .ally{padding:8px 10px;border:0;border-left:2px solid #e7c07a;border-radius:0;background:linear-gradient(90deg,#0a2636d4,#0a263600);box-shadow:none}
body.battle-mode .ally.selected{border-color:#f7d891;box-shadow:none;transform:none}
body.battle-mode #allyRow .ally:only-child{flex:0 1 285px}
body.battle-mode .ally-text b{font-size:14px;color:#f8dfae}
body.battle-mode .vital-line{font-size:11px}
body.battle-mode .vital-track{height:5px}
body.battle-mode .battle-realm-sign{display:none}
body.battle-mode .battle-enemy-roster{top:180px;right:4%}
body.battle-mode .enemy-art{top:25%;left:71%;filter:drop-shadow(0 0 24px #8dcbd18a) drop-shadow(0 24px 24px #05131c)}
body.battle-mode .battlefield[data-phase="retaliate"] .enemy-art{animation:arena-enemy-attack .87s ease-in-out both;filter:drop-shadow(0 0 35px #ccecf3) brightness(1.35)}
body.battle-mode .battle-hero-figure{bottom:26%;height:min(61%,590px)}
body.battle-mode .formation-chip{top:39%;right:3%}
body.battle-mode .field-callout{bottom:clamp(285px,34%,380px);border-color:#d8b87999;background:#0e303cb8;box-shadow:0 0 22px #d1b07655}
body.battle-mode .battle-live-log{bottom:24%;right:3%}
body.battle-mode .battle-live-log{display:none}
body.battle-mode .action-panel{bottom:47px;width:min(1160px,88%);max-height:29%;min-height:0;grid-template-columns:135px minmax(0,1fr) 130px;gap:10px;padding:12px 8px 4px;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
body.battle-mode .action-panel:before{content:"";position:absolute;z-index:-1;left:-9%;right:-9%;top:-15px;bottom:-32px;background:radial-gradient(ellipse at 50% 100%,#031925ef 0%,#061d2cd9 50%,transparent 82%);pointer-events:none}
body.battle-mode .actor-summary{align-self:center;text-shadow:0 2px 8px #051923}
body.battle-mode .actor-summary h3{color:#ffe1a3}
body.battle-mode .skills{align-items:center;gap:6px}
body.battle-mode .skill{width:min(100%,116px);height:116px;min-height:0;justify-self:center;padding:8px 4px;border:2px solid #b58a4e;border-radius:50%;background:radial-gradient(circle at 36% 28%,#68452e,#2b2226 66%,#132b32);box-shadow:0 6px 22px #03141ec7,inset 0 0 0 3px #d8aa6259;color:#f8e4b7}
body.battle-mode .skill.selected,body.battle-mode .skill:hover:enabled{transform:translateY(-8px) scale(1.06);border-color:#ffe19b;background:radial-gradient(circle at 35% 27%,#916036,#5d352b 58%,#253036);box-shadow:0 0 0 3px #e3bd7b82,0 0 26px #f3be668c,inset 0 0 0 3px #f9d79576}
body.battle-mode .skill:disabled{border-color:#627077a8;background:radial-gradient(circle,#263b43,#152631);box-shadow:inset 0 0 0 2px #d8c49a1f;opacity:.72}
body.battle-mode .skill-emblem{width:31px;height:31px}
body.battle-mode .skill-copy small{font-size:11px}
body.battle-mode .skill-copy b{font-size:13px}
body.battle-mode .action-confirm{align-self:center;align-items:center}
body.battle-mode .action-confirm .primary-button{width:104px;height:104px;min-height:0;flex:none;padding:11px;border:2px solid #ffdf9c;border-radius:50%;background:radial-gradient(circle at 36% 28%,#f9df9b,#b77c38 62%,#553a29);font:700 16px/1.4 var(--display);color:#322217;box-shadow:0 0 30px #edbb6d99,inset 0 0 0 3px #fff0b489}
body.battle-mode .action-confirm .secondary-button{min-height:0;padding:1px 5px;border:0;border-bottom:1px solid #d6b478;background:none;color:#e8d3aa;font-size:11px}
body.battle-mode .battle-command{padding:1px 0 0;border:0;background:linear-gradient(90deg,#061f2ca8,#061f2c54);border-radius:10px}
body.battle-mode .battle-skill-description{padding-left:9px}
body.battle-mode .battle-skill-description small{color:#f6d599}
body.battle-mode .battle-footer{min-height:46px;padding:4px clamp(20px,4vw,70px);border:0;background:linear-gradient(0deg,#061c29eb,#061c2999 70%,transparent);box-shadow:none;color:#ead3a7}
body.battle-mode .footer-tips{color:#e9d5aa}
body.battle-mode .tiny-toggle{background:#17343ccc;border-color:#dfbd7daa}
body.battle-mode .battle-enemy-projectile{position:absolute;left:65%;top:46%;width:34%;height:13px;z-index:7;border-radius:50%;background:linear-gradient(90deg,transparent,#d3f9ff 20%,#9bdfe9 67%,transparent);box-shadow:0 0 16px 8px #71d4eab8,0 0 39px 12px #8dcbd1a1;transform:rotate(155deg) scaleX(.05);transform-origin:left;opacity:0}
body.battle-mode .battle-hero-bloom{position:absolute;left:29%;top:51%;width:150px;height:150px;z-index:7;border:3px solid #c5e6eb;border-radius:50%;background:radial-gradient(circle,#d5f2f5ab,transparent 62%);box-shadow:0 0 35px #9bdfe9;transform:translate(-50%,-50%) scale(.1);opacity:0}
body.battle-mode .battlefield[data-phase="retaliate"] .battle-enemy-projectile{animation:arena-enemy-projectile .87s ease-in-out forwards}
body.battle-mode .battlefield[data-phase="retaliate"] .battle-hero-bloom{animation:arena-hero-bloom .87s ease-out forwards}
body.battle-mode .battlefield[data-phase="retaliate"] .battle-cast-banner{border-color:#9cd7db;box-shadow:0 0 28px #7acbdaa8;text-shadow:0 0 10px #7fc4cf}
@keyframes arena-enemy-attack{25%{transform:translateX(-50%) translateY(-22px) scale(1.08)}56%{transform:translateX(-62%) translateY(3px) scale(1.12)}100%{transform:translateX(-50%)}}
@keyframes arena-enemy-projectile{15%{opacity:1;transform:rotate(155deg) scaleX(.12)}70%{opacity:1;transform:rotate(155deg) scaleX(1)}100%{opacity:0;transform:rotate(155deg) scaleX(1)}}
@keyframes arena-hero-bloom{20%{opacity:0}56%{opacity:1;transform:translate(-50%,-50%) scale(.65)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.5)}}
@media(max-width:1050px){body.battle-mode .enemy-info{top:91px;right:18px;width:230px}body.battle-mode .ally-row{top:100px;left:18px;width:38%}body.battle-mode #allyRow .ally:only-child{flex-basis:220px}body.battle-mode .battle-hero-figure{bottom:29%;height:54%}body.battle-mode .enemy-art{top:27%}body.battle-mode .action-panel{width:94%;grid-template-columns:95px minmax(0,1fr) 96px}body.battle-mode .skill{width:min(100%,92px);height:92px}body.battle-mode .skill-copy b{font-size:11px}body.battle-mode .action-confirm .primary-button{width:82px;height:82px;font-size:12px}body.battle-mode .field-callout{bottom:clamp(285px,34%,360px)}}
@media(max-width:760px){body.battle-mode #battleScreen.active{padding:0;min-height:850px}body.battle-mode .battle-status{position:absolute;z-index:11;height:67px;padding:4px 9px}body.battle-mode .battle-heading strong{font-size:21px}body.battle-mode .battlefield{position:relative;inset:auto;min-height:850px!important;margin:0;border-radius:0;background-position:center top}body.battle-mode .enemy-info{top:77px;right:8px;width:47%;padding:4px 5px}body.battle-mode .enemy-name{font-size:13px}body.battle-mode .enemy-name small{font-size:10px}body.battle-mode .enemy-meta{margin-top:3px}body.battle-mode .enemy-meta span{font-size:9px;padding:1px 3px}body.battle-mode .hp-track{height:7px}body.battle-mode .ally-row{top:78px;left:8px;width:47%}body.battle-mode #allyRow .ally:only-child{flex-basis:100%}body.battle-mode .ally{padding:4px 5px}body.battle-mode .ally-text b{font-size:11px}body.battle-mode .vital-line{font-size:9px}body.battle-mode .enemy-art{top:191px;left:75%;width:43%;height:225px}body.battle-mode .battle-hero-figure{top:170px;left:31%;bottom:auto;width:55%;height:260px}body.battle-mode .formation-chip{top:425px;right:8px;max-width:155px}body.battle-mode .field-callout{top:453px;bottom:auto;min-width:0;width:80%;font-size:10px}body.battle-mode .action-panel{left:3px;right:3px;bottom:46px;width:auto;max-height:none;display:grid;grid-template-columns:1fr;padding:4px;gap:4px}body.battle-mode .action-panel:before{left:0;right:0;top:-22px;bottom:-15px}body.battle-mode .actor-summary{display:none}body.battle-mode .skills{grid-template-columns:repeat(4,1fr);gap:3px}body.battle-mode .skill{width:min(100%,69px);height:69px;padding:3px 1px}body.battle-mode .skill-emblem{width:22px;height:22px;font-size:13px}body.battle-mode .skill-copy small{font-size:8px}body.battle-mode .skill-copy b{font-size:9px}body.battle-mode .action-confirm{flex-direction:row;justify-content:center;gap:13px}body.battle-mode .action-confirm .primary-button{width:auto;height:35px;padding:5px 18px;border-radius:20px;font-size:12px}body.battle-mode .battle-command{grid-template-columns:1fr 105px}body.battle-mode .battle-footer{min-height:42px;padding:2px 6px}body.battle-mode .battle-enemy-projectile{left:72%;top:36%;width:46%}body.battle-mode .battle-hero-bloom{left:31%;top:38%;width:95px;height:95px}}
@media(max-width:760px){body.battle-mode .battle-heading small{display:none}body.battle-mode .battle-stat-pills span:not(:first-child){display:none}body.battle-mode .battle-heading strong{font-size:20px}body.battle-mode .battle-status{gap:4px}}

/* Each realm uses its own arena plate, shared with the redemption story. */
body.battle-mode .battlefield{background-image:var(--realm-scene,url('../assets/image-001.webp'))}
