/* Reading is a single application surface beneath the existing site header.
   Native PDF toolbars and the React tutor sidebar share the same viewer. */
html:has(.notes-reading-page .notes-pdf-workspace) { overflow: hidden; scrollbar-gutter: auto; }
.notes-reading-page .site-main { width: 100%; min-height: 0; padding: 0 !important; background: #f3f4f6; }
.notes-reading-shell { position: relative; width: 100%; margin: 0; }
.notes-reading-shell.notes-pdf-workspace { height: calc(100dvh - var(--topbar-height, 58px)); min-height: 0; padding: 0; overflow: hidden; }
/* A reader is below, not underneath, the translucent shared header. The
   general overlay rule otherwise shifts it up and leaves a header-sized gap. */
body.notes-reading-page.site-header-overlay .site-main > .notes-pdf-workspace {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.notes-reading-page:has(.notes-pdf-workspace) { background: #f3f4f6; }
.notes-reading-page [data-support-launcher], .notes-reading-page [data-support-panel] { display: none !important; }
.note-reader-app-root, .note-pdf-viewer { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.note-pdf-viewer > div:first-child { width: 100%; height: 100%; }
.note-pdf-viewer embedpdf-container { display: block; width: 100%; height: 100%; }
.notes-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.note-pdf-noscript { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.note-citation-feedback { position: absolute; bottom: 12px; left: 12px; z-index: 20; max-width: calc(100% - 24px); margin: 0; padding: 6px 11px; border: 1px solid #00a98230; border-radius: 99px; background: #effbf7f5; color: #125d50; box-shadow: 0 2px 8px #0f25300a; font-size: 11px; line-height: 1.7; pointer-events: none; }
.notes-reading-body { max-width: 1100px; margin: 24px auto; padding: 20px 24px; color: #4e4135; line-height: 2; }
.note-reader-loading { position: absolute; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; overflow: hidden; background: #f8f5ee; color: #684b34; }
.note-reader-loading[hidden] { display: none; }
.note-reader-loading[data-state="ready"] { opacity: 0; pointer-events: none; transition: opacity 180ms ease-out; }
.note-reader-loading[data-state="error"] canvas { display: none; }
.note-reader-loading[data-animation="ready"] .note-reader-spinner,
.note-reader-loading[data-animation="finished"] .note-reader-spinner,
.note-reader-loading[data-state="error"] .note-reader-spinner { display: none; }
.note-reader-loading canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.note-reader-loading-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 12px; background: #fffdf9e6; text-align: center; }
.note-reader-loading p { margin: 0; font-size: 13px; }
.note-reader-loading-content > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.note-reader-loading-content > div[hidden] { display: none; }
.note-reader-loading button, .note-reader-loading a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid #d5c4af; border-radius: 8px; background: #fff; color: #684b34; font: inherit; font-size: 12px; text-decoration: none; cursor: pointer; }
.note-reader-spinner { display: block; width: 22px; height: 22px; border: 2px solid #d5c4af; border-top-color: #806047; border-radius: 50%; animation: note-reader-spin .8s linear infinite; }
@keyframes note-reader-spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .notes-reading-shell.notes-pdf-workspace { height: calc(100dvh - var(--topbar-height, 54px)); } }
@media (prefers-reduced-motion: reduce) { .note-reader-spinner { animation: none; } .note-reader-loading[data-state="ready"] { transition: none; } }
