/* Feed mosaics use square cells like the supplied social-feed references. */
#main .post-gallery{gap:3px}
#main .post-gallery .gallery-photo{border:0;border-radius:0;display:block;overflow:hidden}
#main .post-gallery.mosaic{max-height:none;align-items:stretch}
#main .post-gallery.mosaic .post-image{width:100%;height:100%;max-height:none;object-fit:cover;object-position:center}
#main .post-gallery.gallery-count-2{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr);aspect-ratio:2/1}
#main .post-gallery.gallery-count-2 .gallery-photo{grid-column:auto;grid-row:auto}
#main .post-gallery.gallery-count-3{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));aspect-ratio:1/1}
#main .post-gallery.gallery-count-3 .gallery-photo{grid-column:auto}
#main .post-gallery.gallery-count-3 .gallery-photo:first-child{grid-row:span 2}
#main .post-gallery.gallery-count-4{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));aspect-ratio:1/1}
#main .post-gallery.gallery-count-4 .gallery-photo{grid-column:auto;grid-row:auto}
#main .post-gallery.gallery-count-5{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:minmax(0,3fr) minmax(0,2fr);aspect-ratio:6/5}
#main .post-gallery.gallery-count-5 .gallery-photo{grid-column:span 3;grid-row:auto}
#main .post-gallery.gallery-count-5 .gallery-photo:nth-child(n+3){grid-column:span 2}
#main .post-gallery .gallery-more{font-size:clamp(28px,5vw,48px);font-weight:800}
#main .post-gallery.single{display:block}
#main .post-gallery.single .post-image{height:auto;max-height:760px;object-fit:contain}
@media(max-width:740px){#main .post-gallery{gap:2px}#main .post-gallery.single .post-image{max-height:80svh}}

/* Lead photo fills the post width; supporting images sit underneath. */
#main .post-gallery.gallery-count-5{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:auto;aspect-ratio:auto;max-height:none}#main .post-gallery.gallery-count-5 .gallery-photo:first-child{grid-column:1/-1;grid-row:auto;aspect-ratio:3/2}#main .post-gallery.gallery-count-5 .gallery-photo:nth-child(n+2){grid-column:span 1;grid-row:auto;aspect-ratio:1/1}@media(max-width:540px){#main .post-gallery.gallery-count-5{grid-template-columns:repeat(2,minmax(0,1fr))}#main .post-gallery.gallery-count-5 .gallery-photo:first-child{aspect-ratio:4/3}}
