﻿/* Galería: reglas locales; las páginas anteriores conservan sus estilos. */
.gallery-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 12px 0 20px; }
.gallery-photo {
  display: block; align-self: start; width: 100%; min-width: 0; margin: 0; padding: 10px 10px 30px;
  border: 0; background: #fffdf6; border-radius: 1px; cursor: zoom-in;
  box-shadow: 1px 4px 7px #65523415, 3px 10px 18px #6552341c;
  transform: rotate(-1deg);
}
.gallery-photo:nth-child(even) { transform: rotate(1deg); }
.gallery-photo img { display: block; width: 100%; height: auto; }
.gallery-photo:focus-visible { outline: 2px solid #806346; outline-offset: 6px; }
.gallery-empty { text-align: center; color: #776b58; line-height: 1.8; }
.gallery-viewer {
  width: calc(100% - 16px); max-width: 1500px; height: calc(100dvh - 16px); max-height: calc(100dvh - 16px);
  padding: 0; margin: auto; border: 0; border-radius: 3px; background: #25231f; color: #fffaf0;
  box-shadow: 0 12px 45px #0005; overflow-y: auto; overscroll-behavior: contain;
}
.gallery-viewer::backdrop { background: #171410bf; }
.gallery-viewer[open] { animation: gallery-appear 220ms ease-out; }
.gallery-viewer-layout { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 180px; }
.gallery-viewer-toolbar { display: flex; justify-content: flex-end; margin: 0; padding: 8px; }
.gallery-viewer-button { min-height: 44px; padding: 10px 14px; border: 1px solid #a8997d; border-radius: 2px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.gallery-viewer-button:focus-visible { outline: 2px solid #fff5dc; outline-offset: 3px; }
.gallery-viewer-button:disabled { opacity: .4; cursor: default; }
.gallery-viewer-stage { display: flex; align-items: center; justify-content: center; min-height: 0; min-width: 0; padding: 0 8px; }
.gallery-viewer-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-viewer-navigation { display: flex; justify-content: space-between; gap: 12px; padding: 8px; }
@keyframes gallery-appear { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; } }
@media (min-width: 1000px) { .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; } }
@media (min-width: 641px) {
  .gallery-viewer { width: calc(100% - 48px); height: calc(100dvh - 48px); max-height: calc(100dvh - 48px); }
  .gallery-viewer-toolbar, .gallery-viewer-navigation { padding: 12px 16px; }
  .gallery-viewer-stage { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) { .gallery-viewer[open] { animation: none; } }
