.gallery-container {
    position: relative;
}

.gallery {
    border: 2px solid;
    overflow-x: scroll;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    -webkit-scroll-snap-type: mandatory;
    -ms-scroll-snap-type: mandatory;
    scroll-snap-type: mandatory;
    -webkit-scroll-snap-points-x: repeat(100%);
    -ms-scroll-snap-points-x: repeat(100%);
    scroll-snap-points-x: repeat(100%);
}


.gallery ul {
    display: flex;
    padding: 0;
    margin: 0;
}

.gallery li {
    flex: 0 0 100%;
    display: flex;
    padding: 0;
    margin: 0;
}

.gallery img {
    display: block;
    max-width: 100%;
    min-width: 1px;
    min-height: 1px;
}

.gallery::-webkit-scrollbar {
    height: 0.75rem;
}

.gallery::-webkit-scrollbar-track {
    background-color: #ddd;
}

.gallery::-webkit-scrollbar-thumb {
    background-color: #000;
}

#instructions {
    display: none;
    text-align: center;
    margin-top: 0.5rem;
}

.gallery:hover+#instructions,
.gallery:focus+#instructions,
.touch #instructions {
    display: block;
}

.gallery figure,
noscript {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.gallery figure p {
    padding: 20px;
}
.gallery figure h2 {
    padding-left: 20px;
}

noscript {
    padding: 0;
}

.gallery figcaption {
    height: 2rem;
    line-height: 2rem;
    font-size: 0.75rem;
    font-weight: bold;
    text-align: center;
}

@keyframes flash {
    to {
        opacity: 0;
    }
}

img.dots {
    max-width: 5rem;
    max-height: 5rem;
    padding: 0;
    animation: flash 0.5s linear infinite;
}

.no-js .dots {
    display: none;
}

.gallery-controls li {
    display: inline;
}

.gallery-controls button {
    position: absolute;
    bottom: 0;
    top: 0;
    width: 3rem;
    border: 0;
    padding: 0.5rem;
    background: #000;
}

.gallery-controls svg {
    width: 100%;
    fill: #fff;
    stroke: #000;
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.previous {
    left: 0;
}

.next {
    left: calc(100% - 3rem);
}

.visually-hidden {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
}
