.battle-page {
  position:absolute; inset:0; overflow:hidden; isolation:isolate; color:#fff4da;
  background:transparent; font-variant-numeric:tabular-nums; --inkglass:rgba(16,20,45,.84);
}
.battle-stage,.battle-dom-units,.battle-numbers {
  position:absolute; inset:0; pointer-events:none;
}
#bleed[data-page="battle"]::before {
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg,#11172bd9,rgba(17,23,43,.54) 55%,transparent) top/100% 12% no-repeat,
    linear-gradient(180deg,rgba(4,6,20,.14),transparent 48%,transparent 80%,rgba(10,14,32,.48));
}
#bleed[data-page="battle"]::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  opacity:0; transition:opacity 260ms ease-out;
  background:radial-gradient(ellipse 21% 35% at var(--spot-x,50%) var(--spot-y,50%),rgba(5,6,25,.18),rgba(4,6,21,.66) 95%);
}
body:has(.battle-page.spotlight) #bleed[data-page="battle"]::after {opacity:1; transition-duration:180ms;}
.battle-stage {overflow:hidden; isolation:isolate; z-index:0;}
.battle-dom-units {z-index:0;}
.battle-stage canvas {position:absolute; left:0; top:0; width:100%; height:100%; display:block; z-index:1;}
.battle-file-unit {position:absolute; width:0; height:0; pointer-events:none;}
.battle-file-unit[hidden] {display:none;}
.battle-file-unit img {position:absolute; left:0; top:0; object-fit:contain; max-width:none;}
.battle-file-unit i {
  position:absolute; display:block; transform:translate(-50%,-50%); border-radius:50%;
  background:radial-gradient(ellipse,#100d24be,rgba(18,15,39,.56) 48%,transparent 74%);
}
.battle-file-unit.enemy i {
  border:max(1px,.12cqw) solid #ff536e;
  box-shadow:inset 0 0 .2cqw #ffa3abb3,0 0 0 1px #691330,0 0 .5cqw .15cqw #fb3159aa;
  background:radial-gradient(ellipse,#251321cf,#54142cc4 60%,#a02748b5);
}
.battle-head {
  position:absolute; inset:0 2% auto; height:9%; display:flex; align-items:center; justify-content:space-between;
  color:#fffaef; text-shadow:0 1px 4px #0b0c19; z-index:3; pointer-events:none;
}
.battle-round {font:600 max(11px,1.04cqw)/1 var(--body); letter-spacing:.1em; color:#f4e6ce;}
.battle-round strong {font:italic 700 max(16px,1.65cqw)/1 Georgia,serif; color:#fff1c4; letter-spacing:0;}
.battle-title {
  position:absolute; left:50%; translate:-50% 0; margin:0; white-space:nowrap;
  font:600 max(13px,1.5cqw)/1.2 var(--display); letter-spacing:.14em;
}
.battle-head nav {display:flex; align-items:center; gap:max(5px,.52cqw); pointer-events:auto;}
.battle-head button {
  display:grid; place-items:center; width:max(28px,2.66cqw); aspect-ratio:1; border-radius:50%;
  border:1px solid #e6e7f371; background:linear-gradient(155deg,#242c425c,#1016288c);
  color:#fff9ef; font:600 max(10px,.88cqw)/1 var(--body); text-shadow:0 1px 2px #141425;
  touch-action:manipulation;
}
.battle-head button[aria-pressed="true"] {color:#ffe29c; border-color:#fcd58bcc; box-shadow:inset 0 0 .45cqw #edb65a30;}
.battle-head [data-battle="speed"] {font:italic 700 max(14px,1.22cqw)/1 Georgia,serif;}
.battle-skill {
  position:absolute; top:17%; width:max-content; max-width:30%; padding:.18cqw 2.5cqw .27cqw;
  isolation:isolate; opacity:0; pointer-events:none; white-space:nowrap;
  font:italic 850 max(15px,1.92cqw)/1.14 var(--display); letter-spacing:.1em; color:#fff9e8;
  text-shadow:0 .1cqw .18cqw #251d36,0 0 .62cqw #fee0a7b3;
}
.battle-skill[data-side="ally"] {left:10%; --ribbon:255,218,142;}
.battle-skill[data-side="enemy"] {right:10%; --ribbon:255,150,166;}
.battle-skill::before,.battle-skill::after {content:""; position:absolute; pointer-events:none; z-index:-1;}
.battle-skill::before {
  inset:-10% -10%; transform:skewX(-22deg);
  background:radial-gradient(ellipse at center,rgba(27,22,42,.6),rgba(var(--ribbon),.15) 48%,transparent 74%);
}
.battle-skill::after {
  inset:auto -4% 0; height:max(1px,.12cqw);
  background:linear-gradient(90deg,transparent,rgba(var(--ribbon),.84) 37%,#fff6dce0 55%,transparent);
}
.battle-skill[data-kind="basic"] {font-size:max(14px,1.55cqw);}
.battle-bottom {
  position:absolute; z-index:2; left:50%; bottom:.45%; translate:-50% 0; isolation:isolate;
  display:grid; grid-template-columns:repeat(6,7.5cqw); gap:.26cqw;
}
.battle-bottom::before {
  content:""; pointer-events:none; z-index:-1; position:absolute; bottom:-1cqw; left:-17%; right:-17%; height:75%;
  background:radial-gradient(ellipse 55% 115% at 50% 106%,#070c1cbd 0%,#10142763 50%,transparent 94%);
}
.battle-card {
  position:relative; display:grid; place-items:center; width:100%; height:7.32cqw; border:0; background:none;
  padding:0; min-width:0; touch-action:manipulation;
}
.battle-card:disabled {opacity:1;}
.battle-badge {position:relative; display:grid; place-items:center; width:100%; height:100%; transition:transform .17s ease-out;}
.battle-badge .quality {width:100%; height:100%; filter:drop-shadow(0 .11cqw .2cqw #090c17b3);}
.battle-card.is-charged:not(.is-frozen) .battle-badge {transform:translateY(-.47cqw);}
.battle-card.acting .battle-badge {transform:translateY(-.78cqw) scale(1.06);}
.battle-card.acting .rim {filter:drop-shadow(0 0 .26cqw #f9ebce);}
.battle-card.lost .battle-badge {transform:translateY(.34cqw); filter:grayscale(1) brightness(.62);}
.battle-card.taking-hit .rim {filter:drop-shadow(0 0 .34cqw #ff314d);}
.battle-badge::before {
  content:""; position:absolute; inset:12.5%; border-radius:25%; opacity:0;
  box-shadow:0 0 .45cqw .14cqw #ffdb7e,inset 0 0 .4cqw #ffca65;
}
.battle-card.is-charged:not(.is-frozen) .battle-badge::before {animation:battle-charged 1.2s ease-in-out infinite alternate; opacity:.85;}
.battle-card.is-charged:not(.is-frozen) .battle-badge::after {
  content:""; position:absolute; inset:12.5%; border-radius:25%; padding:max(1px,.12cqw);
  background:linear-gradient(116deg,transparent 38%,#ffd078 47%,#fff8d5 50%,transparent 57%) 0/260% 100%;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); mask-composite:exclude;
  animation:battle-rage-sheen 1.9s linear infinite; pointer-events:none;
}
.battle-star {
  visibility:hidden; position:absolute; top:3%; right:3%; color:#fff4b9; font:700 2cqw/1 Georgia,serif;
  -webkit-text-stroke:max(1px,.16cqw) #784215; paint-order:stroke fill;
  filter:drop-shadow(0 0 .27cqw #ffb652);
}
.battle-card.is-charged:not(.is-frozen) .battle-star {visibility:visible;}
.battle-badge .meter {position:absolute; container-type:normal;}
.battle-badge .meter::after {display:none;}
.battle-badge .badge-hp {
  bottom:11%; width:72%; height:max(2px,.31cqw); overflow:hidden; border-radius:999px; background:#111926;
  box-shadow:0 0 0 1px #241c29c7,0 1px 3px #0c1122;
}
.badge-hp i {height:100%; background:linear-gradient(0deg,#34ab92,#9df2cf); transition:width .12s ease-out;}
.battle-badge .badge-rage {display:flex; justify-content:center; align-items:center; gap:.31cqw; bottom:0; height:8%; width:80%;}
.badge-rage i {
  width:.44cqw; height:.44cqw; transform:rotate(45deg); border:max(.5px,.07cqw) solid #a18e65; border-radius:.04cqw;
  background:linear-gradient(0deg,#ffd686 var(--charge,0%),#292838 var(--charge,0%)); box-shadow:0 0 2px #090918;
}
.badge-rage .lit {border-color:#ffe2a3; box-shadow:0 0 .22cqw #ffac3caa;}
.battle-card.is-charged .badge-rage i {background:#fff0ad; border-color:#fff4ca; box-shadow:0 0 .35cqw #ffb94e;}
.battle-numbers {z-index:2; overflow:hidden;}
.battle-float {
  position:absolute; transform-origin:center bottom; white-space:nowrap; display:inline-flex; align-items:baseline; gap:.08em;
  color:#f8fbff; font:italic 800 2.02cqw/1 Georgia,var(--display); letter-spacing:-.035em;
  -webkit-text-stroke:max(1.3px,.21cqw) #182133; paint-order:stroke fill; filter:drop-shadow(0 .10cqw .09cqw #101321c9);
}
.battle-float.heal {color:#98ffbf; font-size:2.42cqw; -webkit-text-stroke-color:#124135;}
.battle-float:is(.shield,.resist) {color:#c3eefd; font-size:1.68cqw; font-weight:650; -webkit-text-stroke-color:#15354b;}
.battle-float.shield {font-size:2.02cqw;}
.battle-float b {position:relative; font-weight:inherit;}
.battle-float.critical {
  font-size:2.93cqw; color:#ffe9a1; -webkit-text-stroke:max(1.6px,.29cqw) #662132;
  filter:drop-shadow(0 .12cqw .10cqw #410f23);
}
.battle-float.critical small {font:italic 900 .46em/1 var(--display); letter-spacing:0;}
.battle-float.periodic {color:#ffb477;-webkit-text-stroke-color:#56252a;}
.battle-float.periodic small {font:800 .46em/1 var(--display);margin-inline-end:.22em;}
.battle-float.critical::after {
  content:"✦"; position:absolute; right:-.25em; top:-.2em; color:#fff9d8;
  font-size:.43em; -webkit-text-stroke:0; text-shadow:0 0 .4em #ffa945;
}
.battle-total {
  pointer-events:none; position:absolute; z-index:2; left:50%; bottom:20.4%; translate:-50% 0; isolation:isolate;
  display:flex; align-items:baseline; gap:.85cqw; white-space:nowrap; color:#ffe7a3;
  --glow:230,103,50; --shine:linear-gradient(180deg,#fff9d4 12%,#ffde94 44%,#d7914c 53%,#fff0b6 78%,#e7ad55 98%);
}
.battle-total::before {
  content:""; position:absolute; z-index:-1; inset:0 -24% -10%; pointer-events:none;
  background:radial-gradient(ellipse at 51% 60%,rgba(var(--glow),.35),rgba(var(--glow),.13) 44%,transparent 73%);
}
.battle-total[data-kind="damage"] {left:calc(50% + min(5.25cqw,80px));}
.battle-total[data-kind="heal"] {
  --glow:52,233,169; --shine:linear-gradient(180deg,#f7ffdf,#92f9c8 46%,#4aac99 54%,#cbffe6 78%,#78d8b6);
}
.battle-total[data-kind="shield"] {
  --glow:98,196,255; --shine:linear-gradient(180deg,#fffce1,#baecff 46%,#6daac4 54%,#e2faff 78%,#8acbdc);
}
.battle-total small {
  color:#fff0c9; font:italic 800 1.38cqw/1 var(--display); letter-spacing:.05em;
  -webkit-text-stroke:max(1px,.21cqw) #31202e; paint-order:stroke fill;
}
.battle-total strong {
  position:relative; transform:skewX(-8deg); transform-origin:left 73%;
  font:italic 900 4.48cqw/.94 Georgia,serif; letter-spacing:-.045em; color:#ffe3a1;
  -webkit-text-stroke:max(1.5px,.17cqw) #37202a; paint-order:stroke fill;
  filter:drop-shadow(0 .12cqw .06cqw #35202a) drop-shadow(0 0 .4cqw rgba(var(--glow),.63));
}
/* The physical outline stays behind a second fill, so metallic glyphs retain dark edges on the bright map. */
.battle-total strong::after,.battle-float.critical b::after {
  content:attr(data-value); position:absolute; inset:0; color:transparent; -webkit-text-stroke:0;
  background:var(--shine,linear-gradient(180deg,#fffbd3 9%,#fff0a0 38%,#ffc559 56%,#f57451 87%));
  background-clip:text; -webkit-background-clip:text;
}
.battle-hits {
  position:absolute; top:calc(100% + .5cqw); right:0; color:#ffedbd; letter-spacing:.14em;
  font:italic 700 .96cqw/1 Georgia,var(--display); -webkit-text-stroke:max(1px,.13cqw) #331d27; paint-order:stroke fill;
}
.battle-total[hidden] {display:none;}
.battle-contrib>div {display:grid; gap:.14cqw; min-width:0;}
.battle-contrib>div > * {width:100%; height:.54cqw; min-height:0; margin:0;}
.battle-report-actions button {
  color:#fff9ed; border:1px solid #ddc69d88; background:#15172cd9; font:inherit; padding:.48cqw .78cqw;
  cursor:pointer; clip-path:polygon(.36cqw 0,100% 0,100% calc(100% - .36cqw),calc(100% - .36cqw) 100%,0 100%,0 .36cqw);
}
.battle-report-actions button:hover {background:#3a3544; color:#fff0ad;}
@keyframes battle-charged {from{opacity:.47;scale:.98;}to{opacity:.93;scale:1.035;}}
.battle-cutin {
  position:absolute; inset:0; z-index:5; overflow:hidden; pointer-events:none;
}
.battle-cut-content {position:absolute;inset:0;animation:battle-cut-in .85s both;}
.battle-cutin.has-poster .battle-cut-content {background:#0c0b20;}
.battle-cut-image {
  position:absolute;inset:2.4% -.3% -2.4%;background:var(--cut-image) center top/cover no-repeat;
  clip-path:polygon(0 3%,100% 0,100% 90%,0 100%);animation:battle-cut-pan .85s ease-out both;
}
.battle-cut-image .poster-video {object-position:center top;}
.battle-cut-streak {
  position:absolute;inset:0;clip-path:polygon(0 85%,100% 48%,100% 80%,0 100%);
  background:linear-gradient(97deg,transparent 7%,#2a143e30 30%,#24132ee6 66%,#201329fa 96%);
}
.battle-cut-streak::before{
  content:"";position:absolute;inset:0;
  clip-path:polygon(0 85%,100% 48%,100% calc(48% + .16cqw),0 calc(85% + .16cqw));
  background:linear-gradient(100deg,transparent 12%,#d6b5fb9c 39%,#ffdfaf 68%,#eccef8d9 91%);
}
.battle-cut-streak::after{content:"";position:absolute;inset:0;background:linear-gradient(108deg,transparent 28%,#dec8ff55 40%,#fff3d2a8 43%,transparent 47%) 0/250% 100%;animation:battle-rage-sheen .85s ease-out both;}
.battle-cut-title {
  position:absolute; right:7%; bottom:19%; text-align:right; color:#fff5df;
  text-shadow:0 .2cqw .6cqw #121125,0 0 1.1cqw #19132b;
}
.battle-cut-title span {font-size:1.45cqw; letter-spacing:.18em;}
.battle-cut-title strong {display:block; margin-top:.3cqw; font-size:5.8cqw; font-family:"STKaiti","KaiTi","SimSun",serif; font-weight:900; line-height:1.2; letter-spacing:.12em;}
.battle-cut-skip {
  position:absolute;inset:0;width:100%;height:100%;pointer-events:auto;cursor:pointer;
  display:flex;align-items:flex-end;justify-content:flex-end;padding:0 2.2cqw 1.6cqw;
  border:0;background:none;color:#fff6df;touch-action:manipulation;
}
.battle-cut-skip>span {
  display:block;padding:.34em .7em;border:1px solid #fbe3ac70;border-radius:.35em;
  background:#101426a8;font-size:max(11px,1.03cqw);font-weight:700;letter-spacing:.07em;
}
.battle-cut-skip i {font-style:normal;color:#ffd98f;}
.battle-cut-skip:focus-visible>span {outline:2px solid #ffe5af;outline-offset:2px;}
.battle-cutin[data-media="ultimate"] :is(.battle-cut-content,.battle-cut-image) {animation:none;}
.battle-cutin[data-media="ultimate"] .battle-cut-image {
  inset:0;clip-path:none;background-position:center;background-size:contain;
}
.battle-cutin[data-media="ultimate"] .battle-cut-image .poster-video {object-fit:contain;object-position:center;}
.battle-cutin[data-media="ultimate"] .battle-cut-streak {
  clip-path:polygon(0 96%,100% 69%,100% 87%,0 100%);
  background:linear-gradient(95deg,transparent 18%,#19162aa8 58%,#19162ad9);
}
.battle-cutin[data-media="ultimate"] .battle-cut-streak::before {
  clip-path:polygon(0 96%,100% 69%,100% calc(69% + .16cqw),0 calc(96% + .16cqw));
}
.battle-cutin[data-media="ultimate"] .battle-cut-title {bottom:14%;}
.battle-cutin[data-media="ultimate"] .battle-cut-title strong {animation:battle-ult-sweep .42s cubic-bezier(.18,.79,.18,1) both;}
.battle-result {
  position:absolute; inset:0; z-index:6; display:grid; place-items:center; background:rgba(8,10,27,.65); backdrop-filter:blur(6px);
}
.battle-report {
  width:70%;box-sizing:border-box;padding:.9cqw 2.4cqw 1.15cqw;color:#fff4d9;
  border:1px solid #eed298a3; border-top:.22cqw solid #e1c28b; background:linear-gradient(117deg,#21283fea,#211d36f5 65%,#28243af5);
  clip-path:polygon(1.03cqw 0,100% 0,100% calc(100% - 1.03cqw),calc(100% - 1.03cqw) 100%,0 100%,0 1.03cqw);
  box-shadow:0 1cqw 4cqw #0b0c16a6;
}
.battle-report-heading {display:flex;align-items:center;gap:1.2cqw;padding-bottom:.6cqw;border-bottom:1px solid #ceb17878;}
.battle-result[data-outcome="defeat"] .battle-report {
  border-color:#a59eaf #755562 #844b61 #a4a3b4;
  border-top-color:#c5c9d6;
}
.battle-medal{width:9cqw;height:7.8cqw;object-fit:contain;filter:drop-shadow(0 .2cqw .55cqw #1c102a);}
.battle-report-heading>div>span {color:#e5d8c4;font-size:.97cqw;letter-spacing:.07em;}
.battle-report-heading h2 {font:700 3.1cqw/1.22 var(--display);color:#ffe0a0;letter-spacing:.08em;margin:.16cqw 0;}
.battle-result[data-outcome="defeat"] .battle-report-heading h2 {
  width:max-content;color:#e0dde4;background:linear-gradient(110deg,#edf2fb 10%,#d3cbdc 48%,#dc9cac 76%,#cc8294);
  background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;
}
.battle-report-heading p {color:#d9cdb9;font-size:.91cqw;letter-spacing:.07em;margin:0;}
.battle-report-stars{display:flex;align-items:center;gap:.08cqw;margin-left:auto;}
.battle-report-stars img{width:2.9cqw;height:3.3cqw;object-fit:contain}.battle-report-stars img:nth-child(2){width:3.6cqw;height:4.1cqw;}
.battle-report-stars .unearned{filter:grayscale(1);opacity:.23;}
.battle-report-columns {display:grid; grid-template-columns:1.1fr .92fr; gap:2.25cqw;}
.battle-report h3 {display:flex; justify-content:space-between; align-items:baseline; color:#ffefd1; font-size:1.25cqw; margin:0; padding:.55cqw 0; border-bottom:1px solid #d5bd8a60;}
.battle-report h3 small {font-size:.82cqw; color:#ebce8d; font-weight:500;} .battle-report h3 em {color:#a2dce2; font-style:normal;}
.battle-contrib {display:grid; grid-template-columns:3.45cqw 7.4cqw minmax(3cqw,1fr) 4.3cqw; gap:.35cqw; align-items:center;}
.battle-contrib > :first-child {width:3.45cqw; height:3.45cqw;}
.battle-contrib>b {display:flex;align-items:center;gap:.25cqw;font-size:1.04cqw;white-space:nowrap;}
.battle-mvp{width:2.45cqw;height:2.4cqw;object-fit:contain;}
.battle-contrib >span:last-child {font-size:.94cqw; display:grid; justify-items:end; color:#f8d88f;}
.battle-contrib small {color:#9cdfdc; font-size:.73cqw;}
.battle-drops ul {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.35cqw; list-style:none; padding:0; margin:.5cqw 0;}
.battle-drops li {display:grid; justify-items:center; align-content:start; gap:.05cqw; min-width:0; font-size:.86cqw;}
.battle-drops li strong {font-size:.92cqw; font-weight:600; color:#f6dca5;}
.battle-recovery {margin:1.25cqw 0 0;padding:.7cqw .75cqw;background:linear-gradient(105deg,#83889d19,#ac6a7a0c);border-left:2px solid #a58f9d;}
.battle-recovery b {display:block;color:#ded7e3;font-weight:600;font-size:max(9px,.97cqw);letter-spacing:.07em;}
.battle-recovery>div {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45cqw;margin-top:.4cqw;}
.battle-recovery button {
  min-height:max(23px,2.35cqw);padding:0 .15cqw;white-space:nowrap;color:#fff2e6;font-weight:600;
  border-bottom:1px solid #bd94a797;background:#302a3d;font-size:max(9px,.96cqw);
}
.battle-recovery button:is(:hover,:focus-visible) {background:#423342;color:#fff1d8;}
.battle-loot-icon {position:relative; display:grid; width:4.8cqw; height:4.8cqw; place-items:center; color:#f0d189;}
.battle-loot-icon::before{content:"";position:absolute;inset:17%;background:radial-gradient(ellipse,#41405c,#1c2038);}
.battle-loot-icon .loot-art{position:absolute;width:56%;height:56%;object-fit:contain;}
.battle-loot-icon .loot-frame {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;}
.battle-cumulative {display:flex;justify-content:space-between;align-items:baseline;border-top:1px solid #c5a77755;padding-top:.42cqw;font-size:1.02cqw;color:#e1d2b2;}
.battle-cumulative b {font:700 1.65cqw/1.2 Georgia,serif;color:#ffe4ab;}
.battle-report-actions {display:flex; justify-content:flex-end; gap:.55cqw; margin-top:.65cqw;}
.battle-report-actions button {min-width:7.4cqw; min-height:2.6cqw; font-size:1.07cqw;}
.battle-report-actions button:last-child {background:#ebd49f; color:#272435; border-color:#ffedc4; font-weight:700;}
@keyframes battle-rage-sheen {from{background-position:100% 0}to{background-position:-85% 0}}
@keyframes battle-cut-in {0%{clip-path:polygon(0 50%,100% 41%,100% 42%,0 51%);} 14%,86%{clip-path:polygon(0 0,100% 0,100% 100%,0 100%);} 100%{clip-path:polygon(0 58%,100% 48%,100% 48.1%,0 58.1%);}}
@keyframes battle-cut-pan {from{transform:translateX(-.2%) scale(1.003);} to{transform:translateX(.18%) scale(1.012);}}
@keyframes battle-ult-sweep {from{transform:translateX(38%) skewX(-10deg);opacity:0;}to{transform:none;opacity:1;}}
#stage.power-save .battle-cut-content,#stage.power-save .battle-cut-image {animation:none!important;}
