.confetti {
    position: fixed;
    inset: 0;
    z-index: 50;
    overflow: hidden;
    pointer-events: none;
}

.confetti i {
    position: absolute;
    width: 10px;
    height: 14px;
    margin: -7px 0 0 -5px;
    border-radius: 2px;
    will-change: transform, opacity;
}

@keyframes sweep-across {
    0% { clip-path: inset(0 100% 0 0); }
    45% { clip-path: inset(0 0 0 0); }
    100% { clip-path: inset(0 0 0 100%); }
}

@keyframes count-land {
    from { opacity: 0; transform: scale(1.6); filter: blur(14px); }
    to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes dash-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.intro::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 10;
    background: var(--color-primary);
    pointer-events: none;
    animation: sweep-across 760ms cubic-bezier(0.65, 0, 0.35, 1) both;
}

.intro .intro__count.anim-clip-rise {
    animation: count-land 800ms var(--ease-out) 300ms both;
}

.intro__progress .is-current {
    transform-origin: left;
    animation: dash-grow 500ms var(--ease-out) 700ms both;
}

@keyframes tick-pulse {
    from { transform: scale(1.3); }
    to { transform: scale(1); }
}

.timer.is-urgent .timer__digits {
    display: inline-block;
    animation: tick-pulse 1s var(--ease-out) infinite;
}

.timer.is-urgent .timer__track {
    height: 5px;
}

@keyframes shine {
    from { transform: translateX(-150%) skewX(-20deg); }
    to { transform: translateX(400%) skewX(-20deg); }
}

.quiz-reveal .choice.is-correct,
.hl-reveal .choice.is-correct {
    position: relative;
    overflow: hidden;
}

.quiz-reveal .choice.is-correct::after,
.hl-reveal .choice.is-correct::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.6), transparent);
    pointer-events: none;
    animation: shine 900ms var(--ease-out) 350ms both;
}

.choice__pickers .avatar {
    animation: pop-in 420ms var(--ease-spring) 500ms both;
}

.choice__pickers .avatar:nth-child(2) { animation-delay: 570ms; }
.choice__pickers .avatar:nth-child(3) { animation-delay: 640ms; }
.choice__pickers .avatar:nth-child(4) { animation-delay: 710ms; }
.choice__pickers .avatar:nth-child(5) { animation-delay: 780ms; }
.choice__pickers .avatar:nth-child(6) { animation-delay: 850ms; }
.choice__pickers .avatar:nth-child(7) { animation-delay: 920ms; }
.choice__pickers .avatar:nth-child(8) { animation-delay: 990ms; }

.ladder__step.is-current {
    animation: pop-in 420ms var(--ease-spring) both;
}

@keyframes from-right {
    from { opacity: 0; transform: translateX(45vw); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes vs-pulse {
    50% { color: var(--color-primary-strong); transform: scale(1.2); }
}

@keyframes nudge-up {
    50% { transform: translateY(-4px); }
}

@keyframes nudge-down {
    50% { transform: translateY(4px); }
}

.hl:not(.hl-reveal) .hl-card.is-reference {
    animation: from-right 700ms var(--ease-out) both;
}

.hl:not(.hl-reveal) .hl-duel__vs {
    display: inline-block;
    animation: vs-pulse 1.6s ease-in-out infinite;
}

.hl-card.is-revealed.is-rolling .hl-card__value {
    color: var(--color-text);
    animation: none;
}

.hl:not(.hl-reveal) .hl-choices .icon--up,
.hl-choice:not(:disabled) .icon--up {
    animation: nudge-up 1.2s ease-in-out infinite;
}

.hl:not(.hl-reveal) .hl-choices .icon--down,
.hl-choice:not(:disabled) .icon--down {
    animation: nudge-down 1.2s ease-in-out infinite;
}

@keyframes card-drop {
    0% { opacity: 0; transform: translateY(-60px) scale(1.08); }
    60% { opacity: 1; transform: translateY(6px) scale(1); }
    100% { transform: translateY(0); }
}

.tl-card.is-new {
    animation: card-drop 700ms var(--ease-out) 300ms both;
}

@keyframes leader-flash {
    from { background: var(--color-primary-soft); }
    to { background: transparent; }
}

.standings--round .standing__gain {
    animation: pop-in 420ms var(--ease-spring) both;
    animation-delay: calc(450ms + var(--i, 0) * 60ms);
}

.standings--round .standing__move {
    animation: fade-in 400ms var(--ease-out) 2000ms both;
}

.standings--round .standing.is-leader {
    animation:
        fade-up var(--dur-slow) var(--ease-out) both,
        leader-flash 1400ms var(--ease-out) 2000ms both;
    animation-delay: calc(var(--i, 0) * 60ms), 2000ms;
}

@keyframes winner-bounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-22px); }
}

.podium__col--1 .avatar {
    animation: winner-bounce 800ms var(--ease-out) 1300ms 2;
}

.podium__col--1 {
    background: radial-gradient(70% 55% at 50% 100%, var(--color-primary-soft), transparent 70%), var(--color-bg);
}

@keyframes press-ring {
    from { box-shadow: inset 0 0 0 0 rgb(255 255 255 / 0.55); }
    to { box-shadow: inset 0 0 0 18px rgb(255 255 255 / 0); }
}

@keyframes result-wipe {
    from { clip-path: circle(0% at 50% 100%); }
    to { clip-path: circle(150% at 50% 100%); }
}

@keyframes stamp {
    from { opacity: 0; transform: scale(1.8) rotate(-10deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.choice--button:active:not(:disabled),
.tl-slot-btn:active:not(:disabled),
.option:active:not(:disabled) {
    transform: scale(0.97);
}

.choice--button.is-selected {
    animation: press-ring 600ms var(--ease-out);
}

.p-game .p-result {
    animation: result-wipe 550ms var(--ease-out) both;
}

.p-result__icon .glyph {
    transform-origin: 50% 60%;
    animation: stamp 520ms var(--ease-spring) 280ms both;
}
