.scratch2000-scratch-zone canvas {
    cursor: crosshair;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    transition: opacity 180ms linear;
}

.scratch2000-scratch-zone.is-scratching {
    animation: scratch2000Tap 150ms steps(2, end);
}

.scratch2000-scratch-zone.is-revealed canvas {
    opacity: 0;
    pointer-events: none;
}

.scratch2000-scratch-zone.is-hot canvas[data-cd-canvas],
.scratch2000-scratch-zone.is-hot canvas[data-crt-canvas] {
    animation: scratch2000HotPulse 820ms steps(4, end) infinite;
}

.scratch2000-foil-shine {
    position: absolute;
    z-index: 5;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scratch2000-chip {
    position: absolute;
    z-index: 6;
    opacity: 0.9;
    pointer-events: none;
    image-rendering: pixelated;
    animation: scratch2000Chip 480ms steps(6, end) forwards;
}

.scratch2000-sparkle {
    position: absolute;
    z-index: 7;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: var(--sparkle-color);
    clip-path: polygon(37.5% 0, 62.5% 0, 62.5% 37.5%, 100% 37.5%, 100% 62.5%, 62.5% 62.5%, 62.5% 100%, 37.5% 100%, 37.5% 62.5%, 0 62.5%, 0 37.5%, 37.5% 37.5%);
    pointer-events: none;
    animation: scratch2000Sparkle 640ms steps(6, end) forwards;
}

.scratch2000-sparkle-ring {
    position: absolute;
    z-index: 6;
    width: 14px;
    height: 14px;
    margin: -10px 0 0 -10px;
    border: 3px solid var(--sparkle-color);
    pointer-events: none;
    animation: scratch2000SparkleRing 520ms steps(5, end) forwards;
}

.scratch2000-modal .is-popping {
    animation: scratch2000RevealPop 600ms cubic-bezier(0.2, 0.86, 0.32, 1.4) both;
}

.has-coin-cursor,
.has-coin-cursor * {
    cursor: none !important;
}

.scratch2000-coin-cursor {
    position: fixed;
    z-index: 100002;
    left: 0;
    top: 0;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    pointer-events: none;
}

.scratch2000-coin-cursor[hidden] {
    display: none;
}

.scratch2000-coin-cursor img {
    display: block;
    width: 100%;
    height: 100%;
    rotate: var(--coin-tilt, 0deg);
    image-rendering: pixelated;
    filter: drop-shadow(2px 3px 0 rgba(12, 4, 40, 0.6));
    transition: rotate 90ms steps(3, end);
}

.scratch2000-coin-cursor.is-pressing img {
    scale: 0.92 1;
    animation: scratch2000CoinWobble 180ms steps(3, end) infinite;
}

.scratch2000-flying-coin {
    position: fixed;
    z-index: 100003;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    pointer-events: none;
    image-rendering: pixelated;
}

.scratch2000-modal-balance img.is-coin-hit {
    animation: scratch2000CoinHit 360ms steps(4, end);
}

.scratch2000-result-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 6px 0 0;
    color: #ffd428;
    font-size: 30px;
    line-height: 1;
    text-shadow: 2px 2px 0 #6b2b00, 0 0 10px rgba(255, 212, 40, 0.5);
}

.scratch2000-result-amount[hidden] {
    display: none;
}

.scratch2000-result-amount img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    animation: scratch2000CoinFlip 900ms steps(6, end) infinite;
}

.scratch2000-result-amount b {
    font-variant-numeric: tabular-nums;
}

@keyframes scratch2000Tap {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(1px, 1px);
    }
}

@keyframes scratch2000Chip {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0);
    }
    55% {
        transform: translate(var(--chip-mid), var(--chip-rise)) rotate(90deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--chip-x), var(--chip-drop)) rotate(180deg);
    }
}

@keyframes scratch2000HotPulse {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(255, 242, 103, 0));
    }
    50% {
        filter: drop-shadow(0 0 3px #fff267) drop-shadow(0 0 8px #ff58c7) brightness(1.12);
    }
}

@keyframes scratch2000Sparkle {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(0.6);
    }
    40% {
        opacity: 1;
        transform: translate(calc(var(--sparkle-x) * 0.7), calc(var(--sparkle-y) * 0.7)) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translate(var(--sparkle-x), var(--sparkle-y)) scale(0.4);
    }
}

@keyframes scratch2000SparkleRing {
    0% {
        opacity: 1;
        transform: scale(0.4);
    }
    100% {
        opacity: 0;
        transform: scale(4.2);
    }
}

@keyframes scratch2000RevealPop {
    0% {
        scale: 0.4;
        rotate: -8deg;
    }
    45% {
        scale: 1.35;
        rotate: 4deg;
    }
    70% {
        scale: 0.92;
        rotate: -2deg;
    }
    100% {
        scale: 1;
        rotate: 0deg;
    }
}

@keyframes scratch2000CoinWobble {
    0%, 100% {
        translate: 0 0;
    }
    33% {
        translate: -2px 1px;
    }
    66% {
        translate: 2px -1px;
    }
}

@keyframes scratch2000CoinHit {
    0%, 100% {
        scale: 1;
    }
    40% {
        scale: 1.45;
    }
}

@keyframes scratch2000CoinFlip {
    0%, 100% {
        scale: 1 1;
    }
    50% {
        scale: 0.2 1;
    }
}

@media (pointer: coarse) {
    .scratch2000-scratch-zone.is-hot canvas[data-cd-canvas],
    .scratch2000-scratch-zone.is-hot canvas[data-crt-canvas] {
        animation: scratch2000HotPulseLite 820ms steps(4, end) infinite;
    }

    @keyframes scratch2000HotPulseLite {
        0%, 100% {
            opacity: 1;
        }
        50% {
            opacity: 0.72;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .scratch2000-scratch-zone,
    .scratch2000-scratch-zone canvas,
    .scratch2000-chip,
    .scratch2000-modal .is-popping,
    .scratch2000-coin-cursor img,
    .scratch2000-result-amount img,
    .scratch2000-modal-balance img,
    .scratch2000-cd-ticket.is-finale .scratch2000-cd-spin,
    .scratch2000-crt-ticket.is-finale .scratch2000-crt-screen,
    .scratch2000-crt-ticket.is-finale .scratch2000-crt-screen::before,
    .scratch2000-play-ticket--floppy.is-finale .scratch2000-floppy-shutter {
        animation: none !important;
        transition: none !important;
    }

    .scratch2000-scratch-zone.is-hot canvas[data-cd-canvas],
    .scratch2000-scratch-zone.is-hot canvas[data-crt-canvas] {
        filter: drop-shadow(0 0 3px #fff267);
    }
}
