/* ============================================================
   个人博客 · UI 设计系统 (Design Tokens + Components + Pages)
   纯静态原型：无外部字体 / 无外链图片，离线可直接打开
   ============================================================ */
:root {
  --bg: #f6f7fc;
  --surface: #ffffff;
  --surface-2: #f2f3fb;
  --text: #1c1e2d;
  --text-2: #4a4e66;
  --muted: #8b90a8;
  --line: #e8eaf4;
  --primary: #6c5ce7;
  --primary-2: #9a7cf8;
  --primary-soft: #efecff;
  --accent: #ff7ea8;
  --cyan: #43c6db;
  --green: #2bb673;
 --amber: #f5a623;
  --danger: #f05a6b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(38, 42, 92, .07);
  --shadow-lg: 0 18px 48px rgba(38, 42, 92, .14);
  --sidebar-w: 244px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 14px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: #ded8ff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d7d9ea; border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 图标：本地 SVG sprite（assets/icons.svg → icons.js） ---------- */
.icon {
  width: 1em; height: 1em; display: inline-block; flex: none;
  vertical-align: -.15em; color: inherit;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.btn .icon { font-size: 16px; }
.btn-sm .icon { font-size: 14px; }
.badge .icon { font-size: 12px; }
.icon-btn .icon { font-size: 17px; }
.lead .icon { font-size: 16px; }
.brand .logo .icon { font-size: 20px; color: #fff; }
.stat-ico .icon { font-size: 22px; }
.quick-item .ico { font-size: 18px; }
.vis-opt .ico { font-size: 16px; }
.cat-add .ico { font-size: 30px; }
.empty .ico { font-size: 42px; color: var(--primary-2); }
.side-card > b .icon { font-size: 13px; vertical-align: -.18em; margin-right: 3px; }
.auto-tip .icon { font-size: 16px; }
.toast .icon { font-size: 17px; color: #6ee0a5; }
.pane-head .icon { font-size: 14px; vertical-align: -.18em; margin-right: 3px; }
.extract-panel h4 .icon { font-size: 13px; vertical-align: -.18em; margin-right: 3px; }
.md-img-ph .icon { font-size: 14px; vertical-align: -.18em; margin-right: 4px; }
.sq-hero h1 .icon { font-size: 26px; vertical-align: -.22em; margin-right: 8px; }
.tool-btn .icon { font-size: 15px; }

/* ---------- 基础组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 11px; font-weight: 600;
  transition: .2s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; box-shadow: 0 8px 20px rgba(108, 92, 231, .28);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(108, 92, 231, .38); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: #e5dfff; }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); color: var(--text-2); }
.btn-ghost:hover { border-color: #cfc9ff; color: var(--primary); }
.btn-danger { background: #fff0f2; color: var(--danger); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid;
  place-items: center; color: var(--muted); transition: .18s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--primary); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 22px 24px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.section-title h2 { font-size: 17px; margin: 0; letter-spacing: -.2px; }
.section-title .sub { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px;
  padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2);
}
.badge.pub { background: #e8f8f0; color: #1a9c60; }
.badge.draft { background: #f3f4f9; color: #8b90a8; }
.badge.private { background: #fff3e8; color: #c47a12; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.chip {
  height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; transition: .18s;
}
.chip:hover { border-color: #cfc9ff; color: var(--primary); }
.chip.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(108,92,231,.24);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface);
  border-radius: 11px; padding: 0 14px; height: 42px; color: var(--text);
  outline: none; transition: .18s;
}
.textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(108, 92, 231, .10);
}
.input::placeholder, .textarea::placeholder { color: #aeb2c6; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-left: 40px; }
.input-wrap .lead { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted);
  display: flex; align-items: center; font-size: 16px; }
.search-wrap { position: relative; }
.search-wrap .lead { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted);
  display: flex; align-items: center; font-size: 16px; }
.search-wrap .input { padding-left: 38px; }

/* 通用开关 switch：44 × 24，灰底 → 紫色渐变，滑块带缓动 */
.switch {
  position: relative; display: inline-flex; align-items: center;
  width: 44px; height: 24px; flex: none; vertical-align: middle; cursor: pointer;
}
.switch input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; z-index: 2;
}
.switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: #dfe1ef; box-shadow: inset 0 1px 2px rgba(38, 42, 92, .12);
  transition: background .22s ease, box-shadow .22s ease;
}
.switch .track::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  box-shadow: 0 1px 3px rgba(38, 42, 92, .28), 0 2px 6px rgba(38, 42, 92, .12);
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}
.switch:hover .track { box-shadow: inset 0 1px 2px rgba(38, 42, 92, .16), 0 0 0 4px rgba(108, 92, 231, .08); }
.switch input:checked + .track {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: inset 0 1px 2px rgba(60, 40, 180, .22);
}
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid rgba(108, 92, 231, .55); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .55; cursor: not-allowed; }
.switch input:disabled { cursor: not-allowed; }

.avatar {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.avatar.lg { width: 48px; height: 48px; border-radius: 15px; font-size: 18px; }
.avatar.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }

/* 封面：纯 CSS 渐变 + 几何光斑，不依赖外链图片 */
.cover {
  position: relative; overflow: hidden; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, #a18bff, #6c5ce7);
}
.cover::before, .cover::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.22);
}
.cover::before { width: 130px; height: 130px; right: -28px; top: -40px; }
.cover::after { width: 76px; height: 76px; left: 18%; bottom: -36px; background: rgba(255,255,255,.14); }
.cover.g1 { background: linear-gradient(135deg, #8f7cff, #5b8def); }
.cover.g2 { background: linear-gradient(135deg, #ff9db8, #ff6f91); }
.cover.g3 { background: linear-gradient(135deg, #58d5d0, #3ba7d9); }
.cover.g4 { background: linear-gradient(135deg, #6fd6a2, #2bb673); }
.cover.g5 { background: linear-gradient(135deg, #ffc978, #f59042); }
.cover.g6 { background: linear-gradient(135deg, #a0a8ff, #7b6cf6); }
.cover .cover-mark {
  position: absolute; left: 14px; bottom: 12px; color: rgba(255,255,255,.92);
  font-size: 11px; font-weight: 700; letter-spacing: .5px; z-index: 1;
}
/* 真实封面图（cover_image）铺满渐变占位层 */
.cover .cover-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
}

/* ---------- 应用框架 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); position: fixed; inset: 0 auto 0 0; z-index: 20;
  background: rgba(255,255,255,.86); backdrop-filter: blur(14px);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 26px 16px 18px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 30px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; font-size: 19px; box-shadow: 0 8px 18px rgba(108,92,231,.28);
}
.brand .name { font-size: 16px; font-weight: 800; letter-spacing: -.4px; }
.brand .name small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; letter-spacing: .6px; }
.nav-label { font-size: 10.5px; color: #aeb2c6; font-weight: 700; letter-spacing: 1.2px; padding: 0 12px; margin: 12px 0 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px;
  border-radius: 11px; color: var(--text-2); font-weight: 500; margin-bottom: 4px; transition: .18s;
}
.nav-item .ico { font-size: 19px; }
.nav-item:hover { background: var(--surface-2); color: var(--primary); }
.nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff;
  box-shadow: 0 8px 18px rgba(108,92,231,.25);
}
.nav-item .count {
  margin-left: auto; font-size: 11px; background: rgba(255,255,255,.22);
  padding: 1px 8px; border-radius: 999px;
}
.nav-item:not(.active) .count { background: var(--surface-2); color: var(--muted); }
.sidebar-bottom { margin-top: auto; }
.side-card {
  background: linear-gradient(135deg, #f0edff, #fdf0f6); border-radius: 14px;
  padding: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 14px;
  border: 1px solid #ece7ff;
}
.side-card > b { display: block; color: var(--text); font-size: 13px; margin-bottom: 4px; }
.side-card code { background: rgba(108,92,231,.11); color: #6353c9; padding: 1px 5px; border-radius: 5px; font-size: 11px; }
.user-mini { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; }
.user-mini:hover { background: var(--surface-2); }
.user-mini .meta { min-width: 0; }
.user-mini .meta b { display: block; font-size: 13px; }
.user-mini .meta span { font-size: 11.5px; color: var(--muted); }

.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; }
.topbar {
  height: 70px; position: sticky; top: 0; z-index: 15; display: flex; align-items: center;
  gap: 18px; padding: 0 34px; background: rgba(246,247,252,.82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar .page-title { font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.topbar .crumb { font-size: 12px; color: var(--muted); }
.topbar .spacer { flex: 1; }
.topbar .search { width: 250px; }
.content { max-width: 1280px; padding: 28px 34px 70px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-head h1 { font-size: 25px; margin: 0 0 5px; letter-spacing: -.7px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- 登录 / 注册 ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 46% 54%; }
.auth-left {
  position: relative; overflow: hidden; padding: 60px 62px; color: #fff;
  background: linear-gradient(145deg, #6c5ce7 0%, #8a6cf0 48%, #ff7ea8 130%);
  display: flex; flex-direction: column;
}
.auth-left::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  border: 70px solid rgba(255,255,255,.09); right: -220px; top: -140px;
}
.auth-left::after {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,.10); left: -110px; bottom: -90px;
}
.auth-left .brand { padding: 0; position: relative; z-index: 1; }
.auth-left .brand .logo { background: rgba(255,255,255,.2); box-shadow: none; backdrop-filter: blur(6px); }
.auth-left .brand .name small { color: rgba(255,255,255,.75); }
.auth-hero { margin-top: auto; position: relative; z-index: 1; }
.auth-hero h1 { font-size: 40px; line-height: 1.28; letter-spacing: -1.4px; margin: 0 0 16px; font-weight: 800; }
.auth-hero p { font-size: 14px; color: rgba(255,255,255,.85); max-width: 360px; margin: 0 0 34px; }
.auth-feats { display: flex; flex-direction: column; gap: 12px; }
.auth-feats div { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.92); }
.auth-feats .feat-ico {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255,255,255,.2); font-size: 15px; flex: none;
}
.auth-foot { margin-top: 44px; font-size: 11.5px; color: rgba(255,255,255,.6); position: relative; z-index: 1; }
.auth-right { display: grid; place-items: center; padding: 40px; background: var(--bg); }
.auth-box { width: 100%; max-width: 408px; }
.auth-box h2 { font-size: 27px; margin: 0 0 6px; letter-spacing: -.7px; }
.auth-box > p { color: var(--muted); margin: 0 0 28px; font-size: 13px; }
.auth-tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 5px; border-radius: 12px; margin-bottom: 26px; }
.auth-tabs button { flex: 1; height: 36px; border-radius: 9px; font-weight: 600; color: var(--muted); font-size: 13px; }
.auth-tabs button.active { background: #fff; color: var(--primary); box-shadow: 0 3px 10px rgba(38,42,92,.08); }
.auth-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin: 4px 0 22px; }
.auth-row a { color: var(--primary); font-weight: 600; }
.auth-alt { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11.5px; margin: 24px 0; }
.auth-alt::before, .auth-alt::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.social-row .btn { border: 1px solid var(--line); background: #fff; font-weight: 500; color: var(--text-2); }
.auth-tip { margin-top: 22px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.8; }

/* ---------- 首页 ---------- */
.hero-banner {
  position: relative; overflow: hidden; border-radius: 22px; padding: 34px 38px; color: #fff;
  background: linear-gradient(120deg, #6c5ce7, #9a7cf8 55%, #ff9bb8 130%);
  box-shadow: 0 16px 40px rgba(108,92,231,.24); margin-bottom: 24px;
}
.hero-banner::after {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  border: 46px solid rgba(255,255,255,.12); right: -60px; top: -110px;
}
.hero-banner h1 { font-size: 26px; margin: 0 0 8px; letter-spacing: -.6px; position: relative; z-index: 1; }
.hero-banner p { margin: 0 0 20px; color: rgba(255,255,255,.86); font-size: 13px; position: relative; z-index: 1; }
.hero-banner .btn { background: #fff; color: var(--primary); position: relative; z-index: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 20px 22px; display: flex; align-items: center; gap: 16px; }
.stat-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; flex: none; }
.stat-ico.p { background: #efecff; } .stat-ico.g { background: #e8f8f0; }
.stat-ico.c { background: #e7f7fb; } .stat-ico.a { background: #fff0f4; }
.stat-card .num { font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.6px; }
.stat-card .lbl { font-size: 12px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1.65fr 1fr; gap: 20px; }
.mini-post { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mini-post:last-child { border-bottom: 0; }
.mini-post .cover { width: 60px; height: 48px; }
.mini-post .info { min-width: 0; flex: 1; }
.mini-post .info b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-post .info span { font-size: 11.5px; color: var(--muted); }
.cat-bar { display: flex; align-items: center; gap: 10px; margin: 12px 0; font-size: 12.5px; }
.cat-bar .name { width: 76px; color: var(--text-2); }
.cat-bar .bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.cat-bar .bar i { display: block; height: 100%; border-radius: 99px; }
.cat-bar .n { width: 22px; text-align: right; color: var(--muted); }
.quick-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  background: var(--surface-2); margin-bottom: 10px; font-size: 13px; font-weight: 600;
}
.quick-item .ico { font-size: 18px; }
.quick-item:hover { background: var(--primary-soft); color: var(--primary); }

/* ---------- 我的博客列表 ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; margin-bottom: 16px;
}
.filter-bar .search-wrap { width: 260px; }
.filter-bar .select { width: 148px; }
.filter-bar .spacer { flex: 1; }
.filter-chips { margin-bottom: 18px; }
.post-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  border-bottom: 1px solid var(--line); transition: .18s;
}
.post-row:last-child { border-bottom: 0; }
.post-row:hover { background: #fafaff; }
.post-row .cover { width: 86px; height: 62px; }
.post-row .body { flex: 1; min-width: 0; }
.post-row .body b { font-size: 14.5px; display: block; margin-bottom: 3px; }
.post-row .body p { margin: 0 0 8px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-row .meta-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-row .ops { display: flex; align-items: center; gap: 4px; }
.post-row .pub-cell { width: 116px; text-align: center; flex: none; }
.post-row .pub-cell > span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.post-row .pub-cell > span.on { color: var(--primary); font-weight: 600; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 22px; }
.pager button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text-2); font-size: 13px; }
.pager button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager button:hover:not(.active) { border-color: #cfc9ff; color: var(--primary); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ico { font-size: 42px; display: block; margin-bottom: 12px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }

/* ---------- 写博客 ---------- */
.editor-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.editor-head .spacer { flex: 1; }
.auto-tip {
  display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 11px;
  background: #f0edff; color: #6a58cf; font-size: 12.5px; margin-bottom: 16px;
}
.editor-shell {
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
  height: 620px; min-height: 560px;
}
.editor-pane { display: flex; flex-direction: column; min-width: 0; }
.editor-pane + .editor-pane { border-left: 1px solid var(--line); background: #fcfcff; }
.pane-head {
  height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 14px;
  border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--text-2);
  background: #fff;
}
.pane-head .spacer { flex: 1; }
.tool-btn {
  width: 28px; height: 28px; border-radius: 7px; font-size: 12px; color: var(--muted);
  font-weight: 700; display: inline-grid; place-items: center;
}
.tool-btn:hover { background: var(--primary-soft); color: var(--primary); }
.md-input {
  flex: 1; width: 100%; border: 0; outline: 0; resize: none; padding: 20px 22px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px; line-height: 1.85; color: var(--text); background: #fff;
}
.md-preview { flex: 1; padding: 22px 26px; overflow: auto; }
.md-preview .article-title { font-size: 24px; margin: 0 0 8px; letter-spacing: -.5px; }
.md-preview .article-meta { color: var(--muted); font-size: 12px; margin-bottom: 22px; }
.md-img-ph {
  border-radius: 12px; padding: 22px; text-align: center; font-size: 12px; color: #fff;
  background: linear-gradient(135deg, #8f7cff, #ff9db8); margin: 14px 0; font-weight: 600;
}
.extract-panel { margin: 0 22px 20px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.extract-panel h4 { margin: 0 0 10px; font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.extract-grid { display: grid; grid-template-columns: 62px 1fr; gap: 10px 12px; font-size: 12.5px; align-items: start; }
.extract-grid .k { color: var(--muted); }
.extract-grid .v { color: var(--text); word-break: break-all; }
.extract-grid .cover { width: 62px; height: 44px; }
.editor-meta { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 18px; margin-top: 18px; }
.visibility-box { display: flex; gap: 10px; }
.vis-opt {
  flex: 1; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px;
  display: flex; align-items: center; gap: 9px; font-size: 12.5px; cursor: pointer; background: #fff;
}
.vis-opt.on { border-color: var(--primary-2); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.vis-opt .ico { font-size: 16px; }
.word-count { text-align: right; font-size: 11.5px; color: var(--muted); margin-top: 10px; }

/* ---------- 分类管理 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cat-card { padding: 20px 22px; position: relative; overflow: hidden; transition: .2s; }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cat-card .stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.cat-card .top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cat-card h3 { margin: 0; font-size: 16px; }
.cat-card p { margin: 0 0 16px; color: var(--muted); font-size: 12.5px; min-height: 36px; }
.cat-card .foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }
.cat-add {
  border: 2px dashed #d9dcf0; border-radius: var(--radius); display: grid; place-items: center;
  min-height: 178px; color: var(--muted); background: rgba(255,255,255,.5); transition: .2s;
}
.cat-add:hover { border-color: var(--primary-2); color: var(--primary); background: var(--primary-soft); }
.cat-add .ico { font-size: 30px; display: block; }
.color-row { display: flex; gap: 10px; }
.color-row button { width: 28px; height: 28px; border-radius: 9px; border: 2px solid transparent; }
.color-row button.on { border-color: var(--text); transform: scale(1.1); }

/* ---------- 广场 ---------- */
.sq-hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 36px 40px; margin-bottom: 24px;
  background: linear-gradient(120deg, #43c6db, #6c5ce7 60%, #ff7ea8 130%); color: #fff;
}
.sq-hero::after {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  border: 44px solid rgba(255,255,255,.13); right: -50px; bottom: -130px;
}
.sq-hero h1 { font-size: 27px; margin: 0 0 6px; letter-spacing: -.6px; position: relative; z-index: 1; }
.sq-hero p { margin: 0 0 20px; color: rgba(255,255,255,.88); font-size: 13px; position: relative; z-index: 1; }
.sq-hero .search-wrap { max-width: 420px; position: relative; z-index: 1; }
.sq-hero .input { background: rgba(255,255,255,.95); border: 0; }
.sq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sq-card { overflow: hidden; transition: .22s; display: flex; flex-direction: column; }
.sq-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.sq-card > .cover { height: 148px; border-radius: 0; }
.sq-card .inner { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.sq-card h3 { font-size: 15.5px; margin: 0 0 8px; line-height: 1.45; letter-spacing: -.2px; }
.sq-card p { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; flex: 1; }
.sq-card .author { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-2); }
.sq-card .author .spacer { flex: 1; }
.sq-card .foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.sq-card .foot .like { margin-left: auto; color: var(--accent); }

/* ---------- 文章详情 ---------- */
.reader { display: grid; grid-template-columns: 1fr 280px; gap: 22px; align-items: start; }
.reader-main { padding: 34px 40px 44px; }
.reader-cover { height: 210px; border-radius: 16px; margin-bottom: 26px; }
.reader h1 { font-size: 30px; line-height: 1.35; letter-spacing: -.8px; margin: 0 0 14px; }
.reader-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin-bottom: 26px; }
.reader-side .card-pad { margin-bottom: 16px; }
.md-body { font-size: 15px; line-height: 1.95; color: #30334a; }
.md-body h1 { font-size: 24px; margin: 30px 0 14px; }
.md-body h2 { font-size: 20px; margin: 28px 0 12px; padding-left: 12px; border-left: 4px solid var(--primary); }
.md-body h3 { font-size: 17px; margin: 22px 0 10px; }
.md-body p { margin: 0 0 16px; }
.md-body ul, .md-body ol { padding-left: 22px; margin: 0 0 16px; }
.md-body li { margin-bottom: 6px; }
.md-body blockquote {
  margin: 18px 0; padding: 12px 18px; border-left: 4px solid var(--primary-2);
  background: var(--primary-soft); border-radius: 0 10px 10px 0; color: var(--text-2);
}
.md-body code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 13px; color: #c0398b; }
.md-body pre { background: #22243a; color: #e7e9ff; padding: 16px 18px; border-radius: 12px; overflow: auto; margin: 18px 0; }
.md-body pre code { background: none; color: inherit; padding: 0; }
.md-body img { border-radius: 12px; margin: 16px 0; }
.md-body hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.md-body a { color: var(--primary); text-decoration: underline; }
.related-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.related-item:last-child { border: 0; }
.related-item .cover { width: 44px; height: 38px; }

/* ---------- 反馈层 ---------- */
.toast-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: 12px;
  background: #22243a; color: #fff; font-size: 13px; box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal-mask {
  position: fixed; inset: 0; background: rgba(24, 26, 46, .42); backdrop-filter: blur(3px);
  z-index: 90; display: grid; place-items: center; padding: 20px;
}
.modal { width: 100%; max-width: 440px; padding: 26px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); animation: toastIn .2s ease; }
.modal h3 { margin: 0 0 6px; font-size: 18px; }
.modal > p { color: var(--muted); font-size: 12.5px; margin: 0 0 22px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ---------- 响应式 ---------- */
.mobile-only { display: none !important; }
@media (max-width: 900px) { .mobile-only { display: inline-grid !important; } }
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .sq-grid, .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .reader { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: .25s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .topbar { padding: 0 18px; }
  .topbar .search { width: 170px; }
  .content { padding: 22px 18px 60px; }
  .auth { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .editor-shell { grid-template-columns: 1fr; height: auto; }
  .editor-pane + .editor-pane { border-left: 0; border-top: 1px solid var(--line); }
  .editor-meta { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .stat-grid, .sq-grid, .cat-grid { grid-template-columns: 1fr; }
  .filter-bar .search-wrap, .filter-bar .select { width: 100%; }
  .post-row { flex-wrap: wrap; }
  .reader-main { padding: 24px 20px; }
}
