.photo-card button.photo-preview {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  cursor: zoom-in;
}
.photo-preview img { display: block; }
.profile-cover button.avatar { cursor: zoom-in; }
dialog.photo-lightbox {
  width: min(1100px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid #d8e5ff;
  border-radius: 18px;
  background: #fff;
  color: #172c52;
  overflow: auto;
}
.photo-lightbox::backdrop { background: rgb(5 15 35 / 86%); }
.lightbox-header, .lightbox-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.lightbox-header p { margin: 0; flex: 1; font-weight: 700; overflow-wrap: anywhere; }
.photo-lightbox button {
  min-width: 44px;
  min-height: 44px;
  color: #164bbc;
  background: #edf3ff;
  border: 1px solid #cfddfb;
  border-radius: 10px;
}
.photo-lightbox button:hover { background: #dce8ff; }
.photo-lightbox button:focus-visible, .photo-preview:focus-visible, .profile-cover button.avatar:focus-visible {
  outline: 3px solid #ff8800;
  outline-offset: -3px;
}
.lightbox-stage { position: relative; background: #0c1931; }
.lightbox-stage img { display: block; width: 100%; height: min(72dvh, 850px); object-fit: contain; }
.lightbox-error { position: absolute; inset: 40% 16px auto; color: #fff; text-align: center; }
.lightbox-footer { justify-content: center; flex-wrap: wrap; }
.photo-lightbox [hidden] { display: none; }
@media (max-width: 600px) {
  .lightbox-header, .lightbox-footer { padding: 8px; gap: 8px; }
  .lightbox-stage img { height: 62dvh; }
}

.photo-lightbox .lightbox-header p { color: #172c52; font-size: 15px; }
