.profile-badge-celebration {
    position: fixed;
    inset: 0;
    z-index: 12050;
    display: grid;
    place-items: center;
    padding: 20px;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.12);
    animation: profile-badge-overlay-in 180ms ease-out both;
}

.profile-badge-celebration__burst {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1px;
    height: 1px;
}

.profile-badge-celebration__particle {
    position: absolute;
    left: -5px;
    top: -5px;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--badge-particle-color);
    opacity: 0;
    animation: profile-badge-particle-burst 1.45s cubic-bezier(0.16, 0.84, 0.44, 1) var(--badge-particle-delay) both;
}

.profile-badge-celebration__card {
    position: relative;
    box-sizing: border-box;
    width: min(390px, calc(100vw - 36px));
    min-height: 290px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 34px 28px 30px;
    text-align: center;
    pointer-events: auto;
    animation: profile-badge-card-in 460ms cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.profile-badge-celebration__card--blue {
    border-top: 5px solid #3b82f6;
}

.profile-badge-celebration__card--gold {
    border-top: 5px solid #f5b700;
}

.profile-badge-celebration__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
}

.profile-badge-celebration__badge {
    width: 86px;
    height: 86px;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(15, 23, 42, 0.18));
    animation: profile-badge-icon-in 760ms 120ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.profile-badge-celebration__eyebrow {
    color: #ff5a2a;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-badge-celebration__card strong {
    color: #111827;
    font-size: 1.45rem;
    line-height: 1.25;
}

.profile-badge-celebration__card p {
    max-width: 310px;
    margin: 0;
    color: #5b6473;
    font-size: 0.92rem;
    line-height: 1.55;
}

@keyframes profile-badge-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes profile-badge-card-in {
    from { opacity: 0; transform: translateY(18px) scale(0.88); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes profile-badge-icon-in {
    0% { opacity: 0; transform: scale(0.45) rotate(-15deg); }
    70% { opacity: 1; transform: scale(1.08) rotate(4deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes profile-badge-particle-burst {
    0% { opacity: 0; transform: translate(0, 0) scale(0.2) rotate(0); }
    16% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate(var(--badge-particle-x), var(--badge-particle-y)) scale(0.85) rotate(var(--badge-particle-rotation));
    }
}

@media (max-width: 520px) {
    .profile-badge-celebration {
        align-items: end;
        padding: 14px;
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }

    .profile-badge-celebration__card {
        width: 100%;
        min-height: 260px;
        padding: 30px 22px 26px;
    }

    .profile-badge-celebration__badge {
        width: 76px;
        height: 76px;
    }

    .profile-badge-celebration__card strong {
        font-size: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-badge-celebration,
    .profile-badge-celebration__card,
    .profile-badge-celebration__badge,
    .profile-badge-celebration__particle {
        animation: none !important;
    }
}
