.pdf-reader { position: relative; margin-top: 28px; border: 1px solid var(--line); }
.pdf-reader[hidden], .pdf-reader [hidden] { display: none; }
.pdf-toolbar { display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 4px 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.pdf-toolbar button, .pdf-open { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; }
.pdf-toolbar svg { width: 20px; height: 20px; }
.pdf-toolbar button:disabled { opacity: 0.3; cursor: default; }
.pdf-pagination { display: flex; align-items: center; gap: 4px; white-space: nowrap; font: 12px/1 var(--mono); }
.pdf-page-number { width: 34px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 0; color: var(--fg); background: var(--bg); font: inherit; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.pdf-page-number::-webkit-inner-spin-button, .pdf-page-number::-webkit-outer-spin-button { appearance: none; margin: 0; }
.pdf-total { min-width: 24px; color: var(--muted); }
.pdf-zoom-out { margin-left: auto; }
.pdf-window { position: relative; height: clamp(380px, 72vh, 900px); background: var(--frame); }
.pdf-viewport { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; }
.pdf-viewport .pdfViewer { padding: 16px 0; }
.pdf-message { position: absolute; inset: 0; display: grid; place-content: center; gap: 16px; padding: 24px; color: var(--muted); background: var(--surface); text-align: center; }
.pdf-message button { justify-self: center; }
@media (max-width: 560px) {
  .pdf-toolbar { gap: 0; padding: 4px 0; }
  .pdf-fit { display: none !important; }
  .pdf-pagination { gap: 0; font-size: 11px; }
  .pdf-page-number { width: 28px; }
  .pdf-window { height: 65vh; min-height: 360px; }
}
