:root{--sans:'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;--serif:'Newsreader',Iowan Old Style,Georgia,serif;--ink:#292e29;--muted:#93958f;--line:#e9e9e3;--accent:#a1774c;--side:#fbfbf8;--stage:#f5f5f1;--page:#fffefa;--page-ink:#333832;--soft-shadow:0 16px 48px rgba(45,48,40,.05);--reader-font:var(--serif);--reader-size:19px;--reader-leading:1.75;--reader-max:740px}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:var(--sans);color:var(--ink)}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #b6a68c;outline-offset:3px}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex:none}.icon-defs{position:absolute;width:0;height:0;overflow:hidden}button{border:0;background:transparent;color:inherit}body{background:var(--stage)}[hidden]{display:none!important}
.app-shell{display:grid;grid-template-columns:254px minmax(0,1fr) 288px;min-height:100vh}.sidebar{background:var(--side);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:35px 19px 21px;position:relative;z-index:11;min-height:100vh}.brand-row{display:flex;align-items:center;justify-content:space-between;padding:0 10px}.brand{display:flex;gap:12px;align-items:center;padding:0;font-family:var(--serif);font-size:34px;font-weight:500;letter-spacing:-1.8px;line-height:1;color:#27372e}.brand-period{color:#b18a62}.brand-symbol{width:25px;height:27px;display:flex;align-items:stretch;gap:3px;transform:rotate(-9deg);margin-top:-4px}.brand-symbol span{display:block;background:#3c5246;border-radius:1px 4px 1px 2px;width:6px}.brand-symbol span:first-child{height:20px;margin-top:6px}.brand-symbol span:nth-child(2){height:24px;margin-top:2px;background:#8eaa98}.brand-symbol span:nth-child(3){height:17px;margin-top:9px;background:#b88b62}.sidebar-intro{font-family:var(--serif);font-style:italic;color:#9b9f96;font-size:16px;margin:14px 10px 55px}.nav-label,.shelf-heading,.section-label,.inspector-header,.overline{font-family:var(--sans);font-size:10px;font-weight:700;letter-spacing:1.5px;color:#a0a39b}.nav-label{padding:0 18px 12px}.primary-nav{display:flex;flex-direction:column;gap:4px}.nav-item{display:flex;align-items:center;gap:15px;text-align:left;border-radius:9px;padding:13px 16px;color:#737971;font-size:12px;font-weight:600;transition:background .15s,color .15s}.nav-item svg{width:18px;height:18px;stroke-width:1.7}.nav-item:hover{background:#f3f4ef}.nav-item.active{background:#eaf0e9;color:#354b3e}.nav-item .nav-mark{margin-left:auto;width:5px;height:5px;border-radius:100%;background:#65806b}.nav-count{margin-left:auto;color:#a5aaa2;font-size:10px}.shelf-heading{display:flex;align-items:center;justify-content:space-between;margin:45px 15px 14px}.tiny-icon-button{width:23px;height:23px;display:grid;place-items:center;border-radius:50%;color:#777f73}.tiny-icon-button:hover{background:#eaf0e9}.tiny-icon-button svg{width:16px;height:16px}.shelf-list{display:flex;flex-direction:column;gap:6px;max-height:280px;overflow:auto}.shelf-book{display:flex;align-items:center;gap:12px;text-align:left;padding:9px 10px;border-radius:8px;width:100%;min-width:0}.shelf-book:hover,.shelf-book.active{background:#f0f2ec}.shelf-cover{width:37px;height:52px;flex:none;border-radius:2px;box-shadow:2px 3px 7px #00000017}.shelf-book-text{display:flex;flex-direction:column;min-width:0;gap:4px}.shelf-book-text strong{font-family:var(--serif);font-size:16px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.shelf-book-text small{font-size:10px;color:#989b94;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-bottom{margin-top:auto;padding-top:30px}.import-tile{width:100%;display:flex;align-items:center;gap:12px;text-align:left;background:#edf1e9;border:1px solid #e1e7df;border-radius:10px;padding:14px 12px;color:#506b55;transition:transform .2s,background .2s}.import-tile:hover{transform:translateY(-2px);background:#e4ece1}.import-tile-icon{width:34px;height:34px;border:1px solid #bdccbc;border-radius:7px;display:grid;place-items:center}.import-tile-icon svg{width:18px;height:18px}.import-tile strong,.import-tile small{display:block}.import-tile strong{font-size:11px;font-weight:700}.import-tile small{font-size:10px;margin-top:3px;color:#91a08f}.sidebar-footer{font-size:9px;letter-spacing:.2px;color:#b0b2ab;text-align:center;margin-top:31px}.sidebar-footer span{color:#b99871;margin-left:4px}
.main-area{min-width:0;background:var(--stage);display:flex;flex-direction:column;min-height:100vh}.topbar{height:82px;flex:none;border-bottom:1px solid #e8e9e3;display:flex;align-items:center;justify-content:space-between;padding:0 43px;background:var(--stage);gap:12px}.topbar-start,.topbar-actions{display:flex;align-items:center;min-width:0}.topbar-start{gap:15px;overflow:hidden;white-space:nowrap}.breadcrumb-root{font-size:10px;font-weight:700;letter-spacing:1.2px;color:#9ba097}.breadcrumb-divider{font-size:13px;color:#c2c5bc}.breadcrumb-current{font-family:var(--serif);font-size:17px;color:#555d51;overflow:hidden;text-overflow:ellipsis}.topbar-actions{gap:12px}.icon-button{width:34px;height:34px;display:grid;place-items:center;border-radius:7px;color:#7d8379;flex:none}.icon-button:hover{background:#e9ece6;color:#3f5344}.icon-button svg{width:19px;height:19px}.save-note{font-size:10px;color:#a1a59e;white-space:nowrap}.save-dot{width:6px;height:6px;border-radius:50%;background:#92ac8b;display:inline-block;margin-right:6px;vertical-align:middle}.topbar-separator{height:19px;width:1px;background:#e2e5de;margin:0 5px}.settings-mobile,.mobile-menu,.sidebar-close,.inspector-close{display:none}
.reader-view{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;padding:27px 37px 19px}.reader-overline{display:flex;gap:23px;align-items:center;justify-content:center;height:39px;flex:none;color:#a8a9a0;font-size:9px;letter-spacing:2px;font-weight:700}.line-decoration{width:38px;height:1px;background:#dfe2db}.book-page{width:100%;max-width:var(--reader-max);height:min(660px,calc(100vh - 255px));min-height:420px;background:var(--page);box-shadow:var(--soft-shadow);position:relative;transition:background .25s,max-width .25s,box-shadow .25s;overflow:hidden}.sample-scroll{height:100%;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#dddcd4 transparent;overscroll-behavior:contain}.sample-article{max-width:575px;margin:auto;padding:66px 45px 75px;color:var(--page-ink);font-family:var(--reader-font);font-size:var(--reader-size);line-height:var(--reader-leading);font-weight:400}.sample-article .chapter-kicker{text-align:center;font-family:var(--sans);font-size:10px;color:#ac9071;letter-spacing:2px;font-weight:700;margin:0 0 27px}.sample-article h1{font-family:var(--serif);font-size:clamp(39px,4.2vw,57px);line-height:1.09;text-align:center;font-weight:400;letter-spacing:-1.3px;margin:0 0 13px;color:var(--page-ink)}.sample-article .chapter-subtitle{color:#a7a9a1;text-align:center;font-size:16px;line-height:1.4;font-style:italic;margin:0 0 48px}.sample-article .ornament{margin:0 auto 45px;width:54px;text-align:center;font-size:18px;line-height:1;color:#ad9474}.sample-article p{margin:0 0 1.05em}.sample-article p.first-paragraph:first-letter{float:left;font-size:3.6em;line-height:.84;padding:8px 9px 0 0;color:#a4815f;font-weight:400}.sample-article blockquote{margin:34px 10px 40px;padding-left:25px;border-left:1px solid #cbbba6;font-style:italic;font-size:1.13em;line-height:1.55;color:#657568}.sample-article .chapter-end{text-align:center;color:#ae9475;padding:35px 0 0}.epub-viewer{width:100%;height:100%;padding:24px 34px}.epub-viewer iframe{border:0!important}.loading-state{position:absolute;inset:0;background:var(--page);display:flex;gap:16px;align-items:center;justify-content:center;flex-direction:column;font-family:var(--serif);font-size:21px;color:#929b8e;z-index:4}.loading-spinner{width:31px;height:31px;border:2px solid #dee3d9;border-top-color:#687e6b;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.reader-footer{width:100%;max-width:var(--reader-max);margin-top:19px}.progress-caption{display:flex;justify-content:space-between;font-size:10px;color:#989e95;margin:0 1px 11px}.progress-track{height:3px;border-radius:3px;background:#e2e5de;overflow:hidden}.progress-fill{width:0;height:100%;background:#748e77;transition:width .3s}.page-controls{display:flex;align-items:center;justify-content:space-between;margin-top:10px}.page-arrow{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;border:1px solid #dee3d9;color:#607063;transition:background .2s,transform .2s}.page-arrow:hover{background:#e5ebe2;transform:scale(1.04)}.page-arrow:disabled{opacity:.3;cursor:default;transform:none}.page-arrow svg{width:19px;height:19px}.page-center{display:flex;align-items:center;gap:18px;color:#a3a79f;font-size:9px;letter-spacing:2px;font-weight:700}.page-ornament{font-size:12px;color:#b3b6ae}
.inspector{background:#fdfdfa;border-left:1px solid var(--line);padding:41px 29px 24px;min-height:100vh;display:flex;flex-direction:column;z-index:11}.inspector-header{display:flex;justify-content:space-between;align-items:center;color:#989f94}.inspector h2{font-family:var(--serif);font-size:32px;font-weight:400;line-height:1.07;letter-spacing:-.7px;margin:30px 0 11px;color:#36483a}.inspector h2 em{font-weight:300;color:#a88c6d}.inspector-subtitle{font-family:var(--serif);font-size:15px;font-style:italic;color:#a3a8a0;line-height:1.5;margin:0 0 31px}.control-section{border-top:1px solid #eceee8;padding:25px 0 27px}.section-label{color:#7e8980;margin-bottom:17px}.theme-options{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}.theme-option{display:flex;flex-direction:column;gap:9px;align-items:center;font-size:10px;color:#9fa49b;padding:0}.theme-preview{height:61px;width:100%;border-radius:5px;display:grid;place-items:center;font-family:Georgia,serif;font-size:23px;border:1px solid transparent;transition:border-color .15s,transform .15s}.theme-option:hover .theme-preview{transform:translateY(-2px)}.theme-option.selected{color:#506c57;font-weight:700}.theme-option.selected .theme-preview{outline:1.5px solid #7c9b80;outline-offset:3px}.paper-preview{background:#f9f8f2;color:#3d453e}.sepia-preview{background:#ebe1cd;color:#6e5a46}.night-preview{background:#303932;color:#e3e1d5}.font-switch{display:flex;background:#f2f3ee;border-radius:7px;padding:4px;gap:4px}.font-button{flex:1;height:35px;border-radius:5px;font-size:11px;color:#9ca399}.font-button:first-child{font-family:Georgia,serif;font-size:13px}.font-button.selected{background:#fff;color:#405a46;box-shadow:0 1px 4px #29332913}.font-example{font-family:var(--reader-font);font-size:17px;text-align:center;color:#798a7b;font-style:italic;padding-top:23px;line-height:1.3}.slider-section{padding-bottom:26px}.slider-heading{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#7e8980;font-weight:700;letter-spacing:1.3px}.slider-heading span{font-size:10px;letter-spacing:0;color:#a0a59c;font-weight:500}.secondary-slider{margin-top:29px}.slider-row{display:flex;align-items:center;gap:13px;margin-top:17px;color:#858b81}.slider-row input[type=range]{width:100%;flex:1;appearance:none;height:3px;background:#dfe5dc;border-radius:9px;outline:0;cursor:pointer}.slider-row input[type=range]::-webkit-slider-thumb{appearance:none;background:#6b8a71;width:13px;height:13px;border-radius:50%;box-shadow:0 0 0 3px #e5ede4}.slider-row input[type=range]::-moz-range-thumb{background:#6b8a71;width:13px;height:13px;border-radius:50%;border:3px solid #e5ede4}.type-small{font-family:var(--serif);font-size:15px}.type-large{font-family:var(--serif);font-size:24px}.spacing-icon{width:15px;height:15px}.spacing-icon.wider{width:22px;height:22px}.width-buttons{display:flex;gap:9px}.width-buttons button{flex:1;height:39px;display:grid;place-items:center;background:#f3f4ef;border:1px solid transparent;border-radius:5px}.width-buttons button.selected{background:#e7ede5;border-color:#a0b19e}.width-glyph{height:19px;border-top:2px solid #879b89;border-bottom:2px solid #879b89;position:relative}.width-glyph:after{content:'';position:absolute;left:0;right:0;top:7px;border-top:2px solid #879b89}.width-glyph.narrow{width:16px}.width-glyph.medium{width:25px}.width-glyph.wide{width:35px}.inspector-bottom{margin-top:auto;padding-top:20px}.reading-note{display:flex;gap:13px;background:#f3f5ee;border-radius:9px;padding:18px 15px}.note-symbol{color:#a78a61;font-size:22px}.reading-note p{font-family:var(--serif);font-size:15px;font-style:italic;line-height:1.35;margin:0;color:#607161}.reading-note small{display:block;font-family:var(--sans);font-style:normal;font-size:8px;color:#a9b0a4;letter-spacing:1.2px;margin-top:10px}.keyboard-note{font-size:9px;color:#acb0a8;margin:24px 0 0;text-align:center;letter-spacing:.8px}.keyboard-note span{display:inline-block;background:#edf0ea;border:1px solid #e3e6df;border-radius:3px;padding:2px 6px;margin-left:4px;color:#889488}
.library-view{padding:54px 64px 65px;max-width:1220px;width:100%;margin:0 auto;flex:1}.library-header .overline{color:#8f9d8e;display:flex;align-items:center;gap:10px}.gold-dash{width:24px;height:1px;background:#b99c77}.library-header h1{font-family:var(--serif);font-size:clamp(49px,5vw,72px);letter-spacing:-2px;line-height:1;margin:21px 0 13px;font-weight:400;color:#354a3b}.library-header h1 span,.toc-header h2 span{color:#b8956e}.library-header p{font-family:var(--serif);font-size:20px;line-height:1.4;font-style:italic;color:#9da59a;margin:0 0 34px}.library-tools{display:flex;align-items:center;gap:12px}.search-field{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #e7ebe3;border-radius:8px;padding:0 13px;height:44px;max-width:375px;flex:1;color:#a8afa5}.search-field svg{width:16px;height:16px}.search-field input{border:0;outline:0;background:transparent;width:100%;min-width:0;font-size:12px;color:#516154}.search-field input::placeholder{color:#abb2a9}.primary-button{height:44px;display:flex;align-items:center;gap:8px;padding:0 18px;border-radius:7px;color:#fff;background:#3d5946;font-size:11px;font-weight:700;white-space:nowrap;transition:background .2s}.primary-button:hover{background:#294633}.primary-button svg{width:15px;height:15px}.library-divider{display:flex;justify-content:space-between;border-bottom:1px solid #e0e5dd;padding:42px 0 15px;margin-bottom:28px;color:#8d9a8d;font-size:10px;font-weight:700;letter-spacing:1.5px}.library-divider span:last-child{font-weight:500;color:#a8afa7}.library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(154px,1fr));gap:27px 26px}.book-card{min-width:0;position:relative}.book-card-cover{width:100%;aspect-ratio:3/4.15;display:flex;align-items:stretch;text-align:left;border-radius:4px;padding:0;box-shadow:5px 9px 20px #283a2d18;transition:transform .24s,box-shadow .24s}.book-card-cover:hover{transform:translateY(-5px);box-shadow:6px 14px 24px #283a2d24}.book-card-title{font-family:var(--serif);font-size:19px;line-height:1.1;margin:15px 0 6px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.book-card-author{font-size:11px;color:#a3aaa0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.book-card-bottom{margin-top:11px;font-size:10px;color:#8b9989}.card-favorite{position:absolute;right:6px;bottom:45px;width:27px;height:27px;background:#fbfcf9;border-radius:50%;display:grid;place-items:center;color:#a1a69d;box-shadow:0 2px 9px #0001}.card-favorite svg{width:15px;height:15px}.card-favorite.on{color:#a47462}.card-favorite.on svg{fill:#a4746240}.card-empty{grid-column:1/-1;font-family:var(--serif);font-size:22px;color:#a3aaa0;padding:35px 0}.drop-card{display:flex;align-items:center;text-align:left;gap:18px;width:100%;border:1px dashed #d1dbce;border-radius:10px;background:#f1f4ee;margin-top:50px;padding:22px 25px;color:#536d57}.drop-card:hover{background:#eaf0e8}.drop-icon{width:45px;height:45px;border:1px solid #d5e0d1;border-radius:8px;display:grid;place-items:center}.drop-card strong,.drop-card small{display:block}.drop-card strong{font-family:var(--serif);font-weight:500;font-size:19px}.drop-card small{color:#a0aea0;font-size:11px;margin-top:5px}.drop-arrow{margin-left:auto;width:17px;height:17px}
.cover-art{width:100%;height:100%;display:flex;flex-direction:column;position:relative;overflow:hidden;padding:10% 10%;isolation:isolate;color:var(--cover-text,#f4e9d1);background:var(--cover-bg,#29493f);border-radius:inherit}.cover-art:before{content:'';position:absolute;inset:0 auto 0 0;width:6%;background:linear-gradient(90deg,#0002,transparent);z-index:3}.cover-art:after{content:'';position:absolute;width:98%;aspect-ratio:1;border:1px solid var(--cover-accent,#bac4a2);opacity:.45;border-radius:50%;top:24%;left:27%;transform:rotate(-18deg)}.cover-art .cover-kicker{font-size:clamp(5px,.7vw,9px);text-transform:uppercase;letter-spacing:2px;font-family:var(--sans);font-weight:600;opacity:.68;z-index:2}.cover-art .cover-title{font-family:var(--serif);font-size:clamp(20px,2.2vw,35px);line-height:.95;font-weight:400;letter-spacing:-.6px;margin-top:18%;z-index:2;overflow-wrap:anywhere}.cover-art .cover-rule{width:24%;border-top:1px solid currentColor;opacity:.6;margin-top:auto;margin-bottom:11%;z-index:2}.cover-art .cover-author{font-size:clamp(6px,.8vw,10px);font-family:var(--sans);text-transform:uppercase;letter-spacing:1.5px;opacity:.76;z-index:2}.cover-art.variant-1:after{border-radius:30% 70% 60% 40%;left:-22%;top:35%;width:130%;transform:rotate(45deg)}.cover-art.variant-2:after{border-radius:0;left:38%;top:34%;transform:rotate(30deg);width:87%}.cover-art.variant-3:after{border-radius:50%;left:0;top:54%;width:150%}.shelf-cover .cover-art{padding:5px}.shelf-cover .cover-kicker,.shelf-cover .cover-rule,.shelf-cover .cover-author{display:none}.shelf-cover .cover-title{font-size:8px;letter-spacing:0;line-height:1.05;margin-top:12px}.shelf-cover .cover-art:after{border-width:.5px}
.drawer-backdrop{position:fixed;inset:0;background:#1b2c20a1;z-index:19;opacity:0;transition:opacity .25s}.drawer-backdrop.show{opacity:1}.toc-drawer{position:fixed;right:0;top:0;bottom:0;width:min(415px,100vw);background:#fdfdfa;z-index:21;box-shadow:-12px 0 44px #18251b22;transform:translateX(102%);transition:transform .28s cubic-bezier(.2,.7,.2,1);display:flex;flex-direction:column;padding:37px 31px}.toc-drawer.open{transform:translateX(0)}.toc-header{display:flex;justify-content:space-between;align-items:flex-start}.toc-header h2{font-family:var(--serif);font-size:45px;font-weight:400;letter-spacing:-1.5px;color:#3d5240;margin:14px 0 10px}.toc-book-meta{font-family:var(--serif);font-style:italic;color:#9ca69b;font-size:16px;margin-bottom:26px}.toc-tabs{display:flex;gap:28px;border-bottom:1px solid #e6ebe2}.toc-tabs button{padding:14px 0;font-size:12px;font-weight:600;color:#a2aba1;border-bottom:2px solid transparent}.toc-tabs button.active{color:#516c53;border-color:#819a7b}.toc-list{overflow:auto;padding-top:16px;flex:1}.toc-item{display:flex;width:100%;align-items:flex-start;gap:13px;text-align:left;padding:17px 5px;border-bottom:1px solid #edf0e9}.toc-item:hover{color:#587860}.toc-item.selected{color:#4d7654}.toc-num{font-size:11px;color:#b4b9af;margin-top:4px;min-width:23px}.toc-title{font-family:var(--serif);font-size:19px;line-height:1.2}.toc-current{font-family:var(--sans);font-size:9px;letter-spacing:1px;color:#77a078;display:block;margin-top:6px}.toc-empty{font-family:var(--serif);font-size:19px;line-height:1.4;color:#a4ada3;text-align:center;padding:60px 20px}
.drop-overlay{position:fixed;inset:0;z-index:40;background:#2e473ddd;display:grid;place-items:center;color:#fff;pointer-events:none}.drop-overlay-inner{text-align:center;border:2px dashed #fff8;border-radius:18px;padding:80px;max-width:90%}.drop-overlay svg{width:43px;height:43px}.drop-overlay h2{font-family:var(--serif);font-size:40px;font-weight:400;margin:20px 0 9px}.drop-overlay p{color:#ccd9cf}.toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,25px);background:#344c3d;color:#fff;padding:12px 19px;font-size:12px;border-radius:7px;box-shadow:0 8px 25px #0002;z-index:50;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;max-width:calc(100vw - 40px);text-align:center}.toast.visible{opacity:1;transform:translate(-50%,0)}
body[data-theme=sepia]{--stage:#eee6d6;--page:#f6eddb;--page-ink:#554937;--line:#e6e0d3;--side:#f7f2e7}body[data-theme=sepia] .topbar{background:#eee6d6;border-color:#e4dccd}body[data-theme=sepia] .inspector{background:#faf7ee}body[data-theme=sepia] .book-page{box-shadow:0 16px 48px #6b58301c}body[data-theme=night]{--stage:#252b27;--page:#303831;--page-ink:#e1e3d8;--line:#364039;--side:#282f2a;--ink:#d9dfd4;--muted:#97a294}body[data-theme=night] .topbar{background:#252b27;border-color:#394139}body[data-theme=night] .inspector{background:#2b332d;color:#e0e4da}body[data-theme=night] .inspector h2,body[data-theme=night] .brand,body[data-theme=night] .breadcrumb-current{color:#e1e8da}body[data-theme=night] .nav-item.active{background:#3a493c;color:#d5e3d2}body[data-theme=night] .nav-item:hover,body[data-theme=night] .shelf-book.active,body[data-theme=night] .shelf-book:hover,body[data-theme=night] .icon-button:hover{background:#39453b}body[data-theme=night] .import-tile,body[data-theme=night] .reading-note,body[data-theme=night] .drop-card{background:#39463b;border-color:#465747;color:#d3dfd1}body[data-theme=night] .font-switch,body[data-theme=night] .width-buttons button{background:#39433a}body[data-theme=night] .font-button.selected,body[data-theme=night] .width-buttons button.selected{background:#526552;color:#fff}body[data-theme=night] .control-section,body[data-theme=night] .library-divider{border-color:#3d473e}body[data-theme=night] .book-page{box-shadow:0 16px 50px #0002}body[data-theme=night] .page-arrow{border-color:#475449;color:#c1cdbe}body[data-theme=night] .progress-track{background:#435046}body[data-theme=night] .search-field{background:#354137;border-color:#485649}body[data-theme=night] .search-field input{color:#e4ecdf}body[data-theme=night] .toc-drawer{background:#2a342d;color:#e3e6dc}body[data-theme=night] .toc-tabs,body[data-theme=night] .toc-item{border-color:#3d493f}body[data-theme=night] .toc-header h2,body[data-theme=night] .library-header h1{color:#e6ebdf}
@media(max-width:1230px){.app-shell{grid-template-columns:224px minmax(0,1fr) 260px}.sidebar{padding-left:13px;padding-right:13px}.inspector{padding-left:22px;padding-right:22px}.topbar{padding:0 25px}.reader-view{padding-left:22px;padding-right:22px}.sample-article{padding-left:45px;padding-right:45px}}
@media(max-width:1040px){.app-shell{grid-template-columns:224px minmax(0,1fr)}.inspector{position:fixed;right:0;top:0;bottom:0;width:300px;min-height:0;overflow:auto;transform:translateX(105%);transition:transform .28s;box-shadow:-14px 0 35px #0001}.inspector.open{transform:translateX(0)}.settings-mobile,.inspector-close{display:grid}.reader-view{padding-top:26px}.book-page{height:min(680px,calc(100vh - 255px))}.library-view{padding-left:48px;padding-right:48px}}
@media(max-width:700px){.app-shell{display:block}.sidebar{position:fixed;left:0;top:0;bottom:0;width:min(290px,87vw);transform:translateX(-103%);transition:transform .25s;box-shadow:15px 0 35px #0001;overflow:auto}.sidebar.open{transform:translateX(0)}.sidebar-close,.mobile-menu{display:grid}.main-area{min-height:100dvh}.topbar{height:65px;padding:0 16px}.topbar-start{gap:9px}.breadcrumb-root{display:none}.breadcrumb-divider{display:none}.breadcrumb-current{font-size:16px}.topbar-actions{gap:3px}.save-note,.topbar-separator{display:none}.reader-view{padding:17px 12px 12px;min-height:calc(100dvh - 65px)}.reader-overline{height:28px;font-size:8px}.line-decoration{width:27px}.book-page{height:calc(100dvh - 235px);min-height:350px}.sample-article{padding:42px 27px 50px;font-size:var(--reader-size)}.sample-article h1{font-size:42px}.sample-article .chapter-subtitle{margin-bottom:32px}.sample-article .ornament{margin-bottom:34px}.epub-viewer{padding:15px 8px}.reader-footer{margin-top:15px}.page-controls{margin-top:9px}.library-view{padding:38px 23px 50px}.library-header h1{font-size:55px}.library-header p{font-size:18px}.library-tools{align-items:stretch}.primary-button{padding:0 12px;font-size:0;gap:0}.primary-button svg{width:19px;height:19px}.library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px 19px}.cover-art .cover-title{font-size:clamp(20px,6vw,29px)}.cover-art .cover-author{font-size:8px}.drop-card{padding:17px;gap:11px}.drop-card strong{font-size:16px}.drop-card small{line-height:1.35}.drop-arrow{display:none}.inspector{width:min(340px,93vw)}.drawer-backdrop{z-index:10}.toc-drawer{z-index:20}}
@media(max-height:700px) and (min-width:701px){.sidebar{padding-top:24px}.sidebar-intro{margin-bottom:30px}.shelf-heading{margin-top:27px}.inspector{padding-top:24px}.inspector h2{margin-top:16px}.inspector-subtitle{margin-bottom:14px}.control-section{padding-top:17px;padding-bottom:17px}.reader-view{padding-top:10px}.reader-overline{height:28px}.book-page{height:calc(100vh - 210px);min-height:300px}.reader-footer{margin-top:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Immersive reading layout: the book owns the viewport, controls live in drawers. */
.app-shell{grid-template-columns:244px minmax(0,1fr)}
.app-shell.reading-focused{grid-template-columns:minmax(0,1fr)}
.inspector{position:fixed;right:0;top:0;bottom:0;width:320px;max-height:100dvh;min-height:0;overflow-y:auto;transform:translateX(105%);transition:transform .28s cubic-bezier(.2,.7,.2,1);box-shadow:-16px 0 42px #192b201c;z-index:14}
.inspector.open{transform:translateX(0)}
.inspector-close,.settings-mobile{display:grid}
.reading-focused .sidebar{position:fixed;left:0;top:0;bottom:0;width:280px;max-height:100dvh;min-height:0;overflow-y:auto;transform:translateX(-105%);transition:transform .28s cubic-bezier(.2,.7,.2,1);box-shadow:16px 0 42px #192b201c;z-index:14}
.reading-focused .sidebar.open{transform:translateX(0)}
.reading-focused .sidebar-close,.reading-focused .mobile-menu{display:grid}
.reading-focused .topbar{height:62px;padding:0 clamp(18px,3vw,50px)}
.reading-focused .topbar-start{gap:12px}
.reading-focused .topbar-actions{gap:9px}
.reader-view{padding:14px clamp(14px,3vw,50px) 10px}
.reader-overline{height:28px}
.book-page{height:calc(100dvh - 190px);min-height:360px;box-shadow:0 5px 36px rgba(45,48,40,.045)}
.sample-article{max-width:760px;padding:50px clamp(30px,5vw,78px) 85px}
.sample-article h1{font-size:clamp(44px,4.7vw,69px)}
.sample-article .chapter-subtitle{margin-bottom:34px}
.sample-article .ornament{margin-bottom:36px}
.epub-viewer{padding:22px clamp(24px,11vw,160px)}
.reader-footer{margin-top:11px}
.progress-caption{margin-bottom:8px}
.page-controls{margin-top:7px}
@media(min-width:701px){.app-shell:not(.reading-focused) .mobile-menu{display:none}}
@media(max-width:1040px){.app-shell{grid-template-columns:224px minmax(0,1fr)}.app-shell.reading-focused{grid-template-columns:minmax(0,1fr)}.reader-view{padding-left:20px;padding-right:20px}.epub-viewer{padding:20px clamp(15px,8vw,95px)}}
@media(max-width:700px){.app-shell,.app-shell.reading-focused{display:block}.reading-focused .topbar{height:58px;padding:0 13px}.reader-view{padding:9px 8px 8px}.reader-overline{height:25px}.book-page{height:calc(100dvh - 175px);min-height:320px}.sample-article{padding:32px 26px 48px}.sample-article h1{font-size:clamp(39px,9vw,50px)}.sample-article .chapter-subtitle{margin-bottom:27px}.sample-article .ornament{margin-bottom:29px}.epub-viewer{padding:12px 9px}.reader-footer{margin-top:10px}.progress-caption{margin-bottom:7px}.page-controls{margin-top:7px}.inspector{width:min(340px,93vw)}.reading-focused .sidebar{width:min(290px,87vw)}}
@media(max-height:600px){.book-page{min-height:240px}.sample-article{padding-top:28px}.reading-focused .topbar{height:54px}.reader-overline{height:22px}}

/* True reading canvas: no inner scroll, paper card, or clipped chapter. */
body{overflow-x:hidden}
.reading-focused .main-area{background:var(--page)}
.reading-focused .topbar{height:56px;position:sticky;top:0;z-index:9;background:var(--page);border-bottom:1px solid var(--line);padding:0 clamp(16px,3vw,50px)}
.reading-focused .save-note{opacity:.65}
.reading-focused .reader-view{display:block;min-height:0;padding:0 20px 120px;background:var(--page)}
.reading-focused .reader-overline{display:none}
.reading-focused .book-page{width:100%;max-width:none;height:auto;min-height:0;overflow:visible;background:transparent;box-shadow:none;border:0}
.reading-focused .sample-scroll{height:auto;overflow:visible;scrollbar-width:none}
.reading-focused .sample-article{max-width:var(--reader-text-max,900px);padding:50px clamp(22px,4vw,50px) 100px;margin:0 auto;font-size:var(--reader-size)}
.reading-focused .sample-article .chapter-kicker{font-size:10px;margin-bottom:20px}
.reading-focused .sample-article h1{font-size:clamp(43px,3.8vw,61px);line-height:1.08;margin-bottom:8px;letter-spacing:-1.3px}
.reading-focused .sample-article .chapter-subtitle{font-size:16px;margin-bottom:18px}
.reading-focused .sample-article .ornament{margin-bottom:25px}
.reading-focused .sample-article p{margin-bottom:.9em}
.reading-focused .sample-article blockquote{margin-top:27px;margin-bottom:31px}
.reading-focused .epub-viewer{width:min(100%,var(--reader-max));height:calc(100dvh - 82px);min-height:430px;margin:0 auto;padding:22px 35px}
.reading-focused.epub-reading .reader-view{padding-bottom:0}
.reading-focused.epub-reading .book-page{height:calc(100dvh - 140px);min-height:380px}
.reading-focused.epub-reading .epub-viewer{height:100%}
.reading-focused .reader-footer{position:fixed;left:50%;bottom:15px;transform:translateX(-50%);z-index:8;width:min(490px,calc(100vw - 26px));max-width:none;margin:0;padding:10px 15px 9px;background:rgba(255,254,250,.94);border:1px solid #e2e7df;border-radius:13px;box-shadow:0 6px 30px #2232261a;backdrop-filter:blur(18px)}
.reading-focused .progress-caption{font-size:9px;margin:0 2px 5px}
.reading-focused .progress-track{height:2px}
.reading-focused .page-controls{margin-top:4px}
.reading-focused .page-arrow{width:31px;height:31px;border-color:#e1e6de}
.reading-focused .page-arrow svg{width:17px;height:17px}
.reading-focused .page-center{font-size:8px;letter-spacing:1.7px;gap:12px}
body[data-theme=sepia] .reading-focused .reader-footer{background:rgba(246,237,219,.94);border-color:#ded2be}
body[data-theme=night] .reading-focused .reader-footer{background:rgba(48,56,49,.94);border-color:#4a594c}
@media(max-width:700px){.reading-focused .topbar{height:54px;padding:0 12px}.reading-focused .reader-view{padding:0 9px 110px}.reading-focused .sample-article{padding:36px 19px 90px}.reading-focused .sample-article h1{font-size:clamp(40px,9vw,51px)}.reading-focused .sample-article .chapter-kicker{font-size:9px;margin-bottom:17px}.reading-focused .sample-article .chapter-subtitle{margin-bottom:14px}.reading-focused .sample-article .ornament{margin-bottom:22px}.reading-focused .epub-viewer{height:calc(100dvh - 66px);min-height:340px;padding:13px 8px}.reading-focused.epub-reading .book-page{height:calc(100dvh - 130px);min-height:300px}.reading-focused.epub-reading .epub-viewer{height:100%}.reading-focused .reader-footer{bottom:9px;padding:8px 11px 7px;border-radius:12px}.reading-focused .page-center{gap:7px;letter-spacing:1px}.reading-focused .page-ornament{display:none}}

.topbar-import{height:33px;display:flex;align-items:center;gap:8px;padding:0 12px;border:1px solid #dae4d7;border-radius:7px;background:#edf3ea;color:#4f7057;font-size:10px;font-weight:700;white-space:nowrap;transition:background .15s}
.topbar-import:hover{background:#dfebdc}
.topbar-import svg{width:15px;height:15px}
[data-import]:disabled{opacity:.55;cursor:wait}
body[data-theme=sepia] .topbar-import{background:#ede4d3;border-color:#dccdb8;color:#7b654e}
body[data-theme=night] .topbar-import{background:#3a4b3d;border-color:#536b56;color:#d5e5d0}
@media(max-width:900px){.topbar-import{width:34px;padding:0;justify-content:center}.topbar-import span{display:none}}

.layout-section{padding-top:21px;padding-bottom:22px}
.layout-explainer{font-family:var(--serif);font-size:13px;font-style:italic;color:#a0aaa0;line-height:1.4;margin:12px 0 0}
.layout-section .font-button:first-child{font-family:var(--sans);font-size:11px}
.reading-focused.epub-reading .epub-viewer{max-width:var(--reader-text-max,900px)}

/* EPUB scrolling uses the same calm reading canvas as the sample book. */
.reading-focused.epub-reading.scroll-reading .epub-viewer{padding:16px clamp(12px,2vw,25px) 0}
.reading-focused.epub-reading.scroll-reading .epub-viewer .epub-container{overflow-y:auto!important;overscroll-behavior-y:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#cbd3c8 transparent;-webkit-overflow-scrolling:touch;touch-action:pan-y}
.reading-focused.epub-reading.scroll-reading .epub-viewer .epub-container::-webkit-scrollbar{width:6px}
.reading-focused.epub-reading.scroll-reading .epub-viewer .epub-container::-webkit-scrollbar-thumb{background:#cbd3c8;border-radius:10px}
@media(max-width:700px){.reading-focused.epub-reading.scroll-reading .epub-viewer{padding:8px 0 0}}

/* Thoughts: quiet marginalia, never a permanent reading obstruction. */
.selection-toolbar{position:fixed;z-index:30;display:flex;align-items:center;gap:4px;padding:5px;background:#fffef9;border:1px solid #e1e5d9;border-radius:12px;box-shadow:0 12px 38px #293b2c28;transform:translate(-50%,-100%);white-space:nowrap}
.selection-toolbar button{display:flex;align-items:center;gap:6px;border-radius:8px;padding:10px 12px;font-size:11px;font-weight:700;color:#617365}
.selection-toolbar button:hover{background:#edf2e9}
.selection-toolbar .selection-thought{background:#e6eee2;color:#3e634a}
.selection-toolbar .selection-dismiss{padding:10px 7px;color:#acb3a8}
.selection-toolbar svg{width:15px;height:15px}
.thought-drawer{position:fixed;z-index:24;top:0;right:0;bottom:0;width:min(444px,100vw);background:#fffefa;box-shadow:-20px 0 55px #1c302129;transform:translateX(105%);transition:transform .28s cubic-bezier(.2,.7,.2,1);padding:31px 32px 25px;display:flex;flex-direction:column;overflow-y:auto}
.thought-drawer.open{transform:translateX(0)}
.thought-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.thought-drawer h2{font-family:var(--serif);font-size:46px;line-height:1.05;font-weight:400;letter-spacing:-1.5px;color:#354c3d;margin:18px 0 5px}
.thought-drawer h2 span{color:#b8956e}
.thought-intro{margin:0 0 27px;font-family:var(--serif);font-style:italic;color:#9ca89d;font-size:16px}
.thought-quote{font-family:var(--serif);font-size:19px;line-height:1.45;font-style:italic;color:#65745f;padding:16px 18px;margin:0 0 28px;border-left:3px solid #c6b387;background:#f6f5ed;border-radius:0 8px 8px 0;max-height:180px;overflow:auto;overflow-wrap:anywhere}
.thought-label{margin-bottom:14px;color:#738777}
.thought-kinds{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:17px}
.thought-kinds button{font-size:10px;color:#849184;border:1px solid #e2e8df;border-radius:999px;padding:8px 11px;background:#f7f8f3}
.thought-kinds button.selected{background:#e4ece1;color:#3f6145;border-color:#acc3aa;font-weight:700}
.thought-input{width:100%;min-height:170px;flex:1;resize:vertical;border:1px solid #e5e9e0;border-radius:9px;background:#fdfdf9;padding:19px;font-family:var(--serif);font-size:20px;line-height:1.5;color:#344738;outline:0}
.thought-input:focus{border-color:#93ae94;box-shadow:0 0 0 3px #dfece01c}
.thought-input::placeholder{color:#aeb7aa;font-style:italic}
.thought-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:20px}
.thought-delete{font-size:11px;color:#ad8479;padding:10px 0;text-align:left}
.thought-delete:hover{color:#925e53;text-decoration:underline}
.thought-actions-right{display:flex;align-items:center;gap:13px}
.thought-actions-right span{font-size:10px;color:#9ba89a;white-space:nowrap}
.thought-done{border-radius:7px;background:#3c5b44;color:#fff;font-size:11px;font-weight:700;padding:12px 17px}
.thought-done:hover{background:#304d38}
.thought-privacy{font-size:10px;color:#a8afa5;line-height:1.5;margin:17px 0 0}
.toc-tabs{justify-content:space-between;gap:8px}
.toc-tabs button{font-size:11px;white-space:nowrap}
.toc-tabs #thoughtCount{display:inline-block;color:#8a9f8b;font-size:9px;margin-left:3px}
.thought-list-item{display:block;width:100%;padding:17px 4px 19px;border-bottom:1px solid #edf0e9;text-align:left}
.thought-list-item:hover{background:#f7f9f4}
.thought-list-meta{display:block;color:#9aa69b;font-size:9px;font-weight:700;letter-spacing:1px;text-transform:uppercase;margin-bottom:9px}
.thought-list-quote{display:block;font-family:var(--serif);font-size:18px;font-style:italic;line-height:1.25;color:#627363;overflow-wrap:anywhere}
.thought-list-note{display:block;font-size:12px;line-height:1.5;color:#5e6c5f;margin-top:9px;overflow-wrap:anywhere}
.thought-export{width:100%;padding:13px;border:1px solid #dce5db;border-radius:8px;color:#59745e;background:#f1f5ee;font-size:11px;font-weight:700;margin:16px 0}
body[data-theme=night] .selection-toolbar,body[data-theme=night] .thought-drawer{background:#2c372e;border-color:#4a5d4c;color:#dfe8dc}
body[data-theme=night] .selection-toolbar button{color:#d0e2d0}
body[data-theme=night] .selection-toolbar .selection-thought,body[data-theme=night] .thought-kinds button.selected{background:#48614c;color:#f1f7ec}
body[data-theme=night] .thought-drawer h2{color:#e1e8dc}
body[data-theme=night] .thought-quote,body[data-theme=night] .thought-input{background:#333f36;color:#e1e8dc;border-color:#576b58}
body[data-theme=night] .thought-kinds button,body[data-theme=night] .thought-export{background:#39483c;color:#c9dcca;border-color:#546955}
body[data-theme=sepia] .selection-toolbar,body[data-theme=sepia] .thought-drawer{background:#faf5e9}
body[data-theme=sepia] .thought-input,body[data-theme=sepia] .thought-quote{background:#f6eedf}
@media(max-width:700px){.thought-drawer{width:100%;padding:24px 23px 22px}.thought-drawer h2{font-size:42px}.thought-input{min-height:190px}.selection-toolbar{max-width:calc(100vw - 16px)}.selection-toolbar button{padding:10px 9px;font-size:10px}}
@media(prefers-reduced-motion:reduce){.thought-drawer{transition:none}}

/* PDF pages are a gentle vertical scroll, with the document still central. */
.reading-focused.pdf-reading .book-page{height:calc(100dvh - 174px);min-height:360px;max-width:min(1200px,calc(100vw - 40px));margin-inline:auto;overflow:hidden;background:transparent;box-shadow:none}
.reading-focused.pdf-reading .reader-view{padding-bottom:100px}
.pdf-viewer{height:100%;width:100%;min-height:0}
.pdf-scroller{height:100%;width:100%;overflow:auto;padding:18px 18px 120px;scrollbar-width:thin;scrollbar-color:#c6cec2 transparent;overscroll-behavior:contain;text-align:center}
.pdf-page{position:relative;overflow:hidden;margin:0 auto 24px;background:white;box-shadow:0 3px 20px #20302416,0 0 0 1px #dfe3db;max-width:none;min-height:180px;text-align:initial}
.pdf-page canvas{display:block;width:100%;height:100%}
.pdf-page-placeholder{position:absolute;top:50%;left:50%;color:#c1c6be;font:15px var(--serif);transform:translate(-50%,-50%)}
.pdf-page-error{padding:30px;color:#a26458;font:15px var(--serif)}
.pdf-page .textLayer{position:absolute;inset:0;overflow:clip;line-height:1;opacity:1;transform-origin:0 0;-webkit-text-size-adjust:none;text-size-adjust:none;--min-font-size:1;--text-scale-factor:calc(var(--total-scale-factor) * var(--min-font-size));--min-font-size-inv:calc(1 / var(--min-font-size));z-index:2}
.pdf-page .textLayer :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0 0}
.pdf-page .textLayer > :not(.markedContent),.pdf-page .textLayer .markedContent span:not(.markedContent){--font-height:0;font-size:calc(var(--text-scale-factor) * var(--font-height));--scale-x:1;--rotate:0deg;transform:rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv))}
.pdf-page .textLayer .markedContent{display:contents}
.pdf-page .textLayer ::selection{background:#b2c8a780}
.pdf-marks{position:absolute;inset:0;pointer-events:none;z-index:3}
.pdf-highlight{position:absolute;padding:0;margin:0;border-radius:2px;border:0;background:#e2c17b80;mix-blend-mode:multiply;pointer-events:auto;cursor:pointer}
.pdf-highlight:hover{background:#d0a452a8}
.pdf-zoom{display:flex;align-items:center;gap:7px;padding:2px 6px;border:1px solid #dfe7db;border-radius:7px;color:#68806b;white-space:nowrap}
.pdf-zoom button{font-size:16px;font-weight:400;padding:4px 6px}.pdf-zoom span{font-size:10px;min-width:36px;text-align:center}
.reading-focused.pdf-reading .reader-footer{width:min(560px,calc(100vw - 26px))}
.account-button{display:flex;align-items:center;gap:7px;padding:8px 10px;border-radius:8px;border:1px solid #dae4d7;color:#5d7962;font-size:10px;font-weight:700;white-space:nowrap;background:#f5f8f2}
.account-button svg{width:15px;height:15px}.account-button:hover{background:#eaf1e7}
.account-drawer{position:fixed;z-index:24;top:0;right:0;bottom:0;width:min(420px,100vw);padding:31px 32px;background:#fffefa;box-shadow:-20px 0 55px #1c302129;transform:translateX(105%);transition:transform .28s cubic-bezier(.2,.7,.2,1);overflow-y:auto}
.account-drawer.open{transform:translateX(0)}
.account-drawer h2{font-family:var(--serif);font-size:43px;font-weight:400;line-height:1.1;letter-spacing:-1.4px;color:#35503d;margin:35px 0 14px}.account-drawer h2 span{color:#b9956b}
.account-description{font-family:var(--serif);font-size:19px;line-height:1.45;font-style:italic;color:#718674;margin-bottom:30px}
.account-primary{display:flex;justify-content:center;align-items:center;width:100%;min-height:48px;border:0;border-radius:9px;background:#3c5b44;color:#fff;text-align:center;font-size:12px;font-weight:700;text-decoration:none;padding:13px 15px}
.account-primary:hover{background:#2d4b36}.account-primary:disabled{opacity:.6;cursor:wait}
.account-help{font-size:12px;line-height:1.65;color:#909e90;margin:18px 0}
.account-secondary{width:100%;min-height:42px;border:1px solid #dce6db;border-radius:9px;background:transparent;color:#52725b;font:600 12px var(--sans);cursor:pointer;margin-top:12px}
.account-secondary:hover{background:#f2f6f0}
.account-attention{border:1px solid #d7e1d4;background:#f6f8f3;border-radius:12px;padding:17px;margin:20px 0;color:#4b654e;font-size:13px;line-height:1.5}
.account-attention strong{font-family:var(--serif);font-size:20px;font-weight:500}
.account-attention p{font-size:12px;color:#647a65;line-height:1.6;margin:11px 0}
.account-choice{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.account-choice button{border:1px solid #cbd9ca;background:#fffefa;border-radius:8px;padding:10px 8px;color:#45634b;font-size:11px;font-weight:600;cursor:pointer}
.account-choice button:first-child{background:#43644a;color:#fff;border-color:#43644a}
.account-attention .account-primary{margin-top:12px}
.account-identity{border:1px solid #dfe9dd;border-radius:10px;padding:17px;margin-bottom:20px;color:#46684a;background:#f5f8f2;font-size:13px;overflow-wrap:anywhere}
.account-signout{display:inline-block;margin-top:24px;font-size:12px;color:#9e776b;text-decoration:underline}
body[data-theme=night] .account-drawer{background:#2c372e;color:#dee9da}body[data-theme=night] .account-drawer h2{color:#e2eadf}body[data-theme=night] .account-identity{background:#354538;border-color:#536954;color:#d7e5d3}body[data-theme=night] .account-button{background:#39483b;border-color:#526652;color:#d3e5d0}
body[data-theme=night] .account-attention{background:#344438;border-color:#5d715e;color:#d5e1d1}body[data-theme=night] .account-attention p{color:#b3c3af}body[data-theme=night] .account-secondary{color:#d3e5d0;border-color:#607460}
body[data-theme=sepia] .account-drawer{background:#faf5e9}
@media(max-width:900px){.account-button span{display:none}.account-button{width:34px;justify-content:center;padding:8px}.topbar .save-note{display:none}}
@media(max-width:700px){.reading-focused.pdf-reading .book-page{max-width:100%;height:calc(100dvh - 140px);min-height:280px}.pdf-scroller{padding:10px 10px 108px}.pdf-page{margin-bottom:14px}.account-drawer{padding:24px}.account-drawer h2{font-size:40px}}
@media(prefers-reduced-motion:reduce){.account-drawer{transition:none}}

/* Folio Focus: when a book opens, the interface gives the entire screen to reading. */
.topbar-focus{display:flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid #dfe6da;border-radius:7px;font-size:10px;font-weight:700;color:#55735c;background:#f1f5ee;white-space:nowrap}
.topbar-focus svg{width:15px;height:15px}.topbar-focus:hover{background:#e7efe4}
.app-shell.focus-mode{display:block;min-height:100dvh;background:var(--page)}
.focus-mode .sidebar,.focus-mode .topbar,.focus-mode .reader-footer,.focus-mode .reader-overline{display:none!important}
.focus-mode .main-area{width:100%;min-height:100dvh;background:var(--page)}
.focus-mode .reader-view{display:block;width:100%;min-height:100dvh;padding:0!important;background:var(--page)}
.focus-mode .book-page{display:block;width:100%;max-width:none;height:auto;min-height:0;box-shadow:none!important;background:transparent;border:none;overflow:visible}
.focus-mode .sample-scroll{height:auto;overflow:visible;scrollbar-width:none}
.focus-mode .sample-article{width:100%;max-width:min(760px,var(--reader-text-max,900px));margin-inline:auto;padding:clamp(64px,9vh,110px) clamp(24px,4vw,52px) 18vh;font-size:var(--reader-size);line-height:var(--reader-leading)}
.focus-mode .sample-article p{margin-bottom:1em}
.focus-mode.epub-reading .reader-view,.focus-mode.pdf-reading .reader-view{height:100dvh;min-height:0;overflow:hidden}
.focus-mode.epub-reading .book-page,.focus-mode.pdf-reading .book-page{height:100dvh;min-height:0;max-width:none;margin:0;overflow:hidden}
.focus-mode.epub-reading .epub-viewer{width:min(100%,var(--reader-text-max,900px));max-width:var(--reader-text-max,900px);height:100%;min-height:0;padding:clamp(20px,4vh,48px) clamp(16px,3vw,48px) 0;margin-inline:auto}
.focus-mode.epub-reading.scroll-reading .epub-viewer{padding:clamp(14px,2.8vh,32px) clamp(12px,2vw,30px) 0}
.focus-mode.pdf-reading .pdf-viewer{height:100%;min-height:0}
.focus-mode.pdf-reading .pdf-scroller{padding:14px 18px 96px}
.focus-progress{position:fixed;top:8px;left:14px;right:14px;height:4px;z-index:16;overflow:hidden;border-radius:3px;background:#ddded5;pointer-events:none}
.focus-progress-fill{height:100%;width:0;background:#947249;border-radius:3px;transition:width .22s ease-out}
.focus-back{position:fixed;top:22px;left:clamp(12px,2.2vw,32px);z-index:17;min-height:40px;display:flex;align-items:center;gap:5px;padding:0 11px 0 9px;border-radius:999px;background:var(--page);color:#7e8c80;opacity:.72;font-size:11px;font-weight:650;white-space:nowrap;transition:opacity .2s,background .2s,color .2s}
.focus-back svg{width:17px;height:17px;flex:none}
.focus-back:hover,.focus-back:focus-visible{opacity:1;background:#edf2eb;color:#415f48}
.focus-back:focus-visible{outline:2px solid #78977b;outline-offset:2px}
.focus-activator{position:fixed;top:0;left:50%;transform:translateX(-50%);z-index:17;width:88px;height:39px;display:grid;place-items:start center;padding-top:20px;opacity:.27;transition:opacity .2s;border-radius:0 0 14px 14px;color:var(--muted)}
.focus-activator:hover,.focus-activator:focus-visible{opacity:1;background:transparent}
.focus-grip{display:block;width:38px;height:3px;border-radius:8px;background:currentColor}
.focus-toolbar{position:fixed;z-index:18;top:12px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:5px;width:max-content;max-width:calc(100vw - 24px);min-height:52px;padding:6px 10px;border:1px solid #e0e6dc;border-radius:15px;background:rgba(255,254,250,.96);box-shadow:0 7px 32px #21302417;backdrop-filter:blur(18px);color:#546b57}
.focus-toolbar button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:38px;min-width:38px;padding:9px 10px;border-radius:8px;font-size:11px;font-weight:650;white-space:nowrap}
.focus-toolbar button:hover,.focus-toolbar button:focus-visible{background:#ebf1e8;color:#36513d}
.focus-toolbar button.is-bookmarked{color:#a77c48;background:#f6efe1}
.focus-activator:focus-visible,.focus-toolbar button:focus-visible{outline:2px solid #78977b;outline-offset:2px}
.focus-toolbar svg{width:16px;height:16px}.focus-separator{width:1px;height:19px;background:#e3e9df;margin:0 2px}
.focus-location{font-family:var(--serif);font-size:13px;color:#849285;max-width:165px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:10px}
.focus-percent{font-size:10px;color:#98a698;margin-right:8px;white-space:nowrap;font-variant-numeric:tabular-nums}
.focus-aa{font-family:var(--serif);font-size:17px;line-height:1;font-weight:500}
.focus-hint{position:fixed;z-index:16;left:50%;bottom:28px;transform:translateX(-50%);max-width:calc(100vw - 40px);padding:10px 17px;border-radius:30px;background:rgba(50,66,54,.85);color:#f4f5ed;font-size:11px;text-align:center;letter-spacing:.1px;line-height:1.5;box-shadow:0 7px 24px #0b1b0c22;pointer-events:none}
.focus-mode.controls-visible + .focus-activator{opacity:0;pointer-events:none}
body[data-theme=sepia] .focus-toolbar{background:rgba(250,245,233,.97);border-color:#ded5c4;color:#6e664f}
body[data-theme=sepia] .focus-progress{background:#ddd4c2}
body[data-theme=sepia] .focus-progress-fill{background:#9b7954}
body[data-theme=sepia] .focus-back:hover,body[data-theme=sepia] .focus-back:focus-visible{background:#eee4d3;color:#6f604e}
body[data-theme=night] .focus-toolbar{background:rgba(44,55,46,.97);border-color:#516251;color:#d5e4d0}
body[data-theme=night] .focus-progress{background:#566157}
body[data-theme=night] .focus-progress-fill{background:#c4a47c}
body[data-theme=night] .focus-back{color:#b3c3b3}
body[data-theme=night] .focus-back:hover,body[data-theme=night] .focus-back:focus-visible{background:#405242;color:#eff5ec}
body[data-theme=night] .focus-toolbar button:hover,body[data-theme=night] .focus-toolbar button:focus-visible{background:#405341;color:#f0f5ea}
body[data-theme=night] .focus-toolbar button.is-bookmarked{background:#4c4b39;color:#ddbd81}
body[data-theme=night] .focus-separator{background:#526052}body[data-theme=night] .focus-location,body[data-theme=night] .focus-percent{color:#aabda9}
body[data-theme=night] .focus-hint{background:rgba(204,220,203,.92);color:#25352b}
body[data-theme=night] .topbar-focus{background:#39483b;border-color:#526652;color:#d3e5d0}
@media(max-width:700px){
  .topbar-focus{width:34px;justify-content:center;padding:8px}.topbar-focus span{display:none}
  .focus-mode .sample-article{max-width:100%;padding:66px clamp(22px,6vw,35px) 110px}
  /* A stable mobile viewport prevents Chrome's collapsing browser bars from
     reflowing EPUB iframes mid-swipe. Keep the back control OUTSIDE the text
     viewport, instead of letting it sit over and obscure the first line. */
  .focus-mode.epub-reading .main-area{min-height:100svh}
  .focus-mode.epub-reading .reader-view,.focus-mode.epub-reading .book-page{height:100svh}
  .focus-mode.epub-reading .epub-viewer{--reader-safe-top:calc(62px + env(safe-area-inset-top,0px));width:100%;max-width:100%;height:calc(100% - var(--reader-safe-top));margin-top:var(--reader-safe-top);padding:0 10px}
  .focus-mode.epub-reading.scroll-reading .epub-viewer{padding:0 8px}
  .focus-mode.pdf-reading .pdf-scroller{padding:8px 9px 70px}
  .focus-toolbar{top:8px;gap:2px;padding:5px 6px;min-height:48px;border-radius:13px}
  .focus-progress{top:7px;left:11px;right:11px;height:3px}
  .focus-back{top:18px;left:8px;min-height:38px;padding:0 9px 0 7px;font-size:10px}
  .focus-activator{padding-top:17px;height:35px}
  .focus-toolbar button{padding:8px;min-width:34px;min-height:35px}
  .focus-toolbar button span:not(.focus-aa){display:none}
  .focus-location,.focus-separator{display:none}
  .focus-percent{margin:0 5px;font-size:10px}
  .focus-hint{font-size:10px;bottom:17px}
}
@media(prefers-reduced-motion:reduce){.focus-activator{transition:none}}
/* FreakRead wordmark: fit the longer name within the existing sidebar. */
.sidebar .brand{font-size:29px;letter-spacing:-1.4px;gap:9px;white-space:nowrap}
.sidebar .brand-symbol{flex:none}
