.gallery-band {
  background: #eee9de;
  color: #302e26;
}
.field-gallery {
  display: grid;
  grid-template-columns: minmax(13rem, .62fr) minmax(0, 1.38fr);
  align-items: center;
  column-gap: clamp(2rem, 6vw, 6.75rem);
  max-width: 75rem;
  padding-block: clamp(2.5rem, 4.8vw, 4.75rem);
}
.gallery-intro { min-width: 0; }
.gallery-band .eyebrow { color: #795139; margin-bottom: 1rem; }
.gallery-intro h2 {
  max-width: 11ch;
  font-size: clamp(2.1rem, 3.45vw, 3.65rem);
  line-height: 1.03;
  text-wrap: pretty;
}
.gallery-intro h2 em { color: #644b37; }
.gallery-stage {
  container-type: inline-size;
  min-width: 0;
  touch-action: pan-y pinch-zoom;
}
.gallery-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  margin: 0;
  scroll-margin-top: 1rem;
}
.gallery-slide + .gallery-slide { display: none; }
.gallery-slide:target { display: grid; }
.field-gallery:not([data-enhanced]) .gallery-stage:has(.gallery-slide:target) .gallery-slide:not(:target) { display: none; }
.field-gallery[data-enhanced] .gallery-slide { display: none; }
.field-gallery[data-enhanced] .gallery-stage .gallery-slide[data-current] { display: grid; }
.gallery-slide > img, .gallery-slide > picture { grid-column: 2; }
.gallery-slide img, .dossier-photo .gallery-slide img {
  display: block;
  width: auto;
  height: calc(100cqw * 2 / 3);
  max-height: none;
  max-width: 100cqw;
  object-fit: contain;
  border-radius: 3px;
}
.gallery-slide img[src="/assets/northern-scimitar-billed-woodcreeper-prey.webp"] {
  transform: scaleX(-1);
}
.gallery-slide figcaption {
  grid-column: 2 / -1;
  contain: inline-size;
  margin: .67rem 0 0;
}
.gallery-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  color: #302e26;
}
.gallery-name { font: 400 clamp(1.2rem, 1.55vw, 1.55rem)/1.2 var(--display); }
.gallery-caption small { font: 400 .82rem/1.4 var(--body); color: #59554a; }
.gallery-controls, .gallery-manual { display: flex; align-items: center; gap: .15rem; }
.gallery-controls { margin-top: clamp(1.3rem, 3vw, 2.9rem); }
.gallery-controls[hidden], .field-gallery[data-enhanced] .gallery-manual { display: none; }
.gallery-manual { margin-top: .55rem; }
.gallery-controls button, .gallery-manual a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #443b2f;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.gallery-controls button:focus-visible, .gallery-manual a:focus-visible, .gallery-stage:focus-visible {
  outline: 2px solid #795139;
  outline-offset: 2px;
}
@media (hover: hover) {
  .gallery-controls button:hover, .gallery-manual a:hover { background: #ded6c7; }
}
.gallery-arrow {
  width: 20px;
  height: 12px;
  position: relative;
}
.gallery-arrow::before, .gallery-arrow::after {
  content: "";
  position: absolute;
  display: block;
}
.gallery-arrow::before { top: 5px; right: 1px; width: 19px; border-top: 1.65px solid; }
.gallery-arrow::after { top: 1.2px; right: 1px; width: 8px; height: 8px; border-top: 1.65px solid; border-right: 1.65px solid; transform: rotate(45deg); }
.gallery-arrow.back { transform: rotate(180deg); }
.gallery-counter, .gallery-manual span {
  font: 400 .85rem/1 var(--body);
  color: #59554a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.gallery-counter b { font-weight: 600; color: #302e26; }
.gallery-counter i { font-style: normal; padding-inline: .36rem; }
.gallery-controls .gallery-toggle { margin-left: .5rem; border: 1px solid #817663; }
.gallery-toggle span {
  display: block;
  width: 9px;
  height: 12px;
  border-inline: 3px solid currentColor;
}
.gallery-toggle[data-paused] span {
  width: 0;
  height: 0;
  margin-left: 2px;
  border: 0;
  border-block: 6px solid transparent;
  border-left: 9px solid currentColor;
}
@media (max-width: 760px) {
  .field-gallery {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.1rem;
    padding-block: 2.55rem;
  }
  .gallery-intro { display: contents; }
  .gallery-band .eyebrow { margin: 0 0 -.68rem; }
  .gallery-intro h2 { max-width: 18ch; font-size: clamp(2rem, 5.8vw, 2.8rem); }
  .gallery-controls { grid-row: 4; margin: -.4rem 0 -.15rem; }
  .gallery-stage { grid-row: 3; }
  .gallery-caption { row-gap: .2rem; }
}
@media (max-width: 450px) {
  .gallery-caption { display: grid; }
  .gallery-stage { min-height: 0; }
}
@media (min-width: 761px) and (max-width: 999px) {
  .gallery-caption { display: grid; row-gap: .16rem; }
}

.dossier-photo:has(.lead-gallery) { background:transparent; align-self:center; padding:clamp(1.5rem,3vw,3rem) clamp(1.25rem,3vw,3.25rem) clamp(1.5rem,3vw,3rem) 0; }
.dossier-photo .lead-gallery { position:relative; display:block; width:100%; max-width:none; min-width:0; margin:0; padding:0; }
.lead-gallery .gallery-stage { border-radius:3px; }
.lead-gallery .gallery-slide picture {display:block;}
.dossier-photo .gallery-slide figcaption { margin:0; padding:.8rem 0 0; background:transparent; color:var(--ink); }
.lead-gallery .gallery-caption { display:grid; gap:.15rem; padding-right:12.15rem; min-height:3rem; align-content:start; }
.lead-gallery .gallery-name { font-size:clamp(1.08rem,1.45vw,1.45rem); }
.lead-gallery .gallery-controls {position:absolute; right:0; bottom:.1rem; margin:0; }
.lead-gallery .gallery-controls button,.lead-gallery .gallery-manual a {width:36px;height:40px;}
.lead-gallery .gallery-controls .gallery-toggle{width:36px;height:36px;}
.lead-gallery:not([data-enhanced]) .gallery-caption {padding-right:0;}
.lead-gallery:not([data-enhanced]) .gallery-manual {margin-top:.25rem;}
@media (min-width:761px) and (max-width:1080px) {
  .lead-gallery .gallery-caption {padding-right:0;}
  .lead-gallery .gallery-controls {position:static; margin-top:.25rem; justify-content:flex-start;}
}
@media (max-width:760px) {
  .dossier-photo:has(.lead-gallery){padding:0 var(--edge);}
  .dossier-photo .gallery-slide figcaption{padding:.62rem 0 0;}
  .lead-gallery .gallery-controls{position:static; margin-top:.25rem; justify-content:flex-start;}
  .lead-gallery .gallery-caption{padding-right:0; min-height:0;}
}
