.family-gallery {
  padding: 58px 0 80px;
  border-top: 1px solid #c0d0b82b;
  scroll-margin-top: 32px;
}
.gallery-heading { display: flex; justify-content: space-between; align-items: end; gap: 36px; margin-bottom: 36px; }
.gallery-heading .eyebrow { margin-bottom: 12px; }
.gallery-heading h2 { font: 400 clamp(34px, 4vw, 48px)/1.15 Georgia, serif; margin: 0; letter-spacing: -.6px; }
.gallery-heading > p { color: #c9d5c7; font-size: 16px; max-width: 420px; margin: 0 0 3px; }
.gallery-heading > p span { color: #a8bda6; font-size: 14px; }
.photo-grid { columns: 3; column-gap: 24px; }
.photo-card { margin: 0 0 26px; break-inside: avoid; border: 1px solid #c0d0b82b; border-radius: 12px; overflow: hidden; background: #0e2d25; }
.photo-link { display: block; position: relative; }
.photo-link img { display: block; width: 100%; height: auto; }
.photo-link:focus-visible { outline-offset: -5px; }
.enlarge-hint { position: absolute; right: 12px; bottom: 12px; border-radius: 20px; background: #10291de6; color: #faf4e3; padding: 5px 12px; font-size: 12px; opacity: 0; transition: opacity .15s ease; }
.photo-link:hover .enlarge-hint, .photo-link:focus-visible .enlarge-hint { opacity: 1; }
.photo-card figcaption { padding: 17px 19px 19px; }
.photo-card h3 { font: 400 23px/1.2 Georgia, serif; margin: 0 0 8px; }
.photo-card p { font-size: 14px; line-height: 1.6; color: #c9d5c7; margin: 0; }
.photo-viewer { width: min(1200px, calc(100% - 48px)); max-height: calc(100svh - 32px); padding: 0; border: 0; background: #102b24; color: #faf4e3; border-radius: 12px; box-shadow: 0 16px 80px #0008; }
.photo-viewer::backdrop { background: #06130fea; }
.viewer-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; gap: 20px; }
#viewer-count { color: #c9d5c7; font-size: 14px; }
.photo-viewer button { font: 500 14px/1.4 "Avenir Next", "Segoe UI", sans-serif; color: #faf4e3; background: #ffffff08; border: 1px solid #c0d0b840; border-radius: 6px; cursor: pointer; min-height: 44px; padding: 9px 16px; }
.photo-viewer button:hover { background: #ffffff18; }
.photo-viewer button:focus-visible { outline: 2px solid #e6ca88; outline-offset: 3px; }
.viewer-close span { font-size: 22px; margin-left: 8px; vertical-align: -1px; }
.viewer-image { display: block; width: 100%; height: max(160px, calc(100svh - 250px)); max-height: 850px; object-fit: contain; background: #0a1d18; }
.viewer-bottom { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 16px 20px 20px; }
.viewer-caption { text-align: center; font-size: 15px; line-height: 1.5; color: #dce4d5; }
html:has(.photo-viewer[open]) { overflow: hidden; }
@media (max-width: 900px) {
  .gallery-heading { display: block; }
  .gallery-heading > p { margin-top: 20px; max-width: none; }
  .photo-grid { columns: 2; }
}
@media (max-width: 560px) {
  .family-gallery { padding: 40px 0 50px; }
  .photo-grid { columns: 1; }
  .photo-card { margin-bottom: 22px; }
  .photo-viewer { width: calc(100% - 20px); max-height: calc(100svh - 20px); }
  .viewer-toolbar { padding: 10px 12px; }
  .viewer-image { height: calc(100svh - 290px); }
  .viewer-bottom { grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px 12px; }
  .viewer-caption { grid-column: 1 / -1; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) { .enlarge-hint { transition: none; } }
