/* Käkalog drop (public/drop.js): fullscreen reveal. Generated from test-card-binder.html, namespaced kd-*. */
/* Solid, not see-through: the page comes back behind it while the card still holds (a big repaint), and a half-painted frame blinked through at .88. Over the hidden page .88 looked the same as solid anyway. */
.kd-overlay{position:fixed;inset:0;z-index:200;background:var(--overlay-dark);display:none;align-items:center;justify-content:center;overflow:hidden}
.kd-overlay.show{display:flex}
/* While the drop plays the page under it is hidden: after the app has sat idle the browser has dropped its painted
   tiles, and repainting the whole page behind the dim layer made the first drop run at ~15 fps. */
.kd-open #app,.kd-open .nav{visibility:hidden}
.kd-overlay.fade{background:rgba(6,5,4,0);transition:background .5s}
.kd-stage{position:relative;width:min(250px,64vw)}
.kd-stage.t-epic .kd-aura{background:radial-gradient(circle,rgba(255,255,255,.9) 0%,rgba(154,242,255,.5) 28%,rgba(255,154,213,.2) 55%,transparent 72%)}
.kd-stage.t-epic .kd-flash{background:radial-gradient(circle,#fff 0%,rgba(190,240,255,.9) 35%,transparent 70%)}

/* draw stage */
.kd-aura{position:absolute;left:50%;top:48%;width:200%;aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;opacity:0;
  background:radial-gradient(circle,rgba(255,225,110,.95) 0%,rgba(255,200,0,.55) 28%,rgba(255,170,0,.18) 55%,transparent 72%)}
.kd-stage.reveal .kd-aura{animation:kdAuraBang 1s ease-out forwards}
@keyframes kdAuraBang{0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}14%{opacity:1;transform:translate(-50%,-50%) scale(1.5)}100%{opacity:0;transform:translate(-50%,-50%) scale(2)}}
.kd-flip{will-change:transform;position:relative;transform:rotate(var(--tilt,0deg));transform-origin:0 0}
.kd-stage.pre .kc-rare>.kc-white,.kd-stage.pre .kc-rare>.kc-scan{display:block}
.kd-stage.pre:not(.reveal) .kc-vip{outline-color:var(--fg);background:var(--fg)}
.kd-stage.pre:not(.reveal) .kc-rare{box-shadow:0 1.5cqw 5cqw rgba(0,0,0,.5);animation:none}
.kd-stage.pre:not(.reveal) .kc-rare>.kc-scan,.kd-stage.pre:not(.reveal) .kc-rare::before{display:none}
@property --amp{syntax:"<number>";inherits:true;initial-value:0}
.kd-stage.eject .kd-flip{animation:kdEject .5s cubic-bezier(.16,.84,.3,1) both}
@keyframes kdEject{from{transform:translateY(110vh) rotate(var(--tilt,0deg))}to{transform:translateY(0) rotate(var(--tilt,0deg))}}
.kd-stage.charge .kd-flip{animation:kdFloat .9s ease-out forwards}
@keyframes kdFloat{0%{transform:translateY(0) rotate(var(--tilt,0deg))}55%{transform:translateY(-13px) rotate(calc(var(--tilt,0deg) + .9deg))}100%{transform:translateY(-18px) rotate(calc(var(--tilt,0deg) + .3deg))}}
@keyframes kdRamp{from{--amp:.9}to{--amp:5}}
@keyframes kdShake{0%{transform:translate(0,0) rotate(calc(var(--tilt,0deg) - var(--amp)*.35deg))}25%{transform:translate(calc(var(--amp)*-1.6px),calc(var(--amp)*1px)) rotate(calc(var(--tilt,0deg) + var(--amp)*.35deg))}50%{transform:translate(calc(var(--amp)*1.6px),calc(var(--amp)*-1px)) rotate(calc(var(--tilt,0deg) - var(--amp)*.2deg))}75%{transform:translate(calc(var(--amp)*-1px),calc(var(--amp)*-1.5px)) rotate(calc(var(--tilt,0deg) + var(--amp)*.25deg))}100%{transform:translate(calc(var(--amp)*1px),calc(var(--amp)*1.5px)) rotate(calc(var(--tilt,0deg) - var(--amp)*.35deg))}}
.kd-stage.reveal .kc-rare>.kc-white{animation:kdWipe .4s linear forwards}
.kd-stage.reveal .kc-rare>.kc-scan{animation:kdScanline .4s linear forwards}
@keyframes kdWipe{from{clip-path:inset(0 0 0 0)}to{clip-path:inset(100% 0 0 0)}}
@keyframes kdScanline{from{top:0}to{top:calc(100% - 1.8cqw)}}
.kd-stage.reveal .kd-flip{animation:kdKick .4s linear}
.kd-stage.charge.quick .kd-flip{animation:kdFloatS .4s ease-out forwards}
@keyframes kdFloatS{0%{transform:translateY(0) rotate(var(--tilt,0deg))}100%{transform:translateY(-8px) rotate(calc(var(--tilt,0deg) + .3deg))}}
.kd-stage.slam .kd-flip{animation:kdSlam .32s linear forwards}
@keyframes kdSlam{0%{transform:translateY(-8px) rotate(calc(var(--tilt,0deg) + .3deg))}28%{transform:translateY(3px) rotate(var(--tilt,0deg))}50%{transform:translateY(-3px) rotate(var(--tilt,0deg))}72%{transform:translateY(1px) rotate(var(--tilt,0deg))}100%{transform:translateY(0) rotate(var(--tilt,0deg))}}
@keyframes kdKick{0%{transform:translate(0,-18px) rotate(calc(var(--tilt,0deg) + .3deg))}12%{transform:translate(-11px,6px) rotate(calc(var(--tilt,0deg) - 2.2deg))}26%{transform:translate(12px,-7px) rotate(calc(var(--tilt,0deg) + 2.4deg))}42%{transform:translate(-8px,5px) rotate(calc(var(--tilt,0deg) - 1.5deg))}58%{transform:translate(6px,-4px) rotate(calc(var(--tilt,0deg) + 1deg))}76%{transform:translate(-3px,2px) rotate(calc(var(--tilt,0deg) - .5deg))}100%{transform:translate(0,0) rotate(var(--tilt,0deg))}}
.kd-flash{position:absolute;inset:-30px;pointer-events:none;opacity:0;border-radius:12px;background:radial-gradient(circle,#fff 0%,rgba(255,244,190,.9) 35%,transparent 70%)}
.kd-stage.burst .kd-flash{animation:kdFlash .6s ease-out}
@keyframes kdFlash{0%{opacity:0}12%{opacity:1}100%{opacity:0}}

.kd-ui{position:absolute;top:max(var(--s-3),env(safe-area-inset-top));right:var(--s-3);display:flex;gap:var(--s-2);z-index:3}
.kd-ui button{font:600 var(--fs-sm) "Archivo",system-ui,sans-serif;color:var(--fg);background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.22);border-radius:var(--r-pill);padding:var(--s-2) var(--s-4);cursor:pointer}
@media (prefers-reduced-motion:reduce){.kd-stage.eject .kd-flip,.kd-stage.charge .kd-flip,.kd-stage.reveal .kd-flip,.kd-stage.slam .kd-flip,.kd-stage.own.hit .kd-flip{animation:none}.kd-stage.reveal .kc-rare>.kc-white{animation-duration:.01s}}
/* a repeat Common: the card you already own comes back with one more loyalty star, said in words so it does not read as a new pull */
.kd-gain{position:absolute;left:0;right:0;top:100%;margin-top:var(--s-4);text-align:center;font:800 var(--fs-lg)/1.2 system-ui,sans-serif;color:var(--gold-lite);opacity:0;transition:opacity .25s ease .35s}
.kd-stage.burst .kd-gain,.kd-stage.still .kd-gain{opacity:1}   /* the words come after the punch, not with the stamp */
.kd-stage.still .kd-gain{transition:none}
.kd-stage.reveal .kd-gain{transition-delay:.6s}
/* the star this log won: an empty slot until the reveal, then it stamps in. The row is large here: at card size (4cqw) a stamp is missed */
.kd-stage .kc-loy{font-size:max(12px,6cqw);line-height:1;letter-spacing:.3cqw}
.kd-stage .kc-ns{position:relative;display:inline-block;font-style:normal;color:transparent}
.kd-stage .kc-ns::before{content:attr(data-was);position:absolute;left:0;top:0;color:var(--loy,#b8860b)}
.kd-stage .kc-vip .kc-ns::before{--loy:var(--gold)}
.kd-stage .kc-holo .kc-ns::before{--loy:#e3d2ff}
.kd-stage.starred .kc-ns,.kd-stage.hit .kc-ns{color:inherit}
.kd-stage.starred .kc-ns::before,.kd-stage.hit .kc-ns::before{opacity:0}
.kd-stage.hit .kc-ns{animation:kdPop .5s cubic-bezier(.2,1.5,.4,1) both}
/* a repeat (drop.js "own"): the card you had comes down, and in that one hit the diamond fills, it flashes, bangs
   and, on a tier change, wipes the old card off the new one */
.kd-now{position:relative}
.kd-was{position:absolute;inset:0;z-index:2}
.kd-stage.still .kd-was{display:none}
.kd-stage.up:not(.hit):not(.still) .kd-now{visibility:hidden}   /* the new tier's glow would show round the old card */
.kd-stage.own.hit .kd-flip{animation:kdKick .4s linear}
.kd-stage.up:not(.hit) .kd-now .kc-rare{animation:none}   /* the new tier's glow and sheen start at the hit, as on a pull */
/* the pull's scan line, above the old card: it wipes the old card off and uncovers the new one (glow included) in the same sweep */
.kd-scan{position:absolute;left:-6px;right:-6px;top:0;height:6px;z-index:3;display:none;pointer-events:none;
  background:linear-gradient(90deg,transparent,#fff 12%,#fff6c4 50%,#fff 88%,transparent);box-shadow:0 0 12px 3px rgba(255,236,150,.95),0 0 32px 8px rgba(255,200,0,.7)}
.kd-stage.t-epic .kd-scan{background:linear-gradient(90deg,transparent,#ff9ad5 12%,#9af2ff 38%,#fff59a 62%,#b6ffb0 88%,transparent);box-shadow:0 0 12px 3px rgba(255,255,255,.9),0 0 32px 8px rgba(154,242,255,.6)}
.kd-stage.up.hit .kd-scan{display:block;animation:kdUpScan .55s linear forwards}
/* down the card in .4s, then it fades out at the bottom edge instead of staying there */
@keyframes kdUpScan{0%{top:0;opacity:1}73%{top:calc(100% - 6px);opacity:1}100%{top:calc(100% - 6px);opacity:0}}
/* keeps the scan line's pace past the bottom edge to uncover the glow below, then holds, so nothing pops on when it ends */
.kd-stage.up.hit .kd-now{animation:kdUnwipe .52s linear forwards}
@keyframes kdUnwipe{0%{clip-path:inset(-30% -30% 100% -30%)}77%{clip-path:inset(-30% -30% 0% -30%)}100%{clip-path:inset(-30% -30% -30% -30%)}}
.kd-stage.hit .kd-flash{animation:kdFlash .6s ease-out}
.kd-stage.hit .kd-aura{animation:kdAuraBang 1s ease-out forwards}
.kd-stage.hit .kd-was{animation:kdWipe .4s linear forwards}
.kd-stage.hit .kd-gain{opacity:1;transition-delay:.2s}
.kd-stage.still .kc-ns{animation:none}
@keyframes kdPop{0%{transform:scale(2.6);text-shadow:0 0 4cqw #fff,0 0 8cqw var(--gold-lite)}100%{transform:scale(1);text-shadow:0 0 0 transparent}}
.kd-stage.go .kd-gain{opacity:0;transition:opacity .15s ease 0s}   /* the card is leaving: the words go first, so none is left on an empty screen */
