.gallery-section { margin-top: 42px; }
.gallery img { cursor: zoom-in; transition: opacity .2s, filter .2s; }
.gallery img:hover { filter: brightness(.92); }
.gallery img:focus-visible, .lightbox button:focus-visible { outline: 2px solid #ff7700; outline-offset: 5px; }
dialog.lightbox {
  inset: 0; margin: 0; padding: 64px 24px; border: 0;
  box-sizing: border-box; max-width: none; max-height: none;
  width: 100%; height: 100dvh; color: var(--theme-text, #202020);
  background: rgba(255,255,255,.94); overflow: hidden;
  touch-action: pinch-zoom;
}
dialog.lightbox[open] { display: flex; }
dialog.lightbox::backdrop {
  background: transparent;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
dialog.lightbox img {
  display: block; width: auto; height: auto;
  max-width: 100%; max-height: 100%; object-fit: contain;
  box-shadow: 0 12px 48px rgb(0 0 0 / 10%); user-select: none;
}
dialog.lightbox .viewer-outgoing { position: absolute; pointer-events: none; }
.lightbox button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 8px 12px;
  border: 0; border-radius: 4px; background: transparent;
  color: inherit; font: inherit; cursor: pointer;
}
.lightbox button:hover { background: var(--theme-soft, #efefef); }
.viewer-close { position: absolute; right: 24px; top: 12px; }
.viewer-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
@media (max-width: 600px) {
  dialog.lightbox { padding: 64px 12px; }
  .viewer-close { right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } }
