.game-wallet {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 30px;
    margin-left: auto;
    padding: 2px 8px 2px 5px;
    border: 0;
    border-radius: 6px;
    color: #111827;
    background: #f3f4f6;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    isolation: isolate;
    overflow: visible;
}

.game-wallet::after {
    display: none;
}

.game-wallet__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 0;
    color: inherit;
    font-size: 21px;
    font-weight: 900;
    line-height: 1;
    background: transparent;
    box-shadow: none;
}

.game-wallet__value {
    display: inline-block;
    min-width: 10px;
    max-width: 82px;
    overflow: hidden;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: none;
}

.game-wallet__toast {
    position: absolute;
    right: 6px;
    bottom: -17px;
    color: #d86400;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(4px);
}

.game-wallet.is-awarding {
    animation: game-wallet-pop 0.36s ease;
}

.game-wallet.is-awarding::after {
    animation: game-wallet-shine 0.74s ease;
}

.game-wallet.is-awarding-medium {
    animation: game-wallet-pop-medium 0.48s ease;
}

.game-wallet.is-awarding-large {
    animation: game-wallet-pop-large 0.62s ease;
}

.game-wallet.is-awarding .game-wallet__toast {
    animation: game-wallet-toast 1.25s ease forwards;
}

.game-wallet.is-awarding-large .game-wallet__toast {
    animation-duration: 1.45s;
}

.game-wallet.is-spending {
    animation: game-wallet-spend 0.42s ease;
}

.game-wallet.is-spending .game-wallet__toast {
    color: #7a3b00;
    animation: game-wallet-toast 1.05s ease forwards;
}

.game-wallet-particles {
    position: fixed;
    inset: 0;
    z-index: 2147483640;
    pointer-events: none;
}

.game-wallet-particle {
    position: fixed;
    left: 0;
    top: 0;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.92), transparent 23%),
        linear-gradient(180deg, #fff0a7, #ffba31 62%, #c66f0a);
    box-shadow:
        inset 0 0 0 1px rgba(255, 247, 173, 0.7),
        inset 0 -3px 4px rgba(154, 76, 0, 0.22),
        0 6px 10px rgba(136, 72, 0, 0.18);
    opacity: 0;
    transform: translate(var(--start-x), var(--start-y)) scale(0.64);
    animation: game-wallet-particle-fly 0.92s cubic-bezier(0.2, 0.72, 0.22, 1) forwards;
}

.game-wallet-particle::after {
    content: "LC";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #744005;
    font-size: 5px;
    font-weight: 900;
    line-height: 1;
    opacity: 0.82;
}

.game-wallet-particle.is-medium {
    width: 15px;
    height: 15px;
    animation-duration: 1s;
}

.game-wallet-particle.is-large {
    width: 17px;
    height: 17px;
    animation-duration: 1.08s;
}

@keyframes game-wallet-pop {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes game-wallet-pop-medium {
    0% {
        transform: scale(1);
    }

    38% {
        transform: scale(1.1);
    }

    62% {
        transform: scale(0.98);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes game-wallet-pop-large {
    0% {
        transform: scale(1);
    }

    28% {
        transform: scale(1.14);
    }

    55% {
        transform: scale(0.97);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes game-wallet-shine {
    0% {
        opacity: 0;
        transform: rotate(0deg) scale(0.92);
    }

    28% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
        transform: rotate(190deg) scale(1.18);
    }
}

@keyframes game-wallet-spend {
    0%,
    100% {
        transform: translateX(0);
    }

    24% {
        transform: translateX(-2px) scale(0.98);
    }

    50% {
        transform: translateX(2px) scale(1.01);
    }

    74% {
        transform: translateX(-1px);
    }
}

@keyframes game-wallet-particle-fly {
    0% {
        opacity: 0;
        transform: translate(var(--start-x), var(--start-y)) scale(0.58);
    }

    14% {
        opacity: 1;
        transform:
            translate(
                calc(var(--start-x) + var(--mid-x)),
                calc(var(--start-y) + var(--mid-y))
            )
            scale(1.08);
    }

    72% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform:
            translate(
                calc(var(--start-x) + var(--end-x)),
                calc(var(--start-y) + var(--end-y))
            )
            scale(0.34);
    }
}

@keyframes game-wallet-toast {
    0% {
        opacity: 0;
        transform: translateY(6px);
    }

    18% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@media (max-width: 370px) {
    .game-wallet {
        min-height: 30px;
        padding: 2px 8px 2px 5px;
    }

    .game-wallet__label {
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
}
