:root{--ink:#252620;--muted:#727369;--line:#dedbd1;--paper:#fffefb;--shell:#f3efe6;--accent:#e25734;--shadow:0 22px 55px rgba(47,42,31,.12);font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--shell);font-synthesis:none}
*{box-sizing:border-box}html,body{margin:0;min-height:100%}body{min-height:100vh;overflow:hidden}button,input,textarea{font:inherit}button{color:inherit}.topbar{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:rgba(255,254,251,.92);border-bottom:1px solid var(--line);backdrop-filter:blur(16px);position:relative;z-index:10}.brand{display:flex;align-items:center;gap:11px;color:inherit;text-decoration:none}.brand-mark{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:var(--ink);color:white;font:700 18px/1 ui-serif,serif;box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)}.brand strong,.brand small{display:block}.brand strong{font:700 16px/1.2 ui-serif,"Songti SC",serif;letter-spacing:.08em}.brand small{margin-top:4px;color:var(--muted);font-size:9px;letter-spacing:.14em;text-transform:uppercase}.top-actions{display:flex;align-items:center;gap:8px}.button{height:38px;border-radius:10px;border:1px solid var(--line);padding:0 14px;background:#fff;cursor:pointer;font-size:13px;transition:.18s ease}.button:hover{transform:translateY(-1px);border-color:#bbb6a9}.button.primary{border-color:var(--ink);background:var(--ink);color:white;padding-inline:18px}.button.primary:hover{background:#3a3a33}.button[disabled]{cursor:wait;opacity:.68;transform:none}.safe-badge{display:flex;align-items:center;gap:7px;margin-right:8px;padding:6px 9px;color:#56705a;font-size:12px;background:#edf4ed;border-radius:999px}.safe-badge i{width:7px;height:7px;border-radius:50%;background:#61a06a;box-shadow:0 0 0 3px rgba(97,160,106,.14)}
.app-shell{height:calc(100vh - 72px);display:grid;grid-template-columns:248px minmax(0,1fr)}.toolbar{padding:24px 20px;overflow-y:auto;background:#f8f5ee;border-right:1px solid var(--line)}.toolbar-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:26px;font-weight:700;font-size:14px}.text-button{border:0;background:0;padding:0;color:var(--muted);cursor:pointer;font-size:11px}.control-group{border:0;margin:0 0 25px;padding:0}.control-group legend,.control-group>label{display:flex;width:100%;justify-content:space-between;align-items:center;margin-bottom:12px;color:#5e6057;font-size:12px;font-weight:650}.control-group output{font-weight:500;color:#898a80;font-variant-numeric:tabular-nums}.theme-group{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.theme-group legend{grid-column:1/-1}.theme-option{display:flex;flex-direction:column;align-items:center!important;gap:7px;margin:0!important;cursor:pointer;color:var(--muted)!important;font-size:11px!important}.theme-option input{position:absolute;opacity:0;pointer-events:none}.theme-swatch{display:block;width:58px;height:52px;border:1px solid var(--line);border-radius:9px;padding:8px;background:#fff;transition:.18s ease}.theme-option.selected .theme-swatch{border:2px solid var(--ink);padding:7px;box-shadow:0 4px 12px rgba(35,35,30,.11)}.theme-swatch i{display:block;width:70%;height:3px;margin:4px 0;background:#777;box-shadow:0 8px 0 #bbb,0 16px 0 #ddd}.swatch-magazine{background:#222}.swatch-magazine i{background:#fff;box-shadow:0 8px 0 #d75b37,0 16px 0 #777}.swatch-sticky{background:#fff2a8;transform:rotate(-2deg)}input[type=range]{appearance:none;width:100%;height:4px;border-radius:99px;background:#dcd8ce;outline:none}input[type=range]::-webkit-slider-thumb{appearance:none;width:16px;height:16px;border-radius:50%;background:var(--ink);border:3px solid white;box-shadow:0 0 0 1px #aaa;cursor:pointer}.color-control{position:relative}.color-picker{position:absolute;right:0;top:-6px;width:34px;height:28px;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}.color-picker input{width:48px;height:42px;border:0;padding:0;transform:translate(-7px,-7px);cursor:pointer}.privacy-note{margin-top:34px;padding:14px;border:1px solid #ded9ca;border-radius:12px;background:#fffdf7}.privacy-note strong{font-size:11px}.privacy-note p{margin:6px 0 0;color:var(--muted);font-size:10px;line-height:1.6}
.workspace{min-width:0;min-height:0;display:grid;grid-template-columns:minmax(330px,.82fr) minmax(440px,1.18fr);gap:1px;background:var(--line)}.panel{min-width:0;min-height:0;display:flex;flex-direction:column;background:#fbfaf6;overflow:hidden}.panel-head{height:44px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid var(--line);color:#82837a;font-size:10px;font-weight:700;letter-spacing:.12em}.editor-panel textarea{width:100%;flex:1 1 auto;height:auto;min-height:0;overflow:auto;resize:none;border:0;outline:0;padding:26px 28px;background:#fbfaf6;color:#33352f;font:14px/1.72 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;tab-size:2}.editor-foot{height:36px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:0 17px;border-top:1px solid var(--line);color:#94958c;font-size:10px}.editor-foot kbd{display:inline-grid;place-items:center;min-width:17px;height:17px;margin-right:2px;padding:0 4px;border:1px solid #d2cfc5;border-radius:4px;background:white;font:9px ui-monospace,monospace}.preview-panel{background:#ece8df}.preview-stage{flex:1 1 auto;min-height:0;height:auto;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:36px 5vw 70px;display:flex;align-items:flex-start;justify-content:center}.card{--card-bg:#fffefb;width:720px;max-width:100%;min-height:760px;padding:64px 66px 38px;background:var(--card-bg);box-shadow:var(--shadow);transition:width .2s ease,background .2s ease}.markdown-body{font-size:18px;line-height:1.75;overflow-wrap:anywhere}.markdown-body>:first-child{margin-top:0}.markdown-body>:last-child{margin-bottom:0}.markdown-body h1,.markdown-body h2,.markdown-body h3{font-family:ui-serif,"Songti SC","Noto Serif CJK SC",serif;line-height:1.25;letter-spacing:-.02em}.markdown-body h1{font-size:2.15em;margin:0 0 .75em;padding-bottom:.42em;border-bottom:2px solid currentColor}.markdown-body h2{font-size:1.48em;margin:1.6em 0 .62em}.markdown-body h3{font-size:1.15em;margin:1.4em 0 .52em}.markdown-body p{margin:.75em 0}.markdown-body ul,.markdown-body ol{padding-left:1.45em}.markdown-body li{margin:.28em 0}.markdown-body blockquote{margin:1.25em 0;padding:.2em 0 .2em 1em;border-left:4px solid #c7c2b5;color:#64655e}.markdown-body code{padding:.16em .38em;border-radius:4px;background:#efeee9;font:85% ui-monospace,SFMono-Regular,Menlo,monospace}.markdown-body pre{margin:1.25em 0;padding:18px;border-radius:10px;background:#20231f;color:#f2f0e9;overflow:auto;line-height:1.55}.markdown-body pre code{padding:0;background:none;color:inherit}.markdown-body table{display:table;width:100%;margin:1.3em 0;border-collapse:collapse;font-size:.88em}.markdown-body th,.markdown-body td{border:1px solid #d9d5ca;padding:.55em .7em;text-align:left}.markdown-body th{background:rgba(0,0,0,.045);font-weight:700}.markdown-body a{color:inherit;text-decoration-color:#e25734;text-underline-offset:3px}.markdown-body hr{margin:2em 0;border:0;border-top:1px solid #d9d5ca}.card-signature{margin-top:48px;padding-top:14px;border-top:1px solid rgba(60,60,50,.12);color:#99998e;font-size:9px;letter-spacing:.14em;text-align:right;text-transform:uppercase}
.card.theme-magazine{--card-bg:#f8f3e8;background:var(--card-bg);border-top:11px solid #20211e;padding-top:50px}.theme-magazine .markdown-body h1{font-family:Impact,"Arial Narrow",sans-serif;font-size:2.75em;line-height:.98;text-transform:uppercase;border-bottom:0;position:relative;padding-bottom:.5em}.theme-magazine .markdown-body h1:after{content:"";position:absolute;left:0;bottom:0;width:72px;height:7px;background:#e25734}.theme-magazine .markdown-body h2{font-family:ui-sans-serif,system-ui;font-weight:900;border-top:1px solid currentColor;padding-top:.35em}.theme-magazine .markdown-body blockquote{border:0;padding:1em 1.1em;background:#20211e;color:white;font-family:ui-serif,serif;font-size:1.08em}.theme-magazine .markdown-body th{background:#20211e;color:white}.theme-magazine .card-signature{color:#e25734;border-top-color:#20211e}.card.theme-sticky{--card-bg:#fff2a8;background:linear-gradient(rgba(255,255,255,.14),rgba(255,255,255,0)),var(--card-bg);box-shadow:0 18px 45px rgba(76,64,26,.20);transform:rotate(-.18deg);border-radius:2px}.theme-sticky .markdown-body{font-family:"Bradley Hand","Kaiti SC","KaiTi",ui-rounded,system-ui}.theme-sticky .markdown-body h1,.theme-sticky .markdown-body h2,.theme-sticky .markdown-body h3{font-family:inherit}.theme-sticky .markdown-body h1{border-bottom:2px dashed rgba(55,54,43,.4)}.theme-sticky .markdown-body blockquote{border-left:0;background:rgba(255,255,255,.42);padding:.75em 1em;transform:rotate(.3deg)}.theme-sticky .markdown-body pre{background:#454238}.theme-sticky .markdown-body th,.theme-sticky .markdown-body td{border-color:rgba(70,65,40,.28)}.theme-sticky .markdown-body th{background:rgba(255,255,255,.3)}.mobile-tabs{display:none}.toast{position:fixed;left:50%;bottom:28px;z-index:100;transform:translate(-50%,18px);padding:10px 15px;border-radius:10px;background:#22231e;color:white;box-shadow:0 8px 28px rgba(0,0,0,.25);opacity:0;pointer-events:none;font-size:12px;transition:.2s ease}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1000px){.app-shell{grid-template-columns:220px minmax(0,1fr)}.workspace{grid-template-columns:minmax(280px,.7fr) minmax(360px,1.3fr)}.card{padding:50px 44px}.safe-badge{display:none}.button{padding-inline:10px}}
@media(max-width:760px){body{overflow:auto}.topbar{height:auto;min-height:64px;padding:11px 14px;gap:8px;flex-wrap:wrap}.brand small{display:none}.top-actions{gap:5px}.top-actions .button{height:34px;font-size:11px}.top-actions .button:nth-of-type(2){display:none}.button.primary{padding-inline:12px}.app-shell{height:auto;min-height:calc(100vh - 64px);display:block}.toolbar{padding:13px 14px;border-right:0;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:12px;overflow:visible}.toolbar-heading,.privacy-note{display:none}.control-group{margin:0}.control-group>label,.control-group legend{margin-bottom:7px}.theme-group{grid-row:1 / span 2;grid-template-columns:repeat(3,1fr)}.theme-swatch{width:44px;height:38px;padding:5px}.theme-swatch i{margin:2px 0;box-shadow:0 6px 0 #bbb,0 12px 0 #ddd}.theme-option.selected .theme-swatch{padding:4px}.color-control{grid-column:2}.workspace{display:block;background:#fbfaf6}.mobile-tabs{position:sticky;top:0;z-index:8;display:grid;grid-template-columns:1fr 1fr;margin:0;padding:8px 14px;background:#f8f5ee;border-bottom:1px solid var(--line)}.mobile-tabs button{height:34px;border:0;background:transparent;color:var(--muted);font-size:12px;border-radius:8px}.mobile-tabs button.active{background:#fff;box-shadow:0 2px 9px rgba(50,45,35,.1);color:var(--ink);font-weight:700}.panel{display:none;height:calc(100vh - 268px);min-height:470px}.panel.active-mobile{display:flex}.editor-panel textarea{padding:20px 17px}.preview-stage{padding:18px 12px 52px;justify-content:flex-start}.card{width:100%!important;min-width:0;min-height:650px;padding:42px 28px 32px}.markdown-body{font-size:min(var(--mobile-font,18px),18px)!important}.panel-head{height:38px}.toast{bottom:16px;white-space:nowrap;max-width:calc(100vw - 28px)}}
@media(max-width:420px){.toolbar{grid-template-columns:1.2fr 1fr}.theme-group{grid-row:1 / span 3}.control-group:nth-of-type(4){display:none}.color-control{grid-column:2}.top-actions .button.ghost{font-size:0;width:36px;padding:0}.top-actions .button.ghost:first-of-type:after{content:"导入";font-size:10px}.card{padding-inline:22px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}
