.pdf-viewer-container {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.pdf-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  z-index: 1;
}
.pdf-controls {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.pdf-control {
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  padding: 0.15rem 0.4rem;
  cursor: pointer;
}
.pdf-control:hover,
.pdf-control:focus {
  color: var(--ink);
  border-color: var(--rule);
}
.pdf-control:focus-visible {
  outline: 2px solid var(--axis);
  outline-offset: 3px;
}
.pdf-page-info {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.pdf-pages {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #f5f5f3;
  padding: clamp(0.75rem, 2vh, 1.25rem) clamp(0.25rem, 1vw, 0.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.75rem, 2vh, 1.25rem);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.pdf-page {
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 17, 15, 0.05);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-width: 100%;
}
.pdf-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
.preview-dialog .dialog-inner {
  width: min(520px, 94vw);
  max-width: 520px;
  height: min(90vh, 780px);
}
