/* Natural-height masonry. Keep the standard item/link DOM and the host lightbox. */
.cnv-post-content .cnv-gallery-type--masonry{display:block!important;column-count:3;column-gap:12px;align-items:initial!important}
.cnv-post-content .cnv-gallery-type--masonry.gallery-columns-1{column-count:1}
.cnv-post-content .cnv-gallery-type--masonry.gallery-columns-2{column-count:2}
.cnv-post-content .cnv-gallery-type--masonry .gallery-item{display:block!important;float:none!important;width:100%!important;margin:0 0 12px!important;break-inside:avoid;vertical-align:top;aspect-ratio:auto!important}
.cnv-post-content .cnv-gallery-type--masonry .gallery-icon,.cnv-post-content .cnv-gallery-type--masonry .gallery-icon a{display:block!important;width:100%!important;height:auto!important}
.cnv-post-content .cnv-gallery-type--masonry .gallery-icon img{display:block;width:100%!important;height:auto!important;object-fit:contain!important;aspect-ratio:auto!important}
.cnv-post-content .cnv-gallery-type--masonry .gallery-caption{margin:8px 0 0;color:var(--cnv-muted,currentColor);font-size:14px;line-height:1.5;text-align:left}
@media(max-width:899px){.cnv-post-content .cnv-gallery-type--masonry{column-count:2}.cnv-post-content .cnv-gallery-type--masonry.gallery-columns-1{column-count:1}}
@media(max-width:520px){.cnv-post-content .cnv-gallery-type--masonry,.cnv-post-content .cnv-gallery-type--masonry.gallery-columns-2{column-count:1}}
/* v2: masonry-pack-v1.js moves items into equal-width columns, each item into the shortest column
   (heights from the img width/height, so no wait for image load). Without JS the CSS columns above stay. */
.cnv-post-content .cnv-gallery-type--masonry.is-packed{display:flex!important;column-count:auto;gap:12px;align-items:flex-start}
.cnv-post-content .cnv-gallery-type--masonry.is-packed>.cnv-masonry-col{flex:1 1 0;min-width:0;display:flex;flex-direction:column;gap:12px}
.cnv-post-content .cnv-gallery-type--masonry.is-packed .gallery-item{margin:0!important}
