.rm-masonry {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    align-items: start;
    width: 100%;
}

@media (max-width: 1200px) { .rm-masonry { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .rm-masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .rm-masonry { grid-template-columns: 1fr; } }

.rm-masonry__col {
    display: grid;
    gap: 2px;
    align-content: start;
    min-width: 0;
}

.random-media-gallery__img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
}

.random-media-sentinel { height: 20px; margin-top: 20px; }

/* Lightbox */
.rm-lightbox { position: fixed; inset: 0; z-index: 99999; display: none; }
.rm-lightbox.is-open { display: block; }
.rm-lightbox__backdrop { position: absolute; inset: 0; background: #fff; }
.rm-lightbox__figure { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 24px; }
.rm-lightbox__img { max-width: min(1200px, 92vw); max-height: 92vh; width: auto; height: auto; background: #111; }

body.rm-scroll-locked { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }