#writerWriteWork.book-chapter-overview-active>:not(#bookChapterWorkspace){display:none!important}
.book-chapter-workspace,.book-chapter-overview,.book-chapter-editor{display:grid;gap:16px}.book-chapter-overview[hidden],.book-chapter-editor[hidden],.book-chapter-workspace[hidden]{display:none!important}.book-chapter-overview-head,.book-chapter-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.book-chapter-overview-head h3{margin:.2rem 0 0}.book-chapter-overview-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}.book-chapter-card{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:start;gap:12px;min-width:0;padding:14px;border:2px solid #34485f;border-radius:14px;background:#111c29;color:#fff;text-align:left}.book-chapter-card:hover,.book-chapter-card:focus-visible{border-color:#ffb703;transform:translateY(-1px)}.book-chapter-card.dirty{border-color:#d68a32}.book-chapter-number{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#20334a;color:#ffd477;font-size:1.15rem;font-weight:900}.book-chapter-card>span:last-child{display:grid;gap:5px;min-width:0}.book-chapter-card b{overflow:hidden;font-size:1rem;text-overflow:ellipsis;white-space:nowrap}.book-chapter-card small{color:#b9c5d3;font-size:.82rem}.book-chapter-card em{color:#72dba2;font-size:.78rem;font-style:normal;font-weight:800}.book-chapter-special-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.book-chapter-special-grid button{display:grid;gap:4px;min-width:0;padding:13px;border:1px solid #465b73;border-radius:12px;background:#152334;color:#fff;text-align:left}.book-chapter-special-grid small{color:#b9c5d3}.book-chapter-editor>label{display:grid;gap:7px;font-weight:800}.book-chapter-editor input,.book-chapter-editor textarea,.book-chapter-editor select{width:100%}.book-chapter-editor textarea{min-height:50vh;line-height:1.6}.book-chapter-stats{color:#b9c5d3;font-weight:750}.book-chapter-illustrations{display:grid;gap:14px}.book-chapter-illustrations-head h3{margin:.2rem 0}.book-chapter-illustrations-head p{margin:.35rem 0 0;color:#b9c5d3}.book-chapter-illustration-card{display:grid;grid-template-columns:minmax(150px,240px) minmax(0,1fr);gap:16px;padding:14px;border:2px solid #9b6a2d;border-radius:16px;background:#171d28}.book-chapter-illustration-card.complete{border-color:#3a9d6c}.book-chapter-illustration-preview{display:grid;place-items:center;min-height:190px;border:1px dashed #687b91;border-radius:12px;background:#080f18;color:#9dadbf;text-align:center;overflow:hidden}.book-chapter-illustration-preview img{width:100%;height:100%;max-height:300px;object-fit:contain}.book-chapter-illustration-body{display:grid;align-content:start;gap:10px;min-width:0}.book-chapter-illustration-body>b{font-size:1.05rem}.book-chapter-illustration-body code{overflow:hidden;color:#ffd477;text-overflow:ellipsis;white-space:nowrap}.book-chapter-illustration-body label{display:grid;gap:5px}.book-chapter-illustration-body textarea{min-height:100px}.book-chapter-illustration-actions,.book-chapter-editor-actions{display:flex;flex-wrap:wrap;gap:9px}.book-chapter-illustration-actions button,.book-chapter-editor-actions button{flex:1 1 180px}.book-chapter-no-illustration{display:grid;gap:5px;padding:15px;border:1px dashed #52677f;border-radius:12px;color:#b9c5d3}.book-chapter-no-illustration b{color:#fff}.book-chapter-editor-status.dirty,#bookChapterEditorStatus.dirty{border-color:#d68a32;color:#ffd477}.book-chapter-overview>.wide{min-height:52px}
@media(max-width:760px){.book-chapter-special-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.book-chapter-illustration-card{grid-template-columns:1fr}.book-chapter-illustration-preview{min-height:160px}.book-chapter-editor textarea{min-height:45vh}}
@media(max-width:480px){.book-chapter-overview-grid,.book-chapter-special-grid{grid-template-columns:1fr}.book-chapter-editor-head{align-items:stretch;flex-direction:column}.book-chapter-card{grid-template-columns:42px minmax(0,1fr);padding:11px}.book-chapter-number{width:38px;height:38px}.book-chapter-illustration-actions,.book-chapter-editor-actions{display:grid;grid-template-columns:1fr}.book-chapter-illustration-actions button,.book-chapter-editor-actions button{width:100%}}
/* Book workbench: existing editor and controls share one responsive workspace. */
.book-workbench{gap:18px;min-width:0}.book-workbench-header{display:flex;align-items:center;justify-content:space-between;gap:16px}.book-workbench-header h3{margin:4px 0;font-size:1.5rem;overflow-wrap:anywhere}.book-workbench-nav{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:14px;border-bottom:1px solid #40526a}.book-workbench button{min-height:44px;font-size:.9rem}.book-workbench-nav button{background:#172435;border:1px solid #40526a;color:#e8eff7;padding:10px 14px;border-radius:10px}.book-workbench-nav button[aria-pressed=true]{border-color:#ffd477;background:#26374b;color:#ffd477}.book-workbench-panes{display:grid;grid-template-columns:minmax(200px,260px) minmax(0,1fr);align-items:start;gap:22px;min-width:0}.book-workbench[data-pane=manuscript] .book-workbench-panes{grid-template-columns:minmax(0,1fr)}.book-workbench-tools{grid-column:1;grid-row:1;padding:16px;border:1px solid #40526a;background:#101925;border-radius:14px;min-width:0}.book-workbench .book-chapter-editor{grid-column:2;grid-row:1;min-width:0}.book-workbench[data-pane=manuscript] .book-chapter-editor{grid-column:1}.book-workbench .book-chapter-overview{grid-column:1;grid-row:1;min-width:0}.book-workbench .book-chapter-overview-grid{grid-template-columns:minmax(0,1fr);gap:8px}.book-workbench .book-chapter-card{grid-template-columns:32px minmax(0,1fr);gap:8px;padding:10px}.book-workbench .book-chapter-number{width:30px;height:32px;font-size:1rem}.book-workbench .book-chapter-card b{white-space:normal}.book-workbench .book-chapter-card[aria-current=true]{border-color:#ffd477;background:#26374b}.book-workbench .book-chapter-card em,.book-workbench .book-chapter-card small{font-size:.875rem}.book-workbench .book-chapter-editor>label{font-weight:600}.book-workbench #bookChapterText{font-family:Georgia,serif;background:#fffdf8;color:#24303d;border:1px solid #d9d2c7;border-radius:8px;padding:clamp(18px,3vw,42px);font-size:1.125rem;line-height:1.8;min-height:65vh;resize:vertical;box-sizing:border-box}.book-workbench-tools[hidden]{display:none!important}.book-workbench-tools-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:14px}.book-workbench-tools-head h4{margin:0;font-size:1rem}.book-workbench-tools-head button{font-size:.875rem}.book-workbench #bookWorkbenchToolBody{display:grid;gap:10px}.book-workbench #bookWorkbenchToolBody button{text-align:left;white-space:normal}.book-workbench-illustrations>summary{padding:14px;cursor:pointer}.book-workbench-illustrations[open]{padding-bottom:14px}.book-workbench .book-chapter-editor-actions{position:sticky;bottom:8px;background:#101925;padding:10px;border:1px solid #40526a;border-radius:12px;z-index:3}.book-workbench-focus .book-workbench-nav,.book-workbench-focus .book-chapter-overview,.book-workbench-focus .book-workbench-tools{display:none!important}.book-workbench-focus .book-workbench-panes{grid-template-columns:minmax(0,1fr)!important}.book-workbench-focus .book-chapter-editor{grid-column:1!important}#bookWrite>.section-head{display:none}.book-workbench [hidden]{display:none!important}
@media(min-width:1200px){.book-workbench[data-pane]:not([data-pane=chapters]):not([data-pane=manuscript]) .book-workbench-panes{grid-template-columns:minmax(0,1fr) minmax(240px,300px)}.book-workbench[data-pane]:not([data-pane=chapters]):not([data-pane=manuscript]) .book-chapter-editor{grid-column:1}.book-workbench-tools{grid-column:2}}
@media(max-width:1000px){.book-workbench-panes{grid-template-columns:210px minmax(0,1fr);gap:14px}.book-workbench #bookChapterText{padding:20px}}
@media(max-width:700px){.book-workbench-panes{display:flex;flex-direction:column}.book-workbench .book-chapter-editor,.book-workbench .book-chapter-overview,.book-workbench-tools{width:100%;box-sizing:border-box}.book-workbench[data-pane]:not([data-pane=manuscript]) .book-chapter-editor{display:none}.book-workbench-focus .book-chapter-editor{display:grid!important}.book-workbench-header{align-items:flex-start;flex-direction:column}.book-workbench-header .button-row{width:100%}.book-workbench-nav{gap:6px}.book-workbench-nav button{flex:1 1 125px}.book-workbench .book-chapter-editor-head{flex-direction:row;flex-wrap:wrap}.book-workbench .book-chapter-editor-actions{display:flex;flex-wrap:wrap}.book-workbench .book-chapter-editor-actions button{flex:1 1 150px}.book-workbench #bookChapterText{padding:16px;min-height:60vh;font-size:1rem}.book-workbench .book-chapter-overview-grid{grid-template-columns:minmax(0,1fr)}}
