/* ============================================================
   Popup modals — auto-open on page load, two staggered
   ============================================================ */

#modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

#modal-backdrop.is-visible {
    display: block;
}

.popup-modals-wrapper {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 24px;
    pointer-events: none;
}

#modal-backdrop.is-visible ~ .popup-modals-wrapper {
    display: flex;
}

.popup-modal {
    display: none;
    position: relative;
    background: #fff;
    border-radius: 4px;
    pointer-events: all;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.popup-modal.is-visible {
    display: block;
}

/* Modal 1 — portrait, slightly higher */
#modal-1 {
    width: 320px;
    margin-top: -60px;
}

/* Modal 2 — landscape, slightly lower */
#modal-2 {
    width: 420px;
    margin-top: 60px;
}

.popup-modal img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.popup-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s;
}

.popup-modal__close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Stack vertically on mobile */
@media (max-width: 640px) {
    .popup-modals-wrapper {
        flex-direction: column;
        overflow-y: auto;
        align-items: center;
    }

    #modal-1,
    #modal-2 {
        width: 90%;
        margin-top: 0;
    }
}