:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;color:#e8ecf7;background:#080b14;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:#080b14}button,input,textarea{font:inherit}button{cursor:pointer}.app{display:flex;min-height:100vh}.sidebar{width:245px;background:#0d1220;border-right:1px solid #20283a;padding:22px 14px;display:flex;flex-direction:column;gap:8px}.brand{display:flex;align-items:center;gap:10px;padding:6px 8px 25px}.brand b{display:block;font-size:14px}.brand small,.aiHead small{display:block;color:#737f98;font-size:9px;letter-spacing:1.5px;margin-top:3px}.mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#9c7cff,#5d4dff);display:grid;place-items:center;font-weight:900}.nav{border:0;background:transparent;color:#9ba6bc;text-align:left;padding:11px 12px;border-radius:9px}.nav:hover,.nav.active{background:#171e30;color:#fff}.sidebottom{margin-top:auto;display:grid;gap:8px}.import{border:1px dashed #34405a;padding:11px;border-radius:9px;color:#b6c0d5;font-size:12px;text-align:center;cursor:pointer}.import input{display:none}main{flex:1;min-width:0}header{height:76px;border-bottom:1px solid #20283a;display:flex;justify-content:space-between;align-items:center;padding:0 26px;background:#0b0f1a}.eyebrow{font-size:9px;letter-spacing:2px;color:#7d89a4;font-weight:800}.titleInput{display:block;background:none;border:0;color:#fff;font-size:20px;font-weight:700;outline:none;margin-top:3px}.headerActions{display:flex;align-items:center;gap:8px}.headerActions button,.readerBar button{background:#141b2b;border:1px solid #2a344b;color:#dce3f1;border-radius:7px;padding:8px 12px;font-size:12px}.primary{background:#7557ff!important;border-color:#8a73ff!important;color:#fff!important}.save{font-size:10px;color:#68748e;margin-right:5px}.workspace{display:grid;grid-template-columns:245px minmax(420px,1fr) 310px;height:calc(100vh - 76px)}.outline{border-right:1px solid #20283a;background:#0b0f19;padding:15px;overflow:auto}.panelHead,.editorTop,.aiHead{display:flex;justify-content:space-between;align-items:center}.panelHead{color:#8290aa;font-size:10px;letter-spacing:1.5px;margin-bottom:15px}.panelHead button{border:0;background:none;color:#917bff}.part>input{width:100%;background:none;border:0;color:#dce2ee;font-weight:700;padding:8px 5px}.chapter{display:flex;justify-content:space-between;width:100%;background:none;border:0;color:#8590a7;padding:9px 8px;border-radius:7px;text-align:left;font-size:12px}.chapter small{color:#505c75}.chapter.selected{background:#171e31;color:#fff}.addChapter{margin-top:10px;width:100%;border:1px dashed #34405a;background:none;color:#8490a8;border-radius:7px;padding:9px}.editor{display:flex;flex-direction:column;min-width:0;background:#f7f5ef;color:#20242c}.editorTop{padding:16px 28px;border-bottom:1px solid #dedbd2;background:#f3f0e8}.editorTop input{background:none;border:0;outline:0;font:700 24px Georgia;color:#24272e}.editorTop span{font-size:10px;color:#7c7b77}.toolbar{display:flex;gap:18px;padding:10px 28px;border-bottom:1px solid #e0ddd5;color:#6f6d69;font-size:11px;background:#faf8f2}.manuscript{flex:1;resize:none;border:0;outline:0;background:#fbfaf6;color:#25272b;padding:34px max(7vw,42px);font:17px/1.72 Georgia,serif;text-align:justify;white-space:pre-wrap}.editorFoot{padding:9px 20px;border-top:1px solid #ddd9d0;color:#7b7973;font-size:10px;display:flex;justify-content:space-between}.aiPanel{background:#0d1220;border-left:1px solid #20283a;padding:18px;overflow:auto}.aiHead{color:#fff;font-size:11px;letter-spacing:1.3px}.spark{color:#a486ff;font-size:20px}.aiActions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:18px 0}.aiActions button{background:#151d2f;border:1px solid #29344a;color:#cbd3e3;padding:9px;border-radius:7px;font-size:11px}.aiResult{border:1px solid #273249;border-radius:9px;padding:13px;color:#aeb8ca;font:12px/1.6 Inter;white-space:pre-wrap;min-height:240px}.loading{color:#9e8cff}.page{padding:48px max(6vw,38px);max-width:1100px}.hero{max-width:760px;margin-bottom:35px}.hero h1{font-size:42px;line-height:1.05;margin:10px 0 13px;letter-spacing:-1.5px}.hero p{color:#8490a7;line-height:1.7}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.card{background:#101725;border:1px solid #222d42;border-radius:12px;padding:16px}.card label{display:block;color:#9aa5bb;font-size:10px;text-transform:uppercase;letter-spacing:1.4px;margin-bottom:9px}.card input,.card textarea{width:100%;background:#0a0f1b;border:1px solid #273249;color:#fff;border-radius:7px;padding:9px;outline:none}.card textarea{min-height:130px;resize:vertical}.card small{display:block;color:#5f6b83;font-size:10px;margin-top:8px}.wide{margin-top:12px}.big{margin-top:15px;padding:12px 18px;border-radius:8px;border:0}.designGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.designItem{background:#101725;border:1px solid #222d42;padding:15px;border-radius:9px;color:#c5cede}.designItem span{color:#9d85ff;margin-right:10px}.previewBook{display:grid;grid-template-columns:250px 1fr;gap:20px;margin-top:30px}.cover{height:340px;background:linear-gradient(145deg,#151c35,#3b2d67);border:1px solid #6655a6;padding:28px;display:flex;flex-direction:column;justify-content:center}.cover span{font-size:9px;letter-spacing:3px}.cover strong{font:700 32px/1.05 Georgia;margin:14px 0}.cover small{color:#b9b2d7}.paper{background:#f9f7f0;color:#26272a;padding:40px;font:15px/1.7 Georgia;min-height:340px}.reader{background:#1b1e25;min-height:calc(100vh - 76px);overflow:auto}.readerBar{position:sticky;top:0;background:#0d1220;padding:12px 22px;display:flex;justify-content:space-between;color:#8f9ab0;font-size:11px;z-index:2}.reader article{max-width:720px;margin:30px auto;background:#fbfaf6;color:#25272b;padding:75px 78px;font:16px/1.75 Georgia;min-height:100vh}.front{text-align:center;min-height:620px;display:flex;flex-direction:column;justify-content:center;align-items:center}.front h1{font-size:45px;line-height:1.05;margin:20px 0}.front h3{font-weight:400;color:#6e6d69}.readerChapter{margin-top:50px}.readerChapter h3{font-size:27px}.toast{position:fixed;bottom:22px;right:22px;background:#171f31;border:1px solid #39465f;color:#fff;padding:12px 15px;border-radius:9px;font-size:12px;box-shadow:0 10px 30px #0008}@media(max-width:1100px){.workspace{grid-template-columns:210px 1fr}.aiPanel{display:none}.cards{grid-template-columns:1fr 1fr}}@media(max-width:760px){.sidebar{width:65px;padding:12px 7px}.brand div,.nav:not(.active),.sidebottom .nav,.import{font-size:0}.brand{padding:6px 0 18px}.workspace{grid-template-columns:1fr}.outline{display:none}.headerActions .save,.headerActions button:not(.primary){display:none}.hero h1{font-size:34px}.cards,.designGrid,.previewBook{grid-template-columns:1fr}.editorTop,.toolbar{padding-left:16px;padding-right:16px}.manuscript{padding:28px 20px}.reader article{padding:45px 25px}.front{min-height:500px}.front h1{font-size:34px}}.reader{background:#171a21;min-height:calc(100vh - 76px);overflow:auto;padding-bottom:70px}.readerBar{position:sticky;top:0;background:#0a0e18f5;backdrop-filter:blur(10px);padding:12px 22px;display:flex;align-items:center;justify-content:space-between;gap:14px;color:#9aa6bd;font-size:11px;border-bottom:1px solid #242d40;z-index:5}.bookStack{display:flex;flex-direction:column;align-items:center;gap:28px;padding:34px 20px}.bookPage{position:relative;width:min(148mm,calc(100vw - 60px));aspect-ratio:148/210;background:#fcfaf4;color:#25262a;box-shadow:0 18px 50px #00000057;overflow:hidden;padding:20mm 18mm 18mm;font-family:Georgia,Times New Roman,serif}.titlePage{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24mm 18mm}.titleBrand{font-family:Inter,ui-sans-serif,sans-serif;font-size:9px;letter-spacing:3px;font-weight:800;color:#64708a}.titleRule{width:38px;height:1px;background:#8c76e8;margin:18px 0 24px}.titlePage h1{max-width:100%;margin:0;font-size:clamp(28px,5vw,43px);line-height:1.04;letter-spacing:-.5px;overflow-wrap:anywhere;hyphens:auto}.titlePage h2{max-width:92%;font-size:15px;line-height:1.45;font-weight:400;color:#66655f;margin:18px 0 34px}.titleByline{font-size:13px}.titleFooter{position:absolute;bottom:12mm;font-family:Inter,ui-sans-serif,sans-serif;font-size:7px;letter-spacing:1.5px;color:#8a8881}.frontMatter{padding:26mm 20mm}.frontMatter h2{font-size:24px;text-align:center;margin:22mm 0 12mm}.frontMatter p{font-size:10.5px;line-height:1.65;max-width:105mm;margin:0 auto 10px}.frontSpacer{height:16mm}.colophon{position:absolute!important;bottom:16mm;left:20mm;right:20mm;text-align:center;color:#88857e!important;font-size:8px!important}.tocPage h2{text-align:left;margin:0 0 18mm;font-size:25px}.tocPart{margin-bottom:12px}.tocPart strong{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;margin-bottom:5px}.tocRow{display:flex;gap:8px;justify-content:space-between;font-size:10px;line-height:1.7;padding-left:8px;color:#55544f}.tocRow span:nth-child(2){color:#b1ada3}.chapterOpen{padding-top:34mm}.chapterNumber,.chapterKicker{font-family:Inter,ui-sans-serif,sans-serif;font-size:8px;font-weight:800;letter-spacing:2.2px;color:#7a72a1;text-align:center}.chapterOpen h2{font-size:29px;line-height:1.12;text-align:center;margin:13px auto 25mm;max-width:92%;overflow-wrap:anywhere;hyphens:auto}.textPage{padding-top:18mm}.chapterOpenBody{padding-top:31mm}.chapterOpenBody h2{font-size:25px;line-height:1.12;margin:10px 0 18mm;overflow-wrap:anywhere;hyphens:auto}.runningHead{position:absolute;top:9mm;left:18mm;right:18mm;display:flex;justify-content:space-between;border-bottom:1px solid #e5e0d6;padding-bottom:5px;font-family:Inter,ui-sans-serif,sans-serif;font-size:6.5px;letter-spacing:1px;text-transform:uppercase;color:#99948a}.bookBody{font-size:10.5px;line-height:1.58;text-align:justify;hyphens:auto}.bookBody p{margin:0 0 3.8mm;orphans:3;widows:3}.bookBody p:not(.firstParagraph){text-indent:5mm}.bookBody .firstParagraph{text-indent:0}.folio,.dropFolio{position:absolute;bottom:8mm;font-family:Inter,ui-sans-serif,sans-serif;font-size:7.5px;color:#77736b}.folio{right:18mm}.dropFolio{left:50%;transform:translate(-50%)}.chapterOpenBody .folio{right:18mm}@media(max-width:760px){.readerBar{padding:10px 12px;font-size:9px}.bookStack{padding:20px 10px;gap:18px}.bookPage{width:calc(100vw - 24px);padding:17mm 14mm 15mm}.titlePage{padding:20mm 14mm}.titlePage h1{font-size:31px}.titlePage h2{font-size:12px}.frontMatter{padding:20mm 15mm}.bookBody{font-size:9.7px;line-height:1.52}.runningHead{left:14mm;right:14mm}.folio{right:14mm}}.bookPage.recto .runningHead{padding-right:0}.bookPage.verso .runningHead{padding-left:0}.bookPage.recto .folio{right:18mm}.bookPage.verso .folio{left:18mm;right:auto}.chapterOpen .bookBody{max-height:122mm;overflow:hidden}.previewMode{height:100vh;min-height:100vh;overflow:hidden}.previewMode .sidebar{height:100vh;position:sticky;top:0}.previewMode main{height:100vh;min-height:0;overflow:hidden;display:flex;flex-direction:column}.previewMode .reader{flex:1;min-height:0;height:auto;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}.previewMode .readerBar{flex:0 0 auto}.previewMode .bookStack{min-height:max-content}.titlePage h1{font-size:clamp(24px,4.2vw,40px);overflow-wrap:anywhere;word-break:normal;hyphens:auto}.tocRow span:last-child{min-width:18px;text-align:right;font-variant-numeric:tabular-nums}
