.pdf-preview-action { display: block; margin: 10px 0; }
.pdf-preview-button { padding: 8px 14px; border: 1px solid #46513c; border-radius: 4px; background: #f3ecdf; color: #34422d; font: 14px/1.5 Arial, sans-serif; cursor: pointer; }
.pdf-preview-button:hover { background: #e8ddc9; }
.pdf-preview { width: min(1100px, calc(100% - 24px)); height: min(900px, calc(100dvh - 24px)); max-width: none; max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 1px solid #9b886b; border-radius: 8px; background: #f6f1e7; color: #302a23; font: 16px/1.5 Arial, sans-serif; overflow: hidden; }
.pdf-preview[open] { display: flex; flex-direction: column; }
.pdf-preview::backdrop { background: rgb(25 22 18 / 70%); }
.pdf-preview-heading { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid #c7baa4; }
.pdf-preview-heading h2 { flex: 1; margin: 0; font: bold 18px/1.4 Arial, sans-serif; }
.pdf-preview button, .pdf-preview select, .pdf-preview input { min-height: 40px; border: 1px solid #9b886b; border-radius: 4px; background: #fffcf5; color: #493925; padding: 6px 10px; font: inherit; }
.pdf-preview button { cursor: pointer; }
.pdf-preview button:disabled { opacity: .45; cursor: default; }
.pdf-preview :focus-visible, .pdf-preview-button:focus-visible { outline: 3px solid #71452d; outline-offset: 2px; }
.pdf-preview-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
.pdf-preview-toolbar label { display: inline-flex; align-items: center; gap: 6px; }
.pdf-preview-toolbar input { width: 76px; }
.pdf-preview-toolbar a { color: #46513c; text-decoration: underline; }
.pdf-preview-status { margin: 0; padding: 0 16px 8px; font-size: 14px; }
.pdf-preview-pages { flex: 1; min-height: 0; overflow: auto; padding: 16px; background: #d5cec2; overscroll-behavior: contain; }
.pdf-preview-pages canvas { display: block; margin: 0 auto; background: white; box-shadow: 0 2px 12px #302a2330; }
.pdf-preview-pages canvas[hidden] { display: none; }
@media (max-width: 640px) {
  .pdf-preview { width: calc(100% - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); }
  .pdf-preview-heading, .pdf-preview-toolbar { padding: 10px; }
  .pdf-preview-heading h2 { font-size: 16px; }
  .pdf-preview-toolbar { gap: 8px; font-size: 14px; }
}
.pdf-preview-page-buttons { display: flex; flex: 0 0 100%; gap: 10px; }
.pdf-preview-page-buttons button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pdf-preview-arrow { font-size: 16px; line-height: 1; }
