/* ============================================================
   北 · 成长路线图 — 设计系统 (extracted from prototype)
   品牌：Emerald 成长绿为根，Indigo 为 AI 强调，Gold 为目标；
   三层柔和阴影 + 14px 圆角 + 4px 间距基准 + 玻璃态 + 状态动效。
   暗色 / 浅色双主题；全内联 SVG 图标（描边 1.9）；尊重 prefers-reduced-motion。
   ============================================================ */
:root{
  color-scheme:light;
  --bg:#F7F8FC;
  --bg-grain:radial-gradient(820px 560px at 6% -8%,color-mix(in srgb,var(--brand) 5%,transparent),transparent 58%),
             radial-gradient(760px 520px at 102% -2%,color-mix(in srgb,var(--accent) 4%,transparent),transparent 55%);
  --surface:#ffffff;
  --surface-2:#f6f8fa;
  --surface-3:#eef1f4;
  --border:#e7eaee;
  --border-strong:#d8dde3;
  --text:#14171c;
  --text-2:#565f6b;
  --text-3:#9aa3af;
  --brand:#10b981;        /* 成长绿（默认主色，[data-accent] 可覆盖） */
  --brand-strong:#0a8f63;
  --brand-weak:color-mix(in srgb,var(--brand) 14%,var(--surface));
  --brand-ink:color-mix(in srgb,var(--brand) 78%,var(--text));
  --accent:#6366f1;       /* AI 靛蓝（默认强调色，[data-accent] 可覆盖） */
  --accent-weak:color-mix(in srgb,var(--accent) 14%,var(--surface));
  --gold:#e0a23b;         /* 目标 / 里程碑 */
  --gold-weak:#fbeed3;
  --gold-ink:#9a6a16;     /* 金底上的文字（浅色） */
  --success:#0fb37a; --success-weak:color-mix(in srgb,var(--success) 14%,var(--surface)); --warn:#f0a020; --danger:#ec5a5a; --info:#3b82f6;
  --warn-weak:#fdf0d6; --danger-weak:#fce3e3; --info-weak:#e2eefe;
  --r-xs:9px; --r-sm:12px; --r:14px; --r-lg:16px; --r-xl:20px; --r-pill:999px;
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:20px; --s6:24px; --s7:32px; --s8:48px;
  --sh-1:0 1px 2px rgba(17,24,39,.04),0 1px 3px rgba(17,24,39,.05);
  --sh-2:0 6px 18px rgba(17,24,39,.07),0 2px 6px rgba(17,24,39,.04);
  --sh-3:0 18px 48px rgba(17,24,39,.12),0 6px 16px rgba(17,24,39,.06);
  --sh-brand:0 6px 16px rgba(17,24,39,.12);
  --goal:#6366f1;        --goal-weak:color-mix(in srgb,var(--goal) 14%,var(--surface));
  --todo:#3b82f6;        --todo-weak:color-mix(in srgb,var(--todo) 14%,var(--surface));
  --habit:#10b981;       --habit-weak:color-mix(in srgb,var(--habit) 14%,var(--surface));
  --time:#f59e0b;        --time-weak:color-mix(in srgb,var(--time) 14%,var(--surface));
  --review:#8b5cf6;      --review-weak:color-mix(in srgb,var(--review) 14%,var(--surface));
  --health:#ec4899;      --health-weak:color-mix(in srgb,var(--health) 14%,var(--surface));
  --achv:#e0a23b;        --achv-weak:color-mix(in srgb,var(--achv) 14%,var(--surface));
  /* 新圆角/间距 Token（与旧变量共存，后续逐步迁移） */
  --radius-xs:9px; --radius-sm:12px; --radius-md:14px; --radius-lg:16px; --radius-xl:20px; --radius-pill:999px;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:20px; --space-6:24px; --space-7:32px; --space-8:48px;
  --shadow-1:0 1px 2px rgba(17,24,39,.04),0 1px 3px rgba(17,24,39,.05);
  --shadow-2:0 6px 18px rgba(17,24,39,.07),0 2px 6px rgba(17,24,39,.04);
  --shadow-3:0 18px 48px rgba(17,24,39,.12),0 6px 16px rgba(17,24,39,.06);
  --sh-gold:0 6px 16px rgba(17,24,39,.12);
  --ease:cubic-bezier(.22,1,.36,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --t-fast:150ms; --t:280ms; --t-slow:460ms;
  --dur-enter:520ms;
  --sidebar-w:272px; --sidebar-w-collapsed:78px; --topbar-h:64px;
  --font:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",system-ui,"Segoe UI",Roboto,sans-serif;
  --mono:"SF Mono","JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;
}
[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0c0e12;
  --bg-grain:radial-gradient(820px 560px at 6% -8%,color-mix(in srgb,var(--brand) 7%,transparent),transparent 58%),
             radial-gradient(760px 520px at 102% -2%,color-mix(in srgb,var(--accent) 6%,transparent),transparent 55%);
  --surface:#15181e; --surface-2:#1b1f26; --surface-3:#232833;
  --border:#262b33; --border-strong:#333a45;
  --text:#eaeef3; --text-2:#a4adba; --text-3:#8b94a3;
  /* 主色/弱色/ink 由 [data-accent] + color-mix 派生，明暗只管 surface/text/shadow/gold */
  --gold:#ecc05a; --gold-weak:#3a2e12; --gold-ink:#f3cf8a;
  --success:#34d399; --success-weak:color-mix(in srgb,var(--success) 16%,var(--surface)); --warn:#fbbf24; --danger:#f87171; --info:#60a5fa;
  --warn-weak:#3a2f12; --danger-weak:#3a1c1c; --info-weak:#15294a;
  --sh-1:0 1px 2px rgba(0,0,0,.35); --sh-2:0 8px 22px rgba(0,0,0,.4);
  --sh-3:0 20px 52px rgba(0,0,0,.55);   --sh-brand:0 8px 20px rgba(0,0,0,.45);
  --sh-gold:0 8px 20px rgba(0,0,0,.45);
}
/* ===== 主色风格包（8 套，data-accent）—— 默认翠绿；明暗由 data-theme 控制，弱色/ink 自动适配 ===== */
[data-accent="emerald"]{--brand:#10b981;--brand-strong:#0a8f63;--accent:#6366f1;--accent-strong:#4f46e5}
[data-accent="indigo"]{--brand:#6366f1;--brand-strong:#4f46e5;--accent:#0ea5e9;--accent-strong:#0369a1}
[data-accent="rose"]{--brand:#fb7185;--brand-strong:#e11d48;--accent:#ec4899;--accent-strong:#be185d}
[data-accent="amber"]{--brand:#f59e0b;--brand-strong:#b45309;--accent:#f97316;--accent-strong:#c2410c}
[data-accent="teal"]{--brand:#14b8a6;--brand-strong:#0f766e;--accent:#0ea5e9;--accent-strong:#0369a1}
[data-accent="violet"]{--brand:#8b5cf6;--brand-strong:#6d28d9;--accent:#ec4899;--accent-strong:#be185d}
[data-accent="blue"]{--brand:#3b82f6;--brand-strong:#2563eb;--accent:#06b6d4;--accent-strong:#0e7490}
[data-accent="graphite"]{--brand:#64748b;--brand-strong:#475569;--accent:#0ea5e9;--accent-strong:#0369a1}
*{box-sizing:border-box;margin:0;padding:0}
.skip-link{position:fixed;left:-999px;top:0;z-index:100;background:var(--brand);color:#fff;padding:8px 14px;border-radius:0 0 8px 0;font-weight:700;font-size:13px}
.skip-link:focus{left:0;outline:none}
html,body{height:100%}
body{font-family:var(--font);background:var(--bg);color:var(--text);
  -webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-size-adjust:100%;
  font-size:14px;line-height:1.55;
  background-image:var(--bg-grain);background-attachment:fixed;
  transition:background-color var(--t) var(--ease),color var(--t) var(--ease)}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit;-webkit-tap-highlight-color:transparent}
/* 点击动效只给明确的按钮，卡片/导航/空白处不加 */
.btn:active,.mini:active,.icon-btn:active,.tact button:active,.hamb:active,.h-today:active,
.h-day:active,.ms:active,.bottom-tab button:active{transform:scale(.96);transition:transform 80ms var(--ease)}
.card,.domain,.nav-item,.task,.icard,.ncard{transition:border-color var(--t-fast),box-shadow var(--t-fast),background var(--t-fast)}
svg{display:block}
.page-title,.card-h h3,.hero h2,.goal-hero .meta h2,.rm-card h4,.ncard .nt{text-wrap:balance}
.stat .v,.timer-panel .tp-time,.goal-hero .big-ring .lbl b{font-variant-numeric:tabular-nums}
button,.nav-item,.bottom-tab button,.card,.domain,.task,.icard,.ncard,.hcell{touch-action:manipulation}
.sidebar,.modal{overscroll-behavior:contain}
a{color:var(--accent);text-decoration:none}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:var(--r-pill);border:3px solid transparent;background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:var(--text-3);background-clip:content-box}

/* ===================== 布局 ===================== */
.app{display:flex;min-height:100vh;min-height:100dvh}
.sidebar{width:var(--sidebar-w);flex:0 0 var(--sidebar-w);background:color-mix(in srgb,var(--surface) 90%,transparent);
  backdrop-filter:blur(10px);border-right:1px solid var(--border);
  display:flex;flex-direction:column;position:sticky;top:0;height:100vh;height:100dvh;
  transition:width var(--t) var(--ease);z-index:40}
.sidebar.collapsed{width:var(--sidebar-w-collapsed);flex-basis:var(--sidebar-w-collapsed)}
.brand{display:flex;align-items:center;gap:var(--s3);padding:var(--s5) var(--s4);height:var(--topbar-h);
  border-bottom:1px solid var(--border)}
.logo{width:38px;height:38px;border-radius:10px;flex:0 0 38px;position:relative;
  background:linear-gradient(150deg,var(--brand-strong),var(--brand));
  display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:var(--sh-1);
  overflow:hidden}
.logo svg{width:24px;height:24px;position:relative;z-index:1}
.logo .compass{filter:drop-shadow(0 1px 1px rgba(0,0,0,.25))}
.brand .name{font-weight:800;font-size:16px;letter-spacing:.3px;white-space:nowrap;overflow:hidden;line-height:1.15}
.brand .name small{display:block;font-size:10.5px;font-weight:600;color:var(--text-3);letter-spacing:2px}
.sidebar.collapsed .brand .name{display:none}
.sb-scroll{flex:1;overflow-y:auto;padding:var(--s3) var(--s3) var(--s4)}
.grp{font-size:10.5px;font-weight:800;letter-spacing:1.4px;color:var(--text-3);text-transform:uppercase;
  padding:var(--s5) var(--s3) var(--s2);display:flex;align-items:center;justify-content:space-between}
.nav-item{display:flex;align-items:center;gap:var(--s3);padding:11px var(--s3);border-radius:var(--r-sm);
  color:var(--text-2);font-weight:560;cursor:pointer;position:relative;margin-bottom:3px;
  transition:background var(--t-fast) var(--ease),color var(--t-fast) var(--ease),transform var(--t-fast) var(--ease)}
.nav-item:hover{background:var(--surface-2);color:var(--text)}
.nav-item.active{background:linear-gradient(100deg,var(--brand-weak),color-mix(in srgb,var(--brand-weak) 40%,transparent));
  color:var(--brand-ink);font-weight:700}
.nav-item.active::before{content:"";position:absolute;left:-3px;top:50%;transform:translateY(-50%);
  width:4px;height:20px;border-radius:var(--r-pill);background:var(--brand);box-shadow:var(--sh-brand)}
.nav-item .ic{width:24px;height:24px;flex:0 0 24px;display:flex;align-items:center;justify-content:center;font-size:19px;line-height:1}
.nav-item .ic svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.nav-item .nav-label{flex:1;white-space:nowrap;overflow:hidden}
.nav-item .badge{font-size:11px;font-weight:800;background:var(--surface-3);color:var(--text-2);
  padding:1px 8px;border-radius:var(--r-pill);min-width:20px;text-align:center}
.nav-item.active .badge{background:#fff;color:var(--brand-strong)}
.nav-sep{height:1px;background:var(--border);margin:var(--s3) var(--s3)}
.sb-foot{padding:10px 12px;border-top:1px solid var(--border);display:flex;flex-wrap:wrap;gap:6px;font-size:12px;color:var(--text-3)}
.sb-foot button{flex:0 0 auto;padding:5px 8px;border-radius:var(--r-xs);color:var(--text-2);background:transparent;
  display:inline-flex;align-items:center;justify-content:center;gap:5px;transition:background var(--t-fast);line-height:1}
.sb-foot button:hover{background:var(--surface-2)}
.sb-foot button svg{width:16px;height:16px;flex:0 0 16px}
.sb-foot button span{font-size:11px;white-space:nowrap}
.sidebar.collapsed .sb-foot span,.sidebar.collapsed .nav-label,.sidebar.collapsed .grp,.sidebar.collapsed .nav-item .badge{display:none}
.sidebar.collapsed .nav-item{justify-content:center}
.sidebar.collapsed .sb-foot{flex-direction:column;gap:4px;padding:8px}
.sidebar.collapsed .sb-foot button{width:100%;padding:7px 0}
.sidebar.collapsed .sb-foot button svg{margin:0 auto}
.sb-resizer{position:absolute;right:0;top:0;bottom:0;width:6px;cursor:col-resize;z-index:50;transition:background var(--t-fast)}
.sb-resizer:hover,.sb-resizer.dragging{background:var(--brand);opacity:.35}
.sidebar.collapsed .sb-resizer{display:none}

/* 主区 */
.main{flex:1;min-width:0;display:flex;flex-direction:column;position:relative}
.topbar{height:var(--topbar-h);position:sticky;top:0;z-index:20;
  background:color-mix(in srgb,var(--surface) 86%,transparent);backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);display:flex;align-items:center;gap:var(--s3);padding:0 var(--s6)}
.hamb{display:none;width:40px;height:40px;border-radius:var(--r-sm);align-items:center;justify-content:center;color:var(--text-2)}
.hamb:hover{background:var(--surface-2)}
.page-title{font-size:clamp(17px,2vw,20px);font-weight:800;letter-spacing:.2px;white-space:nowrap}
.page-sub{font-size:12.5px;color:var(--text-3);white-space:nowrap;display:none}
@media(min-width:760px){.page-sub{display:block}}
.search{flex:1;max-width:440px;display:flex;align-items:center;gap:var(--s2);background:var(--surface-2);
  border:1px solid transparent;border-radius:var(--r-pill);padding:9px var(--s4);color:var(--text-3);
  transition:background var(--t-fast),border-color var(--t-fast),box-shadow var(--t-fast)}
.search:focus-within{background:var(--surface);border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-weak)}
.search svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2}
.search input{flex:1;border:none;background:none;outline:none;color:var(--text);font-size:14px}
.search kbd{font-family:var(--mono);font-size:11px;background:var(--surface-3);padding:2px 7px;border-radius:6px;color:var(--text-2)}
.icon-btn{width:42px;height:42px;border-radius:var(--r-sm);display:flex;align-items:center;justify-content:center;
  color:var(--text-2);transition:background var(--t-fast),color var(--t-fast),border-color var(--t-fast);border:1px solid transparent;position:relative}
.icon-btn:hover{background:var(--surface-2);color:var(--text);border-color:var(--border)}
.icon-btn svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.icon-btn .ndot{position:absolute;top:7px;right:8px;width:8px;height:8px;border-radius:50%;background:var(--danger);
  border:2px solid var(--surface);box-shadow:0 0 0 1px var(--danger);display:none}
.icon-btn .ndot.show{display:block}
.content{padding:var(--s6);max-width:1320px;width:100%;margin:0 auto}
@keyframes fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes enterUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
section.view{display:none}
section.view.show{display:block;animation:viewIn .32s var(--ease)}
@keyframes viewIn{from{opacity:0}to{opacity:1}}
@keyframes itemIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* 通用卡片 */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:var(--s5);
  position:relative;overflow:hidden}
.card:hover{box-shadow:var(--sh-2);border-color:color-mix(in srgb,var(--brand) 26%,var(--border-strong))}
.card-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--s4);gap:var(--s3)}
.card-h h3{font-size:16px;font-weight:700;display:flex;align-items:center;gap:8px}
.card-h h3 .dot{width:9px;height:9px;border-radius:50%}
.grid{display:grid;gap:var(--s5)}
.g-2{grid-template-columns:repeat(2,1fr)}
.g-3{grid-template-columns:repeat(3,1fr)}
.g-4{grid-template-columns:repeat(4,1fr)}
@media(max-width:900px){.g-3,.g-4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.g-2,.g-3,.g-4{grid-template-columns:1fr}}
@media(max-width:560px){#sec-dash .g-3{grid-template-columns:repeat(3,1fr);gap:9px}#sec-dash .stat .v{font-size:18px}#sec-dash .stat .ic{width:28px;height:28px}#sec-dash .stat .ic svg{width:15px;height:15px}}

/* 按钮 */
.btn{display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border-radius:var(--r-sm);font-weight:650;
  font-size:13.5px;transition:background var(--t-fast),color var(--t-fast),border-color var(--t-fast),box-shadow var(--t-fast),transform var(--t-fast);border:1px solid transparent}
.btn.primary{background:var(--brand);color:#fff;box-shadow:var(--sh-brand)}
.btn.primary:hover{background:var(--brand-strong)}
.btn.ghost{background:var(--surface);border-color:var(--border);color:var(--text-2)}
.btn.ghost:hover{background:var(--surface-2);color:var(--text)}
.btn.danger{background:var(--danger,#dc2626);color:#fff}
.btn.danger:hover{filter:brightness(.94)}
.btn.sm{padding:6px 12px;font-size:12.5px;min-height:32px}
.btn.danger{background:var(--danger);color:#fff}
.btn.danger:hover{filter:brightness(.95)}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* 表单 */
.field{margin-bottom:var(--s3)}
.field label{display:block;font-size:12.5px;font-weight:650;color:var(--text-2);margin-bottom:6px}
.input,input.input,select.input,textarea.input{width:100%;font-family:inherit;font-size:14px;color:var(--text);
  background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:9px 12px;outline:none;transition:border-color var(--t-fast),box-shadow var(--t-fast)}
.input:focus{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-weak);background:var(--surface)}
textarea.input{resize:vertical;min-height:80px}
.row2{display:flex;gap:var(--s3)}
.row2>*{flex:1;min-width:0}

/* 标签/图标选择器（习惯、账本分类等） */
.tagpick{display:flex;flex-wrap:wrap;gap:10px}
.tp{width:44px;height:44px;border-radius:11px;border:2px solid var(--border);background:var(--surface-2);
  display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:border-color var(--t-fast),background var(--t-fast),transform var(--t-fast)}
.tp:hover{background:var(--surface-3)}
.habit-icon-picker .tp{flex:0 0 44px}
.tp:active{transform:scale(.94)}
.tp svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tp-emoji{font-size:24px;line-height:1}
.tp i{flex:0 0 auto}

/* 概览统计 */
.stat{display:flex;flex-direction:column;gap:6px}
.stat .v{font-size:30px;font-weight:800;letter-spacing:-.5px;line-height:1}
.stat .v small{font-size:14px;font-weight:600;color:var(--text-3);margin-left:4px}
.stat .k{font-size:12.5px;color:var(--text-2);font-weight:560}
.stat .ic{width:36px;height:36px;border-radius:11px;display:flex;align-items:center;justify-content:center;margin-bottom:4px}
.stat .ic svg{width:19px;height:19px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hero{background:
    radial-gradient(440px 240px at 100% -10%,color-mix(in srgb,var(--brand-weak) 85%,transparent),transparent 70%),
    linear-gradient(135deg,var(--surface) 55%,color-mix(in srgb,var(--brand-weak) 50%,var(--surface)));
  border:1px solid var(--border);
  border-radius:var(--r-lg);padding:var(--s6);position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:space-between;gap:var(--s5)}
.hero-text{flex:1;min-width:0}
.hero h2{font-size:clamp(20px,3vw,26px);font-weight:800;letter-spacing:-.3px;margin-bottom:6px}
.hero p{color:var(--text-2);max-width:520px;font-size:14px}
.hero .date{flex:0 0 auto;text-align:center;opacity:.95;
  display:flex;flex-direction:column;align-items:center;gap:1px;line-height:1.1;
  background:color-mix(in srgb,var(--surface) 72%,transparent);
  border:1px solid var(--border);border-radius:var(--r);padding:11px 15px;backdrop-filter:blur(4px);min-width:68px}
.hero .date span{font-size:12px;font-weight:600;color:var(--text-2)}
.hero .date b{font-size:32px;font-weight:800}

/* 日期 + 天气卡片 */
.date-weather-card{flex:0 0 auto;width:148px;text-align:center;display:flex;flex-direction:column;gap:10px;
  background:color-mix(in srgb,var(--surface) 72%,transparent);
  border:1px solid var(--border);border-radius:var(--r);padding:16px 14px;backdrop-filter:blur(4px)}
.date-weather-card .dw-main{display:flex;flex-direction:column;gap:2px}
.date-weather-card .dw-date{font-size:13px;font-weight:700;color:var(--text-2)}
.date-weather-card .dw-day{font-size:38px;font-weight:800;line-height:1;color:var(--text)}
.date-weather-card .dw-wd{font-size:12px;color:var(--text-3)}
.date-weather-card .dw-lunar{font-size:11px;color:var(--gold-ink);margin-top:2px}
.date-weather-card .dw-weather{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:4px;padding-top:10px;border-top:1px dashed var(--border);font-size:13px;font-weight:600;color:var(--text-2)}
.date-weather-card .dw-weather span{font-size:24px;line-height:1}

/* 独立金句卡片 */
.quote-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:34px 30px;margin-top:var(--s5);position:relative;overflow:hidden;text-align:center}
.quote-card::before{content:"\201C";position:absolute;top:-30px;left:50%;transform:translateX(-50%);font-size:120px;color:var(--brand);opacity:.12;font-family:Georgia,serif;line-height:1}
.quote-card .q-body{display:flex;flex-direction:column;align-items:center;gap:10px;position:relative;z-index:1;padding:0 8px}
.quote-card .q-txt{font-size:25px;color:var(--text);line-height:1.75;letter-spacing:.02em;font-style:normal;font-family:"Kaiti SC","STKaiti","KaiTi","楷体",serif;max-width:680px}
.quote-card .q-author{font-size:14px;color:var(--text-3);letter-spacing:.08em;font-style:italic}
.quote-card .q-author b{color:var(--text-2);font-weight:600;font-style:italic}
.quote-card .q-mark{display:none}
.quote-card .q-act{position:absolute;top:12px;right:12px;z-index:2}
.quote-card .mini{width:32px;height:32px;border-radius:50%;color:var(--text-3);display:flex;align-items:center;justify-content:center}
.quote-card .mini:hover{background:var(--surface-2);color:var(--text)}
.quote-card .mini svg{width:16px;height:16px}

/* 旧版金句（兼容保留） */
.daily-quote{display:flex;align-items:flex-start;gap:6px;margin-top:10px;max-width:560px}
.daily-quote .q-mark{font-size:22px;line-height:1;color:var(--brand);opacity:.5;font-family:Georgia,serif}
.daily-quote .q-txt{flex:1;font-size:13px;color:var(--text-2);line-height:1.6;font-style:italic;padding-top:2px}
.daily-quote .mini{width:28px;height:28px;border-radius:50%;color:var(--text-3);flex:0 0 28px;display:flex;align-items:center;justify-content:center}
.daily-quote .mini:hover{background:var(--surface-2);color:var(--text)}
.daily-quote .mini svg{width:16px;height:16px}

/* 今日要处理 / 列表项 */
.focus-item{display:flex;align-items:center;gap:var(--s3);padding:12px;background:var(--surface-2);
  border-radius:var(--r-sm);margin-bottom:var(--s3);transition:background var(--t-fast)}
.focus-item:hover{background:var(--surface-3)}
.check{width:22px;height:22px;border-radius:50%;border:2px solid var(--border-strong);flex:0 0 22px;
  display:flex;align-items:center;justify-content:center;transition:background var(--t-fast),border-color var(--t-fast),transform var(--t-fast);cursor:pointer;position:relative}
.check svg{width:13px;height:13px;stroke:#fff;fill:none;stroke-width:3;opacity:0;transform:scale(.6);
  stroke-dasharray:22;stroke-dashoffset:22;
  transition:opacity var(--t-fast) var(--ease-spring),transform var(--t-fast) var(--ease-spring),
    stroke-dashoffset var(--t-fast) var(--ease-spring)}
.check.done{background:var(--brand);border-color:var(--brand);transform:scale(1.05)}
.check.done svg{opacity:1;transform:scale(1);stroke-dashoffset:0}
.check.done::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:2px solid var(--brand);opacity:0;animation:checkRipple .45s var(--ease) both}
@keyframes checkRipple{0%{opacity:.55;transform:scale(.85)}100%{opacity:0;transform:scale(1.5)}}
.check.done svg{opacity:1;transform:none}
.focus-item .t{flex:1;font-weight:560}
.focus-item.over .t{color:var(--danger);font-weight:700}
.focus-item .tag{font-size:11px;font-weight:700;padding:2px 9px;border-radius:var(--r-pill);white-space:nowrap}
.pill{font-size:10.5px;font-weight:700;padding:2px 9px;border-radius:var(--r-pill);display:inline-block}
.pill.done{background:var(--brand-weak);color:var(--brand-ink)}
.pill.active{background:var(--gold-weak);color:var(--gold-ink)}
.pill.future{background:var(--surface-2);color:var(--text-3)}
.pill.urgent{background:var(--danger);color:#fff}
.pill.important{background:var(--warn-weak);color:var(--gold-ink)}

/* 进度环 */
.ring{position:relative;width:92px;height:92px}
.ring svg{transform:rotate(-90deg)}
.ring .bg{fill:none;stroke:var(--surface-3);stroke-width:9}
.ring .fg{fill:none;stroke-width:9;stroke-linecap:round;transition:stroke-dashoffset 1.1s var(--ease)}
.ring .lbl{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.ring .lbl b{font-size:18px;font-weight:800}
.ring .lbl span{font-size:10px;color:var(--text-3)}

/* ============ 目标系统（ihour 风） ============ */
.goal-head{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:var(--s4);margin-bottom:var(--s5)}
.goal-hero{display:flex;align-items:center;gap:var(--s5);position:relative;
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-lg);padding:var(--s5);overflow:hidden}
.goal-hero .big-ring{width:128px;height:128px;position:relative}
.goal-hero .big-ring svg{transform:rotate(-90deg);width:100%;height:100%}
.goal-hero .big-ring .bg{fill:none;stroke:var(--surface-3);stroke-width:11}
.goal-hero .big-ring .fg{fill:none;stroke:var(--gold);stroke-width:11;stroke-linecap:round;
  transition:stroke-dashoffset 1.3s var(--ease)}
.goal-hero .big-ring .lbl{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.goal-hero .big-ring .lbl b{font-size:30px;font-weight:800;color:var(--gold)}
.goal-hero .big-ring .lbl span{font-size:11px;color:var(--text-3)}
.goal-hero .meta{flex:1;min-width:0;display:flex;flex-direction:column}
.goal-hero .meta h2{font-size:22px;font-weight:800}
.goal-hero .meta p{color:var(--text-2);margin-top:2px}
.goal-hero .meta .hr{display:grid;grid-template-columns:repeat(4,minmax(60px,1fr));gap:var(--s4);margin-top:var(--s3);width:100%}
.goal-hero .meta .hr div{min-width:0;text-align:left}
.goal-hero .meta .hr div b{font-size:18px;font-weight:800;display:block}
.goal-hero .meta .hr div span{font-size:11.5px;color:var(--text-3)}

.domain{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:var(--s5);
  position:relative;overflow:hidden}
.domain:hover{box-shadow:var(--sh-2);border-color:color-mix(in srgb,var(--brand) 26%,var(--border-strong))}
.domain .top{display:flex;align-items:center;gap:var(--s3);margin-bottom:var(--s4)}
.domain .d-ic{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:0 0 40px}
.domain .d-ic svg{width:21px;height:21px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.domain .d-name{font-weight:750;font-size:15px}
.domain .d-sub{font-size:11.5px;color:var(--text-3)}
.domain .ring{width:84px;height:84px;margin:0 auto var(--s3)}
.domain .d-foot{display:flex;justify-content:space-between;font-size:12px;color:var(--text-2);margin-top:var(--s2)}
.domain .d-foot b{color:var(--text);font-weight:700}
.domain .d-edit{position:absolute;top:var(--s4);right:var(--s4);color:var(--text-3);width:28px;height:28px;border-radius:8px;display:flex;align-items:center;justify-content:center}
.domain .d-edit:hover{background:var(--surface-2);color:var(--text)}
.milestones{display:flex;gap:6px;margin-top:var(--s4);flex-wrap:wrap}
.ms{font-size:10.5px;font-weight:650;padding:3px 9px;border-radius:var(--r-pill);background:var(--surface-2);color:var(--text-3);
  border:1px solid var(--border);cursor:pointer}
.ms.done{background:var(--brand-weak);color:var(--brand-ink);border-color:transparent}
.ms.active{background:var(--gold-weak);color:var(--gold-ink);border-color:transparent}

/* 成长路线图 时间轴 */
.roadmap{margin-top:var(--s6)}
.roadmap .axis{position:relative;padding-left:var(--s7)}
.roadmap .axis::before{content:"";position:absolute;left:11px;top:6px;bottom:6px;width:3px;
  background:linear-gradient(var(--gold),var(--border-strong));border-radius:var(--r-pill)}
.rm-node{position:relative;padding:0 0 var(--s5) var(--s2)}
@keyframes rise{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}
.rm-node .pin{position:absolute;left:-34px;top:2px;width:24px;height:24px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;border:3px solid var(--surface);box-shadow:var(--sh-1)}
.rm-node .pin svg{width:13px;height:13px;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.rm-node.done .pin{background:var(--brand)}
.rm-node.done .pin svg{stroke:#fff}
.rm-node.active .pin{background:var(--gold)}
.rm-node.active .pin svg{stroke:#fff}
@keyframes pulse{0%,100%{opacity:.55;transform:scale(1)}70%{opacity:0;transform:scale(1.7)}}
.rm-node.active .pin::before{content:"";position:absolute;inset:-5px;border-radius:50%;background:var(--gold);opacity:.55;animation:pulse 2s ease-out infinite;z-index:-1}
.rm-node.future .pin{background:var(--surface-3);border-color:var(--border-strong)}
.rm-node.future .pin svg{stroke:var(--text-3)}
.rm-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:var(--s4) var(--s5);
  transition:border-color var(--t-fast);cursor:pointer}
.rm-card:hover{box-shadow:var(--sh-1);border-color:var(--border-strong)}
.rm-card .when{font-size:11px;font-weight:800;letter-spacing:.5px;color:var(--text-3);text-transform:uppercase}
.rm-card h4{font-size:15px;font-weight:750;margin:3px 0 4px}
.rm-card p{font-size:13px;color:var(--text-2)}

/* 占位模块 */
.placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--s3);
  padding:var(--s8);color:var(--text-3);text-align:center;min-height:40vh}
.placeholder .ph-ic{width:64px;height:64px;border-radius:20px;background:var(--surface-2);display:flex;align-items:center;justify-content:center}
.placeholder .ph-ic svg{width:30px;height:30px;stroke:var(--text-3);fill:none;stroke-width:1.7}
.placeholder b{font-size:15px;color:var(--text-2)}

/* ============ 日历 ============ */
.cal-legend{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:var(--s4);font-size:12px;color:var(--text-2)}
.cal-legend .lg{display:inline-flex;align-items:center;gap:6px;font-weight:500}
.cal-legend .lg i{width:10px;height:10px;border-radius:3px;display:inline-block}

/* 筛选条（旧版保留，其它模块可能引用） */
.filter-row{display:flex;gap:12px;align-items:flex-start;margin-bottom:var(--s4)}
.filter-row .filter-chips{display:flex;flex-wrap:wrap;gap:10px;flex:1;align-items:center}
.filter-row .filter-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}

/* ===== 待办工具栏（新版） ===== */
.task-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;min-height:40px}
.task-tabs{display:flex;gap:4px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:4px;flex:1;max-width:fit-content}
.task-tabs button{padding:7px 12px;border-radius:9px;font-size:13px;font-weight:650;color:var(--text-2);transition:background var(--t-fast),color var(--t-fast);white-space:nowrap}
.task-tabs button.on{background:var(--surface);color:var(--brand);box-shadow:var(--sh-1)}
.task-view-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}

/* 更多操作菜单 */
.task-more-wrap{position:relative}
.task-more-btn{width:36px;height:36px;border-radius:10px;background:var(--surface-2);color:var(--text-2);display:flex;align-items:center;justify-content:center;transition:background var(--t-fast),color var(--t-fast)}
.task-more-btn:hover{background:var(--surface-3);color:var(--text)}
.task-more{position:absolute;right:0;top:calc(100% + 6px);z-index:25;min-width:160px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--sh-2);padding:6px;display:none;flex-direction:column;gap:2px}
.task-more.show{display:flex}
.task-more button{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:8px;font-size:13px;font-weight:600;color:var(--text-2);text-align:left;transition:background var(--t-fast),color var(--t-fast)}
.task-more button:hover{background:var(--surface-2);color:var(--text)}
.task-more button.on{color:var(--brand);background:var(--brand-weak)}
.task-more-sep{height:1px;background:var(--border);margin:4px 0}
.task-more-group{font-size:11px;font-weight:700;color:var(--text-3);padding:6px 12px 2px;letter-spacing:.5px}

/* 视图切换按钮 */
.task-view-seg{display:flex;gap:4px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:4px}
.task-view-seg button{width:36px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;color:var(--text-2);transition:background var(--t-fast),color var(--t-fast)}
.task-view-seg button.on{background:var(--surface);color:var(--brand);box-shadow:var(--sh-1)}
.task-view-seg button svg{width:18px;height:18px}

/* 筛选 pills：横向滚动，避免移动端换行堆叠 */
.filter-scroll{margin-bottom:12px;margin-right:-2px;padding:2px 0;overflow:hidden}
.filter-chips{display:flex;flex-wrap:nowrap;gap:8px;align-items:center;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:4px;scroll-padding-left:2px;scroll-snap-type:x mandatory}
.filter-chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--text-2);cursor:pointer;padding:7px 12px;border-radius:var(--r-pill);background:var(--surface-2);border:1px solid var(--border);white-space:nowrap;scroll-snap-align:start;transition:background var(--t-fast),border-color var(--t-fast),color var(--t-fast)}
.chip i{width:8px;height:8px;border-radius:50%;background:var(--border-strong)}
.chip b{font-weight:600}
.chip span{font-weight:700;color:var(--text-3);margin-left:2px}
.chip:hover{background:var(--surface-3)}
.chip.on{background:var(--brand-weak);border-color:transparent;color:var(--brand-ink)}
.chip.on i{background:var(--brand)}
.chip.on span{color:var(--brand-strong)}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}
.cal .wd{text-align:center;font-size:11.5px;font-weight:800;color:var(--text-3);padding:2px 0 8px}
.cal .cell{position:relative;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);
  padding:6px 7px;display:flex;flex-direction:column;gap:3px;min-height:112px;overflow:hidden;cursor:pointer;
  transition:box-shadow var(--t-fast),transform var(--t-fast),border-color var(--t-fast)}
.cal .cell:hover{box-shadow:var(--sh-1);border-color:var(--border-strong)}
.cal .cell .c-head{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-bottom:1px}
.cal .cell .num{font-size:13px;font-weight:700;color:var(--text);line-height:1.1}
.cal .cell .c-sub{font-size:10px;font-weight:600;color:var(--text-3);line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55%}
.cal .cell .c-sub.fest{color:var(--gold-ink);font-weight:700}
.cal .cell.weekend{background:color-mix(in srgb,var(--surface-3) 55%,var(--surface-2))}
.cal .cell.today{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-weak);background:color-mix(in srgb,var(--brand-weak) 50%,var(--surface-2))}
.cal .cell.today .num{color:var(--brand-strong)}
.cal .cell.empty{border-style:dashed;opacity:.45;background:transparent;cursor:default}
.cal .ev-list{display:flex;flex-direction:column;gap:3px;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}
.cal .ev{font-size:11px;font-weight:600;line-height:1.4;padding:3px 6px;border-radius:6px;color:var(--text);
  background:color-mix(in srgb,var(--c) 15%,var(--surface-2));border-left:3px solid var(--c);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:5px}
.cal .ev i{width:6px;height:6px;border-radius:50%;background:var(--c);flex:0 0 6px}
.cal .ev .ev-t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cal .ev.more{background:var(--surface-3);color:var(--text-2);text-align:center;cursor:pointer;border-left:none;justify-content:center;gap:0}
.cal .ev.more:hover{background:var(--border-strong)}
.cal .ev.more i{display:none}
@media(max-width:560px){.cal .cell{border-radius:8px;padding:4px 5px;min-height:90px}.cal .ev{font-size:10px;padding:3px 5px;border-radius:5px}.cal .cell .num{font-size:12px}.cal .cell .c-sub{font-size:9px}.cal .day-foot{margin-top:3px}.cal .day-prog{height:3px}}
.cal-top{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.cal-top .mo{font-weight:800;font-size:16px}
.mini{width:36px;height:36px;border-radius:8px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--text-2)}
.mini:hover{background:var(--surface-3);color:var(--text)}

/* 周视图 / 日视图 */
.cal-week{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;align-items:stretch}
.cal-week .wv-day{display:flex;flex-direction:column;gap:6px;min-width:0}
.cal-week .wv-hd{text-align:center;padding:8px 0;border-bottom:2px solid var(--border);font-size:13px;font-weight:700}
.cal-week .wv-hd small{display:block;font-size:11px;color:var(--text-3);font-weight:600}
.cal-week .wv-hd .wv-num{font-size:15px;display:block;margin-bottom:2px}
.cal-week .wv-hd .wv-num.today-num{color:var(--brand-strong)}
.cal-week .wv-col{flex:1;min-height:160px;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:8px;display:flex;flex-direction:column;gap:5px;cursor:pointer;transition:border-color var(--t-fast),box-shadow var(--t-fast)}
.cal-week .wv-col:hover{box-shadow:var(--sh-1);border-color:var(--border-strong)}
.cal-week .wv-col.today{background:color-mix(in srgb,var(--brand-weak) 45%,var(--surface-2));border-color:var(--brand)}
.cal-week .wv-col.is-empty{justify-content:center;align-items:center}
.cal-week .wv-empty{font-size:12px;color:var(--text-3);text-align:center}
.cal-week .ev{font-size:11px;font-weight:600;line-height:1.35;padding:4px 7px;border-radius:6px;color:#fff;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.cal-week .day-prog{height:4px;background:var(--surface-3);border-radius:999px;overflow:hidden;margin-top:auto}
.cal-week .day-prog i{display:block;height:100%;background:var(--brand);border-radius:999px}
.cal-day{display:flex;gap:10px;height:calc(100vh - 260px);min-height:360px}
.dv-axis{flex:0 0 48px;display:flex;flex-direction:column;font-size:11px;color:var(--text-3);text-align:right}
.dv-axis div{height:48px;line-height:1}
.dv-body{flex:1;position:relative;background:var(--surface-2);border:1px solid var(--border);border-radius:12px;overflow-y:auto}
.dv-event{position:absolute;left:8px;right:8px;height:44px;border-radius:8px;padding:6px 10px;color:#fff;font-size:12px;display:flex;flex-direction:column;justify-content:center;cursor:pointer;box-shadow:var(--sh-1)}
.dv-event b{font-weight:700;line-height:1.3}
.dv-event span{font-size:10px;opacity:.85}
.dv-event.habit{background:color-mix(in srgb,var(--hc) 22%,var(--surface-2));border:1px solid var(--hc);color:var(--text);box-shadow:none}
.dv-event.habit b{display:flex;align-items:center;gap:5px}
.dv-event.habit.done{opacity:.6}
.dv-event.habit.done b{text-decoration:line-through}

/* 月格习惯提醒标记 */
.habit-flag{display:inline-flex;align-items:center;gap:3px;margin-top:2px;padding:2px 6px;border-radius:999px;background:var(--brand-weak);color:var(--brand-ink);font-size:10px;font-weight:700;line-height:1}
.habit-flag i{width:6px;height:6px;border-radius:50%;background:var(--brand)}
.hg-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--brand)}

/* 日详情习惯段 */
.day-habit-hd{margin:16px 0 8px;font-size:12px;font-weight:800;color:var(--text-3);letter-spacing:.04em}
.sr .sm.ok{color:var(--ok,var(--brand));font-weight:700}

/* 年视图 */
.cal-year{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.cal-year .ym{border:1px solid var(--border);border-radius:12px;padding:12px;background:var(--surface-2)}
.cal-year .ym-hd{font-size:14px;font-weight:800;margin-bottom:8px;cursor:pointer;color:var(--text)}
.cal-year .ym-hd:hover{color:var(--brand-strong)}
.cal-year .ym-wd{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-bottom:4px}
.cal-year .ym-wd span{text-align:center;font-size:9px;font-weight:700;color:var(--text-3)}
.cal-year .ym-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.cal-year .ym-cell{position:relative;aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;border-radius:5px;font-size:11px;color:var(--text-2);cursor:pointer}
.cal-year .ym-cell:hover{background:var(--surface-3)}
.cal-year .ym-cell.empty{visibility:hidden;cursor:default}
.cal-year .ym-cell.today{background:var(--brand-weak);color:var(--brand-ink);font-weight:800}
.cal-year .ym-cell b{font-weight:600;line-height:1}
.cal-year .ym-dot{position:absolute;bottom:3px;left:50%;transform:translateX(-50%);width:5px;height:5px;border-radius:50%;background:var(--danger)}
.cal-year .ym-dot.habit{background:var(--brand)}
@media(max-width:820px){.cal-year{grid-template-columns:repeat(2,1fr);gap:12px}}
@media(max-width:560px){.cal-year .ym{padding:8px}.cal-year .ym-cell{font-size:10px}}
@media(max-width:820px){
  .cal-week{display:flex;gap:10px;overflow-x:auto;padding:4px 2px 16px;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory}
  .cal-week .wv-day{flex:0 0 152px;scroll-snap-align:start}
  .cal-week .wv-col{min-height:220px}
  .cal-day{height:auto;min-height:300px}
}
@media(max-width:560px){
  .cal-week .wv-day{flex:0 0 138px}
  .cal-week .wv-col{min-height:200px;padding:6px;gap:4px}
  .cal-week .wv-hd{padding:6px 0;font-size:12px}
  .cal-week .wv-hd .wv-num{font-size:14px}
  .cal-week .ev{font-size:10px;padding:3px 5px;border-radius:5px}
  .dv-event{left:4px;right:4px;padding:5px 8px}
}

/* ============ 习惯 ============ */
.week{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.day{background:var(--surface-2);border:1px solid var(--border);border-radius:14px;padding:12px 6px;text-align:center;
  transition:box-shadow var(--t-fast),transform var(--t-fast),border-color var(--t-fast);cursor:pointer}
.day:hover{box-shadow:var(--sh-1)}
.day .wd{font-weight:800;font-size:13px}
.day .dt{font-size:11px;color:var(--text-3);margin-bottom:10px}
.day .dots{display:flex;flex-direction:column;gap:5px;align-items:center}
.day .dots i{width:100%;max-width:28px;height:13px;border-radius:5px;display:block}
.day.done{border-color:var(--brand);background:color-mix(in srgb,var(--brand-weak) 45%,var(--surface-2))}
@media(max-width:560px){.week{gap:5px}.day{padding:9px 3px;border-radius:11px}.day .dots i{height:11px;max-width:22px}}

/* 习惯卡片（周打卡 + 今日按钮 + 热力） */
.habit-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:var(--s4);margin-bottom:var(--s3);transition:border-color var(--t-fast),box-shadow var(--t-fast);min-width:0;overflow:hidden}
.habit-card:hover{box-shadow:var(--sh-1);border-color:var(--border-strong)}
.habit-card .h-head{display:flex;align-items:center;gap:var(--s3);margin-bottom:var(--s3);min-width:0;flex-wrap:nowrap}
.habit-card .h-ic{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;flex:0 0 42px;font-size:24px;line-height:1}
.habit-card .h-ic svg{width:22px;height:22px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.habit-card .h-meta{flex:1;min-width:0}
.habit-card .h-name{font-weight:750;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.habit-card .h-sub{font-size:12px;color:var(--text-3);margin-top:1px}
.habit-card .h-today{flex:0 0 auto;width:76px;height:36px;border-radius:var(--r-pill);font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:center;gap:5px;cursor:pointer;transition:background var(--t-fast),transform var(--t-fast)}
.habit-card .h-today.done{background:var(--brand);color:#fff;box-shadow:var(--sh-brand)}
.habit-card .h-today.undone{background:var(--surface-2);border:1px solid var(--border);color:var(--text-2)}
.habit-card .h-today:active{transform:scale(.96)}
.habit-card .h-progress{font-size:12px;font-weight:700;color:var(--text-2);white-space:nowrap}
.habit-card .h-undo{height:34px;padding:0 10px;border:1px solid var(--border);border-radius:var(--r-pill);background:var(--surface-2);color:var(--text-2);font-weight:700}
.habit-card .h-today:disabled,.habit-card .h-undo:disabled{opacity:.45;cursor:not-allowed}
.habit-card .h-day small{font-size:9px;font-weight:700;line-height:1}
.h-time-row{display:flex;gap:8px;margin-bottom:8px}.h-time-row .input{max-width:160px}.h-time-row .mini{width:40px;height:40px}
.habit-card .h-week{display:flex;gap:6px;margin:var(--s3) 0;min-width:0}
.habit-card .h-day{flex:1;min-height:48px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:var(--text-3);background:var(--surface-2);border:1px solid var(--border);cursor:pointer;flex-direction:column;gap:2px;transition:background var(--t-fast),border-color var(--t-fast),color var(--t-fast);min-width:0}
.habit-card .h-day span{font-size:10px;font-weight:600;opacity:.8}
.habit-card .h-day.done{background:var(--brand);color:#fff;border-color:var(--brand)}
.habit-card .h-day.today{box-shadow:0 0 0 2px var(--brand-weak)}
.habit-card .h-foot{display:flex;align-items:center;gap:10px;margin-top:var(--s3);color:var(--text-3);font-size:12px;min-width:0}
.habit-card .h-heat{display:flex;gap:3px;flex:1;flex-wrap:wrap;min-width:0}
.habit-card .h-heat i{width:10px;height:10px;border-radius:2px;background:var(--surface-3);flex:0 0 auto}
.habit-card .h-heat i.on{background:var(--brand)}
@media(max-width:720px){
  .habit-card .h-head{flex-wrap:wrap}
  .habit-card .h-today{margin-left:auto}
}
@media(max-width:560px){
  .habit-card{padding:12px}
  .habit-card .h-head{margin-bottom:10px;gap:10px}
  .habit-card .h-ic{width:36px;height:36px;font-size:21px}
  .habit-card .h-ic svg{width:19px;height:19px}
  .habit-card .h-name{font-size:14px}
  .habit-card .h-today{width:64px;font-size:12px}
  .habit-card .h-day{min-height:42px;font-size:11px}
  .habit-card .h-heat i{width:8px;height:8px}
}
@media(max-width:420px){
  .habit-card .h-progress{font-size:11px}
  .habit-card .h-undo{height:30px;padding:0 8px;font-size:11px}
  .habit-card .h-head{gap:8px}
  .habit-card .h-ic{width:32px;height:32px;font-size:19px}
  .habit-card .h-today{width:58px;height:30px;font-size:11px}
  .habit-card .h-week{gap:4px}
  .habit-card .h-day{min-height:36px;font-size:10px;border-radius:8px}
  .habit-card .h-day span{font-size:9px}
  .habit-card .h-foot{font-size:11px}
  .habit-card .h-heat i{width:7px;height:7px;border-radius:1.5px}
}

/* 习惯行（70 天热力 + 周视图）- 保留旧结构，供旧数据/兼容使用 */
.habit-row{display:grid;grid-template-columns:1.6fr repeat(7,1fr);gap:6px;align-items:center;background:var(--surface);
  border:1px solid var(--border);border-radius:var(--r);padding:12px;margin-bottom:var(--s3)}
.habit-row .hname{display:flex;align-items:center;gap:10px;min-width:0}
.hic{width:34px;height:34px;border-radius:9px;flex:none;display:flex;align-items:center;justify-content:center}
.hic svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.habit-row .hn{font-weight:700;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.habit-row .hs{font-size:11px;color:var(--text-3)}
.hcell{aspect-ratio:1/1;border-radius:8px;border:2px solid var(--border);display:flex;align-items:center;justify-content:center;cursor:pointer;background:var(--surface-2)}
.hcell.done{background:var(--success);border-color:var(--success)}
.hcell.done svg{stroke:#fff;display:block}
.hcell svg{stroke:var(--success);width:16px;height:16px;display:none}
.heat{display:grid;grid-template-columns:repeat(auto-fill,minmax(13px,1fr));gap:3px;margin-top:8px}
.heat i{aspect-ratio:1;width:100%;border-radius:3px;display:block;background:var(--surface-3)}
.heat i.on{background:var(--brand)}
.heat i.on2{background:color-mix(in srgb,var(--brand) 55%,var(--surface-3))}

/* 顶栏头像 + 通知点 */
.avatar{width:38px;height:38px;border-radius:50%;background:var(--brand-strong);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px;box-shadow:var(--sh-1);flex:0 0 38px;cursor:pointer}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px;border-radius:6px}
.card.stat{cursor:default}
.card.stat:hover{box-shadow:var(--sh-1)}

/* 列表/任务项 */
.addbar{display:flex;gap:10px;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:6px 10px 6px 14px;margin-bottom:16px}
.addbar input{border:none;padding:10px 0;background:transparent;color:var(--text);font-size:14px;outline:none;flex:1}
.addbar .mini{width:38px;height:38px}
.addbar .quick-add-list{flex:0 0 auto;padding:6px 10px;white-space:nowrap}
#sec-tasks #openTask{white-space:nowrap;flex-shrink:0}



.task-list{display:flex;flex-direction:column;gap:8px}
.task-group .sec-head{position:sticky;top:calc(var(--topbar-h) + 4px);z-index:10;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(6px);display:flex;align-items:center;gap:10px;padding:10px 2px;margin:0 -2px;font-weight:800;font-size:13px;color:var(--text-2)}
.task{display:flex;align-items:flex-start;gap:12px;padding:13px 14px;border:1px solid var(--border);border-left:3px solid transparent;border-radius:var(--r);margin-bottom:0;background:var(--surface);position:relative;transition:border-color var(--t-fast),box-shadow var(--t-fast)}
.task:hover{box-shadow:var(--sh-1)}
.task.over{border-left-color:var(--danger);background:color-mix(in srgb,var(--danger-weak) 40%,var(--surface))}
.task .tmain{flex:1;min-width:0;min-height:28px}
.task .tmain .t{font-weight:600;line-height:1.45}
.task .tmain .t.done{text-decoration:line-through;color:var(--text-3)}
.task .tmain .m{font-size:12px;color:var(--text-3);margin-top:6px;display:flex;gap:6px;align-items:center;flex-wrap:wrap;line-height:1.4}
.task .tmain .m .date{font-variant-numeric:tabular-nums}
.task .tmain .m .note-mark{font-size:11px;font-weight:600;background:var(--accent-weak);color:var(--accent-strong);padding:2px 7px;border-radius:var(--r-pill)}
.task .tmain .m .sub-pill,.task .tmain .m .proj-pill{font-size:11px;font-weight:700;background:var(--surface-3);color:var(--text-2);padding:2px 7px;border-radius:var(--r-pill)}
.task .tact{display:flex;gap:4px;flex:0 0 auto;align-self:flex-start}
.task .tact button{width:38px;height:38px;border-radius:9px;display:flex;align-items:center;justify-content:center;color:var(--text-3);background:var(--surface-2);transition:background var(--t-fast),color var(--t-fast)}
.task .tact button:hover{background:var(--surface-3);color:var(--text)}
.task .tact button svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sec-head{display:flex;align-items:center;gap:10px;margin:18px 2px 8px;font-weight:800;font-size:13px;color:var(--text-2)}
.empty{color:var(--text-3);font-size:13px;text-align:center;padding:30px 0;display:flex;flex-direction:column;align-items:center;gap:8px}
.empty::before{content:"🌱";font-size:22px;line-height:1;opacity:.65}

/* 已完成折叠 */
.done-box{margin-top:6px;padding-top:6px;border-top:1px dashed var(--border)}
.done-toggle{display:flex;align-items:center;gap:8px;width:100%;padding:10px 4px;font-size:13px;font-weight:700;color:var(--text-2);text-align:left}
.done-toggle span:first-child{flex:1}
.done-toggle .ct{font-size:12px;font-weight:800;background:var(--surface-2);color:var(--text-2);padding:2px 8px;border-radius:var(--r-pill)}
.done-toggle svg{width:18px;height:18px;transition:transform var(--t-fast)}
.done-list{display:none;padding:4px 0}
.done-list.show{display:block}
.done-list .task{opacity:.85}
.done-list .task .tmain .t{text-decoration:line-through;color:var(--text-3)}

/* 笔记 / 物品 */
.notes-bar{display:flex;gap:10px;align-items:center;margin-bottom:14px;flex-wrap:wrap}
.notes-bar.search-bar{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-pill);padding:5px 6px 5px 14px;flex-wrap:nowrap}
.notes-bar.search-bar svg{width:18px;height:18px;stroke:var(--text-3);fill:none;stroke-width:2}
.notes-bar.search-bar input{flex:1;min-width:120px;border:none;background:transparent;outline:none;color:var(--text);font-size:14px;padding:8px 0}
.notes-bar.search-bar input::placeholder{color:var(--text-3)}
.notes-bar.search-bar button{border-radius:var(--r-pill);padding:8px 16px}
.ncard{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:13px 14px;margin-bottom:var(--s3);cursor:pointer;transition:border-color var(--t-fast)}
.ncard:hover{border-color:var(--brand)}
.ncard .nt{font-weight:700;font-size:15px;display:flex;align-items:center;gap:8px}
.ncard .ns{font-size:13px;color:var(--text-3);margin-top:5px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.ncard .nm2{font-size:11px;color:var(--text-3);margin-top:7px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.igrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.icard{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);overflow:hidden;cursor:pointer;transition:border-color var(--t-fast)}
.icard:hover{border-color:var(--brand)}
.icard .ph{width:100%;aspect-ratio:4/3;background:var(--surface-2);display:flex;align-items:center;justify-content:center}
.icard .ph svg{width:40px;height:40px;stroke:var(--text-3);fill:none;stroke-width:1.6}
.icard .ph img{width:100%;height:100%;object-fit:cover}
.icard .info{padding:10px 11px}
.icard .in{font-weight:700;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.icard .im{font-size:12px;color:var(--text-3);margin-top:3px}
.icard .ip{font-size:13px;color:var(--success);font-weight:700;margin-top:4px}

/* 成就 */
.badges{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
.badge-c{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:14px;text-align:center}
.badge-c.locked{opacity:.5;filter:grayscale(1)}
.badge-c .bi{width:46px;height:46px;margin:0 auto 8px;border-radius:50%;background:var(--brand-weak);display:flex;align-items:center;justify-content:center}
.badge-c.locked .bi{background:var(--surface-2)}
.badge-c .bi svg{stroke:var(--brand);width:24px;height:24px;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.badge-c.locked .bi svg{stroke:var(--text-3)}
.badge-c .bn{font-weight:700;font-size:13px}
.badge-c .bd{font-size:11px;color:var(--text-3);margin-top:3px}

/* AI */
.ai-wrap{display:flex;flex-direction:column;height:calc(100vh - 170px);min-height:440px}
.ai-cfg{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);margin-bottom:12px;overflow:hidden}
.ai-cfg-head{display:flex;justify-content:space-between;align-items:center;padding:13px 16px;cursor:pointer;font-weight:600;font-size:14px}
.ai-cfg-body{padding:0 16px 16px}
.ai-tip{font-size:12px;color:var(--text-2);background:var(--surface-2);border:1px dashed var(--border);border-radius:8px;padding:8px 10px;margin:4px 0 10px;line-height:1.5}
.ai-cfg-toggle{font-size:11px;font-weight:600;padding:3px 10px;border-radius:999px;background:var(--surface-2);color:var(--text-3);transition:all var(--t-fast)}
.ai-cfg-toggle.on{background:var(--brand);color:#fff}
.ai-history-field{margin-bottom:10px}
.ai-history-row{align-items:flex-end}
.ai-history-row select{flex:1 1 auto}
.ai-history-row button{flex:0 0 auto;white-space:nowrap}
.cfg-actions{display:flex;gap:8px;align-items:center;margin-top:2px}
#aiSaveCfg.saved{background:var(--success);pointer-events:none}
.cfg-hint{font-size:12px;line-height:1.6;border-radius:8px;padding:8px 10px;margin:8px 0 2px;min-height:20px}
.cfg-hint.info{color:var(--text-2);background:var(--surface-2)}
.cfg-hint.ok{color:var(--success);background:var(--success-weak)}
.cfg-hint.warn{color:#b45309;background:#fef3c7}
.cfg-hint.err{color:var(--danger);background:#fee2e2}
[data-theme="dark"] .cfg-hint.warn{color:#fbbf24;background:#451a03}
[data-theme="dark"] .cfg-hint.err{color:#fca5a5;background:#450a0a}
.ai-msgs{flex:1;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:6px 2px}
.ai-empty{color:var(--text-3);font-size:14px;line-height:1.7;text-align:center;margin:auto;padding:20px}
.ai-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:16px;margin-bottom:13px}
.ai-card h4{margin:0 0 10px;font-size:15px;display:flex;align-items:center;gap:8px}
.msg{max-width:86%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.55;white-space:pre-wrap;word-break:break-word}
.msg .role{font-size:11px;opacity:.6;margin-bottom:4px}
.msg.user{align-self:flex-end;background:var(--brand);color:#fff;border-bottom-right-radius:4px}
.msg.ai{align-self:flex-start;background:var(--surface-2);color:var(--text);border-bottom-left-radius:4px}
.ai-input{display:flex;gap:8px;padding-top:10px;border-top:1px solid var(--border);margin-top:4px;align-items:flex-end}
.ai-input textarea{flex:1;resize:none;height:48px;max-height:120px;padding:12px;font-size:14px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);font-family:inherit}
.ai-btns{display:flex;flex-direction:column;gap:6px}

/* 通知设置 */
.nset{display:flex;flex-direction:column;gap:14px}
.nset .row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.nset .row .lab{font-weight:600}
.nset .row .sub{font-size:12px;color:var(--text-3);margin-top:2px}
.switch{position:relative;width:44px;height:26px;flex:none}
.switch input{display:none}
.switch .sl{position:absolute;inset:0;background:var(--border-strong);border-radius:20px;transition:.2s}
.switch .sl:before{content:"";position:absolute;width:20px;height:20px;background:#fff;border-radius:50%;top:3px;left:3px;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.switch input:checked+.sl{background:var(--brand)}
.switch input:checked+.sl:before{transform:translateX(18px)}
.nitem{display:flex;gap:11px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);margin-bottom:var(--s3);align-items:flex-start;cursor:pointer}
.nitem.unread{border-color:var(--brand);background:color-mix(in srgb,var(--brand-weak) 35%,var(--surface))}
.nbadge{width:32px;height:32px;border-radius:8px;flex:none;display:flex;align-items:center;justify-content:center;background:var(--brand-weak)}
.nbadge svg{stroke:var(--brand-ink);fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.nmain{flex:1;min-width:0}.nmain .nt{font-weight:600;font-size:14px}.nmain .nm{font-size:12px;color:var(--text-3);margin-top:3px}

/* 计时器浮层 */
.timer-fab{position:fixed;right:20px;bottom:calc(96px + env(safe-area-inset-bottom));z-index:45;
  width:56px;height:56px;border-radius:50%;background:var(--brand);color:#fff;box-shadow:var(--sh-brand);
  display:flex;align-items:center;justify-content:center}
.timer-fab svg{width:26px;height:26px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.timer-panel{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:75;width:min(420px,92vw);
  background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--sh-3);padding:var(--s6);display:none}
.timer-panel.show{display:block}
.timer-panel .tp-time{font-size:48px;font-weight:800;text-align:center;letter-spacing:1px;font-variant-numeric:tabular-nums}
.timer-panel .tp-row{display:flex;gap:10px;margin:var(--s4) 0}
.timer-panel .tp-row>*{flex:1}
.timer-panel select.input{margin-bottom:var(--s3)}

/* modal */
.mask{position:fixed;inset:0;background:rgba(15,23,42,.45);display:none;align-items:center;justify-content:center;z-index:70;padding:16px}
.mask.show{display:flex}
.modal{background:var(--surface);border-radius:16px;padding:20px;width:100%;max-width:440px;box-shadow:0 20px 50px rgba(0,0,0,.25);max-height:90vh;overflow:auto}
.modal h3{margin:0;font-size:18px}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}
.modal-head .icon-btn{width:32px;height:32px;border-radius:8px;color:var(--text-2)}
.modal-head .icon-btn:hover{background:var(--surface-2);color:var(--text)}
.modal .acts{display:flex;gap:10px;justify-content:flex-end;margin-top:16px}
.modal .acts .btn{flex:1;justify-content:center}
.modal:has(.task-modal-shell){max-width:620px;padding:0;overflow:hidden;display:flex;max-height:min(88dvh,760px)}
.task-modal-shell{display:flex;flex:1;min-height:0;flex-direction:column}
.task-modal-head{flex:0 0 auto;margin:0;padding:18px 20px 15px;border-bottom:1px solid var(--border)}
.task-modal-head h3{margin:0}
.task-modal-body{min-height:0;overflow-y:auto;padding:18px 20px 8px;-webkit-overflow-scrolling:touch}
.task-title-field{margin-bottom:18px}.task-title-field .input{font-size:16px;padding:12px 13px}
.task-form-section{padding:16px 0;border-top:1px solid var(--border)}
.task-form-section h4{margin:0 0 12px;font-size:14px;font-weight:750;color:var(--text)}
.task-form-grid{gap:12px}.task-form-grid .field{margin-bottom:0}
.task-reminder{display:flex;align-items:center;justify-content:space-between;gap:16px}
.task-reminder h4{margin-bottom:3px}.task-reminder p{margin:0;color:var(--text-3);font-size:12.5px;line-height:1.5}
.task-more-section{padding-bottom:8px}.task-more-section h4{margin-bottom:7px}
.task-form-more{border-bottom:1px solid var(--border)}
.task-form-more summary{display:flex;align-items:center;min-height:44px;cursor:pointer;color:var(--text-2);font-size:14px;font-weight:650;list-style:none}
.task-form-more summary::-webkit-details-marker{display:none}
.task-form-more[open] summary{color:var(--text)}
.task-more-body{padding:2px 0 14px}.task-more-body .field:last-child{margin-bottom:0}
.task-sub-add{display:flex;gap:8px;margin-top:8px}.task-sub-add .input{min-width:0;flex:1}
.task-ai-break{margin-top:10px}.task-more-body #taskPhotoPrev img{display:block;max-width:100%;max-height:180px;border-radius:10px;margin-bottom:8px}
.task-more-body input[type="file"]{font-size:14px;max-width:100%}
.task-modal-footer{flex:0 0 auto;margin:0!important;padding:14px 20px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--surface)}
.search-res{margin-top:10px;max-height:48vh;overflow:auto}
.sr{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--border);border-radius:9px;margin-bottom:7px;cursor:pointer}
.sr:hover{background:var(--surface-2)}
.sr .st{font-weight:600;flex:1}
.sr .sm{font-size:12px;color:var(--text-3)}

/* 横幅 */
.banner{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:10px 13px;margin-bottom:14px;font-size:13px;display:flex;align-items:center;gap:10px;justify-content:space-between;color:var(--text-2)}
.tip{font-size:12.5px;color:var(--text-3);margin-top:var(--s4);line-height:1.6}

/* 移动端 */
.bottom-tab{display:none}
.modal-open .bottom-tab{display:none !important}
@media(max-width:820px){
  .sidebar{position:fixed;left:0;top:0;transform:translateX(-100%);width:84vw;max-width:320px;
    height:100dvh;z-index:60;padding-top:env(safe-area-inset-top);box-shadow:var(--sh-3);
    transition:transform var(--t) var(--ease)}
  .sidebar.open{transform:none}
  .hamb{display:flex}
  .topbar{height:auto;min-height:var(--topbar-h);
    padding:calc(env(safe-area-inset-top) + 4px) var(--s4) 4px;gap:var(--s2)}
  .search{display:none}
  .content{padding:var(--s4);padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  .scrim{position:fixed;inset:0;background:rgba(10,12,16,.45);z-index:55;display:none}
  .scrim.show{display:block}
  .bottom-tab{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:50;
    background:color-mix(in srgb,var(--surface) 96%,transparent);backdrop-filter:blur(12px);
    border-top:1px solid var(--border);padding:6px 4px calc(6px + env(safe-area-inset-bottom));
    gap:2px;justify-content:space-around}
  .bottom-tab button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--text-3);
    font-size:10.5px;font-weight:600;padding:7px 2px;border-radius:14px;min-height:46px;
    transition:background var(--t-fast),color var(--t-fast)}
  .bottom-tab button.active{color:var(--brand);background:color-mix(in srgb,var(--brand) 12%,transparent)}
  .bottom-tab button .bi{font-size:22px;line-height:1;display:block}
}
@media(max-width:560px){
  .content{padding:var(--s3) var(--s3) calc(88px + env(safe-area-inset-bottom))}
  .card,.domain{padding:var(--s4)}
  .hero{padding:var(--s5);flex-direction:column;align-items:flex-start;gap:var(--s4)}
  .hero .date{flex-direction:row;gap:8px;align-items:baseline;padding:7px 12px;min-width:auto}
  .hero .date b{font-size:26px}
  .date-weather-card{width:100%;flex-direction:row;align-items:center;justify-content:space-between;text-align:left;padding:12px 14px;gap:12px}
  .date-weather-card .dw-main{flex-direction:column;gap:1px}
  .date-weather-card .dw-day{font-size:30px}
  .date-weather-card .dw-weather{border-top:none;border-left:1px dashed var(--border);padding-top:0;padding-left:12px;margin-top:0}
  .quote-card{padding:26px 20px}
  .quote-card .q-txt{font-size:19px}
  .goal-head{justify-content:center;text-align:center;gap:var(--s3)}
  .goal-hero{flex-direction:column;align-items:center;text-align:center;gap:var(--s3);padding:var(--s4);width:100%}
  .goal-hero .big-ring{width:84px;height:84px}
  .goal-hero .big-ring .lbl b{font-size:20px}
  .goal-hero .big-ring .lbl span{font-size:9.5px}
  .goal-hero .meta{align-items:center;width:100%}
  .goal-hero .meta h2{font-size:18px}
  .goal-hero .meta p{font-size:12.5px;color:var(--text-2);max-width:280px;margin:2px auto 0;line-height:1.5}
  .goal-hero .meta .hr{grid-template-columns:repeat(2,1fr);gap:var(--s3);width:100%;max-width:100%}
  .goal-hero .meta .hr div{text-align:center}
  .goal-hero .meta .hr div b{font-size:15px}
  .goal-hero .meta .hr div span{font-size:10.5px}
  .goal-head>div:last-child{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}
  .goal-head>div:last-child .btn{flex:none;max-width:none;justify-content:center}
  .stat .v{font-size:25px}
  .roadmap .axis{padding-left:var(--s6)}
  .rm-node .pin{left:-30px}
}
@media(max-width:820px){
  .bottom-tab button{position:relative;min-height:50px}
  .bottom-tab button::after{content:"";position:absolute;top:3px;left:50%;transform:translateX(-50%) scaleX(.6);
    width:20px;height:3px;border-radius:3px;background:var(--brand);opacity:0;
    transition:opacity .2s var(--ease),transform .2s var(--ease)}
  .bottom-tab button.active::after{opacity:1;transform:translateX(-50%) scaleX(1)}
}

/* 外观切换器 */
.seg{display:flex;gap:6px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:4px}
.seg button{flex:1;padding:8px;border-radius:9px;font-weight:600;color:var(--text-2);transition:background var(--t-fast),color var(--t-fast)}
.seg button.on{background:var(--surface);color:var(--brand);box-shadow:var(--sh-1)}
.acc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:2px}
.acc-dot{display:flex;flex-direction:column;align-items:center;gap:6px;padding:9px 4px;border-radius:var(--r-sm);border:1px solid var(--border);color:var(--text-2);font-size:12px;font-weight:600;transition:border-color var(--t-fast),color var(--t-fast)}
.acc-dot span{width:26px;height:26px;border-radius:50%;box-shadow:var(--sh-1)}
.acc-dot.on{border-color:var(--brand);color:var(--brand)}

/* 批量导出：内容勾选 */
.exp-checks{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:2px}
.exp-chk{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--text);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:9px 12px;cursor:pointer;transition:border-color var(--t-fast),background var(--t-fast)}
.exp-chk:hover{border-color:var(--brand)}
.exp-chk input{width:16px;height:16px;accent-color:var(--brand);cursor:pointer}
@keyframes spin{to{transform:rotate(360deg)}}
.spin{animation:spin 1s linear infinite}

/* ===== 任务看板视图 ===== */
.kb{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 12px}
.kb-col{flex:0 0 264px;min-width:264px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:10px;display:flex;flex-direction:column;gap:10px}
.kb-col .kb-h{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:700;color:var(--text-2);padding:2px 2px 6px}
.kb-col .task{margin:0}

/* ===== 子任务 ===== */
.check.sm{width:20px;height:20px;flex:0 0 20px;border-width:1.6px}
.check.sm svg{width:13px;height:13px}
.sub-bar{height:4px;background:var(--surface-3);border-radius:3px;overflow:hidden;margin-top:7px}
.sub-bar i{display:block;height:100%;background:var(--brand);border-radius:3px;transition:width var(--t-normal)}
.sub-row .check{cursor:pointer}
.sub-row .sub-text{border-color:var(--border)}

/* ===== 成长技能树 ===== */
.skill-tree{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px;padding:4px 2px}
.st-branch{display:flex;flex-direction:column;gap:10px}
.st-root{margin-bottom:2px}
.st-children{display:flex;flex-direction:column;gap:10px;padding-left:16px;border-left:2px solid var(--border-strong)}
.st-node{display:flex;align-items:center;gap:9px;padding:9px 11px;border:1px solid var(--border);border-radius:11px;background:var(--surface)}
.st-node.root{border-color:var(--brand);background:color-mix(in srgb,var(--brand) 8%,var(--surface))}
.st-node.locked{opacity:.55}
.st-node .bi{width:30px;height:30px;flex:0 0 30px;border-radius:8px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--brand)}
.st-node.locked .bi{color:var(--text-3)}
.st-node .st-t{display:flex;flex-direction:column;flex:1;min-width:0}
.st-node .st-t b{font-size:13.5px;font-weight:700}
.st-node .st-t i{font-size:11.5px;color:var(--text-3);font-style:normal;margin-top:1px}
.st-node .st-on{color:var(--success);display:flex}
.st-node .st-lock{font-size:13px;opacity:.7}

/* ===== 游戏化：等级环（仪表盘 / 成就，参考目标模块 goal-hero） ===== */
.lvl-band{padding:0;overflow:hidden}
.lvl-hero{display:flex;align-items:center;gap:var(--s5);position:relative;background:var(--surface);border-radius:var(--r-lg);padding:var(--s5);overflow:hidden}
.lvl-hero .big-ring{width:128px;height:128px;position:relative;flex:0 0 128px}
.lvl-hero .big-ring svg{transform:rotate(-90deg);width:100%;height:100%}
.lvl-hero .big-ring .bg{fill:none;stroke:var(--surface-3);stroke-width:11}
.lvl-hero .big-ring .fg{fill:none;stroke:var(--gold);stroke-width:11;stroke-linecap:round;transition:stroke-dashoffset 1.3s var(--ease)}
.lvl-hero .big-ring .lbl{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.lvl-hero .big-ring .lbl b{font-size:30px;font-weight:800;color:var(--gold)}
.lvl-hero .big-ring .lbl span{font-size:11px;color:var(--text-3)}
.lvl-hero .meta{flex:1;min-width:0;display:flex;flex-direction:column}
.lvl-hero .meta h2{font-size:22px;font-weight:800}
.lvl-hero .meta p{color:var(--text-2);margin-top:2px}
.lvl-hero .meta .hr{display:grid;grid-template-columns:repeat(4,minmax(60px,1fr));gap:var(--s4);margin-top:var(--s3);width:100%}
.lvl-hero .meta .hr div{min-width:0;text-align:left}
.lvl-hero .meta .hr div b{font-size:18px;font-weight:800;display:block}
.lvl-hero .meta .hr div span{font-size:11.5px;color:var(--text-3)}
#sec-achv .lvl-hero .big-ring .fg{stroke:var(--brand)}
#sec-achv .lvl-hero .big-ring .lbl b{color:var(--brand)}

/* ===== 日历任务进度条 ===== */
.day-foot{display:flex;align-items:center;gap:6px;margin-top:5px}
.day-prog{flex:1;height:4px;background:var(--surface-3);border-radius:999px;overflow:hidden}
.day-prog i{display:block;height:100%;background:var(--brand);border-radius:999px;transition:width .4s var(--ease)}
.day-prog-t{font-size:10px;color:var(--text-3);white-space:nowrap}
.wv-col .day-prog{margin-top:8px}

/* ===== 项目层级（待办） ===== */
.d-goals{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.g-pill{font-size:11px;padding:2px 8px;border-radius:999px;background:var(--surface-3);color:var(--text-2);border:1px solid var(--border)}
.goal-edit-pill{display:inline-flex;align-items:center;max-width:100%;font-family:inherit;text-align:left;line-height:1.35;cursor:pointer}
.goal-edit-pill::after{content:"✎";flex:0 0 auto;margin-left:5px;color:currentColor;opacity:.65;font-size:10px}
.goal-edit-pill:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.g-pill.done{background:var(--success-weak);color:var(--success)}
.g-pill.active{background:var(--brand-weak);color:var(--brand-ink)}
.g-pill.future{background:var(--surface-3);color:var(--text-3)}

/* ===== 目标时间轴（年/季/月/周） ===== */
.scope-axis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:var(--s3)}
.scope-col{background:var(--surface-2);border:1px solid var(--border);border-radius:12px;padding:10px;min-width:0}
.scope-h{font-size:13px;font-weight:700;color:var(--gold);margin-bottom:8px;padding-bottom:6px;border-bottom:1px dashed var(--border)}
.scope-card{background:var(--bg);border:1px solid var(--border);border-left:3px solid var(--brand);border-radius:8px;padding:8px 10px;margin-bottom:8px}
.scope-card.done{border-left-color:var(--success)}
.scope-card.future{border-left-color:var(--text-3);opacity:.7}
.scope-card .sc-top{display:flex;justify-content:space-between;gap:6px;align-items:baseline}
.scope-card .sc-top b{font-size:13px;color:var(--text);font-weight:600}
.scope-card .sc-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.scope-card .scope-edit-goal{border:0;background:none;color:var(--brand-ink);font:inherit;font-size:11px;font-weight:700;cursor:pointer}
.scope-card .scope-edit-goal:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.scope-card .sc-top span{font-size:10px;color:var(--text-3);white-space:nowrap}
.scope-card .sc-sub{font-size:11px;color:var(--text-3);margin-top:3px}
.scope-empty{font-size:12px;color:var(--text-3);text-align:center;padding:14px 0}
@media(max-width:680px){.scope-axis{grid-template-columns:repeat(2,1fr)}}

/* ===== 移动端全面优化（<=820px） ===== */
@media(max-width:820px){
  /* 更紧凑的卡片 */
  .card,.domain{padding:14px}
  .card-h{margin-bottom:12px}
  .card-h h3{font-size:15px}

  /* 仪表盘 hero 压缩 */
  .hero{padding:18px 16px;gap:14px}
  .hero h2{font-size:clamp(18px,5vw,22px)}
  .hero p{font-size:13px;line-height:1.5}
  .hero .date{padding:8px 12px}
  .hero .date b{font-size:24px}
  .daily-quote{margin-top:8px}
  .daily-quote .q-txt{font-size:12.5px}

  /* 统计卡片紧凑 */
  .stat .v{font-size:24px}
  .stat .ic{width:32px;height:32px}
  .stat .ic svg{width:17px;height:17px}

  /* 目标页 hero 在中等宽度垂直堆叠 */
  .goal-hero{flex-direction:column;align-items:center;text-align:center;gap:var(--s4)}
  .goal-hero .big-ring{width:108px;height:108px}
  .goal-hero .meta{align-items:center;width:100%}
  .goal-hero .meta .hr{grid-template-columns:repeat(4,minmax(60px,1fr));gap:var(--s3);width:100%;max-width:420px}
  .goal-hero .meta .hr div{text-align:center}

  /* 等级区：参考目标模块居中堆叠 */
  .lvl-hero{flex-direction:column;align-items:center;text-align:center;gap:var(--s4);padding:var(--s4)}
  .lvl-hero .big-ring{width:108px;height:108px;flex:0 0 108px}
  .lvl-hero .meta{align-items:center;width:100%}
  .lvl-hero .meta .hr{grid-template-columns:repeat(4,minmax(60px,1fr));gap:var(--s3);width:100%;max-width:420px}
  .lvl-hero .meta .hr div{text-align:center}

  /* 今日习惯打卡卡片： ring 与列表垂直堆叠 */
  .habit-focus{display:flex;gap:var(--s4);align-items:center}
  .habit-focus .ring{flex:0 0 auto}
  .habit-focus>div{flex:1;min-width:0}
  .habit-focus{flex-direction:column;align-items:flex-start;gap:8px}
  .habit-focus .ring{margin:0 auto 6px}

  /* 待办工具栏：移动端保持水平，tab 可滚动 */
  .task-toolbar{flex-wrap:nowrap;gap:8px;margin-bottom:8px;overflow:hidden}
  .task-tabs{flex:1;min-width:0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;gap:2px;padding:3px;border-radius:10px}
  .task-tabs::-webkit-scrollbar{display:none}
  .task-tabs button{flex:0 0 auto;padding:7px 12px}
  .task-view-actions{flex-shrink:0;gap:6px}
  .task-view-seg button{width:34px;height:32px}
  .task-more-btn{width:34px;height:34px}
  .filter-scroll{margin-bottom:8px}
  .filter-chips{gap:6px}
  .chip{padding:6px 11px;font-size:12.5px}
  .timer-fab{bottom:calc(112px + env(safe-area-inset-bottom));right:14px;width:48px;height:48px}
  .timer-fab svg{width:22px;height:22px}

  /* 任务行：更大点击区，元信息更紧凑 */
  .task{padding:12px;gap:10px;align-items:flex-start}
  .task .check{margin-top:2px}
  .task .tmain .t{font-size:14px;line-height:1.45;word-break:break-word}
  .task .tmain .m{gap:5px;margin-top:5px}
  .task .tmain .m .pill{font-size:10.5px;padding:2px 7px}
  .task .tact{gap:2px;align-self:flex-start}
  .task .tact button{width:40px;height:40px;border-radius:10px}
  .task .tact button svg{width:19px;height:19px}
  .task-group .sec-head{top:calc(var(--topbar-h) + 2px);padding:8px 2px;font-size:12.5px}
  .done-toggle{padding:9px 2px}
  .done-list .task{padding:10px 12px}

  /* addbar */
  .addbar{padding:5px 6px 5px 12px}
  .addbar .mini{width:34px;height:34px}

  /* 弹窗适配 */
  .modal{padding:16px;border-radius:14px}
  .modal h3{font-size:16px;margin-bottom:12px}
  .modal .acts{margin-top:12px}
  .modal .acts .btn{padding:8px 12px;font-size:13px}

  /* 表单紧凑 */
  .field{margin-bottom:10px}
  .field label{font-size:12px;margin-bottom:4px}
  .input{padding:8px 11px;font-size:14px}
  .row2{flex-direction:column;gap:10px}
  textarea.input{min-height:64px}

  /* 目标页 */
  .goal-hero{padding:16px;gap:14px}
  .goal-hero .big-ring{width:104px;height:104px}
  .goal-hero .meta h2{font-size:18px}
  .goal-hero .meta .hr div b{font-size:15px}

  /* AI 配置 */
  .ai-cfg-head{padding:11px 14px}
  .ai-cfg-body{padding:0 14px 14px}
  .cfg-actions{flex-wrap:wrap}
  .cfg-actions .btn{flex:1;justify-content:center;min-width:0}
  .ai-history-row{flex-direction:column;align-items:stretch;gap:8px}
  .ai-history-row button{align-self:flex-end}

  /* 记账 */
  .lstats{gap:8px}
  .lstat{padding:11px}
  .lstat-v{font-size:17px}
  .lstat-k{font-size:11px}
  .txn{padding:9px 12px;gap:10px}
  .txn-ic{width:36px;height:36px;font-size:18px}
  .txn-type{font-size:13px}
  .txn-amt{font-size:15px}

  /* 底部导航 */
  .bottom-tab{padding:5px 2px calc(5px + env(safe-area-inset-bottom));gap:0}
  .bottom-tab button{font-size:10px;min-height:50px;padding:6px 1px;border-radius:12px}
  .bottom-tab button .bi{font-size:20px}

  /* 仪表盘：手机上整体更紧凑，统计卡横排三列、收紧区块间距 */
  #sec-dash .grid{gap:12px}
  #sec-dash [style*="margin-top"]{margin-top:12px!important}
  #sec-dash .card-h{margin-bottom:10px}
  #sec-dash .hero{padding:16px 14px;gap:12px}
  #sec-dash .hero h2{font-size:19px;margin-bottom:4px}
  #sec-dash .hero p{font-size:12.5px;line-height:1.5}
  #sec-dash .daily-quote{margin-top:8px}
  #sec-dash .daily-quote .q-txt{font-size:12px;line-height:1.5}
  #sec-dash .stat{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;gap:0 10px;align-items:center;padding:12px 10px;text-align:left}
  #sec-dash .stat .ic{grid-row:1/3;width:32px;height:32px;margin:0}
  #sec-dash .stat .ic svg{width:17px;height:17px}
  #sec-dash .stat .v{font-size:20px;grid-column:2}
  #sec-dash .stat .v small{font-size:12px}
  #sec-dash .stat .k{font-size:11px;grid-column:2;line-height:1.3}

  /* 待办行：更大点击区、顶部对齐、元信息更紧凑、防溢出 */
  .task{align-items:flex-start}
  .task .check{margin-top:1px}
  .task .tmain .t{font-size:14.5px;line-height:1.4;word-break:break-word}
  .task .m{gap:6px;margin-top:5px}
  .task .tact{align-self:flex-start;gap:2px}
  .task .tact button{width:36px;height:36px;border-radius:9px;background:var(--surface-2)}
  .task .tact button svg{width:18px;height:18px}
}

@media(max-width:560px){
  /* 更激进的紧凑 */
  .content{padding:12px 10px calc(78px + env(safe-area-inset-bottom))}
  .hero{padding:14px 12px}
  .hero .date b{font-size:22px}
  .stat .v{font-size:22px}
  /* 仪表盘：超小屏进一步压缩，hero 文案截断两行、统计卡改为横排小卡片 */
  #sec-dash .hero p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  #sec-dash .grid.g-3{grid-template-columns:repeat(3,1fr);gap:8px}
  #sec-dash .stat{display:grid !important;grid-template-columns:auto 1fr;grid-template-rows:auto auto;gap:0 8px;align-items:center;padding:10px 8px;text-align:left}
  #sec-dash .stat .ic{grid-row:1/3;width:28px;height:28px;margin:0}
  #sec-dash .stat .ic svg{width:15px;height:15px}
  #sec-dash .stat .v{font-size:17px;grid-column:2}
  #sec-dash .stat .v small{font-size:11px}
  #sec-dash .stat .k{font-size:10px;grid-column:2;line-height:1.25}
  /* 等级区：手机垂直居中，统计 2x2 */
  .lvl-hero{padding:16px;gap:14px}
  .lvl-hero .big-ring{width:104px;height:104px;flex:0 0 104px}
  .lvl-hero .big-ring .lbl b{font-size:20px}
  .lvl-hero .big-ring .lbl span{font-size:9.5px}
  .lvl-hero .meta h2{font-size:18px}
  .lvl-hero .meta p{font-size:12.5px;color:var(--text-2);max-width:280px;margin:2px auto 0;line-height:1.5}
  .lvl-hero .meta .hr{grid-template-columns:repeat(2,1fr);gap:var(--s3);width:100%;max-width:100%}
  .lvl-hero .meta .hr div{text-align:center}
  .lvl-hero .meta .hr div b{font-size:15px}
  .lvl-hero .meta .hr div span{font-size:10.5px}

  /* 看板单列滚动 */
  .kb-col{flex:0 0 86vw;min-width:86vw}

  /* 任务行：让标题区和操作更省空间 */
  .task{padding:10px}
  .task .check{width:20px;height:20px;flex-basis:20px}
  .task .check svg{width:12px;height:12px}
  .task .tact{gap:4px}

  /* 二级标题 */
  .sec-head{font-size:12px;margin:16px 2px 6px}

  /* 笔记/物品网格更小 */
  .igrid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
  .icard .info{padding:8px 9px}
  .icard .in{font-size:13px}

  /* 习惯卡片 */
  .habit-card{padding:12px}
  .habit-card .h-head{margin-bottom:10px}
  .habit-card .h-ic{width:36px;height:36px}
  .habit-card .h-name{font-size:14px}
  .habit-card .h-today{width:58px;height:32px;font-size:11px}

  /* 日历 */
  .cal{gap:3px}
  .cal .cell{border-radius:8px;padding:4px 5px;min-height:88px}
  .cal .cell .num{font-size:12px}
  .cal .ev{font-size:10px;padding:3px 5px}

  /* 成就 */
  .level-box{padding:12px;gap:12px}
  .lv-ring{width:72px;height:72px}
  .badges{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}

  /* 模态框更贴近屏幕 */
  .mask{padding:10px}
  .modal{max-width:100%;border-radius:14px}
  .tp{width:40px;height:40px}
  .habit-icon-picker .tp{flex-basis:40px}
  .tp svg{width:20px;height:20px}
  .tp-emoji{font-size:22px}

  /* 空状态 */
  .placeholder{padding:48px 20px;min-height:30vh}
  .placeholder b{font-size:14px}
}

@media(max-width:420px){
  /* 超小屏 */
  .bottom-tab button{font-size:9.5px;min-height:46px}
  .bottom-tab button .bi{font-size:18px}
  .bottom-tab button span{max-width:6ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .hero h2{font-size:17px}
  .hero p{font-size:12px}
  .stat .v{font-size:20px}
  .lstats{grid-template-columns:repeat(3,1fr);gap:6px}
  .lstat{padding:8px 6px}
  .lstat-v{font-size:15px}
  .lstat-ic{width:28px;height:28px}
}

.sync-tip{font-size:12px;line-height:1.5;padding:8px 10px;border-radius:8px;margin:4px 0 10px;background:var(--surface-2);color:var(--text-2)}
.sync-tip.ok{background:var(--success-weak);color:var(--success)}
.sync-tip.warn{background:#fff4e0;color:#9a6a16}
.sync-foot{font-size:12px;color:var(--text-3);line-height:1.5;margin-top:10px}

/* ===== 记账 ===== */
.lstats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:var(--s4)}
.lstat{display:flex;flex-direction:column;gap:6px;padding:14px}
.lstat-ic{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;margin-bottom:2px}
.lstat-ic svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2}
.lstat-k{font-size:12.5px;color:var(--text-2)}
.lstat-v{font-size:22px;font-weight:800;letter-spacing:-.3px;font-variant-numeric:tabular-nums}
.lmonth{display:flex;justify-content:space-between;align-items:baseline;margin:16px 2px 8px;font-size:13px;font-weight:700;color:var(--text)}
.lmonth-sub{font-size:12px;font-weight:500;color:var(--text-3)}
.ltxns{display:flex;flex-direction:column;gap:8px}
.txn{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:10px 14px;cursor:pointer;transition:border-color var(--t-fast)}
.txn:hover{border-color:var(--brand)}
.txn-ic{width:40px;height:40px;border-radius:11px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;font-size:20px;flex:0 0 40px}
.txn-main{flex:1;min-width:0}
.txn-top{display:flex;align-items:center;gap:8px}
.txn-type{font-weight:650;font-size:14.5px}
.txn-led{font-size:12.5px;color:var(--text-3)}
.txn-sub{font-size:12.5px;color:var(--text-3);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.txn-amt{font-weight:800;font-size:16px;font-variant-numeric:tabular-nums;white-space:nowrap}
.txn.exp .txn-amt{color:var(--danger)}
.txn.inc .txn-amt{color:var(--success)}
@media(max-width:560px){
  .lstats{grid-template-columns:repeat(3,1fr);gap:8px}
  .lstat{padding:11px 10px}
  .lstat-v{font-size:18px}
  .txn-ic{width:36px;height:36px;font-size:18px;flex-basis:36px}
}

/* ===== 健康 ===== */
.health-today{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.h-today-card{background:color-mix(in srgb,var(--hc) 10%,var(--surface-2));border:1px solid color-mix(in srgb,var(--hc) 22%,var(--border));border-radius:12px;padding:14px 10px;text-align:center;transition:transform var(--t-fast),box-shadow var(--t-fast)}
.h-today-card:hover{transform:translateY(-2px);box-shadow:var(--sh-1)}
.h-today-card .h-tic{font-size:26px;line-height:1;display:block;margin-bottom:6px}
.h-today-card .h-tv{font-size:20px;font-weight:800;color:var(--text);line-height:1.2}
.h-today-card .h-tk{font-size:11px;color:var(--text-3);margin-top:4px;font-weight:600}
.health-types{display:flex;flex-wrap:wrap;gap:8px}
.h-type{display:inline-flex;align-items:center;gap:5px;padding:7px 11px;border-radius:var(--r-pill);font-size:12.5px;font-weight:600;color:var(--text-2);background:var(--surface-2);border:1px solid var(--border);transition:background var(--t-fast),color var(--t-fast),border-color var(--t-fast),box-shadow var(--t-fast)}
.h-type:hover{background:var(--surface-3)}
.h-type.on{background:color-mix(in srgb,var(--hc) 14%,var(--surface));color:color-mix(in srgb,var(--hc) 78%,var(--text));border-color:color-mix(in srgb,var(--hc) 40%,var(--border));box-shadow:0 0 0 3px color-mix(in srgb,var(--hc) 12%,transparent)}
.h-type span{font-size:16px;line-height:1}
.health-form .field{margin-bottom:12px}
.h-mood{display:flex;flex-direction:column;gap:8px}
.h-mood input[type=range]{width:100%;accent-color:var(--brand)}
.h-mood-lbl{display:flex;justify-content:space-between;font-size:12px;color:var(--text-3);padding:0 2px}
.health-list{display:flex;flex-direction:column;gap:8px}
.h-row{display:flex;align-items:center;gap:12px;padding:11px 12px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);transition:background var(--t-fast)}
.h-row:hover{background:var(--surface-3)}
.h-row .h-ric{font-size:22px;line-height:1;flex:0 0 28px;text-align:center}
.h-row .h-rmain{flex:1;min-width:0}
.h-row .h-rtop{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.h-row .h-rtop b{font-size:14px;font-weight:700;color:var(--text)}
.h-row .h-rv{font-size:15px;font-weight:800}
.h-row .h-rsub{font-size:12px;color:var(--text-3);margin-top:2px}
.h-row .h-del{color:var(--text-3);width:32px;height:32px;border-radius:8px}
.h-row .h-del:hover{background:var(--danger-weak);color:var(--danger)}
.h-row .h-del svg{width:16px;height:16px}
@media(max-width:820px){
  .health-today{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:560px){
  .health-today{grid-template-columns:repeat(2,1fr);gap:8px}
  .h-today-card{padding:12px 8px}
  .h-today-card .h-tic{font-size:22px}
  .h-today-card .h-tv{font-size:17px}
  .h-type{padding:6px 9px;font-size:12px}
  .h-type span{font-size:14px}
}

/* ---------- 通用拖拽排序手柄 ---------- */
.drag-h{display:inline-flex;align-items:center;justify-content:center;width:22px;min-width:22px;height:24px;color:var(--text-3);cursor:grab;font-size:13px;font-weight:700;user-select:none;-webkit-user-select:none;touch-action:none;transition:color var(--t-fast)}
.drag-h:hover{color:var(--brand)}
.drag-h:active{cursor:grabbing}
.lm-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--border);transition:box-shadow var(--t-fast),background var(--t-fast),transform var(--t-fast)}
.lm-row.dragging{background:var(--surface-2);box-shadow:0 10px 28px rgba(0,0,0,.18);border-radius:10px;opacity:.96}
body.sorting{user-select:none;-webkit-user-select:none}
body.sorting .drag-h{cursor:grabbing}

/* ---------- 番茄钟阶段标签 ---------- */
.tp-phase{display:none;margin-bottom:var(--s3);padding:8px 12px;border-radius:var(--r-sm);font-size:13px;font-weight:700;text-align:center;background:var(--surface-2);color:var(--text-2)}
.tp-phase.focus{background:color-mix(in srgb,var(--brand) 16%,var(--surface));color:var(--brand)}
.tp-phase.break{background:color-mix(in srgb,var(--info) 16%,var(--surface));color:var(--info)}

/* ---------- 应用锁遮罩 ---------- */
.lock-overlay{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;background:linear-gradient(160deg,color-mix(in srgb,var(--brand) 18%,var(--surface)),var(--surface));padding:24px}
.lock-card{width:min(360px,92vw);background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:0 24px 70px rgba(0,0,0,.28);padding:28px 24px;text-align:center;animation:lockIn .4s var(--ease) both}
@keyframes lockIn{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
.lock-ic{font-size:40px;margin-bottom:8px}
.lock-card h2{font-size:20px;font-weight:800;margin:0 0 6px}
.lock-sub{font-size:13px;color:var(--text-3);margin:0 0 18px;line-height:1.5}
.lock-input{width:100%;margin-bottom:10px;font-size:15px;padding:11px 14px;text-align:center;letter-spacing:2px}
.lock-btn{width:100%;margin-top:4px}
.lock-links{display:flex;justify-content:center;gap:18px;margin-top:14px;font-size:12.5px}
.lock-links a{color:var(--text-3);cursor:pointer}
.lock-links a:hover{color:var(--brand)}
.lock-err{min-height:16px;color:var(--danger);font-size:12.5px;margin-top:10px}

/* ---------- 账号登录页（全屏拦截） ---------- */
.login-screen{position:fixed;inset:0;z-index:99998;display:none;align-items:center;justify-content:center;padding:24px;background:linear-gradient(160deg,color-mix(in srgb,var(--brand) 22%,var(--surface)),var(--surface))}
.login-card{width:min(380px,94vw);background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:0 24px 70px rgba(0,0,0,.28);padding:32px 26px;text-align:center;animation:lockIn .4s var(--ease) both}
.login-logo{font-size:46px;line-height:1;margin-bottom:8px}
.login-title{font-size:22px;font-weight:800;margin:0 0 4px;color:var(--text)}
.login-sub{font-size:13px;color:var(--text-3);margin:0 0 22px;line-height:1.5}
.login-form{display:flex;flex-direction:column;text-align:left;gap:6px}
.login-label{font-size:12.5px;font-weight:650;color:var(--text-2);margin-top:6px}
.login-input{width:100%;padding:11px 14px;font-size:15px;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--surface-2);color:var(--text);transition:border-color var(--t-fast),box-shadow var(--t-fast)}
.login-input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-weak)}
.login-err{min-height:16px;color:var(--danger);font-size:12.5px;margin-top:8px;text-align:center}
.login-btn{width:100%;margin-top:14px;padding:12px;font-size:15px;font-weight:750;border:none;border-radius:var(--r-sm);background:var(--brand);color:#fff;cursor:pointer;box-shadow:var(--sh-brand);transition:background var(--t-fast),transform var(--t-fast)}
.login-btn:hover{background:var(--brand-strong)}
.login-btn:active{transform:scale(.985)}
.login-btn:disabled{opacity:.6;cursor:default}
.login-foot{font-size:11.5px;color:var(--text-3);margin-top:16px;line-height:1.5}

/* ---------- v60 日常行动与日终复盘 ---------- */
.flow-page-head,.review-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--s4);margin:0 0 var(--s5)}
.flow-page-head h2,.review-hero h2{font-size:clamp(22px,3vw,28px);font-weight:800;letter-spacing:-.4px;margin:4px 0 5px}
.flow-page-head p,.review-hero p{margin:0;color:var(--text-2);font-size:13px;line-height:1.55}
.flow-kicker{display:block;color:var(--brand-ink);font-size:11px;font-weight:800;letter-spacing:.1em}
.flow-return{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;margin-bottom:var(--s4);border:1px solid var(--border);border-radius:var(--r-sm);background:var(--surface-2);font-size:13px;color:var(--text-2)}
.flow-return>div{display:flex;gap:8px;flex-wrap:wrap}
.flow-state,.top-three-hint{font-size:12px;font-weight:600;color:var(--text-3);margin-left:8px}
.today-rank{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--brand-weak);color:var(--brand-ink);font-size:12px;font-weight:800;flex:none}
.primary-task{border-color:color-mix(in srgb,var(--brand) 45%,var(--border));background:linear-gradient(100deg,color-mix(in srgb,var(--brand) 7%,var(--surface)),var(--surface))}
.primary-task .today-rank{background:var(--brand);color:#fff}
.today-review-nudge{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;margin-bottom:var(--s5);border:1px solid color-mix(in srgb,var(--brand) 25%,var(--border));border-radius:var(--r);background:color-mix(in srgb,var(--brand) 6%,var(--surface))}
.today-review-nudge b,.today-review-nudge span{display:block}.today-review-nudge b{font-size:14px}.today-review-nudge span{margin-top:4px;color:var(--text-2);font-size:12px}
.review-hero{align-items:flex-start;padding:22px 24px;border:1px solid var(--border);border-radius:var(--r-lg);background:linear-gradient(135deg,color-mix(in srgb,var(--brand) 10%,var(--surface)),var(--surface))}
.review-hero>div{min-width:0}.review-ritual{display:flex;flex-direction:column;gap:10px;margin-top:var(--s5)}
.review-step{border:1px solid var(--border);border-radius:var(--r);background:var(--surface);overflow:hidden}.review-step[open]{border-color:color-mix(in srgb,var(--brand) 35%,var(--border));box-shadow:var(--sh-1)}
.review-step summary{display:flex;align-items:center;gap:12px;padding:15px 16px;cursor:pointer;list-style:none}.review-step summary::-webkit-details-marker{display:none}.review-step summary>span:nth-child(2){flex:1}.review-step summary b,.review-step summary small{display:block}.review-step summary b{font-size:15px}.review-step summary small{margin-top:3px;color:var(--text-3);font-size:12px}.review-no{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:var(--surface-2);color:var(--brand-ink);font-size:11px;font-weight:800}.review-caret{color:var(--text-3);transition:transform var(--t-fast)}.review-step[open] .review-caret{transform:rotate(180deg)}
.review-step-body{padding:0 16px 16px}.review-step-body .field{margin-top:12px}.review-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.review-stats>div{padding:13px 10px;border-radius:var(--r-sm);background:var(--surface-2);text-align:center}.review-stats b,.review-stats span{display:block}.review-stats b{font-size:20px;font-weight:800}.review-stats em{font-size:11px;font-style:normal;margin-left:2px}.review-stats span,.review-trust{color:var(--text-3);font-size:11px}.review-trust{margin:10px 0 0;line-height:1.55}
.review-finish{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px;border-radius:var(--r);background:var(--surface-2)}.review-finish b,.review-finish span{display:block}.review-finish span{margin-top:4px;color:var(--text-3);font-size:12px}.review-archive{margin-top:var(--s5);border-top:1px solid var(--border);padding-top:var(--s4)}.review-archive summary{cursor:pointer;font-weight:700}.review-archive summary span{font-size:12px;color:var(--text-3);font-weight:500}.review-archive-item{display:flex;gap:12px;padding:11px 0;border-bottom:1px solid var(--border);font-size:13px}.review-archive-item b{flex:none}.review-archive-item span{min-width:0;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

@media(max-width:560px){.flow-page-head,.review-hero,.today-review-nudge,.review-finish{align-items:flex-start;flex-direction:column}.flow-page-head .btn,.review-hero .btn,.today-review-nudge .btn,.review-finish .btn{width:100%;justify-content:center}.flow-return{align-items:flex-start;flex-direction:column}.review-stats{gap:7px}.review-stats>div{padding:11px 5px}.review-stats b{font-size:18px}.review-step summary{padding:14px 12px}.review-step-body{padding:0 12px 14px}}

/* v61 Todo modal: 手机上优先完成“写任务—安排—保存”，低频内容按需展开。 */
@media(max-width:560px){
  .mask:has(.task-modal-shell){align-items:flex-end;padding:0}
  .modal:has(.task-modal-shell){width:100%;max-height:min(92dvh,760px);border-radius:16px 16px 0 0}
  .task-modal-head{padding:15px 16px 12px}.task-modal-head h3{margin:0;font-size:17px}
  .task-modal-body{padding:15px 16px 6px}.task-title-field .input{font-size:16px;padding:12px}
  .task-form-grid{flex-direction:row;gap:9px}.task-form-grid .input{min-height:44px;padding:9px 10px;font-size:14px}
  .task-reminder{gap:12px}.task-reminder p{font-size:12px}.task-form-more summary{min-height:46px}
  .task-modal-footer{padding:11px 16px calc(11px + env(safe-area-inset-bottom));gap:8px}.task-modal-footer .btn{min-height:44px;padding:9px 10px;font-size:14px}
  .task-modal-footer .danger{flex:0 0 auto;min-width:64px}.task-sub-add .btn{flex:0 0 auto}
}

@media(prefers-reduced-motion:reduce){
  *{animation:none!important;animation-duration:.001ms!important;animation-iteration-count:1!important;
    transition-duration:.001ms!important;scroll-behavior:auto!important}
}


/* ============================================================
   Dashboard v3 — 12列网格 + 领域色卡片
   ============================================================ */
.dash-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:var(--space-5,20px)}

/* Top 1 Hero */
.top1-card{grid-column:1/-1;background:linear-gradient(135deg,color-mix(in srgb,var(--goal) 8%,var(--surface)),color-mix(in srgb,var(--brand) 6%,var(--surface)));border:1px solid var(--border);border-radius:var(--radius-lg,16px);padding:var(--space-6,24px) var(--space-7,32px);display:flex;align-items:center;gap:var(--space-6,24px);box-shadow:var(--shadow-2)}
.top1-content{flex:1;min-width:0}
.top1-card .top-badge{display:inline-flex;align-items:center;gap:4px;background:var(--goal);color:#fff;font-size:12px;font-weight:700;padding:4px 12px;border-radius:var(--radius-pill,999px);margin-bottom:var(--space-3,12px)}
.top1-card h3{font-size:clamp(20px,2.5vw,26px);font-weight:700;margin-bottom:var(--space-4,16px);line-height:1.35}
.top1-actions{display:flex;gap:var(--space-3,12px);flex-wrap:wrap}
.top1-visual{width:100px;height:100px;background:linear-gradient(135deg,var(--brand),var(--goal));border-radius:var(--radius-lg,16px);display:flex;align-items:center;justify-content:center;font-size:42px;flex-shrink:0;box-shadow:var(--shadow-2)}

/* Top 2/3 行 */
.top-row{grid-column:1/-1;display:flex;gap:var(--space-4,16px)}
.top-sub-card{flex:1;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md,14px);padding:var(--space-4,16px) var(--space-5,20px);display:flex;align-items:center;gap:var(--space-4,16px);box-shadow:var(--shadow-1);cursor:pointer;transition:border-color var(--t-fast),box-shadow var(--t-fast)}
.top-sub-card:hover{border-color:var(--brand);box-shadow:var(--shadow-2)}
.top-sub-card .rank{width:30px;height:30px;border-radius:50%;background:var(--surface-2);color:var(--text-2);font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.top-sub-card .rank-1{background:var(--brand-weak);color:var(--brand-ink)}
.top-sub-card .t-title{font-size:14.5px;font-weight:600;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top-sub-card .t-meta{font-size:12.5px;color:var(--text-3);flex-shrink:0}

/* 区块标签 */
.sec-label{font-size:11px;font-weight:700;color:var(--text-3);letter-spacing:.08em;text-transform:uppercase;margin-bottom:var(--space-3,12px);display:flex;align-items:center;gap:var(--space-2,8px)}
.sec-label .emoji{font-size:14px}

/* 今天要做 / 今日习惯 / 目标 / 时间 */
.today-col,.habit-col,.goal-col,.time-col{grid-column:span 6;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md,14px);padding:var(--space-5,20px);box-shadow:var(--shadow-1)}
.today-list,.habit-list{margin-top:var(--space-2,8px)}
.today-item,.habit-item{display:flex;align-items:center;gap:var(--space-3,12px);padding:var(--space-3,12px) 0;border-bottom:1px solid var(--border)}
.today-item:last-child,.habit-item:last-child{border-bottom:none}
.today-item .check{width:20px;height:20px;border:2px solid var(--border-strong);border-radius:6px;flex-shrink:0;cursor:pointer;transition:border-color var(--t-fast),background var(--t-fast)}
.today-item .check:hover{border-color:var(--brand)}
.today-item .tt{font-size:14px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.today-item .tt-done{text-decoration:line-through;color:var(--text-3)}
.today-item .tt-time{font-size:12px;color:var(--text-3);flex-shrink:0}
.today-more{padding-top:var(--space-3,12px);font-size:13.5px;color:var(--brand);cursor:pointer;font-weight:600}
.habit-item .h-ic{font-size:20px;flex-shrink:0;width:28px;text-align:center}
.habit-item .h-name{font-size:14px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.habit-item .h-name.done{color:var(--text-3)}
.habit-item .h-status{font-size:11.5px;font-weight:600;padding:2px 10px;border-radius:var(--radius-pill,999px);flex-shrink:0}
.habit-item .h-status.done{background:var(--habit-weak);color:var(--habit)}
.habit-item .h-status.undone{background:var(--surface-2);color:var(--text-3)}

/* 目标 */
.goal-active .g-emoji{font-size:28px;margin-bottom:var(--space-2,8px);line-height:1}
.goal-active .g-name{font-size:16px;font-weight:700;color:var(--goal);margin-bottom:2px}
.goal-active .g-next{font-size:13px;color:var(--text-2);margin-bottom:var(--space-4,16px)}
.goal-bar{height:8px;background:var(--surface-2);border-radius:4px;overflow:hidden}
.goal-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--goal),var(--brand));border-radius:4px;width:var(--goal-pct,0%)}
.goal-pct{font-size:12.5px;color:var(--text-3);margin-top:var(--space-3,12px);display:flex;justify-content:space-between}
.goal-pct b{color:var(--goal);font-weight:700}

/* 时间投入 */
.time-col{display:flex;align-items:center;gap:var(--space-5,20px)}
.time-emoji{font-size:40px;flex-shrink:0;line-height:1}
.time-content{flex:1;min-width:0}
.time-value{font-size:32px;font-weight:800;color:var(--time);font-variant-numeric:tabular-nums;line-height:1}
.time-value small{font-size:14px;font-weight:400;color:var(--text-2);margin-left:4px}
.time-label{font-size:13px;color:var(--text-2);margin-top:6px}

/* 精神补给 */
.quote-col{grid-column:1/-1;text-align:center;padding:var(--space-6,24px) var(--space-7,32px)}
.quote-emoji{font-size:22px;margin-bottom:var(--space-3,12px);line-height:1}
.quote-text{font-size:16px;line-height:1.7;color:var(--text-2);font-weight:400;margin-bottom:var(--space-3,12px)}
.quote-tag{font-size:11px;color:var(--text-3);letter-spacing:.05em;font-weight:500}

/* 结束今天 */
.end-col{grid-column:1/-1;background:linear-gradient(135deg,color-mix(in srgb,var(--review) 8%,var(--surface)),color-mix(in srgb,var(--brand) 6%,var(--surface)));border:1px solid var(--border);border-radius:var(--radius-lg,16px);padding:var(--space-6,24px) var(--space-7,32px);display:flex;align-items:center;justify-content:space-between;gap:var(--space-5,20px);margin-bottom:var(--space-6,24px)}
.end-col .end-emoji{font-size:36px;flex-shrink:0;line-height:1}
.end-col .end-text{flex:1;min-width:0}
.end-col .end-text h3{font-size:17px;font-weight:700;color:var(--review);margin-bottom:4px}
.end-col .end-text p{font-size:13.5px;color:var(--text-2)}

/* Dashboard Mobile */
@media(max-width:820px){
  .dash-grid{gap:var(--space-4,16px)}
  .top1-card{flex-direction:column;align-items:flex-start;padding:var(--space-5,20px)}
  .top1-visual{width:72px;height:72px;font-size:32px}
  .top-row{flex-direction:column}
  .today-col,.habit-col,.goal-col,.time-col{grid-column:1/-1}
  .time-col{gap:var(--space-4,16px)}
  .time-emoji{font-size:32px}
  .time-value{font-size:26px}
  .end-col{flex-direction:column;align-items:flex-start;text-align:left}
}
@media(max-width:560px){
  .top1-card h3{font-size:18px}
  .top-sub-card{padding:var(--space-3,12px) var(--space-4,16px)}
  .quote-col{padding:var(--space-5,20px) var(--space-4,16px)}
  .quote-text{font-size:14.5px}
}

/* ============================================================
   Daily Review v3 — 沉浸式日终复盘
   ============================================================ */
.review-v3{max-width:760px;margin:0 auto;padding:var(--space-6,24px) var(--space-5,20px)}
.review-v3-head{text-align:center;margin-bottom:var(--space-6,24px)}
.review-v3-head .kicker{font-size:11px;font-weight:700;color:var(--text-3);letter-spacing:.08em;text-transform:uppercase;margin-bottom:var(--space-2,8px)}
.review-v3-head h2{font-size:clamp(24px,3vw,32px);font-weight:700;margin-bottom:var(--space-2,8px)}
.review-v3-head p{font-size:15px;color:var(--text-2);line-height:1.6}

.review-stats-row{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-4,16px);margin-bottom:var(--space-6,24px)}
.review-stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md,14px);padding:var(--space-5,20px);text-align:center;box-shadow:var(--shadow-1)}
.review-stat-card .st-emoji{font-size:28px;line-height:1;margin-bottom:var(--space-2,8px)}
.review-stat-card .st-value{font-size:24px;font-weight:800;color:var(--text);line-height:1.2}
.review-stat-card .st-value small{font-size:13px;font-weight:400;color:var(--text-2)}
.review-stat-card .st-label{font-size:12px;color:var(--text-3);margin-top:var(--space-1,4px);font-weight:600}

.review-step-v3{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md,14px);margin-bottom:var(--space-4,16px);overflow:hidden;box-shadow:var(--shadow-1)}
.review-step-v3[open]{border-color:color-mix(in srgb,var(--review) 25%,var(--border))}
.review-step-v3 summary{display:flex;align-items:center;gap:var(--space-3,12px);padding:var(--space-4,16px) var(--space-5,20px);cursor:pointer;list-style:none}
.review-step-v3 summary::-webkit-details-marker{display:none}
.review-step-v3 summary .step-no{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--review-weak);color:var(--review);font-size:12px;font-weight:800;flex-shrink:0}
.review-step-v3 summary .step-title{flex:1}
.review-step-v3 summary .step-title b{font-size:15px;display:block}
.review-step-v3 summary .step-title small{font-size:12px;color:var(--text-3);display:block;margin-top:2px}
.review-step-v3 summary .step-caret{color:var(--text-3);transition:transform var(--t-fast);font-size:18px}
.review-step-v3[open] summary .step-caret{transform:rotate(180deg)}
.review-step-body{padding:0 var(--space-5,20px) var(--space-5,20px)}

.review-finish-v3{background:linear-gradient(135deg,color-mix(in srgb,var(--review) 8%,var(--surface)),color-mix(in srgb,var(--brand) 6%,var(--surface)));border:1px solid var(--border);border-radius:var(--radius-lg,16px);padding:var(--space-5,20px) var(--space-6,24px);display:flex;align-items:center;justify-content:space-between;gap:var(--space-4,16px);margin:var(--space-6,24px) 0}
.review-finish-v3 .fin-text{flex:1;min-width:0}
.review-finish-v3 .fin-text b{font-size:16px;display:block;color:var(--review)}
.review-finish-v3 .fin-text span{font-size:13px;color:var(--text-2);display:block;margin-top:2px}

.review-archive-v3{margin-top:var(--space-6,24px);border-top:1px solid var(--border);padding-top:var(--space-5,20px)}
.review-archive-v3 summary{cursor:pointer;font-weight:700;font-size:14px;display:flex;align-items:center;gap:var(--space-2,8px)}
.review-archive-v3 summary span{font-size:12px;color:var(--text-3);font-weight:500}
.review-archive-item-v3{display:flex;gap:var(--space-3,12px);padding:var(--space-3,12px) 0;border-bottom:1px solid var(--border);font-size:13px}
.review-archive-item-v3 b{flex:none;color:var(--text-3);font-weight:600}
.review-archive-item-v3 span{min-width:0;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Review Mobile */
@media(max-width:560px){
  .review-v3{padding:var(--space-4,16px) var(--space-3,12px)}
  .review-stats-row{grid-template-columns:repeat(3,1fr);gap:var(--space-3,12px)}
  .review-stat-card{padding:var(--space-4,16px) var(--space-3,12px)}
  .review-stat-card .st-emoji{font-size:22px}
  .review-stat-card .st-value{font-size:20px}
  .review-finish-v3{flex-direction:column;align-items:flex-start;text-align:left}
  .review-finish-v3 .btn{align-self:stretch}
}

/* ============================================================
   v61.5 Todo Action Flow UI — Lane Pills + Task Row Refactor
   ============================================================ */

/* 状态 Lane Pills */
.flow-lanes{display:flex;gap:10px;margin:var(--s5) 0;flex-wrap:wrap}
.flow-lane{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:var(--r-pill);background:var(--surface);border:1px solid var(--border);font-size:13px;font-weight:600;color:var(--text-2);cursor:pointer;transition:background var(--t-fast),border-color var(--t-fast),color var(--t-fast),box-shadow var(--t-fast)}
.flow-lane:hover{background:var(--surface-2)}
.flow-lane.on{background:var(--accent-weak);border-color:var(--accent);color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 12%,transparent)}
.flow-lane span{font-weight:700;margin-left:2px;color:var(--text-3)}
.flow-lane.on span{color:var(--accent)}
.flow-list-workspace{display:grid;grid-template-columns:minmax(180px,240px) minmax(0,1fr);min-width:0}
.flow-list-sidebar{min-width:0;padding:12px;border-right:1px solid var(--border)}
.flow-list-sidebar-title{margin:2px 4px 10px;font-size:12px;font-weight:700;color:var(--text-3)}
.flow-list-nav{display:grid;gap:6px;min-width:0}
.flow-list-card{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;min-height:44px;padding:9px 11px;text-align:left;background:var(--surface);border:1px solid transparent;border-radius:10px;color:var(--text-2);cursor:pointer;transition:border-color var(--t-fast),background var(--t-fast),color var(--t-fast)}
.flow-list-card:hover{background:var(--surface-2);border-color:var(--border-strong)}
.flow-list-card.on{background:var(--accent-weak);border-color:var(--accent);color:var(--accent)}
.flow-list-name{max-width:100%;font-size:14px;font-weight:700;line-height:1.4;overflow-wrap:anywhere}
.flow-list-count{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:24px;height:24px;padding:0 6px;border-radius:var(--r-pill);background:var(--surface-2);font-size:12px;font-weight:700;color:var(--text-3)}
.flow-list-card.on .flow-list-count{background:var(--surface);color:var(--accent)}
.flow-list-detail{min-width:0}
.flow-list-detail-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:14px 16px;border-bottom:1px solid var(--border)}
.flow-list-detail-head>div{min-width:0}
.flow-list-detail-head h4{margin:0;font-size:15px;line-height:1.4;overflow-wrap:anywhere}
.flow-list-detail-head span{display:block;margin-top:3px;font-size:12px;color:var(--text-3)}
.flow-list-detail-head .btn{flex:0 0 auto}
.flow-list-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}

/* 任务行：使用 .task 基础，覆盖为 Action Flow 布局 */
.flow-task{align-items:flex-start;padding:14px 16px;border-bottom:1px solid var(--border);border-radius:0;border-left:none;margin-bottom:0}
.flow-task:last-child{border-bottom:none}
.flow-task-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.flow-task-head{display:flex;align-items:flex-start;gap:10px;justify-content:space-between}
.flow-task-head .tmain{flex:1;min-width:0}
.flow-task-head .tmain .t{font-weight:600;line-height:1.45;font-size:14.5px}
.flow-task-head .tmain .t.done{text-decoration:line-through;color:var(--text-3)}
.flow-task-meta{font-size:12px;color:var(--text-3);margin-top:2px}

/* 操作区 */
.flow-act{display:flex;gap:6px;align-items:center;flex-shrink:0}
.flow-act .mini,.flow-task .mini{padding:5px 10px;font-size:12px;font-weight:600;border-radius:8px;background:var(--surface-2);border:1px solid var(--border);color:var(--text-2);cursor:pointer;transition:background var(--t-fast);white-space:nowrap}
.flow-act .mini:hover,.flow-task .mini:hover{background:var(--surface-3);color:var(--text)}
.more-wrap{position:relative}
.more-btn{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;color:var(--text-3);font-size:16px;font-weight:700;cursor:pointer;line-height:1;transition:background var(--t-fast)}
.more-btn:hover{background:var(--surface-2);color:var(--text)}
.more-dropdown{display:none;position:absolute;right:0;top:calc(100% + 4px);z-index:20;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-sm);box-shadow:var(--sh-2);padding:4px;min-width:130px}
.more-dropdown.show{display:block}
.more-dropdown button{display:block;width:100%;text-align:left;padding:8px 12px;font-size:13px;color:var(--text-2);background:transparent;border:none;border-radius:6px;cursor:pointer;white-space:nowrap}
.more-dropdown button:hover{background:var(--surface-2);color:var(--text)}

/* Mobile 适配 */
@media(max-width:768px){
  .flow-task{padding:12px}
  .flow-task-head{gap:8px}
  .flow-act .mini{padding:4px 8px;font-size:11px}
}

/* Stable first paint while auth and local/server data are being prepared. */
.app-startup-loading{min-height:180px;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--text-2);font-size:14px}
.app-startup-mark{width:18px;height:18px;border:2px solid var(--border-strong);border-top-color:var(--brand);border-radius:50%;animation:appStartupSpin .9s linear infinite}
@keyframes appStartupSpin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.app-startup-mark{animation:none;border-top-color:var(--border-strong)}}
@media(max-width:560px){
  .flow-lanes{gap:8px}
  .flow-lane{padding:7px 12px;font-size:12px}
  .flow-list-workspace{grid-template-columns:minmax(0,1fr)}
  .flow-list-sidebar{padding:10px;border-right:0;border-bottom:1px solid var(--border)}
  .flow-list-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .flow-list-card{padding:8px;gap:6px;font-size:12px}
  .flow-list-name{font-size:12px}
  .flow-list-detail-head{align-items:flex-start;padding:12px;gap:8px}
  .flow-list-detail-head .btn{min-height:40px}
  #sec-tasks .flow-task-list>.card-h{align-items:flex-start;flex-direction:column}
  .flow-list-actions{width:100%;justify-content:flex-start}
  .flow-list-actions .btn{min-height:40px;flex:1 1 auto}
  .flow-task{padding:12px 10px}
  .flow-task-head .tmain .t{font-size:14px}
  .flow-act{gap:4px}
  .flow-act .mini{padding:3px 8px;font-size:11px}
  .more-btn{width:28px;height:28px;font-size:14px}
}

/* Shared modal structure: stable title/description, scrollable content, pinned actions. */
.modal.modal-standard{display:flex;flex-direction:column;padding:0;overflow:hidden;max-height:min(calc(100vh - 32px),860px);max-height:min(calc(100dvh - 32px),860px)}
.modal-shell{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;width:100%;max-height:min(calc(100vh - 32px),860px);max-height:min(calc(100dvh - 32px),860px)}
.modal-header{flex:0 0 auto;padding:20px 20px 14px;border-bottom:1px solid var(--border)}
.modal-header h3{margin:0!important;font-size:18px;line-height:1.4;font-weight:750}
.modal-header p{display:block;margin:8px 0 0!important;font-size:13px;line-height:1.55;color:var(--text-3)}
.modal-body{flex:1 1 auto;min-height:0;overflow:auto;padding:16px 20px 18px;-webkit-overflow-scrolling:touch}
.modal-footer{flex:0 0 auto;padding:12px 20px;border-top:1px solid var(--border);background:var(--surface)}
.modal-footer .acts{margin:0!important;gap:10px}
.modal-footer .acts .btn{min-height:40px}
.modal:has(.batch-manager){width:min(720px,100%);max-width:720px;padding:0;overflow:hidden;max-height:min(calc(100vh - 24px),820px);max-height:min(calc(100dvh - 24px),820px)}
.batch-manager{display:flex;flex-direction:column;min-height:0;height:min(84vh,780px);height:min(84dvh,780px);max-height:calc(100dvh - 24px)}
.batch-header{display:flex;flex:0 0 auto;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 20px 14px;border-bottom:1px solid var(--border)}
.batch-header h3{margin:0!important;font-size:18px;line-height:1.4}
.batch-header p{margin:7px 0 0;color:var(--text-3);font-size:13px;line-height:1.5}
.batch-tools{display:flex;flex:0 0 auto;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 20px 8px}
.batch-tools .input{flex:1 1 180px;min-width:150px}
.batch-count{flex:0 0 auto;padding:0 20px 8px;color:var(--text-3);font-size:12px}
.batch-list{flex:1 1 auto;min-height:0;overflow:auto;padding:0 20px 12px;-webkit-overflow-scrolling:touch}
.batch-row{display:flex;align-items:center;gap:12px;min-height:54px;padding:8px 10px;border-bottom:1px solid var(--border);border-radius:8px;cursor:pointer}
.batch-row.selected{background:color-mix(in srgb,var(--brand) 9%,var(--surface))}
.batch-row input{flex:0 0 auto;width:20px;height:20px;accent-color:var(--brand)}
.batch-row-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
.batch-row-copy b{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.batch-row-copy small{font-size:12px;line-height:1.4;color:var(--text-3);overflow-wrap:anywhere}
.batch-row-copy em{font-style:normal;font-size:11px;font-weight:600;color:var(--warn);white-space:nowrap}
.batch-footer{position:relative;flex:0 0 auto;padding:10px 20px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--surface)}
.batch-actions,.batch-confirm>div{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.batch-actions>span{margin-right:auto;color:var(--text-2);font-size:13px;font-weight:650}
.batch-confirm{padding:0 0 10px}
.batch-confirm[hidden]{display:none}
.batch-confirm p{margin:0 0 10px;color:var(--danger);font-size:13px;line-height:1.55}
.batch-page-actions,.batch-manager-entry{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.batch-manager-entry{margin:0 0 12px}
@media(max-width:560px){
  .modal.modal-standard{width:100%;max-width:100%;max-height:calc(100dvh - 20px);border-radius:14px}
  .modal-header{padding:16px 16px 12px}
  .modal-header h3,.batch-header h3{font-size:17px}
  .modal-body{padding:14px 16px 16px}
  .modal-footer{padding:10px 16px calc(10px + env(safe-area-inset-bottom))}
  .modal-footer .acts{flex-wrap:wrap}
  .batch-manager{height:calc(100dvh - 20px);max-height:calc(100dvh - 20px)}
  .batch-header{padding:15px 16px 12px}
  .batch-tools{padding:10px 16px 7px}
  .batch-tools .input{flex-basis:100%;width:100%;font-size:16px}
  .batch-count{padding:0 16px 7px}
  .batch-list{padding:0 12px 10px}
  .batch-footer{padding:9px 12px calc(10px + env(safe-area-inset-bottom))}
  .batch-actions{justify-content:stretch}
  .batch-actions .btn{flex:1;justify-content:center}
  .batch-actions>span{flex:0 0 100%;margin:0}
  .lm-row{flex-wrap:wrap;align-items:center}
  .lm-row .input{min-width:0}
}

.growth-export-lead{font-size:13px;color:var(--text-3);margin:-8px 0 14px}
.growth-export-summary{display:grid;gap:4px;padding:12px 14px;margin:10px 0 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);font-size:13px;color:var(--text-2)}

/* Goal create/edit uses the shared scrollable modal shell and a compact responsive field grid. */
.modal:has(.goal-form-grid){width:min(560px,100%);max-width:560px}
.goal-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}
.goal-form-grid .field{min-width:0;margin-bottom:12px}
.goal-form-title,.goal-form-milestone{grid-column:1/-1}
.goal-modal-actions .btn{flex:1 1 0;min-width:0;justify-content:center}
@media(max-width:560px){
  .modal:has(.goal-form-grid){max-height:calc(100dvh - 20px)}
  .goal-form-grid{grid-template-columns:minmax(0,1fr)}
  .goal-form-title,.goal-form-milestone{grid-column:auto}
  .goal-form-grid .input{font-size:16px;min-width:0}
  .goal-modal-actions{flex-wrap:nowrap!important}
  .goal-modal-actions .btn{min-height:44px;padding:10px 12px}
}
.growth-export-summary b{color:var(--text-1)}
.growth-export-cards{display:grid;gap:10px}
.growth-export-card{display:flex;gap:10px;align-items:flex-start;padding:13px;border:1px solid var(--line);border-radius:12px;cursor:pointer}
.growth-export-card:has(input:checked){border-color:var(--primary);background:var(--primary-weak)}
.growth-export-card input{margin-top:3px;accent-color:var(--primary);flex:0 0 auto}
.growth-export-card span{display:grid;gap:5px}
.growth-export-card small{font-size:12px;line-height:1.5;color:var(--text-3)}
.growth-export-import{margin:12px 0 0}
.growth-export-advanced{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.growth-export-advanced summary{cursor:pointer;color:var(--text-2);font-size:13px}
.growth-import-list{max-height:35vh;overflow:auto;border:1px solid var(--line);border-radius:9px;padding:6px 10px;margin:10px 0}
.growth-import-row{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid var(--line);font-size:12px}
.growth-import-row:last-child{border-bottom:0}
@media(max-width:600px){
  .growth-export-card{padding:11px}
  .growth-export-import .btn{width:100%}
  .growth-import-row{align-items:flex-start;flex-direction:column;gap:2px}
  .growth-export-advanced .acts .btn{width:100%}
}
