.case-enlarge {
  display: block;
}

.case-lightbox {
  width: min(1440px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: clamp(12px, 3vw, 32px);
  border: 0;
  background: #e2e2e2;
  color: #222;
}

.case-lightbox::backdrop {
  background: #111317e8;
}

.case-lightbox-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(4px, 2vw, 16px);
}

.case-lightbox-stage img {
  grid-column: 2;
  display: block;
  width: 100%;
  max-height: calc(100dvh - 180px);
  object-fit: contain;
}

.case-lightbox button {
  width: 44px;
  height: 44px;
  border: 1px solid #777;
  border-radius: 50%;
  background: #fafafa;
  color: inherit;
  font-size: 20px;
  cursor: pointer;
}

.case-lightbox button:hover {
  background: var(--orange);
  border-color: var(--orange);
}

.case-lightbox button:focus-visible,
.case-enlarge:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

.case-close {
  display: block;
  margin: 0 0 12px auto;
}

.case-lightbox p {
  text-align: center;
  font: 12px/1.6 var(--mono);
  margin: 14px 0 0;
}

.case-enlarge::after {
  content: "";
  position: absolute;
  inset: 0;
}

.case-lightbox-native .case-lightbox-stage img {
  width: auto;
  max-width: 100%;
  height: auto;
  justify-self: center;
}


.has-case-lightbox a[href],
.has-case-lightbox button:not(:disabled) {
  cursor: pointer;
}

.case-lightbox-hint {
  margin: 0 0 12px;
  color: #686a63;
  font: 11px/1.5 var(--mono);
}

figcaption + .case-lightbox-hint {
  display: block;
  margin: 6px 0 0;
}
