/* UI 017.4.28 SAFE CANARY — Stage 3.5 Premium Result polish v4.
   One card entrance only: Director's Cut owns the result-surface crossfade.
   The legacy b174CardIn is disabled as soon as the premium class exists, before
   b174-ready can be applied. Internal content is prepared under Final Shot and
   then revealed once over roughly two seconds in a deterministic stagger.
   No infinite animations. */

html.arena-result0174-canary body.arena-battle014-active #battle014-root .b14-finished-card.b174-premium-victory{
  --b174p-glow:rgba(240,199,101,.34);
  --b174p-button-glow:rgba(186,67,222,.36);
  animation:none!important;
  transform:none!important;
}
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b14-finished-card.b174-premium-victory.b174-premium-defeat{
  --b174p-glow:rgba(174,86,101,.24);
  --b174p-button-glow:rgba(145,57,78,.26);
}

/* Never animate the card frame/aura itself. They enter only through the accepted
   b174V6ResultBridge on .battle014-finished. */
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-premium-victory::before,
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-premium-victory::after{
  animation:none!important;
}

/* PREP PHASE — applied while Final Shot still visually covers the Result.
   Only internal content is hidden; the card surface itself is never hidden again. */
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b14-result-mark,
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > h1,
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b174-subtitle,
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b174-rewards-title,
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b174-rewards .b174-reward,
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b174-heat,
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > p:not(.b174-source-hidden),
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b14-primary{
  opacity:0;
}

/* PLAY PHASE — same hierarchy as v3, deliberately paced to about 2.0s total. */
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play > .b14-result-mark{
  animation:b174p3MarkIn .40s .04s cubic-bezier(.14,.82,.18,1) both;
}
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play > h1{
  animation:b174p3TitleIn .40s .24s cubic-bezier(.16,.78,.18,1) both;
}
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play > .b174-subtitle{
  animation:b174p3SoftIn .36s .45s cubic-bezier(.16,.78,.18,1) both;
}
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play > .b174-rewards-title{
  animation:b174p3SoftIn .36s .66s cubic-bezier(.16,.78,.18,1) both;
}
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play > .b174-rewards .b174-reward:nth-child(1){
  animation:b174p3RewardIn .42s .88s cubic-bezier(.12,.82,.18,1) both;
}
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play > .b174-rewards .b174-reward:nth-child(2){
  animation:b174p3RewardIn .42s 1.10s cubic-bezier(.12,.82,.18,1) both;
}
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play > .b174-heat{
  animation:b174p3HeatIn .40s 1.32s cubic-bezier(.12,.82,.18,1) both;
}
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play > p:not(.b174-source-hidden){
  animation:b174p3SoftIn .36s 1.52s cubic-bezier(.16,.78,.18,1) both;
}
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play > .b14-primary{
  animation:
    b174p3ButtonIn .44s 1.60s cubic-bezier(.12,.82,.18,1) both,
    b174p3ButtonPulse .58s 1.82s ease-out both;
}

/* Local crest glint only. It never touches card opacity. */
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play .b14-result-mark::after{
  content:"";
  position:absolute;
  z-index:2;
  inset:4px 0;
  pointer-events:none;
  border-radius:34%;
  opacity:0;
  background:linear-gradient(112deg,transparent 24%,rgba(255,244,199,0) 38%,rgba(255,244,199,.70) 49%,rgba(255,244,199,0) 60%,transparent 76%);
  transform:translateX(-42%) skewX(-8deg);
  mix-blend-mode:screen;
  animation:b174p3MarkGlint .60s .28s ease-out both;
}
html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play.b174-premium-defeat .b14-result-mark::after{
  background:linear-gradient(112deg,transparent 24%,rgba(230,211,216,0) 38%,rgba(230,211,216,.42) 49%,rgba(230,211,216,0) 60%,transparent 76%);
}

@keyframes b174p3MarkIn{
  0%{opacity:0;transform:translateY(8px) scale(.94);filter:brightness(.88)}
  62%{opacity:1;transform:translateY(-1px) scale(1.018);filter:brightness(1.10)}
  100%{opacity:1;transform:translateY(0) scale(1);filter:brightness(1)}
}
@keyframes b174p3MarkGlint{
  0%{opacity:0;transform:translateX(-42%) skewX(-8deg)}
  20%{opacity:.70}
  100%{opacity:0;transform:translateX(42%) skewX(-8deg)}
}
@keyframes b174p3TitleIn{
  0%{opacity:0;transform:translateY(7px);filter:blur(1.4px) brightness(.92)}
  100%{opacity:1;transform:translateY(0);filter:blur(0) brightness(1)}
}
@keyframes b174p3SoftIn{
  0%{opacity:0;transform:translateY(5px)}
  100%{opacity:1;transform:translateY(0)}
}
@keyframes b174p3RewardIn{
  0%{opacity:0;transform:translateY(7px) scale(.985);filter:brightness(.90)}
  62%{opacity:1;transform:translateY(-1px) scale(1.004);filter:brightness(1.05)}
  100%{opacity:1;transform:translateY(0) scale(1);filter:brightness(1)}
}
@keyframes b174p3HeatIn{
  0%{opacity:0;transform:translateY(6px);filter:brightness(.90)}
  62%{opacity:1;transform:translateY(-1px);filter:brightness(1.06)}
  100%{opacity:1;transform:translateY(0);filter:brightness(1)}
}
@keyframes b174p3ButtonIn{
  0%{opacity:0;transform:translateY(8px) scale(.99)}
  65%{opacity:1;transform:translateY(-1px) scale(1.003)}
  100%{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes b174p3ButtonPulse{
  0%,100%{filter:none}
  42%{filter:brightness(1.10) drop-shadow(0 0 8px var(--b174p-button-glow))}
}

@media(prefers-reduced-motion:reduce){
  html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b14-result-mark,
  html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > h1,
  html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b174-subtitle,
  html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b174-rewards-title,
  html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b174-rewards .b174-reward,
  html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b174-heat,
  html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > p:not(.b174-source-hidden),
  html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-prep > .b14-primary{
    opacity:1!important;
    transform:none!important;
    filter:none!important;
    animation:none!important;
  }
  html.arena-result0174-canary body.arena-battle014-active #battle014-root .b174-polish-play .b14-result-mark::after{
    display:none!important;
    animation:none!important;
  }
}
