/* treasure 전용 모양 (2026-11-11 styles.css에서 그대로 옮김: 이 기능만 고칠 때 공통 파일을 안 건드리게) */
/* ↓ 2026-11-11 2차: styles.css에 남아 있던 이 기능 규칙(원래 순서 그대로, 이 파일의 다른 규칙보다 앞) */
/* v0.3.47 treasure chest */
.treasure-wrap{max-width:560px;margin:0 auto;padding:18px 16px 40px;text-align:center;overflow:hidden}
.treasure-sub{margin:0;color:var(--muted);font-weight:800}
.treasure-scene{position:relative;display:block;width:100%;max-width:400px;aspect-ratio:1/1;margin:6px auto 0;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;min-height:0!important;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;overflow:visible}
.treasure-img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transform-origin:50% 95%;pointer-events:none}
.treasure-flash{position:absolute;left:50%;top:52%;width:20%;aspect-ratio:1;border-radius:50%;background:#fff;opacity:0;transform:translate(-50%,-50%);pointer-events:none}
.treasure-glow{position:absolute;left:50%;top:45%;width:90%;aspect-ratio:1;border-radius:50%;background:radial-gradient(#fff7c2,#ffd84d8c 55%,#ffd84d00 75%);transform:translate(-50%,-50%);opacity:0;transition:opacity .4s;pointer-events:none}
.treasure-rays{position:absolute;inset:-10%;width:120%;height:120%;opacity:0;transition:opacity .4s;pointer-events:none}
.treasure-ticket{position:absolute;left:50%;top:40%;width:60%;opacity:0;transform:translate(-50%,0) scale(.2);pointer-events:none;filter:drop-shadow(0 6px 10px #0002)}
.treasure-gem{position:absolute;left:70%;top:30%;width:18%;opacity:0;pointer-events:none}
.treasure-sparks i{position:absolute;left:50%;top:48%;width:10px;height:10px;border-radius:2px;opacity:0;pointer-events:none;animation:tBurst 1.1s ease-out forwards}
.treasure-hint{font-weight:900;font-size:1.2rem;color:#c0561c;margin:6px 0 0;min-height:1.6em}
.treasure-taps{display:flex;gap:8px;justify-content:center;margin:6px 0 0}
.treasure-taps i{width:14px;height:14px;border-radius:50%;background:#e3e8ee;display:block;transition:background .2s,transform .2s}
.treasure-wallet{max-width:420px;margin:16px auto 0;background:#fff;border:1px solid var(--line);border-radius:20px;padding:12px 16px;text-align:left}
.treasure-wallet b{display:flex;justify-content:space-between}
.tw-bar{height:16px;border-radius:9px;background:#eef2f6;overflow:hidden;margin-top:8px}
.tw-bar em{display:block;height:100%;border-radius:9px;background:linear-gradient(90deg,#ffcf3d,#ff9d1c);transition:width .9s cubic-bezier(.3,1.2,.5,1)}
/* ↑ 2차로 옮긴 규칙 끝 */
.treasure-wrap h1{margin:.2rem 0 .2rem;font-size:1.8rem}
.treasure-img.opened{opacity:0}
.treasure-scene.idle .treasure-img.closed{animation:tBob 2.2s ease-in-out infinite}
.treasure-scene.shake1 .treasure-img.closed{animation:tShake .35s ease-in-out}
.treasure-scene.shake2 .treasure-img.closed{animation:tShake .45s ease-in-out 2}
.treasure-scene.open .treasure-img.closed{opacity:0;transition:opacity .12s}
.treasure-scene.open .treasure-img.opened{animation:tOpen .55s cubic-bezier(.3,1.6,.5,1) forwards}
.treasure-scene.open .treasure-flash{animation:tFlash .6s ease-out}
.treasure-scene.open .treasure-glow,.treasure-scene.open .treasure-rays{opacity:1}
.treasure-scene.open .treasure-rays{animation:tSpin 9s linear infinite}
.treasure-scene.open .treasure-ticket{animation:tPop .9s .35s cubic-bezier(.2,1.5,.4,1) forwards}
.treasure-scene.fly .treasure-ticket{animation:tFly .8s ease-in forwards}
.treasure-scene.open .treasure-gem{animation:tGem .8s 1.1s cubic-bezier(.2,1.6,.4,1) forwards}
.treasure-scene.fly .treasure-gem{animation:tFly .8s ease-in forwards}
.treasure-taps i.on{background:#ffb400;transform:scale(1.2)}
.treasure-wallet.bump{animation:tBump .4s ease-out}
.treasure-after{margin-top:16px}
@media(prefers-reduced-motion:reduce){.treasure-wrap *{animation-duration:.01s!important;animation-iteration-count:1!important;transition-duration:.01s!important}}
.treasure-wrap h1,.treasure-sub,.treasure-hint,.treasure-taps,.treasure-wallet,.treasure-after{position:relative;z-index:2}
.treasure-month{text-align:center;font-weight:900;font-size:1.2rem;color:#a2520c;margin:6px 0}
@keyframes tBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
@keyframes tShake{0%,100%{transform:rotate(0)}20%{transform:rotate(-6deg)}40%{transform:rotate(6deg)}60%{transform:rotate(-4deg)}80%{transform:rotate(3deg)}}
@keyframes tOpen{0%{opacity:0;transform:scale(.9) translateY(10px)}40%{opacity:1}100%{opacity:1;transform:scale(1) translateY(0)}}
@keyframes tFlash{0%{opacity:.95;transform:translate(-50%,-50%) scale(.3)}100%{opacity:0;transform:translate(-50%,-50%) scale(5)}}
@keyframes tSpin{to{transform:rotate(360deg)}}
@keyframes tPop{0%{opacity:0;transform:translate(-50%,10%) scale(.2)}100%{opacity:1;transform:translate(-50%,-70%) scale(1)}}
@keyframes tFly{0%{opacity:1;transform:translate(-50%,-70%) scale(1)}100%{opacity:0;transform:translate(-50%,170%) scale(.15)}}
@keyframes tGem{0%{opacity:0;transform:translate(-60%,40%) scale(.2) rotate(-30deg)}100%{opacity:1;transform:translate(0,-40%) scale(1) rotate(8deg)}}
@keyframes tBump{50%{transform:scale(1.05)}}
