/* Load after reader.css. Opt in with body.book-page; all scrolling lives in the book. */
html.book-document { height:100%; overflow:hidden; overscroll-behavior:none; }
body.book-page { height:100vh; height:100dvh; min-height:0; overflow:hidden; display:flex; flex-direction:column; overscroll-behavior:none; background:radial-gradient(ellipse at 15% 35%,#784e3b30,transparent 48%),radial-gradient(ellipse at 90% 70%,#194c4640,transparent 55%),#080e19; }
.book-page > header { flex:0 0 auto; }
.book-page .page-main { flex:1 1 0; min-height:0; width:min(1280px,calc(100% - 64px)); margin:0 auto; padding:14px 0 24px; display:flex; flex-direction:column; overflow:hidden; }
.book-page .page-main::before { display:none; }
.book-page .breadcrumb { flex:0 0 auto; margin:0 0 10px; font-size:12px; line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.book-page .reading-layout { flex:1 1 0; min-height:0; display:flex; gap:0; }
.book-page .reading-panel { display:flex; flex-direction:column; width:100%; min-height:0; padding:0; overflow:hidden; border:1px solid #b69b63; border-radius:7px 22px 22px 7px; background:linear-gradient(100deg,#1b2c39,#0c1b2c 10%,#102030 96%,#253342); box-shadow:-6px 0 0 #342d2a,-9px 0 0 #b69b6380,0 18px 60px #0007,inset 0 0 0 5px #e0c38a06; }
.book-page .reader-toolbar { flex:0 0 auto; min-width:0; margin:0; padding:10px 24px; gap:12px; flex-wrap:nowrap; border-bottom:1px solid #9b865749; background:linear-gradient(90deg,#263341,#152a39); box-shadow:0 3px 12px #0002; z-index:1; }
.book-page .reader-room { font-size:10px; letter-spacing:.13em; margin-right:auto; }
.book-page .text-size-controls { flex:none; width:auto; gap:3px; font-size:11px; }
.book-page .text-size-controls button { min-height:44px; min-width:44px; padding:4px 7px; }
.book-page .book-section-picker { min-width:0; width:210px; }
.book-page .book-section-picker select { min-height:44px; width:100%; max-width:100%; padding:8px 26px 8px 10px; border:1px solid #8e825f; border-radius:7px; background:#102737; color:#f0d9ac; font:inherit; font-size:12px; text-overflow:ellipsis; }
.book-page .book-section-picker select:focus-visible { outline:3px solid #efca83; outline-offset:2px; }
.book-page .book-leaves { flex:1 1 0; min-height:0; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; scrollbar-width:thin; scrollbar-color:#a68c58 #102231; scrollbar-gutter:stable; padding:clamp(24px,4vw,56px) clamp(24px,7vw,110px) 64px; scroll-padding:24px; background:linear-gradient(90deg,#b6a16c08,transparent 4%,transparent 98%,#b6a16c0c); }
.book-page .book-leaves:focus-visible { outline:2px solid #c7a971; outline-offset:-5px; }
.book-page .book-leaves > h1 { max-width:23ch; }
.book-page .book-leaves h2[id],.book-page .book-leaves h3[id] { scroll-margin-top:24px; }
.book-page .mobile-page-nav { display:none; }
.book-page .book-original-navigation { display:flex; position:static; max-height:none; overflow:visible; flex-wrap:wrap; gap:8px 20px; padding:22px 0; margin-top:32px; background:none; border:0; border-top:1px solid #9b865749; border-radius:0; }
.book-page .book-original-navigation .aside-planet { display:none; }
.book-page .book-original-navigation > p { width:100%; }
.book-page .book-original-navigation a { margin:0; min-height:44px; display:inline-flex; align-items:center; padding:6px 10px; }
.book-page .book-leaves .site-footer { background:none; padding:24px 0 0; margin-top:24px; }
.book-page .book-leaves .site-footer .shell { width:100%; }
.book-page .research-audio button,.book-page .dialog-close { min-height:44px; min-width:44px; }
@media(max-width:800px) {
 .book-page .page-main { width:calc(100% - 32px); padding:10px 0 16px; }
 .book-page .reader-toolbar { padding:8px 14px; gap:8px; flex-wrap:wrap; }
 .book-page .reader-room { display:none; }
 .book-page .book-section-picker { flex:1 1 130px; width:auto; }
 .book-page .text-size-controls > span { display:none; }
 .book-page .book-leaves { padding:28px 26px 40px; }
}
@media(max-width:420px) {
 .book-page .page-main { width:calc(100% - 20px); padding:7px 0 10px; }
 .book-page .breadcrumb { margin-bottom:5px; font-size:11px; }
 .book-page .reading-panel { border-radius:5px 14px 14px 5px; box-shadow:-3px 0 0 #5e513c,0 12px 30px #0004; }
 .book-page .reader-toolbar { padding:6px 8px; gap:4px; }
 .book-page .text-size-controls { gap:0; }
 .book-page .text-size-controls output { min-width:31px; font-size:10px; }
 .book-page .book-section-picker { flex-basis:94px; }
 .book-page .book-section-picker select { font-size:11px; padding-left:6px; padding-right:16px; }
 .book-page .book-leaves { padding:25px 18px 36px; }
 .book-page .book-leaves h1 { font-size:32px; }
}
@media(max-height:480px) {
 .book-page .page-main { padding-top:4px; padding-bottom:6px; }
 .book-page .breadcrumb { display:none; }
 .book-page .reader-toolbar { padding-top:3px; padding-bottom:3px; }
 .book-page .book-leaves { padding-top:20px; }
}
@media print {
 html.book-document,body.book-page { height:auto; overflow:visible; display:block; background:white; }
 .book-page .page-main,.book-page .reading-layout,.book-page .reading-panel,.book-page .book-leaves { display:block; height:auto; max-height:none; min-height:0; overflow:visible; width:100%; padding:0; margin:0; background:white; box-shadow:none; border:0; }
 .book-page .reader-toolbar,.book-page .book-original-navigation,.book-page .site-footer { display:none; }
}
/* Override the old article grid's align-items:start. */
.book-page .reading-layout{align-items:stretch}.book-page .reading-panel{height:100%;flex:1 1 auto}
