/* Slightly stronger Epic pulse; more frequent Legendary accents. */
.rift-card[data-rarity=epic],.prestige-hero[data-rarity=epic] {
  --rarity-peak: .9;
}
body .rift-card[data-rarity=epic]::after,
.prestige-hero[data-rarity=epic] .rift-character-info::after {
  box-shadow: inset 0 0 0 2px #ffe3a3, inset 0 0 30px rgba(var(--rarity-rgb),.45);
}
.rift-card[data-rarity=legendary],.prestige-hero[data-rarity=legendary] {
  --legendary-cycle: calc(var(--rarity-cycle) * .72);
}
body .rift-card[data-rarity=legendary]::after,
.prestige-hero[data-rarity=legendary] .rift-character-info::after,
.rift-card[data-rarity=legendary] .rarity-tag,
.prestige-hero[data-rarity=legendary] .character-rarity,
.rift-card[data-rarity=legendary] .rift-card-art > .rarity-sparks i,
.prestige-hero[data-rarity=legendary] :is(.rift-portrait-panel,.rift-character-info) > .rarity-sparks i {
  animation-duration: var(--legendary-cycle);
}
.rift-card[data-rarity=legendary] .rarity-tag,
.prestige-hero[data-rarity=legendary] .character-rarity {
  position: relative;
  overflow: hidden;
}
/* Gallery labels retain their absolute placement. */
.rift-card[data-rarity=legendary] .rarity-tag { position: absolute; }
.rift-card[data-rarity=legendary] .rarity-tag::after,
.prestige-hero[data-rarity=legendary] .character-rarity::after {
  content: '';
  position: absolute;
  inset: -30% -70%;
  pointer-events: none;
  background: linear-gradient(115deg,transparent 43%,#fff3db55 50%,transparent 57%);
  transform: translateX(-50%);
  opacity: 0;
  animation: legendary-label-shine var(--legendary-cycle) ease-in-out var(--rarity-phase) infinite;
}
@keyframes legendary-label-shine {
  0%,77% { opacity: 0; transform: translateX(-50%); }
  80% { opacity: .8; }
  86% { opacity: .8; transform: translateX(50%); }
  88%,100% { opacity: 0; transform: translateX(50%); }
}
@media(prefers-reduced-motion:reduce) {
  .rift-card[data-rarity=legendary] .rarity-tag::after,
  .prestige-hero[data-rarity=legendary] .character-rarity::after { animation: none; display: none; }
}
