/* ============================================================
   酷智 KuZhi · AI 小说创作平台 — 全站设计系统
   主题：暗夜墨韵（默认）+ 五套扩展主题（纸韵/青瓷/夜蓝/暖沙/绛雪）
   ============================================================ */

:root {
  color-scheme: dark;
  /* 色板 —— 一个项目一个面板：暖墨中性系 */
  --ink-0: #0d0c0a;            /* 页面底色 */
  --ink-1: #14120f;            /* 浮层一 */
  --ink-2: #1b1814;            /* 卡片 */
  --ink-3: #242019;            /* 卡片悬停 / 输入框 */
  --line: rgba(236, 231, 221, .09);
  --line-strong: rgba(236, 231, 221, .2);
  --text: #ece7dd;
  --text-2: #a89f90;
  --text-3: #6f675a;
  --gold: #d2a24c;
  --gold-strong: #e2b56c;
  --gold-ink: #161006;         /* 金底上的文字 */
  --gold-soft: rgba(210, 162, 76, .12);
  --gold-line: rgba(210, 162, 76, .35);
  --bar: rgba(13, 12, 10, .88);       /* 顶栏/导航底（随主题反转） */
  --bar-2: rgba(13, 12, 10, .82);
  --tint: rgba(13, 12, 10, .45);      /* 卡片内嵌条带底（随主题反转） */
  --ok: #8fb98b;
  --err: #d97e6a;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .28);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .5), 0 24px 64px rgba(0, 0, 0, .45);

  /* 半透明叠层（悬停/轨道，随主题反转） */
  --veil: rgba(236, 231, 221, .05);
  --veil-2: rgba(236, 231, 221, .035);
  --veil-3: rgba(236, 231, 221, .02);
  --veil-6: rgba(236, 231, 221, .06);
  --veil-8: rgba(236, 231, 221, .09);
  --glow-1: rgba(210, 162, 76, .07);
  --glow-2: rgba(210, 162, 76, .04);

  /* 字体 */
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas, monospace;

  /* 圆角体系（全站统一规则：按钮/标签全胶囊，卡片 14px，输入框 10px） */
  --r-card: 14px;
  --r-input: 10px;

  --maxw: 1200px;
}

/* ---------------- 基础 ---------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink-0);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--gold); }
::selection { background: var(--gold); color: var(--gold-ink); }

/* 墨色纸张质感底纹 */
.paper-grain {
  position: relative;
}
.paper-grain::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, var(--glow-1), transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 110%, var(--glow-2), transparent 60%);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ---------------- 字号 ---------------- */
.display-1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.18;
  letter-spacing: .01em;
}
.display-2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.3;
}
.lead { font-size: 16px; color: var(--text-2); max-width: 60ch; }
.mono { font-family: var(--font-mono); }
.gold { color: var(--gold); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

/* ---------------- 眉标（每 3 区块至多 1 个） ---------------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 26px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn i { font-size: 18px; }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  color: var(--gold-ink);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 24px rgba(210, 162, 76, .22);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 32px rgba(210, 162, 76, .3); }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: var(--veil-2);
}
.btn-ghost:hover { border-color: var(--gold-line); color: var(--gold-strong); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 34px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  border: 1px solid var(--line-strong);
  color: var(--text-2);
}
.tag-gold { border-color: var(--gold-line); color: var(--gold); background: var(--gold-soft); }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---------------- 顶部导航（营销页） ---------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  border-bottom: 1px solid var(--line);
  background: var(--bar-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}
.site-nav::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(210,162,76,.45) 30%, rgba(210,162,76,.45) 70%, transparent);
}
.site-nav .wrap { height: 100%; display: flex; align-items: center; gap: 36px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 900; font-size: 20px; letter-spacing: .06em; }
.logo-seal {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(150deg, #f0c885, var(--gold) 55%, #a87c33);
  color: var(--gold-ink);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 900; font-size: 17px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 8px rgba(210,162,76,.28);
}
.nav-links { display: flex; gap: 28px; font-size: 14.5px; color: var(--text-2); }
.nav-links a { transition: color .2s; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -6px; width: 16px; height: 2px; border-radius: 2px; background: var(--gold);
}
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.nav-user {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 14px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line-strong);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #3a332a, #241f18);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 14px; color: var(--gold);
}
.nav-burger { display: none; }

/* ---------------- 区块 ---------------- */
.section { padding: 96px 0; position: relative; }
.section-head { margin-bottom: 48px; }
.section-head.center { text-align: center; }
.section-head.center .lead { margin: 16px auto 0; }

/* ---------------- 卡片 ---------------- */
.card {
  background: linear-gradient(180deg, var(--veil-2), transparent 14%), var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.card.hoverable:hover {
  border-color: var(--gold-line);
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.field .error-msg { display: none; font-size: 12.5px; color: var(--err); }
.field.error .error-msg { display: block; }
.field.error .input-wrap { border-color: var(--err); }
.input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-input);
  padding: 0 14px;
  transition: border-color .2s, box-shadow .2s;
}
.input-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.input-wrap i { color: var(--text-3); font-size: 18px; }
.input-wrap input, .input-wrap select, .input-wrap textarea {
  flex: 1; background: none; border: 0; outline: 0;
  padding: 12px 0; font-size: 14.5px; color: var(--text);
  min-width: 0;
}
/* 防输入框内容/占位符撑破 grid/flex 容器(如弹窗双列表单) */
.field, .input-wrap, .m1 { min-width: 0; }
.m1 > * { min-width: 0; }
.input-wrap input::placeholder { color: var(--text-3); }
.input-wrap .suffix { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.input-wrap button.linklike { font-size: 13.5px; color: var(--gold); white-space: nowrap; }
.input-wrap button.linklike:hover { color: var(--gold-strong); }

/* ---------------- 页脚 ---------------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 13.5px; color: var(--text-3); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-grid h4 { font-size: 13px; color: var(--text-2); font-weight: 500; margin-bottom: 14px; letter-spacing: .05em; }
.footer-grid a { display: block; padding: 4px 0; transition: color .2s; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------------- 应用布局（控制台/工作台/个人中心） ---------------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100dvh; }
.app-sidebar {
  border-right: 1px solid var(--line);
  background: var(--ink-1);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100dvh; overflow-y: auto;
}
.app-sidebar .logo { padding: 4px 10px 18px; }
.side-label { font-size: 11px; letter-spacing: .18em; color: var(--text-3); padding: 16px 12px 8px; }
.side-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); font-size: 14px;
  position: relative;
  transition: background .2s, color .2s;
}
.side-item i { font-size: 19px; }
.side-item:hover { color: var(--text); background: var(--veil); }
.side-item.active { color: var(--gold); background: var(--gold-soft); }
.side-item.active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3px; border-radius: 3px; background: var(--gold);
}
.side-item .count { margin-left: auto; font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.side-item.active .count { color: var(--gold); }
.side-foot { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid var(--line); }
.inspire-meter {
  padding: 14px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--ink-2);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .22);
}
.inspire-meter .row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 8px; }
.inspire-meter .num { font-family: var(--font-mono); font-size: 20px; color: var(--gold); font-weight: 700; }
.meter { height: 6px; border-radius: 999px; background: var(--veil-8); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-strong)); transition: width .6s ease; }

.app-main { padding: 0 40px 64px; min-width: 0; overflow-x: hidden; }
.app-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 0; margin-bottom: 8px;
  background: var(--bar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.app-topbar h1 { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.app-topbar .spacer { flex: 1; }
.search-pill {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 16px; color: var(--text-3); font-size: 13.5px;
  min-width: 200px;
}
.search-pill input { border: 0; background: none; outline: 0; color: var(--text); width: 100%; font-size: 13.5px; caret-color: var(--gold); }
.search-pill { transition: border-color .3s ease, box-shadow .3s ease; }
.search-pill:focus-within {
  border-color: var(--gold-line);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.search-pill:focus-within i { color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .search-pill { transition: none; } }

/* ---------------- 统计行（无卡片，用分隔线呼吸） ---------------- */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 8px 0 28px;
}
.stats-row > div { padding: 6px 20px; border-left: 1px solid var(--line); }
.stats-row > div:first-child { border-left: 0; padding-left: 0; }
.stats-row .num { font-family: var(--font-mono); font-size: 29px; font-weight: 700; color: #f7f3ea; letter-spacing: -0.01em; }
.stats-row .num small { font-size: 13px; color: var(--text-3); font-weight: 400; margin-left: 4px; }
.stats-row .lbl { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.stats-row .trend { font-size: 12px; font-family: var(--font-mono); color: var(--ok); }

/* ---------------- 小说卡片 ---------------- */
.novel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.novel-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.novel-card .cover {
  border-radius: 10px; overflow: hidden; position: relative;
  aspect-ratio: 3 / 4; background: linear-gradient(160deg, #2a241c, #17140f);
}
.novel-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.novel-card .cover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32%;
  background: linear-gradient(180deg, transparent, rgba(20, 18, 15, .5));
  pointer-events: none;
}
.novel-card:hover .cover img { transform: scale(1.04); }
.novel-card .cover .status {
  position: absolute; top: 10px; left: 10px;
  font-size: 11px; padding: 2px 10px; border-radius: 999px;
  background: rgba(13, 12, 10, .72); backdrop-filter: blur(6px);
  border: 1px solid rgba(236, 231, 221, .25); color: rgba(236, 231, 221, .88);
}
.novel-card .cover .status.live { color: #e2b56c; border-color: rgba(226, 181, 108, .5); }
.novel-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.novel-card .meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.novel-card .meta .tag { padding: 2px 10px; }
.novel-card .foot { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-3); margin-top: auto; }
.novel-card .foot .btn { padding: 6px 16px; font-size: 13px; }

/* 新建小说卡（虚线占位） */
.new-novel {
  border: 1px dashed rgba(210, 162, 76, .3); border-radius: var(--r-card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 320px; color: var(--text-3); cursor: pointer;
  background: linear-gradient(180deg, rgba(210, 162, 76, .05), transparent 40%);
  transition: border-color .25s, color .25s, background .25s;
}
.new-novel i { font-size: 32px; animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .65; } 50% { transform: scale(1.12); opacity: 1; } }
.new-novel:hover { border-color: var(--gold-line); color: var(--gold); background: var(--gold-soft); }

/* ---------------- 创作工作台 ---------------- */
.writer { display: grid; grid-template-columns: 250px 1fr 320px; height: 100dvh; }
.w-chapters { border-right: 1px solid var(--line); background: var(--ink-1); display: flex; flex-direction: column; }
.w-chapters .head { padding: 18px 18px 12px; display: flex; align-items: center; justify-content: space-between; }
.w-chapters .head h2 { font-size: 15px; font-weight: 700; }
.w-chapters .head button { color: var(--gold); font-size: 20px; }
.chap-list { overflow-y: auto; flex: 1; padding: 4px 10px 20px; }
.chap {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px; font-size: 13.5px; color: var(--text-2); cursor: pointer;
  position: relative;
}
.chap .no { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); width: 26px; }
.chap:hover { background: var(--veil); color: var(--text); }
.chap.active { background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.chap.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px; background: var(--gold);
}
.chap .no { flex-shrink: 0; }
.chap.done .no::after { content: " ·"; color: var(--ok); }

.w-editor {
  display: flex; flex-direction: column; min-width: 0;
  background: linear-gradient(180deg, var(--veil-3), transparent 24%), var(--ink-0);
}
.w-toolbar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 28px; border-bottom: 1px solid var(--line);
  color: var(--text-3); font-size: 13px;
}
.w-toolbar .spacer { flex: 1; }
.w-tool {
  padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.w-tool:hover { background: var(--veil-6); color: var(--text); }
.w-tool i { font-size: 16px; }
.w-title { padding: 30px 56px 0; }
.w-title h1 { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.w-title .sub { font-size: 12.5px; color: var(--text-3); font-family: var(--font-mono); margin-top: 4px; }
.w-body {
  flex: 1; overflow-y: auto; padding: 24px 56px 60px;
}
.w-body p {
  font-family: var(--font-display);
  font-size: 16.5px; line-height: 2.1; color: #ddd6c9;
  margin-bottom: 1.6em;
  max-width: 72ch;
}
.w-body p .cursor {
  display: inline-block; width: 2px; height: 1.1em; background: var(--gold);
  vertical-align: text-bottom; margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.w-body p.ai-gen { color: var(--gold-strong); }
.w-body p.ai-gen::before {
  content: "◆ ";
  font-size: 10px; color: var(--gold); vertical-align: 2px;
}

.w-ai { border-left: 1px solid var(--line); background: var(--ink-1); display: flex; flex-direction: column; }
.w-ai .head { padding: 18px 18px 0; }
.w-ai .head h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.w-ai .head h2 i { color: var(--gold); font-size: 18px; }
.ai-tabs { display: flex; gap: 4px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.ai-tab {
  flex: 1; text-align: center; font-size: 13px; padding: 7px 0; border-radius: 8px; color: var(--text-3);
}
.ai-tab:hover { color: var(--text); }
.ai-tab.active { background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.w-ai .pane { padding: 16px; overflow-y: auto; flex: 1; }
.ai-prompt-box {
  width: 100%; min-height: 96px; resize: vertical;
  background: var(--ink-3); border: 1px solid var(--line-strong); border-radius: var(--r-input);
  padding: 12px 14px; font-size: 13.5px; line-height: 1.7; outline: 0; color: var(--text);
}
.ai-prompt-box:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.ai-pane-label { font-size: 12.5px; color: var(--text-3); margin: 14px 0 8px; }
.ai-result {
  border: 1px solid var(--line); border-radius: var(--r-input); background: var(--ink-2);
  padding: 14px; font-size: 13.5px; line-height: 1.9; color: var(--text-2);
  min-height: 88px;
}
.ai-result.typing { color: var(--gold-strong); }
.ai-result .ph { color: var(--text-3); }
.ai-actions { display: flex; gap: 10px; margin-top: 12px; }
.ai-actions .btn { flex: 1; padding: 9px 0; font-size: 13.5px; }
.model-pick { display: flex; flex-direction: column; gap: 8px; }
.model-opt {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-input); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.model-opt:hover { border-color: var(--gold-line); }
.model-opt:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.model-opt input { accent-color: var(--gold); }
.model-opt .name { font-size: 13.5px; }
.model-opt .cost { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.model-opt .desc { font-size: 11.5px; color: var(--text-3); }
.ai-cost-row {
  margin-top: auto; padding: 14px 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-3);
}

/* 加载骨架 */
.skeleton-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--ink-3) 25%, var(--ink-2) 50%, var(--ink-3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; margin: 10px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- 定价 / 充值 ---------------- */
.plan-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: stretch; }
.plan { padding: 28px 24px; display: flex; flex-direction: column; position: relative; }
.plan .name { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.plan .price { font-family: var(--font-mono); font-size: 36px; font-weight: 700; margin: 14px 0 2px; }
.plan .price small { font-size: 13px; color: var(--text-3); font-weight: 400; }
.plan .per { font-size: 12.5px; color: var(--text-3); margin-bottom: 18px; }
.plan ul { list-style: none; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--text-2); }
.plan ul li { display: flex; gap: 8px; align-items: flex-start; }
.plan ul li i { color: var(--gold); font-size: 15px; margin-top: 3px; }
.plan ul li.na { color: var(--text-3); }
.plan ul li.na i { color: var(--text-3); }
.plan .btn { margin-top: auto; }
.plan.featured {
  border-color: var(--gold-line);
  background: linear-gradient(180deg, rgba(210,162,76,.09), var(--ink-2) 45%);
  box-shadow: 0 0 0 1px rgba(210, 162, 76, .18), 0 18px 48px rgba(210, 162, 76, .1);
}
.plan .badge-top {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--gold-ink); font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 3px 14px; white-space: nowrap;
}

.gem-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.gem-card {
  padding: 22px 16px 18px; text-align: center; cursor: pointer; position: relative;
  display: flex; flex-direction: column; gap: 6px;
}
.gem-card .gems { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--gold); display: flex; align-items: center; justify-content: center; gap: 8px; }
.gem-card .gems i { font-size: 22px; }
.gem-card .cny { font-family: var(--font-mono); font-size: 16px; color: var(--text); }
.gem-card .bonus { font-size: 11.5px; color: var(--gold-strong); }
.gem-card:hover { border-color: var(--gold-line); transform: translateY(-3px); box-shadow: var(--shadow-1); }
.gem-card.selected { border-color: var(--gold); background: var(--gold-soft); }
.gem-card .hot {
  position: absolute; top: -10px; right: 12px; font-size: 10.5px;
  background: var(--gold); color: var(--gold-ink); border-radius: 999px; padding: 2px 10px; font-weight: 700;
}

.pay-row { display: flex; gap: 12px; margin-top: 20px; }
.pay-opt {
  flex: 1; display: flex; align-items: center; gap: 10px; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--r-input);
  padding: 12px; font-size: 14px; cursor: pointer; transition: border-color .2s;
}
.pay-opt:hover { border-color: var(--gold-line); }
.pay-opt i { font-size: 20px; color: var(--gold); }

/* ---------------- 表格 ---------------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  text-align: left; font-weight: 600; color: var(--text-3); font-size: 12.5px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-strong); letter-spacing: .05em;
}
.data-table td { padding: 16px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.data-table tr:hover td { background: var(--veil-3); }
.data-table .amt { font-family: var(--font-mono); }
.data-table .amt.plus { color: var(--gold-strong); font-weight: 700; }
.data-table .amt.minus { color: var(--text); }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 7, 5, .68); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-mask.open { display: flex; animation: fadeIn .2s ease; }
.modal {
  width: min(440px, 100%); background: var(--ink-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-card); padding: 28px; box-shadow: var(--shadow-2);
  animation: rise .25s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fadeIn { from { opacity: 0; } }
.modal h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-bottom: 18px; }
.modal .row-line { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.modal .row-line b { color: var(--text); font-family: var(--font-mono); }
.modal .actions { display: flex; gap: 12px; margin-top: 22px; }
.modal .actions .btn { flex: 1; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--ink-3); border: 1px solid var(--gold-line); color: var(--text);
  border-radius: 999px; padding: 11px 24px; font-size: 14px; z-index: 200;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-2);
  opacity: 0; transition: all .35s cubic-bezier(.2,.9,.3,1.2); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast i { color: var(--gold); font-size: 18px; }

/* ---------------- 入场动效 ---------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .gem-grid { grid-template-columns: repeat(3, 1fr); }
  .novel-grid { grid-template-columns: repeat(2, 1fr); }
  .writer { grid-template-columns: 210px 1fr; }
  .w-ai { position: fixed; right: 0; top: 0; bottom: 0; width: 320px; transform: translateX(100%); transition: transform .3s ease; z-index: 60; box-shadow: var(--shadow-2); }
  .w-ai.open { transform: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .stats-row > div:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .app { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; z-index: 80; left: 0; width: 232px; transform: translateX(-100%); transition: transform .3s ease; }
  .app-sidebar.open { transform: none; }
  .writer { grid-template-columns: 1fr; }
  .w-chapters { display: none; }
  .w-body, .w-title { padding-left: 24px; padding-right: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
}
@media (max-width: 620px) {
  .plan-grid, .novel-grid, .gem-grid { grid-template-columns: 1fr; }
  .app-main { padding: 0 18px 48px; }
}

/* ---------------- 功能扩展组件（v4 · 67 项功能升级） ---------------- */

/* 通用筛选页签 */
.chip-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 22px 0 18px; }
.chip { padding: 7px 16px; border-radius: 999px; font-size: 13.5px; color: var(--text-2); border: 1px solid transparent; cursor: pointer; background: none; font-family: inherit; }
.chip:hover { color: var(--text); }
.chip.active { color: var(--gold); background: var(--gold-soft); border-color: var(--gold-line); }
.chip .n { font-size: 11.5px; color: var(--text-3); font-family: var(--font-mono); margin-left: 4px; }

/* 指标卡组 */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.metric { padding: 18px 20px; }
.metric .v { font-family: var(--font-mono); font-size: 24px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; }
.metric .v small { font-size: 12.5px; color: var(--text-3); font-weight: 400; }
.metric .l { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.metric .trend { font-size: 12px; font-family: var(--font-mono); margin-left: auto; }
.trend.up { color: #7fb069; } .trend.down { color: #c96f5e; }

/* 垂直时间线 */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink-2); border: 1px solid var(--text-3); }
.tl-item.gold::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(210,162,76,.15); }
.tl-item .tt { font-size: 14.5px; font-weight: 600; }
.tl-item .td { font-size: 13px; color: var(--text-3); margin-top: 3px; line-height: 1.7; }
.tl-item .tm { font-size: 11.5px; font-family: var(--font-mono); color: var(--text-3); margin-top: 5px; }

/* 对话气泡（智能体 / 角色测试） */
.chat-flow { display: flex; flex-direction: column; gap: 14px; }
.bubble { max-width: 78%; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.8; }
.bubble.user { align-self: flex-end; background: var(--gold-soft); border: 1px solid var(--gold-line); border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: var(--ink-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble .who { font-size: 11px; letter-spacing: .12em; color: var(--text-3); margin-bottom: 6px; font-family: var(--font-mono); }
.bubble.ai .who { color: var(--gold); }
.chat-input { display: flex; gap: 10px; margin-top: 18px; }
.chat-input input, .chat-input textarea { flex: 1; }

/* ---------- 沉浸式对话墨池（紧凑变体：智能体/拆书等） ---------- */
.inkwell-chat {
  position: relative;
  flex: 1;
  border-radius: var(--r-input);
  border: 1px solid var(--line);
  background:
    radial-gradient(320px 120px at 50% -40px, var(--glow-1), transparent 72%),
    var(--ink-3);
  transition: border-color .35s ease, box-shadow .35s ease;
}
.inkwell-chat:focus-within {
  border-color: var(--gold-line);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.inkwell-chat textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  max-height: 160px;
  padding: 12px 16px 6px;
  background: transparent;
  border: 0;
  outline: 0;
  resize: none;
  overflow: hidden;
  color: var(--text);
  caret-color: var(--gold);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.7;
}
.inkwell-chat textarea::placeholder { color: var(--text-3); }
.inkwell-chat .meta {
  display: flex; align-items: center;
  padding: 0 14px 10px;
  font-size: 11.5px;
  color: var(--text-3);
  font-family: var(--font-mono);
}
.inkwell-chat .meta .hint { margin-right: auto; opacity: .85; }

/* ---------- 沉浸式邀请墨池（链接展示变体：社区邀请返利） ---------- */
.inkwell-link {
  position: relative;
  margin-top: 14px;
  padding: 20px 24px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    radial-gradient(420px 150px at 50% -50px, var(--glow-1), transparent 72%),
    var(--ink-1);
  cursor: copy;
  user-select: all;
  transition: border-color .35s ease, box-shadow .35s ease, transform .2s ease;
}
.inkwell-link:hover, .inkwell-link:focus-visible {
  border-color: var(--gold-line);
  box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow-1);
  outline: 0;
}
.inkwell-link:active { transform: translateY(1px) scale(.995); }
.inkwell-link .label {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--gold);
  text-transform: uppercase;
}
.inkwell-link .url {
  display: block;
  margin: 10px 0 12px;
  font-family: var(--font-mono);
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--gold-strong);
}
.inkwell-link .sub {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px;
  font-size: 12px;
  color: var(--text-3);
}
.inkwell-link .sub b { color: var(--text); font-weight: 600; }
.inkwell-link .sub .act {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--gold-strong);
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  padding: 4px 13px;
  background: var(--glow-1);
  transition: .25s ease;
}
.inkwell-link .sub .act:hover { background: var(--gold-soft); }
.inkwell-link .sub .act.done { color: var(--ok); border-color: transparent; background: transparent; }
@media (prefers-reduced-motion: reduce) { .inkwell-link { transition: none; } }

/* 开关 */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .knob { position: absolute; inset: 0; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line); transition: .25s; }
.switch .knob::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-3); transition: .25s; }
.switch input:checked + .knob { background: var(--gold-soft); border-color: var(--gold); }
.switch input:checked + .knob::after { transform: translateX(18px); background: var(--gold); }

/* 向导步骤条 */
.steps { display: flex; gap: 0; margin: 26px 0 30px; }
.step { flex: 1; text-align: center; position: relative; font-size: 13px; color: var(--text-3); }
.step::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 1px; background: var(--line); }
.step:first-child::before { display: none; }
.step .dot { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink-2); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 13px; margin-bottom: 8px; }
.step.done .dot { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.step.now .dot { background: var(--gold); border-color: var(--gold); color: #14120e; font-weight: 700; }
.step.now, .step.done { color: var(--text); }

/* 拖放区 */
.dropzone { border: 1.5px dashed var(--line); border-radius: var(--r-card); padding: 44px 24px; text-align: center; transition: .25s; background: rgba(236,231,221,.015); }
.dropzone:hover { border-color: var(--gold-line); background: var(--gold-soft); }
.dropzone i { font-size: 34px; color: var(--gold); }
.dropzone h3 { font-family: var(--font-display); font-size: 17px; margin: 12px 0 6px; }
.dropzone p { font-size: 13px; color: var(--text-3); }

/* 通用数据表 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .1em; color: var(--text-3); font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: rgba(236,231,221,.02); }

/* 分段预算条（上下文 / token） */
.budget { display: flex; height: 14px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.budget span { height: 100%; }
.budget-lg { flex-direction: column; height: auto; border: none; overflow: visible; gap: 8px; }
.budget-lg .row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.budget-lg .bar { height: 9px; border-radius: 999px; background: var(--ink-2); flex: 1; overflow: hidden; }
.budget-lg .bar i { display: block; height: 100%; border-radius: 999px; background: var(--gold); }

/* 写作热力图 */
.heat { display: grid; grid-template-rows: repeat(7, 10px); grid-auto-flow: column; gap: 3px; }
.heat i { width: 10px; height: 10px; border-radius: 2.5px; background: var(--ink-2); }
.heat i.l1 { background: rgba(210,162,76,.25); } .heat i.l2 { background: rgba(210,162,76,.5); }
.heat i.l3 { background: rgba(210,162,76,.75); } .heat i.l4 { background: var(--gold); }

/* 命令面板 */
.cmdk-mask { position: fixed; inset: 0; background: rgba(10,9,7,.66); z-index: 120; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; backdrop-filter: blur(3px); }
.cmdk-mask.show { display: flex; animation: fade .18s ease; }
.cmdk { width: min(560px, 92vw); background: var(--ink-1); border: 1px solid var(--gold-line); border-radius: var(--r-card); box-shadow: var(--shadow-2); overflow: hidden; }
.cmdk input { width: 100%; border: none; background: none; padding: 16px 20px; font-size: 15px; color: var(--text); border-bottom: 1px solid var(--line); font-family: inherit; outline: none; }
.cmdk-list { max-height: 320px; overflow-y: auto; padding: 8px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; cursor: pointer; }
.cmdk-item:hover { background: var(--gold-soft); }
.cmdk-item i { color: var(--gold); font-size: 17px; }
.cmdk-item kbd { margin-left: auto; font-size: 11px; color: var(--text-3); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; font-family: var(--font-mono); }

/* 划词浮动工具条 */
.sel-bar { position: absolute; z-index: 90; display: none; background: var(--ink-1); border: 1px solid var(--gold-line); border-radius: 999px; box-shadow: var(--shadow-2); padding: 5px 7px; gap: 2px; }
.sel-bar.show { display: flex; animation: rise .16s ease; }
.sel-bar button { border: none; background: none; color: var(--text-2); font-size: 12.5px; padding: 6px 11px; border-radius: 999px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.sel-bar button:hover { color: var(--gold); background: var(--gold-soft); }

/* 三版本对比卡 */
.ver-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ver-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.ver-card .vh { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-family: var(--font-mono); color: var(--text-3); }
.ver-card .vh .pick { color: var(--gold); }
.ver-card p { font-size: 13.5px; line-height: 1.9; color: var(--text-2); flex: 1; }
.ver-card.best { border-color: var(--gold-line); box-shadow: inset 0 0 0 1px rgba(210,162,76,.12); }

/* 看板（编审工作流） */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.kan-col { padding: 16px; }
.kan-col h3 { font-size: 13px; letter-spacing: .1em; color: var(--text-3); display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.kan-col h3 .n { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; }
.kan-card { padding: 13px 15px; margin-bottom: 10px; font-size: 13.5px; cursor: grab; border: 1px solid var(--line); background: var(--ink-2); border-radius: var(--r-input); transition: .2s; }
.kan-card:hover { border-color: var(--gold-line); }
.kan-card .meta { display: flex; gap: 8px; margin-top: 8px; font-size: 11.5px; color: var(--text-3); font-family: var(--font-mono); }

/* 投票进度 */
.vote-item { padding: 16px 18px; }
.vote-item .vt { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; }
.vote-item .bar { height: 8px; border-radius: 999px; background: var(--ink-2); margin: 12px 0 8px; overflow: hidden; }
.vote-item .bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.vote-item .vs { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }

/* 图谱节点标签 */
.node-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-2); font-size: 13px; cursor: pointer; transition: .2s; }
.node-chip:hover { border-color: var(--gold-line); color: var(--gold); }
.node-chip .dot { width: 8px; height: 8px; border-radius: 50%; }

/* 空状态 */
.empty { text-align: center; padding: 56px 20px; color: var(--text-3); }
.empty i { font-size: 36px; color: var(--line); }
.empty p { margin-top: 12px; font-size: 13.5px; }

/* 两栏设置行 */
.set-row { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: none; }
.set-row .info { flex: 1; min-width: 0; }
.set-row .info .t { font-size: 14.5px; font-weight: 600; }
.set-row .info .d { font-size: 12.5px; color: var(--text-3); margin-top: 3px; line-height: 1.6; }

/* 诊断评分环 */
.score-ring { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 26px; }
.score-ring .num small { font-size: 10.5px; color: var(--text-3); font-weight: 400; margin-top: 2px; letter-spacing: .1em; }

@media (max-width: 980px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .ver-grid, .kanban { grid-template-columns: 1fr; }
  .steps { flex-wrap: wrap; gap: 12px; }
  .step { flex: 1 1 30%; }
  .step::before { display: none; }
}

/* ---------------- 全站滚动条（精修） ---------------- */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold-line); background-clip: padding-box; }
.app-sidebar { scrollbar-width: thin; scrollbar-color: var(--gold-line) transparent; }
.app-sidebar::-webkit-scrollbar { width: 5px; }
.app-sidebar::-webkit-scrollbar-thumb { background: var(--gold-line); border: none; }
.app-sidebar::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ---------------- 主题系统 ----------------
   ink     暗夜墨韵（默认，:root 定义）
   paper   晨曦纸韵（浅）
   jade    青瓷（浅）
   midnight 夜航蓝（深）
   sand    暖沙（浅）
   crimson 绛雪（深）
-------------------------------------------------- */

[data-theme="paper"] {
  color-scheme: light;
  --bar: rgba(243, 239, 229, .9); --bar-2: rgba(243, 239, 229, .84); --tint: rgba(70, 58, 30, .05);
  --ink-0: #f3efe5; --ink-1: #faf7ef; --ink-2: #fffdf7; --ink-3: #f0ebdd;
  --line: rgba(87, 74, 49, .14); --line-strong: rgba(87, 74, 49, .3);
  --text: #2c261b; --text-2: #6d6350; --text-3: #a29683;
  --gold: #a4752a; --gold-strong: #8a6120; --gold-ink: #fdf9ef;
  --gold-soft: rgba(164, 117, 42, .1); --gold-line: rgba(164, 117, 42, .38);
  --shadow-1: 0 1px 2px rgba(70, 58, 30, .1), 0 8px 24px rgba(70, 58, 30, .08);
  --shadow-2: 0 2px 6px rgba(70, 58, 30, .12), 0 24px 64px rgba(70, 58, 30, .14);
  --veil: rgba(70, 58, 30, .05); --veil-2: rgba(70, 58, 30, .04); --veil-3: rgba(70, 58, 30, .025);
  --veil-6: rgba(70, 58, 30, .07); --veil-8: rgba(70, 58, 30, .1);
  --glow-1: rgba(164, 117, 42, .08); --glow-2: rgba(164, 117, 42, .05);
}

[data-theme="jade"] {
  color-scheme: light;
  --bar: rgba(238, 242, 236, .9); --bar-2: rgba(238, 242, 236, .84); --tint: rgba(30, 60, 40, .05);
  --ink-0: #eef2ec; --ink-1: #f6f9f4; --ink-2: #fdfefd; --ink-3: #e8efe7;
  --line: rgba(40, 66, 48, .14); --line-strong: rgba(40, 66, 48, .3);
  --text: #1f2b22; --text-2: #57685b; --text-3: #8fa093;
  --gold: #2f8f66; --gold-strong: #23724f; --gold-ink: #f2fbf6;
  --gold-soft: rgba(47, 143, 102, .1); --gold-line: rgba(47, 143, 102, .38);
  --shadow-1: 0 1px 2px rgba(30, 60, 40, .1), 0 8px 24px rgba(30, 60, 40, .08);
  --shadow-2: 0 2px 6px rgba(30, 60, 40, .12), 0 24px 64px rgba(30, 60, 40, .14);
  --veil: rgba(30, 60, 40, .05); --veil-2: rgba(30, 60, 40, .04); --veil-3: rgba(30, 60, 40, .025);
  --veil-6: rgba(30, 60, 40, .07); --veil-8: rgba(30, 60, 40, .1);
  --glow-1: rgba(47, 143, 102, .08); --glow-2: rgba(47, 143, 102, .05);
}

[data-theme="midnight"] {
  color-scheme: dark;
  --bar: rgba(10, 13, 19, .88); --bar-2: rgba(10, 13, 19, .82); --tint: rgba(5, 8, 14, .45);
  --ink-0: #0a0d13; --ink-1: #10141d; --ink-2: #151a26; --ink-3: #1d2432;
  --line: rgba(200, 215, 235, .1); --line-strong: rgba(200, 215, 235, .22);
  --text: #dfe6f0; --text-2: #97a3b5; --text-3: #626d7e;
  --gold: #8fb6dd; --gold-strong: #b3d0ec; --gold-ink: #0c1420;
  --gold-soft: rgba(143, 182, 221, .12); --gold-line: rgba(143, 182, 221, .35);
  --shadow-1: 0 1px 2px rgba(0, 0, 10, .5), 0 8px 24px rgba(0, 0, 10, .35);
  --shadow-2: 0 2px 6px rgba(0, 0, 10, .6), 0 24px 64px rgba(0, 0, 10, .5);
  --veil: rgba(200, 215, 235, .05); --veil-2: rgba(200, 215, 235, .04); --veil-3: rgba(200, 215, 235, .02);
  --veil-6: rgba(200, 215, 235, .06); --veil-8: rgba(200, 215, 235, .09);
  --glow-1: rgba(143, 182, 221, .07); --glow-2: rgba(143, 182, 221, .04);
}

[data-theme="sand"] {
  color-scheme: light;
  --bar: rgba(241, 232, 220, .9); --bar-2: rgba(241, 232, 220, .84); --tint: rgba(80, 55, 25, .05);
  --ink-0: #f1e8dc; --ink-1: #f8f1e7; --ink-2: #fef9f2; --ink-3: #ede2d2;
  --line: rgba(94, 66, 36, .14); --line-strong: rgba(94, 66, 36, .3);
  --text: #33271a; --text-2: #75624c; --text-3: #a8977f;
  --gold: #b0713a; --gold-strong: #8f5a2d; --gold-ink: #fdf6ec;
  --gold-soft: rgba(176, 113, 58, .1); --gold-line: rgba(176, 113, 58, .38);
  --shadow-1: 0 1px 2px rgba(80, 55, 25, .1), 0 8px 24px rgba(80, 55, 25, .08);
  --shadow-2: 0 2px 6px rgba(80, 55, 25, .12), 0 24px 64px rgba(80, 55, 25, .14);
  --veil: rgba(94, 66, 36, .05); --veil-2: rgba(94, 66, 36, .04); --veil-3: rgba(94, 66, 36, .025);
  --veil-6: rgba(94, 66, 36, .07); --veil-8: rgba(94, 66, 36, .1);
  --glow-1: rgba(176, 113, 58, .08); --glow-2: rgba(176, 113, 58, .05);
}

[data-theme="crimson"] {
  color-scheme: dark;
  --bar: rgba(16, 11, 11, .88); --bar-2: rgba(16, 11, 11, .82); --tint: rgba(8, 5, 5, .45);
  --ink-0: #100b0b; --ink-1: #171010; --ink-2: #1e1515; --ink-3: #271a1a;
  --line: rgba(235, 215, 215, .09); --line-strong: rgba(235, 215, 215, .2);
  --text: #ece0de; --text-2: #ab9693; --text-3: #716062;
  --gold: #cf7a68; --gold-strong: #e09687; --gold-ink: #1c0e0a;
  --gold-soft: rgba(207, 122, 104, .12); --gold-line: rgba(207, 122, 104, .35);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .6), 0 24px 64px rgba(0, 0, 0, .45);
  --veil: rgba(235, 215, 215, .05); --veil-2: rgba(235, 215, 215, .04); --veil-3: rgba(235, 215, 215, .02);
  --veil-6: rgba(235, 215, 215, .06); --veil-8: rgba(235, 215, 215, .09);
  --glow-1: rgba(207, 122, 104, .07); --glow-2: rgba(207, 122, 104, .04);
}

/* 浅色主题下的细节修正 */
[data-theme="paper"] .site-nav,
[data-theme="jade"] .site-nav,
[data-theme="sand"] .site-nav { box-shadow: 0 8px 28px rgba(70, 58, 30, .1); }
[data-theme="paper"] .paper-grain::before,
[data-theme="jade"] .paper-grain::before,
[data-theme="sand"] .paper-grain::before { opacity: .55; }
[data-theme="paper"] .logo-seal,
[data-theme="jade"] .logo-seal,
[data-theme="sand"] .logo-seal { box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 2px 8px var(--gold-soft); }

/* ============================================================
   沉浸式灵感输入（墨池 Inkwell）— newwork 一句话开始
   ============================================================ */
.inkwell-card { overflow: visible; }

.inkwell {
  position: relative;
  margin-top: 20px;
  padding: 36px 38px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(560px 240px at 50% -70px, var(--glow-1), transparent 72%),
    radial-gradient(420px 220px at 90% 140%, var(--glow-2), transparent 74%),
    var(--ink-1);
  transition: border-color .4s ease, box-shadow .4s ease;
}
/* 内层虚线装裱，聚焦时让位于内容 */
.inkwell::before {
  content: "";
  position: absolute; inset: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  pointer-events: none;
  opacity: .45;
  transition: opacity .4s ease, inset .4s ease;
}
/* 聚焦：墨晕扩散 */
.inkwell:focus-within {
  border-color: var(--gold-line);
  box-shadow: 0 0 0 4px var(--gold-soft), var(--shadow-2);
}
.inkwell:focus-within::before { opacity: 0; inset: 14px; }
.inkwell.focused { animation: inkwell-breathe 3.2s ease-in-out infinite; }
@keyframes inkwell-breathe {
  0%, 100% { box-shadow: 0 0 0 4px var(--gold-soft), var(--shadow-2); }
  50%       { box-shadow: 0 0 0 7px var(--glow-1), var(--shadow-2); }
}
@media (prefers-reduced-motion: reduce) { .inkwell.focused { animation: none; } }

/* 书写区：大字号衬线，无边框零干扰 */
.inkwell-input {
  display: block;
  position: relative; z-index: 1;
  width: 100%;
  min-height: 148px;
  max-height: 420px;
  background: transparent;
  border: 0;
  outline: 0;
  resize: none;
  overflow: hidden;
  color: var(--text);
  caret-color: var(--gold);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 2;
  letter-spacing: .01em;
}
.inkwell-input::placeholder { color: var(--text-3); }

/* 打字机示例层：仅输入为空时可见 */
.inkwell-ghost {
  position: absolute; z-index: 0;
  left: 38px; right: 38px; top: 36px;
  color: var(--text-3);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 2;
  letter-spacing: .01em;
  pointer-events: none;
  transition: opacity .3s ease;
}
.inkwell-ghost.hide { opacity: 0; }
.inkwell-ghost .caret {
  display: inline-block;
  width: 2px; height: 1.05em;
  margin-left: 2px;
  background: var(--gold);
  vertical-align: -0.12em;
  animation: ink-caret 1s steps(1) infinite;
}
@keyframes ink-caret { 50% { opacity: 0; } }

/* 底部工具行 */
.inkwell-foot {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.inkwell-meta {
  margin-left: auto;
  display: flex; align-items: center; gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}
.inkwell-hint { letter-spacing: .02em; opacity: .8; }
.inkwell-full #inkCount { color: var(--err); }

/* 移动端 */
@media (max-width: 640px) {
  .inkwell { padding: 26px 22px 14px; }
  .inkwell-ghost { left: 22px; right: 22px; top: 26px; }
  .inkwell-input, .inkwell-ghost { font-size: 17px; }
  .inkwell-input { min-height: 120px; }
  .inkwell-hint { display: none; }
}

/* 减少动效偏好：打字机光标停止闪烁 */
@media (prefers-reduced-motion: reduce) {
  .inkwell-ghost .caret { animation: none; }
  .inkwell, .inkwell::before { transition: none; }
}

/* ============================================================
   首页动效增强层（均尊重 prefers-reduced-motion）
   ============================================================ */
/* 1. 顶部滚动进度条 */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 200;
  background: linear-gradient(90deg, var(--gold), var(--gold-strong));
  width: 0%; border-radius: 0 2px 2px 0;
  pointer-events: none; transition: width .1s linear;
}

/* 2. 数据条数字动画 */
.stat-ico { display: inline-flex; align-items: center; gap: 6px; }
.stat-ico i { color: var(--gold); font-size: 19px; }
.stat-num.counting { color: var(--gold-strong); }

/* 3. Bento 卡流光 */
.card.sheen { position: relative; overflow: hidden; }
.card.sheen::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(105deg, transparent 40%, var(--glow-1) 50%, transparent 60%);
  transform: translateX(-120%); pointer-events: none;
  transition: transform .8s ease;
}
.card.sheen:hover::after { transform: translateX(120%); }

/* 4. 功能卡图标弹跳 */
.card.hoverable:hover i.ph-bold { animation: iconPop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes iconPop { 0% { transform: scale(1); } 45% { transform: scale(1.18) rotate(-4deg); } 100% { transform: scale(1); } }

/* 5. 流程步骤点亮 */
.step-lit .step-no {
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  -webkit-background-clip: text; background-clip: text;
  transition: background .6s ease;
}
.step-lit h3 { color: var(--gold-strong); }

/* 6. 尾部 CTA 呼吸金晕 */
.cta-breathe { animation: ctaGlow 3.6s ease-in-out infinite; }
@keyframes ctaGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--gold-soft), var(--shadow-2); }
  50%       { box-shadow: 0 0 0 10px var(--glow-2), var(--shadow-2); }
}

/* 7. 引用浮现 */
.quote-fade { opacity: 0; transform: translateY(10px); transition: opacity .8s ease, transform .8s ease; }
.quote-fade.in { opacity: 1; transform: none; }

/* 8. Hero 预览卡 3D 倾斜 */
.tilt-wrap { perspective: 900px; }
.tilt-card { transition: transform .25s ease, box-shadow .25s ease; will-change: transform; }
.tilt-card.tilting { box-shadow: 0 0 0 4px var(--gold-soft), var(--shadow-2); }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress, .card.sheen::after, .cta-breathe { display: none; }
  .quote-fade { opacity: 1; transform: none; transition: none; }
  .card.hoverable:hover i.ph-bold { animation: none; }
}

/* ============================================================
   控制台 · 一日创作中枢组件层（60 项功能 / cs- 命名空间）
   ============================================================ */

/* --- 无障碍基线：全局焦点可见 --- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 200; background: var(--ink-1); border: 1px solid var(--gold-line); color: var(--gold-strong); padding: 9px 16px; border-radius: 999px; font-size: 13px; transition: top .2s; }
.skip-link:focus { top: 12px; }
.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; }

/* --- 分区头：可折叠 + 记忆 --- */
.cs-sec { margin-top: 26px; }
.cs-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cs-sec-head h2 { font-family: var(--font-display); font-size: 17px; display: flex; align-items: center; gap: 8px; }
.cs-sec-head h2 i { color: var(--gold); font-size: 18px; }
.cs-sec-head .fold { margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text-3); border-radius: 8px; width: 28px; height: 28px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: .2s; }
.cs-sec-head .fold:hover { border-color: var(--gold-line); color: var(--gold); }
.cs-sec.folded .cs-sec-body { display: none; }
.cs-sec.folded .fold i { transform: rotate(-90deg); }
.cs-sec-head .fold i { transition: transform .25s ease; }

/* --- 欢迎区扩展：签到 / 月卡倒计时 / 周报 --- */
.welcome-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 14px; margin-top: 16px; }
.welcome { margin-bottom: 0; }
.cs-checkin { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.cs-checkin .fire { width: 44px; height: 44px; border-radius: 12px; background: var(--glow-1); border: 1px solid var(--gold-line); display: flex; align-items: center; justify-content: center; font-size: 21px; color: var(--gold); flex-shrink: 0; }
.cs-checkin .info { flex: 1; min-width: 0; }
.cs-checkin .info .n { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--gold-strong); }
.cs-checkin .info .d { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.cs-checkin.done .fire { background: var(--gold-soft); }
.cs-countdown { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.cs-countdown .t { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.cs-countdown .t i { color: var(--gold); }
.cs-countdown .v { font-family: var(--font-mono); font-size: 22px; font-weight: 700; }
.cs-countdown .v em { font-style: normal; font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 4px; }
.cs-countdown .bar { height: 6px; border-radius: 999px; background: var(--ink-2); overflow: hidden; margin-top: 6px; }
.cs-countdown .bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }

/* --- 周报摘要卡（成绩单） --- */
.cs-report { padding: 16px 18px; display: flex; gap: 16px; align-items: center; }
.cs-report .score { text-align: center; flex-shrink: 0; width: 92px; }
.cs-report .score .ring { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; background: conic-gradient(var(--gold) 0 87%, var(--ink-2) 87% 100%); position: relative; }
.cs-report .score .ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--ink-1); }
.cs-report .score .ring b { position: relative; font-family: var(--font-mono); font-size: 17px; color: var(--gold-strong); }
.cs-report .score .l { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.cs-report .facts { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 16px; font-size: 12.5px; color: var(--text-2); }
.cs-report .facts b { color: var(--text); font-family: var(--font-mono); }
.cs-report .facts i { color: var(--gold); margin-right: 6px; }

/* --- 待办中心 --- */
.cs-todo { display: flex; flex-direction: column; }
.cs-todo-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.cs-todo-item:last-child { border-bottom: 0; }
.cs-todo-item .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--veil-6); display: flex; align-items: center; justify-content: center; color: var(--gold); flex-shrink: 0; }
.cs-todo-item.warn .ic { background: var(--glow-1); }
.cs-todo-item .tx { flex: 1; min-width: 0; }
.cs-todo-item .tx .t { font-size: 13.5px; font-weight: 600; }
.cs-todo-item .tx .d { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.cs-todo-item .n { font-family: var(--font-mono); font-size: 15px; color: var(--gold-strong); font-weight: 700; }

/* --- 生成任务实时行 --- */
.cs-job { padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); margin-bottom: 10px; }
.cs-job .top { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.cs-job .top .st { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--gold); }
.cs-job .pbar { height: 6px; border-radius: 999px; background: var(--ink-3); overflow: hidden; margin-top: 9px; }
.cs-job .pbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-strong)); width: 0; animation: job-fill 2.6s ease forwards; }
.cs-job.err { border-color: var(--err); }
.cs-job.err .pbar i { background: var(--err); animation: none; width: 62%; }
@keyframes job-fill { to { width: 84%; } }
@media (prefers-reduced-motion: reduce) { .cs-job .pbar i { animation: none; width: 84%; } }

/* --- 快捷宫格 --- */
.cs-quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.cs-quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 15px 6px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; color: var(--text); text-decoration: none; transition: .2s; text-align: center; }
.cs-quick a i { font-size: 21px; color: var(--gold); }
.cs-quick a:hover { border-color: var(--gold-line); background: var(--veil); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .cs-quick a:hover { transform: none; } }

/* --- 迷你趋势 sparkline --- */
.spark { display: inline-block; vertical-align: middle; }
.spark polyline, .spark polygon { transition: opacity .3s; }

/* --- 作品工具条：排序 / 筛选 / 批量 --- */
.cs-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cs-tools .sel { background: var(--ink-2); border: 1px solid var(--line); color: var(--text-2); border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-family: inherit; cursor: pointer; }
.cs-batch { display: none; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--gold-line); background: var(--glow-1); border-radius: 12px; font-size: 13px; margin-bottom: 12px; }
.cs-batch.show { display: flex; }
.novel-card .pick { position: absolute; top: 12px; left: 12px; z-index: 3; width: 22px; height: 22px; accent-color: var(--gold); cursor: pointer; }
.novel-card { position: relative; }
.novel-card .badges { display: flex; gap: 5px; position: absolute; top: 12px; right: 12px; z-index: 3; }
.novel-card .badges .b { font-size: 10px; padding: 2px 8px; border-radius: 999px; background: rgba(16,14,11,.72); color: #e8c17a; border: 1px solid rgba(210,162,76,.4); backdrop-filter: blur(4px); font-family: var(--font-mono); }

/* --- 健康摘要行（作品卡内） --- */
.novel-card .health { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.novel-card .health .h { font-size: 10.5px; padding: 2px 8px; border-radius: 6px; background: var(--veil-6); color: var(--text-2); font-family: var(--font-mono); }
.novel-card .health .h.bad { color: var(--err); background: rgba(201,74,60,.12); }
.novel-card .health .h.ok { color: var(--ok); background: rgba(66,150,94,.12); }

/* --- 生物钟条 --- */
.cs-clock { display: flex; gap: 5px; align-items: flex-end; height: 74px; padding: 4px 2px 0; }
.cs-clock .hr { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.cs-clock .hr i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: var(--veil-6); min-height: 5px; }
.cs-clock .hr.peak i { background: linear-gradient(180deg, var(--gold), var(--gold-strong)); }
.cs-clock .hr span { font-size: 9.5px; color: var(--text-3); font-family: var(--font-mono); }

/* --- 收益看板 --- */
.cs-earn { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cs-earn .e { padding: 16px; }
.cs-earn .e .l { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.cs-earn .e .l i { color: var(--gold); }
.cs-earn .e .v { font-family: var(--font-mono); font-size: 21px; font-weight: 700; margin-top: 6px; }
.cs-earn .e .v em { font-style: normal; font-size: 11px; color: var(--text-3); font-weight: 400; margin-left: 3px; }
.cs-earn .e .d { font-size: 11px; margin-top: 5px; color: var(--text-3); }

/* --- 同步 / 备份状态条 --- */
.cs-sync { display: flex; align-items: center; gap: 12px; padding: 12px 16px; font-size: 12.5px; color: var(--text-2); border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); }
.cs-sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(66,150,94,.18); flex-shrink: 0; }
.cs-sync .mono { color: var(--text-3); }

/* --- 里程碑 / 纪念日 --- */
.cs-mile { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.cs-mile .m { flex-shrink: 0; width: 148px; padding: 13px 15px; border: 1px solid var(--gold-line); border-radius: 12px; background: linear-gradient(150deg, var(--glow-1), transparent 70%), var(--ink-1); }
.cs-mile .m .d { font-family: var(--font-mono); font-size: 11px; color: var(--gold); }
.cs-mile .m .t { font-size: 13px; font-weight: 700; margin-top: 5px; }
.cs-mile .m .s { font-size: 11px; color: var(--text-3); margin-top: 3px; }

/* --- 日签 --- */
.cs-quote { padding: 18px 20px; border-left: 3px solid var(--gold); font-family: var(--font-display); font-size: 15px; line-height: 1.9; color: var(--text-2); }
.cs-quote .src { display: block; margin-top: 8px; font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }

/* --- 灵感值预警 --- */
.cs-warnlow { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid var(--gold-line); background: var(--glow-1); border-radius: 12px; font-size: 13px; }
.cs-warnlow i { color: var(--gold); font-size: 19px; }

/* --- 偏好抽屉（阅读显示设置） --- */
.cs-prefs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }

/* --- 返回顶部 --- */
.cs-top { position: fixed; right: 22px; bottom: 84px; z-index: 60; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gold-line); background: var(--ink-1); color: var(--gold); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-1); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .25s; }
.cs-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* --- 命令面板提示徽标 --- */
.kbd-hint { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.kbd-hint:hover { border-color: var(--gold-line); color: var(--gold); }

/* --- 响应式折叠 --- */
@media (max-width: 1080px) {
  .welcome-row { grid-template-columns: 1fr; }
  .cs-quick { grid-template-columns: repeat(3, 1fr); }
  .cs-earn { grid-template-columns: 1fr; }
  .cs-report { flex-direction: column; }
  .cs-prefs { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .cs-quick { grid-template-columns: repeat(2, 1fr); }
  .cs-report .facts { grid-template-columns: 1fr; }
}

/* ============================================================
   移动端全站防线（≤760px）· 2026-09 移动适配层
   机制：内联多列 grid 由脚本注入 .m1 标记 → 此处统一降单列；
   顶栏防溢出；数据表横向滚动。
   ============================================================ */
@media (max-width: 760px) {
  /* 内联多列 grid 统一降为单列（!important 用于压过内联 style） */
  .m1 { grid-template-columns: 1fr !important; }

  /* 站点导航：收紧间距、隐藏次要按钮与用户名，只留头像 */
  .site-nav { height: 58px; }
  .site-nav .wrap { gap: 12px; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn-ghost { display: none; }
  .nav-user span:not(.avatar) { display: none; }
  .nav-user { padding: 4px; }

  /* 应用内顶栏：允许换行，搜索条独占一行 */
  .app-topbar { flex-wrap: wrap; row-gap: 10px; padding: 12px 0; }
  .app-topbar .search-pill { order: 9; flex: 1 1 100%; min-width: 0; }
  .app-topbar h1 { font-size: 19px; }

  /* 前台数据表：横向滚动 */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* 页面内嵌卡片网格兜底（部分页面用内联 repeat 的已由 .m1 处理） */
  .metric-grid { grid-template-columns: 1fr 1fr; }

  /* 前台 .tbl 表格：横向滚动 */
  .tbl { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* 内联 flex 行：允许换行 + 子项可收缩（工具栏/筛选行防溢出） */
  [style*="display:flex"], [style*="display: flex"],
  [style*="display:inline-flex"], [style*="display: inline-flex"] { flex-wrap: wrap; }
  [style*="display:flex"] > *, [style*="display: flex"] > * { min-width: 0; }

  /* 卡片可收缩：防被定宽内容（图表/表格）撑破 */
  .card { min-width: 0; max-width: 100%; }

  /* 写作页顶栏：换行收纳，次要状态让位 */
  .w-topbar { flex-wrap: wrap; row-gap: 8px; }
  .w-topbar .save-state { display: none; }

  /* 画布外元素（如 AI 侧栏抽屉）不产生横向滚动；clip 不破坏 sticky */
  html, body { overflow-x: clip; }
}

@media (max-width: 480px) {
  .m1 { grid-template-columns: 1fr !important; }
  .metric-grid { grid-template-columns: 1fr; }
}

/* ---------------- 首页艺术体品牌字（云章 · 马善政楷书，仅含"云章"二字子集 1.2KB） ---------------- */
@font-face {
  font-family: "YunZhang Art";
  src: url("../fonts/yunzhang.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.art-brand {
  font-family: "YunZhang Art", var(--font-display);
  font-size: clamp(64px, 8.5vw, 118px);
  line-height: 1.08;
  letter-spacing: .12em;
  color: var(--gold);
  margin: 18px 0 0;
  text-shadow: 0 0 34px var(--glow-1), 0 2px 0 rgba(0,0,0,.12);
  background: linear-gradient(160deg, var(--gold-strong) 12%, var(--gold) 55%, color-mix(in srgb, var(--gold) 58%, var(--text)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px var(--glow-1));
  user-select: none;
}
@media (prefers-reduced-motion: reduce) {
  .art-brand { animation: none; }
}
@media (max-width: 480px) {
  .art-brand { font-size: 17vw; letter-spacing: .08em; }
}

/* ---------------- 通用输入框 .input（沉浸式聚焦 · 2026-09-03） ----------------
   此前 .input 类无任何定义，前台 7 页 + 后台 3 页的输入框均为浏览器原生样式，
   不融入六主题也无聚焦反馈。统一补齐：主题底色 + 金晕聚焦 + 金色光标。 */
.input {
  width: 100%;
  padding: 11px 14px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  color: var(--text);
  font-size: 14px;
  outline: 0;
  transition: border-color .35s ease, box-shadow .35s ease, background .35s ease;
}
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: var(--line-strong); }
.input:focus {
  border-color: var(--gold-line);
  background: var(--ink-1);
  box-shadow: 0 0 0 4px var(--gold-soft), var(--shadow-1);
  caret-color: var(--gold);
}
select.input { cursor: pointer; }
textarea.input { resize: vertical; min-height: 76px; line-height: 1.8; }
@media (prefers-reduced-motion: reduce) {
  .input { transition: none; }
}
