a[data-photo-viewer] {
  cursor: zoom-in;
}

.spr-photo-viewer {
  box-sizing: border-box;
  width: min(72rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #454545;
  border-radius: 1.25rem;
  background: var(--capsule-active, #0a0a0a);
  color: var(--capsule-active-text, #fff);
  font-family: var(--font-sans, system-ui);
}

.spr-photo-viewer::backdrop {
  background: rgb(10 10 10 / 76%);
}

.spr-photo-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem clamp(0.75rem, 3vw, 1.5rem);
}

.spr-photo-viewer-toolbar h2 {
  margin: 0;
  color: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.spr-photo-viewer-close {
  flex: none;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid #646464;
  border-radius: var(--capsule-radius, 999px);
  background: #202020;
  color: inherit;
  font: 600 0.875rem / 1.3 var(--font-sans, system-ui);
  cursor: pointer;
}

.spr-photo-viewer-close:hover {
  background: #353535;
}

.spr-photo-viewer-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.spr-photo-viewer-media {
  display: grid;
  justify-items: center;
  padding: 0 0.75rem 0.75rem;
}

.spr-photo-viewer-media img {
  display: block;
  max-width: 100%;
  max-height: max(8rem, calc(100vh - 8rem));
  max-height: max(8rem, calc(100dvh - 8rem));
  width: auto;
  height: auto;
  object-fit: contain;
}

.spr-photo-viewer-media img[hidden] {
  display: none;
}

.spr-photo-viewer-media p {
  margin: 0;
  padding: 1.5rem 0.5rem;
  color: inherit;
}
