:root{color-scheme:light;--app-bg: #f4f4f3;--panel: #fafafa;--panel-strong: #fafafa;--preview-bg: #eeeeed;--line: rgba(0, 0, 0, .07);--text: #1f1f1f;--muted: #6e6e6e;--accent: #1f1f1f;--accent-hover: #000000;--accent-foreground: #ffffff;--accent-soft: #ececec;--editor-bg: #fafafa;--shadow: 0 2px 6px rgba(0, 0, 0, .04), 0 16px 40px rgba(0, 0, 0, .05);--editor-ratio: 49%}:root[data-color-theme=dark]{color-scheme:dark;--app-bg: #222325;--panel: #27282b;--panel-strong: #27282b;--preview-bg: #333538;--line: rgba(255, 255, 255, .08);--text: #e4e4e7;--muted: #a1a1aa;--accent: #fafafa;--accent-hover: #e4e4e7;--accent-foreground: #18181b;--accent-soft: #36373b;--editor-bg: #27282b;--shadow: 0 2px 6px rgba(0, 0, 0, .12), 0 16px 40px rgba(0, 0, 0, .16)}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{color:var(--text);background:var(--app-bg);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,sans-serif;-webkit-font-smoothing:antialiased}button,textarea{font:inherit}button{border:0;color:inherit}.app-shell{display:flex;flex-direction:column;width:100%;height:100%}.topbar{min-height:68px;padding:14px 22px 14px 82px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:0;background:var(--app-bg);-webkit-app-region:drag}.brand-block,.toolbar,.tool-button{white-space:nowrap;flex-shrink:0;-webkit-app-region:no-drag}.brand-block{display:flex;align-items:center;gap:11px}.brand-mark{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;color:var(--accent-foreground);background:var(--accent);font-family:inherit;font-size:11px;font-weight:800;letter-spacing:-.03em}.brand-name{font-size:15px;line-height:1.2;font-weight:720;letter-spacing:-.02em}.site-name{color:inherit;font-size:15px;font-weight:760;letter-spacing:-.02em;text-decoration:none}.site-name:hover{opacity:.62}.brand-separator{margin-inline:-3px;color:var(--muted)}.toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}.tool-button{height:36px;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid transparent;border-radius:7px;cursor:pointer;font-size:13px;font-weight:550;transition:.16s ease}.tool-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}.tool-button.primary{padding-inline:16px;color:var(--accent-foreground);background:var(--accent)}.theme-button{width:36px;padding:0;flex:0 0 auto}.theme-button [hidden]{display:none}.toolbar-divider{width:1px;height:18px;margin:0 5px;flex-shrink:0;background:var(--line)}.theme-menu{position:fixed;z-index:60;width:180px;padding:5px;border:1px solid var(--line);border-radius:10px;color:var(--text);background:var(--panel-strong);box-shadow:var(--shadow);-webkit-app-region:no-drag}.theme-menu[hidden]{display:none}.theme-menu button{display:flex;align-items:center;gap:10px;width:100%;min-height:38px;padding:0 10px;border-radius:5px;background:transparent;font-size:13px;text-align:left;cursor:pointer}.theme-menu button:hover,.theme-menu button:focus-visible{outline:none;background:var(--accent-soft)}.theme-menu svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.theme-check{width:6px;height:10px;margin-left:auto;margin-right:3px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);visibility:hidden}.theme-menu [aria-checked=true] .theme-check{visibility:visible}.tool-button:focus-visible,.mini-button:focus-visible{outline:2px solid var(--muted);outline-offset:2px}.document-heading{display:flex;align-items:center;gap:14px;min-width:0}#documentName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-status{flex-shrink:0;color:var(--muted);font-size:11px;white-space:nowrap}.document-heading+.mini-button{flex-shrink:0;margin-left:10px}.tool-button:not(.primary){color:var(--muted);background:transparent}.tool-button:not(.primary):hover{color:var(--text);background:var(--accent-soft)}html[data-runtime=web] .topbar{padding-left:18px}.tool-button.primary:hover{background:var(--accent-hover)}.tool-button:active{transform:translateY(0)}.workspace{min-height:0;flex:1;display:grid;grid-template-columns:minmax(320px,var(--editor-ratio)) 5px minmax(380px,1fr);margin:0 16px 16px;border-radius:12px;overflow:hidden;background:var(--panel)}.pane{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden;border:0;background:var(--panel)}.editor-pane,.preview-pane{border-radius:0}.pane-header{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;height:52px;padding:0 20px;background:var(--panel-strong)}.pane-title{display:flex;align-items:center;gap:8px;min-width:0;font-family:inherit;font-size:13px;font-weight:550}.preview-header .pane-title{font-family:inherit;font-size:13px;font-weight:550;letter-spacing:0;text-transform:none}.status-dot{width:5px;height:5px;flex-shrink:0;border-radius:50%;background:color-mix(in srgb,var(--muted) 55%,transparent);box-shadow:0 0 0 4px transparent;transition:background .18s ease,box-shadow .18s ease}.status-dot.is-dirty{background:#d49d54}.mini-button{padding:5px 7px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:7px;color:var(--muted);background:transparent;font-size:11px;font-weight:650;cursor:pointer}.mini-button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}.mini-button:hover{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 35%,var(--line))}.editor-wrap{min-height:0;flex:1;display:grid;grid-template-columns:50px 1fr;background:var(--editor-bg)}.line-numbers,#editor{padding-top:22px;padding-bottom:80px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:15px;line-height:26px;tab-size:2}.line-numbers{padding-right:13px;overflow:hidden;color:color-mix(in srgb,var(--muted) 78%,var(--editor-bg));text-align:right;white-space:pre;user-select:none}#editor{width:100%;height:100%;padding-right:28px;padding-left:22px;resize:none;border:0;outline:0;color:var(--text);background:transparent;caret-color:var(--accent);overflow-x:auto;white-space:pre}#editor::selection{background:color-mix(in srgb,var(--accent) 23%,transparent)}.editor-wrap.has-image-editor{display:block;overflow:hidden}.has-image-editor>#editor,.has-image-editor>.line-numbers{display:none}.has-image-editor .cm-editor{height:100%;color:var(--text);background:var(--editor-bg);outline:none}.has-image-editor .cm-scroller{overflow:auto;font:15px/26px SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.has-image-editor .cm-content{padding:20px 0 80px;caret-color:var(--accent)}.has-image-editor .cm-line{padding:0 28px 0 20px}.has-image-editor .cm-gutters{background:var(--editor-bg);color:var(--muted);border:0}.has-image-editor .cm-lineNumbers .cm-gutterElement{min-width:46px;padding:0 11px 0 6px}.image-fold{padding:1px 7px;border:1px solid var(--border);border-radius:5px;background:color-mix(in srgb,var(--text) 5%,var(--editor-bg));color:var(--muted);font:inherit;font-size:12px;cursor:pointer}.image-fold:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.resize-handle{position:relative;z-index:3;cursor:col-resize}.resize-handle:after{content:"";position:absolute;inset:0 2px;border-radius:999px;background:var(--line);transition:background .15s ease}.resize-handle:hover:after,.resize-handle:focus-visible:after,.resize-handle.is-dragging:after{background:var(--accent)}.preview-stage{min-height:0;flex:1;overflow:auto;padding:30px 24px 70px;background:var(--preview-bg)}.preview-header{background:var(--preview-bg)}@media(max-width:840px){html,body{height:auto;min-height:100%;overflow:auto}.app-shell{min-height:100vh}.topbar{padding:10px 12px;gap:10px;flex-wrap:wrap}.brand-name{display:none}.toolbar{gap:5px}.tool-button{padding-inline:10px}.workspace{display:flex;flex-direction:column;gap:10px;margin:0 10px 10px;overflow:visible;background:transparent}.pane{min-height:520px;border-radius:12px}.editor-pane{height:58vh}.preview-pane{min-height:680px}.resize-handle{display:none}.preview-stage{padding-inline:10px}}.phone-sheet{color-scheme:light;width:min(100%,390px);min-height:calc(100% - 10px);margin:0 auto;border:1px solid rgba(61,58,50,.09);border-radius:4px;background:#fff;box-shadow:var(--shadow)}.article-preview{width:100%;min-height:760px;padding:28px 20px 52px;color:#232323;background:#fff;font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Arial,sans-serif;font-size:16px;line-height:1.85;overflow-wrap:break-word}.article-preview>:first-child{margin-top:0!important}.article-preview>:last-child{margin-bottom:0!important}.article-preview h1{margin:0 0 34px;color:#111;font-size:28px;line-height:1.35;font-weight:760;letter-spacing:-.035em;text-align:left}.article-preview h2{margin:36px 0 16px;padding:0 0 10px;color:#1c1c1c;border-bottom:1px solid #e8e8e8;font-size:21px;line-height:1.45;font-weight:650}.article-preview h3{margin:30px 0 14px;color:#2b2b2b;font-size:18px;line-height:1.5}.article-preview p{margin:16px 0;text-wrap:pretty;text-align:left}.article-preview strong{color:#0d0d0d;font-weight:730}.article-preview em{color:#5a5a5a}.article-preview a{color:#1c1c1c;text-decoration:underline;text-decoration-color:color-mix(in srgb,currentColor 42%,transparent);text-decoration-thickness:1px;text-underline-offset:3px;overflow-wrap:anywhere}.article-preview blockquote{margin:24px 0;padding:14px 18px;border-left:4px solid #cfcfcf;border-radius:0 8px 8px 0;color:#4f4f4f;background:#f5f5f5}.article-preview blockquote p{margin:0}.article-preview ul,.article-preview ol{margin:16px 0;padding-left:1.55em}.article-preview li{margin:7px 0;padding-left:.25em;text-wrap:pretty}.article-preview li::marker{color:#9a9a9a;font-weight:700}.article-preview code:not(pre code){overflow-wrap:anywhere;padding:.16em .4em;border:1px solid #e0e0e0;border-radius:5px;color:#2b2b2b;background:#f4f4f4;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.88em}.article-preview pre.hljs{position:relative;margin:24px 0;padding:20px;overflow-x:auto;border-radius:6px;color:#d4d4d4;background:#1a1a1a;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;line-height:1.7;white-space:pre}.article-preview .hljs-keyword,.article-preview .hljs-selector-tag,.article-preview .hljs-literal{color:#f7f7f7;font-weight:600}.article-preview .hljs-string,.article-preview .hljs-title,.article-preview .hljs-section{color:#a8a8a8}.article-preview .hljs-comment,.article-preview .hljs-quote{color:#6b6b6b;font-style:italic}.article-preview .hljs-number,.article-preview .hljs-attribute{color:#cfcfcf}.article-preview img{display:block;max-width:100%;height:auto;margin-right:auto;margin-left:auto;border-radius:5px}.article-preview hr{width:42%;height:1px;margin:38px auto;border:0;background:#e0e0e0}.article-preview table{width:100%;margin:24px 0;border-collapse:collapse;font-size:14px}.article-preview th,.article-preview td{padding:10px 11px;border:1px solid #e2e2e2;text-align:left}.article-preview th{color:#1c1c1c;background:#f5f5f5}.article-preview .math-block{margin:23px 0;padding:12px 8px;overflow-x:auto;text-align:center}.toast{position:fixed;z-index:20;right:24px;bottom:47px;max-width:420px;padding:11px 15px;border:1px solid rgba(255,255,255,.12);border-radius:10px;opacity:0;color:#f7f6f2;background:#222622f0;box-shadow:0 12px 35px #0003;font-size:12px;pointer-events:none;transform:translateY(8px);transition:.18s ease}.toast.is-visible{opacity:1;transform:translateY(0)}@media(min-width:841px)and (max-width:900px){.workspace{grid-template-columns:1fr;grid-template-rows:minmax(300px,1fr) minmax(300px,1fr)}.resize-handle{display:none}.editor-pane,.preview-pane{border-radius:10px}}
