[data-image-preview] {
  position: relative;
  display: block;
  cursor: zoom-in;
}

[data-image-preview]::after {
  content: "⤢";
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #e9fff1;
  background: #101713ec;
  border: 1px solid #9adcb0;
  font: 700 1.15rem/1 system-ui, sans-serif;
  pointer-events: none;
}

[data-image-preview]:focus-visible {
  outline-offset: -4px;
}

.image-lightbox {
  width: min(1100px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid #587163;
  color: #f3f8f4;
  background: #101713;
  overflow: auto;
}

.image-lightbox::backdrop {
  background: #040806e8;
}

.image-lightbox-panel {
  display: grid;
  justify-items: center;
}

.image-lightbox-head, .image-lightbox-foot {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px clamp(10px, 2vw, 20px);
}

.image-lightbox-head h2 {
  margin: 0;
  font-size: clamp(.95rem, 2.4vw, 1.35rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.image-lightbox button {
  min-width: 44px;
  min-height: 42px;
  padding: 4px 10px;
  border: 1px solid #6c8a79;
  color: #eff7f0;
  background: #203028;
  font-weight: 750;
}

.image-lightbox button:hover {
  background: #324b3d;
}

.image-lightbox button[data-preview-close] {
  flex: none;
}

.image-lightbox button[data-preview-close] span {
  padding-inline-start: 3px;
}

.image-lightbox-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  max-height: 70dvh;
}

.image-lightbox-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70dvh;
  object-fit: contain;
}

.image-lightbox-foot p {
  margin: 0;
  color: #d2e0d7;
  font-size: .87rem;
  line-height: 1.4;
}

.image-lightbox-foot:has(p:empty):has([hidden]) {
  display: none;
}

.archive-film-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  margin: 10px 0 0 clamp(13px, 2vw, 24px);
  border: 1px solid var(--line, #526b5e);
  color: var(--accent, var(--green, #a3f7b8));
  font-size: .86rem;
  font-weight: 800;
}

.archive-film-link:hover {
  text-decoration: underline;
}

@media print {
  .image-lightbox, [data-image-preview]::after {
    display: none;
  }
}
