.pdf-viewer-dialog {
  width: min(1180px, calc(100vw - 28px));
  height: min(900px, calc(var(--gwc-visual-height, 100vh) - 28px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #f6f8fb;
  box-shadow: 0 24px 80px rgb(15 23 42 / 28%);
}
.pdf-viewer-dialog::backdrop { background: rgb(11 18 32 / 72%); backdrop-filter: blur(4px); }
.pdf-viewer-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.pdf-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid #d9e0e8; background: #fff; }
.pdf-viewer-toolbar small { display: block; margin-bottom: 2px; color: #50705f; font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.pdf-viewer-toolbar h2 { margin: 0; max-width: 560px; overflow: hidden; color: #17202c; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.pdf-viewer-actions { display: flex; align-items: center; gap: 8px; }
.pdf-viewer-actions a, .pdf-viewer-actions button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid #cbd5df; border-radius: 10px; font: inherit; font-size: .82rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.pdf-viewer-secondary, .pdf-viewer-close { color: #263240; background: #fff; }
.pdf-viewer-primary { border-color: #2f6b4e !important; color: #fff; background: #2f6b4e; }
.pdf-viewer-actions a:not([href]) { opacity: .45; pointer-events: none; }
.pdf-viewer-stage { min-height: 0; padding: 12px; background: #dce2e8; }
.pdf-viewer-stage iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; border-radius: 8px; background: #fff; }
.pdf-viewer-status, .pdf-viewer-error { display: grid; min-height: 100%; place-content: center; margin: 0; padding: 28px; color: #465364; text-align: center; }
.pdf-viewer-error strong { color: #9f2d27; font-size: 1.05rem; }
.pdf-viewer-error a { color: #245c43; font-weight: 750; }
@media (max-width: 720px) {
  .pdf-viewer-dialog { width: 100vw; height: var(--gwc-visual-height, 100dvh); border-radius: 0; }
  .pdf-viewer-toolbar { align-items: flex-start; padding: max(10px, env(safe-area-inset-top)) 10px 10px; }
  .pdf-viewer-toolbar h2 { max-width: 34vw; }
  .pdf-viewer-actions { flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
  .pdf-viewer-actions a, .pdf-viewer-actions button { min-height: 44px; padding: 0 9px; font-size: .78rem; }
  .pdf-viewer-stage { padding: 0 0 env(safe-area-inset-bottom); }
  .pdf-viewer-stage iframe { min-height: 100%; border-radius: 0; }
}
