/* UI 017.3A.5.2 — premium HP drain, bar-only.
   Visual presentation only. No combat, AUTO, hand-tabs, cards or fighter transforms. */

body.arena-battle014-active #battle014-root.b173a5-hp-owned .b14-health>i{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.05),rgba(0,0,0,.18)),
    rgba(7,7,13,.96)!important;
  border:1px solid rgba(255,255,255,.075)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(0,0,0,.52),
    0 0 0 1px rgba(0,0,0,.22)!important;
}

body.arena-battle014-active #battle014-root.b173a5-hp-owned .b14-health>i em{
  overflow:visible!important;
  will-change:width!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.32),rgba(255,255,255,.03) 43%,rgba(0,0,0,.08) 100%),
    linear-gradient(90deg,#ae1739 0%,#e92f56 56%,#ff6f88 100%)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    inset 0 -1px 0 rgba(83,0,20,.46),
    0 0 8px rgba(245,52,91,.34)!important;
}

body.arena-battle014-active #battle014-root.b173a5-hp-owned .b14-health-enemy>i em{
  background:
    linear-gradient(180deg,rgba(255,255,255,.30),rgba(255,255,255,.03) 43%,rgba(0,0,0,.09) 100%),
    linear-gradient(90deg,#672895 0%,#a13ecb 55%,#df73fa 100%)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.31),
    inset 0 -1px 0 rgba(39,4,64,.50),
    0 0 8px rgba(185,70,230,.34)!important;
}

/* Bright moving edge on the actual remaining HP. */
body.arena-battle014-active #battle014-root.b173a5-hp-owned .b14-health>i em::after{
  content:"";
  position:absolute;
  z-index:12;
  top:-1px;
  right:-3px;
  bottom:-1px;
  width:10px;
  border-radius:50%;
  pointer-events:none;
  opacity:.92;
  background:radial-gradient(ellipse at center,rgba(255,255,255,1) 0 18%,rgba(255,196,205,.92) 27%,rgba(255,78,111,.38) 56%,transparent 76%);
  filter:blur(.15px);
  box-shadow:0 0 5px rgba(255,255,255,.84),0 0 10px rgba(255,80,113,.80),0 0 18px rgba(255,66,101,.42);
}
body.arena-battle014-active #battle014-root.b173a5-hp-owned .b14-health-enemy>i em::after{
  background:radial-gradient(ellipse at center,rgba(255,255,255,1) 0 18%,rgba(245,209,255,.94) 27%,rgba(207,92,255,.40) 56%,transparent 76%);
  box-shadow:0 0 5px rgba(255,255,255,.86),0 0 10px rgba(218,116,255,.86),0 0 18px rgba(189,72,241,.44);
}

/* Lost HP remains as a clearly visible luminous residue, then burns away. */
body.arena-battle014-active #battle014-root .b173a51-loss-ghost{
  position:absolute!important;
  z-index:20!important;
  top:0!important;
  bottom:0!important;
  left:var(--b173a51-loss-left,0%)!important;
  width:var(--b173a51-loss-width,0%)!important;
  min-width:14px!important;
  overflow:hidden!important;
  border-radius:4px!important;
  pointer-events:none!important;
  opacity:0;
  transform-origin:left center;
  transform:scaleX(1);
  background:linear-gradient(90deg,#fff1df 0%,#ffb48f 20%,#ff745f 58%,#ff3e59 100%);
  box-shadow:inset 0 0 5px rgba(255,255,255,.92),0 0 8px rgba(255,111,78,.96),0 0 16px rgba(255,55,83,.56);
  mix-blend-mode:screen;
}
body.arena-battle014-active #battle014-root .b173a51-loss-ghost.is-enemy{
  background:linear-gradient(90deg,#fff2ff 0%,#edb8ff 20%,#d471ff 58%,#9b35dc 100%);
  box-shadow:inset 0 0 5px rgba(255,255,255,.90),0 0 8px rgba(219,111,255,.98),0 0 16px rgba(177,55,231,.58);
}
body.arena-battle014-active #battle014-root .b173a51-loss-ghost.is-crit{
  background:linear-gradient(90deg,#ffffff 0%,#fff3b4 20%,#ffd35d 55%,#ff7358 100%);
  box-shadow:inset 0 0 6px rgba(255,255,255,1),0 0 10px rgba(255,222,104,1),0 0 20px rgba(255,118,65,.72);
}
body.arena-battle014-active #battle014-root .b173a51-loss-ghost.is-counter{
  background:linear-gradient(90deg,#ffffff 0%,#c9f7ff 20%,#72ddff 56%,#5c91ff 100%);
  box-shadow:inset 0 0 6px rgba(255,255,255,.98),0 0 10px rgba(101,219,255,.96),0 0 19px rgba(91,142,255,.60);
}
body.arena-battle014-active #battle014-root .b173a51-loss-ghost>i{
  position:absolute;
  inset:-2px -8px;
  pointer-events:none;
  opacity:0;
  background:linear-gradient(105deg,transparent 0 28%,rgba(255,255,255,1) 43%,rgba(255,255,255,.18) 50%,transparent 65% 100%);
  transform:translateX(-135%);
}
body.arena-battle014-active #battle014-root .b173a51-loss-ghost.is-live{
  animation:b173a52LossBurn 1.02s cubic-bezier(.16,.82,.22,1) both!important;
}
body.arena-battle014-active #battle014-root .b173a51-loss-ghost.is-live>i{
  animation:b173a52LossSweep .62s cubic-bezier(.16,.76,.22,1) both!important;
}

/* A strong contact flare sits exactly at the new HP boundary. */
body.arena-battle014-active #battle014-root .b173a51-edge-spark{
  position:absolute!important;
  z-index:24!important;
  left:var(--b173a51-edge-left,0%)!important;
  top:0!important;
  bottom:0!important;
  width:12px!important;
  margin-left:-6px!important;
  border-radius:50%!important;
  pointer-events:none!important;
  opacity:0;
  transform:scaleX(.45);
  background:radial-gradient(ellipse at center,#fff 0 18%,#ffc0c8 28%,rgba(255,68,103,.72) 47%,transparent 75%);
  filter:blur(.1px);
  box-shadow:0 0 6px rgba(255,255,255,.98),0 0 12px rgba(255,79,109,.98),0 0 22px rgba(255,58,94,.64);
}
body.arena-battle014-active #battle014-root .b173a51-edge-spark.is-enemy{
  background:radial-gradient(ellipse at center,#fff 0 18%,#f3c8ff 28%,rgba(210,93,255,.76) 47%,transparent 75%);
  box-shadow:0 0 6px rgba(255,255,255,.98),0 0 12px rgba(218,116,255,1),0 0 22px rgba(182,66,238,.66);
}
body.arena-battle014-active #battle014-root .b173a51-edge-spark.is-crit{
  background:radial-gradient(ellipse at center,#fff 0 16%,#fff2a8 29%,rgba(255,205,77,.82) 48%,transparent 75%);
  box-shadow:0 0 7px #fff,0 0 14px rgba(255,224,104,1),0 0 24px rgba(255,126,56,.72);
}
body.arena-battle014-active #battle014-root .b173a51-edge-spark.is-live{
  animation:b173a52EdgeFlash .78s cubic-bezier(.18,.8,.2,1) both!important;
}

/* Only the bar glows on impact; cards and labels never move or animate. */
body.arena-battle014-active #battle014-root .b14-health>i.b173a51-bar-live{
  animation:b173a52BarPulse .78s ease-out both!important;
}
body.arena-battle014-active #battle014-root .b14-health>i.b173a51-bar-live em::after{
  animation:b173a52EdgeRide .72s ease-out both!important;
}

@keyframes b173a52LossBurn{
  0%{opacity:1;filter:brightness(1.85) saturate(1.2);transform:scaleX(1)}
  22%{opacity:1;filter:brightness(1.48) saturate(1.15);transform:scaleX(1)}
  58%{opacity:.72;filter:brightness(1.16) saturate(1.02);transform:scaleX(.72)}
  100%{opacity:0;filter:brightness(.92) saturate(.92);transform:scaleX(.05)}
}
@keyframes b173a52LossSweep{
  0%{opacity:0;transform:translateX(-135%)}
  12%{opacity:1}
  72%{opacity:.95}
  100%{opacity:0;transform:translateX(165%)}
}
@keyframes b173a52EdgeFlash{
  0%{opacity:0;transform:scaleX(.35);filter:brightness(1.2)}
  14%{opacity:1;transform:scaleX(1.35);filter:brightness(1.9)}
  42%{opacity:.92;transform:scaleX(.9);filter:brightness(1.45)}
  100%{opacity:0;transform:scaleX(.28);filter:brightness(1)}
}
@keyframes b173a52BarPulse{
  0%{filter:brightness(1) saturate(1)}
  16%{filter:brightness(1.28) saturate(1.18)}
  48%{filter:brightness(1.11) saturate(1.08)}
  100%{filter:brightness(1) saturate(1)}
}
@keyframes b173a52EdgeRide{
  0%{opacity:1;filter:blur(.05px) brightness(2)}
  38%{opacity:1;filter:blur(.12px) brightness(1.55)}
  100%{opacity:.88;filter:blur(.18px) brightness(1.12)}
}

/* Keep HP feedback visible even when iOS/Safari reports reduced motion.
   This layer only animates light/opacity inside the HP track and never moves controls. */
@media(prefers-reduced-motion:reduce){
  body.arena-battle014-active #battle014-root .b173a51-loss-ghost.is-live{
    animation:b173a52LossBurn .88s ease-out both!important;
  }
  body.arena-battle014-active #battle014-root .b173a51-loss-ghost.is-live>i{
    animation:b173a52LossSweep .52s ease-out both!important;
  }
  body.arena-battle014-active #battle014-root .b173a51-edge-spark.is-live{
    animation:b173a52EdgeFlash .62s ease-out both!important;
  }
  body.arena-battle014-active #battle014-root .b14-health>i.b173a51-bar-live{
    animation:b173a52BarPulse .62s ease-out both!important;
  }
}
