.record-gift-bag{padding:16px;border:1px solid #8effdc55;border-radius:18px;background:#0f213c;margin:10px 0 20px}.record-gift-bag h3{color:#a2ffe3;margin:0 0 6px}.record-gift-bag .muted{font-size:13px;line-height:1.5}
.record-chest-modal{z-index:1900}.record-chest-card{position:relative;text-align:center;width:min(92vw,430px);max-height:94dvh;overflow:auto;padding:28px 20px 20px;border:1px solid #ffe09599;border-radius:28px;color:#fff;background:radial-gradient(ellipse at 50% 38%,#39446f,#15223e 70%);box-shadow:0 15px 50px #000b;isolation:isolate}.record-chest-kicker{font-size:11px;color:#ffdf89;letter-spacing:.14em;margin:0 30px 12px}.record-chest-card h2{font-size:clamp(22px,6vw,28px);line-height:1.2;margin:10px 12px}.record-chest-subtitle{font-size:14px;color:#d6e3f5;min-height:38px;margin:8px 0}.record-chest-scene{height:235px;position:relative;perspective:650px;isolation:isolate}.record-chest-spinner{position:absolute;left:calc(50% - 72px);top:100px;width:144px;height:94px;transform-style:preserve-3d;will-change:transform}.record-chest{position:relative;width:144px;height:94px;border:0;padding:0;background:transparent;cursor:pointer;touch-action:manipulation;transform-style:preserve-3d}.record-chest:focus-visible{outline:3px solid #fff;outline-offset:8px;border-radius:15px}.record-chest-base{position:absolute;inset:20px 0 0;border:6px solid #ffcb5e;border-radius:7px 7px 17px 17px;background:linear-gradient(105deg,#8d60d7,#49317f 45%,#34244f);box-shadow:inset 0 0 0 3px #31204a,7px 10px 0 #090f2344;color:#ffe69a;font-size:38px;line-height:57px;backface-visibility:visible}.record-chest-lid{position:absolute;left:-4px;right:-4px;top:2px;height:35px;z-index:3;border:6px solid #ffe29a;border-radius:21px 21px 5px 5px;background:linear-gradient(145deg,#d2a1ff,#7843bd 55%,#472c70);box-shadow:inset 0 3px 0 #fff6;transform-origin:50% 100%}.record-chest-lid:after{content:'';position:absolute;top:-6px;left:44%;height:35px;width:12%;background:#ffd26b}.record-chest-rays{position:absolute;left:50%;top:105px;width:230px;height:230px;border-radius:50%;background:radial-gradient(circle,#fff3b88c,#83ffe52a 30%,transparent 68%);transform:translate(-50%,-50%) scale(.65);opacity:.4;pointer-events:none}.record-chest-progress{width:60%;height:7px;accent-color:#8affdf}.record-chest-safety{font-size:12px;line-height:1.4;color:#afd8ca}.record-chest-skip{padding:12px;border:0;background:transparent;color:#bdcce2;text-decoration:underline}.record-chest-card .next-level{width:100%;margin-top:8px}.record-chest-card [hidden]{display:none!important}
.record-chest-prizes{position:absolute;inset:15px 10px auto;display:flex;gap:18px;justify-content:center;align-items:center;pointer-events:none;opacity:0;z-index:5}.record-chest-prize{display:grid;gap:8px;justify-items:center;font-size:13px;font-weight:800}.record-prize-symbol{font-size:55px;line-height:1;color:#ffdf83;text-shadow:0 0 10px #b9fffa}.prize-color{color:#cfacff}.prize-line{color:#93fff0}.record-chest-confetti{position:absolute;left:50%;top:100px;width:6px;height:12px;background:var(--ink);border-radius:2px;opacity:0;pointer-events:none}.is-open .record-chest-lid{animation:record-lid .6s ease-out forwards}.is-open .record-chest-rays{animation:record-rays .65s ease-out forwards}.is-open .record-chest-prizes{animation:record-prize .65s .15s cubic-bezier(.2,.8,.3,1) both}.is-open .record-chest-confetti{animation:record-confetti .8s .15s ease-out both}
@keyframes record-lid{to{transform:translateY(-48px) rotate(-22deg);opacity:.15}}@keyframes record-rays{to{opacity:1;transform:translate(-50%,-50%) scale(1.1)}}@keyframes record-prize{from{opacity:0;transform:translateY(85px) scale(.25)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes record-confetti{from{opacity:1;transform:rotate(var(--angle)) translateY(-15px)}to{opacity:0;transform:rotate(var(--angle)) translateY(-125px) rotate(90deg)}}
@media(prefers-reduced-motion:reduce){.record-chest-spinner{will-change:auto;transform:none!important}.record-chest-modal *{animation:none!important}.is-open .record-chest-lid{transform:translateY(-48px) rotate(-22deg);opacity:.15}.is-open .record-chest-prizes{opacity:1}.record-chest-confetti{display:none}}

/* Chest show (Web65): drop-in with bounce, inviting hop, jolt + light build-up per tap, flash + shockwave + spinning god rays on open, prizes pop one by one. Particles are drawn on .chest-fx. */
.record-chest-modal .record-chest-card{animation:chest-card-in .45s cubic-bezier(.2,1.3,.4,1) both}
.record-chest-modal .record-chest-spinner{animation:chest-drop .85s cubic-bezier(.3,0,.4,1) both}
.record-chest-modal:not(.is-charging):not(.is-open) .record-chest{animation:chest-invite 1.5s 1s ease-in-out infinite}
.record-chest-modal .record-chest.chest-hit{animation:chest-hit .3s ease-out}
.record-chest-modal.is-charging .record-chest{filter:drop-shadow(0 0 calc(6px + var(--charge,0) * 26px) #ffd76a) brightness(calc(1 + var(--charge,0) * .3))}
.record-chest-modal.is-charging .record-chest-rays{opacity:calc(.35 + var(--charge,0) * .65);transform:translate(-50%,-50%) scale(calc(.7 + var(--charge,0) * .7));transition:opacity .25s,transform .25s}
.record-chest-modal .record-chest-card.chest-jolt{animation:chest-jolt .22s ease-out}
.chest-godrays{position:absolute;left:50%;top:50%;width:520px;height:520px;margin:-260px 0 0 -260px;border-radius:50%;background:repeating-conic-gradient(from 0deg,#fff1b066 0 8deg,transparent 8deg 20deg);-webkit-mask:radial-gradient(circle,#000 14%,transparent 60%);mask:radial-gradient(circle,#000 14%,transparent 60%);opacity:0;scale:.3;pointer-events:none;z-index:0}
.record-chest-modal.is-open .chest-godrays{animation:chest-godrays-in .7s ease-out both,chest-godrays-spin 10s linear infinite}
.record-chest-modal.is-open .record-chest-scene::after{content:'';position:absolute;inset:-60px;background:radial-gradient(circle at 50% 55%,#fff 0,#fffbe6cc 22%,#ffe49a55 42%,transparent 70%);animation:chest-flash .6s ease-out both;pointer-events:none;z-index:6}
.chest-fx{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:7}
.record-chest-modal .record-chest-confetti{display:none}
.record-chest-modal.is-open .record-chest-prizes{animation:none!important;opacity:1;z-index:8}
.record-chest-modal.is-open .record-chest-prize{animation:chest-prize-pop .65s .3s cubic-bezier(.2,1.5,.4,1) both}
.record-chest-modal.is-open .record-chest-prize:nth-child(2){animation-delay:.45s}.record-chest-modal.is-open .record-chest-prize:nth-child(3){animation-delay:.6s}.record-chest-modal.is-open .record-chest-prize:nth-child(4){animation-delay:.75s}
.record-chest-modal.is-open .record-chest-prize>:first-child{animation:chest-prize-glow 1.6s 1.1s ease-in-out infinite}
@keyframes chest-card-in{0%{opacity:0;transform:scale(.7)}100%{opacity:1;transform:none}}
@keyframes chest-drop{0%{opacity:0;transform:translateY(-240px) scale(.7)}45%{opacity:1;transform:translateY(0) scale(1.14,.84)}62%{transform:translateY(-28px) scale(.95,1.06)}78%{transform:translateY(0) scale(1.06,.94)}90%{transform:translateY(-7px) scale(1)}100%{opacity:1;transform:none}}
@keyframes chest-invite{0%,55%,100%{transform:none}65%{transform:translateY(-12px) rotate(-4deg)}75%{transform:translateY(0) scale(1.06,.94)}85%{transform:translateY(-4px) rotate(3deg)}}
@keyframes chest-hit{0%{transform:none}30%{transform:scale(1.13,.88) rotate(-6deg)}60%{transform:scale(.95,1.07) rotate(5deg)}100%{transform:none}}
@keyframes chest-jolt{0%,100%{translate:0 0}25%{translate:-4px 2px}50%{translate:4px -2px}75%{translate:-2px 1px}}
@keyframes chest-godrays-in{0%{opacity:0;scale:.3}100%{opacity:1;scale:1}}
@keyframes chest-godrays-spin{to{rotate:360deg}}
@keyframes chest-flash{0%{opacity:0;transform:scale(.4)}20%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.3)}}
@keyframes chest-prize-pop{0%{opacity:0;transform:translateY(90px) scale(.1) rotate(-25deg)}60%{opacity:1;transform:translateY(-10px) scale(1.12) rotate(4deg)}100%{opacity:1;transform:none}}
@keyframes chest-prize-glow{0%,100%{filter:drop-shadow(0 0 0 #ffe27a00)}50%{filter:drop-shadow(0 0 10px #ffe27a)}}
@media(prefers-reduced-motion:reduce){.record-chest-modal .record-chest-card,.record-chest-modal .record-chest-spinner,.record-chest-modal .record-chest,.record-chest-modal.is-open .chest-godrays,.record-chest-modal.is-open .record-chest-prize,.record-chest-modal.is-open .record-chest-prize>:first-child{animation:none!important}.record-chest-modal.is-open .chest-godrays{opacity:.6;scale:1}.record-chest-modal.is-open .record-chest-scene::after{display:none}}
/* Opened chest: the chest settles lower and smaller so the prize row above it stays readable. */
.record-chest-modal .record-chest-spinner{transition:translate .45s cubic-bezier(.2,.9,.3,1),scale .45s cubic-bezier(.2,.9,.3,1)}
.record-chest-modal.is-open .record-chest-spinner{translate:0 54px;scale:.62}
.record-chest-modal.is-open .record-chest-prizes{display:flex!important;flex-wrap:wrap;justify-content:center;gap:8px;max-width:360px;margin:0 auto}
.record-chest-modal.is-open .record-chest-prize{flex:0 1 84px;min-width:72px}
/* Chest v2 (Web67): vector chest with a real lid. One tap: squash, lid swings open, a light column pours out, prizes fly out of the mouth. */
.record-chest-modal.chest-v2 .record-chest-lid,.record-chest-modal.chest-v2 .record-chest-base{display:none!important}
.record-chest-modal.chest-v2 .record-chest::before,.record-chest-modal.chest-v2 .record-chest::after{display:none!important}
.record-chest-modal.chest-v2 .record-chest-spinner{width:200px!important;height:182px!important;left:calc(50% - 100px)!important;top:auto!important;bottom:2px;transform-origin:50% 100%}
.record-chest-modal.chest-v2 .record-chest{width:200px!important;height:182px!important;filter:none!important;transform-origin:50% 100%;overflow:visible}
.record-chest-modal.chest-v2.is-open .record-chest-spinner{translate:0 4px;scale:.86}
.chest-v2 .cv-shadow{position:absolute;left:14%;right:14%;bottom:0;height:16px;border-radius:50%;background:radial-gradient(ellipse,#000a,#0000 70%);z-index:0}
.chest-v2 .cv-base{position:absolute;left:0;bottom:8px;width:200px;height:110px;z-index:1;overflow:visible}
.chest-v2 .cv-mouth{position:absolute;left:12%;right:12%;top:60px;height:18px;border-radius:50%;background:radial-gradient(ellipse,#fffbe0 0,#ffd76a 38%,#ff9f2e00 72%);opacity:0;z-index:2;pointer-events:none}
.chest-v2 .cv-beam{position:absolute;left:18%;right:18%;bottom:112px;height:240px;transform-origin:50% 100%;transform:scaleY(0);opacity:0;background:linear-gradient(to top,#fffbe0 0,#ffe27acc 16%,#ffd76a55 48%,#ffd76a00 100%);clip-path:polygon(34% 100%,66% 100%,100% 0,0 0);pointer-events:none;z-index:3}
.chest-v2 .cv-lid{position:absolute;left:0;top:2px;width:200px;height:80px;z-index:4;overflow:visible;transform-origin:50% 92%;transition:transform .6s cubic-bezier(.25,1.55,.45,1),filter .4s}
/* Waiting: the whole chest hops evenly from its base (no tilt), the lid lifts a crack and light peeks out. */
.record-chest-modal.chest-v2:not(.is-open):not(.cv-opening) .record-chest{animation:cv-idle 1.7s ease-in-out .9s infinite!important}
.record-chest-modal.chest-v2:not(.is-open):not(.cv-opening) .cv-lid{animation:cv-peek 1.7s ease-in-out .9s infinite}
.record-chest-modal.chest-v2:not(.is-open):not(.cv-opening) .cv-mouth{animation:cv-peek-glow 1.7s ease-in-out .9s infinite}
.record-chest-modal.chest-v2.cv-opening .record-chest{animation:cv-squash .17s ease-out forwards!important}
.record-chest-modal.chest-v2.is-open .record-chest{animation:cv-pop .5s cubic-bezier(.2,1.5,.4,1)!important}
.record-chest-modal.chest-v2.is-open .cv-lid{z-index:0;transform:translateY(-36px) perspective(600px) rotateX(60deg);filter:brightness(1.2)}
.record-chest-modal.chest-v2.is-open .cv-mouth{animation:cv-mouth .5s ease-out forwards}
.record-chest-modal.chest-v2.is-open .cv-beam{animation:cv-beam .7s .08s cubic-bezier(.2,.9,.3,1) forwards,cv-beam-flicker 2.4s .9s ease-in-out infinite}
.record-chest-modal.chest-v2 .record-chest-prize{opacity:0}
.record-chest-modal.chest-v2.is-open .record-chest-prize{animation:none!important}
.record-chest-modal.chest-v2.is-open .record-chest-prize>:first-child{animation:chest-prize-glow 1.6s 1.4s ease-in-out infinite}
@keyframes cv-idle{0%,62%,100%{transform:none}14%{transform:scale(1.05,.93)}32%{transform:translateY(-12px) scale(.97,1.04)}48%{transform:translateY(0) scale(1.04,.95)}56%{transform:scale(.99,1.01)}}
@keyframes cv-peek{0%,62%,100%{transform:none}32%{transform:translateY(-5px)}42%{transform:translateY(-2px)}}
@keyframes cv-peek-glow{0%,62%,100%{opacity:0}32%{opacity:.75}}
@keyframes cv-squash{to{transform:scale(1.1,.86)}}
@keyframes cv-pop{0%{transform:scale(1.1,.86)}45%{transform:scale(.94,1.1) translateY(-6px)}100%{transform:none}}
@keyframes cv-mouth{0%{opacity:0;transform:scale(.5)}40%{opacity:1;transform:scale(1.35)}100%{opacity:1;transform:scale(1.1)}}
@keyframes cv-beam{0%{opacity:0;transform:scaleY(0)}35%{opacity:1}100%{opacity:.9;transform:scaleY(1)}}
@keyframes cv-beam-flicker{0%,100%{filter:brightness(1)}50%{filter:brightness(1.25)}}
@media(max-height:650px){.record-chest-modal.chest-v2 .record-chest-spinner{scale:.8}.record-chest-modal.chest-v2.is-open .record-chest-spinner{scale:.7}}
@media(prefers-reduced-motion:reduce){.record-chest-modal.chest-v2 *{animation:none!important;transition:none!important}.record-chest-modal.chest-v2.is-open .cv-mouth,.record-chest-modal.chest-v2.is-open .cv-beam{opacity:1;transform:none}}
/* The scene clips (never scrolls): focus or tall light layers must not shift the prizes upward. */
.record-chest-modal .record-chest-scene{overflow:clip!important}
