/* The original Gallery has no new wrapper and receives none of these rules. */
.restful-gallery-modern{--rgm-gold:#c4ad79;--rgm-ink:#151613;--rgm-paper:#e7e3d8;background:var(--rgm-ink);color:var(--rgm-paper);padding:clamp(24px,5vw,72px);max-width:1440px!important;margin:2rem auto;box-sizing:border-box}
.restful-gallery-modern .rgm-kicker{font:11px/1.6 Arial,sans-serif;letter-spacing:.23em;color:var(--rgm-gold);border-bottom:1px solid #464638;padding-bottom:22px;margin-bottom:42px}
.restful-gallery-modern .wp-block-post-template{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:52px 32px!important;margin:0!important;padding:0!important;list-style:none!important;max-width:none!important}
.restful-gallery-modern .wp-block-post{min-width:0;margin:0!important;padding:0!important;position:relative;background:transparent}
.restful-gallery-modern .wp-block-post-featured-image{margin:0 0 20px!important;padding:0!important;aspect-ratio:4/5;overflow:hidden;background:#20211c}
.restful-gallery-modern .wp-block-post-featured-image a{display:block;height:100%}
.restful-gallery-modern .wp-block-post-featured-image img{width:100%!important;height:100%!important;object-fit:contain!important;transition:transform .3s ease,filter .3s ease;filter:brightness(.98)}
.restful-gallery-modern .wp-block-post:hover .wp-block-post-featured-image img{transform:scale(1.018);filter:brightness(1.04)}
.restful-gallery-modern .wp-block-post-title{font:normal clamp(19px,2vw,25px)/1.3 Georgia,'Times New Roman',serif!important;letter-spacing:0!important;color:var(--rgm-paper)!important;margin:0 0 10px!important}
.restful-gallery-modern .wp-block-post-title a{color:inherit!important;text-decoration:none!important}
.restful-gallery-modern .wp-block-post-title a:hover{color:var(--rgm-gold)!important}
.restful-gallery-modern .wp-block-post-excerpt,.restful-gallery-modern .wp-block-post-date,.restful-gallery-modern .wp-block-post-terms{font:13px/1.7 Arial,sans-serif;color:#c6c2b7}
.restful-gallery-modern .wp-block-query-pagination{margin:48px 0 0!important;padding-top:24px;border-top:1px solid #464638;gap:18px;color:var(--rgm-gold)}
.restful-gallery-modern .wp-block-query-pagination a{color:var(--rgm-gold)!important}
.restful-gallery-modern a:focus-visible{outline:2px solid var(--rgm-gold);outline-offset:5px}
@media(max-width:1000px){.restful-gallery-modern .wp-block-post-template{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:36px 24px!important}}
@media(max-width:560px){.restful-gallery-modern{padding:24px 18px}.restful-gallery-modern .wp-block-post-template{grid-template-columns:1fr!important;gap:36px!important}.restful-gallery-modern .rgm-kicker{margin-bottom:28px}.restful-gallery-modern .wp-block-post-featured-image{max-height:70vh}}
@media(prefers-reduced-motion:reduce){.restful-gallery-modern img{transition:none!important;transform:none!important}}

/* Only RESTFUL collage thumbnails: retain every piece inside theme image frames. */
.restful-collage-featured img{object-fit:contain!important;object-position:center!important}
