#app > .page-hero.smrg-header {
  min-height: 0;
  padding-block: clamp(2.75rem, 7vw, 6rem);
  background: var(--ink);
}

#app > .smrg-gallery {
  padding-top: clamp(1.25rem, 4vw, 3.5rem);
}

.smrg-gallery .smrg-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(.65rem, 1.7vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.smrg-grid > li {
  grid-column: span 2;
  min-width: 0;
}

.smrg-grid > li:nth-child(-n + 2) {
  grid-column: span 3;
}

.smrg-tile {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream);
}

.smrg-grid > li:nth-child(-n + 2) .smrg-tile {
  aspect-ratio: 3 / 2;
}

.smrg-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.smrg-tile:focus-visible,
.smrg-dialog button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .smrg-tile:hover img { transform: scale(1.025); }
}

.smrg-gallery .smrg-dialog {
  max-width: none;
  max-height: none;
  width: min(80rem, 97vw);
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--white);
}

.smrg-dialog::backdrop {
  background: rgb(17 20 17 / 88%);
}

.smrg-view {
  position: relative;
  display: grid;
  place-items: center;
  padding: 3.25rem clamp(.7rem, 6vw, 5rem) 1rem;
}

.smrg-figure {
  min-width: 0;
  width: 100%;
  margin: 0;
  text-align: center;
}

.smrg-figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 75vh;
  max-height: 75dvh;
  margin-inline: auto;
}

.smrg-caption {
  margin-top: .8rem;
  font-size: .95rem;
}

.smrg-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.smrg-dialog button {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgb(255 254 250 / 50%);
  border-radius: 50%;
  color: var(--white);
  background: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
}

.smrg-dialog .smrg-close {
  top: .35rem;
  right: .55rem;
}

.smrg-dialog .smrg-prev,
.smrg-dialog .smrg-next {
  top: 50%;
  transform: translateY(-50%);
}

.smrg-dialog .smrg-prev { left: .55rem; }
.smrg-dialog .smrg-next { right: .55rem; }

@media (max-width: 680px) {
  .smrg-gallery .smrg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .smrg-grid > li:nth-child(n) { grid-column: span 1; }
  .smrg-grid > li:first-child { grid-column: span 2; }
  .smrg-grid > li:nth-child(2) .smrg-tile { aspect-ratio: 4 / 3; }
}

.smrg-credit {
  margin: 1.5rem 0 0;
  font-size: 0.875rem;
  color: var(--muted, #5c5a53);
}
