/* Shared battle HUD; only presentation inside the arena overlay. */
body .battle-top,body.in-battle .battle-top{position:absolute;top:12px;left:14px;right:14px;display:grid;grid-template-columns:minmax(0,1fr) 80px minmax(0,1fr);gap:14px;align-items:start;pointer-events:none;z-index:5}
body .battle-top>.battle-fighter,body.in-battle .battle-top>.battle-fighter{display:flex;gap:10px;width:100%;max-width:410px;min-width:0;padding:9px;background:linear-gradient(115deg,#152d38f5,#101e2ce8);border:1px solid #6b85908c;border-top:3px solid var(--fighter-color);border-radius:5px;box-shadow:0 3px 0 #080f19a6,0 8px 20px #08121c33;color:#fff9e8}
body .battle-top>.enemy{justify-self:end;flex-direction:row-reverse;background:linear-gradient(245deg,#152d38f5,#101e2ce8)}
.battle-portrait{flex:0 0 78px;height:80px;align-self:start;display:grid;place-items:center;border:2px solid var(--fighter-color);border-radius:3px;overflow:hidden;background:radial-gradient(ellipse at 50% 70%,#74858766,#142936 75%);box-shadow:inset 0 0 0 2px #0b1625}
.battle-portrait canvas{display:block;width:100%;height:100%;image-rendering:pixelated}
.battle-info{min-width:0;flex:1}.battle-heading{display:flex;align-items:center;justify-content:space-between;gap:6px}.battle-top .battle-name{font:italic 950 clamp(15px,2vw,26px)/1.05 'Arial Black','Segoe UI',sans-serif;letter-spacing:-.5px;text-transform:uppercase;text-shadow:2px 2px #071019,-1px -1px #071019;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.battle-level{font:8px monospace;color:#b6c8d1;white-space:nowrap}
.battle-types{display:flex;gap:4px;margin:5px 0}.battle-types span{font:900 8px/1 monospace;color:#11202b;background:var(--badge);padding:3px 5px;border-radius:2px;box-shadow:0 1px #0008}
.battle-health{height:22px;background:#07131e;border:2px solid #08131e;border-radius:3px;overflow:hidden;position:relative;box-shadow:0 0 0 1px #6e87935c}.battle-health i{display:block;height:100%;transition:width .12s linear;box-shadow:inset 0 3px #ffffff32,inset 0 -3px #0002}.battle-health>span{position:absolute;inset:0;display:flex;align-items:center;padding:0 6px;font:900 12px/1 monospace;color:#fffbe5;text-shadow:1px 1px #10202a,-1px -1px #10202a,1px -1px #10202a,-1px 1px #10202a}
.battle-roster{display:flex;justify-content:space-between;align-items:center;gap:6px;margin-top:5px}.battle-trainer{display:flex;align-items:center;gap:5px}.battle-trainer svg{width:24px;height:24px;background:#5266785c;border:1px solid #7c93995e;border-radius:2px}.battle-trainer b{font:italic 900 10px 'Segoe UI',sans-serif;color:#e9d98e;white-space:nowrap}.battle-balls{display:flex;align-items:center;gap:5px}.battle-ball{position:relative;display:block;width:14px;height:14px;border:2px solid #081421;border-radius:50%;background:linear-gradient(#df766b 0 40%,#182735 40% 59%,#e3e7de 59%);box-shadow:0 0 0 1px #8b9ba155}.battle-ball:after{content:'';position:absolute;left:3px;top:3px;width:4px;height:4px;border:1px solid #112332;border-radius:50%;background:#fff9dc}.battle-ball.active{outline:2px solid #e5d58a;outline-offset:2px}.battle-ball.fainted{filter:grayscale(1);opacity:.28}.battle-status{display:block;font:8px monospace;color:#b0c5ce;margin-top:3px;line-height:1.2}
.enemy .battle-heading,.enemy .battle-roster,.enemy .battle-trainer{flex-direction:row-reverse}.enemy .battle-types,.enemy .battle-balls{flex-direction:row-reverse}.enemy .battle-info{text-align:right}.enemy .battle-health>span{justify-content:flex-end}.enemy .battle-health i{margin-left:auto}
body .battle-top>.match-clock,body.in-battle .battle-top>.match-clock{grid-column:2;grid-row:1;min-width:0;max-width:none;width:80px;height:auto;padding:7px 4px;background:#0a1828eb;border:1px solid #80989785;border-radius:4px;text-align:center;box-shadow:0 3px #07121d80}body .battle-top>.match-clock>span,body.in-battle .battle-top>.match-clock>span{font:900 20px/1 monospace;color:#fff9de;letter-spacing:-1px;text-shadow:2px 2px #000}
.battle-top>#enemy-hud{grid-column:3;grid-row:1}.battle-top>#player-hud{grid-column:1;grid-row:1}
#preview-badge{position:absolute;top:135px;left:50%;transform:translateX(-50%);pointer-events:none;font:9px monospace;color:#b4ef84;background:#10232de8;padding:4px 7px;border-radius:2px}
@media(max-width:900px){body .battle-top,body.in-battle .battle-top{left:8px;right:8px;top:8px;gap:8px;grid-template-columns:minmax(0,1fr) 64px minmax(0,1fr)}body .battle-top>.match-clock,body.in-battle .battle-top>.match-clock{width:64px}.battle-portrait{flex-basis:58px;height:62px}body .battle-top>.battle-fighter,body.in-battle .battle-top>.battle-fighter{padding:6px;gap:7px}.battle-level{display:none}.battle-top .battle-name{font-size:19px}.battle-health{height:20px}.battle-trainer svg{width:20px;height:20px}.battle-balls{gap:4px}.battle-ball{width:12px;height:12px}.battle-ball:after{left:2px;top:2px}.battle-trainer b{font-size:8px}}
@media(max-width:520px){body .battle-top,body.in-battle .battle-top{left:4px;right:4px;top:4px;gap:5px;grid-template-columns:minmax(0,1fr) 46px minmax(0,1fr)}body .battle-top>.match-clock,body.in-battle .battle-top>.match-clock{width:46px;padding:6px 1px}body .battle-top>.match-clock>span,body.in-battle .battle-top>.match-clock>span{font-size:14px}.battle-portrait{flex-basis:36px;height:43px}body .battle-top>.battle-fighter,body.in-battle .battle-top>.battle-fighter{padding:4px;gap:4px}.battle-top .battle-name{font-size:12px;letter-spacing:-.3px}.battle-types{gap:2px;margin:3px 0}.battle-types span{font-size:6px;padding:2px}.battle-health{height:17px}.battle-health>span{font-size:9px;padding:0 2px}.battle-roster{flex-wrap:wrap;gap:5px}.battle-trainer svg{width:16px;height:16px}.battle-trainer b{font-size:7px}.battle-balls{gap:3px}.battle-ball{width:10px;height:10px}.battle-ball:after{left:1px;top:1px}.battle-status{font-size:6px}}

/* Informações flutuantes: sem card externo, conforme ajuste aprovado. */
body .battle-top>.battle-fighter,body.in-battle .battle-top>.battle-fighter,body .battle-top>.battle-fighter.enemy{background:transparent;border:0;box-shadow:none;border-radius:0;}
/* Shared HP and three sequential dodge charges. */
.battle-health{border-radius:5px}.battle-health i{box-shadow:inset 0 2px #ffffff35,inset 0 -2px #00000018}
.battle-dodge{display:flex;align-items:center;gap:6px;margin:5px 0 2px}.battle-dodge-charges{display:flex;gap:4px;flex:1}.battle-dodge-charges>span{display:block;flex:1;height:5px;border-radius:2px;background:#081724;overflow:hidden;box-shadow:0 0 0 1px #7196ac45}.battle-dodge-charges i{display:block;height:100%;background:#39d5f4;box-shadow:inset 0 1px #ffffff40;transition:width .1s linear}.battle-dodge-charges i.recharging{background:#2795b7}.battle-dodge small{font:700 9px/1 monospace;color:#9cdff0}.enemy .battle-dodge{flex-direction:row-reverse}
@media(max-width:520px){.battle-dodge{gap:4px;margin-top:4px}.battle-dodge-charges{gap:3px}.battle-dodge-charges>span{height:4px}.battle-dodge small{font-size:7px}}
.battle-fighter{position:relative;flex-wrap:wrap}.battle-team-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));width:100%;gap:5px;margin-top:5px;padding:6px;border:1px solid #4f96b87a;border-radius:9px;background:#071b30d9;box-sizing:border-box}.battle-team-card{position:relative;min-width:0;aspect-ratio:1.05;padding:3px 3px 8px;border:1px solid #52829d;border-radius:6px;background:#102b41;color:inherit;cursor:pointer}.battle-team-card canvas{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}.battle-team-card.active{border-color:#43ddff;box-shadow:0 0 8px #19bdfc99,inset 0 0 8px #19bdfc40;background:#164365}.battle-team-card:disabled{opacity:1;cursor:default}.battle-team-card.fainted{opacity:.36;filter:grayscale(1)}.team-card-hp{position:absolute;left:4px;right:4px;bottom:3px;height:3px;background:#07131e;border-radius:2px;overflow:hidden}.team-card-hp i{display:block;height:100%}.in-battle .squad{display:none}.battle-balls{display:none!important}
@media(max-width:900px){.battle-team-cards{gap:3px;padding:4px}.battle-team-card{padding:1px 1px 6px}.team-card-hp{left:2px;right:2px;height:2px}}
@media(max-width:520px){.battle-team-cards{gap:2px;padding:3px;border-radius:5px}.battle-team-card{border-radius:3px}.team-card-hp{bottom:2px}}
.battle-team-cards{pointer-events:auto}
body.in-battle .battle-bottom .squad{display:none!important}
/* Reference HUD: live portrait, health, dodge charges and team selection. */
body .battle-top>.battle-fighter,body.in-battle .battle-top>.battle-fighter,body .battle-top>.battle-fighter.enemy{display:grid;grid-template-columns:100px minmax(0,1fr);grid-template-rows:auto auto;gap:9px 12px;max-width:480px;padding:12px 12px 8px;border:2px solid #3887b1;border-radius:15px;background:linear-gradient(112deg,#17212df7,#082337f5);box-shadow:0 0 0 4px #071521d9,inset 2px 0 #fa8528,0 5px 15px #020a1499;box-sizing:border-box;color:#fffbee}
body .battle-top>.battle-fighter.enemy{direction:rtl}.battle-fighter.enemy>*{direction:ltr}
.battle-portrait{grid-column:1;grid-row:1;align-self:center;width:100px;height:115px;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible;position:relative}
.battle-portrait:after{content:'';position:absolute;left:5%;right:5%;bottom:1px;height:13px;border:2px solid #fc9a48;border-radius:50%;box-shadow:0 0 7px #ff8a363d;z-index:0}.battle-portrait canvas{position:relative;z-index:1}
.battle-info{grid-column:2;grid-row:1;align-self:center}.battle-heading{padding-bottom:6px;border-bottom:2px solid #ed812d;position:relative}.battle-top .battle-name{font-size:clamp(19px,2vw,29px);font-weight:950;letter-spacing:.2px;text-shadow:2px 3px #020913}.battle-level{display:none}
.battle-types{margin:7px 0 10px;gap:5px}.battle-types>span{display:flex;align-items:center;gap:5px;border-radius:4px;padding:3px 6px 3px 3px;background:linear-gradient(#ffffff38,#00000012),var(--badge);font:900 10px/1 'Segoe UI',sans-serif;box-shadow:inset 0 1px #ffffff60,0 1px 2px #0007}.battle-types svg{width:16px;height:16px;padding:1px;border-radius:3px;background:#ffffff33;flex:none}.battle-types b{font:inherit}.battle-types [data-type=fire]{--badge:#ff751c!important}.battle-types [data-type=water]{--badge:#33c4ef!important}
.battle-health{height:24px;border:2px solid #06101d;border-radius:7px;box-shadow:0 0 0 1px #448eaf,inset 0 1px #0008}.battle-health i{background-image:linear-gradient(#ffffff30,transparent 40%,#003c301f)!important;box-shadow:inset 0 3px #ffffff42,inset 0 -2px #00382633;transition:width .2s ease-out}.battle-health>span{font:900 15px/1 'Arial Black','Segoe UI',sans-serif;color:#fffbee;text-shadow:1px 2px #06141a,-1px -1px #06141a;padding:0 7px}
.battle-dodge{margin:8px 0 0;gap:6px}.battle-dodge-charges{gap:6px;padding:3px;background:#041423;border:1px solid #3c7ba9;border-radius:10px}.battle-dodge-charges>span{height:7px;border-radius:8px;background:#062032;box-shadow:none}.battle-dodge-charges i{background:linear-gradient(#b7ffff,#14d8ff 55%,#0789c9);border-radius:8px;box-shadow:inset 0 1px #efffff,0 0 5px #2adcfb88}.battle-dodge-charges i.recharging{background:linear-gradient(#6ac9e1,#1380a4)}.battle-dodge small{font:italic 900 15px/1 'Segoe UI',sans-serif;color:#61defe}
.battle-roster{position:absolute;right:12px;top:100%;margin-top:3px;opacity:.8}.battle-trainer svg,.battle-balls{display:none!important}.battle-trainer b{font-size:7px;color:#cce7f1}.battle-status{position:absolute;top:100%;left:10px;color:#ddf5ff}
.battle-team-cards{grid-column:1/-1;grid-row:2;grid-template-columns:repeat(var(--team-count,6),minmax(0,1fr));padding:5px 2px 1px;margin-top:1px;gap:3px;border:0;border-top:1px solid #3481a86b;border-radius:0;background:linear-gradient(#10273844,#04172566);overflow:visible}
.battle-team-card{border:1px solid transparent;border-right-color:#49738d55;border-radius:0;background:transparent;aspect-ratio:1.04;padding:2px 3px 8px;transition:background .16s,border-color .16s,box-shadow .16s}.battle-team-card:last-child{border-right-color:transparent}.battle-team-card.active{border:2px solid #ff9f2b;border-radius:8px;background:radial-gradient(ellipse at center,#23536a,#10283b);box-shadow:0 0 0 1px #ffce61,0 0 9px #fa761770,inset 0 0 9px #ffae2b22;animation:team-frame-glow 2s ease-in-out infinite}.battle-team-card.active:before{content:'';position:absolute;top:-12px;left:calc(50% - 8px);border-left:8px solid transparent;border-right:8px solid transparent;border-top:11px solid #ffb43f;filter:drop-shadow(0 1px 1px #e36c19);z-index:2}.team-card-hp{height:4px;bottom:3px;left:5px;right:5px;border-radius:4px;box-shadow:0 0 3px #69e1cb55}.team-card-hp i{transition:width .2s ease-out}.battle-team-card.active .team-card-hp{box-shadow:0 0 5px #ffb23d88}
body.in-battle .battle-bottom .dash-panel{display:none!important}
@keyframes team-frame-glow{50%{box-shadow:0 0 0 1px #ffe69c,0 0 11px #fa761785,inset 0 0 9px #ffae2b30}}
@media(max-width:1050px){body .battle-top>.battle-fighter,body.in-battle .battle-top>.battle-fighter,body .battle-top>.battle-fighter.enemy{grid-template-columns:72px minmax(0,1fr);padding:9px;gap:8px}.battle-portrait{width:72px;height:98px}.battle-top .battle-name{font-size:21px}.battle-types>span{font-size:8px;padding:2px 4px}.battle-types svg{width:12px;height:12px}.battle-health>span{font-size:12px}.battle-health{height:22px}}
@media(max-width:650px){body .battle-top,body.in-battle .battle-top{grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr);gap:5px}.battle-top>.match-clock{width:40px!important}body .battle-top>.battle-fighter,body.in-battle .battle-top>.battle-fighter,body .battle-top>.battle-fighter.enemy{grid-template-columns:38px minmax(0,1fr);padding:5px;gap:5px 3px;border-radius:8px;border-width:1px;box-shadow:0 0 0 2px #071521d9,inset 1px 0 #fa8528}.battle-portrait{width:38px;height:72px}.battle-portrait:after{height:7px;bottom:7px;border-width:1px}.battle-top .battle-name{font-size:12px;letter-spacing:-.4px}.battle-heading{padding-bottom:3px}.battle-types{gap:2px;margin:4px 0}.battle-types>span{font-size:5px;gap:1px;padding:2px}.battle-types svg{width:7px;height:7px;padding:0}.battle-health{height:16px;border-radius:4px;border-width:1px}.battle-health>span{font-size:8px;padding:0 2px}.battle-dodge{gap:2px;margin-top:5px}.battle-dodge-charges{gap:2px;padding:2px}.battle-dodge-charges>span{height:4px}.battle-dodge small{font-size:8px}.battle-team-cards{gap:1px;padding:5px 0 0}.battle-team-card{padding:1px 1px 5px}.battle-team-card.active{border-width:1px;border-radius:4px}.battle-team-card.active:before{top:-7px;left:calc(50% - 4px);border-left-width:4px;border-right-width:4px;border-top-width:6px}.team-card-hp{height:2px;left:2px;right:2px;bottom:1px}.battle-roster{right:4px}.battle-trainer b{font-size:5px}}
@media(prefers-reduced-motion:reduce){.battle-team-card.active{animation:none}.battle-health i,.battle-team-card{transition:none}}
@media(max-width:650px){body.in-battle #battle .battle-title{top:150px}body.in-battle #battle #battle-message{top:188px}}
/* Compact HUD: one heading row for name and types, smaller portraits and roster. */
body .battle-top>.battle-fighter,body.in-battle .battle-top>.battle-fighter,body .battle-top>.battle-fighter.enemy{max-width:350px;grid-template-columns:58px minmax(0,1fr);padding:7px 8px 5px;gap:5px 7px;border-radius:11px}
.battle-portrait{width:58px;height:65px}.battle-portrait:after{height:8px;bottom:1px;border-width:1px}
.battle-heading{border:0;padding:0;gap:5px;margin-bottom:8px;min-width:0;justify-content:flex-start}
.battle-top .battle-name{font-size:18px;letter-spacing:-.3px;flex:0 1 auto;min-width:0}
.battle-heading .battle-types{margin:0;gap:3px;flex:0 0 auto;align-items:center;white-space:nowrap}
.battle-heading .battle-types>span{font-size:7px;padding:3px;gap:2px;border-radius:3px}.battle-heading .battle-types svg{width:10px;height:10px;padding:0}
.battle-health{height:20px;border-radius:5px}.battle-health>span{font-size:12px;padding:0 5px}
.battle-dodge{gap:0;margin-top:5px}.battle-dodge small{display:none}.battle-dodge-charges{border:0;padding:0;background:transparent;border-radius:0;gap:4px;width:100%;flex:1}.battle-dodge-charges>span{height:5px}
.battle-team-cards{padding:4px 0 0;gap:2px}.battle-team-card{aspect-ratio:auto;height:37px;padding:1px 3px 5px;display:flex;align-items:center;justify-content:center}.battle-team-card canvas{width:32px!important;height:29px!important;max-height:29px;object-fit:contain}.battle-team-card.active:before{top:-7px;left:calc(50% - 4px);border-left-width:4px;border-right-width:4px;border-top-width:6px}.team-card-hp{height:2px;bottom:2px;left:4px;right:4px}
@media(max-width:1050px){body .battle-top>.battle-fighter,body.in-battle .battle-top>.battle-fighter,body .battle-top>.battle-fighter.enemy{max-width:330px;grid-template-columns:46px minmax(0,1fr);padding:6px;gap:5px}.battle-portrait{width:46px;height:59px}.battle-top .battle-name{font-size:16px}.battle-heading{margin-bottom:6px}.battle-heading .battle-types>span{font-size:6px;padding:2px}.battle-team-card{height:32px}.battle-team-card canvas{width:28px!important;height:25px!important;max-height:25px}}
@media(max-width:650px){body .battle-top>.battle-fighter,body.in-battle .battle-top>.battle-fighter,body .battle-top>.battle-fighter.enemy{grid-template-columns:23px minmax(0,1fr);padding:4px;gap:3px;border-radius:7px}.battle-portrait{width:23px;height:40px}.battle-portrait:after{height:4px;bottom:1px}.battle-top .battle-name{font-size:9px;letter-spacing:-.3px}.battle-heading{gap:2px;margin-bottom:5px}.battle-heading .battle-types{gap:2px}.battle-heading .battle-types>span{font-size:5px;padding:2px;gap:1px}.battle-heading .battle-types svg{width:6px;height:6px}.battle-health{height:15px;border-width:1px}.battle-health>span{font-size:8px}.battle-dodge{margin-top:4px}.battle-dodge-charges{gap:2px}.battle-dodge-charges>span{height:3px}.battle-team-cards{padding-top:4px;gap:1px}.battle-team-card{height:23px;padding:1px 1px 4px}.battle-team-card canvas{width:18px!important;height:17px!important;max-height:17px}.battle-team-card.active:before{top:-5px;left:calc(50% - 3px);border-left-width:3px;border-right-width:3px;border-top-width:4px}.team-card-hp{height:2px;left:2px;right:2px}.battle-roster{right:4px}.battle-trainer b{font-size:5px}body.in-battle #battle .battle-title{top:110px}body.in-battle #battle #battle-message{top:148px}}

.battle-dodge-charges>span[hidden]{display:none!important}
