.page-body.top {
    justify-content: flex-start;
}

.gallery-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 3rem;
}

.gallery-page h1 {
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin: 0 0 0.5rem;
}

.gallery-page hr {
    border: none;
    border-top: 1px solid #000;
    margin: 0 0 1.5rem;
}

.gallery {
    column-count: 3;
    column-gap: 1rem;
}

.gallery a {
    display: block;
    break-inside: avoid;
    margin-bottom: 1rem;
}

.gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.96);
    z-index: 20;
}

.lightbox.is-open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox .close,
.lightbox .nav {
    position: absolute;
    appearance: none;
    background: none;
    border: none;
    font: inherit;
    line-height: 0;
    color: #000;
    cursor: pointer;
}

.lightbox .close:hover,
.lightbox .nav:hover {
    color: #888;
}

.lightbox .close {
    top: 1.25rem;
    right: 1.5rem;
    padding: 0.25rem;
}

.lightbox .close svg {
    width: 1.5rem;
    height: 1.5rem;
}

.lightbox .nav {
    top: 50%;
    transform: translateY(-50%);
    padding: 1rem 0.75rem;
}

.lightbox .nav svg {
    width: 2.5rem;
    height: 2.5rem;
}

.lightbox .nav.prev {
    left: 0.25rem;
}

.lightbox .nav.next {
    right: 0.25rem;
}

@media (max-width: 900px) {
    .gallery {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .gallery-page {
        padding: 4rem 1rem 2rem;
    }

    .gallery {
        column-count: 1;
    }

    .lightbox .nav svg {
        width: 2rem;
        height: 2rem;
    }

    .lightbox .nav {
        padding: 0.75rem 0.5rem;
    }
}
