* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.image-gallery {
    display: flex;
    flex-wrap: nowrap;

    width: 100%;
    height: 100vh;
    height: 100dvh;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    -ms-overflow-style: none;
    scrollbar-width: none;
}

.image-gallery::-webkit-scrollbar {
    display: none;
}

.image-gallery img {
    display: block;

    flex: 0 0 40vw;
    width: 40vw;

    height: 100vh;
    height: 100dvh;

    object-fit: contain;
    object-position: center;

    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.loading,
.error {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
    height: 100dvh;

    margin: 0;
    padding: 30px;
}

/* 모바일 */
@media (max-width: 767px) {
    .image-gallery {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
    }

    .image-gallery img {
        flex: 0 0 100vw;
        width: 100vw;

        height: 100vh;
        height: 100dvh;

        object-fit: contain;
        object-position: center;

        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}