img[data-avf-zoom], a[data-avf-zoom] { cursor: zoom-in; }
.avf-linked-photo-zoom {
  min-height: 44px; padding: 6px 10px; border: 1px solid #b88a32;
  border-radius: 6px; background: #fffaf1; color: #2c251d;
  font: 600 13px/1.2 system-ui, sans-serif; cursor: zoom-in;
}
img[data-avf-zoom]:focus-visible, a[data-avf-zoom]:focus-visible {
  outline: 3px solid #efb83e;
  outline-offset: 3px;
}
html:has(#avf-photo-dialog[open]) { overflow: hidden; }
#avf-photo-dialog {
  position: fixed; inset: 0; margin: auto; box-sizing: border-box;
  width: min(960px, calc(100% - 16px)); max-width: none;
  max-height: calc(100% - 16px); max-height: calc(100dvh - 16px);
  padding: 0; overflow: auto; border: 1px solid #49433a; border-radius: 12px;
  background: #201d18; color: #fff9ef; text-align: center;
}
#avf-photo-dialog::backdrop { background: rgb(10 9 8 / .84); }
#avf-photo-dialog .avf-photo-tools {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 6px; padding: 8px; background: #201d18;
}
#avf-photo-dialog button {
  box-sizing: border-box; min-height: 44px; min-width: 44px; padding: 5px 10px;
  background: #353029; color: #fff9ef; border: 1px solid #73664f;
  border-radius: 6px; font: 600 15px/1.25 system-ui, sans-serif; cursor: pointer;
}
#avf-photo-dialog button:focus-visible { outline: 2px solid #efb83e; outline-offset: 2px; }
#avf-photo-dialog .avf-photo-stage {
  display: flex; align-items: safe center; justify-content: safe center;
  height: clamp(140px, calc(100dvh - 184px), 700px);
  overflow: auto; overscroll-behavior: contain; background: #15130f;
}
#avf-photo-dialog img {
  display: block; flex: none; width: auto; height: auto;
  max-width: 100%; max-height: 100%; object-fit: contain;
}
#avf-photo-dialog .avf-photo-stage.is-zoomed img { max-width: none; max-height: none; }
#avf-photo-dialog .avf-photo-caption {
  margin: 0; padding: 9px 14px; color: inherit; font: 500 15px/1.4 system-ui, sans-serif;
}
