.main-popup {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: safe center;
    justify-content: center;
    overflow-y: auto;
    padding: 36px 48px 28px;
}

.main-popup[hidden] {
    display: none;
}

.main-popup-dim {
    position: absolute;
    inset: 0;
    background: rgba(20, 16, 14, 0.72);
}

.main-popup-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
}

.main-popup-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.main-popup-head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.main-popup-nav {
    display: flex;
    gap: 10px;
}

.main-popup-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.main-popup-arrow span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    border-top: 1.5px solid #fff;
    border-right: 1.5px solid #fff;
}

.main-popup-arrow.is-prev span {
    transform: translate(-40%, -50%) rotate(-135deg);
}

.main-popup-arrow.is-next span {
    transform: translate(-60%, -50%) rotate(45deg);
}

.main-popup-viewport {
    overflow: hidden;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

.main-popup-viewport.is-dragging {
    cursor: grabbing;
}

.main-popup-track {
    display: flex;
    gap: 22px;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.main-popup-card {
    flex: 0 0 calc((100% - 44px) / 3);
    width: calc((100% - 44px) / 3);
    min-width: 0;
    overflow: hidden;
}

.main-popup-card img,
.main-popup-image-link {
    display: block;
    width: 100%;
    height: 100%;
    -webkit-user-drag: none;
    user-select: none;
}

.main-popup-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    vertical-align: top;
}

.main-popup-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    color: #fff;
}

.main-popup-today,
.main-popup-close {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 15px;
    letter-spacing: -0.03em;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.main-popup-check {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.main-popup-check-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: #fff;
}

.main-popup-close-icon {
    width: 16px;
    height: 16px;
    fill: #fff;
}

html.main-popup-open,
body.main-popup-open {
    overflow: hidden;
    height: 100%;
}

@media (max-width: 760px) {
    .main-popup {
        padding: 16px 18px;
        align-items: center;
        justify-content: center;
    }

    .main-popup-box {
        display: flex;
        flex-direction: column;
        width: min(100%, 360px);
        max-height: 100%;
        margin: auto;
        align-self: center;
    }

    .main-popup-head {
        margin-bottom: 12px;
        flex-shrink: 0;
    }

    .main-popup-arrow {
        width: 36px;
        height: 36px;
    }

    .main-popup-viewport {
        flex: 1 1 auto;
        min-height: 0;
    }

    .main-popup-track {
        gap: 14px;
        height: 100%;
        align-items: center;
    }

    .main-popup-card {
        flex: 0 0 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        aspect-ratio: 1000 / 1280;
        height: auto;
        max-height: calc(100dvh - 140px);
    }

    .main-popup-image-link {
        display: block;
        width: 100%;
        height: 100%;
    }

    .main-popup-card img {
        display: block;
        margin: 0 auto;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    .main-popup-foot {
        margin-top: 10px;
        flex-shrink: 0;
    }

    .main-popup-today,
    .main-popup-close {
        font-size: 14px;
    }
}
