[data-mh-gallery-stage].mh-chapter-cover-card {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

.mh-gallery-slider-viewport {
    position: relative;
    z-index: 1;
    width: min(100%, 760px, 58vh);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: transparent;
    contain: layout paint;
}

.media-listen__cover-card .mh-gallery-slider-viewport {
    width: min(100%, 560px, 50vh);
}

.mh-gallery-slider-track {
    display: flex;
    height: 100%;
    min-height: 100%;
    transform: translate3d(-100%, 0, 0);
    transition: none;
    will-change: transform;
    backface-visibility: hidden;
}

.mh-gallery-slider-track.is-animating {
    transition: transform 760ms cubic-bezier(0.23, 1, 0.32, 1);
}

.mh-gallery-slider-slide {
    flex: 0 0 auto;
    height: 100%;
    display: grid;
    place-items: center;
    min-width: 0;
    overflow: hidden;
}

.mh-gallery-slider-slide img,
[data-mh-gallery-stage] [data-mh-gallery-main-image],
[data-mh-gallery-stage] [data-mh-gallery-slide-image] {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    opacity: 1;
    transform: none;
    transition: none !important;
    backface-visibility: hidden;
    user-select: none;
}

.mh-gallery-overlay {
    --mh-gallery-overlay-fit-width: min(calc(100vw - 56px), 1080px);
    --mh-gallery-overlay-fit-height: min(calc(100vh - 138px), 1080px);
    align-items: stretch !important;
    justify-content: center !important;
    padding: clamp(12px, 2.4vw, 28px) !important;
}

@supports (height: 100dvh) {
    .mh-gallery-overlay {
        --mh-gallery-overlay-fit-height: min(calc(100dvh - 138px), 1080px);
    }
}

.mh-gallery-overlay__stage {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    align-items: center !important;
    justify-items: center !important;
    gap: 12px !important;
}

.mh-gallery-overlay__viewport {
    position: relative;
    width: var(--mh-gallery-overlay-fit-width) !important;
    height: var(--mh-gallery-overlay-fit-height) !important;
    max-width: 100% !important;
    max-height: var(--mh-gallery-overlay-fit-height) !important;
    overflow: hidden !important;
    contain: layout paint;
}

.mh-gallery-overlay__track {
    display: flex;
    width: 300%;
    height: 100% !important;
    min-height: 100% !important;
    transform: translate3d(-100%, 0, 0);
    transition: none;
    will-change: transform;
    backface-visibility: hidden;
}

.mh-gallery-overlay__track.is-animating {
    transition: transform 760ms cubic-bezier(0.23, 1, 0.32, 1);
}

.mh-gallery-overlay__slide {
    flex: 0 0 auto !important;
    width: auto;
    height: 100% !important;
    max-width: none !important;
    max-height: 100% !important;
    display: grid;
    place-items: center;
    min-width: 0;
    overflow: hidden;
}

.mh-gallery-overlay__slide .mh-gallery-overlay__image,
.mh-gallery-overlay__slide [data-mh-gallery-overlay-slide-image],
.mh-gallery-overlay__slide [data-mh-gallery-overlay-image] {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: var(--mh-gallery-overlay-fit-width) !important;
    max-height: var(--mh-gallery-overlay-fit-height) !important;
    object-fit: contain !important;
    object-position: center center !important;
    opacity: 1;
    transform: none;
    transition: none !important;
    box-shadow: none;
    backface-visibility: hidden;
    user-select: none;
}

.mh-gallery-overlay__caption {
    position: static !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: min(100%, 960px) !important;
    max-height: 3.6em !important;
    overflow: hidden !important;
    text-align: center !important;
    color: rgba(245, 239, 230, 0.86) !important;
}

@media (max-width: 767px) {
    .mh-gallery-slider-viewport,
    .media-listen__cover-card .mh-gallery-slider-viewport {
        width: min(100%, 72vh, 88vw);
    }

    .mh-gallery-overlay {
        --mh-gallery-overlay-fit-width: calc(100vw - 20px);
        --mh-gallery-overlay-fit-height: calc(100vh - 118px);
        padding: 10px !important;
    }

    @supports (height: 100dvh) {
        .mh-gallery-overlay {
            --mh-gallery-overlay-fit-height: calc(100dvh - 118px);
        }
    }

    .mh-gallery-overlay__stage {
        gap: 10px !important;
    }

    .mh-gallery-overlay__viewport {
        width: var(--mh-gallery-overlay-fit-width) !important;
        height: var(--mh-gallery-overlay-fit-height) !important;
        max-height: var(--mh-gallery-overlay-fit-height) !important;
    }

    .mh-gallery-overlay__caption {
        max-height: 3.4em !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
        padding: 0 46px !important;
    }

    .mh-gallery-slider-track.is-animating,
    .mh-gallery-overlay__track.is-animating {
        transition-duration: 620ms;
    }
}
