* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; }
body.pdf-reader { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: #edf2f4; color: #243b4a; font: 400 15px/1.4 Arial, sans-serif; }
.pdf-reader-header { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; padding: 12px 20px; color: white; background: linear-gradient(110deg,var(--reader-accent),var(--reader-secondary)); border-bottom: 2px solid var(--reader-download); }
.pdf-reader-header h1 { flex: 1; min-width: 0; margin: 0; font: 500 17px/1.4 Arial, sans-serif; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pdf-reader-badge { display: inline-block; margin-right: 10px; padding: 2px 7px; border-radius: 5px; background: #ffffff26; font-size: 12px; vertical-align: 2px; }
.pdf-reader-back, .pdf-reader-download { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; flex: 0 0 auto; padding: 9px 15px; border: 1px solid #ffffff70; border-radius: 9px; color: white; text-decoration: none; font-weight: 600; }
.pdf-reader-download { background: var(--reader-download); color: #151515; border-color: var(--reader-download); }
.pdf-reader-back:hover { background: #ffffff1a; }
.pdf-reader-download:hover { filter: brightness(.97); }
.pdf-reader-header a:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.pdf-reader-main { position: relative; flex: 1; min-height: 0; }
.pdf-reader-main iframe { display: block; width: 100%; height: 100%; border: 0; }
.pdf-reader-fallback { position: absolute; inset: 0; display: grid; place-content: center; gap: 16px; padding: 24px; background: #eef6fa; }
.pdf-reader-fallback a { color: var(--reader-accent); }
@media (max-width: 700px) {
  .pdf-reader-header { display: grid; grid-template-columns: 1fr auto; gap: 9px 12px; padding: 10px 12px; }
  .pdf-reader-header h1 { grid-column: 1 / -1; grid-row: 2; font-size: 14px; }
  .pdf-reader-back { justify-self: start; }
  .pdf-reader-back, .pdf-reader-download { min-height: 40px; padding: 8px 12px; font-size: 14px; }
  .pdf-reader-badge { font-size: 10px; margin-right: 7px; }
}
