/* Reusable item rarity frames. Tokens are shared by Store, Inventory and details. */
.ph8630-rarity{--rank:#94a3b8;--rarity:var(--rank)}
.ph8630-rarity[data-rarity=common]{--rank:#94a3b8;--rarity:var(--rank)}
.ph8630-rarity[data-rarity=rare]{--rank:#4da9ff;--rarity:var(--rank)}
.ph8630-rarity[data-rarity=epic]{--rank:#b38aff;--rarity:var(--rank)}
.ph8630-rarity[data-rarity=legendary]{--rank:#f5c35b;--rarity:var(--rank)}
.ph8630-rarity[data-rarity=mythic]{--rank:#f47691;--rarity:var(--rank)}
.ph8630-item-frame{--frame-size:88px;position:relative;isolation:isolate;display:grid;place-items:center;width:var(--frame-size);height:var(--frame-size);flex:none;box-sizing:border-box;overflow:hidden;border:2px solid var(--rank);border-radius:8px;background:radial-gradient(ellipse at 40% 20%,color-mix(in srgb,var(--rank) 19%,#142332),#09131f 85%);box-shadow:inset 0 0 0 2px #050d17,inset 0 0 18px color-mix(in srgb,var(--rank) 12%,transparent),0 0 9px color-mix(in srgb,var(--rank) 16%,transparent)}
.ph8630-item-frame::before,.ph8630-item-frame::after{content:"";position:absolute;pointer-events:none;z-index:2}
.ph8630-item-frame::before{inset:4px;border:1px solid color-mix(in srgb,var(--rank) 75%,transparent);opacity:.7;clip-path:polygon(0 0,20% 0,20% 2%,2% 2%,2% 20%,0 20%,0 0,100% 0,100% 20%,98% 20%,98% 2%,80% 2%,80% 0,100% 0,100% 100%,80% 100%,80% 98%,98% 98%,98% 80%,100% 80%,100% 100%,0 100%,0 80%,2% 80%,2% 98%,20% 98%,20% 100%,0 100%)}
.ph8630-item-frame::after{inset:-35%;background:linear-gradient(115deg,transparent 40%,color-mix(in srgb,var(--rank) 45%,transparent) 48%,#fff8 50%,transparent 58%);transform:translateX(-90%);opacity:0}
.ph8630-item-frame>img{display:block;width:83%;height:83%;object-fit:contain;position:relative;z-index:1}
.ph8630-item-frame>span{position:relative;z-index:1;font-size:40px;color:var(--rank)}
.ph8630-item-frame[data-rarity=common]::before{opacity:.3}
.ph8630-item-frame[data-rarity=epic]{border-style:double;border-width:3px}
.ph8630-item-frame[data-rarity=legendary],.ph8630-item-frame[data-rarity=mythic]{border-width:3px;box-shadow:inset 0 0 0 2px #050d17,inset 0 0 20px color-mix(in srgb,var(--rank) 16%,transparent),0 0 12px color-mix(in srgb,var(--rank) 25%,transparent)}
.ph8630-item-frame[data-rarity=mythic]::before{inset:3px;border-width:2px}
.ph8630-item-frame.is-animated::before{animation:ph8630-rune 3.8s ease-in-out infinite}
.ph8630-item-frame.is-animated::after{animation:ph8630-glint 7s ease-in-out infinite}
.ph8630-item-frame[data-rarity=legendary].is-animated::after{animation-duration:5.8s}
.ph8630-item-frame[data-rarity=mythic].is-animated::after{animation-duration:4.8s}
.ph8630-item-frame--detail{--frame-size:96px;margin:0 auto 20px}
.ph8630-item-frame--showcase{--frame-size:240px;border-radius:16px}
.ph8630-item-frame--mini{--frame-size:48px;border-radius:6px}
/* Native inventory slot geometry is retained; the frame surrounds the whole slot. */
html body .ph8600-item-slot.ph8630-item-frame--slot{width:100%;height:auto;min-width:0;display:flex;aspect-ratio:1;padding:6px;border-color:var(--rank);background:radial-gradient(ellipse at 40% 20%,color-mix(in srgb,var(--rank) 19%,#142332),#09131f 85%)}
html body .ph8600-item-slot.ph8630-item-frame--slot:hover{border-color:var(--rank);background:radial-gradient(ellipse at 40% 20%,color-mix(in srgb,var(--rank) 25%,#142332),#09131f 85%)}
html body .ph8630-item-frame--slot .ph8600-slot-icon{width:55%;height:auto;aspect-ratio:1;min-width:0;display:grid;place-items:center;position:relative;z-index:1}
html body .ph8630-item-frame--slot .ph8600-slot-name{max-width:100%;margin-top:4px;position:relative;z-index:3}
html body .ph8630-item-frame--slot>b{z-index:3}
@keyframes ph8630-rune{0%,100%{opacity:.38}50%{opacity:1}}
@keyframes ph8630-glint{0%,62%{transform:translateX(-90%);opacity:0}66%{opacity:.6}84%{transform:translateX(90%);opacity:0}100%{transform:translateX(90%);opacity:0}}
@media(max-width:680px){.ph8630-item-frame--showcase{--frame-size:200px}}
@media(prefers-reduced-motion:reduce){.ph8630-item-frame::before,.ph8630-item-frame::after{animation:none!important}.ph8630-item-frame::after{display:none}}
