.photo-link {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--forest);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.photo-link:hover { background: var(--cream); }
.photo-dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: 90dvh;
  padding: 20px;
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px #0005;
}
.photo-dialog::backdrop { background: #0d241db3; }
.photo-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.photo-heading h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.photo-close { flex-shrink: 0; border: 0; background: transparent; color: var(--ink); font-size: 28px; cursor: pointer; line-height: 1; }
.photo-stage { display: grid; place-items: center; height: min(380px, 50dvh); background: #f0f2eb; border-radius: 4px; overflow: hidden; }
.photo-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.photo-image[hidden], .photo-retry[hidden] { display: none; }
.photo-status { margin: 0; padding: 16px; text-align: center; font-size: 14px; }
.photo-status:empty { display: none; }
.photo-controls { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 16px; }
.photo-nav, .photo-retry { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--forest); cursor: pointer; font: inherit; }
.photo-nav:disabled { opacity: .4; cursor: default; }
.photo-counter { font-size: 14px; font-variant-numeric: tabular-nums; }
.photo-retry { display: block; margin: 12px auto 0; padding: 0 16px; }
.photo-dialog button:focus-visible { outline: 3px solid var(--forest-light); outline-offset: 3px; }
