.program-reader { background: #e9e7df; }
.reader-header { padding: 24px clamp(20px, 4vw, 64px); background: var(--paper); display:flex; align-items:center; justify-content:space-between; gap:24px; border-bottom:1px solid var(--line); }
.reader-header img { width:260px; }
.reader-back, .reader-footer a { color:var(--blue); text-decoration:underline; text-underline-offset:5px; font-size:15px; }
.reader-intro { max-width:920px; margin:40px auto 22px; padding:0 22px; text-align:center; }
.reader-intro h1 { font:600 clamp(28px, 3.5vw, 44px)/1.15 var(--display); margin:10px 0 18px; }
.reader-intro p:last-child { max-width:700px; margin:0 auto; font-size:16px; color:var(--muted); }
.reader-actions { display:flex; justify-content:center; gap:12px; flex-wrap:wrap; padding:0 20px; }
.reader-file-size { font-size:12px; letter-spacing:0; white-space:nowrap; }
.reader-hint { text-align:center; font-size:14px; color:var(--muted); padding:0 20px; margin:18px auto; }
.reader-shell { max-width:1360px; margin:auto; padding:0 24px 24px; }
.reader-toolbar { display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap; }
.reader-toolbar[hidden], .page-text[hidden], .reader-error[hidden] { display:none; }
.reader-toolbar button, .zoom-header button { min-height:44px; padding:8px 20px; border:1px solid var(--bronze); border-radius:24px; background:var(--paper); color:var(--ink); font-size:15px; line-height:1.4; }
.reader-toolbar button:hover:not(:disabled), .zoom-header button:hover { background:var(--ink); color:white; }
.reader-toolbar button:disabled { opacity:.42; cursor:default; }
.page-picker { display:flex; align-items:center; gap:8px; font-size:14px; }
.page-picker select { font:inherit; min-height:44px; color:var(--ink); border:1px solid var(--bronze); border-radius:8px; padding:6px 10px; background:var(--paper); }
.reader-status { text-align:center; color:var(--muted); font-size:13px; min-height:24px; margin:10px 0; }
.book-stage { max-width:1200px; margin:0 auto; }
#book { margin:auto; }
#book:not(.stf__parent) { max-width:480px; }
.book-page { background:white; overflow:hidden; }
.book-page img { width:100%; height:100%; object-fit:contain; }
.book-ready .book-page::after { content:""; position:absolute; inset:0; pointer-events:none; box-shadow:inset 0 0 12px #00000010; }
.book-ready .book-page.--left::after { background:linear-gradient(to right, transparent 95%, #00000016); }
.book-ready .book-page.--right::after { background:linear-gradient(to left, transparent 95%, #00000016); }
.reader-error { padding:18px; margin:20px auto; background:white; max-width:750px; }
.reader-error a { text-decoration:underline; }
.page-text { max-width:900px; margin:28px auto 0; border-top:1px solid #bfc3bf; padding:14px 0; }
.page-text summary { cursor:pointer; color:var(--blue); padding:8px 0; }
.page-text section { padding:24px; background:var(--paper); margin-top:14px; }
.page-text h2 { font-size:22px; margin:0 0 18px; }
.page-text p { white-space:pre-line; overflow-wrap:anywhere; }
.page-dialog { max-width:calc(100vw - 24px); width:1150px; padding:20px; background:var(--paper); border:1px solid var(--bronze); border-radius:12px; }
.page-dialog::backdrop { background:#102432d9; }
.zoom-header { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.zoom-header h2 { font-size:22px; margin:0; }
.page-dialog p { font-size:14px; margin:12px 0; }
.zoom-scroll { max-height:72dvh; overflow:auto; background:#deddd6; }
.zoom-scroll img { width:1000px; max-width:none; height:auto; margin:0 auto 18px; }
.reader-footer { display:flex; justify-content:center; gap:32px; padding:28px 20px; flex-wrap:wrap; }
@media(max-width:600px) {
 .reader-header { padding:18px 20px; flex-direction:column; gap:12px; }
 .reader-header img { width:225px; }
 .reader-intro { margin-top:26px; }
 .reader-shell { padding:0 12px 20px; }
 .reader-toolbar { gap:8px; }
 .reader-toolbar button { padding:8px 13px; }
 .reader-toolbar [data-zoom] { flex-basis:100%; max-width:240px; }
 .page-text section { padding:16px; }
}
@media print {
 .program-reader .reader-shell, .reader-toolbar, .page-dialog, .reader-actions, .reader-footer { display:none !important; }
 .reader-hint::after { content:" Print the PDF linked at colloquium.humanitasinstitute.org/program/ for the complete program."; }
}

.reader-toolbar { position:sticky; top:0; z-index:3; padding:10px 0; background:#e9e7dff5; }
.book-stage { isolation:isolate; }

/* Let the turning sheet pass over the toolbar. At rest, the sticky controls
   stay above the book so they remain usable while scrolling. */
.book-stage.is-turning { position:relative; z-index:4; }

/* A rotated sheet must never widen Safari's layout viewport. Horizontal clip
   keeps vertical overflow available for the page-over-toolbar effect. */
html.program-document { overflow-x:clip; }
.book-stage { overflow-x:clip; overflow-y:visible; }
#book { touch-action:pan-y pinch-zoom; }
.page-picker select { font-size:16px; }
@supports not (overflow:clip) {
  html.program-document { overflow-x:hidden; }
}
