/* The same live arena fills a native modal only after the purchase succeeds. */
body.opening-in-theater{overflow:hidden;overscroll-behavior:none}
.opening-theater{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#030b14;color:#f1f6fc;overflow:hidden;overscroll-behavior:none}
.opening-theater::backdrop{background:#030b14}
.theater-stage-slot{position:absolute;inset:0}
.opening-theater .arena{position:absolute;inset:0;width:100%;height:100%;min-height:0;border:0;border-radius:0;--pack-height:min(65dvh,calc(78vw / var(--pack-ratio)),620px)}
.opening-theater .arena.zoomed .pack-shell{top:50%;transform:translate(-50%,-50%)}
.opening-theater .arena .side-card{display:none}
.opening-theater .stage-platform{top:calc(50% + var(--pack-height)/2 + 25px);height:15px;width:calc(var(--pack-height)*var(--pack-ratio)*1.7)}
.opening-theater .stage-reflection{top:calc(50% + var(--pack-height)/2 + 30px)}
.opening-theater .arena.is-revealing{background:radial-gradient(ellipse at 50% 45%,#1225355c,transparent 62%),linear-gradient(145deg,#07121e,#030b14 76%)}
/* Keep rarity color local to the card; wrapper atmosphere is idle-only. */
.opening-theater .arena.is-revealing .stage-effects{display:none}
.theater-toggle{position:absolute;top:6px;right:6px;z-index:12;display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:50%;padding:11px;background:#071824c9;color:#d9eff7;cursor:pointer}
.theater-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theater-toggle:hover{background:#183346;color:#fff}
.theater-toggle .theater-contract,.opening-theater .theater-toggle .theater-expand{display:none}
.opening-theater .theater-toggle .theater-contract{display:block}
.opening-theater .stage-mute{top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left))}
.opening-theater .theater-toggle{top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right))}
.opening-theater .arena .skip-opening{bottom:max(14px,env(safe-area-inset-bottom));right:max(16px,env(safe-area-inset-right));min-height:44px;font-size:12px;z-index:11}
.opening-theater .arena .rip-helper{font-size:12px;padding:6px 12px;max-width:260px}
.opening-theater .reveal-stage{--theater-card-height:min(52dvh,calc(100dvh - 250px),calc((100vw - 80px)*1.4),500px);--theater-card-top:max(76px,calc((100% - var(--theater-card-height) - 154px)/2))}
.opening-theater .arena .reveal-art-stage{height:var(--theater-card-height);top:var(--theater-card-top);max-width:calc(100% - 80px)}
.opening-theater .arena:is(.is-extracting,.is-cycling,.is-settling,.is-flipping) .reveal-art-stage{height:var(--pack-height);top:calc((100% - var(--pack-height))/2)}
.opening-theater .arena .reveal-rarity{top:max(24px,env(safe-area-inset-top));max-width:calc(100% - 144px);font-size:12px}
.opening-theater .arena .reveal-meta{top:auto;right:auto;left:max(18px,env(safe-area-inset-left));bottom:max(20px,env(safe-area-inset-bottom));font-size:11px}
.opening-theater .arena .reveal-information{top:calc(var(--theater-card-top) + var(--theater-card-height) + 38px);bottom:auto;left:24px;right:24px;height:48px;gap:16px}
.opening-theater .arena .reveal-information h2{font-size:clamp(15px,2vw,21px);max-width:540px;max-height:48px}
.opening-theater .arena .reveal-value{font-size:18px}
.opening-theater .arena .reveal-actions{top:calc(var(--theater-card-top) + var(--theater-card-height) + 98px);bottom:auto;max-width:440px;width:calc(100% - 40px);gap:12px}
.opening-theater .arena .reveal-actions button{min-height:48px;font-size:13px}
.opening-theater .reveal-art-stage{transition:none}
@media(max-width:400px){.opening-theater .arena .reveal-information{gap:10px;left:16px;right:16px}.opening-theater .arena .reveal-value{font-size:15px}.opening-theater .arena .reveal-actions{gap:8px}.opening-theater .arena .reveal-actions button{font-size:12px;min-height:44px}}
@media(max-height:500px) and (min-width:600px){
 .opening-theater .reveal-stage{--theater-card-height:calc(100dvh - 115px);--theater-card-top:58px}
 .opening-theater .arena.is-card-revealed .reveal-art-stage{left:35%}
 .opening-theater .arena .reveal-information{left:54%;right:8%;top:calc(50% - 80px);height:100px;flex-direction:column;gap:10px}
 .opening-theater .arena .reveal-information h2{max-height:60px;text-align:center}
 .opening-theater .arena .reveal-actions{left:73%;top:calc(50% + 35px);width:34%;max-width:360px}
}
@media(prefers-reduced-motion:reduce){.opening-theater *{animation:none!important;transition:none!important}}
/* Only the card's plinth remains after the wrapper leaves. */
.opening-theater .arena.is-revealing .stage-platform,.opening-theater .arena.is-revealing .stage-reflection{display:none}
