:root{--bg:#f7f8f4;--paper:#fffefa;--ink:#283b34;--muted:#7d877e;--line:#e0e5dc;--green:#385f4e;--pale:#e9eee6;--danger:#a44938;--serif:"Songti SC", "Noto Serif SC", "STSong", Georgia, serif}*{box-sizing:border-box}body{background:var(--bg);color:var(--ink);margin:0;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft Yahei,sans-serif;font-size:14px;line-height:1.7}button,input,textarea,select{font:inherit}button,.button{border:1px solid var(--line);background:var(--paper);color:var(--ink);cursor:pointer;border-radius:7px;justify-content:center;align-items:center;gap:6px;padding:9px 15px;line-height:1.5;text-decoration:none;display:inline-flex}button:hover,.button:hover{background:var(--pale)}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline-offset:3px;outline:2px solid #7b9c7e}a{color:var(--green)}input,textarea,select{background:var(--paper);border:1px solid var(--line);color:var(--ink);border-radius:6px;max-width:100%;padding:10px 12px}textarea{resize:vertical;width:100%;line-height:1.9}input,select{min-width:0}label{flex-direction:column;gap:7px;margin-bottom:17px;font-size:13px;font-weight:500;display:flex}fieldset{border:0;min-width:0;margin:0;padding:0}h1,h2,h3,p{margin-top:0}h1,h2{font-family:var(--serif);letter-spacing:.02em;font-weight:600}h1{font-size:34px;line-height:1.5}h2{font-size:23px;line-height:1.5}h3{font-size:16px;font-weight:600}p{margin-bottom:13px}img{max-width:100%;display:block}.primary{background:var(--green);color:#fff;border-color:var(--green)}.primary:hover{background:#2a4d3d}.secondary{background:0 0;border-color:#becabb}.text-button{color:var(--muted);background:0 0;border:0;padding:4px 6px;font-size:13px}.text-button:hover{color:var(--green);background:var(--pale)}.danger{color:var(--danger)}.icon-button{width:35px;height:35px;color:var(--muted);background:0 0;border:0;padding:0;font-size:25px}.muted{color:var(--muted)}.small{font-size:12px}.eyebrow{letter-spacing:.17em;color:#87947c;margin-bottom:10px;font-size:10px;font-weight:600;display:block}.wordmark{font-family:Georgia, var(--serif);letter-spacing:.025em;font-size:23px;line-height:1.2}.wordmark>span{letter-spacing:.19em;color:var(--muted);margin-top:6px;font-family:inherit;font-size:10px;display:block}.full{width:100%}.login-shell{grid-template-columns:1fr 400px;align-items:center;gap:120px;max-width:1100px;min-height:100dvh;margin:auto;padding:60px;display:grid}.login-intro h1{margin:65px 0 25px;font-size:43px}.login-intro>p{color:var(--muted);line-height:2.1}.login-card{background:var(--paper);border:1px solid var(--line);border-radius:15px;padding:40px;box-shadow:0 15px 60px #364f3910}.login-card h2{margin:15px 0 8px}.login-card form{margin-top:28px}.login-card>p:last-child{text-align:center;margin:24px 0 0}.book-lines{border-bottom:1px solid #c9d1c5;align-items:flex-end;gap:12px;height:100px;margin-top:40px;display:flex}.book-lines span{background:#e4eadf;border:1px solid #a5b8a4;border-radius:4px 4px 0 0;width:43px;height:78px}.book-lines span:nth-child(2){transform-origin:bottom;background:#d4dfce;height:96px;transform:rotate(-7deg)}.book-lines span:nth-child(3){background:#e9e4d9;height:64px}.loading-screen{text-align:center;padding:20vh 20px}.app-header{border-bottom:1px solid var(--line);background:var(--paper);align-items:center;gap:52px;height:90px;padding:0 max(30px,50vw - 660px);display:flex}.brand{text-align:left;background:0 0;border:0;gap:12px;padding:0}.brand:hover{background:0 0}.brand-icon{width:38px;height:38px;font-family:var(--serif);color:var(--green);border:1px solid #abbfa8;border-radius:4px;place-items:center;font-size:22px;display:grid}.app-header nav{flex:1;align-items:center;gap:30px;height:100%;display:flex}.app-header nav button{height:100%;color:var(--muted);border-radius:0;position:relative}.app-header nav .active{color:var(--green)}.app-header nav .active:after{content:"";background:var(--green);height:2px;position:absolute;bottom:0;left:5px;right:5px}.header-add{padding:9px 20px}.draft-dot{background:#a7773d;border-radius:50%;width:6px;height:6px;display:inline-block}.searchbar{background:#edf0e9;border-radius:8px;align-items:center;gap:12px;max-width:1260px;min-height:46px;margin:20px auto;padding:0 15px;display:flex}.searchbar>span{color:#86957e;font-size:24px}.searchbar input{background:0 0;border:0;outline:none;flex:1;width:100%}.searchbar select{background:0 0;border:0;padding:5px;font-size:12px}.page{max-width:1260px;margin:0 auto;padding:22px 0 40px}.page-title{justify-content:space-between;align-items:center;gap:20px;margin:20px 0 33px;display:flex}.page-title h1{margin:0 0 10px;font-size:33px}.page-title h1 span{color:#819276}.page-title p{margin:0}.shelf-tabs{border-bottom:1px solid var(--line);align-items:center;gap:25px;margin-bottom:32px;display:flex}.shelf-tabs button{color:var(--muted);background:0 0;border:0;border-bottom:2px solid #0000;border-radius:0;padding:12px 0}.shelf-tabs .selected{border-bottom-color:var(--green);color:var(--green)}.shelf-tabs>span{margin-left:auto}.book-grid{grid-template-columns:repeat(auto-fill,minmax(185px,1fr));gap:38px 45px;display:grid}.book-card{text-align:left;background:0 0;border:0;align-self:start;padding:0;display:block}.book-card:hover{background:0 0}.book-card:hover .book-cover{transform:translateY(-4px);box-shadow:3px 10px 18px #30443422}.book-cover{text-align:center;background:#dce6d8;border-left:6px solid #0000000a;border-radius:3px 8px 8px 3px;flex-direction:column;align-items:center;height:265px;padding:30px 17px;transition:all .2s;display:flex;position:relative;overflow:hidden;box-shadow:2px 5px 12px #30443414}.book-cover>img{object-fit:cover;width:calc(100% + 34px);max-width:none;height:265px;position:absolute;inset:0}.cover-rule{opacity:.4;background:currentColor;width:28px;height:1px;margin:6px 0 24px}.cover-title{font-family:var(--serif);max-height:125px;font-size:25px;line-height:1.6;overflow:hidden}.cover-author{font-family:var(--serif);opacity:.7;margin-top:18px;font-size:12px}.cover-foot{letter-spacing:.13em;opacity:.5;margin-top:auto;font-size:7px}.cover-1{color:#6c5941;background:#e8e0d2}.cover-2{color:#405e69;background:#dce5e9}.cover-3{color:#795d52;background:#ebe0db}.book-card h3{font-family:var(--serif);margin:16px 0 4px;font-size:19px}.book-card p{color:var(--muted);margin:0 0 4px;font-size:12px}.shelf-footer{border-top:1px solid var(--line);color:#9ca393;letter-spacing:.1em;justify-content:space-between;margin-top:65px;padding-top:20px;font-size:11px;display:flex}.empty-state{text-align:center;background:#ffffff50;border:1px dashed #d5ddcd;border-radius:10px;padding:70px 20px 90px}.empty-state h2{margin:12px 0}.empty-state p{color:var(--muted)}.empty-mark{font-family:var(--serif);color:#849b7c;margin-bottom:18px;font-size:32px;display:block}.workspace{border-top:1px solid var(--line);grid-template-columns:260px minmax(0,1fr);max-width:1320px;min-height:calc(100dvh - 180px);margin:0 auto;display:grid}.chapter-sidebar{border-right:1px solid var(--line);flex-direction:column;padding:27px 20px 30px 10px;display:flex}.sidebar-book{border-bottom:1px solid var(--line);padding:0 12px 22px}.sidebar-book h2{margin:20px 0 6px;font-size:23px}.sidebar-book p{margin:0}.sidebar-caption{color:var(--muted);justify-content:flex-end;padding:22px 14px 12px;font-size:12px;display:flex}.chapter-tree{margin-bottom:30px}.chapter-link{text-align:left;overflow-wrap:anywhere;background:0 0;border:0;border-radius:5px;justify-content:flex-start;gap:9px;width:100%;padding:11px 10px;font-size:13px;display:flex}.chapter-link.selected{color:#375c41;background:#e6eddf}.chapter-marker{color:#9aab91;flex-shrink:0}.sidebar-footer{border-top:1px solid var(--line);flex-wrap:wrap;gap:10px;margin-top:auto;padding:20px 10px 0;display:flex}.sidebar-footer button,.sidebar-footer a{white-space:nowrap;flex:1;font-size:12px}.sidebar-footer>.text-button{flex-basis:100%}.reading-main{width:100%;max-width:900px;padding:35px 55px 80px}.chapter-heading{justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:30px;display:flex}.chapter-heading h1{margin:0;font-size:31px}.chapter-actions{flex-direction:column;flex-shrink:0;display:flex}.summary-panel{border:1px solid var(--line);background:var(--paper);border-radius:10px;margin-bottom:40px;padding:27px 28px}.section-heading{justify-content:space-between;align-items:center;gap:10px;margin-bottom:20px;display:flex}.section-heading .eyebrow{margin-bottom:5px;font-size:9px}.section-heading h2{margin:0;font-size:21px}.section-heading select{border-color:var(--line);background:0 0;padding:5px 8px;font-size:12px}.summary-panel .editor-heading label{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.summary-panel .editor-heading{justify-content:flex-end}.summary-footer{justify-content:space-between;align-items:center;gap:15px;margin-top:15px;display:flex}.summary-footer button{padding:6px 12px;font-size:12px}.count{vertical-align:middle;color:#708567;background:#e6ebdf;border-radius:50%;place-items:center;min-width:23px;height:23px;margin-left:7px;font-family:inherit;font-size:12px;display:inline-grid}.note-card{background:var(--paper);border:1px solid var(--line);overflow-wrap:anywhere;border-radius:9px;margin-bottom:20px;padding:25px 28px}.note-meta{color:#8d9588;justify-content:space-between;margin-bottom:20px;font-size:11px;display:flex}.note-meta>span{color:#6f8264;background:#edf1e7;border-radius:3px;padding:2px 8px}.note-card blockquote{font-family:var(--serif);color:#46523f;border-left:3px solid #bbcbb1;margin:0 0 23px;padding:2px 0 2px 20px;font-size:17px;line-height:2}.note-card blockquote p:last-child{margin-bottom:0}.thought-label{color:#819370;letter-spacing:.08em;margin-bottom:8px;font-size:10px;display:block}.thought{margin-top:20px}.thought .prose{font-size:14px;line-height:1.9}.later{border-top:1px dashed var(--line);padding-top:18px}.note-images{flex-wrap:wrap;gap:10px;margin:14px 0;display:flex}.note-images img{object-fit:cover;border-radius:4px;width:110px;height:100px}.note-actions{border-top:1px solid #eef0e9;justify-content:space-between;align-items:center;gap:8px;margin-top:23px;padding-top:13px;display:flex}.note-actions .small{font-size:10px}.note-actions button{font-size:11px}.empty-notes{text-align:center;border:1px dashed var(--line);border-radius:8px;margin-bottom:18px;padding:42px 10px}.empty-notes p{color:#7e8f72;margin:0 0 5px}.add-note-block{color:#6c8262;background:0 0;border-style:dashed;width:100%;padding:16px;font-size:13px}.editor-heading{justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px;display:flex}.editor-heading label{margin:0;font-size:13px}.editor-heading button{font-size:11px}.editor{margin-bottom:21px}.editor:last-child{margin-bottom:0}.toolbar{border:1px solid var(--line);background:#f4f5ef;border-bottom:0;border-radius:5px 5px 0 0;gap:6px;padding:3px 6px;display:flex}.toolbar button{color:#7c8873;background:0 0;border:0;padding:3px 8px;font-size:11px}.editor textarea{border-radius:0 0 5px 5px;font-size:14px;display:block}.preview{border:1px solid var(--line);background:var(--paper);border-radius:6px;min-height:110px;padding:15px}.prose{overflow-wrap:anywhere;line-height:1.95}.prose p{margin-bottom:12px}.prose p:last-child{margin-bottom:0}.prose ul,.prose ol{padding-left:24px}.prose blockquote{border-left:3px solid var(--line);margin-left:0;padding-left:16px}.prose pre{white-space:pre-wrap;background:#f2f3ed;padding:12px;overflow:auto}.modal-backdrop{z-index:50;overscroll-behavior:contain;background:#1e302c66;justify-content:center;align-items:flex-start;padding:40px 20px;display:flex;position:fixed;inset:0;overflow-y:auto}.modal{background:var(--paper);border:1px solid #dfe5d6;border-radius:13px;width:680px;max-width:100%;padding:30px 32px;box-shadow:0 18px 90px #20352a2a}.modal.compact{width:470px}.modal-title{justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:25px;display:flex}.modal-title h2{margin:0;font-size:25px}.modal-title .eyebrow{margin-bottom:6px;font-size:9px}.selection-row{grid-template-columns:1fr 1fr;gap:16px;display:grid}.selection-row select{text-overflow:ellipsis;width:100%}.upload-area{flex-direction:column;gap:6px;margin:0 0 22px;display:flex}.upload-label{color:#5d7a50;text-align:center;cursor:pointer;background:#f3f6ed;border:1px dashed #bbcab0;border-radius:6px;margin:0;padding:12px}.upload-label input{border:0;width:100%;margin-top:8px;font-size:12px}.image-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:23px;display:grid}.image-tile{position:relative}.image-tile img{object-fit:cover;border-radius:5px;width:100%;height:110px}.image-tile button{padding:2px 7px;font-size:10px;position:absolute;bottom:4px;right:4px}.sticky-save{border-top:1px solid var(--line);background:var(--paper);z-index:1;justify-content:space-between;align-items:center;gap:10px;margin-top:25px;padding:18px 0 0;display:flex;position:sticky;bottom:0}.sticky-save>div{max-width:65%;line-height:1.6}.status{color:#53784b;font-size:12px}.status.bad{color:var(--danger)}.error{color:#a44332;overflow-wrap:anywhere;background:#fff0e9;border-radius:5px;padding:10px 13px;font-size:13px}.global-error{color:#a14a33;background:#faede5;justify-content:space-between;gap:10px;max-width:1260px;margin:12px auto;padding:12px 20px;display:flex}.global-error button{background:0 0;border:0;padding:0 8px}.conflict{background:#fff8e9;border:1px solid #d8ba7e;margin:15px 0;padding:16px;font-size:13px}.conflict button{margin:8px 8px 0 0;font-size:12px}.form-actions{justify-content:flex-end;margin-top:20px;display:flex}.settings-section{border-bottom:1px solid var(--line);margin-bottom:24px;padding-bottom:20px}.settings-section h3{margin-bottom:10px}.draft-item{border-bottom:1px dashed var(--line);align-items:center;gap:10px;padding:12px 0;display:flex}.draft-item>div{overflow-wrap:anywhere;flex:1;min-width:0}.draft-item p{margin-bottom:0}.draft-item button{flex-shrink:0;padding:6px 9px;font-size:11px}.search-page{max-width:900px}.search-result{text-align:left;background:var(--paper);width:100%;margin:15px 0;padding:20px 25px;display:block}.search-result h3{margin:0 0 7px}.search-result p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.notice{color:#887348;background:#eee9d9;border-radius:5px;margin-bottom:22px;padding:10px 14px;font-size:12px}.mobile-only,.mobile-capture,.mobile-book-bar,.drawer-backdrop{display:none}@media (min-width:1440px){.reading-main{margin-left:30px}}@media (max-width:1320px){.app-header{padding:0 30px}.page{padding-left:30px;padding-right:30px}.searchbar{margin:18px 30px}.global-error{margin:12px 30px}.book-grid{gap:30px}.reading-main{padding:30px 35px 80px}}@media (max-width:900px){.app-header{gap:30px}.app-header nav{gap:15px}.login-shell{grid-template-columns:1fr 360px;gap:40px;padding:40px}.login-intro h1{font-size:34px}.workspace{grid-template-columns:220px minmax(0,1fr)}.reading-main{padding:27px 24px 80px}.chapter-sidebar{padding-left:6px;padding-right:12px}.summary-panel,.note-card{padding:23px 20px}.chapter-heading{display:block}.chapter-actions{flex-direction:row;margin-top:12px}.book-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.book-cover{height:245px}.page-title h1{font-size:28px}}@media (max-width:650px){body{font-size:14px}.app-header{justify-content:space-between;gap:10px;height:73px;padding:0 18px}.wordmark{font-size:19px}.wordmark>span{font-size:8px}.brand-icon{width:30px;height:33px;font-size:20px}.brand{gap:8px}.app-header nav{flex:0;gap:11px}.app-header nav .text-button{white-space:nowrap;padding:0;font-size:11px}.header-add{display:none}.searchbar{gap:4px;min-height:43px;margin:15px 18px;padding:0 10px}.searchbar input{padding:8px;font-size:13px}.searchbar select{max-width:85px;padding:3px;font-size:11px}.page{padding:12px 20px 100px}.page-title{align-items:flex-start;gap:10px;margin:15px 0 22px}.page-title h1{font-size:26px;line-height:1.6}.page-title h1 span{display:block}.page-title .eyebrow{font-size:8px}.page-title .secondary{white-space:nowrap;margin-top:25px;padding:8px 10px;font-size:11px}.page-title p{font-size:12px}.shelf-tabs{gap:22px;margin-bottom:24px}.shelf-tabs>span{font-size:10px}.book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:25px 20px}.book-cover{height:225px;padding:20px 12px}.book-cover>img{height:225px}.cover-title{font-size:23px}.book-card h3{font-size:17px}.book-card p{font-size:11px}.shelf-footer{margin-top:40px;font-size:9px}.empty-state{padding:45px 15px 55px}.empty-state h2{font-size:21px}.empty-state p{font-size:13px}.mobile-capture{bottom:calc(20px + env(safe-area-inset-bottom));z-index:20;border-radius:30px;padding:12px 20px;display:flex;position:fixed;right:20px;box-shadow:0 4px 18px #335a4a44}.workspace{display:block}.reading-main{max-width:none;padding:0 18px 105px}.mobile-book-bar{border-bottom:1px solid var(--line);color:var(--muted);align-items:center;gap:15px;margin-bottom:23px;padding:12px 0;font-size:12px;display:flex}.mobile-book-bar>span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.mobile-book-bar button{flex-shrink:0;padding:5px 10px;font-size:12px}.chapter-sidebar{display:none}.chapter-sidebar.open{background:var(--paper);z-index:41;width:290px;padding:25px 16px;display:flex;position:fixed;inset:0 auto 0 0;overflow-y:auto}.drawer-backdrop{z-index:40;background:#283b3466;border:0;border-radius:0;display:block;position:fixed;inset:0}.mobile-only{display:inline-flex}.sidebar-caption .mobile-only{font-size:11px}.chapter-heading h1{font-size:28px}.chapter-heading{margin-bottom:22px}.chapter-heading .eyebrow{font-size:9px}.chapter-actions{margin-top:8px}.chapter-actions button{font-size:11px}.summary-panel{margin-bottom:30px;padding:20px 16px}.section-heading h2{font-size:20px}.section-heading .eyebrow{font-size:8px}.section-heading select{max-width:105px;font-size:10px}.note-card{padding:20px 18px}.note-card blockquote{padding-left:16px;font-size:17px}.note-actions{display:block}.note-actions>div{text-align:right;margin-top:8px}.modal-backdrop{align-items:stretch;padding:0}.modal{width:100%;min-height:100dvh;padding:25px 20px max(22px, env(safe-area-inset-bottom));box-shadow:none;border:0;border-radius:0;margin:0}.modal.compact{width:100%;min-height:100dvh}.note-modal .modal-title{margin-bottom:23px}.selection-row{grid-template-columns:1fr;gap:0}.selection-row label{margin-bottom:15px}.selection-row select,.modal input,.modal textarea{font-size:16px}.sticky-save{padding:13px 0 max(14px, env(safe-area-inset-bottom));margin-bottom:0;bottom:0}.sticky-save .small{font-size:10px;display:block}.sticky-save .primary{flex-shrink:0;padding:10px 15px;font-size:13px}.sticky-save>div{max-width:60%}.image-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.global-error{margin:10px 18px;font-size:12px}.login-shell{min-height:100dvh;padding:40px 23px;display:block}.login-intro h1{margin:30px 0 15px;font-size:32px}.login-intro>p{font-size:12px}.book-lines{display:none}.login-card{margin-top:35px;padding:26px 23px}.login-card input{font-size:16px}.login-card h2{font-size:25px}.login-intro .wordmark>span{display:none}.search-page h1{font-size:26px}.draft-item{flex-wrap:wrap}.draft-item>div{flex-basis:100%}.upload-area .small{font-size:10px}.prose{word-break:break-word}}.save-target{white-space:nowrap;text-overflow:ellipsis;color:var(--green);margin-bottom:3px;font-size:11px;display:block;overflow:hidden}.chapter-row{align-items:center;display:flex}.tree-toggle,.tree-spacer{flex-shrink:0;width:20px}.tree-toggle{color:var(--muted);background:0 0;border:0;padding:5px 0;font-size:12px}.toc-preview{max-height:50vh;margin:1rem 0;overflow-y:auto}.toc-row{border-bottom:1px solid var(--border,#ddd);grid-template-columns:2rem minmax(0,1fr) 5rem;align-items:center;gap:.5rem;padding:.7rem 0;display:grid}.toc-row input,.toc-row select{width:100%;min-width:0}.toc-actions{grid-column:2/-1;gap:.5rem;display:flex}.ai-workspace{border:1px solid var(--border,#dce2d8);background:var(--paper,#fffef9);border-radius:12px;margin:1rem 0;padding:1rem}.ai-workspace label{margin:.8rem 0;display:block}.ai-workspace textarea,.ai-workspace input:not([type=checkbox]),.ai-workspace select{width:100%;min-width:0}.ai-workspace .ai-consent{align-items:flex-start;gap:.5rem;font-size:.85rem;display:flex}.ai-workspace input[type=checkbox]{width:auto;margin-top:.3rem}.ai-actions{flex-wrap:wrap;gap:.5rem;display:flex}.ai-warning{background:#f4efdf;padding:.7rem;font-size:.85rem}.ai-details,.ai-directory{margin:1rem 0}.ai-details>summary,.ai-directory>summary{cursor:pointer;font-weight:600}.ai-directory .toc-row{grid-template-columns:1.5rem minmax(0,1fr)}.ai-directory .toc-row select{grid-column:2}.sidebar-caption{position:relative}.directory-menu{margin-left:auto;position:static}.directory-menu>summary{cursor:pointer;color:var(--green);border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:12px;list-style:none}.directory-menu>summary::-webkit-details-marker{display:none}.directory-menu-items{z-index:12;border:1px solid var(--line);background:var(--paper);border-radius:10px;width:auto;padding:6px;position:absolute;top:calc(100% + 6px);left:0;right:0;box-shadow:0 8px 24px #283b3414}.directory-menu-items button{text-align:left;background:0 0;border:0;border-radius:6px;width:100%;padding:12px;display:block}.directory-menu-items button:hover,.directory-menu-items button:focus-visible{background:var(--pale)}.directory-menu-items small{color:var(--muted);margin-top:3px;font-weight:400;display:block}.ai-heading{justify-content:space-between;align-items:start;gap:12px;display:flex}.ai-heading h3{font-family:var(--serif);margin:4px 0 12px;font-size:21px;font-weight:600}.ai-heading>span{overflow-wrap:anywhere}.ai-steps{border-bottom:1px solid var(--line);gap:20px;margin:8px 0 16px;padding:0;list-style:none;display:flex}.ai-steps li{color:var(--muted);padding:8px 0;font-size:12px}.ai-steps [aria-current=step]{border-bottom:2px solid var(--green);color:var(--green);font-weight:600}.ai-optional,.ai-history{border-top:1px solid var(--line);padding:12px 0}.ai-optional>summary,.ai-history>summary,.ai-more>summary{cursor:pointer;color:var(--green)}.ai-optional summary span,.ai-history summary span{margin-left:6px}.ai-task-status{background:var(--pale);border-radius:8px;margin:16px 0;padding:14px 16px}.ai-task-status p{margin:4px 0 0}.ai-task-status.failed{background:#fbf0e9}.ai-task-status small{color:var(--muted);margin-top:8px;display:block}.ai-task-status button{margin-top:12px}.ai-preview-heading{justify-content:space-between;align-items:center;gap:12px;margin:18px 0 12px;display:flex}.ai-reading{overflow-wrap:anywhere;padding:16px 0}.ai-reading .prose{font-size:16px;line-height:1.9}.ai-action-bar,.import-action-bar{z-index:3;background:var(--paper);border-top:1px solid var(--line);margin-top:16px;padding:12px 0;position:sticky;bottom:0}.ai-action-bar p,.import-action-bar p{margin:4px 0 10px}.ai-more{flex-basis:100%;padding-top:6px}.ai-actions button{min-height:42px}.ai-modal,.import-modal{overscroll-behavior:contain;max-height:calc(100dvh - 80px);scroll-padding-top:75px;overflow-y:auto}.ai-modal>.modal-title,.import-modal>.modal-title{z-index:5;background:var(--paper);padding:14px 0;position:sticky;top:-30px}.summary-panel{scroll-margin-top:24px}button:focus-visible,summary:focus-visible{outline:2px solid var(--green);outline-offset:3px}@media (max-width:700px){.directory-menu-items{max-width:calc(100vw - 48px)}.directory-menu>summary,.directory-menu-items button{min-height:44px}.ai-modal,.import-modal{height:100dvh;min-height:0;max-height:100dvh}.ai-modal>.modal-title,.import-modal>.modal-title{top:-25px}.ai-modal .ai-workspace{border:0;padding:0}.ai-heading{display:block}.ai-heading>span{margin-bottom:8px;display:block}.ai-steps{justify-content:space-between;gap:0}.ai-workspace input,.ai-workspace select,.ai-workspace textarea{font-size:16px}.ai-actions{grid-template-columns:minmax(0,1fr);display:grid}.ai-actions button,.import-action-bar button{width:100%;min-height:44px}.ai-action-bar,.import-action-bar{padding-bottom:max(12px, env(safe-area-inset-bottom))}.toc-preview{max-height:none;overflow-y:visible}.toc-row{grid-template-columns:1.5rem minmax(0,1fr) 4.5rem}.toc-actions button{min-width:44px;min-height:44px}.summary-footer{flex-wrap:wrap;gap:10px}.summary-footer button{min-height:44px}}.sidebar-caption.directory-toolbar{box-sizing:border-box;grid-template-columns:minmax(0,1fr) auto;align-items:center;width:100%;padding-inline:0;display:grid}.directory-toolbar>.directory-menu{grid-area:1/1;justify-self:start;margin:0}.directory-toolbar>.mobile-only{grid-area:1/2;justify-self:end}.chapter-navigation{justify-content:space-between;align-items:center;gap:12px;margin:-6px 0 24px;display:flex}.chapter-navigation button{min-height:44px}.chapter-tree{overscroll-behavior:contain;scrollbar-width:thin;max-height:55dvh;overflow-y:auto}@media (max-width:700px){.chapter-tree{flex-shrink:0;max-height:55dvh}}.book-cover.has-image{background:#eceee7;border-left:0;justify-content:center;padding:12px}.book-cover.has-image>img{object-fit:contain;object-position:center;width:100%;max-width:100%;height:100%;min-height:0;position:static}.file-upload{flex-wrap:wrap;align-items:center;gap:12px;min-width:0;margin:12px 0;display:flex}.file-upload-input{display:none}.file-upload-button{background:var(--pale);min-height:44px;color:var(--green);border:1px solid var(--line);border-radius:8px;align-items:center;gap:8px;padding:10px 18px;display:inline-flex}.file-upload-button:hover{background:#e3e9df}.file-upload-names{color:var(--muted);overflow-wrap:anywhere;min-width:0;font-size:12px}.shelf .page-title h1,.shelf-footer{overflow-wrap:anywhere}.shelf .page-title>div{min-width:0}.shelf-tabs{flex-wrap:wrap;gap:4px 20px}.shelf-tabs .shelf-add{color:var(--green)}.wordmark .logo-subtitle{text-overflow:ellipsis;white-space:nowrap;max-width:200px;overflow:hidden}
