#affiliate-popup-guest {
    box-sizing: border-box;
    width: 460px;
    max-width: calc(100vw - 48px);
    padding: 32px;
    border-radius: 20px;
    text-align: center;
}

.invite-friend-intro {
    display: grid;
    justify-items: center;
    gap: 18px;
    margin-bottom: 14px;
}

#guest-invite-title {
    margin: 0;
    color: #000;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
}

#affiliate-popup-guest .invite-friend-scene {
    grid-row: 1;
    width: 240px;
    max-width: 100%;
    margin: 0;
}

.invite-friend-scene img { display: none; }

.friend-invitation {
    display: block;
    width: 100%;
    height: auto;
}

#affiliate-popup-guest .fancybox-popup__text,
#affiliate-popup-guest .fancybox-popup__text p {
    margin: 0;
    color: #6c6c78;
    font-size: 15px;
    line-height: 1.6;
}

#affiliate-popup-guest .fancybox-popup__text p + p { margin-top: 10px; }

#affiliate-popup-guest .fancybox-popup__buttons {
    display: grid;
    gap: 14px;
    margin: 26px 0 0;
}

#affiliate-popup-guest .fancybox-popup__buttons button {
    width: 100%;
    margin: 0;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
}

#affiliate-popup-guest .btn-grey {
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    color: white;
    background: #5846ed;
}

#affiliate-popup-guest .btn-grey:hover { background: #4939d8; }

#affiliate-popup-guest .btn-default {
    height: auto;
    min-height: 34px;
    padding: 5px;
    border: 0;
    color: #5846ed;
    background: transparent;
}

#affiliate-popup-guest .btn-default:hover { text-decoration: underline; }

@media (prefers-reduced-motion: no-preference) {
    .friend-invitation__envelope {
        transform-origin: 128px 145px;
        animation: invite-envelope-arrive .65s ease-out .12s both;
    }

    .friend-invitation__flap {
        transform-origin: 128px 80px;
        animation: invite-envelope-open .65s ease-in-out .42s both;
    }

    .friend-invitation__card {
        animation: invite-card-rise .8s ease-out .82s both;
    }

    .friend-invitation__portrait {
        --entry-x: -16px;
        animation: invite-portrait-enter .55s ease-out 1.12s both;
    }

    .friend-invitation__portrait--right {
        --entry-x: 16px;
        animation-delay: 1.24s;
    }

    .friend-invitation__link path,
    .friend-invitation__check {
        stroke-dasharray: 1;
        animation: invite-mark-draw .55s ease-in-out 1.63s both;
    }

    .friend-invitation__seal {
        transform-origin: 191px 134px;
        animation: invite-seal-stamp .54s ease-out 1.98s both;
    }

    .friend-invitation__check { animation-delay: 2.12s; }

    @keyframes invite-envelope-arrive {
        from { opacity: 0; transform: translateY(18px) rotate(-8deg) scale(.88); }
        72% { opacity: 1; transform: translateY(-2px) rotate(2deg); }
        to { opacity: 1; transform: none; }
    }

    @keyframes invite-envelope-open {
        from { transform: scaleY(-.85); }
        to { transform: scaleY(1); }
    }

    @keyframes invite-card-rise {
        from { transform: translateY(108px); }
        75% { transform: translateY(-4px); }
        to { transform: translateY(0); }
    }

    @keyframes invite-portrait-enter {
        from { opacity: 0; transform: translateX(var(--entry-x)); }
        to { opacity: 1; transform: translateX(0); }
    }

    @keyframes invite-mark-draw {
        from { stroke-dashoffset: 1; }
        to { stroke-dashoffset: 0; }
    }

    @keyframes invite-seal-stamp {
        from { opacity: 0; transform: scale(1.5) rotate(-16deg); }
        70% { opacity: 1; transform: scale(.92) rotate(2deg); }
        to { opacity: 1; transform: none; }
    }
}
