/* Styles are scoped to albums so the shared site chrome stays independent. */
.gallery-page {
  --gallery-ink: #111815;
  --gallery-pine: #234139;
  --gallery-paper: #fffdf7;
  --gallery-stone: #f3f0e8;
  color: var(--gallery-ink);
  background: var(--gallery-paper);
  padding: clamp(28px, 6vw, 80px) max(20px, calc((100vw - 1240px) / 2));
}
.gallery-page *, .gallery-page *::before, .gallery-page *::after { box-sizing: border-box; }
.gallery-page a { color: var(--gallery-pine); text-underline-offset: 4px; }
.gallery-page a:focus-visible, .gallery-page button:focus-visible {
  outline: 3px solid #a15f42;
  outline-offset: 5px;
}
.gallery-intro { max-width: 880px; margin-bottom: 40px; }
.gallery-intro h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 4.7rem);
  font-weight: 400;
  line-height: 1.07;
  margin: 16px 0 20px;
  text-wrap: balance;
}
.gallery-intro > p:not(.eyebrow) { max-width: 680px; font-size: 1.08rem; line-height: 1.7; }
.gallery-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 28px; }
.gallery-breadcrumb a { padding-block: 8px; }
.gallery-actions { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 24px; }
.gallery-actions a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.gallery-page h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 400; line-height: 1.25; }
.gallery-album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 24px; }
.gallery-album-card { display: block; min-width: 0; text-decoration: none; }
.gallery-album-cover { overflow: hidden; aspect-ratio: 4 / 3; background: var(--gallery-stone); }
.gallery-album-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.gallery-album-card:hover img { transform: scale(1.025); }
.gallery-album-label { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 17px 0; border-bottom: 1px solid #d6d8cd; }
.gallery-album-label h3 { font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 400; margin: 0; }
.gallery-album-label > span { white-space: nowrap; font-size: .88rem; }
.gallery-related { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0 0 22px; }
.gallery-related a { display: inline-flex; min-height: 44px; align-items: center; }
.gallery-species-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 24px; border-bottom: 1px solid #d6d8cd; }
.gallery-species-nav a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 14px; background: var(--gallery-stone); text-decoration: none; border: 1px solid transparent; }
.gallery-species-nav a:hover { border-color: var(--gallery-pine); }
.gallery-species-nav span { font-size: .78rem; opacity: .8; }
.gallery-section { margin-top: 48px; scroll-margin-top: 145px; }
.gallery-section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; }
.gallery-section-heading h2 { margin: 0; }
.gallery-section-heading a { display: inline-flex; align-items: center; min-height: 44px; }
.gallery-photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; align-items: start; }
.gallery-photo { margin: 0; min-width: 0; }
.gallery-photo > a { display: block; position: relative; overflow: hidden; background: var(--gallery-stone); aspect-ratio: 4 / 3; }
.gallery-photo img { display: block; height: 100%; width: 100%; object-fit: contain; }
.gallery-photo figcaption { padding-top: 12px; font-size: .93rem; line-height: 1.55; }
.gallery-expand { position: absolute; bottom: 10px; right: 10px; padding: 7px 10px; background: rgba(17, 24, 21, .88); color: #fffdf7; font-size: .78rem; pointer-events: none; }
.gallery-inquiry { padding-top: 32px; margin-top: 60px; border-top: 1px solid #d6d8cd; }
.gallery-inquiry h2 { margin: 0 0 12px; }
.gallery-modal-open { overflow: hidden; }
.gallery-lightbox {
  padding: 0; border: 1px solid #69726c; border-radius: 4px;
  width: min(1200px, calc(100vw - 32px)); max-width: none;
  max-height: calc(100dvh - 32px); color: #fffdf7; background: #111815;
  overflow: auto;
}
.gallery-lightbox::backdrop { background: rgba(4, 9, 6, .94); }
.gallery-lightbox:not([open]) { display: none; }
.gallery-lightbox-inner { display: flex; flex-direction: column; min-height: 0; padding: 16px 22px 20px; }
.gallery-lightbox-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.gallery-lightbox-top h2 { margin: 0; font-family: inherit; font-size: 1rem; line-height: 1.4; }
.gallery-lightbox button, .gallery-lightbox a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 10px 14px;
  border: 1px solid #8c968d; color: #fffdf7; background: transparent;
  font: inherit; border-radius: 2px; cursor: pointer; text-decoration: none;
}
.gallery-lightbox button:hover, .gallery-lightbox a:hover { background: #234139; }
.gallery-lightbox button:disabled { opacity: .45; cursor: default; }
.gallery-lightbox [data-gallery-close] { flex-shrink: 0; gap: 12px; }
.gallery-lightbox [data-gallery-close] span { font-size: 1.5rem; line-height: 1; }
.gallery-lightbox :focus-visible { outline-color: #e4c782; }
.gallery-lightbox-stage {
  position: relative; display: grid; place-items: center; min-height: 160px;
  height: min(66dvh, 750px); overflow: hidden; touch-action: pan-y pinch-zoom;
}
.gallery-lightbox-stage img { display: block; width: 100%; height: 100%; max-height: min(66dvh, 750px); object-fit: contain; }
.gallery-lightbox-stage[aria-busy="true"]::after { content: "Loading photo…"; position: absolute; padding: 10px 16px; background: #111815; color: #fffdf7; }
.gallery-lightbox-bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 16px; }
.gallery-lightbox-bottom p { margin: 0; font-size: .94rem; line-height: 1.5; }
.gallery-lightbox-bottom .gallery-lightbox-location { color: #c9d2cb; font-size: .82rem; margin-top: 3px; }
.gallery-lightbox-bottom [data-gallery-status] { color: #e4c782; font-size: .82rem; margin-top: 3px; }
.gallery-lightbox-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.gallery-lightbox-controls button { font-size: 1.2rem; }
.gallery-image-error { max-width: 30em; padding: 28px; line-height: 1.6; text-align: center; }
.gallery-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .gallery-album-grid, .gallery-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-lightbox-bottom { align-items: start; }
  .gallery-lightbox-controls { gap: 6px; }
}
@media (max-width: 600px) {
  .gallery-page { padding-inline: 20px; }
  .gallery-album-grid, .gallery-photo-grid { grid-template-columns: 1fr; gap: 26px; }
  .gallery-intro { margin-bottom: 28px; }
  .gallery-section { margin-top: 36px; }
  .gallery-lightbox { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .gallery-lightbox-inner { padding: 12px; }
  .gallery-lightbox-stage, .gallery-lightbox-stage img { height: 52dvh; max-height: 52dvh; }
  .gallery-lightbox-bottom { flex-direction: column; gap: 12px; }
  .gallery-lightbox-controls { width: 100%; }
  .gallery-lightbox-controls a { margin-left: auto; }
  .gallery-lightbox-top { gap: 10px; }
}
@media (max-height: 540px) and (min-width: 601px) {
  .gallery-lightbox-stage, .gallery-lightbox-stage img { height: 48dvh; max-height: 48dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-page *, .gallery-page *::before, .gallery-page *::after { scroll-behavior: auto; transition: none; }
}
