.page-preview {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.page-preview img { display: block; width: 100%; height: auto; }
.page-preview:focus-visible { outline: 3px solid #9c4c35; outline-offset: 5px; }

.page-dialog {
  width: min(1100px, 96vw);
  height: 94dvh;
  max-width: 96vw;
  max-height: 94dvh;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f8f9f6;
  color: #283e43;
  overflow: hidden;
}
.page-dialog::backdrop { background: #102024cc; }

.page-toolbar {
  height: 62px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #d9dfd9;
}
.page-toolbar button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #bbc7c3;
  background: transparent;
  color: inherit;
  border-radius: 4px;
  cursor: pointer;
}
.page-toolbar [data-close] { margin-left: auto; }

.page-viewport {
  height: calc(100% - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.page-viewport img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  user-select: none;
}
