/* Shared inspection surface: the reading page stays underneath. */
html.image-viewer-open { overflow: hidden; }
.image-preview-link { cursor: zoom-in; }
a.image-preview-link:has(> img), a.image-preview-link:has(> picture) { display: block; }
.image-preview-link:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 4px; }
.film-card > .image-preview-link img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.person-card > .image-preview-link img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.film-punk-reference > .image-preview-link { flex-shrink: 0; }
#imageViewer {
  width: min(1320px, calc(100% - 32px)); height: calc(100dvh - 32px);
  max-width: none; max-height: none; margin: auto; padding: 0;
  border: 1px solid #414b41; border-radius: 10px;
  color: var(--text); background: #111511; overflow: hidden;
  box-shadow: 0 20px 80px #0008;
}
#imageViewer[open] { display: flex; flex-direction: column; }
#imageViewer::backdrop { background: rgb(0 0 0 / .82); }
#imageViewer .image-viewer-toolbar {
  display: flex; align-items: center; gap: 24px; flex-shrink: 0;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
#imageViewerTitle { flex: 1; min-width: 0; margin: 0; font: 500 14px/1.4 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#imageViewer .image-viewer-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#imageViewer wa-button::part(button) { min-height: 40px; }
#imageViewer [data-image-count] { min-width: 48px; text-align: center; color: var(--muted); font: 12px var(--mono); font-variant-numeric: tabular-nums; }
#imageViewer [data-image-zoom] { min-width: 90px; }
#imageViewer [data-image-close] { margin-left: 8px; }
#imageViewer .image-viewer-stage { flex: 1; min-height: 0; min-width: 0; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 20px; background: #0a0d0a; }
#imageViewer .image-viewer-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
#imageViewer .image-viewer-stage.is-enlarged { display: block; }
#imageViewer .image-viewer-stage:focus-visible { outline: 2px solid var(--lime); outline-offset: -3px; }
#imageViewer .image-viewer-stage.is-enlarged img { max-width: none; max-height: none; margin: auto; cursor: zoom-out; }
#imageViewer .image-viewer-footer { flex-shrink: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 12px 20px; border-top: 1px solid var(--line); }
#imageViewerCaption { margin: 0; color: var(--text); font: 13px/1.5 var(--display); max-height: 4.5em; overflow: auto; }
#imageViewerStatus { margin: 0; color: var(--muted); font: 12px/1.5 var(--mono); font-variant-numeric: tabular-nums; flex-shrink: 0; }
#imageViewer [hidden] { display: none !important; }
@media (max-width: 600px) {
  #imageViewer { width: calc(100% - 16px); height: calc(100dvh - 16px); border-radius: 8px; }
  #imageViewer .image-viewer-toolbar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  #imageViewerTitle { flex-basis: 100%; font-size: 13px; }
  #imageViewer .image-viewer-controls { width: 100%; gap: 6px; }
  #imageViewer [data-image-close] { margin-left: auto; }
  #imageViewer .image-viewer-stage { padding: 8px; }
  #imageViewer .image-viewer-footer { flex-direction: column; gap: 4px; padding: 10px 12px; }
}
