@charset "UTF-8";
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:#29323a;background:#f3f5f6;font-size:14px;--line:#e1e6e9;--muted:#7b858f;--accent:#1c8feb;--mono:Menlo,Consolas,"Liberation Mono",monospace;letter-spacing:0;color-scheme:light}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid #8bc7f6;outline-offset:3px}a{color:inherit;text-decoration:none}button{border:0;background:none}svg{width:17px;height:17px;flex-shrink:0;pointer-events:none}h1,h2,h3,p{margin:0}[hidden]{display:none!important}.app-header{height:68px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 28px;border-bottom:2px solid #e8ecf0;background:linear-gradient(to bottom,#ffffff 0%,#fafbfc 100%);box-shadow:0 1px 3px rgba(0,0,0,0.04)}.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:linear-gradient(135deg,#1c8feb 0%,#0d6efd 100%);color:#fff;box-shadow:0 2px 8px rgba(28,143,235,0.25)}.brand strong{font-size:20px;font-weight:700;white-space:nowrap;letter-spacing:0.3px}.brand>span:last-child{font-size:12px;color:var(--muted);padding-left:8px;border-left:1px solid var(--line);white-space:nowrap}.header-actions{display:flex;align-items:center;gap:12px}.draft-status{font-size:12px;color:var(--muted)}.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid #dce2e6;background:white;padding:8px 13px;min-height:35px;border-radius:5px;font-size:13px;white-space:nowrap}.button:hover{background:#f5f7f8}.button.primary{background:linear-gradient(135deg,#1c8feb 0%,#0d6efd 100%);border-color:transparent;color:#fff;font-weight:700;min-width:160px;padding:10px 20px;font-size:14px;border-radius:8px;box-shadow:0 4px 12px rgba(28,143,235,0.3),0 2px 4px rgba(28,143,235,0.15);transition:all 0.3s ease;letter-spacing:0.5px;text-shadow:0 1px 2px rgba(0,0,0,0.1)}.button.primary:hover{background:linear-gradient(135deg,#48a5ef 0,#1c8feb 100%);box-shadow:0 6px 16px rgba(28,143,235,0.4),0 3px 6px rgba(28,143,235,0.2);transform:translateY(-1px)}.icon-button{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;color:#6b7785;padding:7px;flex-shrink:0;transition:all 0.2s ease}.icon-button:hover{background:#e8eef3;color:#2d3a45}.icon-button svg{width:16px;height:16px}.workspace{height:calc(100dvh - 68px);min-height:540px;display:grid;grid-template-columns:minmax(340px,1fr) minmax(380px,1fr) 280px}.source-panel,.preview-panel,.settings-panel{min-width:0;display:flex;flex-direction:column;min-height:0}.source-panel,.preview-panel{border-right:1px solid var(--line)}.source-panel{background:#fff}.panel-toolbar{height:52px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 20px;border-bottom:1.5px solid #e4eaf0;background:linear-gradient(to bottom,#ffffff 0%,#fafbfc 100%)}.panel-title{display:flex;align-items:center;gap:8px;white-space:nowrap}.panel-title>svg{width:15px;height:15px;color:#89939c}.panel-title h1,.panel-title h2{font-size:13px;font-weight:550}.toolbar-actions{display:flex;align-items:center;gap:2px}.toolbar-divider{width:1px;height:16px;background:var(--line);margin:0 5px}.source-body{position:relative;min-height:0;flex:1;display:flex}.source-body textarea{width:100%;min-width:0;resize:none;border:0;border-radius:0;padding:22px 24px;outline:none;font-family:var(--mono);font-size:13px;line-height:1.9;tab-size:2;color:#46505a;background:#fff;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}.source-body textarea:focus-visible{outline:2px solid #9bd0f9;outline-offset:-2px}.source-body textarea::placeholder{color:#a0a9b1}.panel-footer{height:34px;display:flex;align-items:center;gap:12px;padding:0 15px;border-top:1px solid var(--line);background:#fff;font-size:11px;color:#89929b;flex-shrink:0}.panel-footer>span:last-child{margin-left:auto;max-width:32%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.save-option{display:flex;gap:5px;align-items:center;white-space:nowrap;cursor:pointer}.save-option input{accent-color:var(--accent);width:12px;height:12px;margin:0}.drop-hint{position:absolute;inset:10px;display:flex;align-items:center;justify-content:center;gap:8px;background:#edf7ffee;border:1px dashed #85beeb;color:#27618e;z-index:2;pointer-events:none}.segmented{display:flex;border:1px solid #e0e5e8;padding:2px;gap:2px;border-radius:5px}.segmented button{display:grid;place-items:center;width:30px;height:24px;border-radius:3px;color:#8a949c}.segmented button svg{width:15px;height:15px}.segmented button.active{background:#eaf5fe;color:var(--accent)}.preview-scroll{flex:1;min-height:0;overflow:auto;padding:18px 20px 40px;background:linear-gradient(to bottom,#f5f7fa 0%,#eef2f7 100%);position:relative}.preview-width-label{width:var(--preview-width,375px);max-width:100%;margin:0 auto 10px;display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#9aa3ac}.preview-width-label>span:first-child{font-family:var(--mono)}.preview-empty{position:absolute;inset:75px 18px;align-items:center;justify-content:center;display:flex;flex-direction:column;gap:12px;color:#a4adb4;pointer-events:none}.preview-empty svg{width:28px;height:28px}.footer-button{margin-left:auto;display:flex;align-items:center;gap:4px;font-size:11px;padding:0;color:#6d7e8c;white-space:nowrap}.footer-button svg{width:12px;height:12px}.error-banner{background:#fff5ed;color:#a36132;padding:10px 16px;font-size:12px;border-bottom:1px solid #f0d9c6}.settings-panel{background:linear-gradient(to bottom,#ffffff 0%,#f8f9fa 100%);border-left:2px solid #e8ecf0}.settings-content{padding:24px 20px;overflow:auto;flex:1}.setting-group{margin:0 0 22px;padding:0;border:0;min-width:0}.setting-group>label,.setting-group legend{display:block;font-size:13px;font-weight:600;color:#3a4550;margin-bottom:10px;padding:0;letter-spacing:0.2px}.setting-group select{width:100%}select{border:1.5px solid #d4dce3;border-radius:6px;background:white;min-height:34px;padding:6px 10px;font-size:12px;outline:none;transition:border-color 0.2s ease}select:hover{border-color:#b8c5d0}select:focus-visible{border-color:#1c8feb;outline-offset:1px;box-shadow:0 0 0 3px rgba(28,143,235,0.1)}.swatches{display:flex;align-items:center;gap:7px}.swatch{width:22px;height:22px;flex-shrink:0;position:relative;background:var(--swatch);border:3px solid #fafbfc;border-radius:50%;outline:1px solid transparent}.swatch.selected{outline-color:var(--swatch)}.custom-color{width:23px;height:23px;display:grid;place-items:center;position:relative;overflow:hidden;color:#8c969f;cursor:pointer}.custom-color svg{width:14px;height:14px}.custom-color input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;font-size:12px;color:#58636d}.setting-row select{width:114px;font-size:11px}.numeric-control{display:flex;align-items:center;width:78px;border:1px solid #dce3e7;background:white;border-radius:4px;padding-right:8px;height:32px}.numeric-control input{min-width:0;width:100%;border:0;background:transparent;padding:5px 8px;font-size:12px;outline:none}.numeric-control span{font-size:10px;color:#98a1a9}.setting-divider{height:1px;background:var(--line);margin:21px 0}.checkbox-row{display:flex;align-items:center;gap:10px;font-size:13px;color:#4a5568;margin:16px 0;cursor:pointer;padding:8px 4px;border-radius:5px;transition:background-color 0.2s ease}.checkbox-row:hover{background:#f7f9fb}.checkbox-row input{margin:0;width:15px;height:15px;accent-color:var(--accent);flex-shrink:0}.sidebar-action{display:flex;align-items:center;gap:10px;width:100%;padding:11px 0;font-size:13px;color:#4a5568;text-align:left;border-radius:6px;transition:all 0.2s ease}.sidebar-action:hover{background:#edf3f9;color:#1c8feb}.sidebar-action>span:first-child{display:flex;align-items:center;gap:8px;flex:1}.sidebar-action svg{width:14px;height:14px;color:#909ca4}.sidebar-action>svg{width:12px;height:12px}.count-badge{background:#eef1f3;border-radius:3px;min-width:20px;font-family:var(--mono);font-size:10px;text-align:center;padding:1px 4px;color:#8a959e}.sidebar-bottom{display:flex;align-items:center;gap:6px;padding:8px 14px;border-top:1px solid var(--line);font-size:10px;color:#8a959c;min-height:47px}.sidebar-bottom .icon-button{margin-left:auto;width:22px;height:22px}.sidebar-bottom svg{width:13px;height:13px}.status-dot{width:5px;height:5px;border-radius:50%;background:#1c8feb}.menu-wrap{position:relative}.menu{position:absolute;right:0;top:35px;z-index:10;min-width:165px;border:1px solid var(--line);border-radius:6px;background:#fff;padding:5px;box-shadow:0 6px 22px #25334114}.menu button{display:flex;align-items:center;gap:9px;width:100%;padding:9px 8px;text-align:left;font-size:12px;border-radius:3px}.menu button:hover{background:#f2f5f6}.menu svg{width:14px;height:14px;color:#8c959e}.mobile-tabs{display:none}.toast{position:fixed;left:50%;bottom:25px;transform:translateX(-50%);max-width:calc(100% - 32px);padding:11px 18px;color:#fff;background:#253748;box-shadow:0 5px 25px #20364b22;font-size:13px;border-radius:6px;z-index:100;text-align:center}
dialog{width:min(640px,calc(100% - 32px));max-height:calc(100dvh - 48px);padding:0;border:1px solid #dfe5e7;border-radius:8px;color:#3c4750;background:#fff;box-shadow:0 15px 70px #16324b26}dialog::backdrop{background:#24364a55}.dialog-header{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 20px;border-bottom:1px solid var(--line)}.dialog-header h2{font-size:16px;font-weight:600}.dialog-body{padding:20px;overflow-wrap:anywhere}.dialog-command{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:16px;color:#7a858e;font-size:12px}.context-note{font-size:12px;color:#8d744f;background:#fcfaf4;border:1px solid #ece3d2;padding:11px 13px;line-height:1.8;margin-top:18px}.image-item{display:grid;grid-template-columns:70px minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.image-item img{width:70px;height:54px;object-fit:contain;background:#f2f4f6;border:1px solid #e5e9eb}.image-info{min-width:0}.image-info strong{display:block;font-size:12px;font-weight:500}.image-info code{display:block;font-size:10px;line-height:1.6;color:#929ba2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.image-info small{display:block;font-size:10px;margin-top:4px;color:#607c93}.image-controls{display:flex;gap:3px}.image-controls .icon-button{width:28px}.image-url-input{display:block;border:1px solid #dce3e7;border-radius:4px;padding:6px 8px;width:100%;margin-top:7px;font-size:11px}.issues-list{margin:0;padding:0;list-style:none}.issues-list li{display:flex;align-items:flex-start;gap:8px;padding:10px 0;border-bottom:1px solid #edf0f2;font-size:12px;line-height:1.8;color:#737e86}.issues-list svg{width:15px;height:15px;margin-top:4px;color:#ae8a49;flex-shrink:0}.check-summary{margin-top:18px;font-size:12px;color:#687b8c;line-height:1.9}.help-body h3{font-size:13px;margin:20px 0 7px}.help-body h3:first-child{margin-top:0}.help-body p{font-size:12px;line-height:1.9;color:#7a858e}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:24px}.dialog-body>p{font-size:13px;line-height:1.8}.fallback-copy{width:100%;max-height:220px;overflow:auto;border:1px solid var(--line);padding:16px;margin-top:16px}.panel-toolbar .panel-title{min-width:0}
@media(max-width:1130px) and (min-width:761px){.workspace{grid-template-columns:minmax(320px,1fr) minmax(360px,1fr) 198px}.settings-content{padding:17px 12px}.swatches{gap:5px}.swatch{width:21px;height:21px}.app-header{padding:0 18px}.brand>span:last-child{font-size:11px}.source-body textarea{padding:20px 16px;font-size:12px}.panel-toolbar{padding:0 11px}.toolbar-actions{gap:0}.toolbar-divider{margin:0 2px}.preview-scroll{padding-left:10px;padding-right:10px}.draft-status{display:none}.setting-row select{width:106px}.sidebar-bottom{font-size:9px;padding-left:11px;padding-right:8px}.brand>span:last-child{display:none}}
@media(min-width:761px) and (max-width:990px){.workspace{grid-template-columns:minmax(320px,1fr) minmax(360px,1fr)}.settings-panel{display:none;position:fixed;right:12px;top:112px;bottom:20px;width:240px;z-index:15;border:1px solid var(--line);box-shadow:0 8px 32px #23364b1a;border-radius:6px;overflow:hidden}.workspace.settings-open .settings-panel{display:flex}.header-actions:before{content:none}.preview-panel{border-right:0}.mobile-tabs{display:flex;position:absolute;right:195px;top:16px;z-index:10}.mobile-tabs>[role="tab"]{display:none}.mobile-tabs>button:last-child{display:flex;gap:6px;align-items:center;font-size:12px;color:#6c787f}.mobile-tabs svg{width:14px;height:14px}}
@media(max-width:760px){.app-header{height:58px;padding:0 13px;gap:10px}.brand{gap:8px}.brand strong{font-size:18px}.brand-icon{width:27px;height:27px}.brand-icon svg{width:16px;height:16px}.brand>span:last-child,.draft-status{display:none}.header-actions{gap:5px}.header-actions>.icon-button{display:none}.button.primary{min-width:130px;padding:8px 10px;font-size:12px}.workspace{display:block;height:calc(100dvh - 58px);min-height:440px;position:relative;padding-top:42px}.source-panel,.preview-panel{height:100%;border-right:0}.source-panel>.panel-toolbar{height:42px;position:relative}.source-body textarea{padding:18px 16px;font-size:13px}.source-panel .panel-title{display:none}.source-panel .toolbar-actions{margin-left:auto}.mobile-tabs{position:absolute;top:0;left:0;right:0;height:42px;display:flex;align-items:center;gap:4px;border-bottom:1px solid var(--line);padding:0 12px;background:#fff;z-index:5}.mobile-tabs button{height:30px;padding:4px 15px;font-size:12px;border-radius:4px;color:#879198}.mobile-tabs [aria-selected="true"]{color:#126bb0;background:#eaf5fe}.mobile-tabs button:last-child{margin-left:auto;padding:4px 8px;display:flex;align-items:center;gap:6px}.mobile-tabs svg{width:14px;height:14px}.preview-panel{display:none}.workspace[data-mobile-view="preview"] .source-panel{display:none}.workspace[data-mobile-view="preview"] .preview-panel{display:flex}.workspace[data-mobile-view="preview"] .mobile-tabs{display:flex}.workspace[data-mobile-view="preview"] .source-panel .mobile-tabs{display:none}.mobile-tabs{visibility:visible}.workspace .mobile-tabs{display:flex}.preview-panel>.panel-toolbar{height:42px;padding:0 13px}.preview-panel .panel-title{font-size:12px}.preview-scroll{padding:12px 9px 30px}.preview-width-label{font-size:9px}.settings-panel{display:none;position:absolute;inset:42px 0 0;z-index:12;background:#fafbfc;border-left:1px solid var(--line)}.workspace.settings-open .settings-panel{display:flex}.settings-content{display:grid;grid-template-columns:1fr 1fr;gap:0 24px;align-content:start;padding:22px}.setting-group{margin-bottom:24px}.setting-divider{grid-column:1/-1;margin:10px 0}.checkbox-row,.sidebar-action{grid-column:1/-1}.setting-row{margin-bottom:21px}.sidebar-bottom{margin-top:auto}.image-item{grid-template-columns:55px minmax(0,1fr);gap:10px}.image-item img{width:55px;height:48px}.image-controls{grid-column:2;justify-content:flex-start}.dialog-header{padding:13px 16px}.dialog-body{padding:16px}.context-note{font-size:11px}.source-panel .panel-footer{font-size:10px}.panel-footer{padding:0 12px}.source-panel .panel-footer>span:last-child{max-width:28%}.toast{font-size:12px;bottom:18px}.settings-panel .panel-toolbar:after{content:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.desktop-preview .preview-paper,.desktop-preview .preview-width-label{width:680px;max-width:100%}

/* Render the sanitized article in the outer scroll area; no nested document viewport. */
html,body{height:100%;overflow:hidden}
.workspace{min-height:0}
.preview-scroll{overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
.preview-paper{width:var(--preview-width,375px);max-width:100%;min-height:560px;margin:0 auto;padding:28px 22px;background:#fff;border:1px solid #dce4eb;border-radius:6px;box-shadow:0 4px 16px rgba(0,0,0,0.06),0 1px 4px rgba(0,0,0,0.04)}
.preview-content{width:100%;min-height:1px}
.preview-scroll{background:#f1f5f9}
.settings-panel{background:#fff}
.panel-toolbar{border-bottom-color:#e4eaf0}
.preview-width-label{color:#7b8b9a}
.source-body textarea{color:#384957;line-height:1.95}

/* Scroll remains available without drawing bars over the article. */
.preview-scroll,.preview-scroll *{scrollbar-width:none;-ms-overflow-style:none}
.preview-scroll::-webkit-scrollbar,.preview-scroll *::-webkit-scrollbar{display:none;width:0;height:0}
.preview-scroll:focus-visible{outline:2px solid #8bc7f6;outline-offset:-2px}
.preview-content pre:focus-visible{outline:2px solid #8bc7f6;outline-offset:2px}
.outline-section{border-top:1px solid var(--line);padding-top:16px;margin-top:20px;grid-column:1/-1}
.outline-section summary{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:12px;font-weight:500;color:#58636d;list-style:none;padding:3px 0}
.outline-section summary::-webkit-details-marker{display:none}
.outline-section summary::before{content:"";width:6px;height:6px;border-right:1px solid #8b99a5;border-bottom:1px solid #8b99a5;transform:rotate(-45deg);margin-right:2px}
.outline-section[open] summary::before{transform:rotate(45deg);margin-top:-4px}
.outline-section summary:focus-visible{outline:2px solid #8bc7f6;outline-offset:4px}
.outline-section .count-badge{margin-left:auto}
#outline-list{padding-top:10px}
.outline-item{display:block;width:100%;text-align:left;padding:7px 8px 7px calc(8px + var(--outline-depth,0)*9px);font-size:11px;line-height:1.6;color:#607487;border-radius:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.outline-item:hover,.outline-item:focus-visible{background:#edf6fe;color:#126bb0}
.outline-empty{padding:8px 0;color:#8998a5;font-size:11px;line-height:1.8}