.photo-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0;min-width:0;max-width:100%;align-items:start}
.photo-gallery:has(.photo-page:only-child){grid-template-columns:minmax(0,1fr)}
.photo-gallery > .photo-page{margin:0;min-width:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--bg)}
.photo-page-image{line-height:0;display:flex;justify-content:center;align-items:flex-start}
.photo-gallery > .photo-page .source-image,.photo-viewer-content .source-image{width:100%;height:auto;max-height:none;max-width:100%;margin:0;object-fit:fill}
.photo-gallery > .photo-page .photo-q,.photo-viewer-content .photo-q{display:block;width:100%;margin:0;line-height:0}
.photo-gallery > .photo-page figcaption{display:flex;align-items:center;justify-content:space-between;padding:6px 12px;font-size:12px;color:var(--muted);border-top:1px solid var(--line)}
.photo-gallery > .photo-page figcaption button{min-height:38px;padding:6px 12px}.photo-swipe-hint{display:none}
#photo-viewer{width:calc(100% - 24px);max-width:1100px;max-height:94dvh;padding:18px;overflow:auto}.photo-viewer-content{min-width:0}.photo-viewer-content .photo-q{position:relative}
@media(max-width:640px){.photo-gallery{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;gap:12px;align-items:flex-start;padding-bottom:8px}.photo-gallery > .photo-page{flex:0 0 100%;box-sizing:border-box;scroll-snap-align:start}.photo-swipe-hint{display:block;text-align:center;color:var(--muted);font-size:12px;margin:0 0 12px}#photo-viewer{padding:12px}}
