:root{--ink:#2d252b;--muted:#74686e;--line:#e9e1e3;--canvas:#f8f6f4;--paper:#fffcf7;--accent:#842f47;--deep:#6c2539;--rose:#f7edf0;--serif:"Songti SC","Noto Serif CJK SC","STSong",Georgia,serif;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--canvas);color-scheme:light}
*{box-sizing:border-box}body{margin:0;min-width:340px;font-size:14px;line-height:1.55}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer}button[disabled]{opacity:.4;cursor:default}a{color:inherit;text-decoration:none}h1,h2,p{margin:0}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #a94862;outline-offset:3px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}svg{display:block;flex:none}.brand{display:flex;gap:11px;align-items:center}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;color:#fae2d7;background:#733348}.brand strong{display:block;font:700 19px Georgia,serif;letter-spacing:.1em}.brand small{display:block;font-size:10px;color:var(--muted);margin-top:1px}.environment{border:1px solid var(--line);border-radius:20px;padding:4px 12px;color:var(--muted);font-size:12px}.button,.icon-button{display:inline-flex;justify-content:center;align-items:center;gap:7px;border:1px solid #e4dadd;border-radius:7px;min-height:40px;padding:0 15px;background:#fff;font-size:13px;font-weight:600;white-space:nowrap;transition:background .15s,border-color .15s}.button:hover,.icon-button:hover{background:#fbf5f7;border-color:#d6b6c1}.button.primary{background:var(--accent);border-color:var(--accent);color:#fff}.button.primary:hover{background:var(--deep)}.button.quiet{background:transparent;border-color:transparent}.button.compact{min-height:33px;padding:0 12px;font-size:12px}.icon-button{min-height:31px;width:31px;padding:0;background:transparent;border-color:transparent}.home-header{height:76px;padding:0 max(32px,calc((100% - 1140px)/2));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#fffdfb}.library{max-width:1140px;margin:0 auto;padding:55px 0 35px}.library-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:35px}.eyebrow{color:var(--accent);font:600 10px "SFMono-Regular",Consolas,monospace;letter-spacing:.18em;margin-bottom:9px}h1{font-size:34px;font-weight:650;letter-spacing:-.03em}.intro{color:var(--muted);margin-top:7px}.continue-work{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:25px 28px;background:#f6ecef;border:1px solid #ead6dd;border-radius:12px;margin-bottom:35px}.continue-copy{min-width:0}.continue-copy p{font-size:11px;color:var(--accent);margin-bottom:5px}.continue-copy h2{font-family:var(--serif);font-size:25px;overflow-wrap:anywhere}.continue-copy small{display:block;color:var(--muted);margin-top:6px}.library-toolbar{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:20px 0 15px}.library-toolbar h2{font-size:14px;font-weight:600}.library-toolbar h2 span{font-size:11px;color:var(--muted);margin-left:7px}.search-field{display:flex;gap:8px;align-items:center;border:1px solid var(--line);border-radius:7px;padding:7px 11px;color:var(--muted);background:#fff}.search-field input{border:0;outline:none;background:transparent;width:180px;font-size:12px}.work-row{width:100%;display:grid;grid-template-columns:minmax(0,1fr) 80px 90px 150px 55px;gap:20px;align-items:center;text-align:left;padding:22px 21px;border:1px solid var(--line);background:#fffdfb;border-radius:9px;margin:10px 0}.work-row:hover{border-color:#cdb1bc;background:#fff}.work-row .work-name{font-family:var(--serif);font-size:22px;font-weight:600;overflow-wrap:anywhere}.work-row small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.work-row .work-meta{font-size:12px;color:var(--muted)}.work-row .open-label{display:flex;gap:4px;align-items:center;color:var(--accent);font-size:12px}.empty{background:#fffdfb;border:1px solid var(--line);border-radius:12px;text-align:center;padding:75px 24px}.empty h2{font-family:var(--serif);font-size:27px;margin-bottom:12px}.empty p{color:var(--muted);margin-bottom:24px}.library-foot{color:var(--muted);font-size:11px;margin-top:25px}.writing-header{min-height:67px;display:flex;align-items:center;gap:18px;padding:12px 25px;background:#fffdfb;border-bottom:1px solid var(--line)}.back svg{transform:rotate(180deg)}.back{padding-left:0!important}.title-wrap{min-width:0;flex:1;display:flex;gap:12px;align-items:center}.title-wrap input{font-weight:650;font-size:16px;min-width:100px;width:clamp(160px,30vw,480px);border:1px solid transparent;border-radius:5px;padding:5px 7px;background:transparent;text-overflow:ellipsis}.title-wrap input:hover{border-color:var(--line)}.title-wrap input:focus{background:#fff}.draft-label{font-size:10px;border:1px solid var(--line);padding:2px 6px;color:var(--muted);border-radius:4px;white-space:nowrap}.header-actions{display:flex;align-items:center;gap:10px}.save-status{color:#496651;font-size:11px;min-width:105px;text-align:right;white-space:nowrap}.save-status.pending{color:#84714a}.save-status.error{color:#a03636}.workbench{display:grid;grid-template-columns:248px minmax(0,1fr);height:calc(100dvh - 67px);min-height:560px}.outline{padding:27px 14px 15px;border-right:1px solid var(--line);background:#fdfbf9;display:flex;flex-direction:column;overflow:auto;min-height:0}.outline-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:0 9px 17px}.outline-heading h2{font-size:13px;font-weight:650}.outline-heading span{font-size:11px;color:var(--muted)}.scene-list{display:grid;gap:5px}.scene-button{display:grid;grid-template-columns:25px minmax(0,1fr) 12px;gap:8px;align-items:center;width:100%;border:1px solid transparent;border-radius:8px;background:transparent;text-align:left;min-height:64px;padding:10px 9px}.scene-button:hover{background:#f8f1f3}.scene-button[aria-current=true]{background:#f5e8ed;border-color:#ead3dd}.scene-number{font:11px "SFMono-Regular",Consolas,monospace;color:var(--muted)}.scene-copy{min-width:0}.scene-copy strong,.scene-copy small{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.scene-copy strong{font-size:13px;font-weight:600}.scene-copy small{font-size:10px;color:var(--muted);margin-top:4px}.scene-dirty{font-size:10px;color:var(--accent)}.new-scene{display:flex;align-items:center;justify-content:center;gap:6px;min-height:39px;margin:16px 4px;background:transparent;border:1px dashed #d7bdc6;border-radius:7px;color:var(--deep);font-size:12px;flex:none}.new-scene:hover{background:var(--rose)}.outline-foot{margin-top:auto;display:flex;gap:9px;align-items:flex-start;padding:28px 8px 3px;color:#887a80;font-size:10px}.outline-foot svg{margin-top:3px}.writing-area{min-width:0;display:flex;flex-direction:column;min-height:0;background:#f4f1ee}.editor-toolbar{min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 25px;border-bottom:1px solid var(--line);background:#faf8f6}.view-switch{display:flex;gap:5px}.view-switch button{border:0;background:transparent;padding:6px 13px;font-size:12px;border-radius:6px;color:var(--muted)}.view-switch button[aria-pressed=true]{background:#fff;border:1px solid var(--line);color:var(--deep);font-weight:600}.scene-tools{display:flex;gap:5px;align-items:center}.up svg{transform:rotate(-90deg)}.down svg{transform:rotate(90deg)}.paper-wrap{flex:1;min-height:0;overflow:auto;padding:25px 34px 0;display:flex;flex-direction:column;align-items:center}.paper{width:100%;max-width:880px;flex:1;display:flex;flex-direction:column;padding:32px clamp(24px,5vw,80px) 20px;background:var(--paper);border:1px solid #e7dfd6;border-bottom:0;border-radius:7px 7px 0 0;box-shadow:0 3px 20px #39273104;min-height:350px}.paper-label{font:600 10px "SFMono-Regular",Consolas,monospace;color:var(--accent);letter-spacing:.17em;margin-bottom:12px}.scene-title,.scene-setting,.scene-body{background:transparent;border:0;border-radius:3px;padding:0;width:100%;display:block}.scene-title{font-family:var(--serif);font-weight:650;font-size:31px;line-height:1.6}.scene-setting{font-size:12px;color:var(--muted);margin:3px 0 24px;padding-bottom:17px;border-bottom:1px solid #eadfd7;border-radius:0}.scene-body{flex:1;resize:none;min-height:220px;font-family:var(--serif);font-size:17px;line-height:1.9;tab-size:4}.scene-body:focus-visible{outline:none}.scene-body::placeholder{font-family:var(--serif);color:#a49992}.scene-title::placeholder,.scene-setting::placeholder{color:#a49992}.editor-footer{min-height:38px;display:flex;align-items:center;gap:20px;padding:0 34px;color:var(--muted);font-size:10px}.editor-footer #word-count{margin-left:auto}.reading-paper{background:var(--paper);border:1px solid #e7dfd6;border-radius:7px;max-width:880px;width:100%;padding:45px clamp(24px,5vw,80px);margin-bottom:25px}.reading-paper h1{font-family:var(--serif);font-size:32px;margin-bottom:40px;overflow-wrap:anywhere}.read-scene{padding:22px 0 35px;border-top:1px solid #eadfd7}.read-scene h2{font-family:var(--serif);font-size:24px;overflow-wrap:anywhere}.read-scene .read-setting{color:var(--muted);font-size:12px;margin:8px 0 22px}.read-scene .read-body{font-family:var(--serif);font-size:17px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}.read-scene .text-button{margin-top:20px}.text-button{border:0;padding:3px 0;background:transparent;color:var(--accent);font-size:12px;text-decoration:underline;text-underline-offset:4px}.workbench.focus{grid-template-columns:minmax(0,1fr)}.workbench.focus .outline{display:none}.notice{display:flex;justify-content:space-between;align-items:center;gap:15px;background:#faf1dd;border-bottom:1px solid #e8dbbc;padding:11px 25px;font-size:12px;color:#73551e}.notice.error{background:#faeded;color:#963c3c;border-color:#eed7d7}.notice .notice-actions{display:flex;gap:12px;flex:none}.notice .text-button{color:inherit}.loading{display:flex;align-items:center;justify-content:center;min-height:65vh;color:var(--muted)}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:11px 20px;border:1px solid #e0d2d8;border-radius:8px;background:#fffdfb;box-shadow:0 7px 24px #35252d12;font-size:12px;z-index:10;max-width:90vw}.toast button{margin-left:15px}.notice:not([hidden]) + .workbench{height:calc(100dvh - 119px)}dialog{width:min(620px,calc(100% - 32px));max-height:90dvh;overflow:auto;background:#fffdfb;border:1px solid #ded0d6;border-radius:12px;padding:28px;box-shadow:0 22px 100px #32242c25}dialog.wide{width:min(1000px,calc(100% - 32px))}dialog::backdrop{background:#2b20263b}dialog h2{font-size:21px;margin-bottom:12px}dialog p{font-size:13px;color:var(--muted);line-height:1.7}dialog .dialog-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:25px}.compare{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.compare label{font-size:12px;font-weight:600}.compare textarea{display:block;width:100%;height:290px;resize:vertical;border:1px solid var(--line);border-radius:7px;background:var(--paper);padding:12px;font:14px/1.8 var(--serif);margin-top:8px}.dialog-error{color:#a03636!important;margin-top:12px}.mobile-hint{display:none}
@media(min-width:1500px){.workbench{grid-template-columns:270px minmax(0,1fr)}.paper{max-width:950px}.paper-wrap{padding-top:32px}}
@media(max-width:1200px){.library{padding:40px 32px}.writing-header{padding:11px 18px;gap:10px}.title-wrap input{width:clamp(130px,26vw,370px)}.draft-label{display:none}.workbench{grid-template-columns:215px minmax(0,1fr)}.paper-wrap{padding:20px 20px 0}.paper{padding:25px 35px 18px}}
@media(max-width:760px){.home-header{padding:0 20px;height:65px}.library{padding:30px 20px}.library-heading{margin-bottom:25px}h1{font-size:29px}.continue-work{padding:20px;gap:10px}.continue-copy h2{font-size:22px}.continue-copy small{font-size:10px}.continue-work .button{padding:0 11px;font-size:12px}.search-field input{width:115px}.work-row{grid-template-columns:minmax(0,1fr) 65px;gap:8px;padding:17px}.work-row .work-meta{display:none}.work-row .work-name{font-size:21px}.empty{padding:55px 15px}.writing-header{flex-wrap:wrap;min-height:99px;padding:8px 14px;gap:4px 10px}.title-wrap input{width:100%;font-size:15px}.header-actions{width:100%;justify-content:flex-end}.save-status{margin-right:auto;text-align:left}.back{min-height:32px}.workbench{height:calc(100dvh - 99px);grid-template-columns:160px minmax(0,1fr);min-height:500px}.outline{padding:19px 7px 10px}.outline-heading{padding-left:5px}.scene-button{grid-template-columns:20px minmax(0,1fr);gap:5px;padding:8px 5px;min-height:56px}.scene-dirty{display:none}.scene-copy strong{font-size:12px}.scene-copy small{font-size:9px}.outline-foot{display:none}.paper-wrap{padding:12px 10px 0}.paper{padding:20px 20px 15px}.editor-toolbar{padding:7px 10px;gap:7px;flex-wrap:wrap}.scene-tools{gap:0}.scene-tools .button{padding:0 7px;font-size:11px}.scene-title{font-size:25px}.scene-setting{font-size:11px;margin-bottom:18px}.scene-body{font-size:16px}.editor-footer{padding:0 12px;gap:9px}.shortcut{display:none}.editor-footer #position-label{font-size:9px}.notice{padding:10px 15px;flex-wrap:wrap}.notice:not([hidden]) + .workbench{height:calc(100dvh - 160px)}.compare{grid-template-columns:1fr}.compare textarea{height:180px}.reading-paper{padding:25px}.scene-title,.scene-setting,.title-wrap input{font-size:16px}.scene-title{font-size:24px}}
@media(max-width:470px){.workbench{grid-template-columns:115px minmax(0,1fr)}.outline-heading h2{font-size:11px}.outline-heading span{font-size:9px}.scene-button{grid-template-columns:1fr;padding:8px 6px}.scene-number{font-size:9px}.scene-copy small{display:none}.new-scene{font-size:11px;margin:12px 0}.new-scene svg{width:13px}.paper{padding:19px 16px 12px}.paper-wrap{padding:10px 7px 0}.scene-tools #remove-scene{display:none}.editor-footer #position-label{display:none}.editor-footer #word-count{margin-left:0}.editor-toolbar{align-items:flex-start}.view-switch button{padding:5px 8px}.paper-label{font-size:9px;letter-spacing:.1em}}
