/* Scoped to the new Chiloé listing: existing galleries and templates are unchanged. */
.ci-chiloe-photos {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.ci-chiloe-photos a {display:block;position:relative;overflow:hidden;background:#f5f5f3;min-width:0}
.ci-chiloe-photos a:focus-visible {outline:3px solid #333;outline-offset:3px;z-index:1}
.ci-chiloe-cover {grid-column:1/-1;aspect-ratio:16/8}
.ci-chiloe-cover img {display:block;width:100%;height:100%;object-fit:contain}
.ci-chiloe-thumb img {display:block;width:100%;aspect-ratio:4/3;object-fit:contain}
.ci-chiloe-open {position:absolute;right:16px;bottom:16px;padding:8px 13px;background:#fff;color:#181818;font-size:.9rem;box-shadow:0 1px 9px #0002}
.ci-chiloe-dialog {border:0;padding:0;max-width:100vw;max-height:100vh;max-height:100dvh;width:100vw;height:100vh;height:100dvh;color:#fff;background:#111;overflow:auto}
.ci-chiloe-dialog::backdrop {background:rgba(0,0,0,.9)}
.ci-chiloe-dialog-inner {position:relative;min-height:100%;display:flex;flex-direction:column;justify-content:center;padding:55px 20px 20px;box-sizing:border-box}
.ci-chiloe-dialog figure {margin:0;text-align:center}
.ci-chiloe-dialog img {display:block;width:100%;height:min(72vh,900px);object-fit:contain;background:transparent}
.ci-chiloe-dialog figcaption {font-size:1rem;padding:12px 0 4px;line-height:1.5}
.ci-chiloe-dialog button {display:inline-flex;justify-content:center;align-items:center;min-height:44px;min-width:44px;cursor:pointer;background:#fff;color:#111;border:1px solid #bbb;border-radius:0;padding:5px;font-size:24px;font-family:inherit}
.ci-chiloe-dialog button:hover {background:#ddd}
.ci-chiloe-dialog button:focus-visible,.ci-chiloe-original:focus-visible {outline:3px solid #fff;outline-offset:4px}
.ci-chiloe-dialog .ci-chiloe-close {position:absolute;right:16px;top:12px;font-size:32px}
.ci-chiloe-controls {display:flex;gap:16px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:8px}
.ci-chiloe-counter {font-size:1rem;min-width:5em;text-align:center}
.ci-chiloe-original {font-size:.9rem;color:#fff;text-decoration:underline;text-underline-offset:4px}
body.ci-chiloe-gallery-open {overflow:hidden}
@media(max-width:600px) {
 .ci-chiloe-photos {grid-template-columns:repeat(2,minmax(0,1fr))}
 .ci-chiloe-cover {aspect-ratio:4/3}
 .ci-chiloe-open {font-size:.8rem;right:8px;bottom:8px;padding:6px 9px}
 .ci-chiloe-dialog-inner {padding:60px 10px 20px}
 .ci-chiloe-dialog img {height:62vh}
 .ci-chiloe-controls {gap:10px}
 .ci-chiloe-original {flex-basis:100%;text-align:center}
}
