.reader-frame { width: min(calc(100% - 2rem), 67rem); margin-inline: auto; }
.reader-header { background: #fff; border-bottom: 1px solid var(--line); }
.reader-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 3.7rem; }
.reader-nav a { display: inline-flex; align-items: center; gap: .42rem; min-height: 2.75rem; color: var(--blue); font-weight: 800; }
.reader-nav a span { font: 1.5rem/1 system-ui, sans-serif; }
.reader-brand { display: inline-flex; align-items: center; gap: .4rem; font-size: .875rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.reader-brand .university-logo { height: clamp(2rem, 4vw, 2.3rem); }
.reader-heading { padding: 1.5rem 0 1.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem 1.25rem; }
.reader-heading > div { flex: 1 1 18rem; }
.reader-caption { color: var(--muted); font-size: .875rem; font-weight: 650; margin-bottom: .3rem; }
.reader-heading h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); letter-spacing: -.055em; line-height: 1.33; overflow-wrap: anywhere; }
.reader-download, .reader-controls button { border: 1px solid var(--line); border-radius: .5rem; min-height: 2.75rem; background: #fff; font-weight: 700; font-size: .9rem; }
.reader-download { display: inline-flex; align-items: center; padding: .4rem .85rem; color: var(--blue); }
.reader-toolbar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .65rem; padding: .45rem .55rem; border: 1px solid var(--line); background: #f8faff; border-radius: .65rem .65rem 0 0; }
.reader-controls { display: flex; align-items: center; gap: .23rem; }
.reader-controls button { min-width: 2.75rem; padding: .25rem .5rem; color: var(--blue); }
.reader-controls button:disabled { color: #67748b; background: #f1f3f7; cursor: default; }
#zoom-in, #zoom-out { font-size: 1.25rem; line-height: 1; }
#scale, #page-counter { padding-inline: .24rem; font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
#scale { min-width: 3rem; text-align: center; }
#reader-status:not([hidden]) { margin: 1rem 0; color: var(--muted); }
.reader-page { margin-bottom: 2rem; border: 1px solid var(--line); background: #e6eaf2; overflow-x: auto; overscroll-behavior-x: contain; scroll-margin-top: 7rem; }
#page-surface { width: 100%; }
#page-surface canvas, #page-surface img { display: block; margin: 0 auto; height: auto; max-width: none; background: white; }
@media (max-width: 36rem) {
  .reader-frame { width: calc(100% - 1rem); }
  .reader-nav, .reader-heading { padding-inline: .4rem; }
  .reader-heading { padding-block: .85rem; }
  .reader-toolbar { padding-inline: .3rem; }
}
@media print {
  .reader-header, .reader-heading, .reader-toolbar, #reader-status { display: none; }
  .reader-frame, #page-surface { width: 100%; }
  .reader-page { overflow: visible; border: 0; }
  #page-surface canvas, #page-surface img { width: 100% !important; height: auto !important; }
}
