/* Legacy overlays remain a fallback for images without embedded watermarks. */
.gallery-album-cover,.gallery-video-preview,.gallery-photo-link{position:relative;isolation:isolate}
.gallery-watermark{left:auto!important;top:auto!important;right:10px!important;bottom:10px!important;transform:none!important;display:flex!important;gap:6px;align-items:center;width:auto!important;height:auto!important;max-width:calc(100% - 20px);aspect-ratio:auto!important;padding:5px 9px!important;border-radius:5px!important;background:rgba(18,25,40,.42)!important;opacity:.76!important;color:#fff;pointer-events:none;z-index:1}
.gallery-watermark img{flex:0 0 30px;width:30px!important;height:30px!important;aspect-ratio:1!important;object-fit:contain!important;border-radius:50%}
.gallery-watermark::after{content:'Oaxaca en Utah';font-family:Montserrat,sans-serif;font-size:clamp(9px,1vw,13px);font-weight:700;line-height:1.2;white-space:nowrap;text-shadow:0 1px 2px #000}
.gallery-lightbox-watermark{right:12px!important;bottom:12px!important;display:flex!important;gap:8px;width:auto!important;max-width:calc(100% - 24px);aspect-ratio:auto!important;padding:6px 10px!important;border-radius:5px!important;background:rgba(18,25,40,.42)!important;opacity:.78!important;color:#fff}
.gallery-lightbox-watermark img{width:38px!important;height:38px!important;object-fit:contain!important}
.gallery-lightbox-watermark::after{content:'Oaxaca en Utah';font-family:Montserrat,sans-serif;font-size:clamp(10px,1.5vw,16px);font-weight:700;white-space:nowrap;text-shadow:0 1px 2px #000}
.gallery-album-cover>.gallery-watermark{position:absolute}
.gallery-album-cover>.gallery-watermark,.gallery-video-preview>.gallery-watermark{font-size:inherit;letter-spacing:normal}
.album-browse-controls{display:flex;align-items:center;justify-content:center;gap:1rem;flex-wrap:wrap;margin:2rem 0}
.album-browse-controls [hidden]{display:none!important}
.album-browse-controls p{margin:0;flex-basis:100%;text-align:center}
.album-browse-controls button:focus-visible{outline:3px solid #215a7b;outline-offset:4px}
@media(max-width:480px){.gallery-watermark{padding:3px 5px!important;gap:3px;right:6px!important;bottom:6px!important}.gallery-watermark img{width:22px!important;height:22px!important;flex-basis:22px}.gallery-watermark::after{font-size:9px}}

/* New image files contain the watermark; do not stack a second logo over them. */
.gallery-photo-link:has(>img[src*="/watermarked-v1/"])>.gallery-watermark,
.gallery-album-cover:has(>img[src*="/watermarked-v1/"])>.gallery-watermark,
.gallery-video-preview:has(>img[src*="/watermarked-v1/"])>.gallery-watermark,
.gallery-lightbox-image-wrap:has(>img[src*="/watermarked-v1/"])>.gallery-lightbox-watermark{display:none!important}

/* Keep portrait covers inside their fixed frame so their embedded mark is visible. */
.gallery-album-cover>img{position:absolute;inset:12px;width:calc(100% - 24px)!important;height:calc(100% - 24px)!important;object-fit:contain!important;object-position:center}
.gallery-video-preview>img[src*="/watermarked-v1/"]{position:absolute;inset:0;width:100%!important;height:100%!important;object-fit:contain!important;object-position:center}
