.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[hidden] {
    display: none;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 28, 28, 0.45);
    backdrop-filter: blur(2px);
    animation: modal-fade 0.25s ease;
}

.modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #cdd3f7;
    border-radius: var(--radius-lg);
    padding: clamp(28px, 4vw, 44px) clamp(22px, 3vw, 40px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    animation: modal-pop 0.25s ease;
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    color: var(--color-text);
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 2px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.modal__close:hover {
    background: var(--color-white);
    transform: scale(1.05);
}

.modal__title {
    font-family: var(--font-title);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-text);
    margin: 0 0 22px;
}

.modal__form {
    margin-top: 0;
}

@keyframes modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-pop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}