/* A shared arena: physics positions actors, source pixels determine their size. */
.tba-combat-world .tba-combat-arena{container-type:inline-size;inset:0 5% 10%;pointer-events:none;z-index:1}
.tba-floating-game .tba-combat-arena{left:66px;right:24px}
.tba-scene .tba-native-game{background:transparent;background-image:none;border:0;box-shadow:none}
.tba-native-game::before,.tba-native-game::after{display:none}
.tba-native-game .tba-combat-arena{left:66px;right:24px}
/* Secondary scenes use the same logical strip as the desktop preview. The
   enclosing product panel can grow without spreading the party or its pixels. */
.tba-preview-game{position:relative;flex:0 0 128px;height:128px;width:100%;isolation:isolate}
.tba-preview-game-stage{position:absolute;left:50%;bottom:0;width:324px;max-width:100%;height:128px;transform:translateX(-50%)}
.tba-preview-game-stage>.tba-native-game{height:100%;min-height:0;width:100%;--tba-game-scale:2}
.tba-preview-game-stage .tba-game-controls{top:auto;bottom:74px;right:4px;opacity:0;pointer-events:none;transition:opacity .14s ease}
.tba-preview-game-stage:hover .tba-game-controls,.tba-preview-game-stage .tba-game-controls:focus-within{opacity:1;pointer-events:auto}
.tba-preview-game-stage .tba-game-controls button{width:23px;height:23px;padding:3px}
@container(max-width:420px){
  .tba-preview-game{flex-basis:92px;height:92px}
  .tba-preview-game-stage{width:254px;height:92px}
  .tba-preview-game-stage>.tba-native-game{--tba-game-scale:1}
  .tba-preview-game-stage .tba-game-controls{bottom:58px}
}
.tba-combat-world .tba-actor{--tba-hero-size:1;z-index:3;bottom:0;transition:none!important;transform:translateX(-50%)!important}
/* Keep the mage unchanged; give the two companions the requested presence in
   every pose, without fitting each attack frame to a different opaque size. */
.tba-combat-world .tba-actor[data-hero-id="501"],.tba-combat-world .tba-actor[data-hero-id="101"]{--tba-hero-size:1.1}
/* Main previews keep one authored pixel density for the whole formation.
   Class-duel presentation retains its separately approved sizing. */
.tba-combat-world:not(.tba-class-duel) .tba-actor{--tba-hero-size:1}
.tba-combat-world .tba-actor>.tba-source-sprite{--tba-sprite-scale:calc(var(--tba-game-scale) * var(--tba-hero-size))}
.tba-combat-world .tba-actor>.tba-agent-skills{bottom:calc(22px * var(--tba-game-scale) * var(--tba-hero-size))}
.tba-combat-world .tba-enemy{right:auto;bottom:var(--tba-enemy-depth,0px);opacity:1;transform:translateX(calc(-50% + var(--tba-enemy-entry-x,0px)))!important;transition:opacity .18s;z-index:1}
.tba-combat-world[data-combat-phase=march] .tba-enemy{opacity:0}
.tba-combat-world .tba-enemy[data-alive=false]{opacity:0;transition:opacity .65s .2s;transform:translateX(-50%)!important}
.tba-combat-world .tba-enemy-facing{display:block;transform:none}
.tba-combat-world .tba-actor[data-hero-id="101"]{z-index:4}
.tba-combat-world .tba-original-enemy-health{position:absolute;left:50%;top:auto;bottom:calc(23px * var(--tba-game-scale));transform:translateX(-50%);margin:0;z-index:3}
.tba-combat-world .tba-original-mob-health{--tba-health-scale:1;bottom:calc(20px * var(--tba-game-scale))}
.tba-combat-world .tba-original-boss-health{bottom:calc(42px * var(--tba-game-scale))}
.tba-combat-world .tba-agent-skills{z-index:5}
.tba-combat-world .tba-skill-charge{animation:none!important;transition:transform .06s linear}
.tba-combat-world .tba-original-world-track{animation:none;transform:translateX(var(--tba-camera-x,0%))}
.tba-sim-effects{position:absolute;inset:0;--tba-effect-scale:var(--tba-game-scale);pointer-events:none;z-index:auto}
.tba-sim-projectile{position:absolute;z-index:6;bottom:calc(16px * var(--tba-game-scale));width:0;height:0;animation:tba-sim-flight .25s linear both}
.tba-sim-projectile>.tba-combat-effect{transform:scaleX(-1)}
.tba-sim-impact{position:absolute;z-index:6;bottom:calc(13px * var(--tba-game-scale));width:0;height:0}
.tba-sim-damage,.tba-sim-xp{position:absolute;z-index:8;bottom:calc(26px * var(--tba-game-scale));font-family:'Pixelify Sans',monospace;font-size:14px;font-weight:600;color:#ffdf8b;text-shadow:1px 1px #341811;white-space:nowrap;animation:tba-sim-number .65s ease-out both}
.tba-sim-damage-301{color:#e4b8ff}.tba-sim-damage-201,.tba-sim-damage-501{color:#f1dfb2}
.tba-sim-xp{bottom:calc(31px * var(--tba-game-scale));font-size:11px;color:#f2cb60;animation-duration:.7s}
@keyframes tba-sim-flight{0%{transform:translateX(0);opacity:0}6%{opacity:1}96%{opacity:1}100%{transform:translateX(var(--tba-flight-dx));opacity:0}}
@keyframes tba-sim-number{0%{opacity:0;transform:translate(-50%,2px)}12%,60%{opacity:1}100%{opacity:0;transform:translate(-50%,-20px)}}
@container(max-width:420px){.tba-sim-damage{font-size:10px}.tba-sim-xp{font-size:8px}}
@media(prefers-reduced-motion:reduce){.tba-combat-world .tba-enemy-health i,.tba-combat-world .tba-skill-charge{transition:none}.tba-sim-projectile,.tba-sim-impact,.tba-sim-damage,.tba-sim-xp{display:none}}
