/* The permanent page address currently presents one collection of photos. */
.tas-photo-gallery-content > p {
    margin: 12px 0 24px;
    color: var(--ta-muted);
}
.tas-photo-gallery .gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(4px, .6vw, 10px);
    margin: 0;
}
.tas-photo-gallery .gallery-item {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}
.tas-photo-gallery .gallery > br { display: none; }
.tas-photo-gallery .gallery-icon a { display: block; cursor: zoom-in; }
.tas-photo-gallery .gallery-icon a:focus-visible { outline-offset: -3px; outline: 3px solid white; }
.tas-photo-gallery .gallery-icon img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: 0;
}
.tas-photo-viewer:not([open]) { display: none; }
.tas-photo-viewer[open] {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 8px;
    width: 100%;
    height: 100dvh;
    max-width: 100%;
    max-height: 100%;
    inset: 0;
    margin: auto;
    padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    border: 0;
    background: #101010;
    color: var(--ta-white);
    overscroll-behavior: contain;
}
html:has(.tas-photo-viewer[open]) { overflow: hidden; }
.tas-photo-viewer::backdrop { background: #101010; }
.tas-photo-stage { display: grid; min-height: 0; place-items: center; }
.tas-photo-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.tas-photo-controls { display: flex; align-items: center; justify-content: end; gap: 8px; }
.tas-photo-controls [role="status"] { margin-right: auto; font: 14px/1.4 "IBM Plex Mono", monospace; }
.tas-photo-controls form { margin: 0; }
.tas-photo-controls button {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ta-white);
    font: inherit;
    cursor: pointer;
}
.tas-photo-controls button:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
@media (hover: hover) {
    .tas-photo-controls button:hover { background: #343434; color: var(--ta-white); }
}
@media (max-width: 700px) {
    .tas-photo-gallery .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
