:root{color-scheme:light;--canvas:#d5d4c9;--paper:#e4e1d5;--sidebar:#cecec2;--surface:#dcdccf;--ink:#24312a;--muted:#4d584b;--line:#8b9485;--accent:#315b43;--accent-hover:#244632;--tint:#c6d3c1;--primary-ink:#ffffff;--danger:#9a3025;--serif:"Noto Serif SC","Songti SC","STSong",Georgia,serif;--sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-family:var(--sans);color:var(--ink);background:var(--canvas);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;font-size:14px;line-height:1.6}button,input,textarea,select{font:inherit}button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--line);border-radius:8px;padding:9px 14px;min-height:38px;background:var(--paper);color:var(--ink);cursor:pointer;transition:background .16s,border-color .16s,box-shadow .16s}button:hover{background:var(--surface);border-color:var(--line)}button:disabled{opacity:.48;cursor:not-allowed}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #789b6e;outline-offset:3px}button .icon{flex-shrink:0}.icon{width:19px;height:19px;vertical-align:middle;flex-shrink:0}.primary{background:var(--accent);border-color:var(--accent);color:var(--primary-ink)}.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);box-shadow:0 3px 10px #26443117}.secondary{background:var(--paper)}.text-button,.icon-button{background:transparent;border-color:transparent}.text-button{color:var(--muted);font-size:13px;padding:8px}.icon-button{width:36px;height:36px;padding:8px}.wide{width:100%}input,textarea,select{border:1px solid var(--line);border-radius:8px;padding:11px 13px;color:var(--ink);background:var(--surface);max-width:100%}input::placeholder,textarea::placeholder{color:var(--muted)}input:focus,textarea:focus,select:focus{outline:2px solid #8da484;outline-offset:2px;border-color:transparent}textarea{width:100%;resize:vertical;line-height:1.9}label{display:block;font-size:13px;color:var(--ink)}label input,label select{display:block;margin-top:7px;width:100%}p{color:var(--muted);line-height:1.8}h1,h2,h3{margin:0;font-weight:600}h2{font-size:24px;letter-spacing:-.03em}h3{font-size:15px}pre{font-family:var(--sans)}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.mobile-only{display:none}.page-kicker{font-size:13px;letter-spacing:.18em;color:var(--muted);font-weight:600}.hint{font-size:13px;line-height:1.8;color:var(--muted)}.error,.task-error{color:var(--danger)}
/* The book shelf stays quiet; the manuscript owns the page. */
.sidebar{position:fixed;inset:0 auto 0 0;width:236px;background:var(--sidebar);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:27px 18px 14px;z-index:35}.sidebar-brand{display:flex;align-items:center;justify-content:space-between;margin:0 7px 27px}.brand{display:flex;align-items:center;gap:10px;font-family:Georgia,var(--serif);font-size:25px;letter-spacing:-.8px;font-weight:600;line-height:1.2}.brand-mark{display:grid;place-items:center;color:var(--accent)}.brand-mark .icon{width:29px;height:29px;stroke-width:1.6}.brand-caption{display:block;font-family:var(--sans);font-size:13px;font-weight:400;letter-spacing:.18em;margin-top:7px;color:var(--muted)}.new-project{width:100%;background:var(--surface);border:1px solid var(--line);font-size:13px;min-height:40px}.new-project .icon{width:16px;height:16px}.side-label{font-size:13px;font-weight:500;color:var(--muted);display:flex;justify-content:space-between;gap:8px;align-items:center;letter-spacing:.05em}.sidebar>.side-label{margin:24px 8px 10px}.side-label>span:last-child:not(:first-child){color:var(--muted);font-size:13px;letter-spacing:0}.book-list{display:flex;flex-direction:column;gap:5px;overflow-y:auto;min-height:0;flex-shrink:1;scrollbar-width:thin;scrollbar-color:#cbd2c2 transparent}.book-list:empty{min-height:25px}#bookList{max-height:130px;flex-shrink:0}.book-item{background:transparent;border:1px solid transparent;text-align:left;justify-content:flex-start;flex-shrink:0;width:100%;min-width:0;white-space:normal;font-size:13px;line-height:1.6;padding:9px 10px;gap:9px;border-radius:7px}.book-item.selected{background:var(--surface);border-color:var(--line);color:var(--ink)}.book-item:hover{background:var(--surface)}#bookList .book-item{font-weight:600;display:block;overflow-wrap:anywhere;max-height:64px;overflow:hidden}#bookList .book-item.selected{border-left:3px solid var(--line);padding-left:8px}.workspace-nav{display:flex;flex-direction:column;gap:4px;margin-top:21px;padding-top:15px;border-top:1px solid var(--line)}.workspace-nav button{justify-content:flex-start;gap:12px;border:0;background:transparent;font-size:13px;padding:9px 12px;min-height:38px;color:var(--muted)}.workspace-nav button .icon{width:17px;height:17px;color:var(--muted)}.workspace-nav button.selected{background:var(--surface);color:var(--ink);box-shadow:0 1px 4px #263b1410;font-weight:600}.workspace-nav button.selected .icon{color:var(--ink)}.workspace-nav button:hover{background:var(--surface)}.chapter-heading{display:flex;align-items:center;justify-content:space-between;margin:25px 5px 8px}.chapter-heading .side-label{flex:1}.chapter-heading .icon-button{width:24px;height:24px;min-height:24px;padding:4px;margin-left:8px}.chapters{flex:1}.chapter-index{font-family:Georgia,serif;font-size:13px;color:var(--muted);width:20px;flex-shrink:0}.chapter-info{min-width:0;flex:1}.chapter-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500}.chapter-state{display:block;font-size:13px;color:var(--muted);margin-top:2px}.chapter-dot{width:4px;height:4px;border-radius:50%;background:var(--accent);flex-shrink:0}.side-bottom{margin-top:auto;padding-top:14px;flex-shrink:0}.side-bottom .workspace-nav{margin:0;padding-top:12px}.private-footer{display:flex;gap:10px;align-items:center;padding:14px 4px 0;margin-top:12px;border-top:1px solid var(--line);font-size:13px}.avatar{width:30px;height:30px;display:grid;place-items:center;background:var(--surface);color:var(--ink);border-radius:50%;font:16px Georgia,serif}.private-footer small{display:block;color:var(--muted);font-size:13px;margin-top:1px}.private-footer .icon-button{margin-left:auto;color:var(--muted)}.private-footer .icon{width:15px;height:15px}
.app-main{margin-left:236px;min-width:0}.topbar{height:86px;padding:17px 35px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;background:var(--surface);position:sticky;top:0;z-index:20}.book-heading{min-width:0}.breadcrumb{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--muted);line-height:1.4;margin-bottom:6px}.breadcrumb>span:first-child{color:var(--muted)}.topbar h1{font-size:14px;letter-spacing:.01em;font-weight:500;max-width:600px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-actions{display:flex;align-items:center;gap:13px;flex-shrink:0}#saveStatus{font-size:13px;color:var(--muted);max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#saveStatus::before{content:"";display:inline-block;width:5px;height:5px;background:var(--surface);border-radius:50%;margin-right:6px;vertical-align:middle}.export-button{font-size:13px;padding:8px 13px}.export-button .icon{width:15px;height:15px}.content{max-width:1550px;margin:auto;padding:38px 35px 40px}.writing-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:25px}.writing-heading h2{font-family:var(--serif);font-size:30px;font-weight:400;letter-spacing:.04em;margin:4px 0}.book-stats{font-size:13px;color:var(--muted);margin-top:6px}.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.toolbar label{display:flex;gap:7px;align-items:center;font-size:13px}.toolbar input{width:57px;margin:0;padding:7px 8px;font-size:13px;background:transparent}.toolbar>.secondary{font-size:13px;padding:8px 11px}.editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:25px;align-items:start}.manuscript-column{min-width:0}.chapter-plan{background:var(--surface);border:1px solid var(--line);border-radius:8px;margin-bottom:15px}.chapter-plan summary{display:flex;align-items:center;gap:12px;padding:13px 16px;cursor:pointer;font-size:13px;list-style:none}.chapter-plan summary::-webkit-details-marker, .assistant-details summary::-webkit-details-marker{display:none}.plan-label{font-weight:500;white-space:nowrap;display:flex;align-items:center;gap:7px;color:var(--ink)}.plan-label .icon{width:15px;height:15px}#planPreview{font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.chapter-plan summary>.icon{width:13px;height:13px;color:var(--muted);transition:transform .2s}.chapter-plan[open] summary>.icon{transform:rotate(90deg)}.plan-body{padding:0 16px 8px}.plan-body textarea{background:var(--surface);font-size:13px;min-height:120px}.plan-body .hint{margin:5px 0}.editor-main{background:var(--paper);border:1px solid var(--line);border-radius:4px;box-shadow:0 3px 15px #23320c04;min-width:0}.manuscript-meta{display:flex;align-items:center;justify-content:space-between;padding:22px 35px 13px;font-size:13px;letter-spacing:.1em;color:var(--muted)}.manuscript-meta>span:last-child{letter-spacing:0;color:var(--muted)}.editor-main #text{display:block;border:0;outline:0;box-shadow:none;background:transparent;border-radius:0;padding:12px 35px 24px;font-family:var(--serif);font-size:17px;line-height:2.15;letter-spacing:.025em;min-height:620px;height:calc(100vh - 360px);resize:vertical;color:var(--ink);scrollbar-width:thin;scrollbar-color:#d3d7c8 transparent}.editor-main #text:focus{outline:0;box-shadow:inset 3px 0 #b9c8ac}.editor-main #text::placeholder{color:var(--muted)}.manuscript-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;border-top:1px solid var(--line);margin:0 35px;padding:15px 0;font-size:13px;color:var(--muted)}#wordCount{color:var(--muted);font-variant-numeric:tabular-nums}.writing-note{display:flex;align-items:center;justify-content:center;gap:7px;font-size:13px;color:var(--muted);margin-top:22px}.writing-note .icon{width:13px;height:13px}
/* Assistance is optional and distinct from the manuscript. */
.feedback{background:var(--surface);border:1px solid var(--line);border-radius:10px;min-width:0;overflow:hidden;position:sticky;top:108px}.assistant-heading{display:flex;align-items:center;gap:9px;padding:19px 18px 16px}.assistant-icon{width:32px;height:32px;display:grid;place-items:center;background:var(--surface);color:var(--muted);border-radius:9px}.assistant-icon .icon{width:18px;height:18px}.assistant-heading h2{font-size:13px;font-weight:600}.assistant-heading p{font-size:13px;margin:2px 0 0;color:var(--muted)}.assistant-status{font-size:13px;color:var(--muted);margin-left:auto;border:1px solid var(--line);border-radius:4px;padding:1px 5px}.assistant-tabs{display:flex;border-bottom:1px solid var(--line);padding:0 17px;gap:20px}.assistant-tabs button{flex:1;border:0;background:transparent;padding:7px 0 10px;min-height:32px;border-bottom:2px solid transparent;border-radius:0;font-size:13px;color:var(--muted)}.assistant-tabs button.selected{color:var(--ink);border-bottom-color:#6f875b;font-weight:600}#assistantTools,#assistantResults{padding:20px 18px 17px}.assistant-intro h3{font-family:var(--serif);font-size:16px;font-weight:500;color:var(--ink)}.assistant-intro p{margin:5px 0 17px;font-size:13px;color:var(--muted)}.compose-button{justify-content:space-between;width:100%;padding:12px 14px;font-size:13px;border-radius:7px;min-height:44px}.compose-button span{display:flex;align-items:center;gap:8px}.compose-button .icon{width:15px;height:15px}.call-note{font-size:13px;text-align:center;margin:8px -5px 17px;color:var(--muted);white-space:normal}.assistant-action-list{display:flex;flex-direction:column;gap:8px}.assistant-action{justify-content:flex-start;gap:11px;border:1px solid var(--line);padding:12px 11px;border-radius:7px;background:var(--surface);text-align:left}.assistant-action>.icon:first-child{color:var(--muted);width:17px;height:17px}.assistant-action>.icon:last-child{margin-left:auto;width:13px;height:13px;color:var(--muted)}.assistant-action>span{min-width:0}.assistant-action strong{font-size:13px;font-weight:500;display:block}.assistant-action small{font-size:13px;color:var(--muted);display:block;margin-top:4px}.tool-section{margin-top:21px}.tool-label{font-size:13px;letter-spacing:.05em;color:var(--muted);margin-bottom:9px}.selection-actions{display:flex;gap:8px}.selection-actions button{flex:1;font-size:13px;min-height:33px;padding:7px 10px;background:var(--surface);border-color:var(--line);color:var(--muted)}.tool-section .hint{font-size:13px;margin:8px 0 16px}.assistant-details{border-top:1px solid var(--line)}.assistant-details>summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:13px 0;font-size:13px;list-style:none;color:var(--muted)}.assistant-details>summary>.icon{width:12px;height:12px;transition:transform .2s}.assistant-details[open]>summary>.icon{transform:rotate(90deg)}.assistant-details .actionbar{margin-top:0;gap:7px}.assistant-details .actionbar button{width:100%;font-size:13px;padding:7px;min-height:32px}.assistant-details label{font-size:13px;display:flex;align-items:center;gap:8px}.assistant-details input{width:55px;font-size:13px;padding:5px;margin:0}.assistant-details .hint{font-size:13px;margin:10px 0 15px}.assistant-details .list-card{padding:10px;font-size:13px}.assistant-details .list-card h3{font-size:13px}.assistant-details .stack{margin:9px 0}.assistant-footnote{display:flex;align-items:flex-start;gap:6px;border-top:1px solid var(--line);padding-top:14px;font-size:13px;line-height:1.8;color:var(--muted)}.assistant-footnote .icon{width:12px;height:12px;margin-top:2px}.feedback pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.9;max-height:65vh;overflow:auto;color:var(--muted);scrollbar-width:thin}.feedback #output{margin:0}.feedback textarea{font-family:var(--serif);font-size:13px;line-height:1.9;min-height:240px;padding:10px;margin:10px 0}.feedback h3{font-size:13px}.feedback .hint{font-size:13px}#proposalBox{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}#proposalOriginal{max-height:160px;border-left:2px solid var(--line);padding-left:10px;color:var(--muted)}#memoryCandidates .card{padding:10px;margin-bottom:9px;font-size:13px}#memoryCandidates input{display:inline-block;width:auto;margin:0 8px 0 0;accent-color:var(--accent)}#memoryCandidates p{margin:5px 0}#memoryCandidates small{font-size:13px;color:var(--muted)}
/* Secondary rooms share the same type and spacing. */
.card{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:32px 36px;max-width:1050px}.card>.page-kicker{margin-bottom:8px}.card>h2{font-family:var(--serif);font-weight:400;font-size:29px}.card>p{font-size:13px;max-width:700px;line-height:1.9;margin:13px 0 27px}.card label{margin:16px 0}.card input,.card select{width:100%;font-size:13px}.card textarea{margin-top:7px;font-size:13px;background:var(--surface)}.card h3{font-size:14px;margin:28px 0 13px}.card pre{white-space:pre-wrap;overflow-wrap:anywhere}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}.form-grid>label:nth-child(3){grid-column:1/-1;grid-row:2}.form-grid>label:nth-child(4){grid-column:1/-1}.card .actionbar button{font-size:13px}.card>details{margin-top:26px}.card>details>summary{font-size:13px;color:var(--muted);cursor:pointer}.banner{border:1px solid var(--line);background:var(--surface);color:var(--muted);border-radius:8px;padding:12px 16px;font-size:13px;line-height:1.8;margin-bottom:22px}.actionbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:18px}.stack{display:grid;gap:12px;margin:20px 0}.list-card{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:18px;overflow-wrap:anywhere;min-width:0}.list-card h3{margin:0 0 8px}.list-card p{margin:5px 0 12px;white-space:pre-wrap;font-size:13px}.list-card button{padding:7px 11px;margin:5px 5px 0 0;font-size:13px;min-height:31px}.list-card small{font-size:13px;color:var(--muted)}.volume-row{display:grid;grid-template-columns:2fr 1fr 1fr;gap:9px;border:1px solid var(--line);padding:14px;border-radius:8px;margin:10px 0;background:var(--surface)}.volume-row textarea{grid-column:1/-1}.inline{display:flex;gap:8px;align-items:center}.inline input{width:auto;margin:0;accent-color:var(--accent)}#memoryForm{border-top:1px solid var(--line);margin-top:25px;padding-top:12px}.service-line{padding:14px 0;border-bottom:1px solid var(--line);font-size:13px}.badge{font-size:13px;color:var(--muted)}.modal-bg{position:fixed;inset:0;background:#28352855;backdrop-filter:blur(5px);display:grid;place-items:center;z-index:60;padding:20px}.modal{width:min(440px,100%);padding:37px;background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:0 25px 80px #1b2c2424}.modal-symbol{color:var(--muted);margin-bottom:20px}.modal-symbol .icon{width:30px;height:30px}.modal h2{font-family:var(--serif);font-weight:400;font-size:27px;margin-top:7px}.modal p{font-size:13px;margin:10px 0 24px}.modal>input{width:100%;margin-top:8px}.modal-actions{display:flex;justify-content:end;gap:10px;margin-top:25px}.modal-actions button{font-size:13px}.modal-actions .icon{width:15px;height:15px}
.zhuque-report{max-width:850px;margin:20px 0}.report-eyebrow{font-size:13px;color:var(--muted);margin-bottom:13px}.report-hero{padding:22px;background:var(--surface);border-radius:9px;border:1px solid var(--line)}.report-label{font-size:13px;color:var(--muted)}.report-number{display:block;font:42px Georgia,serif;margin:7px 0;color:var(--ink)}.report-help{font-size:13px;color:var(--muted);line-height:1.8;margin:9px 0}.report-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}.report-stat{background:var(--surface);border:1px solid var(--line);border-radius:7px;padding:14px;display:flex;flex-direction:column;gap:6px;min-width:0}.report-stat span{font-size:13px;color:var(--muted)}.report-stat b{font:24px Georgia,serif;color:var(--ink)}.report-heading{font-size:14px;margin:21px 0 12px}.segment{background:var(--surface);border:1px solid var(--line);border-left:3px solid var(--line);border-radius:7px;margin:9px 0;padding:12px}.segment-0{border-left-color:#8caa83}.segment-1{border-left-color:#c4a566}.segment-2{border-left-color:#bc8e7c}.segment summary{cursor:pointer;display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:13px}.segment-snippet{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.segment-meta{font-size:13px;color:var(--muted);margin-top:12px}.segment-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.9;color:var(--muted)}.report-raw{font-size:13px;color:var(--muted);margin-top:16px}.report-raw pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:220px;overflow:auto;font-size:13px}
/* Entry page */
.login-wrap{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr}.login-story{position:relative;background:var(--surface);min-height:100dvh;padding:40px 55px;overflow:hidden;display:flex;flex-direction:column}.login-editorial{max-width:440px;margin:auto;padding:70px 0 190px;width:100%;position:relative}.login-editorial h1{font-family:var(--serif);font-size:clamp(34px,4vw,54px);font-weight:400;letter-spacing:.1em;line-height:1.5;margin:20px 0}.login-editorial p{font-size:13px;max-width:290px;color:var(--muted);line-height:2}.paper-art{position:absolute;right:20px;bottom:-60px;width:215px;height:268px;background:var(--surface);border:1px solid var(--line);transform:rotate(9deg);box-shadow:-9px 10px 0 #dfe6d2,0 12px 40px #4e653e12;padding:32px 25px;color:var(--muted)}.paper-art>span{font:23px Georgia,serif;letter-spacing:-1px;color:var(--muted)}.paper-art i{display:block;height:1px;background:var(--surface);margin-top:21px}.paper-art i:nth-last-of-type(1){width:60%}.paper-art small{font-size:13px;position:absolute;bottom:27px;left:25px}.login-footnote{font-size:13px;letter-spacing:.15em;color:var(--muted)}.login-form-wrap{display:flex;justify-content:center;align-items:center;padding:40px;background:var(--surface)}.login-card{width:320px;max-width:100%}.login-symbol{display:block;color:var(--muted);margin-bottom:26px}.login-symbol .icon{width:31px;height:31px}.login-card h2{font:29px var(--serif);margin:10px 0}.login-card p{font-size:13px;color:var(--muted);margin:12px 0 31px}.login-card input{width:100%;margin:9px 0 15px;background:var(--surface)}.login-card .primary{min-height:44px;justify-content:space-between;font-size:13px}.login-card .primary .icon{width:15px;height:15px}.login-private{border-top:1px solid var(--line);padding-top:21px;margin-top:30px;color:var(--muted);font-size:13px;text-align:center}.login-private .icon{width:12px;height:12px;margin-right:4px}.login-card .error{font-size:13px;margin-top:12px}
/* A real writing-only view, not a second editor. */
.focus-exit{position:fixed;bottom:25px;right:28px;z-index:30;background:var(--surface);box-shadow:0 3px 18px #2a381519;font-size:13px}.focus-mode .sidebar,.focus-mode .feedback,.focus-mode .toolbar,.focus-mode .chapter-plan,.focus-mode .export-button,.focus-mode #toggleSidebar{display:none}.focus-mode .app-main{margin-left:0}.focus-mode .topbar{max-width:1050px;margin:auto;border:0;background:transparent}.focus-mode .content{max-width:900px;padding-top:20px}.focus-mode .editor-grid{grid-template-columns:1fr}.focus-mode .writing-heading{margin-bottom:20px}.focus-mode .editor-main #text{min-height:65vh}.focus-mode .topbar h1{max-width:520px}
@media(min-width:1600px){.editor-grid{grid-template-columns:minmax(0,1fr) 320px;gap:32px}.content{padding:42px 48px}.editor-main #text{padding-left:60px;padding-right:60px}.manuscript-meta{padding-left:60px;padding-right:60px}.manuscript-footer{margin-left:60px;margin-right:60px}}
@media(max-width:1200px){.sidebar{width:212px;padding-left:14px;padding-right:14px}.app-main{margin-left:212px}.content{padding:28px 24px}.topbar{padding:17px 24px}.editor-grid{grid-template-columns:minmax(0,1fr) 270px;gap:18px}.editor-main #text{padding-left:24px;padding-right:24px;font-size:16px}.manuscript-meta{padding-left:24px;padding-right:24px}.manuscript-footer{margin-left:24px;margin-right:24px}.toolbar>.text-button{display:none}#saveStatus{max-width:130px}.assistant-heading{padding-left:15px;padding-right:15px}#assistantTools,#assistantResults{padding-left:15px;padding-right:15px}}
@media(max-width:1000px){.sidebar{width:195px}.app-main{margin-left:195px}.editor-grid{grid-template-columns:minmax(0,1fr)}.feedback{position:static;margin-top:8px}.assistant-action-list{display:grid;grid-template-columns:1fr 1fr}.assistant-intro{display:none}.compose-button{max-width:none}.assistant-tabs{gap:30px;justify-content:flex-start}.assistant-tabs button{flex:0 1 160px}.assistant-heading{padding:19px}.selection-actions{max-width:400px}.assistant-details .actionbar button{width:auto}.toolbar{gap:5px}.toolbar label{font-size:0}.top-actions{gap:7px}.card{padding:27px}.form-grid{display:block}}
@media(max-width:760px){.mobile-only{display:inline-flex}.sidebar{width:min(290px,85vw);transform:translateX(-100%);transition:transform .2s ease;box-shadow:none;padding:22px 20px}.sidebar-open .sidebar{transform:translateX(0);box-shadow:10px 0 45px #20301026}.sidebar-backdrop{position:fixed;inset:0;background:#2835285e;border:0;border-radius:0;z-index:34}.sidebar-open{overflow:hidden}.sidebar-brand{margin:0 4px 25px}.app-main{margin-left:0}.topbar{height:73px;padding:12px 16px;gap:9px}.topbar>.icon-button{flex-shrink:0;margin-left:-5px}.topbar h1{font-size:13px;max-width:calc(100vw - 190px)}.breadcrumb{font-size:13px;gap:7px}.top-actions{gap:2px}#saveStatus{display:none}.export-button{padding:8px;min-height:34px}.export-button span{display:none}.export-button .icon{width:16px;height:16px}.content{padding:23px 16px 30px}.writing-heading{gap:10px;margin-bottom:20px}.writing-heading h2{font-size:26px}.page-kicker{font-size:13px}.book-stats{font-size:13px}.toolbar .secondary{font-size:13px;padding:8px 10px;min-height:34px}.toolbar input{width:48px;padding:6px}.toolbar{flex-wrap:nowrap}.chapter-plan summary{padding:12px;gap:9px}.editor-main #text{font-size:16px;line-height:2.1;min-height:480px;padding:12px 22px 22px}.manuscript-meta{padding:20px 22px 8px}.manuscript-footer{margin:0 22px;font-size:13px}.manuscript-footer>span:last-child{max-width:170px;text-align:right}.card{padding:23px 20px}.card>h2{font-size:25px}.card>p{font-size:13px}.card input,.card textarea,.card select{font-size:16px}.volume-row{grid-template-columns:1fr 1fr;padding:10px}.volume-row input:first-child{grid-column:1/-1}.assistant-action-list{grid-template-columns:1fr 1fr}.assistant-action{gap:8px}.assistant-action>.icon:last-child{display:none}.assistant-action small{font-size:13px}.assistant-heading p{font-size:13px}.assistant-tabs button,.assistant-details>summary{font-size:13px}.assistant-action strong{font-size:13px}.call-note{font-size:13px}.tool-label,.tool-section .hint,.assistant-details .hint,.assistant-footnote{font-size:13px}.selection-actions button,.assistant-details .actionbar button{font-size:13px;min-height:38px}.feedback .hint{font-size:13px}.login-wrap{grid-template-columns:1fr}.login-story{min-height:0;padding:24px 27px}.login-editorial{padding:30px 0 20px;margin:0;max-width:none}.login-editorial .page-kicker,.paper-art,.login-footnote{display:none}.login-editorial h1{font-size:27px;line-height:1.5;margin:0}.login-editorial h1 br{display:none}.login-editorial p{font-size:13px;margin:10px 0 0;max-width:none}.login-form-wrap{padding:40px 28px;align-items:flex-start}.login-symbol{display:none}.login-card{width:360px}.login-card input{font-size:16px}.focus-mode .content{padding:20px 12px}.focus-mode .topbar{padding:12px 20px}.focus-mode .topbar h1{max-width:calc(100vw - 90px)}.focus-exit{bottom:16px;right:16px}.modal{padding:27px}.modal>input{font-size:16px}.error{overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* Keep secondary controls readable on ordinary laptop displays. */
.side-label,.page-kicker,.breadcrumb,.book-stats,.chapter-state,.manuscript-meta,.writing-note{font-size:13px}
.workspace-nav button,#bookList .book-item{font-size:13px}.chapter-name{font-size:13px}.private-footer{font-size:13px}.private-footer small{font-size:13px}
.topbar h1{font-size:16px}#saveStatus,.export-button,.toolbar label,.toolbar>.secondary,.toolbar>.text-button{font-size:13px}
.chapter-plan summary,#planPreview{font-size:13px}.manuscript-footer{font-size:13px}
.assistant-heading h2{font-size:14px}.assistant-heading p,.assistant-status,.call-note,.assistant-action small,.tool-label,.tool-section .hint,.assistant-details .hint,.assistant-footnote{font-size:13px}
.assistant-tabs button,.compose-button,.assistant-action strong,.selection-actions button,.assistant-details>summary,.assistant-details .actionbar button{font-size:13px}
.assistant-action{padding:12px 10px;gap:9px}.assistant-footnote{line-height:1.8}.call-note{margin-left:0;margin-right:0}.assistant-heading p,.assistant-action small,.call-note,.tool-section .hint,.assistant-details .hint,.assistant-footnote,#planPreview,.book-stats{color:var(--muted)}
@media(max-width:1200px){.assistant-action>.icon:last-child{display:none}.assistant-heading{gap:7px}.assistant-heading p{font-size:13px}.assistant-status{font-size:13px}.topbar h1{font-size:14px}}
@media(max-width:760px){.topbar h1{font-size:13px}.breadcrumb,.page-kicker,.book-stats{font-size:13px}.toolbar label{font-size:0}.toolbar>.secondary{font-size:13px}.manuscript-footer{font-size:13px}.assistant-action-list{grid-template-columns:1fr}.assistant-action>.icon:last-child{display:block}.chapter-plan summary,#planPreview{font-size:13px}.login-private,.login-card p{font-size:13px}.focus-mode .topbar h1{font-size:13px}}

/* Reduced glare and a saved dark palette; all copy uses readable contrast. */
:root[data-theme="dark"]{color-scheme:dark;--canvas:#191e1c;--paper:#242b27;--sidebar:#202621;--surface:#2c342e;--ink:#e0e5dc;--muted:#b5bfb0;--line:#667260;--accent:#91b8a0;--accent-hover:#a1c8b0;--tint:#35483c;--primary-ink:#17291d;--danger:#f2a595}
body{font-size:15px}button{font-size:14px;min-height:42px}button:disabled{opacity:1;color:var(--muted);background:var(--surface);border-style:dashed}
button:hover{background:var(--tint)}.primary,.primary:hover{color:var(--primary-ink);background:var(--accent)}
input,textarea,select,.editor-main,.card,.modal,.login-form-wrap{background:var(--paper);color:var(--ink)}
input::placeholder,textarea::placeholder,.editor-main #text::placeholder{color:var(--muted)}
.sidebar{background:var(--sidebar)}.topbar,.feedback,.list-card,.chapter-plan,.report-hero,.report-stat,.segment{background:var(--surface)}
.workspace-nav button.selected,.book-item.selected{background:var(--tint);color:var(--ink)}
p,.hint,.card>p,.list-card p,.list-card small,.list-card .badge,.call-note,.report-help{font-size:14px;color:var(--muted);line-height:1.85}
.list-card h3{font-size:16px;line-height:1.7}.task-error h3,.error{color:var(--danger)}.list-card{padding:20px}.list-card button{font-size:14px;margin-top:10px}
label,.workspace-nav button,.assistant-tabs button,.assistant-action strong,.selection-actions button,.assistant-details>summary{font-size:14px;color:var(--ink)}
.assistant-heading p,.assistant-action small,.tool-label,.assistant-footnote,.book-stats,#planPreview,#saveStatus,.manuscript-meta,.manuscript-footer{font-size:13px;color:var(--muted)}
.editor-main #text{font-family:var(--sans);font-size:19px;line-height:2.05;color:var(--ink);letter-spacing:0;caret-color:var(--ink)}
#output,#proposalText,#proposalOriginal{font-size:15px;line-height:1.9;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere}#proposalOriginal{max-height:420px;overflow:auto}#originalDetails summary{cursor:pointer;margin:10px 0;font-size:14px}
.theme-control select{margin:0;font-size:13px;padding:7px 9px;width:auto;min-height:38px}.rewrite-button{background:var(--tint);border-color:var(--accent);font-size:14px;font-weight:600}.rewrite-tools .selection-actions{margin-top:14px}
.report-stat span,.report-eyebrow,.report-label,.segment-meta,.segment-snippet,.report-raw{color:var(--muted);font-size:14px}.segment-body{color:var(--ink);font-size:15px}.report-number,.report-stat b{color:var(--ink)}
@media(max-width:760px){.topbar{height:auto;min-height:76px;flex-wrap:wrap;gap:8px}.book-heading{flex:1}.topbar h1{font-size:14px;max-width:calc(100vw - 75px)}.top-actions{width:100%;justify-content:flex-end;gap:6px}.theme-control{margin-right:auto}.content{padding:20px 12px}.card{padding:20px 16px}.writing-heading{flex-wrap:wrap}.toolbar label{font-size:13px}.editor-main #text{font-size:18px;padding:15px 18px}.assistant-status{display:none}.manuscript-footer{font-size:13px;align-items:flex-start}.report-stats{grid-template-columns:1fr}.list-card{padding:16px}.topbar #saveStatus{display:block;max-width:140px;font-size:12px}}
.list-card{overflow-wrap:anywhere}
@media(max-height:800px){.sidebar{overflow-y:auto}.chapters{min-height:100px;flex-shrink:0}.side-bottom{margin-top:14px}.sidebar-brand{margin-bottom:16px}}

.fullbook-tools .selection-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}.fullbook-tools label{min-width:0;font-size:13px}.fullbook-tools input{width:100%;min-width:0;margin-top:6px;font-size:16px}.fullbook-tools .primary{margin-top:8px}#fullbookStatus:empty{display:none}

.chapter-choice{display:flex;align-items:center;gap:12px;cursor:pointer}.chapter-choice input{width:20px;height:20px;flex:none}#manageChapters{margin-bottom:8px}#panel-chapters .actionbar{flex-wrap:wrap}#panel-chapters .actionbar input{width:95px}#chapterManageList{margin-top:18px}.danger{color:var(--text);border:1px solid #a96557;background:var(--surface)}#impactBanner button{margin:4px 8px 4px 0}#evidenceList{overflow-wrap:anywhere}
