/* JJPark's original toy-box collection and egg reveal. */
#egg-status{display:block;font-size:8px;letter-spacing:.7px;margin-top:5px;color:#baa4cf;font-weight:700}
.egg-ready #egg-status{color:#ffe49a}.nav-item.egg-ready{border-color:#e3ba7455;background:linear-gradient(120deg,#74512755,#73539c33)}
dialog#collection-dialog{width:min(880px,calc(100% - 24px));max-height:calc(var(--usable-height,var(--app-height,100dvh)) - 24px);padding:24px;background:radial-gradient(ellipse at 15% 0,#4b2b76,#20112f 70%);border:1px solid #a37ab95c;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;color:#fbf3ff}
#collection-dialog::backdrop{background:#0e0617cf;backdrop-filter:blur(10px)}
#collection-close{font-size:28px;line-height:1}#collection-close:disabled{opacity:.3}
.collection-header{position:relative;padding:18px 0 12px}.collection-header>small,.egg-home>small,.egg-opening>small,.egg-reveal>small{font-size:9px;letter-spacing:2px;color:#c9b3e3;font-weight:800}
.collection-header h2{font-size:32px;line-height:1.1;letter-spacing:-1px;margin:8px 0 12px;color:#fff4cf}.collection-wallet{display:inline-block;color:#ffe49a;background:#fff1bb0c;border:1px solid #f4d99733;border-radius:8px;padding:8px 12px;font-size:12px;font-weight:800}
.collection-tabs{display:flex;gap:6px;border-bottom:1px solid #ba95d733;padding:6px 0 12px}.collection-tabs button{flex:1;padding:13px 6px;border-radius:10px;border:1px solid #b898d733;background:#fff1;color:#b9a3ce;font:800 12px system-ui;cursor:pointer}.collection-tabs button[aria-pressed=true]{background:#ffdf85;color:#32203f;border-color:#fff0ad;box-shadow:0 3px 0 #ac8241}
#collection-notice{font-size:12px;color:#ffe49a;min-height:0;line-height:1.6}#collection-notice:empty{display:none}
.collection-description{color:#c6b3d9;font-size:13px;line-height:1.7}.collection-picker{display:flex;align-items:center;gap:12px;margin:15px 0;color:#c6b3d9}.collection-picker select{background:#251934;color:#fff1d3;border:1px solid #b098cb66;padding:10px;border-radius:9px;font:700 14px system-ui;min-width:180px;max-width:100%}
.loot-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0 6px}.loot-card{border:1px solid #b598c633;border-radius:17px;background:radial-gradient(ellipse at 50% 35%,color-mix(in srgb,var(--loot-color) 15%,#30203e),#1b1129 75%);padding:14px;min-width:0;position:relative;display:flex;flex-direction:column;text-align:center;overflow:hidden}.loot-card.equipped{border-color:#f8d98f;box-shadow:inset 0 0 0 1px #f8d98f44}.loot-type{align-self:flex-start;color:var(--loot-color);font-size:8px;letter-spacing:2px;font-weight:900}.loot-preview{height:190px;display:flex;align-items:center;justify-content:center}.loot-preview img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 9px 7px #0b05184d)}.loot-card h3{font-size:16px;margin:8px 0 0;color:#fff2dc}.loot-card p{color:#bca6d0;font-size:10px;line-height:1.6;margin:8px 0 14px;min-height:30px}.loot-card button{margin-top:auto;padding:12px 5px;border:1px solid #fff1a55c;border-radius:8px;background:#f9dc8b;color:#34223e;font:900 10px system-ui;cursor:pointer}.loot-card button:disabled{background:#3e2d51;color:#b6a2c4;border-color:#9a7cb52e;cursor:default}
.weapon-art{--loot-color:#b9a2e3;display:inline-block;position:relative;width:145px;height:90px;transform:rotate(-18deg);filter:drop-shadow(0 12px 12px #0b051855)}.weapon-art i{position:absolute;left:33px;top:47px;width:29px;height:39px;border:5px solid #302037;border-radius:9px;background:#6b4d91;transform:rotate(-13deg)}.weapon-art b{display:grid;place-items:center;position:absolute;left:15px;top:16px;width:108px;height:46px;border:5px solid #302037;border-radius:18px;background:var(--loot-color);color:#3b2a50;font-size:30px;line-height:1}.weapon-art em{position:absolute;left:113px;top:21px;width:31px;height:36px;border:5px solid #302037;border-radius:11px;background:#fff3d5}
.egg-home,.egg-opening,.egg-reveal{text-align:center;padding:22px 0 10px;position:relative;isolation:isolate}.egg-home h3{font-size:23px;color:#fff2c8;margin:3px 0 12px}.egg-home p,.egg-opening p,.egg-reveal p{color:#cbb5dc;font-size:13px;line-height:1.7}.egg-home .dialog-action{min-width:min(290px,100%);min-height:49px}.egg-home .egg-timer{font-size:9px;letter-spacing:1.1px;margin-top:22px}.egg-timer b{display:inline-block;margin-left:8px;font-variant-numeric:tabular-nums;color:#fbe4a1}.egg-odds{font-size:11px;color:#b49bc8;max-width:510px;margin:20px auto 0}.egg-odds summary{cursor:pointer}.egg-odds p{font-size:11px}
.egg-stage{position:relative;width:260px;height:260px;margin:10px auto;display:grid;place-items:center}.jj-egg{width:175px;height:210px;position:relative;z-index:2;filter:drop-shadow(0 16px 12px #130b2877);overflow:visible}.egg-aura{position:absolute;inset:8px;border-radius:50%;background:radial-gradient(circle,#b58aff55,transparent 67%);box-shadow:inset 0 0 60px #bb8efb22}.egg-stage:before,.egg-stage:after{content:'✦';position:absolute;color:#ffe49a;font-size:29px;top:48px;left:22px}.egg-stage:after{font-size:17px;left:auto;right:17px;top:156px}.egg-crack{opacity:0}.idle .jj-egg{animation:egg-float 3.3s ease-in-out infinite}.idle .egg-aura{animation:egg-glow 3.3s ease-in-out infinite}
.egg-opening h2,.egg-reveal h2{font-size:32px;color:#ffe49a;margin:12px 0 0;letter-spacing:-1px}.cracking .jj-egg{animation:egg-rumble 1.6s ease-in forwards}.cracking .egg-crack{animation:egg-fracture 1.6s steps(3) forwards}.cracking .egg-aura{animation:egg-charge 1.8s ease-in forwards}.egg-flash{position:absolute;inset:-40px;border-radius:50%;background:#fff3bf;z-index:3;opacity:0;pointer-events:none;animation:egg-flash 1.8s ease-in forwards}
.egg-reveal{min-height:420px;overflow:hidden}.reward-art{height:230px;display:grid;place-items:center;margin:14px auto;animation:reward-pop .6s cubic-bezier(.2,1.5,.4,1) both;background:radial-gradient(circle,#b890ef33,transparent 68%)}.reward-art img{max-width:240px;height:230px;object-fit:contain;filter:drop-shadow(0 10px 10px #0b051855)}.reward-art .weapon-art{transform:rotate(-18deg) scale(1.5)}.reward-cards{display:grid;place-items:center;width:100px;height:138px;background:linear-gradient(135deg,#fff0bc,#e3a84a);border:6px solid #ffefb9;border-radius:18px;color:#5e3a46;font:900 48px system-ui;transform:rotate(-12deg);box-shadow:10px 8px 0 #af77cb,19px 16px 0 #654699,0 15px 35px #ffdc7844}.egg-reveal h3{font-size:26px;color:#fff4d9;margin:12px 0}.reward-actions{display:flex;gap:9px;justify-content:center;flex-wrap:wrap}.reward-actions .secondary{background:#423054;color:#ead8f6;border:1px solid #a081b955}.loot-confetti{position:absolute;inset:0;z-index:-1;pointer-events:none}.loot-confetti i{position:absolute;width:7px;height:17px;top:-20px;left:calc(var(--n) * 5%);background:#ffe49a;animation:jj-confetti 1.9s calc(var(--n) * -.04s) ease-out both}.loot-confetti i:nth-child(3n){background:#91f5dc}.loot-confetti i:nth-child(3n+1){background:#c7a2ff;border-radius:50%}
@keyframes egg-float{50%{transform:translateY(-9px) rotate(3deg)}}@keyframes egg-glow{50%{transform:scale(1.1);opacity:.6}}
@keyframes egg-rumble{0%,10%{transform:rotate(0)}20%{transform:rotate(-8deg)}30%{transform:rotate(9deg)}40%{transform:rotate(-11deg)}50%{transform:rotate(12deg)}60%{transform:rotate(-13deg) scale(1.05)}70%{transform:rotate(14deg) scale(1.07)}80%{transform:rotate(-7deg) scale(1.1)}90%{transform:scale(1.15)}100%{transform:scale(1.35);opacity:0}}
@keyframes egg-fracture{0%,20%{opacity:0;stroke-dasharray:0 300}40%{opacity:1;stroke-dasharray:60 300}70%{stroke-dasharray:120 300}100%{opacity:1;stroke-dasharray:300 0}}
@keyframes egg-charge{70%{transform:scale(1.3);background:#ffe49a66}100%{transform:scale(1.6);background:#fff2c399}}
@keyframes egg-flash{0%,75%{opacity:0;transform:scale(.5)}90%{opacity:1;transform:scale(1.3)}100%{opacity:0;transform:scale(2)}}
@keyframes reward-pop{from{opacity:0;transform:scale(.35) rotate(-8deg)}to{opacity:1;transform:scale(1) rotate(0)}}@keyframes jj-confetti{0%{transform:translateY(0) rotate(0);opacity:0}20%{opacity:1}100%{transform:translateY(550px) rotate(390deg);opacity:0}}
@media(max-width:600px){dialog#collection-dialog{padding:17px}.collection-header h2{font-size:26px}.loot-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.loot-card{padding:11px}.loot-preview{height:150px}.loot-card h3{font-size:14px}.loot-preview .weapon-art{transform:rotate(-18deg) scale(.75)}.collection-tabs button{font-size:11px}.egg-stage{width:220px;height:235px}.egg-reveal h2{font-size:28px}.reward-art{height:205px}.reward-art img{height:205px}.reward-actions{flex-direction:column}.egg-opening h2{font-size:27px}}
@media(max-width:600px){.egg-home,.egg-opening{padding-top:10px}.egg-home>small{display:none}.egg-stage{height:170px;margin:6px auto}.jj-egg{width:125px;height:155px}.egg-home h3{font-size:20px}.egg-home p{font-size:12px;margin:10px 0}.egg-home .egg-timer{margin-top:14px}.egg-stage:before{top:22px;left:34px}.egg-stage:after{top:115px;right:30px}}
@media(max-height:480px){.egg-home,.egg-opening,.egg-reveal{padding-top:8px}.egg-stage{height:150px;margin:5px auto}.jj-egg{width:110px;height:140px}.egg-home h3{font-size:19px}.egg-home p{font-size:11px}.egg-opening h2,.egg-reveal h2{font-size:24px}.reward-art{height:140px}.reward-art img{height:140px}.egg-reveal{min-height:290px}}
@media(prefers-reduced-motion:reduce){#collection-dialog *,#collection-dialog *:before,#collection-dialog *:after{animation:none!important}}.motion-off #collection-dialog *,.motion-off #collection-dialog *:before,.motion-off #collection-dialog *:after{animation:none!important}
