/* The arena is alive even when nothing is moving: restrained gold light, then richer motion on intent. */
:root{--gold:#f0c878;--gold-hot:#ffe9a8;--teal:#8de1d2;--panel:#171a24;--line:#343848}
html{scroll-behavior:smooth}
body{background-color:#0d0f16;background-image:radial-gradient(ellipse at 50% -25%,#53402a55,transparent 48%),radial-gradient(ellipse at 105% 44%,#26364a35,transparent 36%),radial-gradient(ellipse at -10% 77%,#412b3e27,transparent 32%);background-attachment:fixed}
body:before{content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;opacity:.38;background-image:radial-gradient(1px 1px at 9% 23%,#f5e3b8 98%,transparent),radial-gradient(1px 1px at 76% 17%,#a7d8d3 98%,transparent),radial-gradient(2px 2px at 36% 68%,#f5e3b8 98%,transparent),radial-gradient(1px 1px at 88% 81%,#e6c47d 98%,transparent),radial-gradient(1px 1px at 19% 89%,#a7d8d3 98%,transparent),radial-gradient(1px 1px at 58% 43%,#f5e3b8 98%,transparent);background-size:470px 420px;animation:star-drift 48s linear infinite}
.topbar{position:relative}.topbar:after{content:"";position:absolute;bottom:-1px;left:0;width:31%;height:1px;background:linear-gradient(90deg,var(--gold),transparent);opacity:.75;animation:line-glow 5s ease-in-out infinite alternate}
.brand-mark{position:relative;box-shadow:0 0 20px #dfb66416,inset 0 0 12px #dfb66413;transition:.35s}.brand:hover .brand-mark{transform:rotate(45deg);box-shadow:0 0 24px #dfb66455}.brand:hover .brand-mark{border-radius:50%}
.status-dot{animation:status-pulse 2.5s ease-in-out infinite}
#app[data-page] .page{animation:page-arrive .55s cubic-bezier(.18,.76,.24,1) both}
.hero{position:relative;padding:4px 0 18px}.hero:before{content:"✧";position:absolute;left:7%;top:18%;font-size:15px;color:#e8c878aa;animation:sparkle 3.8s ease-in-out infinite}.hero:after{content:"✦";position:absolute;right:8%;top:49%;font-size:11px;color:#91c9c0aa;animation:sparkle 4.7s 1.1s ease-in-out infinite}
.hero h1{background:linear-gradient(100deg,#fff8e9 15%,#e9d8b4 47%,#fff1ca 68%,#bfcbd4 100%);background-clip:text;-webkit-background-clip:text;color:transparent;text-shadow:0 8px 45px #d8b77a16}
.sigil{animation:sigil-float 5s ease-in-out infinite;box-shadow:0 0 55px #c09a4224,inset 0 0 30px #d5a75020}.sigil:before{animation:seal-turn 32s linear infinite}.sigil:after{animation:seal-turn 24s linear infinite reverse}.sigil span{animation:glyph-glow 3.5s ease-in-out infinite}
.summon-form{position:relative;align-items:stretch;max-width:580px;gap:10px}.summon-input-wrap{flex:1;min-width:0;position:relative;display:flex;align-items:center}.summon-form input{width:100%;height:54px;padding:16px 15px 13px 42px;border-radius:5px;background:linear-gradient(120deg,#1a1d27eF,#141720f2);border-color:#494858;box-shadow:inset 0 1px #ffffff08,0 8px 25px #0002;transition:border-color .25s,box-shadow .25s,transform .25s}.summon-form input:focus{transform:translateY(-1px);border-color:#efc878;box-shadow:0 0 0 3px #d8b77a24,0 0 35px #d8b77a12}.input-mark{position:absolute;left:15px;z-index:1;color:var(--gold);font-size:17px}.input-hint{position:absolute;right:12px;bottom:4px;font:7px var(--mono);letter-spacing:.14em;color:#717887;pointer-events:none}.summon-button{min-width:148px;border-radius:5px;display:inline-flex;justify-content:center;align-items:center;gap:7px;box-shadow:0 5px 24px #e4bd6c1b;position:relative;overflow:hidden}.button-symbol{font-size:15px}.button{position:relative;overflow:hidden;transition:transform .25s cubic-bezier(.2,.7,.25,1),filter .25s,box-shadow .25s}.button:before{content:"";position:absolute;inset:-40% auto -40% -45%;width:28%;transform:skewX(-22deg);background:linear-gradient(90deg,transparent,#fff8dfaa,transparent);transition:left .55s}.button:hover{filter:brightness(1.11);transform:translateY(-2px);box-shadow:0 7px 24px #d8b77a24}.button:hover:before{left:125%}.button:active{transform:translateY(0) scale(.98)}
.feature-row{gap:16px}.feature{position:relative;padding:15px 13px;background:linear-gradient(140deg,#ffffff05,transparent);transition:transform .3s,border-color .3s,background .3s}.feature:before{content:"";position:absolute;left:0;top:-1px;width:24px;height:1px;background:var(--gold);transition:width .35s}.feature:hover{transform:translateY(-4px);border-color:#746444;background:linear-gradient(140deg,#d4b8790a,transparent)}.feature:hover:before{width:72px}.feature b{letter-spacing:.08em}.feature p{line-height:1.85}
.character-card{border-radius:8px;background:radial-gradient(ellipse at 100% 0%,#59452a38,transparent 42%),linear-gradient(135deg,#20232d,#14171f 72%);border-color:#6f6146;box-shadow:0 22px 65px #0005,inset 0 1px #fff1;animation:card-arrive .7s cubic-bezier(.18,.76,.24,1) both}.character-card:after{animation:orbit-breathe 7s ease-in-out infinite}.character-card:before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(110deg,transparent 18%,#fff2 38%,transparent 58%);transform:translateX(-130%);animation:card-sheen 1.1s .25s ease-out both}.char-title{letter-spacing:.08em;text-shadow:0 4px 25px #f2cf8622}.epithet{letter-spacing:.12em;text-shadow:0 0 20px #e3bb6d33}.tag{border-radius:999px;background:#ffffff04;padding:4px 10px}.rank-badge{border-radius:999px;background:#c69d4020;box-shadow:0 0 18px #d6af5315}.stat{border-radius:5px;transition:transform .25s,border-color .25s,background .25s}.stat:hover{transform:translateY(-3px);border-color:#8c7853;background:#d3b26810}.stat b{color:#f4e9d2}.skill{border-radius:0 6px 6px 0;background:linear-gradient(100deg,#d6b66a11,#10121899 70%);transition:transform .25s,background .25s}.skill:hover{transform:translateX(4px);background:linear-gradient(100deg,#d6b66a1c,#10121899 70%)}.skill p{line-height:1.8}
.panel{border-radius:8px;background:linear-gradient(145deg,#1c202aeF,#141720eF);box-shadow:0 14px 40px #0002,inset 0 1px #fff1}.roster-row{border-radius:6px;position:relative;overflow:hidden;transition:transform .24s,border-color .24s,background .24s}.roster-row:before{content:"";position:absolute;left:0;top:18%;bottom:18%;width:2px;background:var(--gold);transform:scaleY(0);transition:transform .25s}.roster-row:hover{transform:translateX(3px);border-color:#776848;background:#1b1e28}.roster-row:hover:before{transform:scaleY(1)}.roster-name{letter-spacing:.025em}.empty{border-radius:8px;background:radial-gradient(ellipse at 50% 35%,#d6b66a0c,transparent 56%)}.empty .symbol{display:inline-grid;place-items:center;width:64px;height:64px;border:1px solid #9d835451;border-radius:50%;box-shadow:0 0 32px #d8b77a13;animation:sigil-float 4s ease-in-out infinite}
.battle-head{perspective:900px}.fighter{border-radius:7px;background:linear-gradient(140deg,#1d212c,#151820);box-shadow:0 13px 34px #0004;animation:fighter-arrive .6s cubic-bezier(.2,.75,.25,1) both}.fighter.right{animation-delay:.12s}.fighter .name{letter-spacing:.04em}.bar{height:7px;border-radius:99px;overflow:hidden;background:#080a0f;border:1px solid #ffffff0b}.bar i{border-radius:99px;box-shadow:0 0 13px #79dfc477;position:relative}.bar i:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,#ffffff77,transparent);animation:bar-glint 2.8s ease-in-out infinite}.right .bar i{background:linear-gradient(90deg,#bd645e,#f09b83);box-shadow:0 0 13px #ed786477}.vs{animation:vs-pulse 2s ease-in-out infinite;text-shadow:0 0 18px #e0be73}.log{border-radius:7px;background:linear-gradient(150deg,#11141b,#0c0e13);box-shadow:inset 0 4px 18px #0005}.log-line{animation:log-in .38s cubic-bezier(.2,.75,.25,1) both;animation-delay:var(--log-delay,0ms);line-height:1.85}.log-line.scene{color:#d6bd83}.log-line.hit strong{color:#ffe09a}.battle-head+.actions{animation:fade-up .5s .2s both}.toast{border-radius:999px;box-shadow:0 9px 34px #0008,0 0 25px #dfbd7133;backdrop-filter:blur(14px)}
.bottom-nav{background:#11141beF;box-shadow:0 -12px 35px #08090e80}.bottom-nav button{position:relative;transition:color .25s,transform .25s}.bottom-nav button span{transition:transform .3s,color .25s;text-shadow:0 0 0 transparent}.bottom-nav button:hover{transform:translateY(-2px);color:#d4c5a1}.bottom-nav button.active span{transform:translateY(-2px) scale(1.1);color:var(--gold);text-shadow:0 0 16px #e0b86377}.bottom-nav button.active:after{content:"";position:absolute;top:-9px;left:30%;right:30%;height:1px;background:var(--gold);box-shadow:0 0 13px #efc878;animation:nav-line .3s both}
body.summon-burst:after{content:"";position:fixed;inset:0;pointer-events:none;z-index:30;background:radial-gradient(circle at 50% 42%,#ffeab177,transparent 9%,#e5b45433 18%,transparent 42%);animation:summon-flash .8s ease-out both}
@keyframes page-arrive{from{opacity:0;transform:translateY(13px);filter:blur(3px)}to{opacity:1;transform:translateY(0);filter:blur(0)}}
@keyframes card-arrive{from{opacity:0;transform:translateY(12px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes fighter-arrive{from{opacity:0;transform:translateY(10px) rotateX(5deg)}to{opacity:1;transform:translateY(0) rotateX(0)}}
@keyframes log-in{from{opacity:0;transform:translateX(-8px)}to{opacity:1;transform:translateX(0)}}
@keyframes fade-up{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@keyframes sigil-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes seal-turn{to{transform:rotate(405deg)}}
@keyframes glyph-glow{0%,100%{text-shadow:0 0 14px #e1b75155}50%{text-shadow:0 0 32px #ffe6a5dd,0 0 64px #d6a74866}}
@keyframes sparkle{0%,100%{opacity:.2;transform:translateY(0) rotate(0) scale(.8)}50%{opacity:1;transform:translateY(-9px) rotate(35deg) scale(1.18)}}
@keyframes status-pulse{0%,100%{box-shadow:0 0 7px #83b8aa55}50%{box-shadow:0 0 18px #83b8aacc}}
@keyframes line-glow{from{width:18%;opacity:.35}to{width:43%;opacity:1}}
@keyframes orbit-breathe{0%,100%{opacity:.55;transform:scale(.97)}50%{opacity:1;transform:scale(1.04)}}
@keyframes card-sheen{0%{transform:translateX(-130%)}100%{transform:translateX(130%)}}
@keyframes bar-glint{0%,65%,100%{transform:translateX(-130%)}84%{transform:translateX(130%)}}
@keyframes vs-pulse{0%,100%{opacity:.72;transform:scale(.98)}50%{opacity:1;transform:scale(1.08)}}
@keyframes nav-line{from{transform:scaleX(0);opacity:0}to{transform:scaleX(1);opacity:1}}
@keyframes summon-flash{0%{opacity:0}20%{opacity:1}100%{opacity:0}}
@keyframes star-drift{from{background-position:0 0}to{background-position:0 -420px}}
.battle-result-head{align-items:center;margin-bottom:16px}.battle-result-head h2{font-size:clamp(22px,4vw,30px);margin:2px 0}.battle-kicker,.fighter-side{font:9px var(--mono);letter-spacing:.16em;color:#c5a56a}.battle-note{max-width:420px;text-align:right;line-height:1.8}.battle-head{grid-template-columns:minmax(0,1fr) 54px minmax(0,1fr);gap:15px;margin:14px 0}.fighter{position:relative;overflow:hidden;min-height:164px;padding:17px 18px;border-color:#434957}.fighter:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.35;background:radial-gradient(ellipse at 0 0,#89cfc51a,transparent 60%)}.fighter.right:before{background:radial-gradient(ellipse at 100% 0,#d978661b,transparent 60%)}.fighter-side{margin-bottom:7px;color:#87cfc1}.fighter.right .fighter-side{color:#e39681}.fighter .name{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fighter .epithet{margin-top:2px}.fighter .bar{height:8px}.fighter .hp-bar i{background:linear-gradient(90deg,#69baa9,#a7e4cc);box-shadow:0 0 14px #75d8b988}.fighter.right .hp-bar i{background:linear-gradient(90deg,#bb5d5a,#f29c82);box-shadow:0 0 14px #ec796e88}.fighter .mp-bar i,.fighter.right .mp-bar i{background:linear-gradient(90deg,#617bd2,#a4b7ff);box-shadow:0 0 12px #7894ff88}.fighter .hp-label{margin-top:12px}.battle-head .vs{font-size:13px}.impact-hit{animation:impact-hit .48s cubic-bezier(.2,.8,.2,1)}.impact-effect{animation:impact-effect .58s ease-out}.compare-panel{margin:14px 0 12px;padding:17px 19px;border:1px solid #373c49;border-radius:8px;background:linear-gradient(145deg,#1b1e27,#12151d);box-shadow:0 12px 30px #0002}.compare-heading{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:12px}.compare-heading h3{font-size:15px;margin:2px 0 0}.compare-heading>span{font-size:10px;color:var(--muted)}.compare-grid{display:grid;grid-template-columns:72px minmax(0,1fr) minmax(0,1fr);column-gap:16px;row-gap:7px;align-items:center}.compare-corner{font-size:10px;color:var(--muted)}.compare-player{font-size:11px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-bottom:6px;border-bottom:1px solid #373c49}.compare-player.a{color:#96ddcc}.compare-player.b{color:#eea18d}.compare-label{font-size:10px;color:#b9bdc8}.compare-cell{display:grid;grid-template-columns:33px minmax(0,1fr);gap:8px;align-items:center}.compare-cell b{font:11px var(--mono);color:#e9e4d8;text-align:right}.compare-track{height:5px;overflow:hidden;border-radius:99px;background:#090b10}.compare-track i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#61ac9e,#a1ddca);box-shadow:0 0 9px #66c1ad66;transition:width .45s}.compare-cell.b .compare-track i{background:linear-gradient(90deg,#b85a57,#ed967f);box-shadow:0 0 9px #db756766}.playback-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:12px 0 9px;padding:10px 13px;border:1px solid #353a47;border-radius:7px;background:#171a23}.playback-state,.playback-actions{display:flex;align-items:center;gap:7px}.playback-count{font:10px var(--mono);color:#c1c4cd}.playback-live{width:7px;height:7px;border-radius:50%;background:#6b7280}.playback-live.on{background:#e6bd69;box-shadow:0 0 13px #e9bd5d;animation:status-pulse 1.5s infinite}.speed-button{height:29px;min-width:34px;background:#1c202a;border:1px solid #414653;border-radius:4px;color:#a8adbb;font:10px var(--mono);transition:.2s}.speed-button:hover,.speed-button.selected{border-color:#c5a56a;color:#f0cf89;background:#c09a4219}.skip-button{padding:7px 12px;font-size:10px}.battle-page .log{max-height:440px;min-height:190px;scroll-behavior:smooth}.battle-page .log-line{position:relative;padding:9px 7px 9px 4px}.battle-page .log-line.hit{color:#f7e7c0}.battle-page .log-line.hit:after{content:"";position:absolute;inset:0 auto 0 0;width:2px;background:#f2cb70;animation:impact-line .45s ease-out}.battle-page .log-line.effect{color:#bde1d5}.battle-footer{justify-content:flex-end}.battle-footer .button{min-width:132px}
@keyframes impact-hit{0%{transform:translateX(0);filter:brightness(1)}18%{transform:translateX(-7px);filter:brightness(1.9);box-shadow:0 0 32px #ffcf8066}38%{transform:translateX(5px)}64%{transform:translateX(-2px);filter:brightness(1.35)}100%{transform:translateX(0);filter:brightness(1)}}
@keyframes impact-effect{0%{box-shadow:0 0 0 #a0ffe000}38%{box-shadow:0 0 35px #a0ffe077;border-color:#9dd8c5}100%{box-shadow:0 0 0 #a0ffe000}}
@keyframes impact-line{from{transform:scaleY(0);opacity:.2}to{transform:scaleY(1);opacity:1}}
@media(max-width:650px){.battle-result-head{align-items:flex-start;gap:4px}.battle-note{text-align:left;margin:0;font-size:10px}.battle-head{grid-template-columns:minmax(0,1fr) 29px minmax(0,1fr);gap:5px}.fighter{min-height:158px;padding:12px 9px}.fighter .name{font-size:12px}.fighter .epithet{font-size:9px}.fighter-side{font-size:7px}.compare-panel{padding:13px 11px}.compare-heading>span{max-width:135px;text-align:right;font-size:9px}.compare-grid{grid-template-columns:51px minmax(0,1fr) minmax(0,1fr);column-gap:8px}.compare-player{font-size:9px}.compare-cell{grid-template-columns:25px minmax(0,1fr);gap:5px}.compare-cell b{font-size:10px}.battle-page .log{max-height:48vh;min-height:150px}.battle-footer .button{flex:1;min-width:0}}
@media(max-width:650px){.hero:before{left:0;top:13%}.hero:after{right:1%;top:53%}.summon-form{flex-direction:row;gap:7px}.summon-form .button{width:auto;min-width:118px;padding:10px 11px;font-size:12px}.summon-form input{height:52px;padding-left:36px}.input-hint{font-size:6px;right:7px}.feature-row{gap:5px}.feature{padding:11px 10px}.battle-head{grid-template-columns:minmax(0,1fr) 31px minmax(0,1fr)}.log{padding:7px 10px}.log-line{font-size:11px}}
@media(max-width:420px){.summon-form{flex-direction:column}.summon-form .button{width:100%;height:48px}.input-hint{right:12px}}
@media(max-width:380px){.hero h1{font-size:27px}.stat-grid{gap:5px}.stat{padding:7px 3px}}

/* Compact copy keeps the character and battle data in focus. */
.flavor{overflow-wrap:anywhere;line-height:1.7}
.skill p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.45}
.compare-heading{margin-bottom:8px}
.compare-heading h3{margin:0}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}


/* Battle HUD: reserve the screen for health and the live log. */
.battle-page{padding:8px 0 0;display:flex;flex-direction:column;gap:6px;position:relative;isolation:isolate}
.battle-result-head{flex:none;margin:0;min-height:26px;align-items:center}
.battle-result-head h2{font-size:18px;margin:0}
.battle-note{font-size:10px;line-height:1.3;margin:0}
.battle-head{flex:none;margin:0;grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);gap:8px}
.fighter{min-height:0;padding:8px 11px;border-radius:6px}
.fighter-side{font-size:8px;margin-bottom:2px}
.fighter .name{font-size:13px}
.fighter .epithet{font-size:9px;line-height:1.2;margin-top:0}
.fighter .hp-label{margin-top:5px;font-size:9px}
.fighter .bar{height:7px;margin-top:2px}
.status-list{display:flex;gap:3px;flex-wrap:wrap;overflow-y:auto;scrollbar-width:thin;max-height:36px;min-height:0;margin-top:4px}
.status-list.has-status{min-height:18px}
.status-pill{flex:none;border:1px solid #81594d;background:#572f32;color:#ffc0ad;padding:0px 5px;border-radius:3px;font:8px/16px var(--mono);white-space:nowrap}
.status-pill.status-effect-sleep,.status-pill.status-effect-stun,.status-pill.status-effect-paralysis{border-color:#9b80d1;background:#37294c;color:#deceff}
.status-pill.status-effect-poison,.status-pill.status-effect-burn,.status-pill.status-effect-bleed,.status-pill.status-effect-overheat{border-color:#aa5d45;background:#522b25;color:#ffc18e}
.status-pill.status-effect-barrier,.status-pill.status-effect-buff,.status-pill.status-effect-regen{border-color:#7d7045;background:#433b23;color:#f2d991}
.compare-details{flex:none;margin:0;padding:0 10px;border-radius:5px}
.compare-details>summary{min-height:28px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;list-style:none;font-size:10px;color:#d8c38e}
.compare-details>summary::-webkit-details-marker{display:none}
.compare-details>summary:after{content:'＋';font:12px var(--mono);color:var(--muted)}
.compare-details[open]>summary:after{content:'−'}
.compare-legend{display:flex;align-items:center;gap:4px;font-size:9px;color:var(--muted)}
.compare-legend i{width:6px;height:6px;border-radius:50%;display:inline-block;margin-left:5px}
.legend-a{background:#8edac6}.legend-b{background:#ef967e}
.compare-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px 12px;padding:3px 0 9px}
.compare-stat{display:grid;grid-template-columns:34px minmax(0,1fr);gap:2px 5px;align-items:center;font:9px var(--mono)}
.compare-stat .compare-label{grid-row:1 / span 2}
.compare-side{display:flex;align-items:center;gap:4px;min-width:0}
.compare-side strong{width:18px;text-align:right;font-size:9px}
.compare-side.a strong{color:#96ddcc}.compare-side.b strong{color:#eea18d}
.compare-side>i{height:3px;flex:1;border-radius:3px;background:#090b10;overflow:hidden}
.compare-side em{display:block;height:100%;border-radius:3px;background:#70c9b4}
.compare-side.b em{background:#e17d69}
.playback-controls{flex:none;margin:0;padding:4px 8px;min-height:30px}
.playback-actions{gap:5px}.speed-button{height:24px;min-width:31px}.skip-button{padding:4px 9px}
.battle-page .log{flex:1;min-height:100px;max-height:none;padding:3px 10px;scrollbar-width:thin;overscroll-behavior:contain}
.battle-page .log-line{padding:5px 4px;font-size:11px;line-height:1.45}
.battle-page .log-line.scene{font-size:10px}
.log-line .damage-value{font:700 1.12em var(--mono);color:#ff947d;text-shadow:0 0 12px #ff684744;padding:0 2px}
.log-line .heal-value{font-weight:800;color:#9de5bd}
.log-line .status-mark{display:inline-block;border:1px solid #8467ad;border-radius:3px;background:#382a4e;color:#e2d0ff;font-weight:700;font-style:normal;padding:0 4px;line-height:1.45}
.log-line.status-event{color:#e8d9ff}
.battle-page .battle-footer{flex:none;margin:0;gap:6px}
.battle-page .battle-footer .button{min-width:86px;padding:7px 12px;font-size:11px}
.battle-page.playing .battle-footer{display:none}
.battle-page.playing .battle-head{order:0}
.battle-page.playing .playback-controls{order:1}
.battle-page.playing .compare-details{order:2}
.battle-page.playing .log{order:3}
.battle-page.playing .battle-result-head{order:-1}
.battle-page.playing .battle-result-head h2{font-size:15px;color:#d9c99f}
.battle-page.winner .battle-result-head h2{color:#ffe49c;text-shadow:0 0 20px #ffcc5b99;animation:winner-title .8s ease-in-out 3}
.victory-burst{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:5;background:radial-gradient(ellipse at 50% 12%,#ffe38d32,transparent 48%);animation:victory-flash 1.1s ease-out both}
.victory-burst i{position:absolute;left:var(--spark-x);top:var(--spark-y);font-style:normal;color:#ffe99e;text-shadow:0 0 12px #ffd364;animation:victory-spark 1.5s var(--spark-delay) ease-out both}
.battle-page.winner .fighter-a{border-color:#c5a65a;box-shadow:0 0 28px #dcb85244,inset 0 0 24px #dcb85212}
.combat-cast{animation:combat-cast .65s ease-out}
.combat-cast-magic{animation:combat-cast-magic .75s ease-out}
.combat-cast-guard{animation:combat-cast-guard .7s ease-out}
.combat-hit-physical{animation:combat-lunge .36s ease-in}
.combat-hit-magic{animation:combat-magic .65s ease-out}
.combat-double{animation:combat-double .68s ease-in-out}
.combat-rush{animation:combat-rush .42s cubic-bezier(.2,.8,.3,1)}
.combat-drain{animation:combat-drain .68s ease-out}
.combat-heal{animation:combat-heal .8s ease-out}
.condition-applied{animation:condition-applied .65s ease-out}
.condition-resisted{animation:condition-resisted .65s ease-out}
.condition-cleared{animation:condition-cleared .65s ease-out}
.impact-hit{animation:impact-hit .48s cubic-bezier(.2,.8,.2,1)}
@keyframes combat-cast{35%{transform:scale(1.025);filter:brightness(1.35);box-shadow:0 0 22px #e1bd6588}}
@keyframes combat-cast-magic{35%{transform:scale(1.025);filter:hue-rotate(45deg) brightness(1.55);box-shadow:0 0 30px #a887ffbb}}
@keyframes combat-cast-guard{40%{filter:brightness(1.5);box-shadow:inset 0 0 30px #ffe08488,0 0 18px #ffe08466}}
@keyframes combat-lunge{45%{transform:translateX(13px) scale(1.025);filter:brightness(1.4)}}
@keyframes combat-magic{40%{filter:hue-rotate(45deg) brightness(1.65);box-shadow:0 0 28px #9e85ff99}}
@keyframes combat-double{25%{transform:translateX(8px)}50%{transform:translateX(-5px);filter:brightness(1.6)}75%{transform:translateX(10px)}}
@keyframes combat-rush{35%{transform:translateX(18px) skewX(-3deg);filter:brightness(1.6)}}
@keyframes combat-drain{45%{filter:hue-rotate(300deg) brightness(1.5);box-shadow:0 0 28px #ed5d7799}}
@keyframes combat-heal{35%{filter:brightness(1.7);box-shadow:0 0 28px #70e79c99;border-color:#90e7ad}}
@keyframes condition-applied{35%{filter:hue-rotate(35deg) brightness(1.8);box-shadow:0 0 26px #c280ff99;border-color:#bc8cf1}}
@keyframes condition-resisted{35%{filter:brightness(1.7);box-shadow:0 0 24px #f0d36599;border-color:#f0d365}}
@keyframes condition-cleared{35%{filter:hue-rotate(110deg) brightness(1.7);box-shadow:0 0 26px #83d9be99;border-color:#8bd7b1}}
@keyframes victory-flash{0%{opacity:0}18%{opacity:1}100%{opacity:0}}
@keyframes victory-spark{0%{opacity:0;transform:translateY(24px) scale(.2) rotate(-40deg)}25%{opacity:1}100%{opacity:0;transform:translateY(-55px) scale(1.5) rotate(70deg)}}
@keyframes winner-title{50%{transform:scale(1.07);filter:brightness(1.5)}}
@media(max-width:650px){

 .battle-result-head{flex-direction:row;align-items:center;margin:0;min-height:23px}
 .battle-result-head h2{font-size:15px}
 .battle-head{grid-template-columns:minmax(0,1fr) 23px minmax(0,1fr);gap:4px}
 .fighter{padding:6px 7px}.fighter .name{font-size:11px}.fighter .epithet{display:none}.fighter .hp-label{margin-top:4px;font-size:8px}.fighter-side{font-size:7px}
 .compare-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 8px}

 .battle-page .log{min-height:100px;padding:2px 7px}
 .battle-page .log-line{font-size:10px;padding:4px 3px}
 .battle-note{font-size:9px}
}
@media(max-height:700px){.battle-page{min-height:0}.battle-page .log{min-height:70px}}
@media(prefers-reduced-motion:reduce){.victory-burst,.victory-burst i,.battle-page.winner .battle-result-head h2{animation:none!important;opacity:1}}

.fighter.right.combat-hit-physical,.fighter.right.combat-rush{animation-name:combat-lunge-reverse}
.fighter.right.combat-double{animation-name:combat-double-reverse}
.combat-dot{animation:combat-dot .6s ease-out}
.log-line.type-dot .damage-value{color:#ffad68;text-shadow:0 0 12px #ff7a3544}
@keyframes combat-lunge-reverse{45%{transform:translateX(-13px) scale(1.025);filter:brightness(1.4)}}
@keyframes combat-double-reverse{25%{transform:translateX(-8px)}50%{transform:translateX(5px);filter:brightness(1.6)}75%{transform:translateX(-10px)}}
@keyframes combat-dot{35%{filter:hue-rotate(-25deg) brightness(1.65);box-shadow:inset 0 0 22px #a9e25a66,0 0 20px #a9e25a66;border-color:#b0d26c}}

.status-list::-webkit-scrollbar{width:3px;height:3px}.status-list::-webkit-scrollbar-thumb{background:#8c774c;border-radius:4px}

.log-line .log-name{font-weight:800;white-space:nowrap;border-bottom:1px solid currentColor}.log-line .log-name.ally{color:#8de0cd;text-shadow:0 0 10px #58c9b344}.log-line .log-name.enemy{color:#ff9b83;text-shadow:0 0 10px #f06c5844}

.log-line.commentary{color:#d9c9a9;background:linear-gradient(90deg,#d2b8790c,transparent 80%);font-style:normal}.commentary-tag{display:inline-block;margin-right:7px;padding:0px 4px;border:1px solid #8a7651;border-radius:3px;color:#e2c47f;font:8px/1.5 var(--mono);vertical-align:1px;letter-spacing:.05em}

.character-intro{display:flex;align-items:center;gap:16px;position:relative;z-index:1}.character-portrait{width:112px;aspect-ratio:1;flex:none;overflow:hidden;border:1px solid #78694b;background:#15171e;display:grid;place-items:center}.portrait-art{width:100%;height:100%;display:block}.character-heading{min-width:0}.character-heading .char-title{overflow-wrap:anywhere}.character-heading .tag-row{margin-top:10px}.background-panel{position:relative;z-index:1;border:1px solid #343641;background:#14161d;margin:14px 0}.background-panel summary{padding:8px 11px;color:#d8c28d;font-size:11px;cursor:pointer;list-style:none}.background-panel summary::-webkit-details-marker{display:none}.background-panel summary:after{content:"＋";float:right;color:#8b8f9a}.background-panel[open] summary:after{content:"−"}.background-panel summary span{margin-left:7px;color:#858a97;font-size:9px}.background-copy{padding:0 12px 10px;color:#b2b3bb;font-size:11px;line-height:1.7}.background-copy p{margin:7px 0}.background-copy b{display:block;color:#d8b77a;font-size:10px}.roster-summary{display:flex;align-items:center;gap:12px}.roster-summary-copy{min-width:0;flex:1}.roster-thumb{width:48px;height:48px;flex:none;overflow:hidden;border:1px solid #4a4650;background:#17191f;display:grid;place-items:center}.roster-thumb .portrait-art{width:100%;height:100%}.roster-lore{max-width:590px;margin-top:3px;color:#c2b48f;font-size:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:650px){.character-intro{align-items:flex-start;gap:11px}.character-portrait{width:82px}.character-heading .char-title{font-size:20px}.character-heading .tag-row{gap:4px}.roster-summary{align-items:flex-start;gap:9px}.roster-thumb{width:38px;height:38px}.roster-row{grid-template-columns:minmax(0,1fr);gap:9px}.roster-row>.actions{justify-content:flex-end}}
/* Battle portrait HUD: keep both fighters readable while leaving the log visible. */
.fighter{display:flex;flex-direction:column;gap:0;transition:border-color .25s,box-shadow .25s}
.fighter-topline{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;margin-bottom:5px}
.fighter-species{min-width:0;max-width:68%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#9ca3af;font-size:8px}
.fighter-identity{display:flex;align-items:center;gap:9px;min-width:0;margin-bottom:3px}
.fighter-avatar{width:58px;height:58px;flex:none;overflow:hidden;border:1px solid #7bbbae77;border-radius:4px;background:#0d1117;box-shadow:0 0 16px #66c3af22;transform-origin:center}
.fighter-avatar .portrait-art{width:100%;height:100%;background-size:400% 400%;image-rendering:auto}
.fighter-copy{min-width:0;flex:1}
.fighter-copy .name{white-space:normal;overflow-wrap:anywhere;line-height:1.2}
.fighter-copy .epithet{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fighter.right .fighter-identity{flex-direction:row-reverse;text-align:right}
.fighter.right .fighter-avatar{border-color:#dd948277;box-shadow:0 0 16px #e9877222}
.fighter .hp-label{display:flex;justify-content:space-between;align-items:center;gap:5px;font-variant-numeric:tabular-nums}
.fighter .hp-value{font:700 10px var(--mono);color:#c8f2df}
.fighter.right .hp-value{color:#ffd0bd}
.fighter .mp-label{color:#9ea9d9}
.fighter.critical .hp-value{color:#ff887d;animation:critical-pulse 1s ease-in-out infinite}
.fighter.critical .hp-bar{box-shadow:0 0 12px #ed514c66}
.fighter .hp-bar i,.fighter .mp-bar i{transition:width .45s cubic-bezier(.2,.75,.25,1)}
.fighter .status-list{height:22px;min-height:22px;max-height:22px;align-content:flex-start;overflow:hidden}
.fighter .status-list.has-status{min-height:22px}
.status-pill.status-effect-doubleReady,.status-pill.status-effect-berserk,.status-pill.status-effect-commandSeal{border-color:#c39f4d;background:#493b20;color:#ffe19a}
.battle-head .vs{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.battle-head .vs small{font:8px var(--mono);color:#c5a56a;white-space:nowrap}
.battle-head .vs i{width:5px;height:5px;border-radius:50%;background:#d1ae65;box-shadow:0 0 10px #d1ae65}
.compare-details[open]{max-height:min(31vh,225px);overflow:auto;scrollbar-width:thin}
.compare-details[open] .compare-list{padding-bottom:8px}
.battle-page .log{display:flex;flex-direction:column;justify-content:flex-start}
.battle-page .log-line{flex:none;overflow-wrap:anywhere}
.battle-page .log-line:first-child{background:linear-gradient(90deg,#d8b65a12,transparent 76%)}
.battle-page .log-line:first-child.commentary{color:#e7e0cb}
.battle-page .log-name{display:inline-block;max-width:100%;overflow-wrap:anywhere;white-space:normal}
.fighter-avatar.combat-hit-physical,.fighter-avatar.combat-hit-magic,.fighter-avatar.combat-double,.fighter-avatar.combat-rush,.fighter-avatar.combat-drain,.fighter-avatar.combat-dot,.fighter-avatar.combat-heal{z-index:1;position:relative}
.fighter.right .fighter-avatar.combat-hit-physical,.fighter.right .fighter-avatar.combat-rush{animation-name:combat-lunge-reverse}
.fighter.right .fighter-avatar.combat-double{animation-name:combat-double-reverse}
@keyframes combat-double-reverse{25%{transform:translateX(-8px)}50%{transform:translateX(5px);filter:brightness(1.6)}75%{transform:translateX(-10px)}}
@keyframes critical-pulse{50%{text-shadow:0 0 10px #ff514f;filter:brightness(1.35)}}
@media(max-width:650px){
 .battle-page{gap:4px}
 .battle-head{grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr);gap:4px}
 .fighter{padding:5px 6px}
 .fighter-topline{margin-bottom:3px}
 .fighter-species{font-size:7px;max-width:72%}
 .fighter-identity{gap:6px}
 .fighter-avatar{width:42px;height:42px;border-radius:3px}
 .fighter-copy .name{font-size:10px;line-height:1.15}
 .fighter-copy .epithet{font-size:8px}
 .fighter .hp-value{font-size:8px}
 .fighter .hp-label{font-size:8px}
 .fighter .status-list{height:20px;min-height:20px;max-height:20px;margin-top:3px}
 .fighter .status-list.has-status{min-height:20px}
 .battle-head .vs small{font-size:7px}
 .compare-details{padding:0 7px}
 .compare-details[open]{max-height:26vh}
 .battle-page .log{min-height:92px}
}
@media(max-height:700px){.fighter-avatar{width:44px;height:44px}.fighter .status-list{height:18px;min-height:18px;max-height:18px}.fighter .status-list.has-status{min-height:18px}.compare-details[open]{max-height:24vh}}
@media(prefers-reduced-motion:reduce){.fighter.critical .hp-value{animation:none}}
/* Readability and intent pass */
.arena-hint{margin:10px 0 0;color:#aeb2bf;font-size:12px;line-height:1.5}
.roster-epithet{font-size:11px;color:var(--gold);line-height:1.4;margin:1px 0 3px;overflow-wrap:anywhere}
.roster-summary-copy .roster-name{white-space:normal;overflow-wrap:anywhere;font-size:14px}
.roster-summary-copy .roster-meta{font-size:10px}
.roster-highlights{display:flex;gap:12px;flex-wrap:wrap;margin:6px 0 4px}
.roster-highlight{display:flex;align-items:center;gap:5px;min-width:92px;color:#d6d0c3;font-size:10px;font-variant-numeric:tabular-nums}
.roster-highlight>b{font-weight:700;white-space:nowrap}
.roster-highlight>i{display:block;width:48px;height:4px;border-radius:5px;background:#090b10;overflow:hidden}
.roster-highlight em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#8b6936,#e0c477)}
.roster-actions{flex-wrap:wrap}
.stat-label{font-size:11px;white-space:nowrap}
.stat-bar>b{font-size:12px}
.stat-bars.compact .stat-label{font-size:9px}
.stat-bars.compact .stat-bar>b{font-size:9px}
.compare-side .compare-who{width:25px;flex:none;color:#91cdbd;font-size:8px;white-space:nowrap}
.compare-side.b .compare-who{color:#e39a86}
/* Keep battle order stable before, during, and after playback. */
.battle-page .battle-result-head{order:-1}
.battle-page .battle-head{order:0}
.battle-page .playback-controls{order:1}
.battle-page .compare-details{order:2}
.battle-page .log{order:3}
.battle-page .battle-footer{order:4}
.battle-page .fighter-copy .name{font-size:14px;line-height:1.2}
.battle-page .fighter .hp-value{font-size:12px}
.battle-page .fighter .hp-label{font-size:10px}
.battle-page .fighter-species{font-size:9px;color:#c5c7cf}
.fighter .status-list{height:auto;min-height:24px;max-height:43px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}
.fighter .status-list.has-status{min-height:24px}
.fighter .status-pill{font-size:9px;line-height:18px;padding:0 5px}
.compare-details[open]{overflow-y:auto}
.compare-stat .compare-label{font-size:10px}
.compare-side strong{font-size:11px;width:22px}
.compare-side>i{height:5px}
.battle-page .log-line{font-size:12px;line-height:1.55;padding:6px 5px}
.battle-page .log-line .commentary-tag{font-size:9px;margin-right:5px}
.battle-page .log-line.commentary{border-left:2px solid #8a7651;padding-left:8px;color:#ddd3be}
.battle-page .log-line.round-start{border-top:1px solid #ffffff14;margin-top:4px;padding-top:7px}
.battle-page .round{display:inline-block;margin-right:6px;color:#dfc47b;font:9px var(--mono)}
.battle-page .playback-actions{flex-wrap:wrap}
.pause-button{min-height:26px;padding:4px 8px;font-size:10px}
@media(max-width:650px){
 .roster-summary{align-items:center}
 .roster-row{gap:7px;padding:10px}
 .roster-row>.actions{justify-content:flex-start}
 .roster-summary-copy .roster-name{font-size:14px}
 .roster-highlights{gap:5px 9px}
 .roster-highlight{min-width:84px;font-size:9px}
 .roster-highlight>i{width:40px}
 .battle-page{gap:4px}
 .battle-head{grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr);gap:4px}
 .fighter{padding:6px 7px}
 .fighter-topline{margin-bottom:4px}
 .fighter-species{font-size:8px;max-width:72%}
 .fighter-identity{gap:6px}
 .fighter-avatar{width:42px;height:42px}
 .battle-page .fighter-copy .name{font-size:12px;line-height:1.2}
 .battle-page .fighter-copy .epithet{display:none}
 .battle-page .fighter .hp-value{font-size:11px}
 .battle-page .fighter .hp-label{font-size:9px}
 .fighter .status-list{min-height:26px;max-height:39px;height:auto;margin-top:3px;overflow-y:auto}
 .fighter .status-pill{font-size:9px;line-height:17px}
 .battle-head .vs small{font-size:8px}
 .compare-details{padding:0 7px}
 .compare-details[open]{max-height:26vh}
 .compare-list{gap:6px 8px}
 .compare-side .compare-who{width:21px;font-size:8px}
 .compare-side strong{width:20px;font-size:10px}
 .playback-controls{min-height:34px;padding:4px 6px}
 .playback-actions{gap:4px}
 .pause-button{min-height:28px;font-size:10px}
 .speed-button{min-width:32px;height:28px;font-size:10px}
 .skip-button{padding:5px 8px;font-size:10px}
 .battle-page .log{min-height:90px;padding:3px 7px}
 .battle-page .log-line{font-size:12px;line-height:1.5;padding:5px 3px}
 .battle-page .log-line.scene{font-size:11px}
}
@media(max-height:700px){
 .fighter-avatar{width:44px;height:44px}
 .fighter .status-list{min-height:20px;max-height:34px}
 .compare-details[open]{max-height:22vh}
 .battle-page .log{min-height:65px}
}

/* Comic-panel impacts: keep the battle layout fixed and animate only the current exchange. */
.fighter>.combat-vfx{position:absolute;inset:0;z-index:1;display:block;overflow:hidden;pointer-events:none}
.fighter>.combat-vfx i{position:absolute;display:block;opacity:0}
.fighter>.fighter-topline,.fighter>.fighter-identity,.fighter>.hp-label,.fighter>.bar,.fighter>.status-list{position:relative;z-index:2}
.fighter.combat-hit-physical .combat-vfx i:first-child,.fighter.combat-heavy .combat-vfx i:first-child{left:18%;top:42%;width:118%;height:3px;background:linear-gradient(90deg,transparent,#fff8dc,#f6c46f,transparent);box-shadow:0 0 12px #ffe4a2;transform:rotate(-24deg);animation:vfx-slash .42s ease-out}
.fighter.combat-heavy .combat-vfx i:nth-child(2){left:47%;top:34%;width:54px;height:54px;border:2px solid #ffe6a1;border-radius:50%;box-shadow:0 0 24px #ffd77d;animation:vfx-burst .48s ease-out}
.fighter.combat-hit-magic .combat-vfx i:first-child,.fighter.combat-drain .combat-vfx i:first-child{left:50%;top:50%;width:68px;height:68px;border:2px solid #b8a1ff;border-radius:50%;box-shadow:0 0 24px #9f82ff;animation:vfx-ring .72s ease-out}
.fighter.combat-hit-magic .combat-vfx i:nth-child(2){left:55%;top:20%;width:12px;height:12px;border-radius:50%;background:#e8dcff;box-shadow:0 0 18px 8px #a886ff;animation:vfx-orb .65s ease-out}
.fighter.combat-double .combat-vfx i:first-child,.fighter.combat-rush .combat-vfx i:first-child{left:4%;top:52%;width:95%;height:2px;background:linear-gradient(90deg,transparent,#fff5d4,#efbf73,transparent);transform:rotate(-8deg);animation:vfx-streak .5s ease-out}
.fighter.combat-counter .combat-vfx i:first-child,.fighter.impact-block .combat-vfx i:first-child{left:35%;top:25%;width:68px;height:68px;border:2px solid #b5e2d1;border-radius:50%;box-shadow:inset 0 0 16px #8ee7cb77,0 0 20px #8ee7cb88;animation:vfx-ring .55s ease-out}
.fighter.combat-ultimate .combat-vfx i:first-child,.fighter.combat-ultimate-hit .combat-vfx i:first-child,.fighter.impact-ultimate .combat-vfx i:first-child{left:30%;top:10%;width:100px;height:100px;border:2px solid #ffe8a4;border-radius:50%;box-shadow:0 0 34px #ffdc78,inset 0 0 24px #ffe9a4aa;animation:vfx-ultimate 1.15s ease-out}
.fighter.combat-ultimate .combat-vfx i:nth-child(2),.fighter.combat-ultimate-hit .combat-vfx i:nth-child(2),.fighter.impact-ultimate .combat-vfx i:nth-child(2){left:0;top:48%;width:100%;height:3px;background:linear-gradient(90deg,transparent,#fff,#ffe28a,transparent);box-shadow:0 0 20px #ffdc78;animation:vfx-flash .7s .18s ease-out}
.fighter.impact-hit .combat-vfx i:nth-child(2){left:45%;top:40%;width:42px;height:42px;border:2px solid #fff0c4;border-radius:50%;box-shadow:0 0 22px #ffd682;animation:vfx-burst .42s ease-out}
.fighter.condition-applied .combat-vfx i:first-child{left:30%;top:22%;width:90px;height:90px;border:2px solid #b8a1ff;border-radius:50%;box-shadow:0 0 24px #a887ff99;animation:vfx-ring .7s ease-out}
.log-line.ultimate-event{color:#ffe7a3;text-shadow:0 0 14px #f2bd5166;border-left:3px solid #edbf59!important;background:linear-gradient(90deg,#d9a63a22,transparent 85%)}
.log-line.action-ultimate .damage-value{font-size:1.3em;color:#ffe59a;text-shadow:0 0 14px #ffc94f}
@keyframes vfx-slash{0%{opacity:0;transform:translateX(-24%) rotate(-24deg) scaleX(.15)}30%{opacity:1}100%{opacity:0;transform:translateX(20%) rotate(-24deg) scaleX(1)}}
@keyframes vfx-streak{0%{opacity:0;transform:translateX(-25%) rotate(-8deg)}35%{opacity:.9}100%{opacity:0;transform:translateX(18%) rotate(-8deg)}}
@keyframes vfx-ring{0%{opacity:0;transform:scale(.35)}35%{opacity:.9}100%{opacity:0;transform:scale(1.55)}}
@keyframes vfx-burst{0%{opacity:0;transform:scale(.2)}35%{opacity:1}100%{opacity:0;transform:scale(1.7)}}
@keyframes vfx-orb{0%{opacity:0;transform:translate(-38px,24px) scale(.3)}35%{opacity:1}100%{opacity:0;transform:translate(24px,-18px) scale(1.2)}}
@keyframes vfx-flash{0%{opacity:0;transform:scaleX(.1)}25%{opacity:1}100%{opacity:0;transform:scaleX(1)}}
@keyframes vfx-ultimate{0%{opacity:0;transform:scale(.28) rotate(-35deg)}35%{opacity:1}100%{opacity:0;transform:scale(1.55) rotate(35deg)}}
@media(prefers-reduced-motion:reduce){.fighter>.combat-vfx{display:none}}
.stat-bars:not(.compact) .stat-bar{grid-template-columns:50px minmax(0,1fr) minmax(74px,max-content)}
.status-list:focus-visible{outline:1px solid #e0c477;outline-offset:1px}
.battle-page.playing .pause-button:focus-visible,.battle-page .log:focus-visible{outline:1px solid #e0c477;outline-offset:2px}
@media(max-width:650px){.stat-bars:not(.compact) .stat-bar{grid-template-columns:46px minmax(0,1fr) minmax(74px,max-content)}}

/* Battle crowd and shared sound-effect overlays. */


/* Combat sound effects and audience chatter have separate visual beats. */

.battle-crowd-bubble{position:absolute;top:1px;left:50%;width:min(300px,58vw);min-height:48px;padding:7px 13px;display:grid;align-content:center;gap:1px;transform:translateX(-50%);border:1.5px solid #e0c77e;border-radius:16px 16px 16px 5px;background:linear-gradient(145deg,#29231eF5,#171820F7);box-shadow:0 7px 22px #000b,0 0 18px #e6bd5940;color:#f4ead5;text-align:center;animation:crowd-bubble-float 2.6s cubic-bezier(.18,.75,.25,1) both}
.battle-crowd-bubble:after{content:"";position:absolute;left:calc(50% - 7px);bottom:-8px;width:13px;height:13px;transform:rotate(45deg);border-right:1.5px solid #e0c77e;border-bottom:1.5px solid #e0c77e;background:#1c1b20}
.battle-crowd-bubble>span{font:700 8px/1.2 var(--mono);letter-spacing:.12em;color:#d6bf7c}
.battle-crowd-bubble>b{font-size:14px;line-height:1.35;font-weight:750;text-wrap:balance}
.battle-crowd-bubble.heckle{border-color:#df806a;border-radius:4px 17px 15px 17px;background:linear-gradient(145deg,#33201fF5,#171820F7);transform:translateX(-50%) rotate(-1deg)}
.battle-crowd-bubble.heckle:after{border-color:#df806a}
.battle-crowd-bubble.heckle>span,.battle-crowd-bubble.heckle>b{color:#ffc5b1}
.battle-crowd-bubble.shock{border-color:#f2ce68;border-radius:14px 19px 14px 19px;background:linear-gradient(145deg,#38301cF5,#171820F7);clip-path:none}
.battle-crowd-bubble.shock:after{display:block;border-color:#f2ce68;background:#28231c}
.battle-crowd-bubble.shock>span,.battle-crowd-bubble.shock>b{color:#ffe89c}
.battle-crowd-bubble.data{border-color:#71c8ca;border-radius:5px;background:linear-gradient(145deg,#162b2df5,#171820f7);box-shadow:0 5px 18px #000b,0 0 16px #60d4d055}
.battle-crowd-bubble.data:after{border-color:#71c8ca}
.battle-crowd-bubble.data>span{color:#83d7d8}
.battle-crowd-bubble.data>b{font:700 13px/1.35 var(--mono);color:#c4f0eb}
.battle-crowd-bubble.from-left{left:42%}.battle-crowd-bubble.from-right{left:58%}
.combat-callout strong{display:block;width:100%;max-width:100%;padding:2px 4px;color:#fff1d3;-webkit-text-stroke:1.35px #211512;text-shadow:2px 3px 0 #211512,0 0 12px #ffcf76aa;font:900 clamp(24px,7vw,48px)/1 'Dela Gothic One','Noto Sans JP',sans-serif;letter-spacing:-.075em;text-align:center;white-space:nowrap;paint-order:stroke fill}
.combat-callout.has-art strong{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.combat-callout.physical strong{transform:rotate(-7deg) skewX(-9deg) scaleX(.93);text-shadow:2px 3px 0 #211512,0 0 13px #ffb340bb}
.combat-callout.heavy strong{color:#fff2cf;-webkit-text-stroke:2px #32130d;transform:rotate(-11deg) skewX(-12deg) scaleX(.82);text-shadow:3px 4px 0 #32130d,0 0 17px #ff4f36cc}
.combat-callout.magic strong{color:#e4d7ff;-webkit-text-stroke:1px #261646;transform:rotate(5deg) skewY(-5deg);letter-spacing:.025em;text-shadow:2px 3px 0 #261646,0 0 14px #a982ffdd}
.combat-callout.blocked strong{color:#e2f4ff;-webkit-text-stroke:1px #1e3047;transform:rotate(2deg) scaleX(1.05);letter-spacing:.015em;text-shadow:2px 3px 0 #1e3047,0 0 12px #83d7ffdd}
.combat-callout.combo strong{color:#fff0b8;-webkit-text-stroke:1.5px #4a210a;transform:rotate(-4deg) skewX(-14deg) scaleX(1.08);letter-spacing:-.085em;text-shadow:3px 3px 0 #4a210a,0 0 13px #ff982ccc}
.combat-callout.miss strong{color:#e3e5ec;-webkit-text-stroke:.8px #303541;transform:rotate(8deg) skewX(-8deg) scaleX(.9);font-family:'Noto Sans JP',sans-serif;font-size:clamp(22px,5.8vw,40px);font-weight:600;letter-spacing:.08em;text-shadow:1px 2px 0 #303541,0 0 10px #c7d0e099}
.combat-callout.combo-tick strong{font-size:clamp(22px,5.8vw,40px);transform:rotate(-8deg) skewX(-13deg) scale(.82,.72);text-shadow:2px 2px 0 #4a210a,0 0 10px #ff982ccc}
.combat-callout.light strong{color:#dedbd3;-webkit-text-stroke:.45px #31313a;transform:rotate(-3deg) scale(.86,.78);font-family:'Noto Sans JP',sans-serif;font-size:clamp(20px,5vw,36px);font-weight:500;letter-spacing:.025em;text-shadow:1px 1px 0 #31313a}
.combat-callout.ultimate{animation:combat-callout-ultimate .52s cubic-bezier(.15,.9,.2,1.15) both,combat-callout-out .24s calc(var(--callout-life,1.5s) - .24s) ease-in both}
.combat-callout.ultimate strong{padding:4px 5px;color:#fff0ac;-webkit-text-stroke:2px #401017;transform:rotate(-5deg) scale(.82,1.12);font-size:clamp(28px,6.5vw,52px);letter-spacing:-.09em;text-shadow:3px 4px 0 #401017,0 0 12px #ffdf64,0 0 28px #f34432dd}
.ultimate-cutin{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;overflow:hidden;pointer-events:none;background:radial-gradient(ellipse at 50% 50%,#17131bd9,#07080deF 76%);animation:ultimate-cutin-dim 1.45s ease both}
.ultimate-cutin:before{content:"";position:absolute;inset:18% -12%;background:linear-gradient(105deg,#4d121e00 15%,#7d2529dc 40%,#ce9d4df0 53%,#29151dcc 70%,#11131a00 89%);clip-path:polygon(0 17%,100% 0,100% 72%,0 100%);transform:skewY(-6deg);animation:ultimate-cutin-slash .62s cubic-bezier(.12,.86,.25,1) both}
.ultimate-cutin-panel{position:relative;display:flex;align-items:center;width:min(900px,100vw);min-height:clamp(210px,42vh,390px);padding:20px clamp(20px,7vw,76px);isolation:isolate;animation:ultimate-cutin-panel-in .46s cubic-bezier(.13,.88,.22,1.12) both}
.ultimate-cutin-portrait{position:absolute;z-index:-1;inset:-16% auto -16% 2%;width:54%;overflow:hidden;transform:skewX(-9deg);filter:drop-shadow(12px 2px 14px #000c);animation:ultimate-cutin-portrait-in .58s cubic-bezier(.1,.83,.22,1) both}
.ultimate-cutin-portrait:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#07080d00 38%,#090a10d9 83%,#090a10);}
.ultimate-cutin-portrait .fighter-avatar{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;border:0;background:transparent;transform:skewX(9deg) scale(1.22);transform-origin:center}
.ultimate-cutin-portrait .portrait-art{width:100%;height:100%;background-size:400% 400%;}
.ultimate-cutin-copy{display:grid;justify-items:start;gap:7px;width:72%;margin-left:auto;color:#fff3d0;text-shadow:0 3px 16px #000;}
.ultimate-cutin-label{padding:4px 8px;border-left:2px solid #e1bd68;background:#211a1abf;color:#e9ce8a;font:700 9px/1.2 var(--mono);letter-spacing:.16em;text-transform:uppercase}
.ultimate-cutin-epithet{color:#e8c973;font:600 clamp(12px,2.4vw,18px)/1.4 'Yu Mincho','Noto Serif JP',serif;letter-spacing:.12em}
.ultimate-cutin-name{color:#fff;font:800 clamp(26px,7vw,56px)/1.15 'Yu Mincho','Noto Serif JP',serif;letter-spacing:.03em;text-wrap:balance}
.ultimate-cutin-technique{max-width:100%;padding-top:5px;border-top:1px solid #d5b86d80;color:#fff0bd;font:700 clamp(15px,3.4vw,26px)/1.35 'Noto Sans JP',sans-serif;text-wrap:balance}
.ultimate-cutin-sfx{position:absolute;z-index:2;left:50%;top:68%;color:#fff5cb;-webkit-text-stroke:1px #431313;transform:translateX(-50%) rotate(-8deg) skewX(-9deg);font:900 clamp(27px,8vw,64px)/1 'Dela Gothic One','Noto Sans JP',sans-serif;letter-spacing:-.08em;text-shadow:3px 4px 0 #41151a,0 0 18px #ffb955;white-space:nowrap;animation:ultimate-cutin-sfx .5s .12s cubic-bezier(.15,.9,.2,1.15) both}
.ultimate-cutin.from-right .ultimate-cutin-panel{flex-direction:row-reverse}
.ultimate-cutin.from-right .ultimate-cutin-portrait{inset:-16% 2% -16% auto;transform:skewX(9deg);}
.ultimate-cutin.from-right .ultimate-cutin-portrait .fighter-avatar{transform:skewX(-9deg) scale(1.22)}
.ultimate-cutin.from-right .ultimate-cutin-portrait:after{background:linear-gradient(270deg,#07080d00 38%,#090a10d9 83%,#090a10)}
.ultimate-cutin.from-right .ultimate-cutin-copy{justify-items:end;margin:0 auto 0 0;text-align:right}
@keyframes ultimate-cutin-dim{0%{opacity:0}8%,74%{opacity:1}100%{opacity:0}}
@keyframes ultimate-cutin-slash{0%{opacity:0;translate:-28% 14%;scale:1 .65}30%{opacity:1}100%{opacity:.84;translate:0 0;scale:1 1}}
@keyframes ultimate-cutin-panel-in{0%{opacity:0;translate:0 20px;scale:.94}100%{opacity:1;translate:0 0;scale:1}}
@keyframes ultimate-cutin-portrait-in{0%{opacity:0;translate:-50px 0;scale:.96}100%{opacity:1;translate:0 0;scale:1}}
@keyframes ultimate-cutin-sfx{0%{opacity:0;scale:.2;rotate:-12deg}65%{opacity:1;scale:1.12;rotate:2deg}100%{opacity:1;scale:1;rotate:0}}
@media(max-width:650px){.ultimate-cutin{padding:0 8px}.ultimate-cutin-panel{min-height:250px;padding:18px 14px}.ultimate-cutin-portrait{inset:-4% auto -4% -15%;width:72%}.ultimate-cutin.from-right .ultimate-cutin-portrait{inset:-4% -15% -4% auto}.ultimate-cutin-copy{width:82%;gap:6px}.ultimate-cutin-name{font-size:clamp(23px,9vw,42px)}.ultimate-cutin-technique{font-size:clamp(13px,4.5vw,20px)}}
@media(prefers-reduced-motion:reduce){.ultimate-cutin,.ultimate-cutin:before,.ultimate-cutin-panel,.ultimate-cutin-portrait{animation:none}}
@keyframes crowd-bubble-float{0%{opacity:0;translate:0 13px;scale:.91}12%{opacity:1;translate:0 0;scale:1}78%{opacity:1;translate:0 -4px;scale:1}100%{opacity:0;translate:0 -24px;scale:.97}}
@keyframes combat-callout-out{to{opacity:0;scale:.82}}
@keyframes sfx-art-hit{0%{opacity:0;scale:.72;rotate:-5deg}70%{opacity:1;scale:1.04;rotate:1.5deg}100%{opacity:1;scale:1;rotate:0}}
@media(max-width:650px){.battle-crowd-bubble{top:1px;width:min(300px,74vw);min-height:47px;padding:6px 9px}.battle-crowd-bubble.from-left{left:45%}.battle-crowd-bubble.from-right{left:55%}.battle-crowd-bubble>b{font-size:13px}.battle-crowd-bubble.data>b{font-size:12px}}

.battle-head{position:relative;z-index:12;isolation:isolate}
.combat-sfx-layer{position:absolute;inset:0;z-index:100;overflow:visible;pointer-events:none}
/* Sound effects render above both fighter cards in one shared layer. */
.combat-callout{position:absolute;z-index:1000;top:50%;left:32%;width:min(60%,320px);height:auto;min-height:0;aspect-ratio:var(--sfx-ratio,2 / 1);display:flex;align-items:center;justify-content:center;overflow:visible;padding:0;transform:translate(-50%,-50%);background:none;border:0;box-shadow:none;pointer-events:none;animation:combat-callout-in .3s cubic-bezier(.16,.9,.24,1.1) both,combat-callout-out .22s calc(var(--callout-life,.76s) - .22s) ease-in both}
.combat-callout.from-right{left:68%}
.combat-callout-art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;transform:scale(1.06);opacity:.94;filter:drop-shadow(0 3px 5px #000b);animation:sfx-art-hit .35s cubic-bezier(.14,.8,.25,1.05) both}
.combat-callout.art-monochrome .combat-callout-art{filter:grayscale(1) contrast(1.38) brightness(1.08) drop-shadow(0 2px 2px #000d);opacity:1}
.combat-callout.art-american .combat-callout-art{filter:saturate(2.3) contrast(1.24) brightness(1.04) drop-shadow(3px 3px 0 #17151b) drop-shadow(-2px -2px 0 #fff) drop-shadow(5px 4px 0 #d63238);opacity:1}
.combat-callout.art-american::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background-image:radial-gradient(#17151b 1px,transparent 1.25px);background-size:5px 5px;mask-image:var(--sfx-image);mask-repeat:no-repeat;mask-position:center;mask-size:100% 100%;opacity:.27;mix-blend-mode:multiply}
@keyframes combat-callout-in{0%{opacity:0;transform:translate(-50%,-50%) scale(.45) rotate(-8deg)}70%{opacity:1;transform:translate(-50%,-50%) scale(1.08) rotate(2deg)}100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes combat-callout-ultimate{0%{opacity:0;transform:translate(-50%,-50%) scale(.15) rotate(-18deg)}62%{opacity:1;transform:translate(-50%,-50%) scale(1.16) rotate(3deg)}100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@media(prefers-reduced-motion:reduce){.battle-crowd-bubble,.combat-callout,.combat-callout.ultimate,.combat-callout-art{animation:none}.battle-crowd-bubble{opacity:1}}
.battle-page .battle-footer .replay-only-label{margin-right:auto;color:var(--muted);font-size:11px}
.battle-share-page{min-height:55vh;align-content:center;justify-items:start;gap:12px}
.battle-share-page h2,.battle-share-page p{margin:0}
.battle-share-page p{max-width:46ch;color:var(--muted);line-height:1.8}
.bottom-nav[hidden]{display:none}
.top-actions[hidden]{display:none}
.combat-callout:not(.has-art).variant-0 strong{transform:rotate(-9deg) skewX(-11deg) scaleX(.88);letter-spacing:-.085em}
.combat-callout:not(.has-art).variant-1 strong{transform:rotate(5deg) skewY(-7deg) scale(1.06,.92);letter-spacing:-.025em}
.combat-callout:not(.has-art).variant-2 strong{transform:rotate(-2deg) skewX(8deg) scale(.94,1.1);letter-spacing:.015em}

.resource-value{color:#82d7eb;font-weight:800;text-shadow:0 0 10px #55bbd455}.log-line.resource-event{color:#a7dbe5}
