/* Quiet prestige: painted borders, rare tiny glints; no Epic sweep. */
.rift-card[data-rarity=epic]:after,.rift-card[data-rarity=legendary]:after{animation:none;box-shadow:inset 0 0 15px rgba(var(--rarity-rgb),.09)}
.rarity-sparks{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:3;border-radius:inherit;color:#ffe4a2}
[data-rarity=legendary]>.rarity-sparks,[data-rarity=legendary]>.rift-card-art>.rarity-sparks{color:#ffa4b4}
.rarity-sparks i{position:absolute;width:5px;height:5px;left:7%;top:18%;opacity:0;filter:drop-shadow(0 0 3px currentColor);animation:quiet-spark 29s ease-in-out infinite;animation-delay:-8s}
.rarity-sparks i:before,.rarity-sparks i:after{content:'';position:absolute;left:50%;top:50%;border-radius:50%;background:currentColor;transform:translate(-50%,-50%);width:1px;height:7px}
.rarity-sparks i:after{width:7px;height:1px}
.rarity-sparks i:nth-child(2){left:92%;top:65%;animation-delay:-18s}
.rarity-sparks i:nth-child(3){left:38%;top:96%;animation-delay:-25s}
[data-rarity=legendary]>.rarity-sparks i,[data-rarity=legendary]>.rift-card-art>.rarity-sparks i{width:7px;height:7px;animation-name:legend-spark;animation-duration:22s}
.rift-card:nth-child(3n+1) .rarity-sparks i{animation-delay:-5s}.rift-card:nth-child(3n+1) .rarity-sparks i:nth-child(2){animation-delay:-13s}.rift-card:nth-child(3n+1) .rarity-sparks i:nth-child(3){animation-delay:-21s}
.rift-card:nth-child(3n+2) .rarity-sparks i{animation-delay:-11s}.rift-card:nth-child(3n+2) .rarity-sparks i:nth-child(2){animation-delay:-23s}.rift-card:nth-child(3n+2) .rarity-sparks i:nth-child(3){animation-delay:-3s}
@keyframes quiet-spark{0%,87%,92%,100%{opacity:0;transform:translateY(2px) scale(.5)}89%{opacity:.52;transform:translateY(0) scale(1)}90.2%{opacity:.12}91%{opacity:.32;transform:translateY(-2px) scale(.65)}}
@keyframes legend-spark{0%,85%,91%,100%{opacity:0;transform:translateY(3px) scale(.5)}87%{opacity:.82;transform:translateY(0) scale(1.3)}88.5%{opacity:.18}90%{opacity:.55;transform:translateY(-3px) scale(.8)}}
.prestige-hero[data-rarity=epic]:before{animation:none;opacity:.55}
.prestige-hero[data-rarity=epic] .rift-portrait-panel:after{display:none;animation:none;background:none}
.profile-avatar[data-rarity=epic]:after{inset:3px;background:radial-gradient(ellipse 2px 5px at 80% 20%,#ffe4a2 20%,transparent 100%),radial-gradient(ellipse 5px 1px at 80% 20%,#ffe4a2 20%,transparent 100%);animation:quiet-spark 29s ease-in-out infinite;opacity:0}
.prestige-hero[data-rarity=legendary] .rift-portrait-panel:after{display:none;animation:none}
.profile-avatar[data-rarity=legendary]:after{animation-duration:19s}
.prestige-hero[data-rarity=epic] .rift-portrait-panel,.prestige-hero[data-rarity=legendary] .rift-portrait-panel{border:0!important;border-radius:22px;background:radial-gradient(ellipse at 50% 28%,rgba(var(--rarity-rgb),.08),#0b0e1c 80%);overflow:visible;box-shadow:none;padding:0}
.prestige-hero[data-rarity=epic] .rift-portrait-panel picture,.prestige-hero[data-rarity=legendary] .rift-portrait-panel picture{position:absolute;inset:7% 8%;width:84%;height:86%;overflow:hidden;border-radius:9px}
.rarity-frame{position:absolute;inset:0;z-index:2;background:url('./epic-frame.webp') center/100% 100% no-repeat;pointer-events:none;filter:drop-shadow(0 6px 14px #0006)}
[data-rarity=legendary]>.rarity-frame{background-image:url('./legendary-frame.webp');filter:drop-shadow(0 7px 18px #7c1e3a35)}
.prestige-hero[data-rarity=epic] .rift-character-info,.prestige-hero[data-rarity=legendary] .rift-character-info{position:relative;isolation:isolate;border-radius:20px;padding:clamp(18px,2.3vw,38px);border:1px solid rgba(var(--rarity-rgb),.25);background:linear-gradient(135deg,rgba(var(--rarity-rgb),.055),#10122288 62%,#090c1900)}
.prestige-hero[data-rarity=legendary] .rift-character-info{border-color:#d5607759;box-shadow:inset 0 1px #ffb3bf17,0 16px 60px #15091430}
.prestige-hero[data-rarity=epic] .rift-character-info:before,.prestige-hero[data-rarity=legendary] .rift-character-info:before{content:'';position:absolute;inset:10px 10px auto auto;width:clamp(100px,17vw,220px);height:240px;background:url('./concord-crest.svg') center/contain no-repeat;opacity:.045;pointer-events:none;z-index:-1}
.prestige-hero[data-rarity=legendary] .rift-character-info:before{opacity:.075;filter:sepia(.8) saturate(2)}
@media(max-width:680px){.prestige-hero[data-rarity=epic] .rift-character-info,.prestige-hero[data-rarity=legendary] .rift-character-info{padding:19px 16px}.rarity-sparks i{filter:none}.prestige-hero .rift-portrait-panel{margin-bottom:4px}.rarity-frame{filter:none!important}}
@media(prefers-reduced-motion:reduce){.rarity-sparks{display:none}.profile-avatar:after{animation:none!important;display:none!important}}
