/* TalSicht 2.0 – scoped gallery refinements */
main > section.gallery-section {max-width:1440px;margin-inline:auto;padding:40px clamp(16px,4vw,56px) 48px;}
.gallery-section h1 {font-size:clamp(32px,4vw,58px);overflow-wrap:anywhere;}
.gallery-section .gallery-grid {grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;margin:20px 0;align-items:start;}
.gallery-section .gallery-grid figure {min-width:0;}
.gallery-section .gallery-grid img {width:auto;max-width:100%;height:auto;margin-inline:auto;}
.gallery-section .gallery-grid figcaption {font-size:13px;line-height:1.45;padding:6px 0;text-align:center;overflow-wrap:anywhere;}
.gallery-section .gallery-grid button:focus-visible {outline:2px solid var(--gold);outline-offset:3px;}
#astro .astro-covers {max-width:80%;grid-template-columns:repeat(2,minmax(0,1fr));margin-inline:auto;}
#astro .astro-covers .tile {min-height:184px;padding:18px;}
#viewer {margin:auto;overscroll-behavior:contain;}
#viewer .viewer-art img {max-height:calc(94vh - 70px);max-height:calc(94dvh - 70px);}
@media(max-width:1100px){.gallery-section .gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:850px){.gallery-section .gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}#astro .astro-covers{max-width:100%;}}
@media(max-width:650px){.gallery-section .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}#astro .astro-covers{grid-template-columns:1fr;}#viewer .viewer-art img{max-height:65vh;max-height:65dvh;}#viewer .viewer-meta-row{font-size:13px;} }
@media(min-width:651px) and (max-width:800px){#viewer .viewer-art img{max-height:65vh;max-height:65dvh;}}
@media(max-width:420px){.gallery-section .gallery-grid{grid-template-columns:minmax(0,1fr);}.gallery-section .gallery-grid figcaption{font-size:14px;}}

/* 2.0.1: responsive masonry, native image proportions. */
.gallery-section .gallery-grid {display:block;column-count:5;column-gap:18px;}
.gallery-section .gallery-grid figure {display:inline-block;width:100%;break-inside:avoid;margin:0 0 18px;vertical-align:top;}
.gallery-section .gallery-grid img {width:100%;height:auto;}
.gallery-back {display:inline-flex;align-items:center;color:var(--gold,#c7ab78);border:1px solid #786444;padding:9px 14px;margin:10px 0 18px;text-decoration:none;font-size:14px;}
.gallery-back:hover,.gallery-back:focus-visible {background:#ffffff0b;outline:1px solid currentColor;}
@media(max-width:1100px){.gallery-section .gallery-grid{column-count:4;}}
@media(max-width:850px){.gallery-section .gallery-grid{column-count:3;column-gap:14px;}}
@media(max-width:650px){.gallery-section .gallery-grid{column-count:2;column-gap:12px;}}
@media(max-width:420px){.gallery-section .gallery-grid{column-count:1;}}

/* 2.0.7: unified compact subgallery cards, captions below images. */
.gallery-section .child-covers, #astro .astro-covers {display:grid;max-width:none;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:24px 0;align-items:start;}
.gallery-section .child-covers .tile, #astro .astro-covers .tile {min-width:0;min-height:0;padding:11px;justify-content:start;}
.gallery-section .child-covers .tile .tile-cover, #astro .astro-covers .tile .tile-cover {position:static;inset:auto;z-index:auto;display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:contain;background:#111;}
#astro .astro-covers .tile:has(.tile-cover)::before {content:none;}
.gallery-section .child-covers .tile span, #astro .astro-covers .tile span {font:20px/1.3 Georgia,serif;margin-top:8px;overflow-wrap:anywhere;}
.gallery-section .child-covers .tile small, #astro .astro-covers .tile small {font-size:12px;line-height:1.5;margin-top:3px;}
.gallery-section .gallery-grid figcaption {font-size:12px;}
@media(max-width:1100px){.gallery-section .child-covers,#astro .astro-covers{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:800px){.gallery-section .child-covers,#astro .astro-covers{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:480px){.gallery-section .child-covers,#astro .astro-covers{grid-template-columns:minmax(0,1fr);}}
