/* ===========================================
 * 帅超助手 · 设计系统 v4
 * 风格：深蓝主题 · 创作者工作台
 * 原则：克制 · 安静 · 工具感 · 留白节奏
 * =========================================== */

/* -------- 1. 设计 token -------- */
:root {
  /* 颜色：深蓝中性色系 */
  --ink-900: #0E1E3A;          /* 主标题/数字，深海军 */
  --ink-700: #1F2D4F;          /* 强文字 */
  --ink-500: #4B5566;          /* 正文 */
  --ink-300: #8A93A4;          /* 弱文字 */
  --ink-200: #B5BBC9;          /* 极弱文字 */
  --line:    #E5E7EB;          /* 默认边圈 */
  --line-soft: #EFF0F2;        /* 极浅分割 */
  --bg:      #F2F3F5;          /* 页面底（暖灰蓝） */
  --surface: #FFFFFF;          /* 卡片 */
  --surface-alt: #F8F9FB;      /* 次级面 */

  /* 强调色 */
  --accent:        #0E1E3A;    /* 主操作底色（深海军） */
  --accent-soft:   #F2F3F5;    /* 主操作 ghost 底 */
  --accent-line:   #0E1E3A;    /* 主操作边框 */
  --focus:         #4A6CF7;    /* 焦点环蓝 */

  /* 心情色（保留功能色，柔化） */
  --mood-joyful:  #F4A261;
  --mood-positive:#E9C46A;
  --mood-calm:    #8AB4F8;
  --mood-neutral: #C7CDD6;
  --mood-down:    #9CA3B5;
  --mood-sad:     #6B7287;

  /* 危险 */
  --danger:       #C8553D;
  --danger-soft:  #FAECEA;

  /* 留白刻度（8 倍数） */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  /* 阴影：极轻 */
  --sh-1: 0 1px 2px rgba(14, 30, 58, 0.04);
  --sh-2: 0 4px 12px rgba(14, 30, 58, 0.06);

  /* 字号 */
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-md:   17px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  30px;
  --text-3xl:  38px;

  /* 行高 */
  --lh-tight: 1.2;
  --lh-snug:  1.4;
  --lh-base:  1.55;
  --lh-loose: 1.7;

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Source Han Sans CN", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Han Serif CN", "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Times New Roman", serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

/* -------- 2. 全局重置 -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 1, "ss01" 1;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--focus); text-decoration: none; }
a:hover { text-decoration: underline; }

/* -------- 3. App 外壳 -------- */
.app-shell {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

/* -------- 4. 顶部 header（深蓝块标题区） -------- */
.topbar {
  background: var(--surface);
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
  border-bottom: 1px solid var(--line-soft);
}
.topbar__brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}
.topbar__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  line-height: var(--lh-tight);
}
.topbar__sub {
  font-size: var(--text-xs);
  color: var(--ink-300);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.topbar__back {
  background: none;
  border: none;
  color: var(--ink-500);
  font-size: var(--text-sm);
  padding: var(--sp-1) 0;
  margin-top: var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.topbar__back:hover { color: var(--ink-900); }

/* -------- 5. 区域标题（参考图风格） -------- */
.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin: var(--sp-4) var(--sp-4) 0;
  overflow: hidden;
  box-shadow: var(--sh-1);
}
.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line-soft);
}
.section__title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.section__action {
  font-size: var(--text-sm);
  color: var(--ink-500);
  background: none;
  border: none;
  padding: 0;
}
.section__action:hover { color: var(--ink-900); }
.section__body { padding: var(--sp-5); }
.section__body--tight { padding: var(--sp-2) 0; }

.section-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  margin: var(--sp-6) var(--sp-4) var(--sp-3);
}

/* -------- 5.5 灵感捕捉入口大卡（首页主行动） -------- */
.capture-card {
  display: block;
  width: auto;
  margin: var(--sp-4) var(--sp-4) 0;
  background: var(--ink-900);
  color: #fff;
  border: none;
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-2);
}
.capture-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 70%);
}
.capture-card__body { position: relative; z-index: 1; }
.capture-card__label {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--sp-3);
}
.capture-card__title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.capture-card__desc {
  margin-top: var(--sp-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  line-height: var(--lh-snug);
}
.capture-card__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-900);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
}
.capture-card__go span { font-size: var(--text-base); line-height: 1; }

/* -------- 6. Hero 区（首页大标题） -------- */
.hero {
  background: var(--surface);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  border-bottom: 1px solid var(--line-soft);
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--ink-300);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.hero__eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-900);
  display: inline-block;
}
.hero__title {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
.hero__title em {
  font-style: normal;
  border-bottom: 2px solid var(--ink-900);
  padding-bottom: 1px;
}
.hero__sub {
  margin-top: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--ink-300);
}

/* -------- 7. Metric 数字卡（2x2 网格） -------- */
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}
.metric {
  padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-5);
  position: relative;
}
.metric:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.metric:nth-child(1), .metric:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
.metric__label {
  font-size: var(--text-xs);
  color: var(--ink-300);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-2);
}
.metric__value {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.metric__delta {
  margin-top: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--ink-300);
  font-variant-numeric: tabular-nums;
}
.metric__delta--up { color: var(--focus); }

/* -------- 8. 任务清单（参考图 todo 风格） -------- */
.tasks { padding: var(--sp-2) var(--sp-5); }
.task {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line-soft);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: var(--ink-700);
}
.task:last-child { border-bottom: none; }
.task__check {
  width: 16px; height: 16px;
  border: 1.5px solid var(--ink-200);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
}
.task__check--on {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--surface);
  font-size: 10px;
  line-height: 1;
}
.task__title {
  flex: 1;
  font-size: var(--text-base);
  color: var(--ink-700);
}
.task--done .task__title {
  text-decoration: line-through;
  color: var(--ink-300);
}
.task__time {
  font-size: var(--text-xs);
  color: var(--ink-300);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.task__action {
  font-size: var(--text-xs);
  color: var(--ink-500);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 3px 8px;
  background: var(--surface);
}
.task__action:hover { border-color: var(--ink-900); color: var(--ink-900); }

/* -------- 9. 列表项（灵感库 / 关联灵感） -------- */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--line-soft);
  background: none;
  border-top: none;
  border-right: none;
  border-left: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  position: relative;
}
.list-item:last-child { border-bottom: none; }
.list-item__bar {
  position: absolute;
  left: 0; top: var(--sp-3); bottom: var(--sp-3);
  width: 3px;
  background: var(--ink-900);
  border-radius: 0 2px 2px 0;
}
.list-item__body { flex: 1; min-width: 0; }
.list-item__title {
  font-size: var(--text-base);
  color: var(--ink-900);
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.list-item__meta {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--ink-300);
  align-items: center;
  flex-wrap: wrap;
}
.list-item__meta b {
  color: var(--ink-500);
  font-weight: 500;
}
.list-item__insight {
  font-size: var(--text-sm);
  color: var(--ink-500);
  line-height: var(--lh-snug);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 灵感库条目（手动添加后引入，含可选照片缩略图） */
.lib-item {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--line-soft);
  background: none;
  border-top: none;
  border-right: none;
  border-left: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.lib-item:last-child { border-bottom: none; }
.lib-item__main { flex: 1; min-width: 0; }
.lib-item__title {
  font-size: var(--text-base);
  color: var(--ink-900);
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.lib-item__meta {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--ink-300);
  align-items: center;
  flex-wrap: wrap;
}
.lib-item__insight {
  font-size: var(--text-sm);
  color: var(--ink-500);
  line-height: var(--lh-snug);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.lib-item__thumb {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  object-fit: cover;
  border: 1px solid var(--line-soft);
  background: var(--surface-alt);
}

/* 搜索行（灵感库） */
.search-row {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  padding: var(--sp-4) var(--sp-5);
}
.search-row .input { flex: 1; min-width: 0; }

/* -------- 10. 按钮 -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px var(--sp-5);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--ink-700);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  letter-spacing: 0;
}
.btn:active { transform: scale(0.98); }
.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover { background: #1A2A4A; border-color: #1A2A4A; }
.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-700);
}
.btn--ghost:hover { border-color: var(--ink-900); color: var(--ink-900); }
.btn--block { width: 100%; }
.btn--sm { padding: 6px 10px; font-size: var(--text-xs); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.row {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.row--between { justify-content: space-between; align-items: center; }

/* -------- 11. 输入控件 -------- */
.field { margin-top: var(--sp-4); }
.label {
  display: block;
  font-size: var(--text-xs);
  color: var(--ink-300);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}
.input, .textarea {
  width: 100%;
  padding: 10px var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-900);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  transition: border-color 0.15s;
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink-900);
}
.textarea { resize: vertical; min-height: 100px; }
.textarea--lg { min-height: 180px; }

/* -------- 12. 标签 (tag) -------- */
.tag {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--ink-500);
  background: var(--surface-alt);
  border: 1px solid var(--line-soft);
  padding: 2px 8px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.tag--accent {
  color: var(--ink-900);
  border-color: var(--ink-900);
  background: var(--surface);
}

/* -------- 13. 标签页 (tabs) -------- */
.tabs {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  margin: 0;
}
.tab {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: none;
  border: none;
  font-size: var(--text-sm);
  color: var(--ink-300);
  border-bottom: 2px solid transparent;
  font-weight: 500;
  margin-bottom: -1px;
}
.tab--active {
  color: var(--ink-900);
  border-bottom-color: var(--ink-900);
}

/* -------- 14. 提示（notice） -------- */
.notice {
  margin: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  color: var(--ink-500);
  line-height: var(--lh-base);
}
.notice a { color: var(--focus); }
.notice--danger {
  background: var(--danger-soft);
  border-color: rgba(200, 85, 61, 0.2);
  color: var(--danger);
}

/* -------- 15. 进度 -------- */
.progress {
  margin-top: var(--sp-4);
  padding: 0 var(--sp-1);
}
.progress__track {
  height: 2px;
  background: var(--line-soft);
  border-radius: 1px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  background: var(--ink-900);
  transition: width 0.3s ease;
}
.progress__msg {
  font-size: var(--text-xs);
  color: var(--ink-300);
  margin-top: var(--sp-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* -------- 16. 启示/详情区（任务面板式） -------- */
.insight {
  background: var(--surface);
  padding: var(--sp-5);
}
.insight__eyebrow {
  font-size: var(--text-xs);
  color: var(--ink-300);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.insight__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: var(--sp-3);
}
.insight__body {
  font-size: var(--text-base);
  color: var(--ink-500);
  line-height: var(--lh-loose);
  white-space: pre-wrap;
}
.rawtext {
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-alt);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  color: var(--ink-500);
  line-height: var(--lh-base);
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
}

/* -------- 17. 日历 -------- */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}
.cal-head__title {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.cal-nav {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-sm);
  color: var(--ink-500);
  font-size: var(--text-md);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.cal-nav:hover { border-color: var(--ink-900); color: var(--ink-900); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: var(--sp-4);
  background: var(--surface);
}
.cal-dow {
  font-size: var(--text-xs);
  color: var(--ink-300);
  text-align: center;
  padding: var(--sp-1) 0;
  letter-spacing: 0.04em;
}
.cal-day {
  aspect-ratio: 1;
  border: 1px solid var(--line-soft);
  background: var(--surface-alt);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  color: var(--ink-500);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  position: relative;
}
.cal-day--empty { background: transparent; border: none; }
.cal-day--has {
  background: var(--ink-900);
  color: #fff;
  border-color: var(--ink-900);
  font-weight: 500;
}
.cal-day--today {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}
.cal-day--selected {
  box-shadow: 0 0 0 2px var(--ink-900) inset;
}
.cal-day--joyful   { background: var(--mood-joyful); border-color: var(--mood-joyful); color: #fff; }
.cal-day--positive { background: var(--mood-positive); border-color: var(--mood-positive); color: var(--ink-900); }
.cal-day--calm     { background: var(--mood-calm); border-color: var(--mood-calm); color: #fff; }
.cal-day--neutral  { background: var(--mood-neutral); border-color: var(--mood-neutral); color: var(--ink-700); }
.cal-day--down     { background: var(--mood-down); border-color: var(--mood-down); color: #fff; }
.cal-day--sad      { background: var(--mood-sad); border-color: var(--mood-sad); color: #fff; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
  font-size: var(--text-xs);
  color: var(--ink-500);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i {
  width: 10px; height: 10px;
  border-radius: 3px;
  display: inline-block;
}

/* -------- 17.5 捕捉任务浮层（全局进度，AI 思考式） -------- */
.taskcard {
  pointer-events: auto;
  background: rgba(14, 30, 58, 0.96);
  color: #fff;
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: 0 8px 32px rgba(14, 30, 58, 0.35);
  backdrop-filter: blur(8px);
}
.taskcard__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}
.taskcard__title {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.taskcard__pct {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.85);
  font-variant-numeric: tabular-nums;
}
.taskcard__track {
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-top: var(--sp-3);
}
.taskcard__bar {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  transition: width 0.35s ease;
}
.taskcard__msg {
  margin-top: var(--sp-2);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.65);
}
.tasksteps {
  margin-top: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.taskstep {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  transition: color 0.25s ease;
}
.taskstep__mark {
  width: 14px;
  font-size: 10px;
  text-align: center;
  flex: none;
}
.taskstep--done { color: rgba(255,255,255,0.65); }
.taskstep--active { color: #fff; font-weight: 600; }
.taskstep--active .taskstep__mark { animation: taskpulse 1s ease-in-out infinite; }
@keyframes taskpulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.taskcard__hint {
  margin-top: var(--sp-3);
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-2);
}
.taskcard__error {
  margin-top: var(--sp-3);
  font-size: var(--text-sm);
  color: #F5B8AD;
  line-height: 1.6;
  word-break: break-all;
}
.taskcard__close {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  font-size: var(--text-sm);
}

/* -------- 18. 底部 tab 导航 -------- */
.bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
  display: flex;
  padding: var(--sp-2) 0 calc(var(--sp-2) + env(safe-area-inset-bottom));
  z-index: 50;
}
.bottomnav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  font-size: var(--text-xs);
  color: var(--ink-300);
  padding: var(--sp-2) 0;
  font-weight: 500;
}
.bottomnav__icon { font-size: 18px; line-height: 1; }
.bottomnav__item--active { color: var(--ink-900); }

/* -------- 18.5 「我的」页：用量行 + 开关 -------- */
.usage-row {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line-soft);
}
.usage-row:last-of-type { border-bottom: none; }
.usage-row__name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink-900);
}
.usage-row__meta {
  font-size: var(--text-xs);
  color: var(--ink-300);
  margin-top: 2px;
}
.usage-row__nums {
  display: flex;
  gap: var(--sp-4);
  font-size: var(--text-sm);
  color: var(--ink-500);
  margin-top: var(--sp-2);
  font-variant-numeric: tabular-nums;
}
.usage-row__cost { color: var(--ink-700); font-weight: 600; }
.usage-sum {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-4) 0 var(--sp-2);
  font-size: var(--text-sm);
  color: var(--ink-700);
}
.usage-sum b { color: var(--ink-900); font-size: var(--text-md); }
.switch-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-base);
  color: var(--ink-700);
  cursor: pointer;
  user-select: none;
}
.switch-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--ink-900);
}

/* -------- 19. 工具类 -------- */
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.muted { color: var(--ink-300); font-size: var(--text-sm); }
.faint { color: var(--ink-200); font-size: var(--text-xs); }
.serif { font-family: var(--font-serif); }
.hidden { display: none !important; }

.empty {
  text-align: center;
  padding: var(--sp-12) var(--sp-4);
  color: var(--ink-300);
}
.empty__glyph {
  font-family: var(--font-serif);
  font-size: 48px;
  color: var(--ink-200);
  margin-bottom: var(--sp-3);
}

/* -------- 20. 旧 class 兼容（capture/diary/library 复用） -------- */
.grid { display: none; }                /* 旧卡片网格（已弃用） */
.card { display: none; }
.bottomnav__item--active { color: var(--ink-900); font-weight: 600; }

/* diary editor 包裹 */
.diary-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.mood-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.linked-inspos {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line-soft);
}
.linked-inspos__title {
  font-size: var(--text-xs);
  color: var(--ink-300);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.linked-inspo {
  font-size: var(--text-sm);
  color: var(--ink-700);
  padding: 6px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.linked-inspo:last-child { border-bottom: none; }
.linked-inspo .faint { margin-left: var(--sp-2); }

/* -------- 21. 响应式微调 -------- */
@media (min-width: 480px) {
  .hero { padding: var(--sp-8) var(--sp-6) var(--sp-6); }
  .hero__title { font-size: var(--text-3xl); }
  .metric__value { font-size: var(--text-3xl); }
  .section { margin: var(--sp-5) var(--sp-5) 0; }
  .section-title { margin: var(--sp-6) var(--sp-5) var(--sp-3); }
}
