/* Project photos retain the source framing in both cards and the viewer. */
#proyectos .project img{object-fit:contain;background:#e6e0d8}
.gallery-open-photo{position:relative;display:block;padding:0;border:0;background:#e6e0d8;width:100%;text-align:initial}
.gallery-photo-label{position:absolute;bottom:10px;right:10px;display:inline-flex;gap:.42em;align-items:center;background:#161418;color:#fff;padding:.45em .62em;font-size:.73rem;font-weight:700}
.gallery-photo-label svg{width:15px;height:15px}
.gallery-open-photo:hover .gallery-photo-label,.gallery-open-photo:focus-visible .gallery-photo-label{background:#f82121;color:#111}
html.gallery-open{overflow:hidden}
.gallery-viewer{margin:auto;border:0;padding:0;background:#171519;color:#f3f0e9;width:min(97vw,1360px);max-width:97vw;max-height:96dvh;overflow:auto}
.gallery-viewer::backdrop{background:#08070bea}
.gallery-viewer-body{display:grid;gap:7px;padding:clamp(10px,2vw,25px)}
.gallery-toolbar,.gallery-navigation{display:flex;align-items:center;justify-content:space-between;gap:10px}
.gallery-count{padding-left:4px;font-size:.88rem;font-variant-numeric:tabular-nums;color:#e4d9d6}
.gallery-viewer button{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #a39aa2;background:#27232a;color:#fff;padding:6px 11px}
.gallery-viewer button:hover{background:#f3f0e9;color:#151318}
.gallery-prev span{display:inline-flex;transform:scaleX(-1)}
.gallery-viewer figure{display:grid;gap:7px}
.gallery-full{display:block;width:100%;height:min(64dvh,880px);object-fit:contain;background:#100e11}
.gallery-title{padding:3px 4px;font-size:1rem}
@media(max-width:670px){.gallery-full{height:min(59dvh,600px)}}
@media(max-height:610px) and (orientation:landscape){.gallery-full{height:49dvh}}
