/* 博客与论坛。阅读宽度收窄，列表和表单保持轻量。 */
@import url("account-widget.css");

:root {
  --brand: #0a9676;
  --brand-dark: #087a60;
  --brand-soft: #e7f6f2;
  --text: #1c2833;
  --muted: #5c6b7a;
  --line: #e3e9ef;
  --bg: #f5f7f8;
  --card: #fff;
  --warn: #b45309;
  --danger: #b42318;
}

* { box-sizing: border-box; }

html { scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

a { color: var(--brand-dark); }
a:hover { color: var(--brand); }

.c-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 0 18px;
  background: rgba(20, 28, 36, 0.94);
  color: #fff;
}

.c-brand {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.c-nav {
  display: flex;
  gap: 4px;
  flex: 1;
}

.c-nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;
}

.c-nav a:hover,
.c-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.c-wrap {
  width: min(920px, calc(100% - 32px));
  margin: 28px auto 48px;
}

.c-article { width: min(760px, calc(100% - 32px)); }

.c-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

h1 {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 650;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.c-lead, .c-meta { color: var(--muted); margin: 0 0 20px; }

.c-card, .c-thread, .c-reply, .c-editor, .c-side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.c-list { display: flex; flex-direction: column; gap: 10px; }

.c-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
}

.c-card-main { flex: 1; min-width: 0; }

.c-cover {
  width: 168px;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
  background: #e8eef0;
  border: 1px solid var(--line);
}

.c-card:hover { border-color: #b7ddd2; }

.c-card h2, .c-thread h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.4;
}

.c-card p { margin: 0; color: var(--muted); }

.c-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.c-tag, .c-level, .c-bounty, .c-pin {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
}

.c-bounty { background: #fff6e8; color: var(--warn); }
.c-pin { background: #eef2ff; color: #3730a3; }

/* 按钮 / 表单控件 / 页脚的外观统一由 css/site-ui.css 提供，这里只保留布局相关部分 */
.c-boards, .c-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.c-search {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

input, textarea, select { width: 100%; }
input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  accent-color: var(--brand);
  flex: none;
}

textarea { min-height: 220px; resize: vertical; line-height: 1.6; }

.c-search input { flex: 1; }

.c-thread, .c-reply, .c-editor, .c-side { padding: 18px 20px; margin-bottom: 12px; }

.md h1, .md h2, .md h3 { margin: 1.2em 0 0.4em; letter-spacing: 0; }
.md h2 { font-size: 22px; }
.md h3 { font-size: 18px; }
.md p { margin: 0.7em 0; }
.md ul, .md ol { margin: 0.45em 0 0.9em; padding-left: 1.5em; }
.md li { margin: 0.32em 0; }
.md li > ul, .md li > ol { margin: 0.25em 0 0.35em; }
.md ul { list-style: disc; }
.md ul ul { list-style: circle; }
.md ul ul ul { list-style: square; }
.md ol { list-style: decimal; }
.md ol ol { list-style: lower-alpha; }
.md ol ol ol { list-style: lower-roman; }
.md img { max-width: 100%; height: auto; }
.md blockquote {
  margin: 1em 0;
  padding: 4px 0 4px 14px;
  border-left: 3px solid var(--brand);
  color: var(--muted);
}
.md img { border-radius: 8px; margin: 8px 0; }
.md pre {
  background: #15202b;
  color: #e7eef5;
  padding: 14px 16px;
  border-radius: 10px;
  overflow: auto;
  font-size: 13.5px;
  line-height: 1.55;
}
.md code {
  font-family: Consolas, "Sarasa Mono SC", monospace;
  font-size: 0.92em;
}
.md p code, .md li code, .md blockquote code, .md h1 code, .md h2 code, .md h3 code {
  background: #e7f3ef;
  color: #0d5c49;
  padding: 1px 5px;
  border-radius: 4px;
}
.code-chip {
  font-family: Consolas, "Sarasa Mono SC", monospace;
  font-size: 0.92em;
  background: #e7f3ef;
  color: #0d5c49;
  padding: 0 5px;
  border-radius: 4px;
}
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.md del { color: var(--muted); }
.md li.task { list-style: none; margin-left: -1.15em; }
.md li.task input { margin-right: 0.35em; }
.md-table-wrap { overflow-x: auto; margin: 0.9em 0 1.15em; }
.md table { width: 100%; border-collapse: collapse; font-size: 0.95em; line-height: 1.55; }
.md th, .md td {
  border: 1px solid #d5e3dc;
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}
.md th { background: #f3faf7; font-weight: 650; }
.md td.right, .md th.right { text-align: right; }
.md td.center, .md th.center { text-align: center; }

.c-files { list-style: none; padding: 0; margin: 10px 0 0; }
.c-files li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.c-files a, .c-files button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.c-attachments { margin-top: 1.6em; }
.c-attachments h2 { font-size: 18px; margin: 0 0 6px; }
textarea.is-hot, #attachList.is-hot, #blocks.is-hot {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}
#blocks.is-hot { outline: 2px dashed var(--brand); outline-offset: 4px; }
#attachList.drop-target {
  min-height: 28px;
  margin-top: 6px;
  padding: 0 2px;
  border: 0;
  border-radius: 8px;
}
.studio-attach-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
textarea.is-hot { border-style: dashed; }

.c-pager { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }

.c-note {
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 12px 14px;
  color: #24584c;
  font-size: 14px;
}

.admin-strip {
  background: #12382f;
  color: #d8fff3;
  text-align: center;
  font-size: 13px;
  padding: 6px 12px;
}

.admin-strip a { color: #fff; }

.md .math-inline { display: inline-block; vertical-align: middle; }
.md .math-display { display: block; margin: 0.85em 0; overflow-x: auto; overflow-y: hidden; }
.md .math-display .katex-display { margin: 0; }
.math-chip {
  display: inline-block;
  vertical-align: middle;
  padding: 0 2px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
}
.math-chip:hover { background: #f3f0e8; }

body[data-page="studio"].studio-on { overflow: hidden; height: 100vh; background: #fff; }
body[data-page="studio"].studio-on .c-header { flex: none; }

.studio-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  height: calc(100vh - var(--nav-h));
  background: #fff;
}
.studio-shell[hidden] { display: none; }
.studio-shell.is-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.studio-shell.is-collapsed .studio-side {
  padding: 0;
  border-right: 0;
  overflow: hidden;
  visibility: hidden;
}
.studio-side-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6d6962;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.studio-side-toggle:hover { background: #f1efe9; color: #3d3a34; }
.studio-side-toggle svg { width: 18px; height: 18px; }
.studio-shell.is-collapsed .studio-side-toggle svg { transform: scaleX(-1); }
.studio-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.studio-tool svg { width: 16px; height: 16px; flex: none; }
.studio-side {
  background: #f7f6f3;
  border-right: 1px solid #efeeea;
  overflow: auto;
  padding: 14px 12px 24px;
}
.studio-new, .studio-page, .studio-quiet {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.studio-new {
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 650;
  color: #3d3a34;
}
.studio-new:hover { background: #efece6; }
.studio-side-label {
  margin: 16px 8px 6px;
  color: #8d897f;
  font-size: 12px;
}
.studio-page {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding: 6px 8px;
  color: #3f3c36;
  font-size: 14px;
}
.studio-page:hover { background: #efece6; }
.studio-page[aria-current="true"] { background: #e7f3ef; color: #0d5c49; }
.studio-page-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.studio-props { margin-top: 8px; }
.studio-props label, .studio-points label {
  display: block;
  margin: 8px 0 4px;
  color: #8d897f;
  font-size: 12px;
}
.studio-side input, .studio-side select, .studio-side textarea {
  font-size: 13px;
  background: #fff;
}
.studio-points { margin-top: 18px; color: #5c584f; font-size: 13px; }
.studio-points summary { cursor: pointer; }
.studio-quiet {
  margin-top: 8px;
  padding: 4px 2px;
  color: #a33b32;
  font-size: 13px;
}
.studio-main { overflow: auto; background: #fff; }
.studio-top {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 22px;
  background: rgba(255, 255, 255, 0.92);
}
.studio-status { margin-right: auto; color: #8d897f; font-size: 13px; }
.studio-doc {
  --doc-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --doc-size: 16.5px;
  --doc-lh: 1.75;
  --doc-color: #1c2833;
  --doc-h1: 30px;
  --doc-h2: 24px;
  --doc-h3: 19px;
  --doc-quote: #5e6570;
  --doc-quote-bar: #e4e0d6;
  --doc-code-bg: #f6f5f2;
  --doc-rule: #e6e2da;
  width: min(760px, calc(100% - 128px));
  margin: 8px auto 120px;
}
.studio-doc[data-skin="read"] {
  --doc-font: "SimAsst Read", ui-monospace, Consolas, "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --doc-size: 17.5px;
  --doc-lh: 1.9;
  --doc-color: #1d2924;
  --doc-h1: 1.72em;
  --doc-h2: 1.35em;
  --doc-h3: 1.12em;
  --doc-quote: #3d524b;
  --doc-quote-bar: var(--brand);
  --doc-code-bg: #f3f6f4;
  --doc-rule: #e4ebe7;
}
.studio-doc.is-importing { outline: 2px dashed var(--brand); outline-offset: 8px; }
.studio-doc.is-html > #blocks { display: none; }
.studio-html {
  display: block;
  width: 100%;
  height: clamp(320px, 58vh, 640px);
  margin: 6px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbf9;
  color: #1c2833;
  font-family: ui-monospace, Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
  overflow: auto;
  resize: vertical;
  tab-size: 2;
}
.studio-html[hidden] { display: none; }
.studio-preview {
  display: block;
  width: 100%;
  height: clamp(320px, 58vh, 640px);
  margin: 6px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.studio-preview[hidden] { display: none; }
.studio-doc.is-page .studio-html {
  border-color: var(--brand);
  border-left: 3px solid var(--brand);
  background: #fbfffe;
}
.studio-mode {
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 600;
}
.studio-mode.is-page { background: #e7f8f2; color: #0a6a55; }
.studio-mode[hidden] { display: none; }
.studio-title {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--doc-font, inherit);
  color: var(--doc-color, inherit);
  font-size: 32px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.03em;
  min-height: 1.35em;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.studio-title:focus { outline: none; }
.studio-title::placeholder { color: #d0cdc6; }
.blk {
  position: relative;
  margin: 0;
  padding: 4px 0;
}
.blk-gutter {
  position: absolute;
  left: -48px;
  top: 6px;
  width: 46px;
  display: flex;
  gap: 2px;
  opacity: 0;
}
.blk:hover .blk-gutter,
.blk:focus-within .blk-gutter,
.blk.is-dragging .blk-gutter,
.blk.is-menu .blk-gutter { opacity: 1; }
.blk-add, .blk-grip {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #b0aca4;
  cursor: pointer;
  font-size: 16px;
  line-height: 22px;
}
.blk-grip { cursor: grab; font-size: 13px; touch-action: none; }
.blk-add:hover, .blk-grip:hover { background: #f1efe9; color: #4d4942; }
body.is-reordering, body.is-reordering * { cursor: grabbing !important; }
body.is-reordering { user-select: none; }
.blk.is-dragging { opacity: 0.45; }
.blk.drop-before { box-shadow: inset 0 2px 0 #0a9676; }
.blk.drop-after { box-shadow: inset 0 -2px 0 #0a9676; }
.blk-body {
  min-height: 1.7em;
  padding: 2px 0;
  outline: none;
  font-family: var(--doc-font, inherit);
  font-size: var(--doc-size, 16.5px);
  line-height: var(--doc-lh, 1.75);
  color: var(--doc-color, inherit);
  white-space: pre-wrap;
  word-break: break-word;
}
.blk-body.is-empty:before {
  content: attr(data-ph);
  color: #c4c0b6;
  float: left;
  height: 0;
  pointer-events: none;
}
.blk-body.is-composing:before { content: none; }
body.is-cross-select .blk,
body.is-cross-select .blk * { user-select: none; }
body.is-cross-select ::selection { background: transparent; }
.blk-h1 .blk-body { font-size: var(--doc-h1, 30px); font-weight: 700; line-height: 1.35; letter-spacing: -0.02em; }
.blk-h2 .blk-body { font-size: var(--doc-h2, 24px); font-weight: 700; line-height: 1.35; }
.blk-h3 .blk-body { font-size: var(--doc-h3, 19px); font-weight: 650; line-height: 1.4; }
.blk-quote .blk-main { border-left: 3px solid var(--doc-quote-bar, #e4e0d6); padding-left: 12px; }
.blk-quote .blk-body { color: var(--doc-quote, #5e6570); }
.studio-doc[data-skin="read"] .blk-quote .blk-main {
  margin: 0.35em 0;
  padding: 8px 14px;
  background: #f3faf7;
  border-radius: 0 12px 12px 0;
}
.blk.is-selected .blk-main,
.blk.is-selected .blk-hr,
.blk.is-selected .blk-img {
  background: #f6d4d4;
  border-radius: 4px;
}
.blk-code.is-selected .blk-body,
.blk-math.is-selected .blk-body { background: transparent; }
.blk-list { display: flex; gap: 8px; align-items: flex-start; }
.blk-list .blk-body { flex: 1; min-width: 0; }
.blk-mark {
  width: 1.4em;
  flex: none;
  text-align: center;
  color: #8a867e;
  padding-top: 2px;
  user-select: none;
}
.blk-code .blk-body, .blk-math .blk-body, .blk-table .blk-body {
  font-family: Consolas, "Sarasa Mono SC", monospace;
  font-size: 14px;
  line-height: 1.55;
  background: var(--doc-code-bg, #f6f5f2);
  border-radius: 8px;
  padding: 10px 12px;
  color: #1c2833;
}
.studio-doc[data-skin="read"] .blk-code .blk-body,
.studio-doc[data-skin="read"] .blk-math .blk-body,
.studio-doc[data-skin="read"] .blk-table .blk-body {
  font-family: "SimAsst Read", Consolas, "Sarasa Mono SC", monospace;
}
.lang-select {
  width: auto;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8d897f;
  font-size: 12px;
}
.blk-math-out, .blk-table-out { overflow-x: auto; padding: 6px 2px; }
.blk-math-out:empty, .blk-table-out:empty { display: none; }
.blk-math.has-preview:not(:focus-within) .blk-body,
.blk-table.has-preview:not(:focus-within) .blk-body { display: none; }
.blk-math.has-preview:not(:focus-within) .blk-math-out,
.blk-table.has-preview:not(:focus-within) .blk-table-out { cursor: text; min-height: 1.6em; }
.blk-table-out { font-family: var(--doc-font, inherit); font-size: var(--doc-size, 16.5px); color: var(--doc-color, inherit); }
.fmt-chip { cursor: pointer; }
.fmt-link { color: var(--brand-dark); text-decoration: underline; }
.blk-hr { display: flow-root; }
.blk-hr hr { border: 0; border-top: 1px solid var(--doc-rule, #e6e2da); margin: 14px 0; }
.blk.is-selected .blk-hr hr { border-top-color: #c99292; }
.blk-img img { max-width: 100%; border-radius: 8px; display: block; }
.img-alt {
  margin-top: 6px;
  border: 0;
  padding: 2px 0;
  color: #8d897f;
  font-size: 13px;
  background: transparent;
}
.img-remove {
  margin-top: 4px;
  border: 0;
  background: transparent;
  color: #a33b32;
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-size: 12px;
}
.studio-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}
.studio-quick button {
  border: 1px solid #eceae4;
  background: #fff;
  color: #5f5b54;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.studio-quick button:hover { background: #f7f6f3; }
.slash-menu {
  position: fixed;
  z-index: 40;
  width: 260px;
  max-height: 340px;
  overflow: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid #eceae4;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(40, 36, 28, 0.12);
}
.slash-item {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.slash-item.is-active, .slash-item:hover { background: #f4f1ea; }
.slash-ico {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid #eceae4;
  border-radius: 8px;
  color: #5f5b54;
  font-size: 12px;
  background: #fff;
}
.slash-item b { display: block; font-weight: 650; font-size: 14px; }
.slash-item small { display: block; color: #8d897f; font-size: 12px; }
.studio-view { font-size: 13px; }
.studio-skin {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8d897f;
  font-size: 13px;
}
.studio-skin select {
  width: auto;
  border: 1px solid #eceae4;
  border-radius: 8px;
  background: #fff;
  color: #3d3a34;
  font: inherit;
  font-size: 13px;
  padding: 4px 8px;
}
.import-dialog {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(28, 40, 36, 0.35);
}
.import-dialog[hidden] { display: none; }
.import-card {
  width: min(640px, 100%);
  max-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(28, 40, 36, 0.18);
}
.import-card header, .import-card footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
}
.import-card header { border-bottom: 1px solid var(--line); }
.import-card footer { border-top: 1px solid var(--line); }
.import-card header strong { margin-right: auto; }
.import-card footer span { margin-right: auto; color: #8d897f; font-size: 12px; }
.import-meta { margin: 12px 14px 0; color: #5c584f; font-size: 13px; }
.import-preview {
  overflow: auto;
  margin: 8px 14px 14px;
  padding: 8px 2px;
  min-height: 72px;
  max-height: 360px;
}
.import-frame {
  display: block;
  width: 100%;
  height: 320px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

/* 英文：JetBrains Mono；中文：思源宋体简体子集。均为 SIL OFL，可商用。 */
@font-face {
  font-family: "SimAsst Read";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "SimAsst Read";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-serif-sc-400.woff2") format("woff2");
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+FF00-FFEF;
}
.page-read {
  background:
    radial-gradient(1200px 420px at 50% -80px, rgba(10, 150, 118, 0.08), transparent 60%),
    #f3f6f4;
}
.c-read {
  width: min(740px, calc(100% - 32px));
  margin: 28px auto 56px;
}
.c-sheet {
  background: #fff;
  border: 1px solid #e4ebe7;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(22, 40, 34, 0.04), 0 18px 40px rgba(22, 40, 34, 0.05);
  padding: 36px 42px 44px;
}
.c-sheet-head { margin-bottom: 1.35em; }
.page-read .c-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.page-read .c-kicker a { color: var(--brand-dark); text-decoration: none; }
.page-read .c-kicker a:hover { color: var(--brand); }
.page-read h1 {
  font-family: "SimAsst Read", ui-monospace, Consolas, "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 14px;
  font-synthesis: weight;
}
.c-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid #e7eeea;
  color: var(--muted);
  font-size: 13.5px;
}
.c-byline-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b7c4be;
}
.page-read .c-edit { margin: 12px 0 0; }
.page-read .c-edit a {
  font-size: 13px;
  text-decoration: none;
}
.page-read .md {
  font-family: "SimAsst Read", ui-monospace, Consolas, "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: 17.5px;
  line-height: 1.9;
  color: #1d2924;
  overflow-wrap: break-word;
  font-synthesis: weight;
  font-variant-ligatures: none;
}
.c-gate {
  margin-top: 4px;
  padding: 18px 18px 16px;
  background: #f4faf7;
  border: 1px solid #d7ebe3;
  border-radius: 12px;
}
.c-gate p { margin: 0 0 12px; color: #243830; }
.c-gate .c-btn { width: auto; }
.studio-props label.studio-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
  color: #3d3a34;
  font-size: 13px;
}
.studio-check input { width: auto; }
.studio-hint {
  margin: 6px 0 0;
  color: #8d897f;
  font-size: 12px;
  line-height: 1.45;
}
.page-read .md p { margin: 0 0 1.05em; }
.page-read .md h2,
.page-read .md h3 {
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.page-read .md h2 {
  font-size: 1.35em;
  margin: 1.7em 0 0.55em;
  padding-top: 0.2em;
}
.page-read .md h3 { font-size: 1.12em; margin: 1.45em 0 0.4em; }
.page-read .md ol {
  list-style: none;
  margin: 0.55em 0 1.1em;
  padding-left: 0.1em;
  counter-reset: step;
}
.page-read .md ol > li { counter-increment: step; margin: 0.48em 0; }
.page-read .md ol > li::before {
  content: counters(step, ".") ". ";
  color: #087a60;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.page-read .md ol ol > li::before { color: #3d6b84; font-weight: 640; }
.page-read .md ul { margin: 0.5em 0 1em; }
.page-read .md li > ol,
.page-read .md li > ul {
  margin: 0.4em 0 0.5em 0.1em;
  padding: 0.15em 0 0.2em 0.95em;
  border-left: 2px solid #d5ebe3;
}
.page-read .md li > ul { padding-left: 1.35em; }
.page-read .md blockquote {
  margin: 1.15em 0;
  padding: 10px 16px;
  background: #f3faf7;
  border-left: 3px solid var(--brand);
  border-radius: 0 12px 12px 0;
  color: #3d524b;
}
.page-read .md img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.35em auto;
  border-radius: 12px;
  border: 1px solid #e4ebe7;
  background: #f7faf8;
}
.page-read .md pre,
.page-read .md code {
  font-family: "SimAsst Read", Consolas, "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", monospace;
}
.page-read .md pre { border-radius: 12px; }
.page-read .md hr { border-top-color: #e4ebe7; }

@media (max-width: 800px) {
  h1 { font-size: 26px; }
  /* 手机端列表卡片：缩略图撑满行高，文字限行，避免右侧图片上下留白 */
  .c-card { align-items: stretch; gap: 10px; min-height: 104px; padding: 12px; }
  .c-card-main { display: flex; flex-direction: column; justify-content: center; }
  .c-card .c-cover { width: 104px; height: auto; align-self: stretch; border-radius: 10px; }
  .c-card h2 { font-size: 16px; line-height: 1.4; margin-bottom: 4px; }
  .c-card p { font-size: 13px; line-height: 1.5; }
  .c-card h2, .c-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .c-card h2 { -webkit-line-clamp: 2; }
  .c-card p { -webkit-line-clamp: 2; }
  .c-row { gap: 6px; margin-top: 6px; font-size: 12px; }
  .c-header { gap: 8px; }
  body[data-page="studio"].studio-on { overflow: auto; height: auto; }
  .studio-shell { grid-template-columns: 1fr; height: auto; }
  .studio-shell.is-collapsed .studio-side { display: none; }
  .studio-side { max-height: 280px; border-right: 0; border-bottom: 1px solid #efeeea; }
  .studio-doc { width: min(760px, calc(100% - 28px)); }
  .studio-title { font-size: 26px; }
  .blk-gutter { opacity: 1; left: -4px; position: static; width: auto; margin-bottom: 2px; }
  .c-read { width: min(740px, calc(100% - 20px)); margin-top: 16px; }
  .c-sheet { padding: 22px 16px 28px; border-radius: 14px; }
  .page-read .md { font-size: 16.5px; }
}

body[data-page="drive"].disk-on { overflow: hidden; height: 100vh; background: #f4f6f8; }
body[data-page="drive"].disk-on .c-header { flex: none; }
.disk-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  height: calc(100vh - var(--nav-h));
  background: #f4f6f8;
}
.disk-shell[hidden] { display: none; }
.disk-side {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 10px 8px 14px;
}
.disk-side-label {
  margin: 14px 8px 4px;
  color: var(--muted);
  font-size: 12px;
}
.disk-side-label:first-child { margin-top: 2px; }
.disk-nav, .disk-node-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.disk-nav svg, .disk-node-btn svg { width: 18px; height: 18px; flex: none; }
.disk-node-btn span, .disk-nav { min-width: 0; }
.disk-node-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disk-nav:hover, .disk-node-btn:hover { background: #f3f6f8; }
.disk-nav[aria-current="true"], .disk-node.is-current > .disk-node-btn {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 650;
}
.disk-node { padding-left: calc(var(--d, 0) * 14px); }
.disk-node.is-drop > .disk-node-btn,
.disk-nav.is-drop {
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.disk-usage {
  margin-top: auto;
  padding: 12px 8px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.disk-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 12px 16px 8px;
}
.disk-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
}
.disk-tools { display: flex; gap: 8px; flex: none; }
.disk-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.disk-tool svg { width: 16px; height: 16px; flex: none; }
.disk-folder {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  max-width: 480px;
}
.disk-folder[hidden] { display: none; }
.disk-folder input { flex: 1; min-width: 0; }
.disk-folder input, .disk-search, .disk-rename {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  background: #fff;
}
.disk-search { margin-left: auto; width: min(220px, 100%); min-width: 96px; flex: 0 1 220px; }
.disk-views {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.disk-views button {
  width: 34px;
  height: 32px;
  border: 0;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.disk-views button + button { border-left: 1px solid var(--line); }
.disk-views button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-dark); }
.disk-views svg { width: 16px; height: 16px; }
.disk-progress { height: 3px; margin: 0 0 8px; border-radius: 99px; background: #e6eeea; overflow: hidden; }
.disk-progress span { display: block; height: 100%; width: 0; background: var(--brand); }
.disk-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 8px; font-size: 13px; }
.disk-crumbs button { background: none; border: 0; padding: 0 2px; color: var(--brand-dark); font: inherit; cursor: pointer; border-radius: 4px; }
.disk-crumbs button.is-drop { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.disk-crumbs .now { font-weight: 650; }
.disk-board {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.disk-board.is-drop { box-shadow: inset 0 0 0 2px var(--brand); background: #f4fbf8; }
.disk-empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.disk-head, .disk-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 72px 120px 140px 132px;
  gap: 8px;
  align-items: center;
  padding: 0 12px;
}
.disk-head {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 40px;
  background: #f8fbfa;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.disk-head button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.disk-row { min-height: 46px; border-bottom: 1px solid #f0f3f5; cursor: pointer; }
.disk-row[draggable="true"], .disk-tile[draggable="true"] { cursor: grab; }
.disk-row.is-dragging, .disk-tile.is-dragging { opacity: 0.45; }
body.is-node-drag, body.is-node-drag * { cursor: grabbing; }
.disk-row:hover, .disk-row.is-on { background: #f4fbf8; }
.disk-row.is-drop, .disk-tile.is-drop { box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.disk-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.disk-name svg { width: 20px; height: 20px; flex: none; }
.disk-name span, .disk-kind, .disk-time, .disk-size { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disk-size, .disk-time, .disk-kind { color: var(--muted); font-size: 13px; }
.disk-ops { display: flex; flex-wrap: nowrap; gap: 4px; justify-content: flex-end; opacity: 0; }
.disk-row:hover .disk-ops, .disk-row.is-on .disk-ops, .disk-tile:hover .disk-ops, .disk-tile.is-on .disk-ops { opacity: 1; }
.disk-ops button, .disk-ops a {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 0;
  background: #fff;
  border-radius: 6px;
  padding: 0;
  color: var(--brand-dark);
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line);
  text-decoration: none;
}
.disk-ops svg { width: 16px; height: 16px; }
.disk-ops button[data-act="del"] { color: var(--danger); }
.disk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
  padding: 14px;
}
.disk-tile {
  position: relative;
  border-radius: 10px;
  padding: 36px 8px 10px;
  text-align: center;
  cursor: pointer;
}
.disk-tile:hover, .disk-tile.is-on { background: #f4fbf8; }
.disk-ico { display: flex; justify-content: center; margin-bottom: 8px; }
.disk-ico svg { width: 46px; height: 46px; }
.disk-tile-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-all;
}
.disk-tile .disk-ops {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  justify-content: center;
}
.disk-rename { width: min(240px, 100%); }
.disk-status { min-height: 22px; margin: 6px 2px 0; color: var(--muted); font-size: 12px; }
.disk-picker {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 28, 36, 0.45);
}
.disk-picker[hidden] { display: none; }
.disk-picker-card {
  width: min(640px, 100%);
  max-height: min(560px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}
.disk-picker-card header, .disk-picker-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
}
.disk-picker-card header { border-bottom: 1px solid var(--line); }
.disk-picker-card footer { border-top: 1px solid var(--line); }
.disk-picker-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 10px 16px 0;
  font-size: 13px;
}
.disk-picker-crumbs button { background: none; border: 0; padding: 0; color: var(--brand-dark); font: inherit; cursor: pointer; }
.disk-picker-crumbs .sep { color: var(--muted); }
.disk-picker-list {
  overflow: auto;
  flex: 1;
  min-height: 240px;
  margin: 10px 16px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.disk-picker-row {
  display: grid;
  grid-template-columns: 16px 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid #f2f4f6;
  background: #fff;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.disk-picker-row.is-dir { grid-template-columns: 20px minmax(0, 1fr) auto; }
.disk-picker-row:hover, .disk-picker-row.is-on { background: #f4fbf8; }
.disk-picker-row.is-on { background: var(--brand-soft); }
.disk-picker-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  justify-self: center;
}
.disk-picker-ico { width: 20px; height: 20px; display: block; }
.disk-picker-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.disk-picker-size { color: var(--muted); font-size: 12px; white-space: nowrap; }
.disk-picker-card footer span.is-bad { color: var(--danger); }

/* 文件预览：图片 / PDF / 文本 / 表格 */
.disk-preview {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 30, 28, 0.45);
}
.disk-preview[hidden] { display: none; }
.disk-preview-card {
  width: min(1040px, 100%);
  height: min(88vh, 880px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(20, 30, 28, 0.25);
}
.disk-preview-card header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.disk-preview-card header strong {
  margin-right: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.disk-preview-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: #f7f9f8;
}
.disk-preview-frame {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: #fff;
}
.disk-preview-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.disk-preview-scroll.is-center { display: grid; place-items: center; padding: 10px; }
.disk-preview-image { display: block; max-width: 100%; max-height: 100%; }
.disk-preview-text {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #1f2b33;
  font-family: ui-monospace, Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.disk-preview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.disk-preview-table th, .disk-preview-table td {
  max-width: 320px;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid #e3e9e7;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.disk-preview-table thead th {
  position: sticky;
  top: 0;
  background: #f1f7f5;
  color: #0d4c3f;
  font-weight: 650;
}
.disk-preview-note { margin: 8px 4px 0; color: #6b746f; font-size: 12.5px; }
.disk-preview-note.is-bad { color: var(--danger); }

@media (max-width: 800px) {
  body[data-page="drive"].disk-on { overflow: auto; height: auto; }
  .disk-shell { grid-template-columns: 1fr; height: auto; }
  .disk-side { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); }
  .disk-board { min-height: 420px; }
  .disk-head, .disk-row { grid-template-columns: minmax(0, 1fr) 64px auto; }
  .disk-kind, .disk-time { display: none; }
  .disk-search { width: 120px; min-width: 0; }
  .disk-tool span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .disk-tool { position: relative; padding: 7px 8px; }
  .disk-preview { padding: 0; }
  .disk-preview-card { width: 100%; height: 100%; border-radius: 0; }
}

/* 发帖页「仅自己可见」勾选 */
.c-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted, #5c6b7a);
  cursor: pointer;
}
.c-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand, #0a9676);
}

/* 帖子「仅自己可见」提示条 */
.c-note.is-warn {
  border-left: 3px solid var(--warn, #b45309);
  background: rgba(180, 83, 9, 0.08);
  color: var(--warn, #b45309);
}

/* 博客列表：作者管理工具条 */
.c-blog-item { margin-bottom: 14px; }
.c-blog-item .c-card { margin-bottom: 6px; }
.c-item-tools { margin: 0 0 12px; }
