/* Arrival effects stay above the cart, inside a compact pocket of light. */
.celebration{--ore:#c6e2e6;--life:1600ms;--stage-y:31%;position:fixed;inset:0;z-index:9;pointer-events:none;overflow:hidden;isolation:isolate;text-align:center}
.celebration[hidden]{display:none}
.celebration-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.celebration-shell{position:absolute;left:50%;top:var(--stage-y);width:max-content;max-width:90vw;transform:translate(-50%,-50%);isolation:isolate}
.celebration-content{position:relative;display:flex;flex-direction:column;align-items:center;max-width:min(660px,90vw);animation:reward-stamp var(--life) cubic-bezier(.18,.8,.2,1) both;filter:drop-shadow(0 4px 0 #07161bc9)}
.celebration-kicker{font:700 9px/1.5 var(--mono);letter-spacing:3.2px;color:#e5f2df;text-shadow:0 2px 3px #06131c;margin-bottom:12px}
.celebration-face{display:flex;align-items:center;justify-content:center;gap:20px}
.celebration-score{text-align:left;min-width:0}
.celebration-specimen{position:relative;flex:none}
.celebration-word{display:block;color:var(--ore);font:700 clamp(28px,4.2vw,52px)/1.05 var(--mono);letter-spacing:-1.5px;text-transform:uppercase;white-space:nowrap;text-shadow:2px 3px 0 #07151d,0 0 22px color-mix(in srgb,var(--ore) 24%,transparent)}
.celebration-gain{display:flex;align-items:baseline;gap:4px;width:max-content;margin-top:3px;color:#fff3cc;font:700 clamp(35px,5.1vw,64px)/1.05 var(--mono);letter-spacing:-2px;text-shadow:2px 3px 0 #18252b;font-variant-numeric:tabular-nums}
.celebration-number{display:inline-block;min-width:calc(var(--digits)*.61em);font:inherit;letter-spacing:inherit;text-align:right}
.celebration-gain small{font:700 .37em/1 var(--mono);letter-spacing:0;margin-left:4px;color:var(--ore)}
.celebration-plus{font-size:.65em;align-self:center;line-height:1;letter-spacing:-1px}
.count-complete .celebration-gain{animation:gain-lock 270ms cubic-bezier(.16,.8,.28,1) both;transform-origin:35% 60%}
.celebration-ore-wrap{position:relative;--ore-size:67px;width:var(--ore-size);height:var(--ore-size);aspect-ratio:1;flex:none;animation:ore-impact 470ms cubic-bezier(.12,.65,.22,1) both;filter:drop-shadow(0 0 15px color-mix(in srgb,var(--ore) 30%,transparent))}
.celebration-ore{display:block;width:100%;height:100%}
.celebration-grade{display:flex;gap:4px;margin-top:15px;height:4px}
.celebration-grade i{display:block;width:16px;height:4px;background:#36525b;box-shadow:0 1px 0 #071b24}
.celebration-grade .is-lit{background:var(--ore);box-shadow:0 0 9px color-mix(in srgb,var(--ore) 50%,transparent),0 1px 0 #071b24}
.celebration-detail{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:min(480px,80vw);margin-top:10px;color:#e0ebe0;font:500 12px/1.4 var(--sans);text-shadow:0 2px 3px #07121d;overflow-wrap:anywhere}
.celebration-halo{position:absolute;z-index:-2;left:50%;top:50%;width:min(720px,112vw);height:340px;transform:translate(-50%,-50%);background:radial-gradient(ellipse,#091b26d9 0%,#091b26ad 30%,#091b2647 48%,transparent 69%);animation:reward-halo var(--life) ease both}
.celebration-rings,.celebration-fragments{position:absolute;left:50%;top:50%;width:0;height:0;z-index:-1}
.celebration-ring{position:absolute;left:0;top:0;width:74px;height:74px;border:2px solid var(--ore);opacity:0;box-shadow:0 0 15px color-mix(in srgb,var(--ore) 28%,transparent),inset 0 0 12px color-mix(in srgb,var(--ore) 13%,transparent);animation:ore-ring 720ms 90ms cubic-bezier(.1,.52,.2,1) both}
.ring-two{width:84px;height:84px;border-width:1px;animation-delay:230ms;animation-duration:850ms}
.ring-three{width:96px;height:96px;border-width:1px;animation-delay:650ms;animation-duration:900ms}
.celebration-fragment{position:absolute;width:var(--size);height:var(--size);background:var(--ore);box-shadow:inset 0 1px 0 #efffedaa,1px 1px 0 #152a32,0 0 8px color-mix(in srgb,var(--ore) 45%,transparent);opacity:0;animation:ore-fragment var(--flight) var(--delay) cubic-bezier(.08,.52,.24,1) both}
.celebration-fragment.is-streak{width:2px;height:11px;box-shadow:0 0 8px var(--ore);transform-origin:center}
.celebration-glint{position:absolute;left:var(--gx);top:var(--gy);width:3px;height:3px;background:#f0ffe9;opacity:0;box-shadow:0 0 12px var(--ore);animation:ore-twinkle 510ms var(--delay) ease both}
.celebration-glint:before,.celebration-glint:after{content:"";position:absolute;background:var(--ore)}
.celebration-glint:before{width:11px;height:1px;left:-4px;top:1px}.celebration-glint:after{width:1px;height:11px;left:1px;top:-4px}
.tier-0 .celebration-ring{width:54px;height:54px;border-width:1px;animation-duration:520ms;box-shadow:none}.tier-0 .celebration-ore-wrap{filter:drop-shadow(0 0 8px #9db6b533)}
.tier-1 .celebration-ring{width:62px;height:62px;border-width:1px}.tier-1 .celebration-ore-wrap{animation-duration:430ms}
.tier-2 .celebration-word{text-shadow:2px 3px 0 #07151d,0 0 25px #e7af4355}
.tier-3 .celebration-grade{gap:5px}.tier-3 .celebration-grade .is-lit{box-shadow:0 0 11px #ff634b88,0 1px 0 #071b24}
.tier-4 .celebration-ore-wrap,.tier-5 .celebration-ore-wrap{--ore-size:75px;animation-duration:520ms}
.tier-4 .celebration-word,.tier-5 .celebration-word{text-shadow:3px 3px 0 #07151d,0 0 30px color-mix(in srgb,var(--ore) 45%,transparent)}
.tier-4 .celebration-ore-wrap:after,.tier-5 .celebration-ore-wrap:after,.cavern-toast .celebration-ore-wrap:after{content:"";position:absolute;inset:0;background:linear-gradient(115deg,transparent 25%,#f5fff2b0 49%,transparent 68%);clip-path:polygon(0 11.11%,11.11% 0,100% 0,100% 88.89%,88.89% 100%,0 100%);opacity:0;animation:ore-polish 580ms 660ms ease both}
.tier-5 .ring-one{width:92px;height:92px;animation-duration:850ms}.tier-5 .celebration-kicker{color:#e1fff4;letter-spacing:3.7px}
.cavern-toast{--stage-y:32%}.cavern-toast .celebration-content{max-width:min(780px,90vw);animation-name:cavern-arrival}.cavern-toast .celebration-kicker{font-size:12px;letter-spacing:4px;margin-bottom:14px}
.cavern-toast .celebration-word{white-space:normal;max-width:520px;font-size:clamp(27px,3.8vw,48px);line-height:1.13;letter-spacing:-1.2px}
.cavern-toast .celebration-ore-wrap{--ore-size:84px}.cavern-toast .celebration-gain{font-size:clamp(43px,5.7vw,72px);margin-top:6px}.cavern-toast .celebration-face{gap:25px}
.cavern-toast .celebration-detail{font:8px/1.4 var(--mono);letter-spacing:2.5px}.cavern-toast .celebration-halo{height:390px}.cavern-toast .ring-one{width:96px;height:96px;animation-duration:1000ms}.cavern-toast .ring-two{animation-delay:330ms}.cavern-toast .ring-three{animation-delay:680ms;animation-duration:1100ms}
.cavern-arrival-note{display:flex;align-items:center;justify-content:center;gap:10px;color:var(--tier,var(--amber));font:700 10px var(--mono);letter-spacing:1px;white-space:nowrap}
@keyframes reward-stamp{0%{opacity:0;transform:translateY(9px) scale(.83)}10%{opacity:1;transform:translateY(-2px) scale(1.045)}21%,81%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-8px) scale(.98)}}
@keyframes ore-impact{0%{transform:translateY(-18px) rotate(-9deg) scale(.72)}26%{transform:translateY(3px) rotate(3deg) scale(1.12)}53%{transform:translateY(-2px) rotate(-1deg) scale(.98)}100%{transform:translateY(0) rotate(0) scale(1)}}
@keyframes gain-lock{0%{transform:scale(1)}32%{transform:scale(1.09)}100%{transform:scale(1)}}
@keyframes ore-ring{0%{opacity:0;transform:translate(-50%,-50%) rotate(45deg) scale(.52)}9%{opacity:.55}100%{opacity:0;transform:translate(-50%,-50%) rotate(45deg) scale(3.1)}}
@keyframes ore-fragment{0%{opacity:0;transform:translate(0,0) rotate(0) scale(.65)}12%{opacity:.9}67%{opacity:.85}100%{opacity:0;transform:translate(var(--fx),var(--fy)) rotate(var(--turn)) scale(.55)}}
@keyframes ore-twinkle{0%,100%{opacity:0;transform:scale(.3) rotate(0)}38%{opacity:1;transform:scale(1.1) rotate(0)}70%{opacity:.65;transform:scale(.8) rotate(90deg)}}
@keyframes ore-polish{0%{opacity:0;background-size:230% 100%;background-position:100% 0}35%{opacity:.7}100%{opacity:0;background-size:230% 100%;background-position:0 0}}
@keyframes reward-halo{0%,100%{opacity:0}10%,81%{opacity:1}}
@keyframes cavern-arrival{0%{opacity:0;transform:translateY(12px) scale(.84)}9%{opacity:1;transform:translateY(-3px) scale(1.035)}19%,86%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-8px) scale(.99)}}

@media(max-width:700px){.celebration{--stage-y:30%}.celebration-face{gap:12px}.celebration-kicker{font-size:8px;letter-spacing:2px;margin-bottom:10px}.celebration-word{font-size:clamp(26px,7.5vw,39px);letter-spacing:-1px}.celebration-gain{font-size:clamp(38px,10.5vw,54px);letter-spacing:-1.7px}.celebration-ore-wrap{--ore-size:51px}.tier-4 .celebration-ore-wrap,.tier-5 .celebration-ore-wrap{--ore-size:57px}.celebration-grade{margin-top:12px}.celebration-detail{font-size:11px;max-width:82vw}.celebration-halo{height:290px}.tier-5 .celebration-kicker{letter-spacing:2px}.cavern-toast{--stage-y:31%}.cavern-toast .celebration-kicker{font-size:10px;letter-spacing:3px}.cavern-toast .celebration-word{font-size:clamp(25px,6.7vw,35px);max-width:62vw}.cavern-toast .celebration-ore-wrap{--ore-size:57px}.cavern-toast .celebration-face{gap:12px}.cavern-toast .celebration-gain{font-size:clamp(39px,10.5vw,54px)}.cavern-toast .celebration-halo{height:330px}.cavern-arrival-note{grid-column:1/3;padding:8px;font-size:9px}}
@media(max-height:560px){.celebration{--stage-y:31%}.celebration-kicker{margin-bottom:6px;font-size:7px}.celebration-word{font-size:27px}.celebration-gain{font-size:37px}.celebration-ore-wrap,.tier-4 .celebration-ore-wrap,.tier-5 .celebration-ore-wrap{--ore-size:49px}.celebration-grade{margin-top:8px}.celebration-detail{margin-top:6px;font-size:10px}.cavern-toast .celebration-word{font-size:28px}.cavern-toast .celebration-gain{font-size:39px}.cavern-toast .celebration-ore-wrap{--ore-size:56px}.cavern-toast .celebration-kicker{font-size:8px;margin-bottom:7px}}
@media (max-height:560px) {
  .celebration,.cavern-toast{--stage-y:24%}
  .celebration-score{display:flex;align-items:baseline;gap:10px}
  .celebration-gain,.cavern-toast .celebration-gain{margin-top:0}
  .celebration-rings,.celebration-fragments{transform:scale(.65)}
  .celebration-grade{margin-top:5px}
}
@media(prefers-reduced-motion:reduce){.celebration-rings,.celebration-fragments,.celebration-ore-wrap:after{display:none}.celebration-content{filter:drop-shadow(0 3px 0 #06131ac9)}}
.celebration.motion-reduced .celebration-content,.celebration.motion-reduced .celebration-ore-wrap,.celebration.motion-reduced .celebration-gain{animation:none;opacity:1;transform:none}.celebration.motion-reduced .celebration-rings,.celebration.motion-reduced .celebration-fragments,.celebration.motion-reduced .celebration-ore-wrap:after{display:none}
