.pdf-overlay {
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: none;
  padding: 0;
  border: 1px solid #d6d5c8;
  border-radius: 8px;
  color: #202a22;
  background: #ebe8dc;
  box-shadow: 0 20px 80px #0006;
  font-family: "Archivo", sans-serif;
}
.pdf-overlay::backdrop { background: #15241dcc; }
.pdf-overlay[open] { display: flex; flex-direction: column; }
.pdf-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #faf7f1;
  border-bottom: 1px solid #d6d5c8;
}
.pdf-overlay-title { margin: 0; font: 500 22px "Newsreader", Georgia, serif; }
.pdf-overlay-close {
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #3f5641;
  border-radius: 4px;
  background: #3f5641;
  color: white;
  cursor: pointer;
  font: 600 12px "Archivo", sans-serif;
}
.pdf-overlay-close:focus-visible { outline: 3px solid #986c35; outline-offset: 3px; }
.pdf-overlay-body { flex: 1; min-height: 0; overflow: auto; padding: 18px; }
.pdf-overlay-status { margin: 0 0 18px; font-size: 13px; text-align: center; }
.pdf-overlay-pages { width: min(100%, 850px); margin: 0 auto; }
.pdf-overlay-page { margin: 0 0 18px; background: white; box-shadow: 0 2px 8px #0002; }
.pdf-overlay-page canvas { display: block; width: 100%; height: auto; }
.pdf-overlay-text {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
@media (max-width: 600px) {
  .pdf-overlay { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .pdf-overlay-header { padding: 10px 12px; }
  .pdf-overlay-title { font-size: 19px; }
  .pdf-overlay-body { padding: 10px; }
}
