.photo-library .video-library-heading h1 {
  font-size: clamp(52px, 4.4vw, 72px);
}

.photo-library .video-library-eyebrow {
  margin-bottom: 10px;
}

.photo-library .video-toolbar {
  margin-top: 22px;
}

.photo-library .video-filters button {
  padding-inline: clamp(17px, 1.3vw, 22px);
}

.photo-library :is(.video-toolbar, .photo-empty, .photo-grid, figcaption)[hidden] {
  display: none;
}

.photo-empty {
  display: grid;
  min-height: clamp(160px, 20vw, 282px);
  place-items: center;
  margin: clamp(26px, 3vw, 46px) 0 0;
  padding: 24px;
  border: 1px solid rgba(247, 247, 247, .16);
  border-radius: 12px;
  background: rgba(5, 12, 18, .5);
  color: var(--muted);
  font-size: clamp(16px, 1.25vw, 20px);
  text-align: center;
}

.photo-tile img {
  object-position: var(--photo-position, center);
}

.photo-viewer {
  width: min(calc(100% - 28px), 1140px);
  max-height: calc(100% - 24px);
  padding: clamp(12px, 1.55vw, 21px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(247, 247, 247, .28);
  border-radius: 14px;
  background: #080e13;
  color: var(--paper);
}

.photo-viewer::backdrop {
  background: rgba(0, 0, 0, .85);
}

.photo-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.photo-viewer-count {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.photo-viewer-stage {
  display: grid;
  grid-template-areas: "previous image next";
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.photo-viewer figure {
  grid-area: image;
  min-width: 0;
  margin: 0;
  text-align: center;
}

.photo-viewer img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72dvh;
  margin-inline: auto;
  object-fit: contain;
}

.photo-viewer figcaption {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.photo-viewer-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(247, 247, 247, .4);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.photo-viewer-button:enabled:hover { border-color: var(--video-accent); }
.photo-viewer-button:disabled { opacity: .35; cursor: default; }
.photo-viewer-previous { grid-area: previous; }
.photo-viewer-next { grid-area: next; }

html.photo-viewer-open,
html.photo-viewer-open body {
  overflow: hidden;
}

@media (max-width: 570px) {
  .photo-library .video-library-heading h1 { font-size: clamp(49px, 11.8vw, 65px); }
  .photo-library .video-toolbar { justify-content: flex-start; gap: 7px; }
  .photo-viewer-stage {
    grid-template-areas: "image image" "previous next";
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .photo-viewer img { max-height: 64dvh; }
  .photo-viewer-next { justify-self: end; }
}

