.lo-library,.lo-book-reader{color:#294858;font:13px/1.6 system-ui,-apple-system,"Microsoft YaHei",sans-serif}.lo-library{padding:24px;background:#fffefb;border:1px solid #dce8ed;border-radius:14px}.lo-library-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.lo-library-kicker{margin:0;color:#78909c;font-size:10px;letter-spacing:.12em}.lo-library h2{margin:2px 0 5px;font:500 25px Georgia,"Microsoft YaHei",serif}.lo-library-crumb{display:flex;align-items:center;gap:7px;color:#78909c}.lo-library-crumb button,.lo-library-actions button{padding:5px 9px;color:#356278;background:#fff;border:1px solid #dce8ed;border-radius:7px;cursor:pointer;font:inherit}.lo-library-actions{display:flex;gap:8px}.lo-library-upload{padding:5px 9px;color:#fff;background:#377291;border-radius:7px;cursor:pointer}.lo-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;margin-top:22px}.lo-library-folder,.lo-library-source{min-height:84px;padding:13px;text-align:left;background:#fbfdfe;border:1px solid #e2edf1;border-radius:10px}.lo-library-folder{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;cursor:pointer}.lo-library-folder span{grid-row:span 2;color:#b09635;font-size:22px}.lo-library-folder small,.lo-library-source small{display:block;color:#78909c;font-size:11px}.lo-library-source{display:flex;align-items:center;justify-content:space-between;gap:8px}.lo-library-source-main{display:flex;align-items:center;gap:10px;min-width:0;padding:0;text-align:left;background:none;border:0;cursor:pointer;font:inherit}.lo-library-source-main strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lo-library-source-icon{display:grid;place-items:center;width:28px;height:28px;color:#377291;background:#edf6f8;border-radius:7px}.lo-library-source select{max-width:88px;color:#527080;border:1px solid #dce8ed;border-radius:5px;background:#fff;font-size:11px}.lo-library-empty,.lo-library-error,.lo-reader-loading{padding:35px;color:#78909c;text-align:center}.lo-library-error{color:#a24f46}.lo-book-reader{display:grid;grid-template-rows:auto minmax(0,1fr);height:min(860px,calc(100vh - 36px));background:#f7fafb;border:1px solid #dce8ed;border-radius:14px;overflow:hidden}.lo-reader-toolbar{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#fff;border-bottom:1px solid #dce8ed}.lo-reader-toolbar button,.lo-reader-toolbar input{padding:5px 8px;border:1px solid #dce8ed;border-radius:6px;background:#fff;font:inherit}.lo-reader-toolbar .lo-reader-title{flex:1;overflow:hidden;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.lo-reader-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,38%);min-height:0}.lo-reader-pdf{position:relative;overflow:auto;padding:20px;background:#eef3f5}.lo-reader-page{position:relative;margin:0 auto 18px;background:#fff;box-shadow:0 3px 14px #29485822}.lo-reader-page canvas{display:block}.lo-reader-text-layer{position:absolute;inset:0;overflow:hidden;line-height:1}.lo-reader-text-layer span{position:absolute;white-space:pre;transform-origin:0 0;color:transparent;cursor:text}.lo-reader-text-layer ::selection{background:#37729155}.lo-reader-notes{min-width:0;padding:18px;overflow:auto;background:#fff;border-left:1px solid #dce8ed}.lo-reader-notes h3{margin:0 0 12px;font-size:15px}.lo-reader-note{padding:10px 0;border-top:1px solid #edf3f5;cursor:pointer}.lo-reader-note small{display:block;color:#78909c}.lo-reader-toc{position:absolute;z-index:3;top:44px;left:10px;width:250px;max-height:60%;padding:10px;overflow:auto;background:#fff;border:1px solid #dce8ed;box-shadow:0 8px 24px #29485822}.lo-reader-toc button{display:block;width:100%;padding:5px;text-align:left;background:none;border:0;cursor:pointer}.lo-reader-annotation{padding:8px 0;border-top:1px solid #edf3f5}.lo-reader-annotation button{float:right;padding:2px 5px}.lo-reader-highlight{position:absolute;background:#f1d96b66;pointer-events:none}.lo-reader-search{max-width:170px}@media(max-width:800px){.lo-reader-body{grid-template-columns:1fr}.lo-reader-notes{max-height:35vh;border-top:1px solid #dce8ed;border-left:0}.lo-reader-toolbar{flex-wrap:wrap}.lo-library-head{display:block}.lo-library-actions{margin-top:14px}}
.lo-reader-toolbar{flex-wrap:wrap}.lo-reader-toolbar [data-page]{width:70px}.lo-reader-status{padding:0 14px;background:white;min-height:24px}.lo-book-reader{grid-template-rows:auto auto minmax(0,1fr)}.lo-reader-page .textLayer{z-index:2}.lo-reader-highlight{z-index:1}.lo-reader-highlight.underline{background:transparent;border-bottom:2px solid #c39728}.lo-reader-highlight.note{background:#9ccce855}.lo-reader-note.is-current{background:#edf6f8;border-left:3px solid #377291;padding-left:10px}.lo-reader-note p{white-space:pre-wrap}.lo-selection-bar{position:fixed;bottom:30px;left:35%;z-index:20;padding:12px;background:white;border:1px solid #bdcfd7;box-shadow:0 3px 18px #29485844;border-radius:10px}.lo-selection-bar button,.lo-library-detail button:not(.lo-library-course button),.lo-library-folder-actions button,.lo-group-dialog button{padding:6px 10px;border:1px solid #dce8ed;background:#fff;border-radius:6px;color:#294858;cursor:pointer}.lo-library-detail{margin-top:24px;border-top:1px solid #dce8ed;padding-top:16px}.lo-library-group{padding:16px 0;border-top:1px solid #dce8ed}.lo-library-group header{display:flex;justify-content:space-between;align-items:center}.lo-library-unit{display:flex;width:100%;justify-content:space-between;margin-top:8px;text-align:left}.lo-library-folder-card{border:1px solid #dce8ed;border-radius:10px;overflow:hidden}.lo-library-folder-card>.lo-library-folder{width:100%;border:0}.lo-library-folder-actions{padding:8px;display:flex;gap:6px}.lo-group-dialog{width:min(760px,90vw);max-height:85vh;overflow:auto;padding:26px;border:1px solid #dce8ed;border-radius:14px;color:#294858}.lo-group-dialog::backdrop{background:#152d4166}.lo-group-dialog textarea{display:block;width:100%;margin:12px 0}.lo-group-dialog label{display:block;margin:20px 0}.lo-reader-notes pre{white-space:pre-wrap;overflow-wrap:anywhere}
.lo-reader-pdf [data-pages]{padding-bottom:65vh}
.lo-library-course .lesson-regenerate,.lo-library-course .chapter-material-button{border:0;background:transparent;box-shadow:none}
.lo-library-course .lesson-regenerate:focus-visible,.lo-library-course .chapter-material-button:focus-visible{outline:2px solid var(--color-action-deep);outline-offset:2px}
.lo-library-course .lesson-regenerate,.lo-library-course .chapter-material-button{opacity:0;pointer-events:none;transition:opacity .15s ease}
.lo-library-course .lesson-row:hover .lesson-regenerate,.lo-library-course .lesson-row:focus-within .lesson-regenerate,.lo-library-course .chapter-summary:hover .chapter-material-button,.lo-library-course .chapter-summary:focus-within .chapter-material-button{opacity:1;pointer-events:auto}
@media (hover:none),(pointer:coarse){.lo-library-course .lesson-regenerate,.lo-library-course .chapter-material-button{opacity:1;pointer-events:auto}}

/* Reflowed text view shares reader page state while keeping PDF geometry separate. */
.lo-reader-content{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;min-height:0;background:#eef3f5}.lo-reader-text{display:none;position:relative;overflow:auto;padding:20px;background:#fff;min-width:0}.lo-book-reader[data-reader-view="text"] .lo-reader-pdf{display:none}.lo-book-reader[data-reader-view="text"] .lo-reader-text{display:block}.lo-reader-text-page{max-width:760px;margin:0 auto 30px;padding:2px 30px 28px;background:#fff;border-bottom:1px solid #dce8ed}.lo-reader-text-page-label{margin:0 0 22px;color:#78909c;font-size:11px;text-align:center}.lo-reader-text-block{margin:0 0 1em;color:#294858;white-space:pre-wrap;overflow-wrap:anywhere;cursor:text}.lo-reader-text-block-body{font:400 var(--lo-reader-font-size,17px)/var(--lo-reader-line-height,1.85) Georgia,"Microsoft YaHei",serif}.lo-reader-text-block-heading{font:600 1.35em/1.45 system-ui,-apple-system,"Microsoft YaHei",sans-serif}.lo-reader-text-block-figure{padding:18px;text-align:center;color:#78909c;background:#f7fafb}.lo-reader-text-block::selection{background:#37729155}.lo-reader-text-document{padding-bottom:35vh}.lo-reader-annotation{cursor:pointer}.lo-reader-source-focus{position:absolute;z-index:2;background:#37729144;outline:2px solid #377291aa;pointer-events:none}@media(max-width:800px){.lo-reader-text-page{padding-left:18px;padding-right:18px}}
.lo-reader-text-block.lo-reader-text-annotated.highlight{background:#f1d96b66}.lo-reader-text-block.lo-reader-text-annotated.underline{text-decoration:underline;text-decoration-color:#d49b1f;text-decoration-thickness:2px}.lo-reader-text-block.lo-reader-text-annotated.note{border-left:3px solid #377291;padding-left:10px}

.lo-text-mark.highlight{background:#f1d96b66}.lo-text-mark.underline{text-decoration:underline;text-decoration-color:#d49b1f;text-decoration-thickness:2px}.lo-text-mark.note{border-bottom:2px dotted #377291}
.lo-reader-body{grid-template-columns:minmax(280px,38%) minmax(0,1fr)}.lo-reader-content{order:2}.lo-reader-notes{order:1;border-right:1px solid #dce8ed;border-left:0}
@media(max-width:800px){.lo-reader-body{grid-template-columns:1fr}.lo-reader-content,.lo-reader-notes{order:initial}.lo-reader-notes{border-right:0}}

/* The book keeps the same fixed study workspace as video lessons. */
body.book-study-mode{overflow:hidden}
body.library-home.book-study-mode .main-content{height:100dvh;min-height:0;box-sizing:border-box;padding:14px clamp(16px,2.5vw,40px)}
body.book-study-mode #study-view{height:100%;min-height:0;overflow:hidden}
body.book-study-mode .lo-book-reader{width:100%;height:100%;min-height:0;grid-template-rows:auto auto minmax(0,1fr);border-color:var(--color-line,#dce8ed);background:var(--color-surface,#fff);box-shadow:var(--shadow-soft,none)}
.lo-reader-toolbar{min-height:82px;box-sizing:border-box;gap:8px 16px;padding:12px 20px}
.lo-reader-heading{flex:1 1 360px;min-width:0}
.lo-reader-toolbar .lo-reader-title{display:block;overflow:hidden;font-size:clamp(18px,1.7vw,24px);line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.lo-reader-page-indicator{display:block;margin-top:3px;color:#78909c;font-size:11px;font-variant-numeric:tabular-nums}
.lo-reader-toolbar-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:7px}
.lo-reader-status:empty{display:none}
.lo-reader-status:not(:empty){min-height:0;padding:5px 20px;border-bottom:1px solid #dce8ed}
.lo-reader-body{grid-template-columns:minmax(230px,29%) minmax(0,1fr);min-height:0}
.lo-reader-notes{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px 18px}
.lo-reader-content{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.lo-reader-controls{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:9px 14px;background:#fcf7ee;border-bottom:1px solid #e8ddcb}
.lo-reader-view-switch{display:inline-flex;gap:3px;padding:3px;border:1px solid #dce8ed;border-radius:9px;background:#edf1f7}
.lo-reader-view-switch button{min-height:30px;padding:4px 12px;border:0;border-radius:6px;color:#597081;background:transparent;cursor:pointer;font:inherit}
.lo-reader-view-switch button[aria-pressed="true"]{color:#294858;background:#fff;box-shadow:0 1px 5px #2948581c;font-weight:700}
.lo-reader-pdf-controls,.lo-reader-text-controls{display:flex;align-items:center;gap:6px}
.lo-reader-controls button:not(.lo-reader-view-switch button),.lo-reader-controls input{padding:4px 7px;border:1px solid #dce8ed;border-radius:6px;color:#294858;background:#fff;font:inherit}
.lo-reader-controls [data-page]{width:58px}
.lo-reader-pdf,.lo-reader-text{flex:1 1 auto;min-height:0;overscroll-behavior:contain}
.lo-book-reader[data-reader-view="pdf"] .lo-reader-text-controls,.lo-book-reader[data-reader-view="text"] .lo-reader-pdf-controls{display:none}
.lo-reader-toc{top:12px}
@media(max-width:800px){.lo-reader-toolbar{min-height:0}.lo-reader-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,3fr) minmax(130px,2fr)}.lo-reader-content{order:1}.lo-reader-notes{order:2;border-right:0;border-top:1px solid #dce8ed}.lo-reader-toolbar-actions{justify-content:flex-start}}

html[data-theme="dark"] body.library-home{background:var(--color-paper)}
html[data-theme="dark"] .library-home .sidebar{background:var(--color-atmosphere);border-color:var(--color-line)}
html[data-theme="dark"] .lo-library,html[data-theme="dark"] .lo-book-reader,html[data-theme="dark"] .lo-reader-toolbar,html[data-theme="dark"] .lo-reader-notes,html[data-theme="dark"] .lo-reader-text,html[data-theme="dark"] .lo-reader-text-page,html[data-theme="dark"] .lo-reader-toc,html[data-theme="dark"] .lo-group-dialog,html[data-theme="dark"] .lo-selection-bar{color:var(--color-text);background:var(--color-surface);border-color:var(--color-line)}
html[data-theme="dark"] .lo-reader-content,html[data-theme="dark"] .lo-reader-pdf{background:#172129}
html[data-theme="dark"] .lo-reader-controls,html[data-theme="dark"] .library-home .lo-reader-toolbar{background:var(--color-atmosphere);border-color:var(--color-line)}
html[data-theme="dark"] .lo-reader-view-switch,html[data-theme="dark"] .lo-reader-view-switch button[aria-pressed="true"],html[data-theme="dark"] .lo-reader-controls button:not(.lo-reader-view-switch button),html[data-theme="dark"] .lo-reader-toolbar button,html[data-theme="dark"] .lo-reader-toolbar input,html[data-theme="dark"] .lo-reader-annotation button{color:var(--color-text);background:#263640;border-color:var(--color-line)}
html[data-theme="dark"] .lo-reader-view-switch button:not([aria-pressed="true"]){color:var(--color-muted)}
html[data-theme="dark"] .lo-reader-text-block,html[data-theme="dark"] .lo-reader-note,html[data-theme="dark"] .lo-reader-annotation{color:var(--color-text);border-color:var(--color-line)}
html[data-theme="dark"] .lo-reader-note.is-current{background:#294652}
html[data-theme="dark"] .lo-reader-text-block-figure{color:var(--color-muted);background:#293943}
html[data-theme="dark"] .lo-reader-page-indicator,html[data-theme="dark"] .lo-reader-text-page-label,html[data-theme="dark"] .lo-reader-note small{color:var(--color-muted)}
html[data-theme="dark"] .lb-browser,html[data-theme="dark"] .lb-header h1,html[data-theme="dark"] .lb-detail h1,html[data-theme="dark"] .lb-section h2{color:var(--color-text)}
html[data-theme="dark"] .lb-search,html[data-theme="dark"] .lb-menu-panel,html[data-theme="dark"] .lb-processing-dialog,html[data-theme="dark"] .lb-processing-confirm,html[data-theme="dark"] .lb-processing-status,html[data-theme="dark"] .lb-detail-tools,html[data-theme="dark"] .lb-upload-status{color:var(--color-text);background:var(--color-surface);border-color:var(--color-line)}
html[data-theme="dark"] .lb-search input,html[data-theme="dark"] .lb-menu-panel button,html[data-theme="dark"] .lb-menu-panel label,html[data-theme="dark"] .lb-processing-dialog input{color:var(--color-text);background:transparent;border-color:var(--color-line)}
html[data-theme="dark"] .lb-domain[data-tone]{--tone-bg:#24353d;--tone-border:#3b535e;--tone-text:#d7e8ed;--tone-muted:#a9bdc5}
html[data-theme="dark"] .lb-source[data-tone]{--source-bg:#202b33;--source-border:#354953}
html[data-theme="dark"] .lb-domain-add,html[data-theme="dark"] .lb-resume,html[data-theme="dark"] .lb-resume-play,html[data-theme="dark"] .lb-book-settings,html[data-theme="dark"] .lb-book-icons button,html[data-theme="dark"] .lb-unit-note,html[data-theme="dark"] .lb-processing-actions button,html[data-theme="dark"] .lb-processing-actions a{color:var(--color-text);background:var(--color-surface);border-color:var(--color-line)}
html[data-theme="dark"] .lb-detail .lo-library-unit,html[data-theme="dark"] .lb-nav-main button,html[data-theme="dark"] .lb-nav-folder{color:var(--color-text)}
html[data-theme="dark"] .lb-detail .lo-library-unit:hover,html[data-theme="dark"] .lb-nav-main button:hover,html[data-theme="dark"] .lb-nav-folder:hover,html[data-theme="dark"] .lb-menu-panel button:hover{background:var(--color-surface-hover)}
html[data-theme="dark"] .lb-nav-folder[data-tone],html[data-theme="dark"] .lb-nav-folder[data-tone]:is(:hover,.is-active),html[data-theme="dark"] .lb-nav-main button.is-active{color:var(--color-text);background:var(--color-surface-hover)}
html[data-theme="dark"] .lb-source-info small,html[data-theme="dark"] .lb-book-state,html[data-theme="dark"] .lb-breadcrumb,html[data-theme="dark"] .lb-header p,html[data-theme="dark"] .lb-detail-heading p{color:var(--color-muted)}
