.post-gallery { display: grid; gap: 3px; margin: 16px 0; height: min(430px, 55vw); min-height: 240px; overflow: hidden; border-radius: 10px; }
.post-gallery-1 { grid-template-columns: 1fr; }
.post-gallery-2 { grid-template-columns: 1fr 1fr; }
.post-gallery-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.post-gallery-3 .post-gallery-tile:first-child { grid-row: 1 / 3; }
.post-gallery-tile { position: relative; padding: 0; border: 0; overflow: hidden; background: #111; cursor: pointer; }
.post-gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.post-gallery-tile:hover img { transform: scale(1.02); }
.post-gallery-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.58); color: #fff; font-size: clamp(2rem, 7vw, 4rem); font-weight: 700; }
.post-gallery-modal { position: fixed; inset: 0; z-index: 10000; display: none; background: rgba(0,0,0,.94); }
.post-gallery-modal.open { display: block; }
.post-gallery-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 64px 80px; box-sizing: border-box; overflow: hidden; }
.post-gallery-slide { display: none; width: auto !important; height: auto !important; max-width: calc(100vw - 160px) !important; max-height: calc(100dvh - 128px) !important; object-fit: contain !important; object-position: center; }
.post-gallery-slide.active { display: block; }
.post-gallery-close, .post-gallery-nav { position: absolute; z-index: 2; border: 0; color: white; background: rgba(0,0,0,.45); cursor: pointer; }
.post-gallery-close { right: 20px; top: 14px; width: 48px; height: 48px; border-radius: 50%; font-size: 36px; line-height: 40px; }
.media-download-button { position: absolute; z-index: 3; left: 20px; top: 18px; display: inline-flex; align-items: center; gap: 9px; padding: 11px 17px; border: 2px solid #fff3b0; border-radius: 999px; background: var(--color-gold, #ffd700); color: #111; font-weight: 800; text-decoration: none; box-shadow: 0 4px 18px rgba(255,215,0,.55), 0 2px 8px rgba(0,0,0,.65); transition: transform .15s ease, box-shadow .15s ease; }
.media-download-button:hover, .media-download-button:focus-visible { color: #000; transform: translateY(-2px) scale(1.03); box-shadow: 0 7px 24px rgba(255,215,0,.72), 0 3px 10px rgba(0,0,0,.7); outline: none; }
.post-gallery-nav { top: 50%; transform: translateY(-50%); width: 54px; height: 70px; border-radius: 8px; font-size: 34px; }
.post-gallery-prev { left: 16px; }
.post-gallery-next { right: 16px; }
.post-gallery-counter { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: white; background: rgba(0,0,0,.55); padding: 6px 14px; border-radius: 16px; }
body.gallery-open { overflow: hidden; }
@media (max-width: 600px) {
    .post-gallery { min-height: 210px; }
    .post-gallery-stage { padding: 62px 12px; }
    .post-gallery-slide { max-width: calc(100vw - 24px) !important; max-height: calc(100dvh - 124px) !important; }
    .post-gallery-nav { width: 44px; height: 60px; }
    .media-download-button { left: 12px; top: 14px; padding: 10px 13px; }
    .media-download-button span { display: none; }
}
