.gallery-photo { display: block; position: relative; cursor: zoom-in; }
.gallery-photo:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
html:has(.gallery-lightbox[open]) { overflow: hidden; scrollbar-gutter: stable; }
body:has(.gallery-lightbox[open]) .mobile-call { display: none; }
.gallery-lightbox {
  position: fixed;
  inset: 0;
  width: min(1200px, calc(100vw - 32px));
  height: min(900px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #526e74;
  border-radius: 6px;
  background: #102124;
  color: #f5f9fa;
  box-shadow: 0 24px 100px #0008;
}
.gallery-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 14px; }
.gallery-lightbox:not([open]) { display: none; }
.gallery-lightbox::backdrop { background: #041216e8; backdrop-filter: blur(4px); }
.gallery-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gallery-viewer-album { color: #c7dce0; font-size: 13px; font-weight: 600; line-height: 1.5; }
.gallery-lightbox button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #607c82;
  border-radius: 3px;
  background: #1b363c;
  color: #f5f9fa;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.gallery-lightbox button:hover { background: #2a4b52; }
.gallery-lightbox :focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.gallery-viewer-close { flex-shrink: 0; }
.gallery-viewer-close span { color: var(--mint); font-size: 24px; line-height: 1; }
.gallery-viewer-stage {
  display: grid;
  place-items: center;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #354d52;
  border-radius: 3px;
  background: #07191d;
}
.gallery-viewer-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.gallery-viewer-stage img[hidden] { display: none; }
.gallery-viewer-error { max-width: 340px; padding: 24px; color: #f5f9fa; text-align: center; font-size: 14px; line-height: 1.8; }
#gallery-viewer-caption { color: #f5f9fa; font-size: 14px; line-height: 1.6; text-align: center; overflow-wrap: anywhere; }
.gallery-viewer-controls { display: flex; align-items: center; justify-content: center; gap: 24px; }
.gallery-viewer-counter { min-width: 58px; color: #c7dce0; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.gallery-viewer-controls .icon { width: 16px; height: 16px; color: var(--mint); }
.gallery-viewer-previous .icon { transform: rotate(180deg); }
@media (max-width: 650px) {
  .gallery-lightbox { width: calc(100vw - 20px); height: calc(100dvh - 20px); padding: 12px; }
  .gallery-lightbox[open] { gap: 12px; }
  .gallery-viewer-album { font-size: 12px; }
  .gallery-lightbox button { padding: 10px 12px; }
  .gallery-viewer-controls { justify-content: space-between; gap: 12px; }
  #gallery-viewer-caption { font-size: 13px; }
}
