/* The frame, not the original HTML height attribute, determines tile dimensions. */
.gallery-page .gallery-grid { align-items:start; }
.gallery-page figure > a {
    display:block;
    position:relative;
    width:100%;
    aspect-ratio:1 / 1;
    overflow:hidden;
    border:1px solid #d3e3e4;
    border-radius:6px;
    background:#fff;
}
.gallery-page figure > a > img {
    position:absolute;
    inset:0;
    display:block;
    width:100%;
    height:100%;
    min-width:0;
    min-height:0;
    max-width:100%;
    aspect-ratio:auto;
    object-fit:contain;
    object-position:center;
    transform:none;
    transition:none;
}
.gallery-page figure > a:hover > img { transform:none; }
.gallery-page figure > a:hover { border-color:#078fa0; }
.gallery-page figure > a:focus-visible { outline:3px solid #078fa0; outline-offset:4px; }
.gallery-page figcaption { overflow-wrap:anywhere; line-height:1.5; }
