/* Work-ID 20261103-rt-battle-slice-e759 (Trello "Tela de batalha", zenux 2026-11-02): the compact HUD of a real-time wild battle, over the map (inside #viewport), never a window.
   The HUD lives in a shadow root of #rt-hud (rt_battle.js links this same file there): the page-wide MutationObserver of the UV scrollbar does not see inside it, so its several writes a second never trigger a full-page rescan.
   Palette of the reference: #171D2B / #202A3B panels, cyan #48B9E8, coral #D94A55, gold #F0C66A, text #F1EEE8.
   Hover geometry (AGENTS.md, mandatory): every control keeps its exact authored box in idle, hover, pressed, selected, focus and pad focus - the four move buttons are fixed 138 x 34 boxes,
   their states change only colours and an INSET shadow, and no transition touches a size, a margin, a padding or a transform of a control. The long move name is ellipsized inside the same box. */
#rt-hud{position:absolute;inset:0;z-index:7;pointer-events:none;overflow:hidden;contain:layout style paint;--rt-top:8px;--rt-bottom:8px;--rt-left:8px;--rt-right:8px}
.rt-in{position:absolute;inset:0;pointer-events:none;overflow:hidden;color:#f1eee8;font:700 12px/1.2 Arial,Helvetica,sans-serif;}
.rt-in [hidden]{display:none}
.rt-in.ending .rt-moves{opacity:.35}
.rt-in .rt-box{position:absolute;box-sizing:border-box;width:210px;height:86px;margin:0;padding:5px 7px 6px;overflow:hidden;pointer-events:auto;cursor:pointer;background:#171d2bf2;border:2px solid #48b9e8;box-shadow:inset 0 0 0 1px #202a3b}
.rt-in .rt-foe{top:var(--rt-top);left:var(--rt-left)}
.rt-in .rt-ally{right:var(--rt-right);bottom:var(--rt-bottom);width:224px;height:96px}
.rt-in .rt-head{display:flex;align-items:baseline;gap:6px}
.rt-in .rt-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:uppercase;font-size:12px}
.rt-in .rt-lv{flex:none;color:#f0c66a}
.rt-in .rt-status{flex:none;min-width:0;color:#d94a55;font-size:10px;font-style:normal}
.rt-in .rt-hp{box-sizing:border-box;height:8px;margin-top:4px;background:#0b0f14;border:1px solid #48b9e8}
.rt-in .rt-hp i{display:block;width:100%;height:100%;background:#58c878;transform-origin:left center;transform:scaleX(var(--p,1));transition:transform .5s linear,background-color .3s}
.rt-in .rt-box[data-hp="mid"] .rt-hp i{background:#f0c66a}
.rt-in .rt-box[data-hp="low"] .rt-hp i{background:#d94a55}
.rt-in .rt-hpnum{display:block;margin-top:2px;text-align:right;font-size:11px}
.rt-in .rt-exp{box-sizing:border-box;height:4px;margin-top:3px;background:#0b0f14}
.rt-in .rt-exp i{display:block;width:100%;height:100%;background:#48b9e8;transform-origin:left center;transform:scaleX(var(--p,0));transition:transform .5s linear}
.rt-in .rt-moves{position:absolute;left:var(--rt-left);bottom:var(--rt-bottom);display:grid;grid-template-columns:repeat(2,138px);grid-auto-rows:34px;gap:4px;pointer-events:none}
.rt-in .rt-move{position:relative;display:block;box-sizing:border-box;width:138px;height:34px;margin:0;padding:0;overflow:hidden;pointer-events:auto;cursor:pointer;text-align:left;color:#f1eee8;background:#202a3b;border:2px solid #3a4a66;border-radius:0;box-shadow:inset 3px 0 0 var(--rt-type,#8a8f9c);font:inherit;transition:background-color .12s,border-color .12s,color .12s}
.rt-in .rt-move:hover{background:#2a3850;border-color:#48b9e8}
.rt-in .rt-move:active{background:#171d2b;border-color:#48b9e8}
.rt-in .rt-move:focus-visible{outline:0;border-color:#48b9e8;box-shadow:inset 3px 0 0 var(--rt-type,#8a8f9c),inset 0 0 0 2px #48b9e8}
.rt-in .rt-move[data-pending]:not([data-pending=""]){border-color:#f0c66a;box-shadow:inset 3px 0 0 var(--rt-type,#8a8f9c),inset 0 0 0 2px #f0c66a}
.rt-in .rt-move[aria-disabled="true"]{color:#8a8f9c;cursor:default}
.rt-in .rt-move[data-empty="1"] .rt-move-pp{color:#d94a55}
.rt-in .rt-move kbd{position:absolute;left:7px;top:6px;box-sizing:border-box;width:16px;height:16px;margin:0;padding:0;text-align:center;font:700 11px/14px Arial,Helvetica,sans-serif;color:#171d2b;background:#f0c66a;border:1px solid #171d2b}
.rt-in .rt-move-name{position:absolute;left:29px;right:5px;top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-transform:uppercase}
.rt-in .rt-move-pp{position:absolute;left:29px;right:5px;bottom:3px;overflow:hidden;white-space:nowrap;font-size:10px;color:#f0c66a}
.rt-in[data-turn="wait"] .rt-move{background:#1a2230;border-color:#2c3850;color:#8a8f9c}
.rt-in[data-turn="ready"] .rt-pending{color:#48b9e8;border-color:#48b9e8}
.rt-in .rt-pending{position:absolute;left:var(--rt-left);bottom:calc(var(--rt-bottom) + 110px);margin:0;padding:2px 6px;font-size:11px;color:#f0c66a;background:#171d2bf2;border:1px solid #f0c66a}
.rt-in .rt-banner{position:absolute;top:var(--rt-top);left:calc(var(--rt-left) + 218px);right:calc(var(--rt-right) + 232px);width:max-content;max-width:min(440px,calc(100% - var(--rt-left) - var(--rt-right) - 450px));margin:0 auto;padding:4px 10px;text-align:center;background:#171d2bf2;border:2px solid #48b9e8;font-size:13px}
@media (max-width:760px),(pointer:coarse){
 .rt-in .rt-box{width:168px;height:92px;padding:4px 6px 5px}
 .rt-in .rt-ally{width:176px;height:100px}
 .rt-in .rt-moves{grid-template-columns:repeat(2,112px);grid-auto-rows:32px}
 .rt-in .rt-move{width:112px;height:32px}
 .rt-in .rt-move kbd{top:5px}
 .rt-in .rt-mega{left:calc(var(--rt-left) + 236px);width:40px;height:32px}
 .rt-in .rt-pending{bottom:calc(var(--rt-bottom) + 104px)}
 .rt-in .rt-actions{grid-template-columns:repeat(4,52px);grid-auto-rows:26px;bottom:calc(var(--rt-bottom) + 72px)}
 .rt-in .rt-act{width:52px;height:26px;font-size:10px}
 .rt-in .rt-pop{width:232px;bottom:calc(var(--rt-bottom) + 104px)}
 .rt-in .rt-banner{left:calc(var(--rt-left) + 176px);right:calc(var(--rt-right) + 184px);max-width:calc(100% - var(--rt-left) - var(--rt-right) - 362px);font-size:12px}
}
/* ---- what the old battle card carried: gender, shiny star, caught mark, types, nature, held item, status badge, HP numbers (feature rt-info) */
.rt-in .rt-star{flex:none;color:#f0c66a;font-style:normal;font-size:11px}
.rt-in .rt-gender{flex:none;font-size:12px}
.rt-in .rt-gender[data-g="male"]{color:#68a8ff}
.rt-in .rt-gender[data-g="female"]{color:#ff80b0}
.rt-in .rt-caught{flex:none;box-sizing:border-box;width:9px;height:9px;border:2px solid #f1eee8;border-radius:50%;align-self:center}
.rt-in .rt-caught[data-caught="1"]{background:#d94a55}
.rt-in .rt-caught[data-caught="0"]{background:transparent;opacity:.6}
.rt-in .rt-traits{display:flex;flex-wrap:wrap;align-items:center;gap:3px 4px;margin-top:3px;min-height:16px;font-size:10px;line-height:14px;overflow:hidden;max-height:32px}
.rt-in .rt-types{display:inline-flex;gap:3px}
.rt-in .rt-type{display:inline-block;box-sizing:border-box;padding:0 4px;height:14px;font-size:9px;line-height:14px;text-transform:uppercase;color:#171d2b;background:var(--rt-tc,#8a8f9c);border:1px solid #171d2b}
.rt-in .rt-nature{color:#c9ccd6;white-space:nowrap}
.rt-in .rt-held{display:inline-flex;align-items:center;gap:2px;color:#f0c66a;white-space:nowrap}
.rt-in .rt-held-icon{width:14px;height:14px;image-rendering:pixelated}
.rt-in .rt-weather{padding:0 4px;height:14px;color:#171d2b;background:#98d8d8;border:1px solid #171d2b;font-size:9px;line-height:14px;text-transform:uppercase}
.rt-in .rt-hpline{display:flex;align-items:baseline;gap:2px;margin-top:3px;font-size:11px}
.rt-in .rt-status{margin-right:auto;padding:0 3px;min-width:22px;text-align:center;font-size:10px;color:#171d2b;background:#f0c66a;border:1px solid #171d2b}
.rt-in .rt-status[data-status="none"]{background:#48b9e8}
.rt-in .rt-status[data-status="burn"]{background:#f06030}
.rt-in .rt-status[data-status="poison"],.rt-in .rt-status[data-status="toxic"]{background:#a040c8;color:#f1eee8}
.rt-in .rt-status[data-status="paralysis"]{background:#f8d030}
.rt-in .rt-status[data-status="sleep"]{background:#b070e0}
.rt-in .rt-status[data-status="freeze"]{background:#80d8f0}
.rt-in .rt-hpn{--rt-hp:0;counter-reset:rthp var(--rt-hp);transition:--rt-hp .5s linear;font-size:12px}
.rt-in .rt-hpn::before{content:counter(rthp)}
.rt-in .rt-hpn.plain::before{content:none}
.rt-in .rt-hpmax{color:#c9ccd6}
.rt-in .rt-box.init *{transition:none!important}
.rt-in .rt-box[data-faint="1"]{filter:grayscale(1) brightness(.7)}
.rt-in .rt-box[data-flash="a"]{animation:rt-flash-a .4s steps(2,end)}
.rt-in .rt-box[data-flash="b"]{animation:rt-flash-b .4s steps(2,end)}
@keyframes rt-flash-a{0%{background:#d94a55f2}100%{background:#171d2bf2}}
@keyframes rt-flash-b{0%{background:#d94a55f2}100%{background:#171d2bf2}}
.rt-in .rt-exp i.reset{transition:none}
/* ---- Alt: the inspect panels (stats, stages, nature, ability, IVs), under the foe's box and over the ally's */
.rt-in .rt-inspect{position:absolute;box-sizing:border-box;width:224px;margin:0;padding:5px 7px 6px;background:#171d2bf8;border:2px solid #f0c66a;font-size:11px;line-height:14px;pointer-events:none}
.rt-in .rt-inspect-foe{top:calc(var(--rt-top) + 92px);left:var(--rt-left)}
.rt-in .rt-inspect-ally{right:var(--rt-right);bottom:calc(var(--rt-bottom) + 102px)}
.rt-in .rt-inspect header{display:flex;justify-content:space-between;color:#f0c66a;margin-bottom:2px}
.rt-in .rt-stats{display:grid;grid-template-columns:1fr auto auto;gap:0 8px;margin:0}
.rt-in .rt-stats dt{margin:0}
.rt-in .rt-stats dd{margin:0;text-align:right}
.rt-in .rt-stage.up{color:#58c878}
.rt-in .rt-stage.down{color:#d94a55}
.rt-in .rt-nmark.up{color:#d94a55;margin-left:2px}
.rt-in .rt-nmark.down{color:#48b9e8;margin-left:2px}
.rt-in .rt-itraits p{margin:2px 0 0}
.rt-in .rt-itraits small{color:#c9ccd6}
.rt-in .rt-ivs{display:grid;grid-template-columns:repeat(6,1fr);gap:2px;margin-top:3px}
.rt-in .rt-iv{display:flex;flex-direction:column;align-items:center;font-size:10px;line-height:12px;background:#202a3b}
.rt-in .rt-iv small{font-size:8px;color:#c9ccd6}
.rt-in .rt-iv.best strong{color:#f0c66a}
.rt-in .rt-iv.high strong{color:#58c878}
.rt-in .rt-iv.low strong{color:#d94a55}
.rt-in .rt-perfection{margin:3px 0 0;text-align:center;color:#f0c66a}
/* ---- Mega Evolution toggle (Work-ID 20261104-mega-battle-only-9d4e): next to the four moves, a fixed box like them; hover, press, on and used only repaint */
.rt-in .rt-mega{position:absolute;left:calc(var(--rt-left) + 288px);bottom:var(--rt-bottom);box-sizing:border-box;width:44px;height:34px;margin:0;padding:0;overflow:hidden;pointer-events:auto;cursor:pointer;text-align:left;color:#f1eee8;background:#202a3b;border:2px solid #3a4a66;border-radius:0;font:inherit;transition:background-color .12s,border-color .12s,color .12s}
.rt-in .rt-mega[hidden]{display:none}
.rt-in .rt-mega .mega-sym{position:absolute;left:50%;top:50%;width:28px;height:28px;margin:-14px 0 0 -14px;color:#f1eee8;pointer-events:none}      /* Work-ID 20261106-mega-symbol-switch-8d2c: only the symbol */
.rt-in .rt-mega .mega-sym>svg{display:block;width:28px;height:28px}
.rt-in .rt-mega[data-state="on"] .mega-sym{color:#ffd93d}
.rt-in .rt-mega:hover{background:#2a3850;border-color:#48b9e8}
.rt-in .rt-mega:active{background:#171d2b;border-color:#48b9e8}
.rt-in .rt-mega:focus-visible{outline:0;border-color:#48b9e8;box-shadow:inset 0 0 0 2px #48b9e8}
.rt-in .rt-mega[data-state="on"]{border-color:#b98cff;box-shadow:inset 0 0 0 2px #b98cff;background:#2d2650}
.rt-in .rt-mega[aria-disabled="true"]{color:#8a8f9c;cursor:default}
.rt-in .rt-box[data-mega="1"] .rt-name{color:#d9c4ff}
/* ---- phase (c): ITENS / CAPTURAR / POKÉMON / FUGIR over the four moves, and their panel (Work-ID 20261104-rt-actions-rounds-9d3f). Fixed boxes like the move buttons: hover, press, focus and pending only repaint. */
.rt-in .rt-actions{position:absolute;left:var(--rt-left);bottom:calc(var(--rt-bottom) + 76px);display:grid;grid-template-columns:repeat(4,68px);grid-auto-rows:28px;gap:4px;pointer-events:none}
.rt-in .rt-act{position:relative;box-sizing:border-box;width:68px;height:28px;margin:0;padding:0;overflow:hidden;pointer-events:auto;cursor:pointer;color:#f1eee8;background:#202a3b;border:2px solid #3a4a66;border-radius:0;font:inherit;font-size:11px;text-transform:uppercase;transition:background-color .12s,border-color .12s,color .12s}
.rt-in .rt-act span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rt-in .rt-act:hover{background:#2a3850;border-color:#48b9e8}
.rt-in .rt-act:active{background:#171d2b;border-color:#48b9e8}
.rt-in .rt-act:focus-visible{outline:0;border-color:#48b9e8;box-shadow:inset 0 0 0 2px #48b9e8}
.rt-in .rt-act[data-pending]:not([data-pending=""]){border-color:#f0c66a;box-shadow:inset 0 0 0 2px #f0c66a}
.rt-in .rt-act[data-act="flee"]{color:#ffb4a8}
.rt-in .rt-act[aria-disabled="true"]{color:#8a8f9c;cursor:default}
.rt-in[data-turn="wait"] .rt-act{background:#1a2230;border-color:#2c3850}
.rt-in.ending .rt-actions{opacity:.35}
.rt-in .rt-pop{position:absolute;box-sizing:border-box;left:var(--rt-left);bottom:calc(var(--rt-bottom) + 112px);width:284px;max-height:min(300px,calc(100% - var(--rt-top) - var(--rt-bottom) - 140px));overflow:auto;margin:0;padding:6px 8px 8px;background:#171d2bf8;border:2px solid #48b9e8;pointer-events:auto;font-size:11px;line-height:14px}
.rt-in .rt-pop-head{display:flex;align-items:center;gap:6px;margin-bottom:4px;color:#f0c66a;font-size:12px;text-transform:uppercase}
.rt-in .rt-pop-head b{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rt-in .rt-pop-back,.rt-in .rt-pop-x{box-sizing:border-box;width:20px;height:20px;margin:0;padding:0;color:#f1eee8;background:#202a3b;border:1px solid #3a4a66;border-radius:0;font:inherit;line-height:16px;cursor:pointer}
.rt-in .rt-pop-back:hover,.rt-in .rt-pop-x:hover{background:#2a3850;border-color:#48b9e8}
.rt-in .rt-pop-list{display:flex;flex-direction:column;gap:3px}
.rt-in .rt-pop-row{position:relative;box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;width:100%;min-height:30px;margin:0;padding:3px 6px;text-align:left;color:#f1eee8;background:#202a3b;border:2px solid #3a4a66;border-radius:0;font:inherit;cursor:pointer;transition:background-color .12s,border-color .12s,color .12s}
.rt-in .rt-pop-row:hover{background:#2a3850;border-color:#48b9e8}
.rt-in .rt-pop-row[aria-disabled="true"]{color:#8a8f9c;cursor:default}
.rt-in .rt-pop-row[aria-disabled="true"]:hover{background:#202a3b;border-color:#3a4a66}
.rt-in .rt-pop-row.selected{border-color:#f0c66a}
.rt-in .rt-pop-row.fainted{filter:grayscale(1)}
.rt-in .rt-item-icon{width:20px;height:20px;image-rendering:pixelated}
.rt-in .rt-item-name,.rt-in .rt-party-name{flex:1 1 90px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rt-in .rt-item-count,.rt-in .rt-party-hp{color:#f0c66a}
.rt-in .rt-item-mod{color:#48b9e8}
.rt-in .rt-item-chance,.rt-in .rt-party-reason{flex:1 1 100%;color:#c9ccd6;font-size:10px}
.rt-in .rt-party-bar{flex:1 1 100%;height:5px;background:#0b0f14;border:1px solid #3a4a66;box-sizing:border-box}
.rt-in .rt-mini-hp{display:block;width:100%;height:100%;background:#58c878;transform-origin:left center;transform:scaleX(var(--p,1))}
.rt-in .rt-pop-note{margin:4px 0 0;color:#c9ccd6}
.rt-in .rt-blocked{color:#d94a55}
/* ---- the battle's weather (Work-ID 20261104-rt-weather-4e6b, zenux 13:26): ONE overlay over the fighter's map view, under the HUD (z-index 2: over the map and its names, under every floating panel and the HUD boxes), made of the old scene's .bw-* layers (styles.css);
   compositor only (opacity fade, sliding tiles), no backdrop filter or blend mode over the whole map, no input; still (no fade, no particles) with the battle animations off. */
.rt-wx{position:absolute;inset:0;z-index:2;overflow:hidden;pointer-events:none;opacity:0;transition:opacity .5s linear;contain:strict}
.rt-wx[data-on="1"]{opacity:1}
.rt-wx.still{transition:none}
.rt-wx.still .bw-fall{display:none}
.rt-wx .bw-tint{backdrop-filter:none;mix-blend-mode:normal}
.rt-wx .bw-tint-rain{background:rgba(37,49,78,.36)}
.rt-wx .bw-tint-sandstorm{background:rgba(214,168,96,.36)}
.rt-wx .bw-tint-snow{background:rgba(226,236,255,.14)}
.rt-wx .bw-tint-heat{background:radial-gradient(ellipse at 72% -12%,rgba(255,206,96,.40),rgba(255,132,48,.12) 55%,rgba(255,110,40,0) 82%)}
.rt-in .rt-field{position:absolute;top:var(--rt-top);right:var(--rt-right);box-sizing:border-box;max-width:200px;margin:0;padding:3px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;text-transform:uppercase;color:#f1eee8;background:#171d2bf2;border:2px solid #48b9e8;pointer-events:none}
.rt-in .rt-field[data-kind="sand"]{border-color:#d6a860}
.rt-in .rt-field[data-kind="rain"]{border-color:#6890f0}
.rt-in .rt-field[data-kind="sun"]{border-color:#f08030}
.rt-in .rt-field[data-kind="hail"]{border-color:#98d8d8}
@media (prefers-reduced-motion:reduce){.rt-wx{transition:none}.rt-in .rt-act,.rt-in .rt-pop-row{transition:none}.rt-in .rt-hp i,.rt-in .rt-exp i,.rt-in .rt-move,.rt-in .rt-hpn{transition:none}.rt-in .rt-box[data-flash]{animation:none}}
