.gallery-header {
    padding: 60px 20px 30px;
    text-align: center;
}

.gallery-header h1 {
    margin: 0;
    font-size: 36px;
    letter-spacing: 0.15em;
}

.gallery-header p {
    margin-top: 8px;
}

.gallery-page {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    padding-bottom: 80px;
}

.gallery-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    display: block;
    overflow: hidden;
    background: #eee;
    aspect-ratio: 3 / 2;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.back-link {
    margin-top: 50px;
    text-align: center;
}

.back-link a {
    color: inherit;
}

/* 拡大表示 */

.lightbox {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    background: rgba(0, 0, 0, 0.92);
}

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

.lightbox-content {
    max-width: 1200px;
    max-height: 100%;
    margin: 0;
    text-align: center;
}

.lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 140px);
    margin: 0 auto;
    object-fit: contain;
}

.lightbox-content figcaption {
    margin-top: 12px;
    color: #fff;
    font-size: 15px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    border: 0;
    padding: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

.lightbox-close {
    top: 15px;
    right: 25px;
    font-size: 48px;
    line-height: 1;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 64px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

body.lightbox-open {
    overflow: hidden;
}
body {
    background-color: #000000;
    color: #F5F5F5;
}

@media screen and (max-width: 768px) {
    .gallery-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .lightbox {
        padding: 60px 45px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 48px;
    }
}

@media screen and (max-width: 420px) {
    .gallery-page {
        width: calc(100% - 20px);
    }

    .gallery-header h1 {
        font-size: 26px;
    }
}
