.lightbox {
  width: min(calc(100% - 24px), 1100px);
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: auto;
  border: 1px solid #82493d;
  background: #140708;
  color: var(--bone);
}
.lightbox::backdrop { background: #050102ed; }
.lightbox[open] { animation: lightbox-in .22s var(--ease); }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox__inner { padding: clamp(10px, 2vw, 26px); }
.lightbox__top, .lightbox__controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lightbox__top { margin-bottom: 9px; }
.lightbox__top h2 { flex: 1; font: 600 clamp(1.5rem, 3vw, 2.65rem)/1 var(--serif); overflow-wrap: anywhere; }
.lightbox button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #754539;
  background: #1e0c0d;
  color: var(--bone);
  font-size: 1.2rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.lightbox button:hover { border-color: #ee8d77; }
.lightbox button:disabled { opacity: .33; cursor: default; }
.lightbox__close { font-size: 1.65rem !important; }
.lightbox__stage {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  width: 100%;
  height: min(68dvh, 780px);
  background: #090405;
  touch-action: pan-y;
  user-select: none;
}
.lightbox__stage img { max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox__controls { margin-top: 12px; }
.lightbox__meta { color: var(--muted); text-align: center; font-size: .73rem; line-height: 1.6; }
.lightbox__meta a { display: inline-flex; gap: .45rem; align-items: center; min-height: 44px; color: #f0ad9d; text-underline-offset: .24em; }
@keyframes lightbox-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
:where(html:not([data-motion="full"])) .lightbox[open] { animation: none; }
