.main-popup-layer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.main-popup {
    position: absolute;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
    pointer-events: auto;
}

.main-popup__inner {
    width: 100%;
    background: #fff;
}

.main-popup__body {
    width: 100%;
    background: #f5f5f5;
    overflow: hidden;
}

.main-popup__body--fixed .main-popup__link {
    height: 100%;
}

.main-popup__body--fixed .main-popup__img {
    height: 100%;
    object-fit: cover;
}

.main-popup__link {
    display: block;
    width: 100%;
}

.main-popup__img {
    display: block;
    width: 100%;
    height: auto;
}

.main-popup__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #eee;
}

.main-popup__today {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.main-popup__today input {
    width: 15px;
    height: 15px;
    margin: 0;
}

.main-popup__close {
    flex: 0 0 auto;
    min-width: 58px;
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    background: #222;
    color: #fff;
    font-size: 13px;
    line-height: 30px;
    cursor: pointer;
}

.main-popup__close:hover {
    background: #000;
}

.main-popup-layer.is-empty {
    display: none !important;
}

/* 모바일 */
.main-popup.is-closed {
    display: none !important;
}

@media (max-width: 768px) {
    .main-popup-layer {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 9999 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        padding: 16px;
        background: rgba(0, 0, 0, 0.45);
        pointer-events: auto;
        box-sizing: border-box;
        overflow: hidden;
    }

    .main-popup {
        display: none !important;

        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;

        width: 100% !important;
        max-width: 420px !important;
        max-height: calc(100dvh - 32px);

        margin: 0 auto !important;
        border-radius: 14px;
        overflow: hidden;
        background: #fff;
        pointer-events: auto;
    }

    .main-popup.is-active {
        display: block !important;
    }

    .main-popup__inner {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: calc(100dvh - 32px);
        background: #fff;
    }

    .main-popup__body {
        flex: 1 1 auto;
        width: 100%;
        height: auto !important;
        max-height: calc(100dvh - 86px);
        overflow: hidden;
        background: #fff;
    }

    .main-popup__link {
        display: block;
        width: 100%;
        height: auto;
    }

    .main-popup__img {
        display: block;
        width: 100%;
        height: auto !important;
        max-height: calc(100dvh - 86px);
        object-fit: contain;
        background: #fff;
    }

    .main-popup__footer {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;

        min-height: 54px;
        padding: 10px 12px;
        background: #fff;
        border-top: 1px solid #eee;
        box-sizing: border-box;
    }

    .main-popup__today {
        font-size: 13px;
    }

    .main-popup__close {
        min-width: 58px;
        height: 32px;
        line-height: 32px;
    }
}

/* 아주 작은 화면 */
@media (max-width: 360px) {
    .main-popup-layer {
        padding: 10px 8px;
    }

    .main-popup__footer {
        gap: 6px;
    }

    .main-popup__today span {
        font-size: 11px;
    }
}