/* UI 016.6.2b — deterministic HP paint, finale AUTO dedupe, clear first-round cue.
   Additive only: accepted combat movement, impact, outcome FX and layout stay untouched. */

/* Never allow the 0155 compositor to fall back to a full bar while a freshly
   server-rendered health card is waiting for the JS state pass. The server always
   provides --b14-hp-to; 0% is the last-resort safety value, never 100%. */
body.arena-battle014-active #battle014-root .b14-health>i em{
  width:var(--b155-hp-core,var(--b14-hp-to,0%))!important;
}

/* 016.5 strips IDs from its inert finale snapshot. 0158 can therefore append a
   second real #battle0158-auto into that copied feedback row. Hide only the stripped
   source copy; the single generated compact AUTO remains visible and keeps its 0158
   geometry. This selector applies on the first paint, before any observer callback. */
body.arena-battle014-active #battle014-root .b165-finale-snapshot button:has(.b158-auto-label):not(#battle0158-auto){
  display:none!important;
}

/* If Safari restores a snapshot before 0158 has inserted its compact replacement,
   a normalized class is still safe and compact. */
body.arena-battle014-active #battle014-root .b165-finale-snapshot .b166-auto-final{
  position:relative!important;
  display:grid!important;
  width:31px!important;
  min-width:31px!important;
  max-width:31px!important;
  height:27px!important;
  min-height:27px!important;
  max-height:27px!important;
  place-items:center!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:8px!important;
  pointer-events:none!important;
}
body.arena-battle014-active #battle014-root .b165-finale-snapshot .b166-auto-final .b158-auto-label{
  position:relative!important;
  z-index:2!important;
  display:block!important;
  margin:0!important;
  padding:0!important;
  font-size:6px!important;
  font-weight:950!important;
  line-height:1!important;
  letter-spacing:.035em!important;
  white-space:nowrap!important;
}
body.arena-battle014-active #battle014-root .b165-finale-snapshot .b166-auto-final .b158-auto-dot{
  position:absolute!important;
  right:3px!important;
  top:3px!important;
  width:4px!important;
  height:4px!important;
  border-radius:50%!important;
  background:#6c665f!important;
  box-shadow:none!important;
  animation:none!important;
}

/* Round 1 gets a dedicated crisp entrance. No blur: the new battle itself is already
   visually settling, so stacking another blur made only the first cue look muddy. */
body.arena-battle014-active #battle014-root .b165-round-cue.b166-first-round{
  animation:b166FirstRoundCue 1280ms cubic-bezier(.16,.75,.2,1) both!important;
  filter:drop-shadow(0 4px 12px rgba(0,0,0,.92))!important;
}
@keyframes b166FirstRoundCue{
  0%{opacity:0;scale:.92;translate:-50% -50%;filter:drop-shadow(0 4px 12px rgba(0,0,0,.92))}
  10%{opacity:1;scale:1.045;translate:-50% -50%;filter:drop-shadow(0 4px 12px rgba(0,0,0,.92))}
  24%{opacity:1;scale:1;translate:-50% -50%}
  78%{opacity:1;scale:1;translate:-50% -50%}
  100%{opacity:0;scale:1.025;translate:-50% -56%}
}

@media(max-width:350px){
  body.arena-battle014-active #battle014-root .b165-finale-snapshot .b166-auto-final{
    width:26px!important;min-width:26px!important;max-width:26px!important;
    height:22px!important;min-height:22px!important;max-height:22px!important;
    border-radius:6px!important;
  }
  body.arena-battle014-active #battle014-root .b165-finale-snapshot .b166-auto-final .b158-auto-label{
    font-size:5px!important;letter-spacing:0!important;
  }
}

@media(prefers-reduced-motion:reduce){
  body.arena-battle014-active #battle014-root .b165-round-cue.b166-first-round{
    animation:b166FirstRoundReduced 900ms ease both!important;
  }
  @keyframes b166FirstRoundReduced{0%,100%{opacity:0}12%,84%{opacity:1}}
}
