.festival-effect-layer{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:16px;border:0;background:transparent;color:#fff9e6;overflow:hidden;pointer-events:none;z-index:100;display:grid;place-items:center;text-align:center;font-family:CafeText,sans-serif;}
.festival-effect-layer[hidden]{display:none!important}.festival-effect-layer::backdrop{background:transparent;pointer-events:none}
.festival-effect-layer[data-skippable="true"]{pointer-events:auto;cursor:pointer;touch-action:manipulation;}
.festival-cue-skip{font-size:11px;line-height:1.4;color:inherit;opacity:.75;}
.festival-cue{position:relative;width:min(390px,calc(100vw - 32px));padding:20px 18px 18px;border:2px solid #ead6a0;border-radius:25px;background:linear-gradient(115deg,#516c46f5,#829562f5 55%,#596f46f5);box-shadow:0 12px 40px #29331945,inset 0 0 0 4px #fff6d11c;display:flex;flex-direction:column;align-items:center;gap:7px;animation:festival-sweep var(--festival-duration) cubic-bezier(.18,.7,.25,1) both;will-change:transform,opacity;isolation:isolate;}
.festival-cue::before{content:'';position:absolute;inset:-25px -10%;background:radial-gradient(ellipse,#ffe7a837,transparent 68%);z-index:-1;pointer-events:none}
.festival-cue-kicker{font-family:CafeNote,CafeText,sans-serif;font-size:clamp(22px,5vw,30px);color:#ffe9a9;line-height:1.25;letter-spacing:1px;text-shadow:0 2px 1px #31412c;}
.festival-cue-name{font-size:clamp(18px,4.8vw,25px);line-height:1.25;color:#fffcef;text-shadow:0 2px 1px #3e4d35;overflow-wrap:anywhere;}
.festival-cue-art{display:grid;place-items:center;width:68px;height:68px;margin:0 auto;filter:drop-shadow(0 4px 3px #25381940);}
.festival-cue-art .illustration,.festival-cue-art .machine-art{display:block;width:100%;height:100%;}
.festival-cue-detail{font-size:12px;line-height:1.4;color:#fff8dc;}
.festival-effect-layer:is([data-phase=complete],[data-phase=level-up]) .festival-cue{background:linear-gradient(120deg,#fffbebf7,#f5e2b8f7);border-color:#e0be70;color:#634a2d;padding-top:23px;}
.festival-effect-layer:is([data-phase=complete],[data-phase=level-up]) .festival-cue-kicker{color:#997023;text-shadow:0 1px #fffef5;font-size:clamp(27px,6vw,34px);}
.festival-effect-layer:is([data-phase=complete],[data-phase=level-up]) .festival-cue-name{color:#695338;text-shadow:none;font-size:16px;}
.festival-effect-layer:is([data-phase=complete],[data-phase=level-up]) .festival-cue-art{width:102px;height:102px;margin:1px 0 4px;animation:festival-prize 680ms 190ms cubic-bezier(.15,.8,.25,1) both;}
.festival-cue-reward{font-size:clamp(14px,3.8vw,18px);line-height:1.4;overflow-wrap:anywhere;}
.festival-cue-xp{padding:4px 13px;border-radius:20px;background:#6b834c;color:#fffbe9;font-size:14px;font-weight:800;line-height:1.4;}
.festival-effect-layer:is([data-phase=complete],[data-phase=level-up]) .festival-cue-detail{color:#7b674b;}
.festival-effect-layer[data-phase=cancel] .festival-cue{max-width:330px;padding:16px;gap:5px;background:#64765cef;}
.festival-effect-layer[data-phase=cancel] .festival-cue-art{display:none}.festival-effect-layer[data-phase=cancel] .festival-cue-kicker{font-family:CafeText,sans-serif;font-size:18px;}
.festival-cue-spark{position:absolute;left:50%;top:50%;width:12px;height:12px;background:#fff8df;clip-path:polygon(50% 0,62% 37%,100% 50%,62% 63%,50% 100%,38% 63%,0 50%,38% 37%);filter:drop-shadow(0 0 4px #fff7c1);animation:festival-spark 1050ms var(--delay) ease-out both;pointer-events:none;}
.festival-cue-spark:nth-of-type(3n){width:7px;height:7px;background:#edc36d;border-radius:2px;clip-path:none}
@keyframes festival-sweep{0%{opacity:0;transform:translateX(-60vw) scale(.94)}15%{opacity:1;transform:translateX(0) scale(1)}78%{opacity:1;transform:translateX(0) scale(1)}100%{opacity:0;transform:translateX(60vw) scale(.97)}}
@keyframes festival-prize{0%{opacity:0;transform:scale(.7)}70%{opacity:1;transform:scale(1.08)}100%{opacity:1;transform:scale(1)}}
@keyframes festival-spark{0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}25%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(.35) rotate(100deg)}}
.festival-motion-reduced .festival-cue,.festival-motion-reduced .festival-cue-art{animation:none!important;will-change:auto;}
.festival-motion-reduced .festival-cue-spark{display:none}
@media(prefers-reduced-motion:reduce){.festival-cue,.festival-cue-art,.festival-cue-spark{animation:none!important}.festival-cue-spark{display:none}}
@media(max-height:450px){.festival-cue{padding:12px;gap:4px}.festival-effect-layer:is([data-phase=complete],[data-phase=level-up]) .festival-cue{padding:12px}.festival-effect-layer:is([data-phase=complete],[data-phase=level-up]) .festival-cue-art{width:66px;height:66px}.festival-cue-kicker{font-size:22px!important}}

.festival-effect-layer[data-phase="level-up"] .festival-cue-name{font-size:30px;font-variant-numeric:tabular-nums}

.festival-effect-layer[data-phase="collection"] .festival-cue{width:min(310px,calc(100vw - 32px));padding:16px;gap:5px;background:linear-gradient(120deg,#fffbebf5,#efe6ccf5);border-color:#b8be8d;color:#61543d;}
.festival-effect-layer[data-phase="collection"] .festival-cue-kicker{font-family:CafeText,sans-serif;font-size:18px;color:#667e4e;text-shadow:none;letter-spacing:0;}
.festival-effect-layer[data-phase="collection"] .festival-cue-name{font-size:17px;color:#61543d;text-shadow:none;}
.festival-effect-layer[data-phase="collection"] .festival-cue-art{width:86px;height:86px;animation:festival-prize 430ms 80ms ease-out both;}
.festival-effect-layer[data-phase="collection"] .festival-cue-reward{font-size:13px;color:#62794a;}
.festival-effect-layer[data-phase="collection"] .festival-cue-detail{color:#7b6b51;font-size:11px;}
.festival-cue-art .collection-art{display:block;width:100%;height:100%;}
.festival-collection-gifts{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;max-width:100%;padding-top:5px;border-top:1px solid #b8b58b88;color:#65533d;}
.festival-collection-gift{display:flex;align-items:center;gap:4px;max-width:100%;font-size:10px;}
.festival-collection-gift>i{display:block;flex:0 0 34px;width:34px;height:34px;}
.festival-collection-gift svg{display:block;width:100%;height:100%;}
.festival-collection-gift small{font-size:10px;line-height:1.3;}

/* Completed festivals finish their whole reward sequence before replay confirmation. */
.festival-effect-layer[data-phase="complete"]{pointer-events:auto;cursor:default;touch-action:none}
