.mystery-chest{color-scheme:dark;box-sizing:border-box;width:min(92vw,420px);max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));margin:auto;padding:1px;overflow:auto;border:1px solid #c69c51;border-radius:26px;background:linear-gradient(145deg,#233757,#0a1328 60%);color:#f9edcf;box-shadow:0 28px 90px #0009,0 0 0 5px #b48a3512;font-family:inherit;isolation:isolate}
.mystery-chest::backdrop{background:#030916d9}
.mystery-chest [hidden]{display:none!important}
.mch-shell{position:relative;padding:29px 25px 19px;text-align:center;background:radial-gradient(ellipse at 50% 29%,#334a6938,transparent 65%)}
.mch-shell header{padding:0 12px}.mch-eyebrow{display:block;margin:4px 0 14px;color:#d9b56e;font-size:9px;letter-spacing:.17em;font-weight:800}.mch-shell h2{margin:0;color:#fff1cf;font-size:29px;line-height:1.22;letter-spacing:-.025em}.mch-caption{margin:8px 0 0;color:#b2bfd5;font-size:12px;line-height:1.5}
.mystery-chest button{font:inherit;cursor:pointer;touch-action:manipulation}.mystery-chest button:focus-visible{outline:3px solid #fff2c8;outline-offset:3px}.mystery-chest button:disabled{cursor:wait;opacity:.65}.mch-close{position:absolute;right:8px;top:8px;display:grid;place-items:center;width:38px;height:38px;min-height:38px;padding:0;border:0;border-radius:50%;background:transparent;color:#c3cde0;font-size:25px!important;line-height:1;box-shadow:none}
.mch-stage{position:relative;height:222px;display:grid;place-items:center;margin:3px 0 0;contain:layout style}.mch-chest{position:relative;width:min(100%,286px);height:220px;z-index:2;overflow:visible;transform:translateY(0);transform-origin:center 75%}.mch-lid,.mch-lock{transform-box:fill-box;transform-origin:center 90%}.mch-light{opacity:0}.mch-halo{position:absolute;width:192px;height:192px;left:50%;top:50%;border-radius:50%;transform:translate(-50%,-50%);border:1px solid #d7b56328;background:radial-gradient(circle,#f1cf7825,transparent 66%);box-shadow:0 0 0 18px #d7b56304,0 0 0 19px #d7b5630c}.mch-rays{position:absolute;inset:10px 20px;background:repeating-conic-gradient(from 15deg at 50% 58%,transparent 0deg 22deg,#f4d58a25 24deg 29deg,transparent 32deg 45deg);opacity:0;border-radius:50%;transform:scale(.65)}
.mch-particles{position:absolute;inset:0;z-index:3;pointer-events:none}.mch-particles i{position:absolute;left:50%;top:53%;width:4px;height:4px;border-radius:1px;background:#ffe3a0;box-shadow:0 0 7px #f7cc69;opacity:0}
.mch-status{min-height:40px;display:grid;place-content:center;margin:8px 0 13px;color:#d9e2f1;font-size:13px;line-height:1.55;overflow-wrap:anywhere}.mch-actions{display:grid;gap:8px}.mch-primary,.mch-skip{min-height:44px;width:100%;border-radius:13px;padding:11px 17px;font-weight:750!important;font-size:13px!important;line-height:1.5;box-shadow:none}.mch-primary{border:1px solid #f0ce83;background:linear-gradient(135deg,#f9dfa0,#c79542);color:#231b0c}.mch-skip{border:1px solid #9faec334;background:#ffffff04;color:#dce5f4}.mch-assurance{margin:13px 0 0;color:#9eacc5;font-size:10px;line-height:1.6}
.mch-result{display:flex;align-items:center;justify-content:center;gap:16px;min-height:94px;padding:15px 17px;margin:0 0 10px;border:1px solid #d5af636b;border-radius:17px;background:linear-gradient(120deg,#b88c3024,#14243f 70%);box-shadow:inset 0 1px #f4d68c17;text-align:left;overflow-wrap:anywhere}.mch-reward-icon{flex:0 0 auto;display:grid;place-items:center;width:58px;height:58px;border:1px solid #f1cd783b;border-radius:16px;background:#f1cd7810;font-size:33px}.mch-reward-eyebrow{display:block;color:#d6b677;font-size:8px;font-weight:800;letter-spacing:.12em}.mch-result h3{margin:5px 0 1px;color:#fff1ce;font-size:17px;line-height:1.3}.mch-result strong{color:#f3d68f;font-size:27px;font-weight:850;line-height:1.2}
.mystery-chest[data-phase=pending] .mch-halo{animation:mch-await 1.8s ease-in-out infinite}.mystery-chest[data-phase=opening] .mch-chest{animation:mch-shake .65s ease-in-out both}.mystery-chest[data-phase=opening] .mch-lock{animation:mch-unlock .4s .55s ease-in both}.mystery-chest[data-phase=opening] .mch-lid{animation:mch-lift 1s .8s cubic-bezier(.2,.7,.2,1) both}.mystery-chest[data-phase=opening] .mch-light{animation:mch-light 1s .95s ease both}.mystery-chest[data-phase=opening] .mch-rays{animation:mch-rays 1.4s .95s ease both}.mystery-chest[data-phase=opening] .mch-particles i{animation:mch-spark 1.2s calc(1.05s + var(--delay)) ease-out both}.mystery-chest[data-phase=reward] .mch-lid{transform:translate(0,-48px) rotate(-8deg);opacity:.7}.mystery-chest[data-phase=reward] .mch-lock{opacity:0}.mystery-chest[data-phase=reward] .mch-light{opacity:.65}.mystery-chest[data-phase=reward] .mch-result{animation:mch-card .35s ease-out both}.mystery-chest[data-phase=reward] .mch-stage{height:160px}.mystery-chest[data-phase=reward] .mch-chest{height:160px;width:218px}.mystery-chest[data-phase=reward] .mch-halo{width:150px;height:150px}.mystery-chest[data-phase=reward] .mch-status{color:#e5d5a8;min-height:24px;font-weight:700}
.mystery-chest[data-phase=uncertain] .mch-status,.mystery-chest[data-phase=error] .mch-status{color:#f4cbb2}
@keyframes mch-await{50%{opacity:.45}}
@keyframes mch-shake{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-2deg)}40%,80%{transform:rotate(2deg)}}
@keyframes mch-unlock{to{transform:translateY(16px) rotate(14deg);opacity:0}}
@keyframes mch-lift{to{transform:translateY(-48px) rotate(-8deg);opacity:.7}}
@keyframes mch-light{to{opacity:.8}}
@keyframes mch-rays{to{transform:scale(1.1) rotate(12deg);opacity:.8}}
@keyframes mch-spark{0%{opacity:0;transform:rotate(var(--angle)) translateY(-25px)}15%{opacity:1}100%{opacity:0;transform:rotate(var(--angle)) translateY(calc(-1 * var(--distance))) rotate(90deg)}}
@keyframes mch-card{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
.mystery-chest[data-motion=reduced] *{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.mystery-chest *{animation:none!important;transition:none!important}}
@media(max-height:680px){.mch-shell{padding:22px 20px 15px}.mch-eyebrow{margin-bottom:9px}.mch-stage{height:180px}.mch-chest{height:180px;width:238px}.mystery-chest[data-phase=reward] .mch-stage{height:120px}.mystery-chest[data-phase=reward] .mch-chest{height:130px;width:180px}.mch-halo{height:145px;width:145px}.mch-caption{margin-top:5px}.mch-result{min-height:80px;padding:11px 14px}.mch-status{margin:6px 0 10px}.mch-assurance{margin-top:9px}}
@media(max-width:360px){.mch-shell{padding-left:17px;padding-right:17px}.mch-shell h2{font-size:26px}.mch-eyebrow{font-size:8px}.mch-result h3{font-size:15px}}
