:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --text: #1C1C1E;
  --text-2: #8E8E93;
  --text-3: #C7C7CC;
  --sep: #E5E5EA;
  --accent: #007AFF;
  --green: #34C759;
  --orange: #FF9F0A;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
  --radius: 16px;
  --radius-sm: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1C1C1E;
    --text: #F2F2F7;
    --text-2: #8E8E93;
    --text-3: #48484A;
    --sep: #38383A;
    --accent: #0A84FF;
    --green: #30D158;
    --orange: #FF9F0A;
    --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
}

.phone {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

/* 顶部栏（对齐小程序 today .nav：透明、无底色，仅作安全区占位） */
.topbar {
  padding-top: env(safe-area-inset-top);
  background: transparent;
  position: sticky; top: 0; z-index: 10;
}
.topbar.transparent-bar { background: transparent; }
.topbar-inner {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 20px 10px;
}
.topbar h1 { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -0.5px; }
.topbar-badge { font-size: 13px; color: var(--text-2); }

/* 内容区 */
.content { flex: 1; padding: 8px 16px calc(96px + env(safe-area-inset-bottom)); }
.page { display: none; animation: fade .25s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.card-sub { font-size: 13px; color: var(--text-2); margin: 0; }

/* 概览统计 */
.hero { text-align: center; padding: 26px 18px 22px; }
.hero .big { font-size: 52px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.hero .big small { font-size: 18px; font-weight: 600; color: var(--text-2); }
.hero .label { color: var(--text-2); font-size: 14px; margin-top: 6px; }

.stats { display: flex; gap: 10px; }
.stat { flex: 1; text-align: center; padding: 14px 6px; }
.stat .n { font-size: 22px; font-weight: 700; }
.stat .t { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* 进度环 */
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring { width: 72px; height: 72px; flex: none; position: relative; border-radius: 50%; }

/* 列表 */
.list { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sep);
}
.row:last-child { border-bottom: none; }
.row .main { flex: 1; min-width: 0; }
.row .ttl { font-size: 16px; font-weight: 500; }
.row .desc { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 勾选 */
.check {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  border: 2px solid var(--text-3); display: grid; place-items: center;
  transition: all .18s ease; cursor: pointer;
}
.check.on { background: var(--green); border-color: var(--green); }
.check.on::after { content: "✓"; color: #fff; font-size: 14px; font-weight: 700; }
.task.done .ttl { color: var(--text-2); text-decoration: line-through; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm); padding: 12px 16px;
  font-size: 16px; font-weight: 600; font-family: inherit;
  background: var(--accent); color: #fff; cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(0.97); opacity: .9; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.block { width: 100%; }
.btn.fab {
  position: fixed; right: max(20px, calc(50% - 210px + 20px)); bottom: calc(86px + env(safe-area-inset-bottom));
  width: 54px; height: 54px; border-radius: 50%; font-size: 26px; padding: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); z-index: 20;
}

/* 标签 */
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.tag.green { background: rgba(52,199,89,.15); color: var(--green); }
.tag.blue { background: rgba(0,122,255,.15); color: var(--accent); }
.tag.gray { background: rgba(142,142,147,.18); color: var(--text-2); }
.tag.gold { background: rgba(255,159,10,.18); color: var(--orange); }

/* 空态 */
.empty { text-align: center; padding: 48px 24px; color: var(--text-2); }
.empty .ico { font-size: 44px; margin-bottom: 12px; }
.empty .t { font-size: 16px; font-weight: 600; color: var(--text); }
.empty .s { font-size: 13px; margin: 6px 0 18px; }

/* 底部 Tab */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  max-width: 460px; margin: 0 auto;
  display: flex; background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--sep);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; border: none; background: none; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 6px; color: var(--text-2);
}
.tab .tab-ico { font-size: 22px; line-height: 1; filter: grayscale(.4); }
.tab .tab-tx { font-size: 10px; }
.tab.active { color: var(--accent); }
.tab.active .tab-ico { filter: none; }

/* 弹层 sheet */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 40;
}
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 460px; margin: 0 auto;
  background: var(--card); border-radius: 20px 20px 0 0;
  transform: translateY(100%); transition: transform .3s cubic-bezier(.32,.72,0,1);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.show { transform: translateY(0); }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--sep);
  font-size: 17px; font-weight: 600;
}
.sheet-close { border: none; background: none; color: var(--accent); font-size: 17px; font-weight: 600; cursor: pointer; font-family: inherit; }
.sheet-body { padding: 18px; max-height: 60vh; overflow-y: auto; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--sep); background: var(--bg);
  border-radius: var(--radius-sm); padding: 12px; font-size: 16px;
  font-family: inherit; color: var(--text); outline: none;
  transition: border-color .15s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 72px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%) translateY(10px);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 50;
  max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.muted { color: var(--text-2); font-size: 13px; }
.price { font-size: 24px; font-weight: 700; }
.price small { font-size: 13px; font-weight: 500; color: var(--text-2); }
.benefit { font-size: 14px; color: var(--text); margin: 4px 0; }
.benefit::before { content: "✓ "; color: var(--green); font-weight: 700; }
.divider { height: 1px; background: var(--sep); margin: 14px 0; }

/* ===== 目标页（重构版） ===== */
.card.section { padding: 16px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sec-title { font-size: 17px; font-weight: 600; }
.sec-num { font-size: 18px; font-weight: 700; color: var(--accent); }
.sec-sub { font-size: 13px; color: var(--text-2); margin-top: 8px; }

/* 进度条 */
.bar { height: 10px; background: var(--sep); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--green), #30D158); border-radius: 999px; transition: width .35s ease; }

/* 年度宫格 */
.year-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.month-cell {
  background: var(--bg); border-radius: 12px; padding: 10px 6px; text-align: center;
  cursor: pointer; transition: all .15s ease; border: 1.5px solid transparent;
}
.month-cell.empty { opacity: .45; }
.month-cell.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.month-label { font-size: 13px; font-weight: 600; display: block; }
.month-bar { height: 5px; background: var(--sep); border-radius: 999px; margin: 6px 0 4px; overflow: hidden; }
.month-bar-fill { height: 100%; background: var(--green); border-radius: 999px; }
.month-pct { font-size: 11px; color: var(--text-2); }

/* 计划卡 */
.plan { background: var(--bg); border-radius: 14px; padding: 14px; margin-top: 12px; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-title { font-size: 16px; font-weight: 600; }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 600; flex: none; }
.badge.active { background: rgba(52,199,89,.15); color: var(--green); }
.badge.done { background: rgba(142,142,147,.18); color: var(--text-2); }
.badge.paused { background: rgba(255,159,10,.18); color: var(--orange); }
.plan-bar { height: 8px; background: var(--sep); border-radius: 999px; margin-top: 10px; position: relative; overflow: hidden; }
.plan-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #0A84FF); border-radius: 999px; transition: width .35s ease; }
.plan-pct { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--text-2); font-weight: 600; }
.plan-next { display: flex; gap: 6px; align-items: baseline; margin-top: 8px; background: color-mix(in srgb, var(--orange) 12%, transparent); border-radius: 10px; padding: 8px 10px; }
.next-tag { font-size: 11px; font-weight: 700; color: var(--orange); flex: none; }
.next-text { font-size: 13px; color: var(--text); }
.task-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--sep); }
.task-row:last-child { border-bottom: none; }
.task-title { font-size: 15px; }
.task-done { color: var(--text-2); text-decoration: line-through; }
.plan-empty { color: var(--text-2); font-size: 14px; padding: 14px 0; text-align: center; }

/* 周日历 */
.week { display: flex; gap: 6px; }
.day {
  flex: 1; text-align: center; background: var(--bg); border-radius: 12px; padding: 10px 2px 8px;
  cursor: pointer; border: 1.5px solid transparent; position: relative;
}
.day.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.day.today .day-num { color: var(--accent); font-weight: 700; }
.day-label { font-size: 11px; color: var(--text-2); display: block; }
.day-num { font-size: 16px; font-weight: 600; display: block; margin: 2px 0; }
.day-bar { height: 28px; width: 6px; background: var(--sep); border-radius: 999px; margin: 0 auto; position: relative; overflow: hidden; }
.day-bar-fill { position: absolute; bottom: 0; left: 0; right: 0; background: var(--green); border-radius: 999px; transition: height .35s ease; }
.day-pct { font-size: 10px; color: var(--text-2); display: block; margin-top: 3px; }
.day-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin: 3px auto 0; }
.week-nav { display: flex; align-items: center; gap: 10px; }
.wn-btn { font-size: 20px; color: var(--accent); cursor: pointer; width: 22px; text-align: center; }
.wn-today { font-size: 13px; color: var(--text-2); cursor: pointer; }

/* 进行中 */
.mini { margin-top: 10px; }
.mini-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mini-title { font-size: 15px; font-weight: 500; }
.mini-pending { font-size: 12px; color: var(--text-2); }

/* 下一步 */
.next-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--sep); }
.next-item:last-child { border-bottom: none; }
.next-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-top: 6px; flex: none; }
.next-body { display: flex; flex-direction: column; gap: 2px; }
.next-goal { font-size: 15px; font-weight: 600; }
.next-text { font-size: 13px; color: var(--text-2); }

/* 鼓励语 */
.encourage {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, var(--card)), var(--card));
}
.encourage-quote { font-size: 16px; font-weight: 600; line-height: 1.4; flex: 1; }
.encourage-btn { font-size: 14px; color: var(--accent); font-weight: 600; cursor: pointer; flex: none; }

/* 新建计划面板 */
.stepper { display: flex; align-items: center; justify-content: center; gap: 16px; }
.step-btn {
  font-size: 22px; color: var(--accent); background: var(--bg); border: none;
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer; font-family: inherit;
}
.step-val { font-size: 17px; font-weight: 600; min-width: 72px; text-align: center; }
.daypick { display: flex; align-items: center; gap: 10px; }
.picker-val { flex: 1; }
.task-edit { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.task-edit .input { flex: 1; }
.task-del { color: #FF3B30; font-size: 18px; cursor: pointer; flex: none; width: 24px; text-align: center; }
.add-task { color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 2px; }
.form-error { color: #FF3B30; font-size: 13px; margin-top: 4px; min-height: 16px; }
.sheet-actions { display: flex; gap: 12px; margin-top: 8px; }
.sheet-btn {
  flex: 1; text-align: center; padding: 14px; border-radius: 14px; font-size: 16px;
  font-weight: 600; cursor: pointer; font-family: inherit; border: none;
}
.sheet-btn.ghost { background: var(--bg); color: var(--text); }
.sheet-btn.primary { background: var(--accent); color: #fff; }

/* ===== 外观主题覆盖（对齐小程序 我的·外观） ===== */
body.theme-light {
  --bg: #F2F2F7; --card: #FFFFFF; --text: #1C1C1E; --text-2: #8E8E93; --text-3: #C7C7CC;
  --sep: #E5E5EA; --accent: #007AFF; --green: #34C759; --orange: #FF9F0A;
}
body.theme-dark {
  --bg: #000000; --card: #1C1C1E; --text: #F2F2F7; --text-2: #8E8E93; --text-3: #48484A;
  --sep: #38383A; --accent: #0A84FF; --green: #30D158; --orange: #FF9F0A;
}

/* ===== 今天·首屏 Hero 便签（对齐小程序 today Hero） ===== */
/* 整屏 pastel 渐变由外层 .phone 提供（对齐小程序 today .page 的 100vh 渐变），
   顶部透明导航与 #page-today 都透出这层渐变，确保无缝、无灰底条 */
body.today-mode .phone { background: linear-gradient(165deg, #eef1ff 0%, #fbeef6 48%, #fff3e6 100%); }
body.today-mode #page-today { background: transparent; }

.today-hero { position: relative; margin: 4px 0 8px; padding: 8px 4px 4px; overflow: hidden; }
.today-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120,130,160,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,130,160,0.06) 1px, transparent 1px);
  background-size: 22px 22px; pointer-events: none;
}
.today-hero-greet { position: relative; z-index: 1; }
.today-hero-hi { font-size: 26px; font-weight: 800; color: #1c1c1e; letter-spacing: .5px; line-height: 1.2; }
.today-hero-ding { font-size: 14px; color: rgba(60,60,67,0.6); margin-top: 12px; }

.today-hero-canvas { position: relative; height: 450px; margin-top: 6px; }
.today-hero-card {
  position: absolute; width: 47%; min-height: 84px; padding: 12px 14px 14px;
  box-sizing: border-box; border-radius: 23px; border: 1.5px solid rgba(255,255,255,0.7);
  box-shadow: 0 8px 22px rgba(30,40,80,0.10); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  cursor: pointer; overflow: visible; color: #1c1c1e;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background-color .35s ease, box-shadow .35s ease;
}
.today-hero-time { display: block; font-size: 12px; color: rgba(60,60,67,0.45); }
.today-hero-title { display: block; font-size: 17px; font-weight: 700; line-height: 1.4; margin-top: 4px; transition: opacity .35s ease; }
.today-hero-title.done { text-decoration: line-through; opacity: .5; }
.today-hero-card.done { box-shadow: 0 8px 22px rgba(31,122,77,0.18); }
.today-hero-stamp {
  position: absolute; right: -6px; bottom: -6px; width: 34px; height: 34px; border-radius: 50%;
  background-color: #34C759; color: #fff; font-size: 20px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(52,199,89,0.45);
  transform: rotate(-12deg) scale(0); transition: transform .35s cubic-bezier(.2,1.6,.4,1);
}
.today-hero-card.done .today-hero-stamp { transform: rotate(-12deg) scale(1); }
.today-hero-empty {
  position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%);
  text-align: center; font-size: 15px; color: rgba(60,60,67,0.4);
}

/* ===== 首页公告条（对齐小程序 today） ===== */
.ann-bar {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(0,122,255,.10); border: 1px solid rgba(0,122,255,.28);
  border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
}
.ann-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ann-title { font-size: 16px; font-weight: 600; color: var(--text); }
.ann-body { font-size: 13px; color: var(--text-2); margin-top: 5px; line-height: 1.5; }
.ann-close { font-size: 20px; color: var(--text-3); line-height: 1.2; padding: 0 4px; cursor: pointer; }

/* ===== 进度卡（环形 + 连续天数 + 本周完成率） ===== */
.progress-card { display: flex; align-items: center; padding: 18px; }
.progress-meta { flex: 1; display: flex; align-items: center; justify-content: space-around; margin-left: 16px; }
.meta-item { display: flex; flex-direction: column; align-items: center; }
.meta-num { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.1; }
.meta-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.meta-line { width: 1px; height: 34px; background: var(--sep); }

/* ===== 区块标题 / 目标卡 / 本周三件事 ===== */
.section-title { font-size: 13px; color: var(--text-2); margin: 4px 4px 10px; }
.goal-card { padding: 16px; margin-bottom: 12px; }
.goal-head { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.goal-card .row { border-bottom: none; padding: 10px 0; }

.weekly-card { padding: 16px; }
.weekly-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.weekly-title { font-size: 17px; font-weight: 600; color: var(--text); }
.weekly-toggle { font-size: 13px; color: var(--accent); }
.weekly-row { display: flex; align-items: center; margin-top: 14px; }
.weekly-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--sep); overflow: hidden; margin-right: 12px; }
.weekly-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.weekly-name { font-size: 15px; color: var(--text); width: 140px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.weekly-pct { font-size: 13px; color: var(--text-2); margin-left: 10px; width: 44px; text-align: right; }

/* ===== 空状态（对齐小程序 today 空态） ===== */
.empty-title { font-size: 17px; color: var(--text-2); margin-bottom: 22px; text-align: center; }
.empty-actions { display: flex; gap: 12px; justify-content: center; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* ===== 回顾页（对齐小程序 review） ===== */
.streak-card { display: flex; flex-direction: column; align-items: center; padding: 30px 18px; }
.streak-num { font-size: 48px; font-weight: 700; letter-spacing: -1px; line-height: 1; color: var(--text); }
.streak-label { color: var(--text-2); font-size: 14px; margin-top: 6px; }
.week-card { padding: 16px; }
.week-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.week-title { font-size: 17px; font-weight: 600; color: var(--text); }
.week-rate { font-size: 14px; color: var(--text-2); }
.week-bars { display: flex; gap: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar { width: 100%; height: 48px; border-radius: 10px; background: var(--sep); transition: background .2s ease; }
.bar.bar-on { background: var(--green); }
.bar-day { font-size: 12px; color: var(--text-2); }

/* ===== 我的页（对齐参考图「微光」我的页 + 账号登录系统） ===== */
.block { padding: 16px; }
.block-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.segment { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; }
.seg-item {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 9px; font-size: 14px;
  color: var(--text-2); cursor: pointer; transition: all .15s ease;
}
.seg-item.seg-on { background: var(--card); color: var(--accent); font-weight: 600; box-shadow: var(--shadow); }

/* 账号卡（紫色渐变，对齐参考图） */
.mine-account {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 18px; margin: 4px 0 14px;
  border-radius: 22px;
  background: linear-gradient(135deg, #b69bff 0%, #9d7bff 60%, #7e6bf0 100%);
  box-shadow: 0 10px 26px rgba(126,107,240,.32);
  cursor: pointer;
}
.mine-account-off { background: linear-gradient(135deg, #cfd4e8 0%, #c2c8e0 100%); box-shadow: 0 8px 22px rgba(80,90,140,.18); }
.mine-avatar {
  width: 56px; height: 56px; flex: none; border-radius: 50%;
  background: #fff; color: #5b3df0; font-size: 24px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.12);
  overflow: hidden;
}
.mine-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mine-account-main { flex: 1; min-width: 0; }
.mine-account-name { font-size: 20px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine-account-off .mine-account-name { color: #2c3146; }
.mine-account-sub { font-size: 13px; color: rgba(255,255,255,.88); margin-top: 4px; }
.mine-account-off .mine-account-sub { color: #5b6178; }
.mine-account-arrow { font-size: 22px; color: rgba(255,255,255,.9); }

/* 统计三卡 */
.mine-stats { display: flex; gap: 10px; margin-bottom: 14px; }
.mine-stat {
  flex: 1; background: var(--card); border-radius: 16px; padding: 16px 6px;
  text-align: center; box-shadow: var(--shadow);
}
.mine-stat-num { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.mine-stat-unit { font-size: 13px; font-weight: 600; color: var(--text-2); margin-left: 2px; }
.mine-stat-label { font-size: 12px; color: var(--text-2); margin-top: 6px; }

/* 设置列表行 */
.list { padding: 4px 0; }
.list .row { cursor: pointer; }
.row-label { font-size: 16px; font-weight: 500; color: var(--text); }
.row-arrow { font-size: 20px; color: var(--text-3); }
.mine-row { padding: 14px 16px; }
.mine-ic {
  width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center;
  font-size: 16px;
}
.mine-ic-pink { background: rgba(255,45,85,.14); }
.mine-ic-purple { background: rgba(94,92,230,.14); }
.mine-ic-orange { background: rgba(255,149,0,.14); }
.mine-ic-blue { background: rgba(0,122,255,.14); }
.mine-ic-gray { background: rgba(142,142,147,.16); }
.mine-ic-red { background: rgba(255,59,48,.14); }
.mine-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.mine-val { font-size: 15px; color: var(--text-2); }

/* 开关 */
.mine-switch {
  margin-left: auto; width: 50px; height: 30px; border-radius: 999px;
  background: var(--text-3); position: relative; cursor: pointer; transition: background .2s ease; flex: none;
}
.mine-switch.on { background: var(--green); }
.mine-switch-knob {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease;
}
.mine-switch.on .mine-switch-knob { transform: translateX(20px); }

.mine-foot { text-align: center; color: var(--text-3); font-size: 12px; padding: 16px 0 calc(20px + env(safe-area-inset-bottom)); }

/* 登录 / 注册 弹层 */
.auth-seg { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.auth-seg-opt { flex: 1; text-align: center; padding: 9px 0; border-radius: 9px; font-size: 15px; color: var(--text-2); cursor: pointer; transition: all .15s ease; }
.auth-seg-opt.on { background: var(--card); color: var(--accent); font-weight: 600; box-shadow: var(--shadow); }
.btn.primary { background: var(--accent); color: #fff; }

/* 账号详情 / 编辑资料 弹层 */
.acct-preview-wrap { position: relative; width: 76px; margin: 4px auto 14px; }
.acct-preview {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, #b69bff 0%, #7e6bf0 100%); color: #fff;
  display: grid; place-items: center; font-size: 32px; font-weight: 700;
  box-shadow: 0 8px 20px rgba(126,107,240,.34); cursor: pointer; overflow: hidden;
}
.acct-add {
  position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 18px;
  line-height: 26px; text-align: center; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 8px rgba(94,92,230,.5); border: 2px solid #fff;
}
.acct-sec { font-size: 14px; color: var(--text-2); margin: 4px 2px 10px; }
.acct-av-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 18px; }
.acct-av {
  aspect-ratio: 1; border-radius: 14px; background: var(--bg); color: var(--text);
  display: grid; place-items: center; font-size: 24px; cursor: pointer;
  border: 2px solid transparent; transition: all .15s ease;
}
.acct-av:hover { border-color: rgba(94,92,230,.4); }
.acct-av.on { border-color: var(--accent); background: rgba(94,92,230,.12); }
.acct-av-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.acct-preview .acct-avatar-img { border-radius: 50%; }
.acct-email-line { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 10px; }


/* ===== 今天页 · 三模块（对齐小程序 today 模块1） ===== */
.t-modules { display: flex; gap: 8px; margin: 8px 0 12px; }
.t-mod {
  flex: 1; background: var(--card); border-radius: 14px; padding: 14px 0;
  display: flex; flex-direction: column; align-items: center; position: relative;
  box-shadow: var(--shadow); cursor: pointer;
}
.t-mod:active { opacity: .85; }
.t-mod-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; color: #fff; margin-bottom: 7px; }
.t-mod-blue { background: var(--accent); }
.t-mod-purple { background: #5E5CE6; }
.t-mod-orange { background: #FF9500; }
.t-mod-label { font-size: 13px; color: var(--text); }
.t-mod-badge {
  position: absolute; top: 8px; right: 10px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #FF3B30; color: #fff; font-size: 10px; line-height: 16px; text-align: center;
}
.t-mod-badge.warn { background: #FF9500; }

/* ===== 今天页 · 模式切换（对齐小程序 today 模式切换） ===== */
.t-mode-seg { display: flex; background: var(--bg); border-radius: 999px; padding: 3px; margin: 0 0 12px; gap: 3px; }
.t-mode-opt { flex: 1; text-align: center; padding: 7px 0; font-size: 14px; font-weight: 600; color: var(--text-2); border-radius: 999px; cursor: pointer; transition: all .2s ease; }
.t-mode-opt.on { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }

/* ===== 今天页 · 日历（对齐小程序 today 模块2） ===== */
.t-cal-card { padding: 16px; margin-bottom: 12px; }
.t-cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.t-cal-title { font-size: 16px; font-weight: 600; color: var(--text); }
.t-cal-title-wrap { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.t-cal-caret { font-size: 11px; color: var(--text-2); }
.t-cal-arrow { width: 28px; height: 28px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 20px; color: var(--text-2); cursor: pointer; }
.t-cal-today { font-size: 12px; color: var(--accent); font-weight: 600; padding: 3px 9px; background: rgba(0,122,255,.1); border-radius: 999px; cursor: pointer; }
.t-cal-week { display: flex; }
.t-cal-wd { flex: 1; text-align: center; font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.t-cal-grid { display: flex; flex-wrap: wrap; }
.t-cal-cell { width: 14.2857%; height: 42px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.t-cal-num { font-size: 14px; color: var(--text); width: 28px; height: 28px; border-radius: 50%; line-height: 28px; text-align: center; }
.t-cal-cell.today .t-cal-num { color: var(--accent); font-weight: 700; background: rgba(0,122,255,.12); }
.t-cal-cell.has .t-cal-num { font-weight: 600; }
.t-cal-cell.sel .t-cal-num { color: #fff; background: var(--accent); font-weight: 700; }
.t-cal-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); position: absolute; bottom: 3px; }

.t-ym-grid { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.t-ym-pill { width: calc((100% - 24px) / 4); box-sizing: border-box; height: 60px; border-radius: 14px; background: var(--bg); display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.t-ym-label { font-size: 15px; font-weight: 500; color: var(--text); }
.t-ym-pill.has .t-ym-label { font-weight: 600; }
.t-ym-pill.has::after { content: ''; position: absolute; top: 10px; right: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.t-ym-pill.sel { background: rgba(0,122,255,.12); }
.t-ym-pill.sel .t-ym-label { color: var(--accent); font-weight: 700; }

/* ===== 今天页 · 月份选择器弹层（对齐小程序 today 弹层） ===== */
.today-picker-mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; display: flex; align-items: flex-end; }
.today-picker-sheet { width: 100%; max-width: 460px; margin: 0 auto; background: var(--card); border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.today-picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.today-picker-year { font-size: 17px; font-weight: 700; color: var(--text); }
.today-picker-arrow { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); color: var(--text-2); font-size: 22px; line-height: 32px; text-align: center; cursor: pointer; }
.today-picker-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.today-picker-cell { width: calc((100% - 16px) / 3); background: var(--bg); border-radius: 12px; padding: 14px 0; display: flex; flex-direction: column; align-items: center; gap: 4px; box-sizing: border-box; cursor: pointer; }
.today-picker-cell.has { background: rgba(0,122,255,.08); }
.today-picker-cell.sel { outline: 2px solid var(--accent); }
.today-picker-m { font-size: 15px; font-weight: 600; color: var(--text); }
.today-picker-pct { font-size: 11px; color: var(--green); }
.today-picker-cancel { margin-top: 14px; text-align: center; padding: 12px 0; font-size: 15px; color: var(--text-2); background: var(--bg); border-radius: 12px; cursor: pointer; }

/* ===== 今天页 · 分类（对齐小程序 today 模块3） ===== */
.t-cat-row { margin-bottom: 6px; }
.t-cat-scroll { white-space: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.t-cat-chip { display: inline-flex; align-items: center; padding: 6px 12px; background: var(--card); border-radius: 999px; font-size: 13px; color: var(--text-2); margin-right: 8px; box-shadow: var(--shadow); cursor: pointer; }
.t-cat-chip.on { background: var(--accent); color: #fff; }
.t-cat-dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; flex: none; }
.t-cat-chip.on .t-cat-dot { background: #fff !important; }
.t-cat-add { color: var(--accent); }
.t-cat-input-card { padding: 10px 14px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.t-cat-input { flex: 1; font-size: 14px; color: var(--text); border: none; background: transparent; outline: none; }
.t-cat-input-btns { display: flex; gap: 14px; }
.t-cat-cancel { color: var(--text-2); font-size: 14px; cursor: pointer; }
.t-cat-ok { color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer; }

/* ===== 今天页 · 树状任务明细（对齐小程序 today 模块4 · 方案A） ===== */
.section-title { font-size: 12px; color: var(--text-2); margin: 8px 4px; }
.t-tree-group { padding: 6px 14px 4px; margin-bottom: 10px; }
.t-tree-parent { display: flex; align-items: center; padding: 8px 0; }
.t-tree-tri { font-size: 11px; color: var(--text-2); width: 16px; }
.t-tree-name { font-size: 15px; font-weight: 700; color: var(--text); flex: 1; }
.t-tree-count { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.t-tree-bar { height: 4px; border-radius: 99px; background: var(--sep); margin: 1px 0 6px; overflow: hidden; }
.t-tree-bar-fill { height: 100%; border-radius: 99px; transition: width .4s ease; }
.t-tree-children { padding-bottom: 4px; }
.t-tree-node { display: flex; align-items: center; padding: 9px 0 9px 24px; border-top: 1px solid var(--sep); }
.t-tree-node:first-child { border-top: none; }
.t-tree-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--text-3); display: grid; place-items: center; font-size: 12px; color: #fff; margin-right: 8px; flex: none; }
.t-tree-check.on { background: var(--green); border-color: var(--green); }
.t-tree-task { font-size: 14px; color: var(--text); }
.t-tree-task.done { color: var(--text-3); text-decoration: line-through; }
.t-tree-date { font-size: 11px; color: var(--text-3); margin-left: auto; padding-left: 8px; }
.t-empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 30px 0; }

/* ===== 新建计划面板 · 分类选择 ===== */
.create-cat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.create-cat-chip { display: inline-flex; align-items: center; padding: 6px 12px; background: var(--bg); border-radius: 999px; font-size: 13px; color: var(--text-2); cursor: pointer; border: 1.5px solid transparent; }
.create-cat-chip.on { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); border-color: var(--accent); color: var(--accent); font-weight: 600; }
