/* 书库阅读工作区：控制与正文各自滚动，翻屏只作用于正文容器。 */
html.txt-reader-root{scroll-behavior:auto;overflow-anchor:none}
.txt-page{--txt-ui-blue:#12365f;--txt-ui-border:#c7d4e3}
.txt-page #main.shell{width:100%;max-width:1760px;padding-inline:clamp(12px,2vw,28px)}
.txt-head{display:flex;align-items:center;flex-wrap:wrap;gap:4px 16px;padding:7px 0 4px;max-width:none}
.txt-head h1{font-size:clamp(20px,2vw,26px);margin:0;line-height:1.5}
.txt-head p{font-size:.875rem;margin:0;line-height:1.6;color:#3f536b}
.txt-head>a{margin-left:auto;font-size:.875rem;padding:10px 0;min-height:44px}
.txt-workspace-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:8px 0 12px}
.txt-workspace-bar p{margin:0;flex:1 1 230px;font-size:.875rem;color:#3f536b}
.txt-workspace-bar button{font-size:.9375rem}
.txt-layout{display:grid;grid-template-columns:minmax(280px,350px) minmax(0,1fr);gap:16px;align-items:stretch;height:var(--txt-workspace-height,calc(100dvh - 210px));min-height:0;overflow-anchor:none;scroll-margin-top:12px}
.txt-layout[data-panel-open="false"]{grid-template-columns:minmax(0,1fr)}
.txt-layout[data-panel-open="false"] .txt-side{display:none}
.txt-side-top,.txt-side-backdrop{display:none}
.txt-side,.txt-main{position:relative;top:auto;height:100%;min-height:0;min-width:0}
.txt-side{display:flex;flex-direction:column;overflow:hidden;background:#f4f7fb;border:1px solid var(--txt-ui-border);border-radius:10px}
.txt-side-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:8px;background:#e8eff8;border-bottom:1px solid var(--txt-ui-border);flex:none}
.txt-side-tabs button{font-size:.875rem;padding:9px 4px;background:transparent;color:#244463;border:1px solid transparent;font-weight:650;min-width:0;min-height:44px}
.txt-side-tabs button.is-active,.txt-side-tabs button[aria-selected="true"]{background:#fff;border-color:#99b0cc;color:#12365f}
.txt-side>[role="tabpanel"]{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;margin:0;border:0;border-radius:0;padding:16px;background:transparent;position:static;max-height:none;scrollbar-gutter:stable}
.txt-side>[role="tabpanel"][hidden]{display:none!important}
.txt-side h2{font-size:1.125rem;margin:4px 0 12px}
.txt-side p{line-height:1.7}
.txt-browser input,.txt-browser select{width:100%;min-width:0}
.txt-browser form label{display:block;font-size:.875rem;font-weight:650;margin:10px 0 5px}
.txt-browser form label select{margin-top:5px}
.txt-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.txt-browser .actions{gap:8px;margin:14px 0}
.txt-browser .actions button{padding:8px 10px;font-size:.875rem;flex:1 1 auto}
.txt-import{margin:0 0 16px;padding:14px;background:#eaf1f9;border-radius:8px;border:1px solid #c6d7e9}
.txt-import>summary{font-size:.9375rem;color:#12365f;min-height:44px;padding:7px 0}.txt-import:not([open]){padding:5px 12px}.txt-import-grid{display:block}
.txt-import-grid>div{min-width:0}
.txt-import-grid strong{font-size:.9375rem}
.txt-import-grid p,.txt-import>.subtle{font-size:.875rem;margin:7px 0 12px}
.txt-folder-picker{position:relative;display:block;overflow:hidden;border-radius:6px;background:#12365f;color:#fff;padding:11px 12px;margin:9px 0;cursor:pointer;font-weight:650;font-size:.875rem;text-align:center;min-height:44px}
.txt-folder-picker:hover{background:#1c4575}
.txt-folder-picker:focus-within{outline:3px solid #9c2e3d;outline-offset:3px}
.txt-folder-picker input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.txt-import #txt-clear-local{width:100%;font-size:.875rem}
.txt-file-list{margin-top:12px;border-top:1px solid #d5dfe9}
.txt-file-card{padding:6px 0;border-bottom:1px solid #d5dfe9}
.txt-file-item{display:block;width:100%;text-align:left;padding:12px 10px;border:1px solid transparent;background:transparent;color:#12365f;overflow-wrap:anywhere;font-size:1rem;line-height:1.6;min-height:44px}
.txt-file-item:hover,.txt-file-item:focus-visible{background:#eaf1f9;color:#12365f}
.txt-file-item[data-selected="true"]{background:#e4edf8;border-color:#7e9cbe;box-shadow:inset 4px 0 #12365f}
.txt-file-item strong{display:block;font-size:1rem;font-weight:650}
.txt-file-item small{display:block;color:#435b72;font-size:.875rem}
.txt-file-item em{display:block;font-style:normal;color:#176442;font-size:.875rem}
.txt-direct-file{display:block;margin:0;padding:8px 10px;font-size:.875rem;line-height:1.6;color:#17426d;text-decoration:underline;overflow-wrap:anywhere;min-height:40px}
.txt-empty-results{padding:14px 10px;border:1px dashed #9bafc6;border-radius:6px;font-size:1rem}
.txt-browser #txt-more{width:100%;margin:12px 0;font-size:.9375rem}
.txt-current-title{font-size:1rem;font-weight:700;color:#12365f;overflow-wrap:anywhere;padding:12px;background:#e6eff9;border-radius:6px}
.txt-options-grid{display:grid;grid-template-columns:1fr;gap:15px;align-items:start}
.txt-options-grid>label{display:block;font-size:.9375rem;font-weight:600;min-width:0}
.txt-options-grid>label>select,.txt-options-grid>label>input[type="range"]{width:100%;min-width:0;margin-top:7px}
.txt-options-grid>.txt-check{display:flex;align-items:start;gap:8px}
.txt-consent{display:flex;align-items:start;gap:8px;margin:18px 0;font-size:.875rem;line-height:1.7}
.txt-side .txt-play-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.txt-side .txt-play-buttons button{min-height:44px;padding:9px 8px;font-size:.875rem}
.txt-voice-truth-note{font-size:.875rem;color:#344b61;padding:10px;background:#e6eef8;border-left:3px solid #205d9b}
.txt-side select,.txt-side input[type="search"]{max-width:100%;font-size:1rem}
#txt-reset-appearance{margin-top:20px;font-size:.9375rem}
.txt-main{display:flex;flex-direction:column}
.txt-reading-zone{--txt-bg:#fff;--txt-fg:#18212c;--txt-muted:#4c5c6b;--txt-border:#cad5e0;--txt-active:#e6eef8;--txt-match:#fbe9a3;--txt-link:#12568a;--txt-outline:#a52d3d;display:flex;flex-direction:column;min-height:0;min-width:0;height:100%;margin:0;padding:0;overflow:hidden;border:1px solid var(--txt-ui-border);border-radius:10px;background:#fff}
.txt-book-header{padding:10px 16px 8px;flex:none;border-bottom:1px solid #d6e0eb}
.txt-book-header h2{font-size:clamp(19px,1.6vw,25px);margin:0;line-height:1.5;overflow-wrap:anywhere}
.txt-book-header>summary{display:flex;align-items:center;gap:9px;min-height:32px;padding:0;cursor:pointer;list-style:none}
.txt-book-header>summary::after{content:'＋';font-family:system-ui,sans-serif;color:#41566e;font-size:1.1rem;margin-left:auto;flex:none}
.txt-book-header[open]>summary::after{content:'−'}.txt-book-header>summary::-webkit-details-marker{display:none}
.txt-book-header:not([open]) h2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.txt-book-header p{font-size:.875rem;color:#4c6178;line-height:1.6;margin:5px 0 0}
.txt-reader-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:10px 14px;background:#f3f7fb;border-bottom:1px solid #d6e0eb;flex:none}
.txt-reader-toolbar button{padding:9px 12px;font-size:.875rem;min-height:44px}
.txt-document-bar{position:relative;display:flex;align-items:center;flex:none;min-height:54px;border-bottom:1px solid #d6e0eb;background:#f7f9fc;z-index:4}
.txt-document-tools{position:static;flex:1;min-width:0;margin:0;background:transparent}
.txt-document-tools>summary{padding:13px 16px;font-size:.9375rem;color:#12365f;min-height:54px;white-space:nowrap}
.txt-tools-title-compact{display:none}.txt-document-bar[data-matches="true"] .txt-tools-title{display:none}.txt-document-bar[data-matches="true"] .txt-tools-title-compact{display:inline}.txt-document-bar[data-matches="true"] .txt-document-tools{flex:0 0 auto}
.txt-document-tools[open]>summary{background:#edf3fa}
.txt-document-tools-body{position:absolute;inset:100% 0 auto;z-index:5;max-height:var(--txt-tools-height,330px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:10px 16px 14px;border-bottom:1px solid #b4c7dd;background:#f7f9fc;box-shadow:0 9px 18px #15334d26}
.txt-find{line-height:1.6}
.txt-find label,.txt-document-locations label{font-weight:650;font-size:.875rem}
.txt-find .row{gap:6px;margin-top:6px}
.txt-find .row input{min-width:0;flex:1 1 160px}
.txt-find button{padding:9px 12px;font-size:.875rem}
.txt-document-locations{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,.65fr);gap:12px;align-items:start}
.txt-document-locations select{margin-top:6px}
#txt-jump-form .row{gap:6px;margin-top:6px;flex-wrap:nowrap}
#txt-paragraph-jump{min-width:55px;width:100%}
#txt-jump-button{flex:none;font-size:.875rem;padding:9px 12px}
.txt-scrollport{flex:1 1 auto;min-height:0;min-width:0;overflow:auto;overflow-anchor:none;overscroll-behavior:contain;scrollbar-gutter:stable;background:var(--txt-bg);color:var(--txt-fg);scroll-behavior:auto;outline-offset:-3px}
.txt-paper{width:100%;max-width:820px;margin:0 auto;min-height:100%;padding:clamp(16px,3vw,36px);background:var(--txt-bg);color:var(--txt-fg);font-size:20px;line-height:2.1;font-family:"Noto Serif CJK SC","Source Han Serif SC","Songti SC","SimSun",serif;overflow-wrap:anywhere}
.txt-paper .txt-paragraph{white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 1em;padding:5px 8px;border-left:3px solid transparent;scroll-margin-top:16px}
.txt-paper .txt-paragraph:hover{background:var(--txt-active)}
.txt-paper .txt-paragraph[aria-current="true"]{background:var(--txt-active);border-left-color:var(--txt-outline)}
.txt-paper .txt-paragraph.txt-match{box-shadow:inset 0 -2px var(--txt-outline)}
.txt-paper .txt-paragraph:focus-visible{outline:2px solid var(--txt-outline);outline-offset:2px}
.txt-paper .txt-placeholder{color:var(--txt-muted);font-size:1rem;font-family:system-ui,"Microsoft YaHei",sans-serif}
.txt-paper .txt-error-title{font-size:1.125rem;font-weight:650;color:var(--txt-fg);font-family:system-ui,"Microsoft YaHei",sans-serif}
.txt-paper a{color:var(--txt-link);display:inline-block;margin:12px 0;font-size:1rem}
.txt-paper .actions{gap:8px}
.txt-paper button{font-size:1rem}
.txt-page-controls{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;padding:10px 14px;border-top:1px solid #d6e0eb;background:#f3f7fb;flex:none}
.txt-page-controls button{padding:9px 14px;font-size:.9375rem}
.txt-page-controls p{font-size:.875rem;line-height:1.5;text-align:center;margin:0;color:#324d69}
.txt-match-controls{display:flex;align-items:center;gap:8px;padding:5px 8px;flex:1;min-width:0;background:#f5f0de}
.txt-match-controls[hidden]{display:none}.txt-match-controls p{margin:0;flex:1;text-align:center;font-size:.875rem;line-height:1.4}.txt-match-controls button{font-size:.875rem;padding:8px 10px;min-height:44px}
.txt-reader-help{flex:none;font-size:.8125rem;line-height:1.6;color:#4a5c70;margin:0;padding:7px 14px 9px;background:#f8fafc}
.txt-reading-zone[data-theme="white"]{--txt-bg:#fff;--txt-fg:#101820;--txt-muted:#415364;--txt-border:#cad5e0;--txt-active:#e4eff9;--txt-match:#ffefa7;--txt-link:#12568a;--txt-outline:#a52d3d}
.txt-reading-zone[data-theme="sepia"]{--txt-bg:#f5ecd9;--txt-fg:#332719;--txt-muted:#5e4c32;--txt-border:#bca98a;--txt-active:#e9dcaf;--txt-match:#f2cc71;--txt-link:#6d361c;--txt-outline:#8b4c13}
.txt-reading-zone[data-theme="green"]{--txt-bg:#e7f1e2;--txt-fg:#183321;--txt-muted:#4c6850;--txt-border:#a4bea7;--txt-active:#c3dfc0;--txt-match:#efd979;--txt-link:#245431;--txt-outline:#2d6937}
.txt-reading-zone[data-theme="slate"]{--txt-bg:#253544;--txt-fg:#f0f4f7;--txt-muted:#c3d1dd;--txt-border:#5d7484;--txt-active:#3c5668;--txt-match:#405c26;--txt-link:#b0dcff;--txt-outline:#ffc46a}
.txt-reading-zone[data-theme="dark"]{--txt-bg:#171d25;--txt-fg:#ecf2f7;--txt-muted:#bfced9;--txt-border:#4d6678;--txt-active:#304456;--txt-match:#455527;--txt-link:#b4ddff;--txt-outline:#ffd27e}
.txt-reading-zone[data-theme="black"]{--txt-bg:#000;--txt-fg:#fff;--txt-muted:#ddd;--txt-border:#555;--txt-active:#283a50;--txt-match:#4c4a17;--txt-link:#9cd9ff;--txt-outline:#ffdb73}
.txt-reading-zone[data-theme="contrast"]{--txt-bg:#05101c;--txt-fg:#fff5cf;--txt-muted:#f0dca4;--txt-border:#798695;--txt-active:#263e54;--txt-match:#5f3f00;--txt-link:#aedbff;--txt-outline:#ffcd33}
.txt-reading-zone[data-family="sans"] .txt-paper{font-family:system-ui,"Microsoft YaHei","PingFang SC",sans-serif}
.txt-reading-zone[data-leading="15"] .txt-paper{line-height:1.5}
.txt-reading-zone[data-leading="18"] .txt-paper{line-height:1.8}
.txt-reading-zone[data-leading="21"] .txt-paper{line-height:2.1}
.txt-reading-zone[data-leading="24"] .txt-paper{line-height:2.4}
.txt-reading-zone[data-width="680"] .txt-paper{max-width:680px}
.txt-reading-zone[data-width="820"] .txt-paper{max-width:820px}
.txt-reading-zone[data-width="1040"] .txt-paper{max-width:1040px}
.txt-reading-zone[data-width="1200"] .txt-paper{max-width:1200px}
.txt-reading-zone[data-font="16"] .txt-paper{font-size:16px}
.txt-reading-zone[data-font="17"] .txt-paper{font-size:17px}
.txt-reading-zone[data-font="18"] .txt-paper{font-size:18px}
.txt-reading-zone[data-font="19"] .txt-paper{font-size:19px}
.txt-reading-zone[data-font="20"] .txt-paper{font-size:20px}
.txt-reading-zone[data-font="21"] .txt-paper{font-size:21px}
.txt-reading-zone[data-font="22"] .txt-paper{font-size:22px}
.txt-reading-zone[data-font="23"] .txt-paper{font-size:23px}
.txt-reading-zone[data-font="24"] .txt-paper{font-size:24px}
.txt-reading-zone[data-font="25"] .txt-paper{font-size:25px}
.txt-reading-zone[data-font="26"] .txt-paper{font-size:26px}
.txt-reading-zone[data-font="27"] .txt-paper{font-size:27px}
.txt-reading-zone[data-font="28"] .txt-paper{font-size:28px}
.txt-reading-zone[data-font="29"] .txt-paper{font-size:29px}
.txt-reading-zone[data-font="30"] .txt-paper{font-size:30px}
.txt-reading-zone[data-font="31"] .txt-paper{font-size:31px}
.txt-reading-zone[data-font="32"] .txt-paper{font-size:32px}
.txt-reading-zone[data-font="33"] .txt-paper{font-size:33px}
.txt-reading-zone[data-font="34"] .txt-paper{font-size:34px}
.txt-reading-zone[data-font="35"] .txt-paper{font-size:35px}
.txt-reading-zone[data-font="36"] .txt-paper{font-size:36px}
@media(max-width:1050px){.txt-layout{grid-template-columns:285px minmax(0,1fr)}.txt-document-locations{grid-template-columns:1fr}.txt-reader-toolbar{gap:6px;padding:8px}.txt-reader-toolbar button{padding:8px 10px}.txt-book-header{padding:12px}.txt-reader-help{display:none}#txt-quick-controls,.txt-reading-zone[data-speaking="false"] #txt-quick-pause,.txt-reading-zone[data-speaking="false"] #txt-quick-stop{display:none}}
@media(max-width:760px){
 .txt-head{padding-top:4px;gap:2px 10px}.txt-head h1{font-size:1.25rem}.txt-head p{font-size:.875rem}.txt-head>a{padding:8px 0}
 .txt-workspace-bar{gap:7px}.txt-workspace-bar p{flex-basis:100%}
 .txt-layout,.txt-layout[data-panel-open="false"]{display:flex;flex-direction:column;gap:12px}
 .txt-page.txt-panel-open{overflow:hidden}
 .txt-side{position:fixed;inset:10px;inset:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));width:auto;height:auto;min-height:0;z-index:81;box-shadow:0 12px 40px #11253c55}
 .txt-side-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;background:#fff;flex:none;border-bottom:1px solid var(--txt-ui-border)}
 .txt-side-top strong{font-size:1rem}.txt-side-top button{min-height:44px;font-size:.9375rem;padding:8px 12px}
 .txt-side-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:80;width:100%;height:100%;padding:0;border:0;border-radius:0;background:#10223780}
 .txt-main{position:relative;top:auto;width:100%;height:100%;flex:1;min-height:0}
 .txt-side-tabs button{font-size:.875rem}.txt-side>[role="tabpanel"]{padding:14px}
 .txt-two,.txt-options-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .txt-import-grid p{font-size:.875rem}.txt-reader-toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px}
 .txt-reader-toolbar button{min-width:0;padding:8px 4px}.txt-book-header h2{font-size:1.125rem}.txt-book-header p{margin-top:4px}
 #txt-quick-controls,.txt-reading-zone[data-speaking="false"] #txt-quick-pause,.txt-reading-zone[data-speaking="false"] #txt-quick-stop{display:none}
 .txt-paper{padding:18px 12px}.txt-paper .txt-paragraph{padding:5px 6px}
 .txt-document-tools-body{padding:0 10px 10px}.txt-document-locations{grid-template-columns:1fr}
 .txt-find .row>input[type="search"]{flex-basis:100%}.txt-find button{flex:1 1 auto}
 .txt-page-controls{gap:5px;padding:8px}.txt-page-controls button{font-size:.875rem;padding:9px 10px}.txt-page-controls p{font-size:.8125rem}
 .txt-document-bar[data-matches="true"] .txt-document-tools>summary{padding-inline:7px}.txt-match-controls{gap:4px;padding:5px 5px}.txt-match-controls button{padding:8px 6px;white-space:nowrap}.txt-match-controls p{font-size:.8125rem;white-space:nowrap}
 .txt-reader-help{font-size:.8125rem;padding:6px 9px;display:none}
}
@media(max-width:350px){.txt-two,.txt-options-grid{grid-template-columns:1fr}.txt-workspace-bar button{padding:9px 11px;font-size:.875rem}}
@media(max-height:700px) and (min-width:761px){.txt-page>.site-breadcrumb{display:none}.txt-head{padding-block:0}.txt-head h1{font-size:20px}.txt-head>p{display:none}.txt-workspace-bar{padding-block:5px}.txt-reader-help{display:none}}
@media(max-height:520px){.txt-book-header{padding:6px 12px}.txt-book-header:not([open]) h2{-webkit-line-clamp:1}.txt-reader-help{display:none}.txt-reader-toolbar{padding:5px 8px}.txt-page-controls{padding:5px 8px}}
@media(prefers-reduced-motion:reduce){.txt-page *{scroll-behavior:auto!important}}
@media print{.txt-side,.txt-side-backdrop,.txt-workspace-bar,.txt-reader-toolbar,.txt-document-bar,.txt-document-tools,.txt-match-controls,.txt-page-controls,.txt-reader-help,.txt-head,.txt-page .notice{display:none!important}.txt-layout{display:block!important}.txt-main,.txt-reading-zone,.txt-scrollport{display:block;position:static;height:auto;min-height:0;max-height:none;overflow:visible}.txt-reading-zone{border:0}.txt-paper{box-shadow:none;border:0;max-width:none!important;background:white!important;color:black!important;padding:0}.txt-book-header{padding:0 0 16px}}
