/* Documents keep their actual page geometry, on the Desk and in Library. */
.dv-document-card { position: relative; padding: 9px 9px 0; background: #faf6ed; color: #302b25;
  border: 1px solid #d6cbbc; box-shadow: 0 4px 12px #0003, 3px 4px 0 -1px #eee8dd, 6px 7px 0 -2px #d9d0c2; }
.dv-document-page { position: relative; overflow: hidden; aspect-ratio: var(--document-ratio, .7727);
  background: #fff; border: 1px solid #e6e0d7; }
.dv-document-page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.dv-document-page img:not([src]) { display: none; }
.dv-document-page.pv-exhausted img { display: none; }
.dv-document-excerpt { padding: 24px 22px; font: 10px/1.6 Georgia, serif; white-space: pre-wrap; color: #4b443b; }
.dv-document-excerpt strong { display: block; margin-bottom: 15px; font-size: 19px; line-height: 1.22; }
.dv-document-caption { padding: 12px 8px 14px; }
.dv-document-title { font: 600 19px/1.23 var(--serif, Georgia, serif); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.dv-document-meta { margin-top: 5px; font: 12px/1.35 var(--serif, Georgia, serif); color: #6d6255; }
.lib-row2.is-document .lib-thumb { width: 54px; height: 72px; justify-self: center; flex: 0 0 auto;
  background: #fff; border: 1px solid #d1c7b9; border-radius: 0; box-shadow: 2px 2px 0 #d8cebf; }
.lib-row2.is-document .lib-thumb img { width: 100%; height: 100%; object-fit: contain; }
.lib-row2.is-document .lib-thumb::after { display: none; }
.lib-row2.is-document .lib-row-title2 { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.lib-row2.is-document .lib-row-meta2 { white-space: normal; }
.document-viewer { width: 100%; height: 100%; min-height: 300px; display: flex; flex-direction: column;
  background: #ddd7cc; color: var(--ink, #302b25); font-family: var(--serif, Georgia, serif); }
.document-tools { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; padding: 8px 16px;
  border-bottom: 1px solid var(--border, #c8bca9); background: var(--paper, #f6efdf); }
.document-tools > span { margin-right: auto; font-size: 16px; }
.document-tools button, .document-unavailable button, .document-unavailable a { font: 16px/1.3 var(--serif, Georgia, serif);
  padding: 7px 12px; border: 1px solid var(--border, #b7aa96); border-radius: 5px; color: inherit;
  background: transparent; cursor: pointer; text-decoration: none; }
.document-tools button:disabled { opacity: .5; cursor: default; }
.document-tools button:focus-visible, .document-pages:focus-visible { outline: 2px solid var(--ink-faint, #7b6c55); outline-offset: -3px; }
.document-pages { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain;
  padding: 16px; box-sizing: border-box; scroll-behavior: auto; }
.document-page { position: relative; margin: 0 auto 16px; background: #fff; color: #302b25;
  box-shadow: 0 2px 8px #0002; flex-shrink: 0; overflow: hidden; }
.document-page canvas { display: block; width: 100%; height: 100%; }
.document-accessible-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: pre-wrap; }
.document-unavailable { max-width: 520px; margin: 40px auto; padding: 24px; color: #302b25;
  background: #faf6ed; font-size: 19px; line-height: 1.5; }
.document-unavailable button, .document-unavailable a { display: inline-block; margin: 8px 12px 0 0; }
.reader-pdf-reader { width: 100%; max-width: none; }
.document-page-limit, .reader-pdf-copy-note { padding: 12px 16px; font: 16px/1.5 var(--serif, Georgia, serif); }
.reader-pdf-original { height: calc(100dvh - 180px); min-height: 380px; }
.reader-pdf-original[hidden] { display: none; }
.reader-pdf-reader .reader-pdf-reading[hidden] { display: none; }
.dv-mv-frame.is-document > .document-viewer { height: 100%; }
@media (max-width: 600px) {
  .document-tools { padding: 8px; gap: 5px; }
  .document-tools > span { font-size: 14px; }
  .document-tools button { min-height: 40px; padding: 6px 10px; }
  .document-pages { padding: 8px; }
}
