/* Compact historical albums; the full photograph always keeps its proportions. */
.article-prose .article-photo-gallery{margin:44px 0;min-width:0}
.article-gallery-heading{display:flex;align-items:baseline;justify-content:space-between;gap:24px;margin-bottom:20px}
.article-prose .article-gallery-heading h2{font-size:34px;line-height:1.15;margin:0}
.article-prose .article-gallery-heading p{margin:0;font-size:16px;white-space:nowrap;font-variant-numeric:tabular-nums}
.article-prose .article-gallery-frame{position:relative;display:grid;place-items:center;aspect-ratio:3/2;width:100%;background:var(--soft);color:var(--ink);overflow:hidden;cursor:zoom-in;text-decoration:none}
.article-prose .article-gallery-frame img{display:block;width:100%;height:100%;max-height:100%;min-height:0;margin:0;object-fit:contain;filter:none}
.article-gallery-expand{position:absolute;right:16px;bottom:16px;display:grid;place-items:center;width:44px;height:44px;background:var(--paper);color:var(--ink)}
.article-gallery-expand svg{width:24px;height:24px}
.article-gallery-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-block:12px}
.article-gallery-controls:not(:has(button:not([hidden]))):not(:has([data-gallery-status]:not([hidden]))){display:none}
.article-gallery-controls button{display:grid;place-items:center;width:48px;height:48px;background:var(--ink);color:var(--paper)}
.article-gallery-controls button:hover{background:var(--red)}
.article-gallery-controls button svg{width:22px;height:22px}
.article-prose .article-gallery-status{flex:1;margin:0;font-size:16px;line-height:1.5}
.article-gallery-thumbs{display:flex;gap:10px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--ink) var(--soft);padding:4px 4px 12px;margin:12px -4px 0}
.article-prose .article-gallery-thumbs a{display:block;flex:0 0 96px;height:68px;background:var(--soft);text-decoration:none;scroll-margin-inline:4px;opacity:.65}
.article-prose .article-gallery-thumbs a:hover,.article-prose .article-gallery-thumbs a[aria-current=true]{opacity:1}
.article-prose .article-gallery-thumbs a[aria-current=true]{outline:3px solid var(--red);outline-offset:1px}
.article-prose .article-gallery-thumbs img{display:block;width:100%;height:100%;object-fit:cover;margin:0;filter:none}
.article-photo-gallery :is(a,button):focus-visible{outline:3px solid var(--red);outline-offset:3px}
.article-photo-gallery [hidden]{display:none!important}
.article-photo-gallery.is-loading .article-gallery-frame img,.article-photo-gallery.is-error .article-gallery-frame img{visibility:hidden}
.article-gallery-dialog{width:100%;height:100dvh;max-width:none;max-height:none;margin:0;border:0;padding:20px 28px max(20px,env(safe-area-inset-bottom));background:#202020;color:var(--paper)}
.article-gallery-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:16px}
.article-gallery-dialog::backdrop{background:#202020}
html:has(.article-gallery-dialog[open]){overflow:hidden;scrollbar-gutter:stable}
.article-gallery-dialog-head,.article-gallery-dialog-bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;min-width:0}
.article-gallery-dialog p{font-size:16px;line-height:1.5;margin:0;font-variant-numeric:tabular-nums}
.article-gallery-dialog button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-width:48px;min-height:48px;padding:10px 14px;background:var(--ink);color:var(--paper);font-size:16px;flex:none}
.article-gallery-dialog button:hover{background:var(--red)}
.article-gallery-dialog svg{width:24px;height:24px}
.article-gallery-dialog-stage{display:grid;place-items:center;min-height:0;min-width:0;touch-action:pan-y pinch-zoom}
.article-gallery-dialog-stage img{display:block;width:100%;height:100%;min-height:0;max-height:100%;object-fit:contain;filter:none}
.article-gallery-dialog.is-loading .article-gallery-dialog-stage img,.article-gallery-dialog.is-error .article-gallery-dialog-stage img{visibility:hidden}
.article-gallery-dialog [role=status]{text-align:center;min-width:0}
.article-gallery-dialog-copy{flex:1;min-width:0;text-align:center}
.article-gallery-dialog a{text-decoration:underline;text-underline-offset:4px}
.article-gallery-dialog :is(button,a):focus-visible{outline:3px solid var(--paper);outline-offset:3px}
.article-gallery-dialog [hidden]{display:none!important}
@media(max-width:600px){
 .article-prose .article-photo-gallery{margin-block:32px}
 .article-prose .article-gallery-heading h2{font-size:30px}
 .article-gallery-heading{margin-bottom:16px;gap:16px}
 .article-prose .article-gallery-frame{aspect-ratio:4/3}
 .article-gallery-expand{right:8px;bottom:8px}
 .article-gallery-thumbs{gap:8px}
 .article-prose .article-gallery-thumbs a{flex-basis:76px;height:56px}
 .article-gallery-dialog{padding:12px 12px max(12px,env(safe-area-inset-bottom))}
 .article-gallery-dialog-head,.article-gallery-dialog-bottom{gap:12px}
 .article-gallery-dialog button{padding:8px;min-width:44px;min-height:44px}
}
