/* ═══════════════════════════════════════
   方寸 · 我 — 样式（v2）
   编辑/暖纸文学风 · 规范见 DESIGN.md
   ═══════════════════════════════════════ */

/* 内嵌子集字体（离线也有味道；在线可再叠 Google Fonts 一层） */
@font-face {
  font-family: 'Noto Serif SC';
  src: url('../assets/fonts/NotoSerifSC-sub.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('../assets/fonts/NotoSansSC-sub.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f8f6f2;
  --bg-warm: #f1ece4;
  --bg-card: #fffdf9;
  --ink: #1a1712;
  --ink-muted: #6f675c;
  --ink-faint: #a89f92;
  --accent: #b8732d;
  --accent-light: #f3e4cf;
  --accent-glow: rgba(184,115,45,0.14);
  --accent-line: rgba(184,115,45,0.38);   /* 赭石描边：hover 时替代灰色细线 */
  --border: rgba(26,23,18,0.09);
  --border-strong: rgba(26,23,18,0.18);
  --green: #2f7d51;
  --red: #b3402f;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font: 'Noto Sans SC','Inter',system-ui,-apple-system,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;
  --serif: 'Noto Serif SC','Songti SC','SimSun',serif;
  --mono: ui-monospace,'SFMono-Regular','Geist Mono','JetBrains Mono',Consolas,monospace;
  --sidebar-w: 232px;
  --topbar-h: 56px;
  --shadow-card: 0 1px 2px rgba(26,23,18,0.03), 0 4px 14px rgba(26,23,18,0.05);
  --shadow-card-hover: 0 1px 2px rgba(26,23,18,0.04), 0 6px 20px rgba(26,23,18,0.08);

  /* ── 玻璃材质 ──────────────────────────────────────────────
     手法借自 Solid Glass：质感全部在边缘完成——顶部一道光、内侧一圈柔光、
     外面一条细线、底下接触影与聚拢影。**不使用 border**：border 会在细线
     之外再画一圈，出现双重描边。配色仍走本项目的暖调，不是冷灰。
     改 --shadow-glass 一处即可全局生效。 */
  --glass-rim: rgba(255,255,255,0.92);        /* 顶部一道光 */
  --glass-inner: rgba(255,255,255,0.45);      /* 内侧柔光 */
  --glass-edge: rgba(26,23,18,0.075);         /* 外细线（暖灰） */
  --glass-edge-strong: rgba(26,23,18,0.14);   /* 悬停时外线加深 */
  --glass-contact: rgba(26,23,18,0.045);      /* 接触阴影 */
  --glass-shade: rgba(26,23,18,0.085);        /* 底部聚拢 */
  --glass-shade-strong: rgba(26,23,18,0.15);
  /* 玻璃之所以是玻璃：面板半透明，背后的暖光被模糊后透上来。
     不透光的话，画再多阴影也只是「有边框的实心卡片」。 */
  --glass-bg: rgba(255,253,249,0.64);
  --glass-blur: blur(26px) saturate(1.6);
  --glass-bar: rgba(248,246,242,0.7);   /* 顶栏：滚动时内容从下面透出来 */
  --shadow-glass:
    inset 0 1px 0 var(--glass-rim),
    inset 0 0 0 1px var(--glass-inner),
    0 0 0 1px var(--glass-edge),
    0 1px 2px var(--glass-contact),
    0 10px 26px -12px var(--glass-shade);
  --shadow-glass-hover:
    inset 0 1px 0 var(--glass-rim),
    inset 0 0 0 1px var(--glass-inner),
    0 0 0 1px var(--glass-edge-strong),
    0 1px 2px var(--glass-contact),
    0 16px 38px -12px var(--glass-shade-strong);

  --transition: 0.15s ease;
}

/* 深色主题（JS 切换） */
body.dark {
  --bg: #16140f;
  --bg-warm: #211d16;
  --bg-card: #1e1b15;
  --ink: #ece7dd;
  --ink-muted: #a39b8d;
  --ink-faint: #6f695d;
  --accent: #d99a55;
  --accent-light: #2a241c;
  --accent-glow: rgba(217,154,85,0.16);
  --accent-line: rgba(217,154,85,0.42);
  --border: rgba(236,231,221,0.09);
  --border-strong: rgba(236,231,221,0.2);
  --green: #4caf7d;
  --red: #d9644e;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 4px 14px rgba(0,0,0,0.35);
  --shadow-card-hover: 0 1px 2px rgba(0,0,0,0.4), 0 6px 20px rgba(0,0,0,0.5);

  /* 暗色下的玻璃：顶部光减弱、外细线改走白色（黑背景上黑线看不见） */
  --glass-rim: rgba(255,255,255,0.13);
  --glass-inner: rgba(255,255,255,0.04);
  --glass-edge: rgba(255,255,255,0.065);
  --glass-edge-strong: rgba(255,255,255,0.14);
  --glass-contact: rgba(0,0,0,0.42);
  --glass-shade: rgba(0,0,0,0.5);
  --glass-shade-strong: rgba(0,0,0,0.62);
  --glass-bg: rgba(30,27,21,0.58);
  --glass-blur: blur(26px) saturate(1.25);
  --glass-bar: rgba(22,20,15,0.7);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  min-height: 100vh;
  font-feature-settings: "lnum" 1;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

/* ── 侧边栏 ── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-warm);
  /* 立着的玻璃板：朝页面那一侧受光。用内阴影画线而非 border，
     避免 border 与阴影线叠成双重描边 */
  border-right: 0;
  box-shadow:
    inset -1px 0 0 var(--glass-edge),
    inset -1px 0 0.5px var(--glass-inner);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.2s;
}
.sidebar.collapsed { width: 64px; min-width: 64px; }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .brand-full,
.sidebar.collapsed .sidebar-identity,
.sidebar.collapsed .storage-indicator { display: none; }

/* 报头：高度与顶栏对齐，两条底边线接成一条横线 */
.sidebar-header {
  position: relative;
  height: var(--topbar-h);
  flex-shrink: 0;
  padding: 0 10px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--border) 0, var(--border) 72%, transparent 100%);
}
/* 只留字，不做方块印章：衬线字本身就是标 */
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}
.brand-full {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  transition: color var(--transition);
}
.brand:hover { text-decoration: none; }
.brand:hover .brand-full { color: var(--accent); }
.brand-mini {
  display: none;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}
.sidebar-collapse {
  margin-left: auto;
  width: 26px; height: 26px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  flex-shrink: 0;
}
.icon-btn {
  background: none; border: none; cursor: pointer;
  color: var(--ink-faint); padding: 5px;
  display: flex; align-items: center;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: var(--accent-glow); color: var(--accent); }

.sidebar-nav {
  flex: 1;
  padding: 12px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.nav-group + .nav-group { margin-top: 4px; }
/* 分组标签：像目录里的小字，靠字距和留白站起来，不靠颜色 */
.nav-group-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  padding: 11px 10px 5px;
  user-select: none;
}

body.dark .nav-group-label { color: #8d8578; }
/* 折叠时分组标签退化成一条分隔线，保留"分组感" */
.sidebar.collapsed .nav-group-label {
  height: 1px;
  padding: 0;
  margin: 7px 12px;
  font-size: 0;
  background: var(--border);
  opacity: 0.7;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 10px 7px 13px;
  border-radius: 7px;
  color: var(--ink-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.nav-item:hover { background: rgba(184,115,45,0.055); color: var(--ink); text-decoration: none; }
.nav-item.active {
  background: rgba(184,115,45,0.11);
  color: var(--accent);
  font-weight: 600;
}
body.dark .nav-item.active { background: rgba(217,154,85,0.13); }
body.dark .nav-item:hover { background: rgba(217,154,85,0.1); }
.nav-item.active:hover { text-decoration: none; }
.nav-icon {
  width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.78;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-icon .ic { width: 18px; height: 18px; }

/* 折叠态：图标居中，active 只留底色和字色（竖条在 40px 宽里太挤） */
.sidebar.collapsed .nav-item { padding: 8px 0; justify-content: center; }
.sidebar.collapsed .nav-item.active { box-shadow: none; }
.sidebar.collapsed .sidebar-header { padding: 0 8px; gap: 6px; justify-content: center; }
.sidebar.collapsed .brand-mini { display: block; }
.sidebar.collapsed .sidebar-collapse { width: 24px; height: 24px; margin-left: 0; }
.sidebar.collapsed .sidebar-footer { display: none; }

.sidebar-footer {
  position: relative;
  padding: 10px 12px 14px;
}
.sidebar-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--border) 0, var(--border) 72%, transparent 100%);
}
/* 身份区不再做成一张卡：一条淡底足够，别在侧栏里再开一个色块 */
.sidebar-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  margin-bottom: 8px;
  border-radius: 9px;
  cursor: pointer;
  transition: background var(--transition);
}
.sidebar-identity:hover { background: var(--accent-glow); }
.sidebar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 30%;
  border: 2px solid var(--bg-card);
  box-shadow: 0 1px 4px rgba(26,24,20,0.18);
  flex-shrink: 0;
}
.sidebar-identity-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.sidebar-identity-name {
  font-family: var(--serif);
  font-size: 12.5px; font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.sidebar-identity-sub {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.storage-indicator { display: flex; align-items: center; gap: 7px; padding: 0 4px; }
.storage-bar {
  flex: 1; height: 3px; background: var(--border);
  border-radius: 2px; overflow: hidden;
}
.storage-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.3s; border-radius: 2px; opacity: 0.75; }
.storage-text { font-size: 9.5px; font-family: var(--mono); color: var(--ink-faint); min-width: 42px; }

/* ── 主区域 ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  /* 悬浮的玻璃条：底边线交给 ::after（中间实、两端化开），
     这里只留接触影，滚动时内容从下面模糊透出 */
  border-bottom: 0;
  box-shadow: 0 1px 2px var(--glass-contact);
  background: var(--glass-bar);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  position: sticky; top: 0; z-index: 50;
}
/* 滚动后才有的轻投影：内容在玻璃底下走，得让顶栏「浮」起来一点 */
.topbar.is-scrolled {
  box-shadow:
    0 1px 2px var(--glass-contact),
    0 8px 22px -14px rgba(26,23,18,0.30);
}
body.dark .topbar.is-scrolled {
  box-shadow:
    0 1px 2px rgba(0,0,0,0.4),
    0 8px 22px -14px rgba(0,0,0,0.75);
}
/* 底边不画满：两端渐隐，像一页纸被压在下面，而不是一条硬分割线 */
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0,
    var(--glass-edge) 7%,
    var(--glass-edge-strong) 50%,
    var(--glass-edge) 93%,
    transparent 100%);
  pointer-events: none;
}
.topbar-title {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
/* 标题与日期之间一道短竖线：把「这是哪一页」和「今天是哪天」分成两件事 */
.topbar-date {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  padding-left: 0;
}
.topbar-date::before {
  content: "";
  width: 1px; height: 13px;
  background: var(--border-strong);
  flex-shrink: 0;
  margin-right: 12px;
}
.tb-date-y { opacity: 0.85; }
.tb-date-md { color: var(--ink-muted); }
/* 星期做成一枚小标签：一周里翻到哪天，一眼能看见 */
.tb-date-wd {
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-left: 7px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(255,255,255,0.42);
  line-height: 1;
}
body.dark .tb-date-wd {
  background: rgba(255,255,255,0.04);
  border-color: rgba(236,231,221,0.09);
}
/* 顶栏「导出」：发丝描边的胶囊形按钮。
   顶栏本身是一条玻璃，按钮再叠一层实心会显得笨重，
   所以底色只给一点点白，靠 1px 描边和顶部内高光把形状立起来；
   hover 时描边转为赭石、箭头轻轻下沉（导出＝往下落）。 */
.topbar-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px 0 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--ink-muted);
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  transition: color .18s ease, background .18s ease, border-color .18s ease,
              box-shadow .18s ease, transform .12s ease;
}
.topbar-export:hover {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: var(--accent-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 2px 10px -3px var(--accent-line);
  transform: translateY(-1px);
}
.topbar-export:active { transform: translateY(0) scale(.97); }
.topbar-export:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 图标：默认下坠箭头 + 托盘，导出成功后换成对勾 */
.topbar-export .te-ico {
  display: inline-flex;
  width: 13px; height: 13px;
  flex-shrink: 0;
}
.topbar-export .te-ico svg { width: 13px; height: 13px; display: block; }
.topbar-export .te-ico .te-ck { display: none; }
.topbar-export .te-dl { transition: transform .18s ease; }
.topbar-export:hover .te-dl { transform: translateY(-1.5px); }

/* 「已备份」：点完给一个 1.6s 的落定反馈，避免用户不确定有没有下载成功 */
.topbar-export.is-done {
  color: var(--green);
  background: rgba(47,125,81,0.10);
  border-color: rgba(47,125,81,0.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
  animation: te-pop .32s ease;
}
.topbar-export.is-done .te-ico .te-dl { display: none; }
.topbar-export.is-done .te-ico .te-ck { display: block; }
.topbar-export.is-done .te-txt-a { display: none; }
.topbar-export .te-txt-b { display: none; }
.topbar-export.is-done .te-txt-b { display: inline; }
@keyframes te-pop {
  0%   { transform: scale(.94); }
  55%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

body.dark .topbar-export {
  background: rgba(255,255,255,0.07);
  border-color: rgba(236,231,221,0.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
body.dark .topbar-export:hover {
  background: var(--accent-glow);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 10px -3px rgba(0,0,0,0.5);
}
body.dark .topbar-export.is-done {
  background: rgba(76,175,125,0.12);
  border-color: rgba(76,175,125,0.42);
}

/* ── 页面内容 ── */
.page-content { padding: 32px 28px; max-width: 1100px; width: 100%; }

/* 通用区块 */
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
  font-family: var(--mono);
  /* iOS 上上一张卡的下边距会被吃掉，标题就贴到卡片上了。
     给标题一个自己的安全距离，不依赖别人 */
  margin-top: 26px;
}
.section-label:first-child { margin-top: 0; }
.section-title {
  font-family: var(--serif);
  font-size: 20px; font-weight: 600;
  letter-spacing: -0.2px; line-height: 1.3;
  margin-bottom: 8px;
}
.section-desc { font-size: 13px; color: var(--ink-muted); margin-bottom: 24px; line-height: 1.6; }

/* ── 今日 hero（仪表盘专用） ── */
.today-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 4px 0 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.today-greeting { font-size: 13px; font-weight: 500; color: var(--ink-muted); margin-bottom: 6px; }
.today-greeting b { color: var(--accent); font-weight: 600; }
.today-date {
  font-family: var(--serif);
  font-size: 38px; font-weight: 700;
  letter-spacing: -0.5px; line-height: 1.1;
}
.today-weekday {
  font-family: var(--serif);
  font-size: 14px; font-weight: 500;
  color: var(--ink-muted);
  margin-left: 12px;
  letter-spacing: 0.05em;
}
.today-focus {
  margin-top: 12px; font-size: 13px; color: var(--ink-muted);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.today-focus .focus-text { color: var(--ink); font-weight: 500; }

/* 每日寄语：衬线体，压住「今天的一句话」这个位置。
   出处用无衬线小声跟着，避免抢主语。 */
.today-quote {
  font-family: var(--serif);
  font-size: 14.5px;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.65;
}
.today-quote-from {
  font-size: 11.5px;
  color: var(--ink-faint);
  font-family: var(--font);
  white-space: nowrap;
}
/* 今日焦点另起一行，跟寄语区分开 */
.today-focus-plan { margin-top: 6px; }
.today-stats {
  display: flex; gap: 32px;
  /* 放在首页最上面，用一条细线跟下面的问候隔开 */
  padding-bottom: 16px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.today-stat { text-align: right; min-width: 48px; }
.today-stat-num {
  font-family: var(--serif); font-size: 26px; font-weight: 600;
  line-height: 1; font-feature-settings: "tnum" 1;
  white-space: nowrap;
}
.today-stat-num .sub { font-size: 13px; color: var(--ink-faint); font-weight: 500; margin-left: 2px; vertical-align: baseline; }
.today-stat-num .none { font-size: 15px; color: var(--ink-faint); font-weight: 500; }
.task-date.edit { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px; }
.task-date.edit:hover { color: var(--accent); }
.today-stat-num.accent { color: var(--accent); }
.today-stat-label {
  font-size: 10px; font-family: var(--mono); color: var(--ink-faint);
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: 6px;
}
@media (max-width: 640px) {
  .today-hero { grid-template-columns: 1fr; align-items: start; }
  .today-stats { justify-content: flex-start; gap: 20px; }
  .today-stat { text-align: left; }
  .today-date { font-size: 28px; }
}

/* 卡片 */
.card {
  /* 半透明面板 + 背景模糊：背后那道暖光会透上来，卡片才是「玻璃」而非实心块 */
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 0;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-glass);
  transition: box-shadow var(--transition), background var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-glass-hover);
  transform: translateY(-1px);
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card-sub { font-size: 12px; color: var(--ink-faint); font-family: var(--mono); }

/* 表单 */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--ink-muted); margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.field label .ai-mini { font-weight: 400; letter-spacing: 0; }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field textarea { resize: vertical; min-height: 70px; line-height: 1.7; }

/* 输入框内联（非 field 容器里的） */
input[type="text"], input[type="number"], select, textarea {
  font-family: inherit;
}

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.btn:active { transform: scale(0.98); }
.btn .ic { width: 15px; height: 15px; }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: 0 1px 2px rgba(26,23,18,0.12); }
body.dark .btn-primary { background: #ece7dd; color: #16140f; }
.btn-primary:hover { box-shadow: 0 2px 8px rgba(26,24,20,0.2); }
body.dark .btn-primary:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--bg-warm); border-color: var(--ink-faint); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* 网格 */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 标签 */
.tag {
  font-family: var(--mono); font-size: 10px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--bg-warm); color: var(--ink-muted);
  border: 1px solid var(--border);
  display: inline-block;
}
.tag-accent { background: var(--accent-light); color: var(--accent); border-color: transparent; }

/* 空状态 */
.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--ink-faint);
}
.empty-icon { margin-bottom: 12px; opacity: 0.6; display: flex; justify-content: center; color: var(--ink-faint); }
.empty-icon .ic { width: 24px; height: 24px; }
.empty-text { font-size: 13px; }

/* （原「终端树」样式已删除：那块 ASCII 目录被首页的模块入口卡片取代，见文件末尾 .module-grid） */

/* 工具类 */
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; } .mb-40 { margin-bottom: 40px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.w-full { width: 100%; } .text-center { text-align: center; }
.hidden { display: none; }
.ic { display: inline-block; vertical-align: middle; }

/* Kanban */
.kanban {
  display: flex; gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kanban-col {
  min-width: 230px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}
.kanban-col-title {
  font-size: 11px; font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono);
}
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  margin-bottom: 8px;
  font-size: 13px;
  cursor: grab;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  box-shadow: 0 1px 2px rgba(26,24,20,0.04);
}
.kanban-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 3px 10px rgba(26,24,20,0.08);
  transform: translateY(-1px);
}
.kanban-card:active { cursor: grabbing; }

/* 习惯画布 */
.habit-grid {
  display: grid;
  grid-template-columns: 200px repeat(14, 1fr);
  gap: 3px;
  font-size: 11px;
}
.habit-cell {
  height: 30px;
  border-radius: 5px;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-warm);
}
.habit-cell.on {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 1px 4px rgba(184,115,45,0.35);
}
.habit-cell:hover { border-color: var(--accent); }
.habit-label {
  font-size: 12px; font-weight: 500;
  display: flex; align-items: center;
  padding-right: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 任务 */
.task-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.task-item:last-child { border-bottom: none; }
.task-item:hover { background: var(--accent-glow); }
.task-check {
  position: relative;
  width: 17px; height: 17px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: white;
  transition: all var(--transition);
}
.task-check:hover { border-color: var(--accent); }
/* 视觉还是 17px，能点到的范围扩到 35px —— 想点任务名时不会误勾 */
.task-check::before {
  content: "";
  position: absolute;
  inset: -9px -6px -9px -9px;   /* 右侧收窄，别把任务名的点击也抢过来 */
}
.task-check.done { background: var(--green); border-color: var(--green); }
.task-text { flex: 1; font-size: 14px; }
.task-text.done { text-decoration: line-through; color: var(--ink-faint); }
.task-project { font-size: 11px; font-family: var(--mono); color: var(--ink-faint); }

/* ── 动效与可视化 ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 页面切换过渡 */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.page-content.page-enter { animation: pageIn 0.24s ease; }

/* 人生轮盘 SVG */
.wheel-wrap {
  display: flex; justify-content: center; align-items: center;
  padding: 12px 0;
}
.wheel-wrap svg { max-width: 320px; width: 100%; height: auto; }
/* 注意：这里绝不能写 fill —— 样式表的 fill 会覆盖 SVG 的 fill="..." 表现属性，
   导致 8 个维度的配色全部被压成一个颜色（实测过，扇形的内联属性完全失效）。
   每个扇形的颜色在 JS 里用内联 style 指定。 */
.wheel-sector { opacity: 0.9; transition: opacity 0.2s; }
.wheel-sector:hover { opacity: 1; }
/* 未评分的维度：留一层很淡的底，让"这块还空着"看得见 */
.wheel-sector.empty { fill: var(--border-strong); opacity: 0.22; }
.wheel-ring { fill: none; stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.wheel-area-label { font-size: 9px; fill: var(--ink-muted); font-weight: 500; }
/* 扇区内的分数读数：白字，底下配一层半透明深色圆（圆在 JS 里画）。
   不要给它加描边 —— 那会让字发虚起毛边，是本页最丑的一处。 */
.wheel-score-label { font-size: 10.5px; fill: #fff; font-weight: 700; font-family: var(--mono); }

/* 习惯 7 天趋势条 */
.trend-strip {
  display: flex; gap: 3px; align-items: center;
}
.trend-cell {
  width: 13px; height: 13px;
  border-radius: 4px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.trend-cell.on { background: var(--accent); border-color: var(--accent); }
.trend-cell.today { box-shadow: 0 0 0 2px var(--accent-glow); border-color: var(--accent); }
.trend-name { font-size: 12px; font-weight: 500; width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-pct { font-size: 10px; font-family: var(--mono); color: var(--ink-faint); width: 36px; text-align: right; }

/* 打卡动画 */
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.habit-cell.just-on { animation: pop 0.25s ease; }

/* 响应式：原实现的移动端侧边栏逻辑不成立 ——
   ① .sidebar 设了 position:fixed 却没有移出视口，于是常驻盖住正文；
   ② body:not(.sidebar-open) 依赖一个从未被设置过的 class，是死代码；
   ③ .main 本身是 flex:1，侧边栏脱离文档流后它已经占满整宽，再叠 margin-left 只会留出空缝。
   移动端规则已统一重写并放到文件末尾（避免被后面的 v3 润色规则按顺序覆盖）。 */

/* ═══════════════════════════════════════════
   方寸 · v3 视觉润色（2026-09-25）
   保留 v2 全部结构与内容，仅做纯视觉打磨：
   氛围 · 排版 · 层次 · 微交互 · 细节组件
   ═══════════════════════════════════════════ */

:root {
  --radius-card: 12px;
  /* 更柔的抬升阴影（低透明多层，不靠边框堆层次） */
  --shadow-lift: 0 1px 2px rgba(26,23,18,0.04), 0 10px 30px -10px rgba(26,23,18,0.10);
  --shadow-lift-hover: 0 2px 4px rgba(26,23,18,0.05), 0 18px 44px -12px rgba(26,23,18,0.16);
  --focus-ring: 0 0 0 3px var(--accent-glow);
}
body.dark {
  --shadow-lift: 0 1px 3px rgba(0,0,0,0.25), 0 12px 36px -10px rgba(0,0,0,0.5);
  --shadow-lift-hover: 0 2px 5px rgba(0,0,0,0.32), 0 20px 48px -12px rgba(0,0,0,0.62);
}

/* ── 1 · 纸张氛围：一撇暖光，不喧宾 ── */
body {
  background-image:
    radial-gradient(1200px 640px at 82% -8%, rgba(184,115,45,0.19) 0%, transparent 62%),
    radial-gradient(900px 580px at -6% 102%, rgba(184,115,45,0.13) 0%, transparent 60%),
    /* 中段那道：卡片正好压在页面中部，没有它玻璃就摸不到任何东西 */
    radial-gradient(780px 540px at 46% 44%, rgba(198,140,78,0.075) 0%, transparent 72%);
  background-attachment: fixed;
}
body.dark {
  background-image:
    radial-gradient(1200px 640px at 82% -8%, rgba(217,154,85,0.10) 0%, transparent 62%),
    radial-gradient(900px 580px at -6% 102%, rgba(217,154,85,0.085) 0%, transparent 60%),
    radial-gradient(780px 540px at 46% 44%, rgba(217,154,85,0.05) 0%, transparent 72%);
}

/* 选区 + 光标：给编辑器的呼吸感 */
::selection { background: var(--accent-light); color: var(--ink); }
input, textarea, [contenteditable] { caret-color: var(--accent); }

/* 主题化滚动条（薄、贴纸） */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ── 2 · 排版：更收紧、更有仪式感 ── */
.page-content { padding: 36px 32px 64px; }
/* 顶栏的材质统一在上面的 .topbar 定义里，这里不再覆盖，
   否则会把半透明背景和玻璃阴影盖回实心 */

/* 区块标签：前导琥珀刻度（编辑/纸感） */
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.13em;
}
.section-label::before {
  content: "";
  width: 3px; height: 12px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.9;
  flex-shrink: 0;
}
.section-title { font-size: 22px; font-weight: 600; letter-spacing: -0.4px; }
.section-desc { color: var(--ink-muted); }

/* ── 3 · 侧边栏：当前项指示条 + 更安静的悬停 ── */
.nav-item::before {
  content: "";
  position: absolute;
  left: -6px; top: 50%;
  transform: translateY(-50%);
  width: 2.5px; height: 15px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
}
.nav-item.active::before { opacity: 1; }
.nav-item .nav-icon { transition: transform var(--transition), opacity var(--transition); }
.nav-item.active .nav-icon { transform: scale(1.06); }


/* ── 4 · 卡片：圆角更润、抬升更柔 ── */
.card { border-radius: var(--radius-card); box-shadow: var(--shadow-glass); }
.card:hover { box-shadow: var(--shadow-glass-hover); }
.card-title { letter-spacing: -0.1px; }

/* ── 5 · 控件：焦点光晕 + 更精致的按钮/输入 ── */
.btn:focus-visible,
.icon-btn:focus-visible,
.nav-item:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.field input:focus, .field select:focus, .field textarea:focus {
  box-shadow: var(--focus-ring);
}
.field input::placeholder, .field textarea::placeholder { opacity: 0.72; }

.btn { font-weight: 600; letter-spacing: 0.01em; }
.btn-primary { box-shadow: 0 1px 2px rgba(26,23,18,0.14), 0 3px 10px -4px rgba(26,23,18,0.18); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 3px 10px -3px rgba(26,23,18,0.26); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-secondary:hover { transform: translateY(-1px); }

/* ── 6 · 仪表盘 hero：更有主次 ── */
.today-hero { align-items: center; }
.today-date { font-size: 42px; font-weight: 600; letter-spacing: -0.8px; }
.today-weekday { margin-left: 14px; letter-spacing: 0.06em; }
.today-greeting { font-size: 13px; }
.today-stats { gap: 0; }
.today-stat { padding: 0 22px; border-left: 1px solid var(--border); text-align: right; }
.today-stat:first-child { padding-left: 0; border-left: none; }
.today-stat:last-child { padding-right: 0; }
.today-stat-num { font-size: 28px; }

/* ── 7 · 习惯热力图 / 趋势：更圆、打卡更润 ── */
.habit-cell { border-radius: 6px; }
.habit-cell.on { box-shadow: 0 1px 5px rgba(184,115,45,0.4); }
.trend-cell { width: 14px; height: 14px; border-radius: 5px; }
.trend-cell.today { box-shadow: 0 0 0 2.5px var(--accent-glow); }

/* ── 8 · 任务 / 勾选态质感 ── */
.task-check { border-radius: 6px; }
.task-check.done { box-shadow: 0 1px 4px rgba(47,125,81,0.35); }

/* ── 9 · Kanban / 标签 ── */
.kanban-col { border-radius: var(--radius-card); }
.kanban-card { border-radius: 9px; }
.tag { letter-spacing: 0.02em; }

/* ── 10 · 空状态：图标入圆片 ── */
.empty-icon {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; color: var(--ink-faint);
}
.empty-icon .ic { width: 22px; height: 22px; }

/* ── 11 · （原「终端树」的质感规则已删，首页改用模块卡片）── */

/* ── 12 · 页面切换：更从容 ── */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}


/* ═══════════════════════════════════════════
   方寸 · v3.1 细节润色（2026-09-25）
   在 v3 基础上做更细的打磨：分段控件 · 进度条
   · 悬停/焦点/节奏等微调。内容依旧不变。
   ═══════════════════════════════════════════ */

/* ── 文本可读性 ── */
.section-desc { max-width: 62ch; }

/* ── 任务行悬停：更轻的琥珀浸染 ── */
.task-item:hover { background: rgba(184,115,45,0.05); }
body.dark .task-item:hover { background: rgba(217,154,85,0.07); }

/* ── 勾选 / 标签：更柔和 ── */
.task-check.done { box-shadow: 0 1px 4px rgba(47,125,81,0.35); }
.tag { box-shadow: 0 1px 0 rgba(26,23,18,0.04); }
.btn-secondary { box-shadow: 0 1px 0 rgba(26,23,18,0.03); }

/* ── 今日焦点行：琥珀小圆点起势 ── */
.today-focus::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
  flex-shrink: 0;
}
.today-focus .focus-text { color: var(--ink); font-weight: 600; }

/* ── 统计数字的 sub 更弱化 ── */
.today-stat-num .sub { color: var(--ink-faint); }

/* ── 规划尺度 → 分段控件 ── */
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 11px;
}
body.dark .seg { background: rgba(236,231,221,0.05); }
.seg .btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-weight: 600;
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: none;
}
.seg .btn:hover { background: var(--accent-glow); color: var(--ink); transform: none; }
.seg .btn.btn-primary {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow-lift);
}
body.dark .seg .btn.btn-primary { background: var(--bg-warm); color: var(--accent); }
.seg .btn:active { transform: none; }

/* ── Setup 进度条 ── */
.setup-progress {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.setup-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 70%, #e2a35f 100%);
  box-shadow: 0 1px 5px var(--accent-glow);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
body.dark .setup-progress-fill { box-shadow: 0 1px 6px rgba(217,154,85,0.35); }
.setup-progress-label { font-size: 12px; color: var(--ink-faint); font-family: var(--mono); letter-spacing: 0.02em; }

/* ═══════════════════════════════════════════
   首页 · 全部模块入口卡片（2026-09-25）
   替代原来那个 ASCII 树形块 —— 那个只是等宽字排版，
   既不可点、也不显示任何状态。现在每张卡是：
   图标 + 名称 + 一句「活的状态」，整块可点直接进入。
   ═══════════════════════════════════════════ */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.module-tile {
  display: block; width: 100%; min-width: 0; text-align: left; cursor: pointer;
  padding: 13px 14px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  font: inherit; color: inherit;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.module-tile:hover {
  border-color: var(--accent); transform: translateY(-1px);
  box-shadow: var(--shadow-lift, 0 2px 10px rgba(26, 24, 20, 0.08));
}
.module-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 当前所在页：强调色底 + 边框，替代原来那句 "← 你在这里" */
.module-tile.is-current { border-color: var(--accent); background: var(--accent-glow); }
.module-tile-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.module-tile-icon { display: inline-flex; flex-shrink: 0; color: var(--accent); }
.module-tile-name {
  font-size: 13px; font-weight: 600; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.module-tile-meta {
  display: block; margin-top: 6px; min-width: 0;
  font-size: 11px; font-family: var(--mono); color: var(--ink-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 768px) { .module-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 360px) {
  .module-tile { padding: 11px 12px; }
  .module-tile-name { font-size: 12.5px; }
}
/* ═══════════════════════════════════════════
   仪表盘扩充（2026-09-25）：本周概览 / 正在读 / 最近笔记 / 最近联系
   ═══════════════════════════════════════════ */
.wk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
/* 网格子项默认 min-width:auto —— 里面只要有 white-space:nowrap 的长文本，
   就会把整列的 min-content 撑到文本宽度，窄屏直接溢出
   （实测 320px 下仪表盘的「正在读 / 最近读书笔记」两列被撑到 350px → 溢出 42px）。
   允许收缩后，文本由各自的 text-overflow:ellipsis 负责截断。 */
.grid-2 > *, .grid-3 > *, .grid-4 > *, .wk-grid > * { min-width: 0; }
.wk-num {
  font-family: var(--serif); font-size: 26px; font-weight: 600;
  line-height: 1.05; font-feature-settings: "tnum" 1; white-space: nowrap;
}
.wk-num .sub { font-size: 12px; color: var(--ink-faint); font-weight: 500; }
.wk-num.accent { color: var(--accent); }
.wk-label {
  font-size: 10px; font-family: var(--mono); color: var(--ink-faint);
  letter-spacing: 0.08em; text-transform: uppercase; margin-top: 5px;
}
.wk-bar {
  height: 5px; border-radius: 999px; background: var(--border);
  overflow: hidden; margin-top: 8px;
}
.wk-bar > i { display: block; height: 100%; background: var(--accent); transition: width 0.3s; }
.mini-title {
  display: block; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini-meta { font-size: 12px; color: var(--ink-muted); margin-top: 4px; font-family: var(--mono); }
/* 可点卡片底部那行「去做什么 ›」—— 明示这块能点进去 */
.mini-go {
  margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--accent); font-family: var(--mono);
}
.mini-quote {
  display: block; font-size: 12px; color: var(--ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini-note { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
/* 320～359px（iPhone SE 一代这类）：年份和星期标签都让位，
   只留「10.19」，否则星期标签会被导出按钮压掉半截 */
@media (max-width: 359px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar-title { font-size: 14.5px; }
  .tb-date-wd { display: none; }
  .topbar-export { padding: 0 10px 0 9px; }
}

@media (max-width: 560px) {
  .wk-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .wk-num { font-size: 22px; }
}

/* ═══════════════════════════════════════════
   习惯热力图 · 移动端可用性修复（2026-09-25 追加）
   原来的问题：手机上被写成 76px + repeat(14,30px) = 总宽 541px，
   而卡片内可用宽度只有约 338px → ①必须一直左右滑 ②名字列被压到 76px
   后截断成省略号（"字被挡住"）。
   现在列数由 JS 统一决定（窄屏 7 列刚好铺满，不滚动），这里只负责：
   名字列钉住不随横向滚动移走、文字不截断、今天有标记。
   ═══════════════════════════════════════════ */
.habit-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.habit-grid { font-size: 11px; }
.habit-head {
  font-size: 10px; color: var(--ink-faint); padding-bottom: 4px;
  position: sticky; left: 0; z-index: 3;
  background: var(--bg-card);
}
.habit-day {
  font-size: 9px; color: var(--ink-faint); text-align: center; padding-bottom: 4px;
}
.habit-day.today { color: var(--accent); font-weight: 700; }
/* 名字列钉在左边：即使窗口很窄需要横向滑动，习惯名也始终可见 */
.habit-label {
  position: sticky; left: 0; z-index: 2;
  background: var(--bg-card);
  gap: 6px; padding-right: 10px;
}
.habit-name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.habit-streak {
  flex-shrink: 0; margin-left: auto;
  font-family: var(--mono); font-size: 10px; color: var(--accent);
}
.habit-cell.today { box-shadow: 0 0 0 2px var(--accent-glow); }
.habit-manage { display: flex; flex-wrap: wrap; gap: 8px; }
.habit-del { color: var(--red, #A32D2D); font-weight: 700; margin-left: 2px; }
@media (max-width: 560px) {
  /* 手机上格子要够手指点 */
  .habit-cell { height: 34px; }
  .habit-manage .btn { font-size: 12px; }
  /* 字号收一点，让「阅读 30 分钟」这类名字在 126px 名字列里能完整显示
     （12px 下实测需要 69px，只分到 68px → 被截断 1px） */
  .habit-label { font-size: 11px; }
  .habit-streak { font-size: 9.5px; }
}

/* ═══════════════════════════════════════════
   响应式 · 移动端（2026-09-25 重写）
   侧边栏改为抽屉：默认移出视口，body.sidebar-open 时滑入
   放在文件末尾，确保不被前文规则按顺序覆盖
   ═══════════════════════════════════════════ */

/* 仅移动端可见的元素，桌面端先隐藏 */
.topbar-menu { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }

  /* ── 侧边栏：抽屉 ── */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 120;
    height: 100vh;
    height: 100dvh;                 /* 移动端浏览器地址栏遮挡时更准 */
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    transform: translateX(-100%);   /* 关键：默认移出视口 */
    transition: transform 0.26s ease;
    box-shadow: none;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 26px rgba(26, 24, 20, 0.22);
  }
  /* 手机上不使用折叠态（JS 也会清掉这个 class，这里仅作兜底） */
  .sidebar.collapsed { width: var(--sidebar-w); min-width: var(--sidebar-w); }
  /* 抽屉打开时锁住背景滚动 */
  body.sidebar-open { overflow: hidden; }

  /* ── 遮罩 ── */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(26, 24, 20, 0.44);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.26s ease;
  }
  body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

  /* ── 主区：占满整屏，不再为侧边栏留边距 ── */
  .main { margin-left: 0; width: 100%; min-width: 0; }
  .page-content { padding: 16px 14px 48px; }

  /* ── 顶部栏 ──
     386px 宽的屏上要塞下：汉堡 + 标题 + 日期 + 导出。
     所以窄屏砍年份、去掉标题旁那道竖线，只留「10.19 周一」。 */
  .topbar { gap: 10px; padding: 0 14px; }
  .topbar-menu {
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; width: 32px; height: 32px;
    min-width: 32px; min-height: 32px;
    border-radius: 999px;
  }
  .topbar-title { font-size: 15px; flex-shrink: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-date {
    font-size: 11px; margin-left: auto; padding-left: 4px;
    white-space: nowrap; overflow: hidden;
  }
  .topbar-date::before { display: block; height: 9px; margin-right: 8px; }
  .tb-date-y { display: none; }
  .tb-date-wd { font-size: 10px; padding: 1.5px 5px; margin-left: 5px; }
  .topbar-export { flex-shrink: 0; height: 32px; padding: 0 12px 0 10px; }

  /* ── 触摸目标不小于 40px ── */
  .icon-btn { min-width: 40px; min-height: 40px; justify-content: center; }
  /* 11 个导航项要在一屏里放完，抽屉才不用滚。
     47px → 40px，仍高于拇指可靠点击的下限 */
  .nav-item { padding-top: 10px; padding-bottom: 10px; }
  .nav-group-label { padding-top: 9px; padding-bottom: 4px; }
  .sidebar-nav { padding-bottom: 8px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }
  .tag { padding: 5px 10px; }

  /* ── 输入框字号必须 ≥16px ──
     iOS Safari 聚焦字号小于 16px 的输入框时会把整页放大，
     这是「没法填写内容」的直接原因之一 */
  input, textarea, select,
  .field input, .field textarea, .field select { font-size: 16px; }

  /* ── 网格塌成两列 ── */
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* ── 宽组件改为横滑 ── */
  /* 习惯画布的列数现在由 habits.js 用内联 style 指定（窄屏 7 列铺满、宽屏 14 列），
     这里不再写死列数 —— 写死会与 JS 打架，也会让列数错位。 */
  .habit-grid { gap: 3px; }
  .kanban { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .kanban-col { min-width: 76vw; scroll-snap-align: start; }

  /* ── 卡片与标题收紧 ── */
  .card { padding: 16px; }
  .section-title { font-size: 20px; }
  .wheel-wrap svg { max-width: 100%; }
}

@media (max-width: 560px) {
  /* 手机上一律单列。grid-2 是仪表盘「待办任务 + 最近日记」用的，不能漏 ——
     漏掉它就会挤成两条 180px 的窄缝，文字每行只能放四五个字 */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  /* 列数交给 habits.js（窄屏 7 列），这里不动 grid-template-columns */
  .page-content { padding: 14px 12px 48px; }
  .topbar { padding: 0 12px; }
  .today-date { font-size: 24px; }
  .today-stats { gap: 14px; }
  /* 名字列要放宽而不是收窄 —— 收窄会把「阅读 30 分钟」截得更短 */
  .trend-name { width: 100px; }
  .trend-cell { width: 12px; height: 12px; }
  .trend-pct { width: 30px; }
  .card { padding: 14px; }
  .kanban-col { min-width: 84vw; }
}

/* ── flex 行内长文本溢出修复 ──
   flex 子项默认 min-width:auto，长文本会把整行撑爆而不是换行。
   仪表盘「最近日记」的日记正文（slice 50 字）因此会被切掉右侧 ——
   这个问题桌面端同样存在，只是宽屏不容易察觉。 */
.task-item > * { min-width: 0; }
.task-item .tag { flex-shrink: 0; }

/* ── 窄屏 flex 行收缩修复（全局）──
   flex 子项与表单控件默认 min-width:auto：input 会按 size 属性算出约 177px 的最小宽，
   和按钮同处一行时必然撑爆窄屏（习惯页「输入框 + 添加 + 每个习惯一个删除按钮」就是典型）。
   下面只放开「允许收缩」，不强制任何宽度，宽屏表现不变。 */
.flex > * { min-width: 0; }
input, textarea, select { min-width: 0; }

@media (max-width: 560px) {
  /* 手机上让 flex 行可换行，并要求输入类控件独占一行。
     否则像「输入框 + 添加 + N 个删除按钮」这种行无论怎么压缩都放不下 */
  .flex { flex-wrap: wrap; }
  .flex > input,
  .flex > select,
  .flex > textarea { flex: 1 0 100% !important; }
  /* 嵌套的 .flex 子组（如「新板名 + 新板按钮」）也要独占一行，
     否则它会赖在第一行，把后面的按钮挤出屏幕 */
  .flex > .flex { flex: 1 0 100%; }

  /* 看板列钉死宽度：否则卡片内容会把列撑宽，把按钮顶出屏幕 */
  .kanban-col { min-width: 82vw; max-width: 82vw; }
}

/* ═══════════════════════════════════════════
   移动端输入体验（2026-09-25 追加）
   目标：手机上「填得进去、看得见、存得住」
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* 触摸高度：输入类控件不小于 44px（手指点得中） */
  .field input, .field select { min-height: 44px; }
  .field textarea, textarea { min-height: 46px; line-height: 1.7; }
  /* 7 个诚实问题的自适应高度文本框：由 autoGrow() 控制高度 */
  .q-input { min-height: 44px; resize: none; overflow: hidden; }
  /* 手机上字号已提到 16px，行高放宽一点更好读 */
  .field label { font-size: 13px; line-height: 1.5; }
}

@media (max-width: 560px) {
  /* 保存按钮吸底：日记 / 规划这类长表单，不用滚到页面底部才能保存。
     负外边距是为了让吸底条铺满整宽，视觉上是「操作栏」而不是一块卡片 */
  .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 40;
    margin: 0 -12px;
    padding: 10px 12px 12px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 20px -12px rgba(26, 24, 20, 0.28);
    flex-wrap: nowrap !important;
  }
  .form-actions .btn { flex: 1 1 auto; }
}

/* ═══════════════════════════════════════════
   人生轮盘评分滑块（2026-09-25）
   替换原来那 8 个数字输入框：拖动即时更新轮盘，
   不用手敲、手机上也不会弹数字键盘
   ═══════════════════════════════════════════ */
.wheel-controls { display: grid; gap: 4px; margin-top: 16px; }
.wheel-row { display: flex; align-items: center; gap: 10px; min-height: 30px; }
.wheel-row-name {
  font-size: 12px; color: var(--ink-muted);
  width: 76px; flex-shrink: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 数值读数：原来是个 20px 宽的裸数字（右对齐），看着像没做完。
   改成等宽数字的圆角胶囊 —— 宽度固定所以拖动时不会左右跳，视觉上像仪表读数。 */
.wheel-row-val {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 27px; height: 22px; padding: 0 7px;
  border-radius: 999px; flex-shrink: 0;
  background: var(--accent-glow); color: var(--accent);
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  font-feature-settings: "tnum" 1;
}
.wheel-row input[type="range"] {
  flex: 1; min-width: 0; height: 24px; margin: 0;
  background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer;
}
.wheel-row input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 999px; background: var(--border-strong);
}
.wheel-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; margin-top: -7px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-card);
  box-shadow: 0 1px 4px rgba(26, 24, 20, 0.28);
}
.wheel-row input[type="range"]::-moz-range-track {
  height: 4px; border-radius: 999px; background: var(--border-strong);
}
.wheel-row input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-card);
}
.wheel-row input[type="range"]:focus { outline: none; }

@media (max-width: 768px) {
  /* 手机上把滑块和滑块头做大，手指好拖 */
  .wheel-row { min-height: 42px; gap: 12px; }
  .wheel-row-name { width: 68px; font-size: 13px; }
  .wheel-row-val { font-size: 13px; min-width: 30px; height: 24px; }
  .wheel-row input[type="range"] { height: 36px; }
  .wheel-row input[type="range"]::-webkit-slider-thumb {
    width: 22px; height: 22px; margin-top: -9px;
  }
  .wheel-row input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; }
}

/* ═══════════════════════════════════════════
   表单控件基础样式（2026-09-25 追加）
   为什么需要：习惯追踪 / 任务清单 / 每日阅读 / 写作看板 / 联系人
   这 5 个页面用的是「裸」<input>（内联样式、没有 .field 包裹），
   拿不到 .field 的样式，于是渲染成浏览器默认外观 ——
   视觉上与其他页面不一致，且字号 <16px 会触发 iOS 聚焦放大。
   这里补一层全局基础样式兜住。
   注意：选择器优先级低于 .field input，不会影响已调好的页面。
   ═══════════════════════════════════════════ */
input[type="text"], input[type="search"], input[type="number"],
input[type="email"], input[type="password"], input[type="url"],
input[type="tel"], input:not([type]), select, textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--ink);
  max-width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input[type="text"]:focus, input[type="search"]:focus, input[type="number"]:focus,
input[type="email"]:focus, input[type="password"]:focus, input[type="url"]:focus,
input[type="tel"]:focus, input:not([type]):focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

@media (max-width: 768px) {
  /* 手机上所有输入类控件统一：字号 16px（防 iOS 聚焦放大整页）
     + 触摸高度 ≥44px。这里不依赖 .field，覆盖那 5 个内联样式的页面 */
  input[type="text"], input[type="search"], input[type="number"],
  input[type="email"], input[type="password"], input[type="url"],
  input[type="tel"], input:not([type]), select, textarea {
    font-size: 16px;
    min-height: 44px;
  }
  /* 待办卡里那个就地展开的小输入框：字号仍保持 16px（防 iOS 聚焦放大），
     但高度压到 34px，跟旁边的小字一排，不再是一大块 */
  input[type="text"].jd-add-input { min-height: 34px; height: 34px; padding: 0 8px; }
}

/* ── 新版本提示条（version-check.js）───────────────────────── */
.update-bar {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 18px;
  border-radius: 999px;
  background: var(--glass-bg, rgba(255,253,249,0.82));
  backdrop-filter: var(--glass-blur, blur(20px) saturate(1.4));
  -webkit-backdrop-filter: var(--glass-blur, blur(20px) saturate(1.4));
  box-shadow:
    inset 0 1px 0 var(--glass-rim, rgba(255,255,255,0.9)),
    0 1px 2px rgba(26,23,18,0.05),
    0 10px 30px rgba(26,23,18,0.13);
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  animation: update-bar-in 0.22s ease;
}
@keyframes update-bar-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.update-bar .ub-text { color: var(--ink-muted); }
.update-bar .ub-go {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: opacity var(--transition);
}
.update-bar .ub-go:hover { opacity: 0.86; }
.update-bar .ub-later {
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}
.update-bar .ub-later:hover { color: var(--ink); background: rgba(26,23,18,0.05); }
body.dark .update-bar .ub-later:hover { background: rgba(255,255,255,0.08); }

@media (max-width: 560px) {
  .update-bar { left: 12px; right: 12px; transform: none; justify-content: center; }
  @keyframes update-bar-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ── 首页「现在该做」提醒（dashboard.js）──────────────────── */
.reminders { display: flex; flex-direction: column; gap: 8px; }
.reminder {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--glass-bg, var(--bg-card));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass, var(--shadow-card));
  font-family: inherit;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.reminder:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glass-hover, var(--shadow-card-hover));
}
.reminder-ic { display: flex; align-items: center; color: var(--accent); flex-shrink: 0; }
.reminder-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.reminder-title { font-weight: 600; }
.reminder-hint { font-size: 12px; color: var(--ink-faint); }
.reminder-go { color: var(--ink-faint); font-size: 15px; flex-shrink: 0; }
/* 全部完成时的反馈卡（不是一句「做完了」就完事） */
.allclear {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: var(--radius-md);
  background: var(--glass-bg, var(--bg-card));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-glass, var(--shadow-card));
}
.allclear-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(47, 125, 81, 0.11);
  color: var(--green);
}
body.dark .allclear-mark { background: rgba(76, 175, 125, 0.16); }
.allclear-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.allclear-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.allclear-facts { font-size: 12px; color: var(--ink-faint); }

/* ── 首页区块标题可点 + 模块分组（dashboard.js）────────────── */
.section-label-link {
  cursor: pointer;
  user-select: none;
  width: fit-content;
  transition: color var(--transition);
}
.section-label-link .section-label-go {
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  color: var(--ink-faint);
  opacity: 0.55;
  transition: transform var(--transition), color var(--transition), opacity var(--transition);
}
.section-label-link:hover { color: var(--accent); }
.section-label-link:hover .section-label-go {
  transform: translateX(3px);
  color: var(--accent);
  opacity: 1;
}

.module-group-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 18px 0 8px;
}

/* 区块标题右侧的小指标（代替被撤掉的「本周概览」数字块） */
.section-stat {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-faint);
  text-transform: none;
  white-space: nowrap;
}

/* ── 首页的人生轮盘概览（与季度 Retreat 共用同一份数据）──── */
.wheel-mini { display: flex; align-items: center; gap: 22px; }
.wheel-mini-plot { width: 212px; flex-shrink: 0; }
.wheel-mini-plot svg { width: 100%; height: auto; display: block; }
.wheel-mini-side { flex: 1; min-width: 0; }
.wm-avg {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 12px;
}
.wm-avg .sub {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-faint);
  margin-left: 5px;
}
.wm-line { font-size: 13px; color: var(--ink-muted); padding: 2px 0; }
.wm-hint { font-size: 12px; color: var(--ink-faint); margin-top: 9px; }

@media (max-width: 560px) {
  .wheel-mini { flex-direction: column; gap: 14px; }
  .wheel-mini-plot { width: 100%; max-width: 232px; }
}

/* ── AI 结果展示（ai.js）────────────────────────────────── */
.ai-out {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}
.ai-out-body {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--ink);
}
.ai-out-foot {
  margin-top: 11px;
  font-size: 11px;
  color: var(--ink-faint);
  font-family: var(--mono);
}
/* AI 挑出来的待办：按钮组 + 底部一键操作 */
.ai-tasks-btns { margin-left: auto; display: flex; gap: 6px; flex-shrink: 0; }
.ai-tasks-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 12px 14px; border-top: 1px dashed var(--border);
}
.ai-tasks-done { padding: 12px 0; font-size: 12.5px; color: var(--green, #2f7d51); }

/* ═══════════════════════════════════════════════════════════
   习惯 · 固定周格子（周一→周日）
   首页「记今天」两个页面共用。原来的 .trend-cell 是"近 7 天"滚动窗口，
   今天永远吊在最后一格，看不出是周几；改成固定周后今天落在它该在的位置。
   ═══════════════════════════════════════════════════════════ */
.hhead {
  display: flex; align-items: center; gap: 12px;
  padding: 0 0 7px; border-bottom: 1px solid var(--border);
}
.hhead em {
  width: 16px; text-align: center; font-style: normal; flex-shrink: 0;
  font-size: 11px; color: var(--ink-faint); display: block;
}
.hhead em.td { color: var(--accent); font-weight: 700; }

.hrow {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 0; border-bottom: 1px solid var(--border);
}
.hrow:last-child { border-bottom: 0; }
.hname {
  font-size: 12.5px; width: 60px; flex-shrink: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hcells { display: flex; gap: 5px; flex: 1; justify-content: space-between; }
.hcells i {
  width: 16px; height: 16px; border-radius: 5px; display: block; flex-shrink: 0;
  background: rgba(26,23,18,.07); cursor: pointer;
  transition: background var(--transition), transform 0.12s ease;
}
.hcells i:hover { transform: scale(1.12); }
.hcells i.on { background: var(--accent); }
/* 只有「正在看的那天」能点，给个淡淡的描边提示 */
.hcells i.now { box-shadow: 0 0 0 1.5px var(--accent-glow); }
.hcells i.fu { cursor: default; }
/* 还没到的日子：虚线 + 点不动。不然能提前打卡，逻辑上说不通 */
.hcells i.fu {
  background: transparent; border: 1px dashed rgba(26,23,18,.13);
  cursor: not-allowed; opacity: .6;
}
.hcells i.fu:hover { transform: none; }
/* 今天是圆的，历史是方的 —— 不加这个，最右格和其他实心格长得一样 */
.hcells i.td { border-radius: 50%; box-shadow: 0 0 0 2px rgba(184,115,45,.35); }
.hcells i.td.on { background: var(--accent); }
.hpct {
  margin-left: auto; font-family: var(--mono);
  font-size: 10.5px; color: var(--ink-faint);
}
.hhint { font-size: 11px; color: var(--ink-faint); padding-top: 10px; }
body.dark .hcells i { background: rgba(255,255,255,.10); }
body.dark .hcells i.fu { border-color: rgba(255,255,255,.18); }

@media (max-width: 560px) {
  .hhead, .hrow { gap: 8px; }
  .hname { width: 80px; }   /* 52px 会把「阅读 30 分钟」截成「阅读 3…」 */
  .hhead em { width: 25px; font-size: 10px; }
  .hcells i { width: 25px; height: 25px; border-radius: 8px; }
}

/* ═══════════════════════════════════════════════════════════
   记今天（填写总台）
   ═══════════════════════════════════════════════════════════ */
/* ── 记今天 ──
   宽屏两栏：左边是「写」，右边是「今天的事」。
   原来整页锁在 640px，1280 的屏上右边空掉三分之一。 */
.jt { padding-bottom: 104px; }

.jt-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.jt-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin-bottom: 5px;
}
.jt-sub { font-size: 12.5px; color: var(--ink-faint); }

/* 日期切换：一枚三段式胶囊，选中段是实心的 */
.jt-datebar {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--border);
  border-radius: 999px;
  flex-shrink: 0;
}
body.dark .jt-datebar { background: rgba(255,255,255,0.05); }
.jt-date {
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-muted);
  padding: 5px 13px;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}
.jt-date:hover { color: var(--accent); }
.jt-date.on { background: var(--accent); color: #fff; font-weight: 600; }
.jt-date.on:hover { color: #fff; }
.jt-date.cal { color: var(--ink-faint); }

.jt-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}
.jt-block { grid-column: 1; min-width: 0; }
/* 右栏独立成列：内部间距固定，不被左栏每张卡的高度牵着走 */
.jt-side {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
.jt-ai { grid-column: 2; }

.jt-block-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 9px;
  flex-wrap: wrap;
}
/* AI 补题的状态另起一行，别和右上角的入口挤在一起 */
#ai-fillq-status {
  flex-basis: 100%;
  margin: 1px 0 0;
  text-align: left;
}
#ai-fillq-status:empty { display: none; }
.jt-block-title {
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.jt-block-hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-faint);
  text-align: right;
}
.jt-link { cursor: pointer; color: var(--accent); }
.jt-link:hover { opacity: 0.72; }

.jt-card { padding: 18px 20px; }
/* 待办列表贴着卡片边，所以卡片自己不要内边距 */
.jt-task-card { padding: 0; overflow: hidden; }
.jt-task-card .task-item { padding: 9px 13px; gap: 9px; }
.jt-task-card .task-text { font-size: 13px; line-height: 1.5; }
.jt-task-card .task-date { font-size: 10px; }
.jt-card .hcells { justify-content: flex-start; gap: 10px; }
.jt-task-card .jd-del {
  background: none;
  border: 0;
  color: var(--ink-faint);
  padding: 2px 5px;
  opacity: 0.5;
  font-size: 12px;
  line-height: 1;
  transition: opacity var(--transition), color var(--transition);
}
.jt-task-card .jd-del:hover { opacity: 1; color: var(--red); background: none; }
.jt-hint { font-size: 11px; line-height: 1.6; color: var(--ink-faint); }
.jt-ai-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 7 个问题的标签：序号收成一枚小徽章 */
.field .q-label { display: flex; align-items: baseline; gap: 8px; font-weight: 500; }
.field.q-field .q-label { margin-bottom: 8px; line-height: 1.55; }
.q-input { line-height: 1.7; }
.q-num {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--accent);
  background: rgba(184,115,45,.12);
  border-radius: 5px;
  padding: 0 5px;
}

/* 通用小胶囊：阅读的「15 分钟」那排还在用 */
.pill {
  font-family: inherit;
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,.5);
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
body.dark .pill { background: rgba(255,255,255,.06); }

/* 其余 N 个问题：一行加号，点开才铺 */
.q-rest { margin-top: 4px; }
.q-rest summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-muted);
  padding: 10px 0 2px;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 7px;
}
.q-rest summary::-webkit-details-marker { display: none; }
.q-rest summary::before {
  content: '＋';
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
}
.q-rest[open] summary::before { content: '－'; }
.q-rest summary:hover { color: var(--accent); }

/* 题目之间用一条细线隔开：看着像一页问卷，而不是七个输入框堆在一起 */
.jt-card .q-input {
  resize: none;                       /* 高度由 autoGrow 接管，别留右下角的拖拽角 */
  background: rgba(26,23,18,0.028);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 11px;
  min-height: 38px;
}
body.dark .jt-card .q-input { background: rgba(255,255,255,0.045); }
.jt-card .q-input:focus {
  background: var(--bg-card);
  border-color: var(--accent-line);
  box-shadow: none;
}
/* AI 补的答案：浅橙底 + 细橙边，一眼能挑出来复核；自己改一个字就褪掉 */
.jt-card .q-input.ai-filled {
  background: rgba(184,115,45,0.07);
  border-color: rgba(184,115,45,0.26);
}
body.dark .jt-card .q-input.ai-filled {
  background: rgba(217,154,85,0.10);
  border-color: rgba(217,154,85,0.28);
}
.jt-card .q-field { margin-bottom: 14px; }
.jt-card .q-field + .q-field {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.jt-card .q-field:last-of-type { margin-bottom: 0; }

/* 自由书写：去掉输入框边框，整张卡片就是书写区 */
.jt-card #journal-text {
  width: 100%;
  min-height: 176px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink);
  resize: none;
  outline: none;
}
.jt-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
}

/* 吸底保存：一条工具条，左边提示右边按钮，不再是一条黑杠 */
.jt-dock {
  position: fixed;
  left: var(--sidebar-w); right: 0; bottom: 0; z-index: 45;
  padding: 10px 28px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(248,246,242,.88);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid var(--border);
}
body.dark .jt-dock { background: rgba(26,23,21,.9); }
body:has(.sidebar.collapsed) .jt-dock { left: 64px; }
.jt-dock-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.jt-dock-hint {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  color: var(--ink-faint);
}
.jt-dock-hint.ok { color: var(--green); font-weight: 600; }
.jt-save { flex-shrink: 0; font-size: 13.5px; padding: 10px 26px; }

/* 1000px 以下两栏会把「写」挤得太窄，改回一栏 */
@media (max-width: 1000px) {
  .jt-grid { grid-template-columns: 1fr; gap: 20px; }
  .jt-side { grid-column: 1; grid-row: auto; gap: 20px; }
  .jt-ai { grid-column: 1; }
}
@media (max-width: 768px) {
  .jt { padding-bottom: 130px; }
  .jt-head { gap: 12px; align-items: flex-start; }
  .jt-title { font-size: 21px; }
  .jt-dock { left: 0; padding: 8px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .jt-dock-inner { flex-direction: column-reverse; align-items: stretch; gap: 5px; }
  .jt-dock-hint { text-align: center; font-size: 10.5px; line-height: 1.4; }
  .jt-save { width: 100%; padding: 11px; }
  .jt-card { padding: 15px 16px; }
  .jt-card #journal-text { min-height: 110px; font-size: 16px; }
}

.jd-top { border-bottom: 1px solid var(--border); }
.jd-add { display: flex; gap: 9px; padding: 12px 14px 10px; }
.jd-add input { flex: 1; min-width: 0; }
.jd-ai { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 14px 12px; }
/* 手动找待办的入口：主流程是底部「保存并整理」，这里只做备用的小入口，
   所以收成一行小字链接，不再跟主按钮抢注意力 */
.ai-mini {
  font-family: inherit; font-size: 11.5px; line-height: 1.4;
  color: var(--ink-faint); background: none; border: 0; padding: 0;
  cursor: pointer; text-decoration: underline dotted; text-underline-offset: 2px;
  transition: color var(--transition);
}
.ai-mini:hover { color: var(--accent); }
/* 有待确认的条目时用主色，别让它混在一堆灰字里看不见 */
.ai-mini.hot { color: var(--accent); font-weight: 600; }
/* 待办卡底部：两个用得少的入口挤在一行小字里 */
.jd-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px; border-top: 1px solid var(--border);
}
.jd-ai-status { font-size: 11.5px; color: var(--ink-faint); margin-left: auto; }
/* 就地展开的小输入框：跟旁边的小字一样高，不额外占一行。
   选择器要压过上面那条 input[type="text"] 的全局规则 */
input[type="text"].jd-add-input {
  font-family: inherit; font-size: 14px; color: var(--ink);
  height: 34px; width: 168px; max-width: 60vw;
  padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 7px;
  background: rgba(255,255,255,.6); outline: none;
  transition: border-color var(--transition);
}
.jd-add-input:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
body.dark .jd-add-input { background: rgba(255,255,255,.06); }
.jd-empty { padding: 15px 14px; font-size: 12.5px; color: var(--ink-faint); }
.jd-more { padding: 10px 14px; font-size: 12px; color: var(--ink-faint); border-top: 1px solid var(--border); }
.jd-more span { color: var(--accent); cursor: pointer; }
.jd-del { margin-left: auto; flex-shrink: 0; }
.task-date { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); flex-shrink: 0; }

/* 归档行里的两个日期：完成 + 归档，各写各的，别再只有一个说不清的日期 */
.arch-dates {
  display: flex; flex-direction: column; gap: 1px;
  width: 52px; flex-shrink: 0; font-family: var(--mono); font-size: 10px;
  color: var(--ink-faint); line-height: 1.3;
}
.arch-dates b { font-weight: 600; color: var(--ink-muted); }
.arch-dates em { font-style: normal; opacity: .8; }
.arch-week {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint);
}

/* 阅读时长 */
.min-input { width: 96px; }

/* ═══════════════════════════════════════════════════════════
   月历弹层（Calendar）
   ═══════════════════════════════════════════════════════════ */
.cal-mask {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(26,23,18,.32);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
body.cal-open .cal-mask { opacity: 1; pointer-events: auto; }

.cal-pop {
  position: fixed; left: 50%; top: 50%; z-index: 960;
  width: min(384px, 92vw);
  background: var(--bg-card); border-radius: 18px;
  padding: 18px 20px 16px;
  box-shadow: 0 20px 60px rgba(26,23,18,.24);
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -46%) scale(.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
body.cal-open .cal-pop { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }

.cal-pop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-pop-head b { flex: 1; text-align: center; font-family: var(--serif); font-size: 15px; }
.cal-nav {
  border: 0; background: transparent; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 3px 9px; border-radius: 7px;
  color: var(--ink-muted); transition: background var(--transition), color var(--transition);
}
.cal-nav:hover { background: var(--accent-glow); color: var(--accent); }
.cal-pop-close {
  border: 0; background: transparent; cursor: pointer;
  font-size: 13px; padding: 5px 8px; border-radius: 7px; color: var(--ink-faint);
  transition: background var(--transition), color var(--transition);
}
.cal-pop-close:hover { background: var(--accent-glow); color: var(--ink); }

.cal-grid-host { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-wd { font-size: 10.5px; color: var(--ink-faint); text-align: center; padding-bottom: 5px; }
.cal-dy {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--ink-muted); border-radius: 9px; cursor: pointer;
  transition: background var(--transition);
}
.cal-dy.has { background: rgba(184,115,45,.15); color: #8d5a22; font-weight: 600; }
.cal-dy.miss { color: var(--ink-faint); opacity: .5; }
.cal-dy.td { background: var(--accent); color: #fff; font-weight: 700; }
.cal-dy.fu { color: var(--ink-faint); opacity: .26; cursor: default; }
.cal-dy:not(.fu):hover { background: var(--accent-glow); }
.cal-dy.td:hover { background: var(--accent); }

.cal-legend { display: flex; gap: 14px; margin-top: 14px; font-size: 10.5px; color: var(--ink-faint); justify-content: center; }
.cal-legend span { display: flex; align-items: center; gap: 5px; }
.cal-legend i { width: 11px; height: 11px; border-radius: 4px; display: block; }
.cal-hint { margin-top: 12px; text-align: center; font-size: 11px; color: var(--ink-faint); }

/* ═══════════════════════════════════════════════════════════
   AI 整理（AITidy）—— 居中偏下的面板，手机上从底部升起
   ═══════════════════════════════════════════════════════════ */
.tidy-mask {
  position: fixed; inset: 0; z-index: 970;
  background: rgba(26,23,18,.34);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
body.tidy-open .tidy-mask { opacity: 1; pointer-events: auto; }

.tidy-pop {
  position: fixed; z-index: 980;
  left: var(--sidebar-w); right: 0; bottom: 0;
  max-height: 76vh; display: flex; flex-direction: column;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -14px 44px rgba(26,23,18,.2);
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(.4,0,.2,1);
}
body.tidy-open .tidy-pop { transform: translateY(0); }
body:has(.sidebar.collapsed) .tidy-pop { left: 64px; }
@media (max-width: 768px) { .tidy-pop { left: 0; } }

.tidy-grab { width: 38px; height: 4px; border-radius: 99px; background: rgba(26,23,18,.16); margin: 10px auto 4px; }
.tidy-head {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 22px 12px;
}
.tidy-head b { font-size: 13.5px; font-weight: 600; }
.tidy-count { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.tidy-close {
  margin-left: auto; border: 0; background: transparent; cursor: pointer;
  font-size: 13px; padding: 5px 8px; border-radius: 7px; color: var(--ink-faint);
}
.tidy-close:hover { background: var(--accent-glow); color: var(--ink); }

.tidy-body { overflow-y: auto; padding: 0 22px; flex: 1; min-height: 0; }
.tidy-loading { padding: 26px 0 30px; font-size: 13px; color: var(--ink-muted); line-height: 1.9; }
.tidy-loading span { font-size: 11.5px; color: var(--ink-faint); }
.tidy-loading.err { color: #A32D2D; }
.tidy-note { padding: 0 0 20px; font-size: 12px; color: var(--ink-faint); line-height: 1.85; }

.tidy-row {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.tidy-row:last-child { border-bottom: 0; }
.tidy-kind {
  flex-shrink: 0; font-size: 10.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 99px;
  background: var(--accent-glow); color: #8d5a22;
}
.tidy-kind.reading { background: rgba(74,124,89,.13); color: var(--green); }
.tidy-kind.habit { background: rgba(26,23,18,.07); color: var(--ink-muted); }
.tidy-txt { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; }
.tidy-why { display: block; margin-top: 3px; font-size: 11px; color: var(--ink-faint); }
.tidy-btns { display: flex; gap: 6px; flex-shrink: 0; }

.tidy-foot {
  display: flex; gap: 9px; align-items: center;
  padding: 14px 22px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: rgba(184,115,45,.05);
}
.tidy-foot .btn { flex: 1; }
.tidy-foot .btn-secondary { flex: 0 0 auto; }

/* ═══════════════════════════════════════════════════════════
   新首页（只展示，不输入）
   ═══════════════════════════════════════════════════════════ */
/* 问候和寄语之间原来只有 5px，看起来像贴住了 */
.hello-row { display: flex; align-items: baseline; gap: 11px; margin-bottom: 10px; }
.hello-who { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.hello-when { font-family: var(--mono); font-size: 12.5px; color: var(--ink-faint); }
.hello-quote {
  font-family: var(--serif); font-size: 13.5px; color: var(--ink-muted);
  margin: 0 0 18px; line-height: 1.75;
}
.hello-quote b { color: var(--ink); font-weight: 500; }

.miss-line {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint);
  /* 原来是 -9px 负边距，寄语一长就会往上啃到问候语 —— 去掉 */
  margin: 0 0 18px;
}
.miss-line::before {
  content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: rgba(184,115,45,.5); margin-right: 7px; vertical-align: 1px;
}

.dash-remind {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  border: 1px solid rgba(184,115,45,.28); background: var(--accent-glow);
  border-radius: var(--radius-md); padding: 9px 14px;
  font-size: 12.8px; color: #8d5a22; cursor: pointer;
}
.dash-remind .go { margin-left: auto; font-weight: 600; color: var(--accent); }

.dash-empty { padding: 16px; font-size: 12.5px; color: var(--ink-faint); }
.dash-todo-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12.5px;
}
.dash-todo-foot .quiet { color: var(--ink-faint); font-size: 11.5px; cursor: pointer; }
.dash-todo-foot .go { margin-left: auto; color: var(--accent); font-weight: 600; cursor: pointer; }
.arch-line { font-size: 11.5px; color: var(--ink-faint); margin: 8px 0 28px; padding-left: 3px; }

.card.clickable { cursor: pointer; }
.card.clickable:hover { box-shadow: var(--shadow-card-hover); }

.dash-cal-head { display: flex; align-items: baseline; gap: 9px; font-size: 12.5px; margin-bottom: 11px; }
.dash-cal-head b { font-family: var(--serif); font-size: 15px; font-weight: 600; }
.dash-cal-go { margin-left: auto; color: var(--accent); font-size: 11.5px; font-weight: 600; }
.dash-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dash-cal em {
  font-style: normal; font-size: 10.5px; color: var(--ink-faint);
  text-align: center; padding-bottom: 4px;
}
.dash-cal span {
  height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; border-radius: 8px; color: var(--ink-muted);
}
.dash-cal span.has { background: rgba(184,115,45,.15); color: #8d5a22; font-weight: 600; }
.dash-cal span.miss { color: var(--ink-faint); opacity: .42; }
.dash-cal span.td { background: var(--accent); color: #fff; font-weight: 700; }
.dash-cal span.fu { color: var(--ink-faint); opacity: .24; }
.dash-cal-foot {
  margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--ink-muted);
}
.dash-cal-foot b { font-family: var(--serif); font-size: 15px; color: var(--accent); margin-right: 2px; }
.dash-cal-foot span { color: var(--ink-faint); font-size: 11px; }

@media (max-width: 560px) {
  .hello-who { font-size: 19px; }
  .dash-cal span { height: 32px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   周复盘 · 「这一周完成了什么」（归档就落在这一页）
   ═══════════════════════════════════════════════════════════ */
.dg-head {
  display: flex; align-items: baseline; gap: 8px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600;
}
.dg-head b {
  font-family: var(--serif); font-size: 15px; color: var(--accent);
  text-transform: none; letter-spacing: 0;
}
.dg-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.2px;
}
.dg-row:last-of-type { border-bottom: 0; }
.dg-ck { color: var(--green); flex-shrink: 0; font-size: 12px; }
.dg-tx { flex: 1; min-width: 0; }
.dg-dt { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); flex-shrink: 0; }
.dg-none { font-size: 12.5px; color: var(--ink-faint); padding: 3px 0 5px; }
.wk-facts {
  margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-muted);
}
.wk-ai { margin-top: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

@media (max-width: 768px) {
  input[type="text"].jd-add-input { font-size: 16px; }
}

/* 阅读页：微信读书同步入口 —— 小字，不抢「记下今天」的注意力 */
.rd-wr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
}

/* 年度盘点：自动汇总的六格数字 + 12 个月迷你柱 */
.yr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.yr-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 8px 11px;
  text-align: center;
}
.yr-cell b {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}
.yr-cell span {
  display: block;
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 5px;
  white-space: nowrap;
}
.yr-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 62px;
}
.yr-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  border-radius: 3px;
  /* 给每个月份一条浅色轨道：全是 0 的月份也能看出「这里有 12 格」 */
  background-image: linear-gradient(to top, var(--border), var(--border));
  background-size: 100% 46px;
  background-position: bottom 16px left 0;
  background-repeat: no-repeat;
}
.yr-bar-col i {
  display: block;
  width: 100%;
  max-width: 22px;
  background: var(--accent);
  opacity: 0.55;
  border-radius: 3px;
}
.yr-bar-col em {
  font-size: 9.5px;
  font-style: normal;
  color: var(--ink-faint);
}
.yr-note {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 10px;
  line-height: 1.7;
}

/* 首页「本周一件事」：一行，右侧挂倒计时。
   原来这里还有一行年度主题，一年不变、天天看到，反而成了背景噪音，已撤。 */
.week-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 14px 0 2px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  cursor: pointer;
  min-width: 0;
}
.week-line:hover .wl-v { color: var(--ink); }
.wl-k {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.wl-v {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--transition);
}
.wl-d {
  flex-shrink: 0;
  margin-left: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}

/* 历史上的今天 */
.hist { cursor: pointer; }
.hist .hist-meta {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.hist .hist-text {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-muted);
}

/* 日记页：自由书写下面的一行小操作（存为选题） */
.jt-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
}
/* 默认的 ai-mini 是浅灰，放在输入框下面几乎看不见，这里给个强调色 */
.jt-sub .ai-mini {
  color: var(--accent);
  opacity: 0.9;
}
.jt-sub .ai-mini:hover { opacity: 1; }

/* 设置页：登录态没恢复时的提示条 */
.cloud-note {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-muted);
  background: var(--bg-warm, rgba(184,115,45,0.06));
  border-left: 2px solid var(--accent);
  padding: 10px 12px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 14px;
}

/* 任务截止提醒：逾期红、今天到期橙、明天到期淡橙 */
.task-due { white-space: nowrap; }
.task-due.overdue { color: #A32D2D; font-weight: 600; }
.task-due.today { color: var(--accent); font-weight: 600; }
.task-due.soon { color: var(--accent); opacity: 0.8; }
.task-item.overdue .task-text { color: #A32D2D; }
.task-item.overdue { border-left: 2px solid #A32D2D; }

/* AI 代填标记：标签 + 输入框淡底，一眼分清哪几栏不是自己写的 */
.ai-tag {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  vertical-align: middle;
  opacity: 0.92;
}
input.ai-filled,
textarea.ai-filled {
  background: rgba(184, 115, 45, 0.06);
  border-color: rgba(184, 115, 45, 0.38);
}

/* .hidden 在文件前面，.ai-tag 的 inline-block 会把它盖掉，这里必须显式压回去 */
.ai-tag.hidden { display: none; }

/* 周复盘：AI 区块与反思表单绑在一起（按钮在上，结果紧贴其下） */
.weekly-ai-card { margin-bottom: 12px; }
.wk-ai-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wk-ai-status {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.6;
}
.weekly-ai-card .ai-out { margin-top: 12px; }
.weekly-ai-card .ai-out + .ai-out { margin-top: 8px; }
.wk-ai-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* AI 输出的小标题：总结 / 教练视角，两个结果并排时不会混 */
.ai-cap {
  font-size: 11px;
  letter-spacing: 0.4px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

/* AI 卡片里说明「哪个按钮会改表单」 */
.wk-ai-desc {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-faint);
  margin: 10px 0 0;
}

/* ── 首页：今天的状态行 ── */
/* 昨天刚补完：状态行用完成色，不让人以为还欠着 */
.miss-line.ok { color: var(--ink-muted); }
.miss-line.ok::before { background: var(--accent); }

.quote-shuffle:active { opacity: 1; }

/* ── 首页：更多（那天 / 轮盘）折叠 ── */
.dash-more {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}
.dash-more > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  padding: 13px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-more .dm-title { color: var(--ink-muted); letter-spacing: .3px; }
.dash-more .dm-hint {
  color: var(--ink-faint);
  opacity: .85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-more > summary::-webkit-details-marker { display: none; }
.dash-more > summary::after {
  content: '›';
  font-size: 14px;
  margin-left: auto;
  flex-shrink: 0;
  transition: transform .18s ease;
  transform: rotate(90deg);
}
.dash-more[open] > summary::after { transform: rotate(-90deg); }
.dash-more .section-label:first-of-type { margin-top: 10px; }

/* 首页待办：「还有 N 件」一行，把长尾收起来 */
.dash-more-tasks {
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-faint);
  cursor: pointer;
}
.dash-more-tasks:active { background: var(--accent-glow); }

/* ═══════════ 任务清单 ═══════════
   从「按项目拆成一堆卡片」改成「一张卡按截止分堆」：
   项目是次要信息（降为行内标签），时间才是这一页要回答的问题。 */

.tk-sum {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  margin: -6px 0 18px;
}
.tk-sum b { color: #A32D2D; font-weight: 600; }

/* 手动添加：平时只是清单结尾的一行小字，点了才展开 */
.tk-add-mini { margin: 12px 0 2px; }
.tk-add-trigger {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  opacity: .85;
  cursor: pointer;
  padding: 7px 2px;
}
.tk-add-trigger:active { opacity: 1; color: var(--accent); }
.tk-add-form { display: flex; align-items: center; gap: 8px; }
.tk-add-form input { flex: 1; min-width: 0; }
.tk-add-form .tk-add-proj { flex: 0 0 82px; }

/* 一张卡装所有未完成，堆与堆之间一条细线 */
.tk-card { padding: 0; overflow: hidden; }
.tk-group { padding: 3px 0 5px; }
.tk-group-sep { border-top: 1px solid var(--border); }
.tk-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: .9;
}
.tk-group-head b { font-weight: 600; opacity: .85; }

.tk-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 16px;
}
.tk-row.overdue { box-shadow: inset 2px 0 0 #A32D2D; }
.tk-row.overdue .tk-name { color: #A32D2D; }

.tk-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong, rgba(0,0,0,.18));
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  touch-action: manipulation;
}
.tk-check[onclick]::before {
  content: "";
  position: absolute;
  inset: -9px -7px -9px -9px;
}
.tk-check.done {
  background: var(--accent);
  border-color: var(--accent);
}
.tk-check.done::after {
  content: '✓';
  color: #fff;
  font-size: 11px;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tk-body { flex: 1; min-width: 0; }
.tk-name { font-size: 13.5px; line-height: 1.55; }
.tk-name.done { color: var(--ink-faint); text-decoration: line-through; }
.tk-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}
.tk-meta i { font-style: normal; opacity: .4; }
.tk-due.overdue { color: #A32D2D; font-weight: 600; }
.tk-due.today { color: var(--accent); font-weight: 600; }
.tk-due.soon { color: var(--accent); opacity: .8; }

/* 删除：默认极淡，避免误触；未完成任务也能直接删了（原来只有已完成能删） */
.tk-del {
  color: var(--ink-faint);
  opacity: .22;
  font-size: 12px;
  padding: 1px 4px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1.4;
}
.tk-del:active, .tk-del:hover { opacity: .95; color: #A32D2D; }
.tk-restore {
  font-size: 11.5px;
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  padding: 2px 4px;
  opacity: .85;
}

/* 已完成默认折叠 */
.tk-fold { margin-top: 24px; }
.tk-fold > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  padding: 8px 2px;
}
.tk-fold > summary::-webkit-details-marker { display: none; }
.tk-fold > summary::before {
  content: '›';
  display: inline-block;
  margin-right: 7px;
  transition: transform .16s ease;
  transform: rotate(90deg);
}
.tk-fold[open] > summary::before { transform: rotate(-90deg); }
.tk-fold-foot { margin-top: 10px; }
.tk-card-done .tk-row { padding-top: 7px; padding-bottom: 7px; }

/* ── 归档区：重复清理 ── */
.arch-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  margin-bottom: 14px;
}
.arch-head .section-label { margin: 0; }
/* 只在真有重复时出现，所以可以稍微亮一点，不担心常驻吵人 */
.arch-dedup {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  line-height: 1.2;
  transition: background var(--transition), border-color var(--transition);
}
.arch-dedup:hover { background: rgba(184,115,45,0.2); border-color: var(--accent); }

.dedup-mask {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(26,24,20,0.34);
  -webkit-backdrop-filter: blur(2.5px);
  backdrop-filter: blur(2.5px);
}
body.dark .dedup-mask { background: rgba(0,0,0,0.55); }
.dedup-box {
  width: min(440px, 100%);
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 18px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px -18px rgba(26,24,20,0.45), 0 0 0 1px var(--border);
  animation: pageIn 0.2s ease;
}
.dedup-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.dedup-sub {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-muted);
  margin: 7px 0 14px;
}
.dedup-sub b { color: var(--ink); font-weight: 600; }
.dedup-list {
  overflow-y: auto;
  border-top: 1px solid var(--border);
  margin-bottom: 16px;
}
.dedup-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.dedup-txt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.dedup-n {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: 4px;
  padding: 1px 6px;
}
.dedup-keep {
  flex-shrink: 0;
  font-family: var(--font);      /* 「留」是中文，别用等宽字体（会掉字） */
  font-size: 10.5px;
  color: var(--ink-faint);
}
.dedup-foot { display: flex; justify-content: flex-end; gap: 8px; }

/* 归档里的圆圈只是"已完成"的记号，不响应点击 —— 别让它看起来能点 */
.tk-check:not([onclick]) { cursor: default; opacity: .5; }

/* 任务清单在宽屏上别铺满 1100px —— 一行拉太宽，眼睛要横着扫 */
#tasks-page { max-width: 780px; }

/* 只有圆圈能勾：任务名点了只是跳到清单页，别再让文字当开关 */
#page-content .task-text { cursor: pointer; }
#page-content .task-text.done { cursor: default; }

/* 任务行右侧：改名 / 删除，都做得很淡，别抢内容 */
.tk-edit {
  color: var(--ink-faint);
  opacity: .22;
  font-size: 12px;
  padding: 1px 4px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1.4;
}
.tk-edit:active, .tk-edit:hover { opacity: .9; color: var(--accent); }

/* ── 习惯页：周切换 + 三个统计 ── */
.habit-weeknav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hwn-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-muted);
}
.habit-sum {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.hs-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 6px 9px;
  text-align: center;
}
.hs-cell b {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}
.hs-cell span {
  display: block;
  font-size: 10.5px;
  color: var(--ink-faint);
  margin-top: 4px;
  white-space: nowrap;
}

/* 首页习惯卡底部：上周 / 本周对比 */
.hsum {
  grid-column: 1 / -1;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.hsum b { color: var(--ink-muted); font-weight: 600; }

/* 习惯页周视图：还没到的日子用虚线空心，别和"没打卡"混成一样 */
.habit-cell.fu {
  background: transparent;
  border-style: dashed;
  border-color: var(--border);
  opacity: .5;
  cursor: default;
}
.habit-cell.fu:hover { border-color: var(--border); }
/* 今天那一格描个边，一眼能找到自己站在哪 */
.habit-cell.today { border-color: var(--accent); }
.habit-cell.today:not(.on) { background: var(--accent-glow); }

/* 习惯页表头：星期在上、日期在下，窄屏也放得下 */
.habit-day em {
  display: block;
  font-style: normal;
  font-size: 8.5px;
  line-height: 1.1;
  opacity: .65;
  font-family: var(--mono);
}

/* ── 季度 Retreat ── */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.qr-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 4px 10px;
  text-align: center;
}
.qr-cell b {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}
.qr-cell span {
  display: block;
  font-size: 10px;
  color: var(--ink-faint);
  margin-top: 4px;
  white-space: nowrap;
  transform: scale(.95);
}
.qr-wheel-note {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  margin: 0 0 18px;
}
.qr-wheel-note b { color: var(--ink-muted); }

.qr-ai { margin-bottom: 24px; }
.qr-notes {
  margin: 14px 0 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-muted);
}
.qr-notes li { margin-bottom: 6px; }

/* 目标候选 */
.qr-goals { margin-top: 14px; }
.qr-goal {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 9px;
  background: var(--bg-card);
}
.qr-goal-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}
.qr-goal-why {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin: 5px 0 9px;
  line-height: 1.6;
}

/* ═══ 财务（fin-*）：只放财务特有的东西，其余全部复用上面的通用组件 ═══ */
.quiet { color: var(--ink-faint); font-size: 12px; }
.fin-tabs { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 20px; padding-bottom: 2px; scrollbar-width: none; }
.fin-tabs::-webkit-scrollbar { display: none; }
.fin-tabs .pill { flex: none; white-space: nowrap; min-height: 36px; }

.fin-hero { padding: 22px 22px 20px; }
.fin-hero-k { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: .06em; }
.fin-hero-v { font-family: var(--serif); font-weight: 700; font-size: 56px; line-height: 1.1; letter-spacing: -1.5px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.fin-hero-v i { font-style: normal; font-size: 26px; font-weight: 500; color: var(--ink-muted); margin-right: 3px; letter-spacing: 0; }
.fin-hero-s { font-size: 13px; color: var(--ink-muted); margin-top: 4px; }
.fin-hero-s b { color: var(--ink); font-weight: 600; }

/* 月度水位带：已花多少 vs 今天走到哪（那根竖线） */
.fin-pace { position: relative; height: 10px; border-radius: 5px; background: var(--bg-warm); margin-top: 24px; }
.fin-pace > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--accent); opacity: .85; }
.fin-pace > em { position: absolute; top: -5px; width: 2px; height: 20px; background: var(--ink); border-radius: 1px; }
.fin-pace > em span { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; font-style: normal; color: var(--ink-muted); white-space: nowrap; }
.fin-pace-l { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--ink-muted); margin-top: 9px; }
.fin-pace-sm { height: 6px; margin-top: 14px; }
.fin-pace-sm > em { top: -3px; height: 12px; }

.fin-hero + .dash-remind { margin-top: 12px; }

/* 罐子：水位 = 还剩多少。颜色只有三档，警告色只给「快见底」 */
.fin-jars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .fin-jars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fin-jar { position: relative; overflow: hidden; min-height: 108px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; }
.fin-jar.mid  { --lq: rgba(184,115,45,.20); }
.fin-jar.rich { --lq: rgba(47,125,81,.20); }
.fin-jar.low  { --lq: rgba(179,64,47,.18); }
body.dark .fin-jar.mid  { --lq: rgba(217,154,85,.22); }
body.dark .fin-jar.rich { --lq: rgba(76,175,125,.22); }
body.dark .fin-jar.low  { --lq: rgba(217,100,78,.24); }
.fin-jar .lq { position: absolute; left: 0; right: 0; bottom: 0; background: var(--lq); border-radius: 50% 50% 0 0 / 7px 7px 0 0; transition: height .3s; }
.fin-jar > *:not(.lq) { position: relative; }
.fin-jar-top, .fin-goal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fin-jar-n { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; }
.fin-jar-n .ic { color: var(--ink-muted); }
.fin-jar-flag { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--red); letter-spacing: .04em; }
.fin-jar-v b { font-family: var(--serif); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fin-jar-v span { font-size: 12px; color: var(--ink-muted); }
.fin-goal .fin-jar-v { margin: 10px 0 12px; }
.fin-goal-m { font-family: var(--mono); font-size: 11.5px; color: var(--ink-muted); }

/* 首页卡 */
.fin-home-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fin-home-v { font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1.15; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.fin-home-v i { font-style: normal; font-size: 18px; font-weight: 500; color: var(--ink-muted); margin-right: 2px; letter-spacing: 0; }
.fin-home-k { font-size: 12.5px; color: var(--ink-muted); }
.fin-home-row { display: flex; gap: 22px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.fin-home-row span { display: flex; flex-direction: column; gap: 1px; }
.fin-home-row b { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.fin-home-row em { font-style: normal; font-family: var(--font); font-size: 11.5px; }
.fin-home-row b small { font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--ink-muted); margin-left: 3px; }

/* 导入页 */
.fin-import-head { display: flex; align-items: center; gap: 12px; }
.fin-badge { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-light); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fin-import-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.fin-sum { font-size: 14px; line-height: 1.7; margin-bottom: 12px; }
.fin-sum b { font-family: var(--serif); font-size: 17px; }
.fin-sum .quiet { display: block; }
.fin-ask { padding: 16px 18px; }
.fin-ask + .fin-ask { border-top: 1px solid var(--border); }
.fin-ask-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fin-ask-n { font-size: 15px; font-weight: 600; }
.fin-ask-a { font-family: var(--serif); font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; margin-left: auto; }
.fin-ask-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fin-ask-pills .pill { min-height: 36px; display: inline-flex; align-items: center; }
.fin-ask-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.fin-ask-fold { display: flex; align-items: center; gap: 12px; padding: 12px 18px; min-height: 60px; }
.fin-ask-fold .ic { color: var(--ink-faint); }
.fin-sure { display: flex; justify-content: space-between; align-items: center; padding: 11px 18px; min-height: 46px; font-size: 14px; }
.fin-sure + .fin-sure { border-top: 1px solid var(--border); }
.fin-sure em { font-style: normal; font-size: 12px; color: var(--ink-faint); margin-left: 8px; }
.fin-sure b { font-family: var(--serif); font-weight: 600; font-variant-numeric: tabular-nums; }
