body.photo-preview-open { overflow: hidden; }
.photo-preview { margin: auto; box-sizing: border-box; width: min(960px, calc(100% - 2rem)); height: min(88vh, 56rem); height: min(88dvh, 56rem); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 12px; background: #151e2a; color: #f4f7fa; overflow: hidden; }
.photo-preview[open] { display: flex; flex-direction: column; }
.photo-preview::backdrop { background: rgb(10 18 29 / 78%); }
.photo-preview-header { display: flex; align-items: center; flex: 0 0 auto; gap: .65rem; padding: .7rem .85rem; background: #f7f9fc; color: #25384d; }
.photo-preview-header h2 { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; font-weight: 600; }
.photo-preview-header button { flex: 0 0 auto; min-height: 44px; padding: .55rem .85rem; border: 1px solid #c8d4e1; border-radius: 7px; font: inherit; font-size: .85rem; cursor: pointer; }
.photo-preview-zoom { background: #fff; color: #285d85; }
.photo-preview-close { background: #285d85; color: #fff; }
.photo-preview-header button:disabled { opacity: .5; cursor: default; }
.photo-preview-header button:focus-visible { outline: 2px solid #285d85; outline-offset: 3px; }
.photo-preview-stage { display: flex; flex: 1; min-height: 0; min-width: 0; align-items: center; justify-content: center; overflow: auto; overscroll-behavior: contain; }
.photo-preview-stage img { display: block; flex: 0 0 auto; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.photo-preview-stage img[hidden], .photo-preview-status[hidden] { display: none; }
.photo-preview-stage.is-zoomed { display: block; }
.photo-preview-stage.is-zoomed img { width: 200%; max-width: none; max-height: none; }
.photo-preview-status { padding: 1.5rem; text-align: center; line-height: 1.6; }
@media (max-width: 600px) {
  .photo-preview { width: calc(100% - 1rem); height: calc(100vh - 1rem); height: calc(100dvh - 1rem); border-radius: 8px; }
  .photo-preview-header { gap: .4rem; padding: .5rem; }
  .photo-preview-header button { padding-inline: .65rem; }
}
