#chestOpening{z-index:90;padding:24px;background:#050d19d9;backdrop-filter:none;touch-action:pan-y}
#chestOpening .chest-panel{width:min(660px,94vw);max-height:calc(100dvh - 48px);padding:28px;border:2px solid #6889a2;background:#0c2138;color:#e9f4fc;box-shadow:inset 0 0 0 3px #173852,6px 7px 0 #040a12!important;overflow:auto;text-align:center}
#chestOpening .chest-panel:before{height:3px;background:#d2ac61;left:14px;right:14px;top:8px}
#chestOpening .chest-eyebrow{margin:0 0 8px;color:#b3ccdc;font-size:12px;letter-spacing:1px}
#chestOpening h2{margin:0;color:#ffdfa0;font-size:30px;text-shadow:2px 2px #030b16}
.chest-showcase{position:relative;display:grid;place-items:center;height:188px;margin:12px auto;overflow:hidden;background:radial-gradient(ellipse,#8c623322,transparent 66%)}
.chest-rays{position:absolute;width:300px;height:300px;background:repeating-conic-gradient(from 0deg,#f4c4661a 0deg 10deg,transparent 10deg 30deg);mask-image:radial-gradient(circle,#000 20%,transparent 68%);animation:chestRays 10s linear infinite;pointer-events:none}
.chest-emblem{position:relative;z-index:1;width:100px;height:100px;display:grid;place-items:center;margin-bottom:34px;image-rendering:pixelated}
.chest-emblem .passive-pixel-art{display:block;width:96px;height:96px}
.chest-rolling .chest-emblem{animation:chestBounce .45s steps(3,end) infinite}
.chest-reel{position:absolute;bottom:8px;left:0;display:flex;gap:16px;width:max-content;animation:chestReel 1s linear infinite}
.chest-reel>span{display:grid;place-items:center;width:56px;height:56px;border:1px solid #3a5670;background:#102941}
.chest-reel .weapon-pixel-art,.chest-reel .passive-pixel-art{width:42px;height:42px;display:block}
.chest-ready .chest-emblem{transform:scale(1.1)}
.chest-ready .chest-reel{opacity:.18;animation:none}
#chestOpening .chest-status{margin:6px 0 14px;color:#bcdfec;font-size:14px;letter-spacing:0}
.chest-rewards{display:grid;gap:8px;list-style:none;margin:0;padding:0;text-align:left}
.chest-reward{display:grid;grid-template-columns:48px minmax(0,1fr) 36px;gap:12px;align-items:center;min-height:66px;padding:8px 12px;border:1px solid #65768b;background:#18344d;animation:chestRewardIn .23s steps(4,end) both}
.chest-reward-icon{display:grid;place-items:center;width:44px;height:44px}
.chest-reward-icon .weapon-pixel-art,.chest-reward-icon .passive-pixel-art{display:block;width:44px;height:44px}
.chest-reward b{display:block;color:#f3f8fd;font-size:15px;overflow-wrap:anywhere}
.chest-reward small{display:block;margin-top:4px;color:#bad1df;font-size:12px}
.chest-reward>strong{color:#ffda82;font-size:21px;text-align:right}
.chest-actions{display:flex;justify-content:center;gap:12px;margin-top:20px}
#chestOpening .chest-actions button{min-width:140px;min-height:48px;margin:0;padding:12px 16px}
#chestOpening .primary{background:#f2c569;color:#182a39;border:2px solid #ffe2a0}
#chestOpening .secondary{background:#142d46;color:#dcebf6;border:2px solid #6488a4}
#chestOpening button:disabled{opacity:.5;cursor:wait}
#chestOpening button:focus-visible{outline:3px solid #a0e5ff;outline-offset:3px}
#chestOpening .chest-help{display:block;margin-top:14px;color:#90aec6;font-size:11px}
#chestOpening [hidden]{display:none!important}
@keyframes chestReel{to{transform:translateX(-144px)}}
@keyframes chestBounce{0%,100%{transform:translateY(2px) rotate(-3deg)}50%{transform:translateY(-6px) rotate(3deg)}}
@keyframes chestRays{to{transform:rotate(360deg)}}
@keyframes chestRewardIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:560px){#chestOpening{padding:calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom))}#chestOpening .chest-panel{width:100%;max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:20px 14px}#chestOpening h2{font-size:26px}.chest-showcase{height:140px;margin:6px 0}.chest-emblem{margin-bottom:36px}.chest-emblem .passive-pixel-art{width:76px;height:76px}.chest-reward{gap:8px;min-height:58px;padding:7px 9px;grid-template-columns:40px minmax(0,1fr) 28px}.chest-reward-icon,.chest-reward-icon .weapon-pixel-art,.chest-reward-icon .passive-pixel-art{width:38px;height:38px}.chest-reward b{font-size:14px}.chest-actions{gap:8px;margin-top:14px}#chestOpening .chest-actions button{min-width:0;flex:1}#chestOpening .chest-help{font-size:10px}}
@media(prefers-reduced-motion:reduce){#chestOpening .modal-panel,.chest-rays,.chest-emblem,.chest-reel,.chest-reward{animation:none!important;transition:none!important}.chest-rays{opacity:.25}}
