/* A reference reconstruction. Actual back art, emblem position, results and input remain native. */
.pack-a-foil{position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;z-index:14010}
.pack-c-overlay .transaction-panel[data-phase=opening] .pack-c-sealed{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);animation:none;filter:none}
.pack-a-active .pack-result-card{transition:none;transform-origin:center}
.pack-c-overlay .pack-c-cards{overflow:visible}
.pack-c-overlay .pack-result-card{isolation:isolate}
.pack-c-overlay .pack-result-card[data-rarity=rare],.pack-c-overlay .pack-result-card[data-rarity=legendary]{box-shadow:0 7px 14px #0009}
.pack-c-overlay .pack-result-card[data-rarity=legendary].is-revealed{animation:none}
.pack-a-halo-front,.pack-a-halo-floor{position:absolute;pointer-events:none;opacity:0}
.pack-a-halo-front{inset:0;border-radius:12px;z-index:2}
.pack-a-halo-front.rare{background:radial-gradient(ellipse at 50% 48%,transparent 12%,#9b65dc32 32%,#8953cd22 70%,transparent 100%)}
.pack-a-halo-center{position:absolute;left:18%;top:27%;width:64%;height:43%;border-radius:50%;background:radial-gradient(ellipse,transparent 30%,#b583ee88 47%,#a36fed50 58%,transparent 75%);filter:blur(3px)}
.legendary .pack-a-halo-center{background:radial-gradient(ellipse,transparent 24%,#ffb900e8 39%,#ffd000ef 49%,#ff9d0066 63%,transparent 78%);filter:blur(2px);box-shadow:0 0 18px #ffa40033}
.pack-a-halo-rim{position:absolute;inset:7% 9%;border:3px solid #ffe54a;border-radius:43% / 25%;box-shadow:0 0 5px 3px #ffd000,0 0 18px 6px #ffad00cf,inset 0 0 14px #ffbf00dc}
.pack-a-halo-ornament{position:absolute;inset:0;background-size:100% 100%;border-radius:12px;filter:sepia(1) saturate(6) brightness(2.5);mix-blend-mode:screen;mask-image:linear-gradient(#000 0 13%,transparent 21% 78%,#000 88%),linear-gradient(to right,#000 0 9%,transparent 16% 84%,#000 92%);opacity:.95}
.pack-a-halo-floor{z-index:-1;left:-29%;width:158%;height:17%;bottom:-9%;border-radius:50%;box-sizing:border-box;border:4px solid #ffe34b;background:radial-gradient(ellipse,#ffad0022 24%,#ffc00077 52%,#ffd600bb 67%,transparent 74%);box-shadow:0 0 7px 4px #ffcd00,inset 0 0 12px #ffbd00,0 0 25px 6px #ffad0099;filter:blur(.45px)}
.pack-result-card.is-revealed .pack-a-halo-front,.pack-result-card.is-revealed .pack-a-halo-floor{visibility:hidden}
@media(max-width:1150px){.pack-c-overlay .pack-c-cards{justify-content:center;gap:clamp(4px,1vw,12px);padding-left:0;padding-right:0}.pack-c-overlay .pack-result-card{flex:0 0 calc((100% - 48px)/5);width:calc((100% - 48px)/5);min-height:0}.pack-a-halo-rim{border-width:1px}.pack-a-halo-floor{border-width:2px}}

/* Short landscape screens keep all five cards and native controls in view. */
@media (min-width:600px) and (max-height:500px){
 .pack-c-overlay .transaction-panel{padding:10px 16px;}
 .pack-c-overlay .transaction-back{position:absolute;left:12px;top:8px;margin:0;padding:5px 10px;font-size:14px!important;}
 .pack-c-overlay .transaction-title{font-size:24px;line-height:1.2;margin:0 0 4px;}
 .pack-c-overlay .transaction-status{font-size:13px;line-height:18px;min-height:18px;margin:0 0 4px;}
 .pack-c-overlay .pack-c-stage{height:calc(100dvh - 194px);min-height:100px;grid-template-rows:minmax(0,1fr);}
 .pack-c-overlay .pack-c-cards{height:100%;padding:8px 0 22px;gap:12px;}
 .pack-c-overlay .pack-result-card{flex:0 0 auto;width:auto;height:min(100%,calc(30vw - 39.6px));min-height:0;aspect-ratio:2/3;}
 .pack-c-overlay .pack-c-sealed{width:auto;height:80%;margin:0;}
 .pack-c-overlay .shared-sealed-pack{height:100%;width:auto;}
 .pack-c-overlay .pack-c-instruction{font-size:13px;line-height:18px;margin:4px 0;}
 .pack-c-overlay .transaction-actions button{min-height:44px;padding:6px 22px;}
}

/* Decorative scenery must never intercept native card or close controls. */
.pack-c-overlay .pack-pillar,.pack-c-overlay .pack-c-rune,.pack-c-overlay .pack-c-altar{pointer-events:none}

/* Source-frame restoration: glow remains behind the unchanged native emblem. */
.pack-a-halo-center{left:17%;top:25%;width:66%;height:46%;background:radial-gradient(ellipse,#a777ddaa 0%,#a777dd88 34%,#9660d64d 52%,transparent 76%);filter:blur(3px)}
.legendary .pack-a-halo-center{background:radial-gradient(ellipse,#fff2aaff 0%,#ffe258fa 31%,#ffd329ed 45%,#ffa9157d 60%,transparent 77%);filter:blur(3px);box-shadow:none}
.pack-a-halo-emblem{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:fill!important;clip-path:ellipse(24% 18% at 50% 48%);z-index:4!important;border:0!important;border-radius:0!important;pointer-events:none}
.pack-a-halo-rim{inset:5% 7%;border:3px solid #fff3a0;border-radius:43% / 18%;box-shadow:0 0 4px 2px #ffe957,0 0 14px 5px #ffc12ac9,inset 0 0 10px #ffe03ad9}
.pack-a-halo-ornament{filter:sepia(1) saturate(3) brightness(2);opacity:.55}
.pack-a-halo-floor{left:-21%;width:142%;height:10%;bottom:-10%;border:3px solid #fff5a0;background:radial-gradient(ellipse,#ffc84d70 20%,#ffe35799 55%,#fff4b1cc 69%,transparent 76%);box-shadow:0 0 6px 3px #ffe764,inset 0 0 9px #fff294,0 0 18px 6px #ffbf35bb;filter:blur(.35px)}
.pack-a-halo-floor::after{content:'';position:absolute;inset:1px 4%;border:2px solid #fff0a3;border-radius:50%;box-shadow:0 0 4px #fff0a3}
@media(max-width:1150px){.pack-a-halo-rim{border-width:1.5px}.pack-a-halo-floor,.pack-a-halo-floor::after{border-width:1px}}

.pack-a-halo-emblem{clip-path:none;mask-image:radial-gradient(ellipse 24% 18% at 50% 48%,#000 65%,#0009 80%,transparent 100%)}

.pack-a-halo-emblem{clip-path:none;mask-image:radial-gradient(ellipse 24% 18% at 50% 48%,#000 65%,#0009 80%,transparent 100%)}

/* Revision 1: selected source 1.5s, broad filled light behind the emblem,
   thick elongated inner rim and distinct double floor light. */
.pack-a-halo-front.legendary .pack-a-halo-center{left:9%;top:20%;width:82%;height:57%;background:radial-gradient(ellipse,#fff6ae 0%,#ffe85b 38%,#ffcf20ed 51%,#ffb21e9c 65%,transparent 80%);filter:blur(calc(var(--glow-unit,1px)*3));box-shadow:none}
.pack-a-halo-front .pack-a-halo-emblem{mask-image:none;clip-path:polygon(49% 31%,58% 34%,61% 38%,69% 41%,73% 47%,69% 54%,61% 59%,55% 63%,49% 65%,43% 61%,35% 57%,29% 51%,27% 45%,32% 39%,41% 35%);}
.pack-a-halo-front.legendary .pack-a-halo-rim{inset:5% 7%;border:calc(var(--glow-unit,1px)*5) solid #fff9aa;border-radius:43% / 18%;box-shadow:0 0 calc(var(--glow-unit,1px)*5) calc(var(--glow-unit,1px)*3) #ffe63a,0 0 calc(var(--glow-unit,1px)*19) calc(var(--glow-unit,1px)*7) #ffc426d9,inset 0 0 calc(var(--glow-unit,1px)*14) #ffe444}
.pack-a-halo-front.legendary .pack-a-halo-ornament{filter:sepia(1) saturate(4) brightness(2.7);opacity:.84}
.pack-c-overlay .pack-a-halo-floor{left:-22%;width:144%;height:11%;bottom:-10%;border:calc(var(--glow-unit,1px)*5) solid #fff8b7;background:radial-gradient(ellipse,#ffd4448f 12%,#ffd53fac 47%,#fff29ddb 63%,transparent 76%);box-shadow:0 0 calc(var(--glow-unit,1px)*6) calc(var(--glow-unit,1px)*4) #ffe448,inset 0 0 calc(var(--glow-unit,1px)*10) #fff383,0 0 calc(var(--glow-unit,1px)*22) calc(var(--glow-unit,1px)*6) #ffb82fbb;filter:blur(calc(var(--glow-unit,1px)*.3))}
.pack-c-overlay .pack-a-halo-floor::after{inset:calc(var(--glow-unit,1px)*1) 4%;border:calc(var(--glow-unit,1px)*3) solid #fff7b2;box-shadow:0 0 calc(var(--glow-unit,1px)*4) #fff099}

/* Preserve the complete native emblem with feathered lobes, not a hard polygon. */
.pack-a-halo-front .pack-a-halo-emblem{clip-path:none;mask-image:radial-gradient(ellipse 17% 14% at 50% 49%,#000 78%,transparent 100%),radial-gradient(ellipse 8% 7% at 50% 36%,#000 80%,transparent 100%),radial-gradient(ellipse 8% 8% at 37% 43%,#000 80%,transparent 100%),radial-gradient(ellipse 9% 8% at 64% 43%,#000 80%,transparent 100%),radial-gradient(ellipse 9% 8% at 39% 55%,#000 80%,transparent 100%),radial-gradient(ellipse 9% 8% at 61% 55%,#000 80%,transparent 100%),radial-gradient(ellipse 8% 7% at 50% 59%,#000 80%,transparent 100%)}

.pack-c-overlay .pack-a-halo-floor{border-width:calc(var(--glow-unit,1px)*7.5)}
.pack-c-overlay .pack-a-halo-floor::after{border-width:calc(var(--glow-unit,1px)*4)}

/* v0.412 candidate: selected rare circular halo, behind original emblem. */
.pack-a-halo-front.rare{background:radial-gradient(ellipse at 50% 48%,transparent 12%,#9b65dc29 32%,#8953cd1c 70%,transparent 100%)}
.pack-a-halo-front.rare .pack-a-halo-center{left:22%;top:30.333333%;width:56%;height:37.333333%;background:radial-gradient(ellipse,transparent 27%,rgba(181,130,246,.43) 42%,rgba(162,112,230,.43) 55%,rgba(134,75,190,.2322) 68%,transparent 82%);filter:blur(calc(var(--glow-unit,1px)*2))}

/* Latest user direction: rare glow reaches the full card rim; no text or floor. */
.pack-a-halo-front.rare{box-shadow:inset 0 0 calc(var(--glow-unit,1px)*8) #b876e8a6,0 0 calc(var(--glow-unit,1px)*10) #934fce75}
.pack-a-halo-front.rare::before{content:'';position:absolute;inset:1%;border:calc(var(--glow-unit,1px)*2.4) solid #c399e8;border-radius:calc(var(--glow-unit,1px)*11);box-shadow:0 0 calc(var(--glow-unit,1px)*5) #a25ae4,inset 0 0 calc(var(--glow-unit,1px)*6) #a25ae4;pointer-events:none}
.pack-a-halo-front.rare::after{content:'';position:absolute;inset:0;background:url('../assets/img/hud/back.png') center/100% 100%;filter:sepia(1) saturate(3) hue-rotate(215deg) brightness(1.5);opacity:.72;mix-blend-mode:screen;mask-image:linear-gradient(#000 0 7%,transparent 14% 86%,#000 94%),linear-gradient(to right,#000 0 6%,transparent 12% 88%,#000 95%);pointer-events:none}
