:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;color-scheme:dark;--bg:#080c17;--panel:#141b2b;--panel2:#1d2940;--ink:#eff2ff;--muted:#93a3c3;--gold:#f8cd8d;--violet:#b19cff;--line:#34415d;--green:#75e1b4;--red:#ff8190}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html{background:var(--bg);scroll-behavior:smooth}body{margin:0;color:var(--ink);background:radial-gradient(ellipse 65% 29% at 75% -2%,#382f60aa,transparent),radial-gradient(ellipse 48% 20% at 4% 20%,#113d5c66,transparent),var(--bg);min-height:100dvh;font-size:14px}button{font:inherit;cursor:pointer;color:inherit}button:disabled{opacity:.38;cursor:default;filter:grayscale(.35)}button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}#game{max-width:560px;margin:auto;padding-bottom:calc(93px + env(safe-area-inset-bottom));min-height:100dvh}#effects{position:fixed;z-index:100;inset:0;width:100vw;height:100dvh;pointer-events:none}#fx-layer{position:fixed;inset:0;z-index:101;pointer-events:none;overflow:hidden}.top{position:relative;z-index:5;display:flex;align-items:center;justify-content:space-between;padding:17px 17px 12px;background:linear-gradient(180deg,#090e1dd9,transparent)}.branding{display:flex;gap:10px;align-items:center}.brandmark{width:35px;height:35px;display:grid;place-items:center;flex-shrink:0;border:1px solid #af8d67;border-radius:12px;color:var(--gold);font-size:26px;background:linear-gradient(135deg,#57412644,#16162a);box-shadow:inset 0 0 15px #a68aff24}.brandname{font-size:17px;font-weight:950;letter-spacing:-.045em;line-height:1.1}.brandname em{color:var(--gold);font-style:normal}.brandtag{font-size:8px;letter-spacing:.24em;color:#aaa8bf;margin-top:4px;font-weight:700}.sound{background:#19253b;border:1px solid #3a435c;border-radius:20px;padding:8px 11px;color:#e0ddfa;font-size:11px}.wallet{display:flex;gap:7px;padding:0 15px 14px}.wallet>div{flex:1;min-width:0;background:#172238dc;border:1px solid #34425d;border-radius:12px;padding:9px 10px;color:#dae4ff;font-size:12px;font-weight:850;display:flex;align-items:center;gap:6px;font-variant-numeric:tabular-nums}.wallet small{font-size:10px;color:#b8a9c8;flex:1;text-align:right}.screen{padding:3px 15px 24px}.eyebrow{font-weight:800;letter-spacing:.23em;color:#c4a5e6;text-transform:uppercase;font-size:10px}.h2{font-size:21px;font-weight:900;margin:7px 0 12px;letter-spacing:.015em}.sectionline{display:flex;justify-content:space-between;align-items:center;margin:23px 0 10px;gap:8px}.sectionline h3{margin:0;font-size:16px}.muted{color:var(--muted)}.small{font-size:11px;line-height:1.65}.badge{display:inline-flex;align-items:center;border-radius:50px;background:#2e3750;border:1px solid #4f5c78;color:#dde5f8;font-size:10px;font-weight:850;padding:4px 9px;white-space:nowrap}.badge.gold{background:#513b2980;border-color:#a58552;color:#ffe0a7}.badge.purple{background:#382e60;border-color:#8c75c0;color:#dbc8ff}.panel{background:linear-gradient(155deg,#1d2941ed,#111928f2);border:1px solid #354361;border-radius:19px;padding:15px;box-shadow:0 12px 35px #0002}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:43px;border:none;border-radius:12px;padding:10px 13px;background:linear-gradient(120deg,#e9c996,#bf91ee);color:#251a2d;font-weight:900;box-shadow:0 5px 22px #977bd732}.btn.secondary{background:#253550;border:1px solid #456080;box-shadow:none;color:#e1eafc}.btn.outline{background:#111e32;border:1px solid #7f749c;color:#d8c6fd;box-shadow:none}.btn.danger{background:#56313b;border:1px solid #a65f67;box-shadow:none;color:#ffc0c9}.btn.wide{width:100%}.btn.tiny{font-size:11px;min-height:35px;padding:8px 10px}.btnrow{display:grid;grid-template-columns:1fr 1fr;gap:9px}.navbar{position:fixed;bottom:0;left:0;right:0;padding:9px max(8px,calc((100vw - 560px)/2 + 8px)) calc(7px + env(safe-area-inset-bottom));background:#0d1426f1;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-top:1px solid #3d455d;display:flex;justify-content:space-around;z-index:50}.nav{border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:5px;width:20%;max-width:110px;font-size:10px;color:#8190ae;font-weight:750;min-height:54px}.nav .navicon{font-size:23px;line-height:1}.nav.active{color:var(--gold)}.nav.active .navicon{filter:drop-shadow(0 0 8px #e9c18b88)}.hero{height:354px;background:radial-gradient(ellipse at 60% 70%,#6e56a144,transparent 45%),linear-gradient(143deg,#1f2947,#0e1425);border:1px solid #6f658d;border-radius:23px;position:relative;overflow:hidden;isolation:isolate;padding:20px 17px}.hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 65% 40%,#7a68ac44,transparent 54%),linear-gradient(0deg,#101324,transparent 60%);z-index:-1}.hero-character{position:absolute;bottom:-28px;right:-11%;width:94%;height:93%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 0 28px #c2a2ff55);animation:heroFloat 4s ease-in-out infinite alternate;mask-image:linear-gradient(to bottom,black 77%,transparent 100%)}.hero-title{position:relative;z-index:2;max-width:65%;padding-top:4px;text-shadow:0 2px 10px #0009}.hero-title h1{font-size:31px;line-height:1.19;margin:18px 0 11px;font-weight:950;letter-spacing:.04em}.hero-title h1 span{color:var(--gold)}.hero-title p{font-size:11px;line-height:1.8;color:#d3cce4;margin-bottom:13px}.hero-title .btn{font-size:12px}.hero-seal{position:absolute;bottom:15px;left:16px;font-size:9px;color:#c7b4deaa;letter-spacing:.2em}.two-stats{display:grid;grid-template-columns:1fr 1fr;gap:9px}.mini-stat{background:#131e31;border:1px solid #35435d;border-radius:14px;padding:13px}.mini-stat small{color:var(--muted);font-size:10px}.mini-stat strong{display:block;font-size:21px;margin-top:5px;color:#f7f0e0}.creature-strip{display:flex;gap:9px;overflow-x:auto;padding:2px 0 8px;scrollbar-width:none}.creature-strip::-webkit-scrollbar{display:none}.mini-creature{flex:0 0 106px;background:linear-gradient(160deg,#242c46,#151d30);border:1px solid #4b5274;border-radius:15px;padding:7px;text-align:center;min-height:134px}.mini-creature img{height:82px;width:100%;object-fit:contain}.mini-creature strong{display:block;font-size:11px}.mini-creature small{color:#a5adc9;font-size:9px}.story-callout{display:flex;gap:12px;align-items:flex-start;background:#161f32;border-left:3px solid #b59aca;border-radius:10px;padding:13px;color:#cad4e8;font-size:12px;line-height:1.7}.story-callout b{color:#efdaab}.art-stage{position:relative;background:radial-gradient(ellipse at 50% 70%,#694c8a44,transparent 60%),linear-gradient(150deg,#242e48,#0e1424);border-radius:17px;overflow:hidden;min-height:252px;display:grid;place-items:center;isolation:isolate}.art-stage:after{content:"◈";font-size:260px;color:#bca1ef0a;position:absolute;top:-45px;left:0}.art-stage img{width:98%;max-height:310px;object-fit:contain;position:relative;z-index:2;filter:drop-shadow(0 12px 20px #8871e944)}.art-stage .art-label{position:absolute;left:12px;top:12px;z-index:4}.art-stage .element{position:absolute;right:12px;top:12px;z-index:4}.monster-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.cardmonster{background:linear-gradient(160deg,#253149,#121b2c);border:1px solid #3d4d6b;border-radius:16px;overflow:hidden;text-align:left;padding:0}.cardmonster:active{transform:scale(.99)}.cardmonster .imageholder{height:160px;background:radial-gradient(ellipse at 50% 80%,var(--tint,#7256a2)44,transparent 62%),#101625;display:grid;place-items:center;position:relative;overflow:hidden}.cardmonster .imageholder img{width:100%;height:160px;object-fit:contain;filter:drop-shadow(0 0 14px #8f7fb877)}.cardmonster .info{padding:10px}.cardmonster .info strong{font-size:12px;display:block;margin:5px 0}.cardmonster .info small{color:#9cabc5;font-size:10px}.cardmonster .info .level{float:right}.portrait{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 22px #9d84f855)}.variant-orb{width:100%;height:100%;min-height:98px;display:flex;align-items:center;justify-content:center;position:relative;isolation:isolate}.variant-orb .orb{width:62%;aspect-ratio:1;border-radius:50%;border:2px solid currentColor;box-shadow:0 0 30px currentColor,inset 0 0 26px currentColor;display:grid;place-items:center;font-size:45px;transform:rotate(-11deg);background:radial-gradient(circle at 36% 32%,#ffffff55,transparent 22%),#070d20;filter:drop-shadow(0 0 12px currentColor);animation:orbFloat 2.6s ease-in-out infinite alternate}.variant-orb:before,.variant-orb:after{content:"";border:1px solid currentColor;position:absolute;width:75%;aspect-ratio:1;border-radius:50%;opacity:.4;transform:rotateX(66deg) rotate(-36deg)}.variant-orb:after{width:88%;opacity:.17;transform:rotateY(72deg) rotate(26deg)}.element-thunder{color:#d4afff}.element-fire{color:#ffaf70}.element-water{color:#81deef}.element-shadow{color:#ba8df0}.progress{height:8px;overflow:hidden;border-radius:99px;background:#354059}.progress span{display:block;height:100%;background:linear-gradient(90deg,#b397fb,#e4c48a);border-radius:99px;transition:width .4s ease}.progress.hp span{background:linear-gradient(90deg,#48aa85,#b2f1bd)}.progress.hp.low span{background:linear-gradient(90deg,#d74c68,#ffc077)}.progress.break span{background:linear-gradient(90deg,#9a6df3,#f0b7fa)}.progress.ult span{background:linear-gradient(90deg,#ac8bfd,#ffe8a4)}.statsrow{display:flex;justify-content:space-between;align-items:center;gap:9px}.statsrow strong{font-size:14px}.art-evolution{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.evo-thumb{background:#18243a;border:1px solid #3a4965;border-radius:12px;padding:4px;text-align:center;min-width:0}.evo-thumb img{width:100%;height:88px;object-fit:contain}.evo-thumb small{display:block;font-size:9px;color:#b0b9d0}.evo-thumb.locked{opacity:.4;filter:grayscale(1)}.evo-thumb.chosen{border-color:#d1a772}.battle-field{border:1px solid #65608a;border-radius:22px;position:relative;overflow:hidden;height:396px;background:radial-gradient(ellipse at 55% 55%,#4c43845a,transparent 50%),radial-gradient(ellipse at 80% 20%,#283c6d8a,transparent 60%),linear-gradient(150deg,#11182a,#19263d);isolation:isolate}.battle-field:before{content:"";position:absolute;bottom:0;left:-10%;width:120%;height:45%;border-top:1px solid #ab94e458;border-radius:50%;background:radial-gradient(ellipse at center,#6069a51a,transparent 70%);transform:perspective(400px) rotateX(53deg)}.battle-field:after{content:"◇";font-size:280px;color:#d4c7ff0a;position:absolute;top:20px;left:15%}.enemy-frame{position:absolute;right:10px;top:10px;z-index:3;text-align:right;min-width:150px}.friendly-frame{position:absolute;left:10px;bottom:15px;z-index:3;min-width:150px}.battle-name{font-weight:900;font-size:13px;margin-bottom:4px}.battle-meta{font-size:10px;color:#bfcbec}.battle-health{width:150px;margin:5px 0 4px auto}.friendly-frame .battle-health{margin:5px auto 4px 0}.enemy-art{position:absolute;right:-12px;top:75px;height:176px;width:63%;display:grid;place-items:center;z-index:2;filter:drop-shadow(0 12px 22px #0c0f258c);animation:orbFloat 3.5s ease-in-out infinite alternate}.enemy-art .variant-orb{height:176px}.friend-art{position:absolute;left:-20px;bottom:35px;width:60%;height:230px;z-index:4;display:grid;place-items:center;filter:drop-shadow(0 12px 20px #ab83ff33);animation:heroFloat 3.5s ease-in-out infinite alternate}.friend-art img{max-height:100%;width:100%;object-fit:contain}.battle-ground{position:absolute;bottom:15px;left:18%;right:18%;height:18px;border:1px solid #aa85ee33;border-radius:50%;filter:blur(4px);box-shadow:0 0 23px #ab91e677}.enemy-intent{position:absolute;right:8px;top:56px;z-index:7;background:#40273bd9;border:1px solid #ef838e99;border-radius:7px;padding:5px 9px;color:#ffced7;font-size:10px}.battle-intro{display:flex;justify-content:space-between;margin:7px 1px 10px;align-items:center}.battle-intro h2{font-size:17px;margin:5px 0 2px}.battle-sub{display:flex;justify-content:space-between;gap:10px;margin-top:10px;color:#abb9da;font-size:11px}.log{border:1px solid #344966;border-radius:12px;background:#111a2c;margin:10px 0;padding:10px 12px;min-height:56px;line-height:1.6;font-size:11px;color:#d2d9eb}.command-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.command{background:linear-gradient(140deg,#273755,#19243a);border:1px solid #50617d;border-radius:13px;text-align:left;padding:12px;min-height:69px;display:flex;flex-direction:column;justify-content:center;gap:4px}.command strong{font-size:13px}.command small{font-size:10px;color:#b6c6e2}.command.ultimate{border:1px solid #d6a773;background:linear-gradient(115deg,#65503c,#352b41);box-shadow:0 0 18px #d5a55c33}.command.ultimate strong{color:#ffe2a9}.battle-controls{margin:9px 0}.quest-grid{display:grid;gap:9px}.quest-card{display:flex;gap:12px;align-items:center;background:#192439;border:1px solid #43536d;border-radius:15px;padding:12px;text-align:left;width:100%}.quest-card.sel{border-color:#d5b07b;background:#242944}.quest-card.locked{opacity:.48}.quest-num{height:43px;width:43px;display:grid;place-items:center;font-size:19px;font-weight:900;color:#d8c2ff;border-radius:11px;background:#2d3650}.quest-card strong{font-size:13px}.quest-card small{display:block;font-size:10px;color:#a9b8d2;margin-top:4px}.quest-card .quest-status{margin-left:auto;font-size:18px}.summon-banner{position:relative;overflow:hidden;border:1px solid #a38a72;border-radius:22px;min-height:260px;background:radial-gradient(ellipse at 68% 57%,#604c8a88,transparent 42%),linear-gradient(130deg,#2a2b4d,#0e172a);padding:20px 15px}.summon-banner img{position:absolute;right:-9%;bottom:-19%;height:125%;width:80%;object-fit:contain;opacity:.93;filter:drop-shadow(0 0 24px #d2a6ff66)}.summon-banner h2{position:relative;z-index:3;font-weight:950;font-size:25px;line-height:1.35;margin:12px 0;max-width:60%;text-shadow:0 3px 10px #0009}.summon-banner p{position:relative;z-index:3;font-size:11px;color:#ded8eb;line-height:1.6;max-width:55%}.summon-result{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.draw-card{background:linear-gradient(135deg,#222944,#0d1524);border:1px solid #515677;border-radius:9px;padding:4px 2px;text-align:center;min-width:0;animation:popIn .5s ease backwards;animation-delay:calc(var(--i)*65ms)}.draw-card .variant-orb{height:59px;min-height:0}.draw-card .variant-orb .orb{font-size:18px;width:75%}.draw-card small{font-size:9px;color:#d7dbeb;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draw-card b{font-size:9px;color:#ffcf85}.draw-card.rare{border-color:#d9ae74;box-shadow:0 0 15px #f8bc5555}.dexrow{display:flex;gap:9px;align-items:center;background:#182237;border:1px solid #354462;border-radius:12px;padding:9px;margin:7px 0}.dexrow .dex-art{height:72px;width:75px;flex:0 0 75px}.dexrow strong{display:block}.dexrow small{color:#91a2c0;font-size:10px}.veil{position:fixed;inset:0;z-index:80;background:#04060dd9;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);display:flex;align-items:flex-end;justify-content:center;padding:15px 12px calc(15px + env(safe-area-inset-bottom));overflow:auto}.modal{max-width:540px;width:100%;max-height:87dvh;overflow-y:auto;border-radius:23px;background:linear-gradient(160deg,#26314a,#0f1726);border:1px solid #8c7cac;box-shadow:0 0 50px #08020d;padding:17px}.modal h2{margin:8px 0;font-size:21px}.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(90px + env(safe-area-inset-bottom));max-width:85%;background:#f1d5a5;color:#302539;padding:10px 16px;border-radius:12px;font-weight:850;font-size:12px;box-shadow:0 4px 20px #0008;z-index:130;text-align:center}.center{text-align:center}.mt8{margin-top:8px}.mt12{margin-top:12px}.mt18{margin-top:18px}.mb12{margin-bottom:12px}.divider{border:0;border-top:1px solid #45506a;margin:14px 0}.intro{min-height:84dvh;display:flex;flex-direction:column;justify-content:center;padding:20px 15px}.intro .hero{height:440px}.intro .hero img{width:115%;right:-24%;height:92%}.intro .hero-title{max-width:76%;padding-top:35px}.intro .hero-title h1{font-size:38px}.intro-bottom{margin:16px 5px;color:#a9adbf;font-size:11px;line-height:1.7}.flash-white{position:fixed;inset:0;background:#fff;animation:flash .42s ease-out forwards;z-index:5}.cinematic{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(ellipse at 55% 70%,#453569,#060813 72%);overflow:hidden;animation:cinemaIn 2.1s ease both}.cinematic:before{content:"";position:absolute;inset:20% -30%;border:3px solid #ecdaae88;transform:rotate(-17deg);box-shadow:0 0 60px #ab91ff66;animation:spinPulse 1.3s ease-out both}.cinematic img{height:72%;max-width:94%;object-fit:contain;z-index:2;filter:drop-shadow(0 0 37px #e7baff);animation:cinemaChar 2.1s ease both}.cinematic h2{position:absolute;bottom:21%;z-index:5;font-size:27px;color:#ffe2aa;text-shadow:0 0 15px #eab3c7,0 3px 3px #000}.cinematic .cutline{position:absolute;top:16%;font-size:10px;letter-spacing:.25em;color:#d3c4ef;z-index:5}.cinematic .cut-sub{position:absolute;bottom:16%;z-index:5;font-size:11px;color:#d5d0df}.cut-damage{position:fixed;left:50%;top:46%;transform:translate(-50%,-50%);font-size:52px;font-weight:1000;color:#ffe39f;z-index:108;text-shadow:0 0 25px #ffb461,0 4px 4px black;animation:damageBurst 1.1s ease forwards}.evolve-preview{background:#101828;border:1px solid #3d4b70;border-radius:15px;margin:12px 0;overflow:hidden}.evolve-preview img{max-height:230px;width:100%;object-fit:contain}.footer-note{font-size:10px;color:#7d8ba9;text-align:center;margin:20px 0}.spaced{display:flex;justify-content:space-between;align-items:center;gap:7px}.lock{filter:grayscale(.9) brightness(.42)}.reduced-motion .hero-character,.reduced-motion .friend-art,.reduced-motion .enemy-art,.reduced-motion .orb{animation:none}@keyframes heroFloat{from{transform:translateY(2px)}to{transform:translateY(-8px)}}@keyframes orbFloat{from{transform:translateY(-5px)}to{transform:translateY(7px)}}@keyframes popIn{from{opacity:0;transform:scale(.5) translateY(25px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes flash{from{opacity:.85}to{opacity:0}}@keyframes cinemaIn{0%{opacity:0}13%{opacity:1}83%{opacity:1}100%{opacity:0}}@keyframes cinemaChar{0%{transform:translateX(-70%) scale(.65);opacity:0}30%{transform:translateX(0) scale(1.04);opacity:1}65%{transform:scale(1.09)}100%{transform:translateX(8%) scale(1.18);opacity:1}}@keyframes spinPulse{0%{opacity:0;transform:rotate(0deg) scale(.1)}35%{opacity:.8}80%{opacity:.9;transform:rotate(90deg) scale(1.1)}100%{opacity:0}}@keyframes damageBurst{0%{opacity:0;transform:translate(-50%,-20%) scale(.4)}22%{opacity:1;transform:translate(-50%,-50%) scale(1.35)}85%{opacity:1}100%{opacity:0;transform:translate(-50%,-140%) scale(1.1)}}@media(max-width:340px){.hero-title h1{font-size:25px}.hero{height:330px}.hero-character{width:94%}.cardmonster .imageholder{height:142px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Character art: dissolve source concept-sheet borders into the game environment. */
.hero-character,.art-stage>img,.friend-art img,.mini-creature img,.cardmonster .imageholder img,.evo-thumb img,.evolve-preview img{mix-blend-mode:normal}
.friendly-frame{z-index:8;text-shadow:0 2px 4px #050913}
.friend-art{bottom:70px;height:218px}
.hero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#11172aee 0%,#11172aba 38%,#11172a22 68%,transparent 88%);pointer-events:none;z-index:1}
.hero-title{z-index:3}.hero-seal{z-index:4}
/* V3 combat: deliberately choreographed charge / rush / impact / resolve animations */
.fight-rush{animation:fightRush .6s cubic-bezier(.2,.9,.15,1) both!important}
.fight-hit{animation:fightHit .55s ease-out both!important}
.fight-shake{animation:fightShake .29s cubic-bezier(.15,.7,.2,1) both}
.fight-shake:before{box-shadow:inset 0 0 105px var(--attack-color)!important}
@keyframes fightRush{0%{transform:translate(0,0) scale(1)}28%{transform:translate(-14px,15px) scale(.91) rotate(-4deg)}64%{transform:translate(64px,-28px) scale(1.24) rotate(-9deg)}100%{transform:translate(0,0) scale(1)}}
@keyframes fightHit{0%,100%{transform:translate(0,0)}18%{transform:translate(16px,-6px) rotate(3deg);filter:brightness(2)}50%{transform:translate(-10px,4px) rotate(-4deg);filter:brightness(1.3)}}
@keyframes fightShake{0%,100%{transform:translate(0,0)}13%{transform:translate(7px,-5px)}32%{transform:translate(-8px,7px)}57%{transform:translate(6px,4px)}80%{transform:translate(-3px,-3px)}}
.ultimate-scene{position:absolute;inset:0;overflow:hidden;isolation:isolate;background:radial-gradient(circle at 52% 52%,color-mix(in srgb,var(--ult) 30%,transparent) 0%,#100d23 53%,#050716 100%);display:flex;align-items:center;justify-content:center;animation:ultEntrance .32s ease-out both}
.ultimate-scene:before{content:'';position:absolute;inset:-40%;background:repeating-conic-gradient(from 0deg at 50% 50%,transparent 0deg 10deg,var(--ult) 10.5deg 11deg,transparent 11.5deg 22deg);opacity:.11;animation:ultSpin 14s linear infinite}
.ultimate-scene:after{content:'';position:absolute;inset:0;box-shadow:inset 0 0 110px #000,inset 0 0 24px var(--ult);pointer-events:none;z-index:30}
.ultimate-stars{position:absolute;inset:0;background-image:radial-gradient(circle,#fff 1px,transparent 2px),radial-gradient(circle,var(--ult) 2px,transparent 4px);background-size:47px 79px,131px 179px;opacity:.30;animation:starsMove 2.8s ease-in both}
.ultimate-noise{position:absolute;inset:0;background:repeating-linear-gradient(0deg,transparent 0 6px,#fff1 7px 8px);opacity:.2;mix-blend-mode:screen}
.ultimate-label{position:absolute;top:calc(9% + env(safe-area-inset-top));z-index:17;font-size:11px;letter-spacing:.25em;font-weight:900;color:var(--ult-glow);text-shadow:0 0 20px var(--ult);border-block:1px solid var(--ult);padding:9px 16px;animation:ultText .5s ease-out both}
.ultimate-title{position:absolute;bottom:16%;left:4%;right:4%;z-index:26;text-align:center;font-weight:1000;letter-spacing:-.06em;font-size:clamp(19px,6.3vw,31px);line-height:1.35;color:#fff5dc;text-shadow:0 3px 5px #000,0 0 19px var(--ult),0 0 32px var(--ult);animation:ultTitle 1.05s cubic-bezier(.2,.6,.2,1) both}
.ultimate-subtitle{position:absolute;bottom:11%;z-index:26;color:#f4dcb1;font-size:10px;letter-spacing:.24em}
.ultimate-ring{border:2px solid var(--ult);position:absolute;top:50%;left:50%;width:min(70vw,360px);height:min(70vw,360px);border-radius:50%;box-shadow:0 0 21px var(--ult),inset 0 0 12px var(--ult);opacity:.65;animation:ultSpin 2.8s linear infinite}
.ultimate-ring.ring-one{transform:translate(-50%,-50%)}.ultimate-ring.ring-two{width:min(57vw,300px);height:min(57vw,300px);border-style:dotted;animation-direction:reverse;animation-duration:2.1s}.ultimate-ring.ring-three{width:min(88vw,450px);height:min(88vw,450px);border:1px dashed var(--ult-glow);animation-duration:5s}
.ultimate-character{position:absolute;left:5%;right:5%;top:19%;height:55%;display:flex;align-items:center;justify-content:center;filter:drop-shadow(0 0 23px var(--ult));z-index:15;animation:ultReveal 1.45s cubic-bezier(.2,.7,.1,1) both}
.ultimate-creature{width:100%;height:100%;object-fit:contain;max-height:490px;filter:drop-shadow(0 0 22px var(--ult))}
.ultimate-orb{font-size:140px;line-height:1;display:grid;place-items:center;filter:drop-shadow(0 0 30px var(--ult))}.ultimate-orb .orb{font-size:140px}
.ultimate-projectile{position:absolute;inset:6% -20%;opacity:0;z-index:20;pointer-events:none;overflow:hidden}
.ultimate-projectile svg{position:absolute;width:100%;height:100%;filter:drop-shadow(0 0 11px var(--ult));transform:translateY(-8%);stroke:var(--ult-glow);stroke-linecap:round;stroke-linejoin:round;stroke-width:6;fill:none}
.ultimate-projectile .arc{stroke-dasharray:38 23;opacity:.8;animation:ultArc .25s linear infinite}
.ultimate-projectile .arc-b{stroke-width:4;animation-delay:-.17s}.ultimate-projectile .arc-c{stroke-width:9;opacity:.45;animation-delay:-.1s}
.ultimate-scene.firing .ultimate-projectile{opacity:1;animation:ultProjectile .8s cubic-bezier(.2,.2,.15,1) both}
.ultimate-scene.firing .ultimate-character{animation:ultLaunch .73s cubic-bezier(.25,.85,.2,1) both}
.ultimate-scene.firing .ultimate-ring{animation-duration:.35s;opacity:.95}
.ultimate-impact{position:absolute;inset:0;z-index:25;opacity:0;display:grid;place-items:center;pointer-events:none}
.impact-sun{position:absolute;width:30vw;height:30vw;max-width:200px;max-height:200px;border-radius:50%;background:#fff;box-shadow:0 0 30px 25px var(--ult-glow),0 0 100px 70px var(--ult);transform:scale(.05)}
.impact-word{font-size:clamp(20px,7vw,36px);font-weight:1000;white-space:nowrap;color:#fff;text-shadow:0 2px 10px #000,0 0 25px var(--ult);letter-spacing:.02em;transform:rotate(-7deg)}
.ultimate-scene.impact .ultimate-impact{animation:impactFlash 1s ease-out both}
.ultimate-scene.impact .impact-sun{animation:impactSun .85s cubic-bezier(.05,.8,.3,1) both}
.ultimate-scene.impact{animation:ultShock .43s ease-out both}
.ultimate-scene.settle{animation:ultFade .5s ease-in both}
.slash{position:absolute;top:45%;left:-70%;width:240%;height:22px;background:linear-gradient(0deg,transparent,var(--ult-glow),#fff,var(--ult),transparent);box-shadow:0 0 35px 12px var(--ult);opacity:0;transform:rotate(-24deg)}
.ult-shadow.firing .slash{animation:ultSlash .23s ease-out both}.ult-shadow.firing .slash-two{transform:rotate(20deg);animation-delay:.18s}.ult-shadow.firing .slash-three{transform:rotate(-68deg);animation-delay:.36s}
.flame-core{display:none;position:absolute;left:35%;top:32%;width:35%;height:34%;border-radius:40% 50% 50% 40%;background:radial-gradient(circle,#fff6b0,#ffe36a 20%,#ff5d24 42%,#ac142b 72%,transparent 73%);box-shadow:0 0 64px 45px #f53e28bb;filter:blur(4px)}
.ult-fire.firing .flame-core{display:block;animation:ultFireball .8s ease-in both}.ult-fire .arc{stroke:#ff9a2d}
.water-ripple{display:none;position:absolute;left:36%;top:35%;width:25vw;height:25vw;border:12px solid #9deeff;border-radius:50%;box-shadow:0 0 24px #45bdfd,inset 0 0 35px #9deeff;transform:rotateX(35deg)}
.ult-water.firing .water-ripple{display:block;animation:ultRipple .6s ease-out both}.ult-water.firing .ripple-b{animation-delay:.2s}.ult-water.firing .ripple-c{animation-delay:.4s}.ult-water .arc{stroke:#b3ffff}
.black-moon{display:none;position:absolute;width:55vw;height:55vw;top:20%;left:35%;border-radius:50%;background:#03000c;border:10px solid #cf83ff;box-shadow:0 0 70px #8b36c3,0 0 95px #c763d3,inset 0 0 40px #b666d5}
.ult-shadow.firing .black-moon{display:block;animation:ultMoon .8s ease both}
@keyframes ultEntrance{from{opacity:0}to{opacity:1}}
@keyframes ultReveal{0%{transform:translate(-70%,12%) scale(.6) skew(-15deg);opacity:0}40%{transform:translate(0,0) scale(1.07);opacity:1}70%{transform:translate(-1%,0) scale(1)}100%{transform:scale(1.05);opacity:1}}
@keyframes ultText{from{opacity:0;transform:translateY(-35px)}to{opacity:1;transform:translateY(0)}}
@keyframes ultTitle{0%{opacity:0;transform:translateX(-80px) scale(.8)}35%{opacity:0}65%{opacity:1;transform:translateX(10px) scale(1.04)}100%{opacity:1;transform:translateX(0) scale(1)}}
@keyframes ultSpin{from{rotate:0deg}to{rotate:360deg}}
@keyframes ultArc{to{stroke-dashoffset:-122}}
@keyframes ultLaunch{0%{transform:translateX(0) scale(1)}26%{transform:translateX(-13%) scale(.9)}85%{transform:translateX(68%) scale(1.45);opacity:1}100%{transform:translateX(90%) scale(1.9);opacity:0}}
@keyframes ultProjectile{0%{transform:translateX(-32%) scale(.6);filter:blur(4px)}30%{transform:translateX(0) scale(1);filter:blur(0)}100%{transform:translateX(35%) scale(1.4);opacity:.35}}
@keyframes impactFlash{0%{opacity:0}10%{opacity:1}35%{opacity:1}100%{opacity:0}}
@keyframes impactSun{0%{transform:scale(.06)}45%{transform:scale(3.7)}100%{transform:scale(7);opacity:0}}
@keyframes ultShock{0%,100%{translate:0 0}15%{translate:7px -6px}35%{translate:-9px 7px}60%{translate:5px -5px}80%{translate:-3px 2px}}
@keyframes ultFade{to{opacity:0;transform:scale(1.06)}}
@keyframes ultSlash{0%{opacity:0;translate:-30% 20%}40%{opacity:1}100%{opacity:0;translate:35% -20%}}
@keyframes ultFireball{0%{transform:translateX(-120%) scale(.3)}55%{transform:translateX(10%) scale(1.5)}100%{transform:translateX(95%) scale(3);opacity:0}}
@keyframes ultRipple{0%{opacity:0;transform:scale(.2) rotateX(35deg)}40%{opacity:1}100%{opacity:0;transform:scale(4) rotateX(35deg)}}
@keyframes ultMoon{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1)}100%{opacity:.3;transform:scale(1.6)}}
@keyframes starsMove{0%{transform:scale(1)}100%{transform:scale(1.6) rotate(3deg)}}
@media(prefers-reduced-motion:reduce){.ultimate-scene*,.fight-rush,.fight-hit,.fight-shake{animation-duration:.001ms!important}}
/* Four immediately playable combat showcase previews and collectible monster portraits */
.preview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:10px}
.preview-skill{border-radius:12px;border:1px solid #5d6a85;padding:9px 1px;background:linear-gradient(155deg,#25324b,#111729);color:#efe8ff;display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0}
.preview-skill span{font-size:21px}.preview-skill strong{font-size:12px}.preview-skill small{font-size:9px;color:#acbad9}
.preview-skill.element-thunder{border-color:#907acc}.preview-skill.element-fire{border-color:#c06f47}.preview-skill.element-water{border-color:#3b95bd}.preview-skill.element-shadow{border-color:#855caa}
.preview-skill:active{transform:scale(.95);background:#3a345e}
.other-portrait{object-fit:contain;filter:drop-shadow(0 8px 16px #0006);max-width:100%}

/* V4 — thumb-friendly three-slot party editor and monster discovery */
.team-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0}.team-slot{min-width:0;min-height:147px;border:2px solid #415477;background:linear-gradient(165deg,#29354f,#121827);border-radius:14px;color:#fff;display:flex;align-items:center;flex-direction:column;gap:6px;padding:8px 5px}.team-slot.on{border-color:#fbd19a;box-shadow:0 0 0 2px #c58b4755,0 0 22px #ac70ff44}.team-slot img{width:100%;height:76px;object-fit:cover;object-position:center;border-radius:8px}.team-slot small{font-size:10px;color:#e5c98b}.team-slot strong{font-size:11px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty-slot{display:grid;place-items:center;height:76px;color:#f0d7ff;font-size:30px}.roster-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.roster-entry{display:flex;align-items:center;text-align:left;gap:8px;padding:7px;min-width:0;border-radius:12px;border:1px solid #41516b;background:#182238;color:#f9f4ff}.roster-entry.equipped{border-color:#ac88ef}.roster-entry.focused{background:#302744}.roster-img{width:65px;height:70px;flex:none;border-radius:8px;overflow:hidden}.roster-img img{height:100%;width:100%;object-fit:cover}.roster-entry strong{font-size:11px;line-height:1.4;display:block}.roster-entry small{font-size:9px;color:#b5c9df;display:block;margin-top:4px}.concept-sheet{width:100%;height:auto;border-radius:9px;border:1px solid #697394}.preview-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.bgm-notice{color:#ffd68e;text-align:center;font-size:12px;min-height:2px;padding:0 8px}.cardmonster .imageholder img{object-fit:cover!important}.evo-thumb img{object-fit:cover!important}audio{filter:invert(.88) hue-rotate(190deg)}

/* V5: the portrait itself, not arbitrary slices of the three-evolution poster */
.team-slot img,.roster-img img,.cardmonster .imageholder img,.evo-thumb img {object-fit:contain!important;object-position:50% 50%!important}
.roster-img img {background:#111927;border-radius:8px}
.team-slot img{height:88px!important;background:radial-gradient(circle,#27334b,#101727)}
.cardmonster .imageholder img{width:97%!important;height:97%!important}
.art-stage{min-height:315px}.art-stage img{max-height:355px;width:min(100%,330px)}
.mini-creature img{object-fit:contain!important}
#game{padding-bottom:calc(163px + env(safe-area-inset-bottom))}
#bgm-dock{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(78px + env(safe-area-inset-bottom));z-index:35;width:min(96vw,540px);display:flex;align-items:center;gap:6px;background:#111b2ef6;border:1px solid #65728e;border-radius:15px;padding:4px 7px;box-shadow:0 7px 25px #050a16bb}
#bgm-status{color:#dcc5ff;font-weight:750;font-size:10px;line-height:1.2;min-width:72px;max-width:88px}
#bgm-player{width:100%;height:34px;flex:1;min-width:0;display:block;filter:none}
@media(max-width:390px){#bgm-status{max-width:65px;min-width:56px;font-size:9px}}

/* V6 integrated score; no floating player covers the party or controls */
#bgm-player{display:none!important}
#bgm-dock{display:none!important}
#game{padding-bottom:calc(95px + env(safe-area-inset-bottom))}
.sound{max-width:135px;min-width:112px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:9px 7px;font-size:11px}
.bgm-notice{font-size:11px;max-width:560px;margin:0 auto;line-height:1.5}
.filter-bar{display:flex;gap:7px;margin:8px 0 13px;overflow:auto}
.filter-pill{flex:1;background:#172136;border:1px solid #41506d;padding:9px 8px;border-radius:30px;font-size:12px;font-weight:800;min-width:55px}
.filter-pill.active{color:#241d2b;background:linear-gradient(120deg,#efd2a0,#bda0f2);border-color:#e3c68b}
.advantage-banner{background:#1c2d44;border:1px solid #38587c;border-radius:9px;padding:9px 12px;font-size:11px;text-align:center;color:#c7e5ff;margin:8px 0}
/* Preserve proportions and center the already cropped creature artwork */
.art-stage img,.friend-art img,.enemy-art img,.hero-character,.cardmonster img,.roster-entry img,.team-slot img,.evo-thumb img,.mini-creature img,.ultimate-creature{object-position:center center!important;object-fit:contain!important}
.art-stage{overflow:hidden}

/* V7: enemy encounter and tactical UI */
.top{gap:6px}.branding{min-width:0}.brandname{white-space:nowrap;font-size:17px}.brandtag{letter-spacing:1.15px;font-size:8px}.sound,.sfx-toggle{flex:none;border:1px solid #53607b;background:#1b2542;color:#dfeafe;border-radius:24px;padding:8px 10px;font-size:11px;cursor:pointer}.sfx-toggle{padding:8px 7px}
.encounter-preview{display:flex;gap:8px;overflow-x:auto;margin:15px 0 12px;padding-bottom:4px}.encounter-preview>div{min-width:28%;max-width:34%;flex:1;background:#111c32;border:1px solid #3d4966;border-radius:12px;padding:5px;text-align:center}.encounter-preview img{width:100%;aspect-ratio:1;object-fit:contain;border-radius:8px}.encounter-preview small{display:block;color:#d5deef;font-size:10px;min-height:27px;line-height:1.35;margin-top:3px}
.v7-field{display:block;min-height:370px;padding:8px 7px 10px;border-radius:18px;overflow:hidden;background:radial-gradient(ellipse at 52% 25%,#24203c 0%,#0e152b 57%,#0b1325 100%)}
.v7-enemies{display:flex;justify-content:center;align-items:flex-start;gap:6px;position:relative;z-index:2;min-height:207px}.enemy-unit{color:#eef5ff;background:linear-gradient(180deg,#202642ee,#0d1528fa);border:2px solid #455377;min-width:0;flex:1;max-width:170px;border-radius:14px;padding:5px 4px;box-shadow:0 12px 22px #0006;position:relative;transition:transform .2s,border .2s;display:flex;align-items:center;flex-direction:column;gap:3px;cursor:pointer}.enemy-unit.targeted{border-color:#ffd28c;box-shadow:0 0 0 2px #fbc98533,0 0 21px #c99a4e55;transform:translateY(-4px)}.enemy-unit.targeted:before{content:'⌖ 標的';position:absolute;top:-14px;left:50%;transform:translateX(-50%);font-size:9px;white-space:nowrap;color:#ffe6ac;background:#43301d;padding:2px 7px;border-radius:10px}.enemy-unit.fallen{filter:grayscale(1);opacity:.23;pointer-events:none;transform:scale(.86)}.enemy-portrait{width:100%;max-width:130px;aspect-ratio:1;object-fit:cover;border-radius:10px}.enemy-unit-label{font-size:10px;font-weight:800;text-align:center;min-height:28px;line-height:1.3;display:grid;place-items:center}.enemy-unit .progress{width:100%;height:5px;margin:0}.enemy-unit small{font-size:9px;color:#bdc8dc}.enemy-unit .effect-row{min-height:20px}.enemy-alert{font-size:9px;color:#ffb7a1;background:#6a2420;line-height:1.3;border-radius:8px;padding:2px 3px;width:100%;text-align:center;font-weight:700;animation:alertPulse .8s infinite alternate}@keyframes alertPulse{to{filter:brightness(1.55)}}
.v7-battle-divider{text-align:center;color:#a8add4;font-size:10px;letter-spacing:1px;margin:6px 0 2px;border-top:1px solid #48537744;padding-top:5px}.v7-ally{position:relative;z-index:2;display:flex;gap:10px;align-items:center;padding:2px 10px 0}.v7-ally .friend-art{position:static;inset:auto;transform:none!important;width:40%;height:122px;max-width:155px;display:flex;align-items:center;justify-content:center}.v7-ally .friend-art img{display:block;max-width:100%;max-height:120px;object-fit:contain;border-radius:9px;box-shadow:0 0 14px #5c54bd33}.ally-stats{flex:1;display:flex;flex-direction:column;gap:7px;color:#f7faff}.ally-stats strong{font-size:16px}.ally-stats small{font-size:11px;color:#dce4f1}.ally-stats .progress{height:9px}.effect-row{display:flex;flex-wrap:wrap;gap:3px;justify-content:center}.effect-pill{display:inline-block;border:1px solid #817eae;background:#3e304c99;border-radius:9px;font-size:9px;line-height:1.3;color:#f9e5ff;padding:2px 4px;white-space:nowrap}.battle-page .battle-intro{margin-bottom:8px}.battle-page .advantage-banner{margin-top:8px;margin-bottom:10px;line-height:1.5}.battle-page .command-grid .command{min-height:64px}.battle-page .log{min-height:61px}.battle-page .creature-strip{margin-bottom:18px}
.enemy-codex{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.enemy-codex-entry{display:flex;align-items:center;flex-direction:column;gap:5px;background:#151f34;border:1px solid #3c4d65;color:#fff;padding:9px 5px;border-radius:12px;cursor:pointer}.enemy-codex-entry img{width:100%;max-height:120px;object-fit:contain;border-radius:8px}.enemy-codex-entry strong{font-size:12px}.enemy-codex-entry small{font-size:10px;color:#bccce4}
@media(max-width:390px){.top{padding-left:10px;padding-right:8px}.brandmark{display:none}.brandname{font-size:15px}.brandtag{font-size:7px}.sound,.sfx-toggle{font-size:10px;padding:7px}.v7-field{min-height:350px}.enemy-portrait{max-width:115px}.enemy-unit-label{font-size:9px}.enemy-unit{padding:4px 3px}}

.v7-field{height:auto;min-height:402px;padding-top:23px}.enemy-unit.fight-hit{animation:v7Hit .36s ease both}.v7-field.hurt-effect{animation:v7Hurt .55s ease-out}.v7-field.hurt-effect .friend-art{filter:drop-shadow(0 0 18px #ff5e80)}@keyframes v7Hit{0%{filter:brightness(1);transform:scale(1)}35%{filter:brightness(2.7);transform:translate(9px,-4px) scale(1.04)}70%{filter:brightness(.85);transform:translate(-5px,3px)}100%{filter:brightness(1);transform:scale(1)}}@keyframes v7Hurt{0%,100%{box-shadow:inset 0 0 0 transparent}35%{box-shadow:inset 0 0 40px #e75b7c7f}}

.enemy-unit.enemy-attacking{animation:enemyLunge .56s ease both}.enemy-unit.enemy-attacking .enemy-portrait{filter:brightness(1.28) drop-shadow(0 0 14px #f48aff77)}@keyframes enemyLunge{0%{transform:translateY(0)}24%{transform:translateY(-9px) scale(1.04)}45%{transform:translateY(13px) scale(1.1)}75%{transform:translateY(-3px)}100%{transform:translateY(0)}}

.exchange-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}.exchange-list .btn{font-size:11px;padding:9px 3px;min-width:0;white-space:nowrap}.exchange-list button:disabled{opacity:.4}

/* SAKATA MONSTERS V8 — mobile-first battlefield and RPG systems */
.v8-panel{border:1px solid #4b5b7e;border-radius:15px;padding:13px;margin:13px 0;background:linear-gradient(145deg,#1c2a44,#111827);box-shadow:0 7px 23px #0307183d}
.v8-panel>b{color:#eac998;font-size:14px}.v8-panel p{line-height:1.5;margin:6px 0 10px}
.v8-tower{border-color:#9275b0;background:radial-gradient(ellipse at 90% 10%,#6e368450,transparent),linear-gradient(145deg,#212340,#10182e)}
.v8-choice{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}
.v8-card{display:flex;flex-direction:column;align-items:start;text-align:left;padding:12px 9px;gap:6px;color:#f4e5ff;border-radius:12px;background:linear-gradient(155deg,#302f58,#121b34);border:1px solid #8567ae}
.v8-card:nth-child(2){border-color:#a35bb9;background:linear-gradient(150deg,#3e244a,#1a1838)}
.v8-card strong{font-size:14px}.v8-card small{color:#ead5fd;font-size:12px}.v8-card span{font-size:10px;color:#c8bfd6;line-height:1.5}
.v8-card:disabled{opacity:.45}
.v8-gear{border-top:1px solid #42506a;padding:10px 0 3px;display:flex;flex-direction:column;gap:9px}.v8-gear>b{color:#eedab9;font-size:12px}
.v8-gearopts{display:flex;gap:6px;flex-wrap:wrap}
.v8-gearopts button{border:1px solid #526381;border-radius:10px;background:#17243b;color:#ebf0ff;font-size:11px;padding:8px 9px;flex:1;min-width:72px}
.v8-gearopts button.active{border-color:#f6c277;background:#40344b;color:#ffe8b2}
.v8-gearopts button:disabled{opacity:.38}
.v8-statline{display:flex;justify-content:space-between;gap:3px;flex-wrap:wrap;color:#cce2ff;font-weight:750;font-size:12px;background:#121d30;padding:9px 7px;border-radius:8px;margin:8px 0}
.v8-detail-art{display:flex;align-items:center;justify-content:center;margin:10px auto;padding:8px;border-radius:16px;background:radial-gradient(ellipse at center,#48578d77,#12192c 73%);height:225px;overflow:hidden}
.v8-detail-art img{width:100%;height:100%;object-fit:contain}
.branch-abyss{filter:hue-rotate(110deg) saturate(1.4) contrast(1.07) drop-shadow(0 0 14px #b15bdf)}
/* True single-viewport tactical field; no need to scroll to see commands */
body.is-fighting #game{padding-bottom:calc(62px + env(safe-area-inset-bottom))}
body.is-fighting .wallet{display:none}
body.is-fighting .top{padding:5px 12px 5px;min-height:38px}
body.is-fighting .brandmark{font-size:17px}
body.is-fighting .brandtag{font-size:8px}
body.is-fighting .brandname{font-size:16px}
body.is-fighting .sound,body.is-fighting .sfx-toggle{font-size:9px;padding:6px 7px;min-width:0}
body.is-fighting .bgm-notice:empty{display:none}
body.is-fighting .navbar{padding-top:5px;padding-bottom:calc(4px + env(safe-area-inset-bottom))}
body.is-fighting .nav{font-size:10px;gap:1px}
body.is-fighting .navicon{font-size:21px}
.v8-battle-page{padding:2px 10px 6px;display:flex;flex-direction:column;gap:5px;min-height:0}
.v8-battle-head{display:flex;align-items:center;justify-content:space-between;gap:8px;height:35px}
.v8-battle-head>span{display:flex;flex-direction:column;gap:2px;min-width:0}.v8-battle-head b{font-size:13px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.v8-battle-head small{font-size:9px;color:#b7c4d9}
.v8-battle-area{border:1px solid #5c5a92;border-radius:15px;background:radial-gradient(ellipse at 40% 0%,#4b457b50,transparent 58%),linear-gradient(#161e39,#0c1528);padding:8px;display:flex;flex-direction:column;gap:6px;box-shadow:inset 0 1px #b8a3d11c}
.v8-enemy-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;min-height:0}
.v8-enemy{background:#161e34;border:1px solid #53607f;color:#ecf1ff;padding:5px 3px;border-radius:12px;min-width:0;display:flex;flex-direction:column;align-items:stretch;text-align:center;gap:3px;min-height:0;position:relative}
.v8-enemy.targeted{border:2px solid #f7c77e;padding:4px 2px;box-shadow:0 0 0 2px #a17a4c55,0 0 18px #e5ac6a25}
.v8-foe-art{height:69px;overflow:hidden;border-radius:8px;background:radial-gradient(ellipse at center,#48407488,transparent 75%)}
.v8-foe-art img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 5px #070a15bb)}
.v8-enemy strong{font-size:10px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:13px}
.v8-enemy small{font-size:8px;color:#b9c4dc}.v8-enemy .progress{height:5px}
.v8-enemy em{background:#a52f43;color:#fff;font-size:8px;border-radius:4px;font-style:normal;animation:alertPulse .8s infinite alternate}
.v8-enemy .effect-pill{font-size:8px;line-height:1.1;padding:2px}
.v8-enemy.fallen{opacity:.23;filter:grayscale(1)}
.v8-enemy-intent{display:flex;gap:9px;align-items:center;justify-content:space-between;background:#1d2846;border:1px solid #3c517a;border-radius:7px;padding:5px 7px;font-size:9px;color:#cedaf1;line-height:1.3}
.v8-enemy-intent span:first-child{color:#ffdf99;font-weight:700;max-width:44%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v8-enemy-intent span:last-child{text-align:right}
.v8-parts{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:9px;color:#ebd4ad}
.v8-parts button{color:#e6d7d0;border:1px solid #655976;border-radius:7px;padding:4px 7px;background:#29223a;font-size:9px}
.v8-parts button.active{border-color:#edb878;background:#453049;color:#ffe0aa}
.v8-parts button.broken{opacity:.4}
.v8-team-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;border-top:1px solid #4b5274;padding-top:6px}
.v8-ally{min-width:0;display:flex;flex-direction:column;gap:4px;align-items:center;border:1px solid #4b5677;background:#111c30;color:#fff;border-radius:9px;padding:4px}
.v8-ally.active{border-color:#cdb8f5;background:#2a2c51}
.v8-ally img{width:100%;height:42px;object-fit:contain}
.v8-ally>span{min-width:0;width:100%;text-align:center}.v8-ally strong{font-size:9px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block}
.v8-ally .progress{margin:3px 0;height:4px}.v8-ally small{font-size:8px;color:#bbcbdc}
.v8-ally.fallen{filter:grayscale(1);opacity:.3}
.v8-battle-info{display:flex;justify-content:space-between;font-size:10px;color:#e0d4ff;gap:5px}
.v8-ult-bar{height:5px;margin:0}
.v8-battle-message{border:1px solid #4e5678;background:#1b2741;color:#e3ecff;border-radius:8px;font-size:10px;line-height:1.3;min-height:27px;padding:6px 8px;display:flex;align-items:center}
.v8-battle-extras{display:flex;align-items:center;justify-content:space-between;gap:5px;font-size:9px;color:#ecd7b1}
.v8-capture{border-radius:8px;background:#1d3550;color:#cdeaff;border:1px solid #6383b3;padding:7px 9px;font-size:10px;font-weight:700;min-height:31px}
.v8-capture:disabled{opacity:.45}
.v8-command-zone{z-index:4;position:sticky;bottom:calc(65px + env(safe-area-inset-bottom));background:linear-gradient(180deg,#101a2ae8,#0a1225f8);padding:5px 0 4px;backdrop-filter:blur(8px);margin-top:auto}
.v8-commands{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.v8-commands .command{min-height:51px;max-height:62px;padding:7px 9px;border-radius:10px;gap:2px}
.v8-commands .command strong{font-size:12px}.v8-commands .command small{font-size:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v8-commands .command:disabled{opacity:.4}
@media(max-width:380px){.v8-enemy strong{font-size:9px}.v8-foe-art{height:60px}.v8-ally img{height:34px}.v8-command-zone{bottom:calc(64px + env(safe-area-inset-bottom))}}
@media(max-height:720px){.v8-battle-page{gap:3px}.v8-foe-art{height:53px}.v8-enemy-intent{padding:3px 6px}.v8-ally img{height:29px}.v8-commands .command{min-height:43px;padding:5px 7px}body.is-fighting .top{padding:3px 8px}.v8-battle-head{height:28px}}
@media(prefers-reduced-motion:reduce){.v8-enemy em{animation:none}}
.v8-enemy.fight-hit{animation:v7Hit .36s ease both}
.v8-ally img.fight-rush{animation:fightRush .55s ease-out}
.v8-battle-area.fight-shake{animation:v7Hurt .45s ease-out}
@media (min-height:780px){.v8-foe-art{height:98px}.v8-ally img{height:55px}.v8-commands .command{min-height:59px}.v8-battle-page{gap:7px}}
