.gallery{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0;
    list-style: none;
    padding:0;
    margin: 0;
}

.gallery-item{
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

.gallery-item figure {
    margin: 0;
    padding: 0;
    display: block;
}

.gallery-item button {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    width:100%;
    text-align: left;
    cursor: pointer;
}

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

figcaption{
    display: none;
}

/* Lightbox */
.lightbox{
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.7);
    z-index: 9999;
    padding: 2rem;
}
.lightbox[aria-hidden="false"]{ display:flex; }
.lightbox .content{
    max-width: 95vw;
    max-height: 95vh;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.lightbox img{ 
    max-width: 95vw; 
    max-height: 88vh; 
    width: auto;
    height: auto;
    display:block;
    object-fit: contain;
}
.lightbox .meta{ 
    padding: .75rem;
    color: white;
}
.lightbox .close{
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor:pointer;
}

/* Small accessibility focus styling */
:focus{ outline: 3px solid Highlight; outline-offset: 2px; }

@media (min-width:900px){
    .gallery{ gap: 0; }
}