.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    box-sizing: border-box;
    height: 100%;
    height: 100svh;
    background: rgba(0, 0, 0, 0.65);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 40px 16px;
}

.modal-content {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    box-sizing: border-box;
    background-color: var(--muted);
    color: var(--foreground);
    border-radius: 18px;
    padding: 32px;
    position: relative;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 28px;
}

.modal-content h3 {
    margin-top: 24px;
    font-size: 18px;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    border: none;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.modal-button {
    margin-top: 24px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 16px;
    cursor: pointer;
}

.modal-button:hover {
    opacity: 0.9;
}

@media (max-width: 639px) {
    .modal {
        padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
    }
}
