:root { color-scheme: dark; --ink: #e2e7f0; --muted: #8e99ae; --blue: #518bea; --border: #303849; --paper: #1c2230; --page: #11151e; --field: #171d29; --good: #89cdb2; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.6 system-ui, "Microsoft YaHei", sans-serif; }
a { color: #9ec4ff; text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, select { border: 1px solid var(--border); border-radius: 6px; padding: 7px 12px; background: #252d3d; color: var(--ink); cursor: pointer; }
button:hover, select:hover { background: #303b51; border-color: #566886; } button:disabled { opacity: .5; cursor: wait; }
button.primary { background: #3975d4; border-color: #558de5; color: #fff; } button.primary:hover { background: #4684e2; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid #84b7ff; outline-offset: 3px; }
input:not([type=checkbox]) { min-width: 0; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; color: var(--ink); background: var(--field); }
input::placeholder, textarea::placeholder { color: #717d95; }
.topbar { min-height: 65px; padding: 13px 26px; display: flex; gap: 20px; align-items: center; background: #161c28; border-bottom: 1px solid var(--border); }
.brand { color: #f0f4ff; font-size: 22px; font-weight: 700; } .brand span { font-size: 13px; font-weight: 400; margin-left: 8px; color: #9faec9; }
.subtitle { color: #9faec9; flex: 1; } .site-link { font-size: 13px; }
main { max-width: 1740px; margin: 0 auto; padding: 0 22px 22px; }
.message { min-height: 20px; margin: 12px 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; } .message:empty { margin: 7px 0; min-height: 8px; }
.message.error, .error { color: #f29198; } .message.success { color: var(--good); }
.eyebrow { margin: 0 0 5px; letter-spacing: .15em; color: #7e93b6; font-size: 10px; font-weight: 600; }
.small, .muted { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; } .small { line-height: 1.7; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.login-card { max-width: 430px; padding: 34px; margin: 75px auto 24px; background: var(--paper); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 20px 80px #0004; }
.login-card h1 { margin: 8px 0; font-size: 27px; } .login-card > p:not(.eyebrow) { color: var(--muted); }
.login-card label, #link-form label { display: block; margin: 18px 0 6px; } .login-card button { width: 100%; margin-top: 25px; }
.workspace { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 17px; align-items: start; }
.workspace:fullscreen { padding: 18px; background: var(--page); overflow: auto; }
.workspace.with-inspector { grid-template-columns: 224px minmax(0, 1fr) 320px; }
.library, .composer, .inspector { min-width: 0; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; }
.library { padding: 18px 14px; } .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-heading h2 { font-size: 15px; margin: 0; } .new-document { width: 100%; margin: 18px 0 12px; }
.search-input { font-size: 12px; } .post-list { margin-top: 15px; max-height: 63vh; overflow-y: auto; }
.post-button { display: block; width: 100%; padding: 12px 10px; text-align: left; margin-bottom: 8px; background: transparent; border-color: transparent; overflow-wrap: anywhere; }
.post-button.selected { background: #27364e; border-color: #4c6689; } .post-button strong { display: block; font-size: 13px; font-weight: 500; }
.post-button span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.library-note { font-size: 11px; color: #77869f; border-top: 1px solid var(--border); padding-top: 16px; margin: 18px 0 0; }
.composer-bar { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.composer-name { min-width: 0; } .composer-name h1 { font-size: 18px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.window-controls { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; } .window-controls button { font-size: 11px; padding: 5px 7px; background: transparent; }
.placeholder { min-height: 60vh; padding: 95px 24px; text-align: center; } .placeholder h2 { font-size: 25px; font-weight: 500; }
.placeholder p { color: var(--muted); margin-bottom: 24px; } .empty-mark { display: inline-block; padding: 10px 17px; border: 1px solid #3a4d6a; border-radius: 6px; letter-spacing: .2em; color: #7395c7; font: 11px monospace; }
.metadata-row { display: flex; align-items: flex-end; gap: 15px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.metadata-row label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 5px; } .metadata-row input { font-size: 13px; padding: 8px 10px; }
.category-field { flex: 1; min-width: 0; } .tag-field { flex: 1.6; min-width: 0; }
.status-pill { font-size: 10px; line-height: 1.5; color: #9cbedb; background: #26364b; border: 1px solid #3c526e; border-radius: 4px; padding: 4px 7px; white-space: nowrap; margin-bottom: 5px; }
.title-row { position: relative; margin: 0 22px; padding: 19px 0; border-bottom: 1px solid var(--border); } .title-row input { border: 0; padding: 0 58px 0 0; background: transparent; font-size: 25px; font-weight: 500; }
#title-count { position: absolute; right: 0; top: 28px; font-size: 11px; }
.body-heading { margin: 17px 22px 9px; display: flex; justify-content: space-between; align-items: center; gap: 12px; } .body-heading > label { font-size: 12px; color: var(--muted); }
.view-controls { display: flex; flex-wrap: wrap; gap: 5px; } .view-controls button { font-size: 11px; padding: 4px 8px; background: transparent; }
.drop-zone { position: relative; margin: 0 22px; }
textarea { width: 100%; min-height: 45vh; resize: vertical; border: 0; outline-offset: 0; padding: 10px 0; tab-size: 2; font: 15px/1.9 "Cascadia Mono", Consolas, "Microsoft YaHei", monospace; color: #dbe2f1; background: transparent; }
textarea:focus-visible { outline: 0; } .drop-zone:focus-within { box-shadow: inset 0 -1px #44587b; }
#drop-hint { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; background: #20344fdd; border: 2px dashed #7eb7ff; border-radius: 8px; pointer-events: none; }
.document-footer { border-top: 1px solid var(--border); padding: 12px 22px 18px; background: #19202d; border-radius: 0 0 10px 10px; }
.format-toolbar { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; } .format-toolbar button, .format-toolbar select { padding: 5px 9px; font-size: 12px; background: transparent; }
.format-bold { font-weight: 800; } .format-italic { font-family: Georgia, serif; font-style: italic; } .format-strike { text-decoration: line-through; }
.writing-status { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 13px; } #save-state { margin-left: auto; color: var(--good); } #save-state.unsaved { color: #e3bd7f; } #save-state.failed { color: #f29198; }
.action-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 15px; border-top: 1px solid #2b3343; }
.secondary-actions, .primary-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; } .action-row button { font-size: 12px; } .secondary-actions button { background: transparent; color: var(--muted); }
#publish { min-width: 110px; } #view-post { font-size: 12px; }
.inspector { overflow: hidden; } .inspector-tabs { display: flex; gap: 5px; padding: 12px; border-bottom: 1px solid var(--border); } .inspector-tabs button { background: transparent; font-size: 12px; } .inspector-tabs button:last-child { margin-left: auto; }
.inspector-tabs button.selected { background: #2b3a53; border-color: #516b91; } #outline-panel { padding: 18px; }
#outline-list { margin-top: 17px; } .outline-item { display: block; width: 100%; background: transparent; text-align: left; border: 0; font-size: 12px; padding: 7px 0; overflow-wrap: anywhere; }
.outline-level-2 { padding-left: 12px; color: #c1cce0; } .outline-level-3, .outline-level-4, .outline-level-5, .outline-level-6 { padding-left: 24px; color: #9caac1; }
#preview-kind { margin: 12px 14px; } #preview-frame { width: 100%; height: 69vh; min-height: 400px; border: 0; background: #19202d; }
.workspace.library-hidden { grid-template-columns: minmax(0, 1fr); } .workspace.library-hidden .library { display: none; }
.workspace.library-hidden.with-inspector { grid-template-columns: minmax(0, 1fr) 320px; }
body.focus-mode .topbar, body.focus-mode .library { display: none; } body.focus-mode main { max-width: 1150px; padding-top: 14px; }
body.focus-mode .workspace { grid-template-columns: minmax(0, 1fr); } body.focus-mode .workspace.with-inspector { grid-template-columns: minmax(0, 1fr) 320px; }
.composer.collapsed #document, .composer.collapsed #choose-post { display: none !important; }
dialog { width: min(620px, calc(100% - 24px)); max-height: 88vh; overflow: auto; padding: 24px; border: 1px solid #485774; border-radius: 12px; background: #1c2332; color: var(--ink); box-shadow: 0 24px 90px #0009; }
dialog::backdrop { background: #080c15bf; backdrop-filter: blur(3px); } .dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; } .dialog-heading h2 { font-size: 21px; margin: 0; } .dialog-heading button { font-size: 12px; }
.assets-dialog { width: min(800px, calc(100% - 24px)); } .assets-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.asset-card { min-width: 0; padding: 9px; text-align: left; background: #171d29; } .asset-card img { width: 100%; height: 110px; object-fit: contain; background: #101621; border-radius: 4px; } .asset-card strong { display: block; margin-top: 7px; font-weight: 500; font-size: 12px; overflow-wrap: anywhere; } .asset-card span { font-size: 10px; color: var(--muted); }
#link-form > .primary { margin-top: 12px; width: 100%; } .history-dialog { width: min(780px, calc(100% - 24px)); }
.history-version { display: block; width: 100%; margin: 7px 0; padding: 10px 12px; text-align: left; background: #202a3b; } .history-version span { color: var(--muted); font-size: 11px; margin-left: 12px; }
#history-body { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow: auto; background: #141b28; border: 1px solid var(--border); border-radius: 6px; padding: 14px; color: #cbd5e6; font: 13px/1.7 Consolas, "Microsoft YaHei", monospace; }
@media (max-width: 1220px) { .workspace.with-inspector { grid-template-columns: 190px minmax(0, 1fr); } .workspace.with-inspector .inspector { grid-column: 2; } .workspace.library-hidden.with-inspector, body.focus-mode .workspace.with-inspector { grid-template-columns: minmax(0, 1fr); } .workspace.library-hidden .inspector, body.focus-mode .inspector { grid-column: 1; } }
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; gap: 10px; flex-wrap: wrap; } .brand { font-size: 20px; } .brand span { font-size: 12px; } .subtitle { font-size: 12px; } .site-link { display: none; }
  main { padding: 0 10px 15px; } .workspace, .workspace.with-inspector, .workspace.library-hidden.with-inspector { grid-template-columns: minmax(0, 1fr); gap: 12px; } .workspace.with-inspector .inspector { grid-column: 1; }
  .library { padding: 12px; } .post-list { max-height: 180px; } .library-note { display: none; } .new-document { margin-top: 10px; } .composer-bar { padding: 13px; align-items: flex-start; } .composer-name h1 { font-size: 16px; } .window-controls { max-width: 190px; }
  .metadata-row { padding: 14px; gap: 10px; flex-wrap: wrap; } .category-field, .tag-field { flex: 1 1 130px; } .status-pill { margin: 0; } .title-row { margin: 0 14px; } .title-row input { font-size: 21px; }
  .body-heading { margin: 14px 14px 8px; } .drop-zone { margin: 0 14px; } textarea { min-height: 40vh; font-size: 14px; } .document-footer { padding: 12px 14px 16px; }
  .action-row { flex-wrap: wrap; } .primary-actions { width: 100%; justify-content: flex-end; } .format-toolbar { gap: 4px; } .format-toolbar button, .format-toolbar select { padding: 5px 7px; }
  #save-state { margin-left: 0; flex-basis: 100%; } .login-card { margin-top: 35px; padding: 26px; } dialog { padding: 18px; } .placeholder { min-height: 45vh; padding: 70px 18px; }
}
