/* Koepanda 10.108.28 — unified automatic result-stage celebration */
.koepanda-result-stage{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;padding:20px;background:rgba(28,55,46,.42);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);opacity:0;transition:opacity .24s ease;overflow:hidden}
.koepanda-result-stage.is-show{opacity:1}.koepanda-result-stage[hidden]{display:none!important}
.koepanda-result-stage-card{position:relative;width:min(360px,90vw);padding:30px 22px 22px;border-radius:32px;background:linear-gradient(155deg,#fffef8,#edf9ef 64%,#fff8d9);border:1px solid rgba(255,255,255,.92);box-shadow:0 30px 80px rgba(31,65,53,.30);text-align:center;transform:translateY(24px) scale(.82);opacity:.5;transition:transform .46s cubic-bezier(.16,.9,.24,1.25),opacity .28s ease;isolation:isolate}
.koepanda-result-stage.is-show .koepanda-result-stage-card{transform:translateY(0) scale(1);opacity:1}
.koepanda-result-stage.is-perfect .koepanda-result-stage-card{background:linear-gradient(150deg,#fff9ca,#f5ffea 55%,#e7f8ff)}
.koepanda-result-stage.is-near .koepanda-result-stage-card{background:linear-gradient(155deg,#fffbe8,#eef8ef 60%,#fff0dc)}
.koepanda-result-stage.is-retry .koepanda-result-stage-card{background:linear-gradient(155deg,#fff8ef,#f4f8ef)}
.koepanda-result-stage-close{position:absolute;right:13px;top:12px;width:38px;height:38px;border:0;border-radius:50%;background:rgba(49,99,80,.09);color:#557168;font-size:22px;font-weight:800}
.koepanda-result-stage-mascot{font-size:72px;line-height:1;margin:3px 0 4px;animation:kpResultBounce .8s cubic-bezier(.18,.8,.25,1.25) both}
.koepanda-result-stage-kicker{display:block;margin-top:4px;color:#d5952b;font-size:26px;font-weight:1000;letter-spacing:.045em}.koepanda-result-stage.is-near .koepanda-result-stage-kicker{color:#d47b54}.koepanda-result-stage.is-retry .koepanda-result-stage-kicker{color:#b47750}
.koepanda-result-stage-title{display:block;margin-top:5px;color:#286b56;font-size:22px;font-weight:1000}.koepanda-result-stage-score{display:inline-flex;align-items:center;justify-content:center;margin-top:10px;padding:8px 17px;border-radius:999px;background:#fff;color:#2d765f;font-size:18px;font-weight:1000;box-shadow:0 7px 18px rgba(50,102,80,.11)}
.koepanda-result-stage-message{display:block;margin:12px auto 0;max-width:280px;color:#677d74;font-size:13px;line-height:1.65;font-weight:850}
.koepanda-result-stage-ok{width:100%;min-height:52px;margin-top:18px;border:0;border-radius:18px;background:#2f8068;color:#fff;font-size:15px;font-weight:1000;box-shadow:0 9px 20px rgba(47,128,104,.22)}.koepanda-result-stage-ok:active{transform:scale(.985)}
.koepanda-result-stage-burst{position:absolute;inset:-80px;z-index:-1;pointer-events:none}.koepanda-result-stage-burst i{position:absolute;left:50%;top:50%;font-style:normal;font-size:24px;opacity:0;animation:kpResultBurst 1.25s ease-out forwards}.koepanda-result-stage-burst i:nth-child(1){--x:-150px;--y:-170px;animation-delay:.02s}.koepanda-result-stage-burst i:nth-child(2){--x:-72px;--y:-205px;animation-delay:.09s}.koepanda-result-stage-burst i:nth-child(3){--x:18px;--y:-198px;animation-delay:.04s}.koepanda-result-stage-burst i:nth-child(4){--x:120px;--y:-155px;animation-delay:.12s}.koepanda-result-stage-burst i:nth-child(5){--x:165px;--y:-22px;animation-delay:.06s}.koepanda-result-stage-burst i:nth-child(6){--x:140px;--y:118px;animation-delay:.14s}.koepanda-result-stage-burst i:nth-child(7){--x:55px;--y:170px;animation-delay:.03s}.koepanda-result-stage-burst i:nth-child(8){--x:-62px;--y:168px;animation-delay:.11s}.koepanda-result-stage-burst i:nth-child(9){--x:-155px;--y:100px;animation-delay:.07s}.koepanda-result-stage-burst i:nth-child(10){--x:-172px;--y:-35px;animation-delay:.16s}
.koepanda-result-stage.is-near .koepanda-result-stage-burst i:nth-child(n+15),.koepanda-result-stage.is-retry .koepanda-result-stage-burst i:nth-child(n+7){display:none}
.koepanda-result-reopen{width:100%;min-height:44px;margin-top:9px;border:1px solid rgba(47,128,104,.18);border-radius:15px;background:rgba(255,255,255,.78);color:#337660;font-size:13px;font-weight:950}.koepanda-result-reopen:active{transform:scale(.985)}
@keyframes kpResultBounce{0%{transform:translateY(18px) scale(.7) rotate(-5deg)}50%{transform:translateY(-8px) scale(1.12) rotate(4deg)}75%{transform:translateY(2px) scale(.97) rotate(-2deg)}100%{transform:none}}
@keyframes kpResultBurst{0%{opacity:0;transform:translate(-50%,-50%) scale(.3) rotate(0)}18%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) scale(1.2) rotate(180deg)}}
@media(max-width:390px){.koepanda-result-stage-card{padding:27px 18px 19px;border-radius:28px}.koepanda-result-stage-mascot{font-size:64px}.koepanda-result-stage-kicker{font-size:23px}.koepanda-result-stage-title{font-size:20px}}
@media(prefers-reduced-motion:reduce){.koepanda-result-stage,.koepanda-result-stage-card,.koepanda-result-stage-mascot,.koepanda-result-stage-burst i{animation:none!important;transition:none!important}}

/* Koepanda 10.108.29 — iPhone auto-popup + result-card layout fix */
.initials-result>.koepanda-result-reopen,.dtnl-result>.koepanda-result-reopen{grid-column:1/-1!important;width:100%!important;min-height:48px!important;margin:0!important;white-space:nowrap!important;border-radius:16px!important;font-size:13px!important}
.initials-result>.koepanda-result-reopen{margin-top:-2px!important}
.koepanda-result-stage{padding:max(18px,env(safe-area-inset-top)) 18px max(18px,env(safe-area-inset-bottom));}
.koepanda-result-stage-card{max-height:calc(100dvh - 42px);overflow:auto;-webkit-overflow-scrolling:touch}
@media(max-width:390px){.koepanda-result-reopen{font-size:13px!important}.koepanda-result-stage-card{width:min(350px,92vw)}}


/* Koepanda 10.108.30 — vivid result confetti + direct close action */
.koepanda-result-stage-burst{inset:-105px;overflow:visible}
.koepanda-result-stage-burst i{font-size:26px;font-weight:1000;text-shadow:0 2px 3px rgba(67,58,34,.12);animation-duration:1.45s}
.koepanda-result-stage-burst i:nth-child(5n+1){color:#ff4f73}
.koepanda-result-stage-burst i:nth-child(5n+2){color:#ffb313}
.koepanda-result-stage-burst i:nth-child(5n+3){color:#24bfe8}
.koepanda-result-stage-burst i:nth-child(5n+4){color:#7358e8}
.koepanda-result-stage-burst i:nth-child(5n){color:#34c47a}
.koepanda-result-stage-burst i:nth-child(1){--x:-175px;--y:-190px;animation-delay:.01s}
.koepanda-result-stage-burst i:nth-child(2){--x:-98px;--y:-225px;animation-delay:.07s}
.koepanda-result-stage-burst i:nth-child(3){--x:-16px;--y:-232px;animation-delay:.02s}
.koepanda-result-stage-burst i:nth-child(4){--x:78px;--y:-218px;animation-delay:.10s}
.koepanda-result-stage-burst i:nth-child(5){--x:164px;--y:-175px;animation-delay:.04s}
.koepanda-result-stage-burst i:nth-child(6){--x:198px;--y:-84px;animation-delay:.12s}
.koepanda-result-stage-burst i:nth-child(7){--x:202px;--y:18px;animation-delay:.03s}
.koepanda-result-stage-burst i:nth-child(8){--x:185px;--y:116px;animation-delay:.09s}
.koepanda-result-stage-burst i:nth-child(9){--x:128px;--y:188px;animation-delay:.01s}
.koepanda-result-stage-burst i:nth-child(10){--x:42px;--y:218px;animation-delay:.14s}
.koepanda-result-stage-burst i:nth-child(11){--x:-48px;--y:220px;animation-delay:.05s}
.koepanda-result-stage-burst i:nth-child(12){--x:-132px;--y:188px;animation-delay:.11s}
.koepanda-result-stage-burst i:nth-child(13){--x:-190px;--y:118px;animation-delay:.02s}
.koepanda-result-stage-burst i:nth-child(14){--x:-205px;--y:24px;animation-delay:.13s}
.koepanda-result-stage-burst i:nth-child(15){--x:-198px;--y:-86px;animation-delay:.06s}
.koepanda-result-stage-burst i:nth-child(16){--x:-142px;--y:-150px;animation-delay:.16s}
.koepanda-result-stage-burst i:nth-child(17){--x:116px;--y:-140px;animation-delay:.08s}
.koepanda-result-stage-burst i:nth-child(18){--x:150px;--y:72px;animation-delay:.18s}
.koepanda-result-stage-burst i:nth-child(19){--x:4px;--y:176px;animation-delay:.09s}
.koepanda-result-stage-burst i:nth-child(20){--x:-150px;--y:64px;animation-delay:.20s}
.koepanda-result-stage.is-perfect .koepanda-result-stage-burst i{font-size:28px;animation-duration:1.6s}
.koepanda-result-stage.is-near .koepanda-result-stage-burst i:nth-child(n+15){display:none}
.koepanda-result-stage.is-retry .koepanda-result-stage-burst i:nth-child(n+7){display:none}
.koepanda-result-stage-ok{letter-spacing:.035em}


/* Koepanda 10.108.31 — stronger perfect-score stage */
.koepanda-perfect-crown,.koepanda-perfect-rays{display:none}
.koepanda-result-stage.is-perfect{background:radial-gradient(circle at 50% 34%,rgba(255,238,111,.26),rgba(28,55,46,.46) 47%,rgba(20,42,36,.53) 100%)}
.koepanda-result-stage.is-perfect .koepanda-result-stage-card{overflow:visible;background:linear-gradient(145deg,#fff5a8 0%,#fffdf0 30%,#efffe9 63%,#e8f8ff 100%);border:2px solid rgba(255,204,49,.72);box-shadow:0 0 0 7px rgba(255,238,131,.18),0 24px 75px rgba(79,97,37,.36),0 0 58px rgba(255,205,55,.36)}
.koepanda-result-stage.is-perfect .koepanda-result-stage-card:after{content:"";position:absolute;inset:10px;border:1px solid rgba(255,218,80,.45);border-radius:24px;pointer-events:none}
.koepanda-result-stage.is-perfect .koepanda-perfect-rays{display:block;position:absolute;left:50%;top:43%;width:520px;height:520px;transform:translate(-50%,-50%);z-index:-2;border-radius:50%;background:repeating-conic-gradient(from 0deg,rgba(255,226,83,.22) 0 6deg,transparent 6deg 17deg);animation:kpPerfectSpin 12s linear infinite;mask-image:radial-gradient(circle,rgba(0,0,0,.96) 0 28%,rgba(0,0,0,.5) 49%,transparent 70%);-webkit-mask-image:radial-gradient(circle,rgba(0,0,0,.96) 0 28%,rgba(0,0,0,.5) 49%,transparent 70%)}
.koepanda-result-stage.is-perfect .koepanda-perfect-crown{display:block;position:absolute;left:50%;top:-30px;transform:translateX(-50%) rotate(-7deg);font-size:44px;line-height:1;filter:drop-shadow(0 5px 8px rgba(163,108,7,.24));animation:kpPerfectCrown .72s cubic-bezier(.18,.85,.25,1.32) both .16s}
.koepanda-result-stage.is-perfect .koepanda-result-stage-mascot{font-size:82px;animation:kpPerfectMascot 1.05s cubic-bezier(.18,.8,.25,1.3) both}
.koepanda-result-stage.is-perfect .koepanda-result-stage-kicker{margin-top:7px;font-size:31px;color:#f29a00;text-shadow:0 2px 0 #fff,0 4px 12px rgba(238,151,0,.18);letter-spacing:.055em;animation:kpPerfectPop .8s cubic-bezier(.16,.9,.24,1.28) both .12s}
.koepanda-result-stage.is-perfect .koepanda-result-stage-title{font-size:23px;color:#247258}
.koepanda-result-stage.is-perfect .koepanda-result-stage-score{padding:10px 21px;background:linear-gradient(180deg,#fff,#fff9cc);color:#c67e00;border:1px solid rgba(243,190,26,.36);font-size:21px;box-shadow:0 9px 23px rgba(211,154,15,.20);animation:kpPerfectScore .76s cubic-bezier(.17,.85,.2,1.25) both .22s}
.koepanda-result-stage.is-perfect .koepanda-result-stage-message{color:#5e776c;font-size:14px}
.koepanda-result-stage.is-perfect .koepanda-result-stage-ok{background:linear-gradient(180deg,#35a377,#258162);box-shadow:0 10px 23px rgba(37,129,98,.28),0 0 0 3px rgba(255,255,255,.6) inset}
.koepanda-result-stage.is-perfect .koepanda-result-stage-burst i{font-size:32px;animation-name:kpPerfectBurst;animation-duration:1.85s;text-shadow:0 2px 4px rgba(74,48,0,.14)}
.koepanda-result-stage.is-perfect .koepanda-result-stage-burst i:nth-child(3n+1){filter:drop-shadow(0 0 5px rgba(255,96,126,.32))}
.koepanda-result-stage.is-perfect .koepanda-result-stage-burst i:nth-child(3n+2){filter:drop-shadow(0 0 5px rgba(255,183,23,.34))}
.koepanda-result-stage.is-perfect .koepanda-result-stage-burst i:nth-child(3n){filter:drop-shadow(0 0 5px rgba(48,188,234,.32))}
@keyframes kpPerfectSpin{to{transform:translate(-50%,-50%) rotate(360deg)}}
@keyframes kpPerfectCrown{0%{opacity:0;transform:translateX(-50%) translateY(-20px) scale(.45) rotate(-18deg)}62%{opacity:1;transform:translateX(-50%) translateY(3px) scale(1.16) rotate(3deg)}100%{opacity:1;transform:translateX(-50%) scale(1) rotate(-7deg)}}
@keyframes kpPerfectMascot{0%{transform:translateY(22px) scale(.62) rotate(-7deg)}42%{transform:translateY(-12px) scale(1.18) rotate(6deg)}68%{transform:translateY(4px) scale(.96) rotate(-3deg)}86%{transform:translateY(-3px) scale(1.04) rotate(2deg)}100%{transform:none}}
@keyframes kpPerfectPop{0%{opacity:0;transform:scale(.6)}58%{opacity:1;transform:scale(1.14)}100%{opacity:1;transform:scale(1)}}
@keyframes kpPerfectScore{0%{opacity:0;transform:scale(.55)}65%{opacity:1;transform:scale(1.12)}100%{opacity:1;transform:scale(1)}}
@keyframes kpPerfectBurst{0%{opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(0)}13%{opacity:1}72%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) scale(1.45) rotate(260deg)}}
@media(max-width:390px){.koepanda-result-stage.is-perfect .koepanda-result-stage-mascot{font-size:72px}.koepanda-result-stage.is-perfect .koepanda-result-stage-kicker{font-size:27px}.koepanda-result-stage.is-perfect .koepanda-perfect-crown{font-size:38px;top:-24px}}
@media(prefers-reduced-motion:reduce){.koepanda-result-stage.is-perfect .koepanda-perfect-rays,.koepanda-result-stage.is-perfect .koepanda-perfect-crown,.koepanda-result-stage.is-perfect .koepanda-result-stage-kicker,.koepanda-result-stage.is-perfect .koepanda-result-stage-score{animation:none!important}}
