/* Photo viewer only: original pixels, contained at fit, scrollable at zoom. */
.photo-open { display: block; position: relative; min-width: 0; cursor: zoom-in; text-decoration: none; }
.photo-open:focus-visible { outline: 3px solid #99562e; outline-offset: 4px; }
.photo-open-hint {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; max-width: calc(100% - 24px); padding: 10px 14px;
  background: var(--navy, #123445); color: white;
  font: 700 14px/1.4 'Work Sans', sans-serif;
  text-align: center; pointer-events: none;
}
.photo-open:hover .photo-open-hint, .photo-open:focus-visible .photo-open-hint { background: #99562e; }
.lightbox-dialog {
  --lightbox-ink: var(--navy, #123445);
  --lightbox-accent: #99562e;
  position: fixed; inset: 0; margin: auto;
  width: calc(100% - 32px); max-width: 1600px;
  height: calc(100vh - 32px); height: calc(100dvh - 32px);
  max-height: none; max-width: min(1600px, calc(100% - 32px));
  padding: 0; border: 1px solid #d5dadd; border-radius: 0;
  background: var(--paper, #fdfdfc); color: var(--lightbox-ink);
  font: 400 16px/1.5 'Work Sans', sans-serif; overflow: auto;
  overscroll-behavior: contain;
}
.lightbox-dialog[open] { display: grid; grid-template-rows: auto minmax(120px, 1fr) auto; }
.lightbox-dialog::backdrop { background: #071e2ee6; }
.lightbox-dialog *, .lightbox-dialog *::before, .lightbox-dialog *::after { box-sizing: border-box; }
.lightbox-dialog [hidden] { display: none !important; }
.lightbox-dialog :focus-visible { outline: 3px solid var(--lightbox-accent); outline-offset: 2px; }
.lightbox-header, .lightbox-footer { padding: 12px 20px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.lightbox-header { border-bottom: 1px solid #d5dadd; }
.lightbox-title { margin: 0; font: 900 24px/1.1 'League Spartan', sans-serif; }
.lightbox-close { margin-left: auto; }
.lightbox-button, .lightbox-original {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 9px 12px;
  border: 1px solid #b8c1c4; border-radius: 0; background: transparent;
  color: var(--lightbox-ink); font: inherit; cursor: pointer; touch-action: manipulation;
}
.lightbox-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lightbox-button:hover:not(:disabled), .lightbox-original:hover { background: #f0e5d8; border-color: var(--lightbox-accent); }
.lightbox-button:disabled { opacity: .45; cursor: default; }
.lightbox-stage { position: relative; min-width: 0; min-height: 120px; overflow: auto; background: #f2f1ee; overscroll-behavior: contain; scrollbar-color: #526573 #f2f1ee; touch-action: pan-x pan-y pinch-zoom; }
.lightbox-canvas { display: grid; place-items: center; min-width: 100%; min-height: 100%; }
.lightbox-dialog .lightbox-image { display: block; max-width: none; max-height: none; object-fit: contain; margin: 0; padding: 0; user-select: none; -webkit-user-drag: none; }
.lightbox-dialog[data-zoomed="true"] .lightbox-stage { cursor: grab; }
.lightbox-dialog[data-dragging="true"] .lightbox-stage { cursor: grabbing; }
.lightbox-status { position: absolute; inset: 0; display: grid; place-content: center; padding: 24px; margin: 0; max-width: none; text-align: center; pointer-events: none; }
.lightbox-footer { flex-wrap: wrap; border-top: 1px solid #d5dadd; }
.lightbox-description { flex: 1 1 260px; min-width: 0; }
.lightbox-caption { margin: 0; max-width: none; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.lightbox-count { font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
.lightbox-navigation, .lightbox-zoom { display: flex; align-items: center; gap: 6px; }
.lightbox-original { font-size: 14px; text-underline-offset: 4px; }
.lightbox-hint { flex-basis: 100%; margin: 0; max-width: none; color: #526573; font-size: 13px; line-height: 1.4; }
@media (max-width: 759px) {
  .lightbox-dialog { width: calc(100% - 16px); max-width: calc(100% - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); }
  .lightbox-header, .lightbox-footer { padding: 8px 10px; gap: 8px; }
  .lightbox-description { flex-basis: 100%; }
  .lightbox-button { padding: 9px; }
  .lightbox-original { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox-dialog, .lightbox-dialog * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
