/* ============================================================
   工作台手机版 — 样式表（与原始 HTML 完全一致）
   ============================================================ */

/* ============================================================
   THEME TOKENS — 白蓝金风格（明亮·优雅）与电脑版一致
   ============================================================ */
:root {
  --page-bg: transparent;
  --surface-card: rgba(255,255,255,0.88);
  --surface-nested: rgba(248,250,253,0.82);
  --border: rgba(107,154,196,0.10);
  --border-input: rgba(107,154,196,0.18);
  --text: #2c3a4e;
  --text-secondary: #7a8ea0;
  --text-tertiary: #a0b4c4;
  --accent: #6B9AC4;
  --accent-muted: rgba(107,154,196,0.10);
  --on-accent: #ffffff;
  --module-1: #6B9AC4;
  --module-2: #7DACD4;
  --module-3: #6B9AC4;
  --module-4: #5A8AB4;
  --module-5: #8DB8D8;
  --danger: #d4756a;
  --danger-muted: rgba(212,117,106,0.08);
  --drawer-bg: #eef3f8;
  --drawer-text: #3a5a76;
  --drawer-text-mute: rgba(58,90,118,.55);
  --drawer-hover: rgba(107,154,196,.10);
  --drawer-active: rgba(107,154,196,.16);
  --greet-image: url("../assets/cat-handdraw-window.jpg");
  --radius-control: 8px;
  --radius-tile: 14px;
  --radius-card: 18px;
  --radius-sheet: 24px;
  --shadow-card: 0 1px 3 rgba(42,58,78,.04), 0 4px 12px rgba(42,58,78,.04);
  --shadow-overlay: 0 8px 24px rgba(42,58,78,.08);
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-kai: 'KaiTi','STKaiti','FangSong','STSong','楷体','华文楷体',serif;
  --tab-h: 58px;
  --header-h: 50px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --hero-h: 220px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  background: 
    linear-gradient(175deg, #e2eaf4 0%, #eef3f8 15%, #f2f5fa 40%, #f5f4f0 70%, #eef3f8 100%);
  background-attachment: fixed;
  color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::before { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(107,154,196,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 60%, rgba(107,154,196,0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 85%, rgba(107,154,196,0.05) 0%, transparent 45%);
  opacity: 0.7; }
svg { display: block; flex-shrink: 0; }
input, textarea, button, select { font-family: var(--font); font-size: 14px; outline: none; }

/* ============================================================
   LAYOUT — 头部 + 内容区 + 底部Tab
   ============================================================ */
.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* 头部导航 */
.app-header { position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: var(--header-h); display: flex; align-items: center; gap: 10px;
  padding: 0 16px; background: rgba(226,234,244,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); }
.app-header .h-title { font-size: 17px; font-weight: 800; letter-spacing: -.02em; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-kai); }
.app-header .h-sub { font-size: 12px; color: var(--text-secondary); }
.app-header .h-actions { display: flex; gap: 8px; align-items: center; }
.app-header button { background: none; border: none; color: var(--text-secondary); cursor: pointer;
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; transition: background .12s; }
.app-header button:hover { background: var(--accent-muted); }
.app-header .h-date { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; }

/* 内容滚动区 */
.app-body { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: calc(var(--header-h) + 16px) 16px calc(var(--tab-h) + var(--safe-bottom) + 16px); }
.app-body::-webkit-scrollbar { width: 4px; }
.app-body::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 4px; }

/* 底部Tab栏 */
.app-tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  height: calc(var(--tab-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  display: flex; background: rgba(226,234,244,0.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(42,58,78,.06); }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; cursor: pointer; color: var(--text-tertiary); transition: color .12s;
  padding: 6px 2px 4px; -webkit-tap-highlight-color: transparent; user-select: none; }
.tab-item.active { color: var(--accent); }
.tab-item.active .tab-inner { background: rgba(107, 154, 196, 0.12); border-radius: 12px; padding: 4px 8px; }
.tab-item .tab-icon { display: grid; place-items: center; }
.tab-item .tab-label { font-size: 11px; font-weight: 600; letter-spacing: .01em; }

/* ============================================================
   通用组件
   ============================================================ */
.spacer { flex: 1; }
.btn {
  background: var(--accent); color: var(--on-accent); border: none; border-radius: 8px;
  padding: 9px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; transition: opacity .12s;
  white-space: nowrap;
}
.btn:hover { opacity: .85; }
.btn.ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn.danger { background: var(--danger); color: #fff; }
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px;
  border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: -.01em; }
.badge .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

/* ============================================================
   顶部英雄横幅（猫咪大图）
   ============================================================ */
.hero-banner { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid rgba(107,154,196,0.16);
  box-shadow: 0 4px 24px rgba(42,58,78,0.10); min-height: var(--hero-h); display: flex; flex-direction: column; justify-content: center;
  padding: 34px 20px; margin-bottom: 16px;
  background: var(--greet-image) right center / cover no-repeat, var(--surface-nested);
  animation: catBannerPulse 8s ease-in-out infinite; }
@keyframes catBannerPulse {
  0%, 100% { background-position: right center; background-size: cover; }
  50% { background-position: 52% center; background-size: 102%; }
}
.hero-banner::before { content:""; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(105deg, rgba(255,255,255,0.78) 30%, rgba(255,255,255,0.35) 55%, transparent 78%); }
.hero-banner > * { position: relative; z-index: 1; }
.hero-banner .hi { font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--text); font-family: var(--font-kai); }
.hero-banner .ganzhi-hand { display: flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 12px; color: var(--text-secondary); }
.hero-banner .clk { font-size: 36px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); margin-top: 8px; }
.hero-banner .cmeta { display: flex; align-items: center; gap: 4px; color: var(--text-secondary);
  font-size: 12px; justify-content: flex-start; }
.hero-banner .cmeta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-tertiary); }
.hero-banner .hstats { display: flex; gap: 20px; margin-top: 16px; }
.hero-banner .hstat { display: flex; flex-direction: column; gap: 2px; padding-right: 20px; border-right: 1px solid var(--border); }
.hero-banner .hstat:last-child { border-right: none; }
.hero-banner .hstat .n { font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.hero-banner .hstat .t { font-size: 11px; color: var(--text-secondary); }
.hero-banner .stamp { display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg,#e53935,#c62828);
  color: #fff; font-size: 11px; font-weight: 800; }
.hero-banner .stamp-inner { line-height: 1; }

/* ============================================================
   首页卡片
   ============================================================ */
.card { background: linear-gradient(135deg, rgba(255,255,255,0.85) 0%, rgba(252,250,248,0.82) 50%, rgba(248,250,253,0.80) 100%);
  border: 1px solid var(--border); border-radius: var(--radius-tile); box-shadow: var(--shadow-card); padding: 18px 16px;
  margin-bottom: 16px; backdrop-filter: blur(6px); }
.tic { display: inline-flex; color: var(--module-1); }

/* 小猫横幅随机图（用样式表内定义，保证 http / file:// 打开都能加载） */
.hero-banner[data-cat="garden"] { --greet-image: url("../assets/cat-handdraw-garden.jpg"); }
.hero-banner[data-cat="pond"] { --greet-image: url("../assets/cat-handdraw-pond.jpg"); }
.hero-banner[data-cat="rooftop"] { --greet-image: url("../assets/cat-handdraw-rooftop.jpg"); }
.hero-banner[data-cat="window"] { --greet-image: url("../assets/cat-handdraw-window.jpg"); }

/* ============================================================
   中部标题分组
   ============================================================ */
.sec-grp { display: flex; align-items: center; gap: 9px; margin: 18px 2px 10px; }
.sec-grp .bar { width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }
.sec-grp .zh { font-size: 15px; font-weight: 800; letter-spacing: -.01em; font-family: var(--font-kai); }
.sec-grp .en { font-size: 10px; color: var(--text-tertiary); font-weight: 600; letter-spacing: .04em; }
.sec-grp .line { flex: 1; height: 1px; background: var(--border); }

/* ============================================================
   时钟卡片
   ============================================================ */
.clock-card {
  background: linear-gradient(135deg, var(--surface-card), var(--accent-muted));
  border: 1px solid var(--border); border-radius: var(--radius-tile);
  box-shadow: var(--shadow-card); padding: 20px 18px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; position: relative; overflow: hidden;
}
.clock-card::before {
  content: ''; position: absolute; inset: 0; opacity: .06;
  background-image: var(--greet-image); background-size: cover; background-position: center;
}
.hi { font-size: 22px; font-weight: 800; letter-spacing: -.02em; position: relative; }
.ganzhi-hand { display: flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 12px; color: var(--text-secondary); position: relative; }
.stamp { display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg,#e53935,#c62828);
  color: #fff; font-size: 11px; font-weight: 800; }
.stamp-inner { line-height: 1; }
.clk { font-size: 32px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; position: relative; }
.cmeta { display: flex; align-items: center; gap: 4px; color: var(--text-secondary);
  font-size: 12px; justify-content: flex-end; position: relative; }
.cmeta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-tertiary); }

/* ============================================================
   今日聚焦 — 待办列表
   ============================================================ */
.tk-list { display: flex; flex-direction: column; gap: 5px; }
.tk-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.tk-chk { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px;
  border: 1.6px solid var(--border-input); display: grid; place-items: center;
  cursor: pointer; color: var(--on-accent); transition: all .12s; }
.tk-chk:hover { border-color: var(--module-2); }
.tk-name { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.focus-empty { text-align: center; color: var(--text-tertiary); font-size: 12px;
  padding: 12px 0; }

/* 快速记录 */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.qbtn { display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-card); cursor: pointer; transition: all .12s; }
.qbtn:hover { background: var(--accent-muted); }
.qbtn .e { position: relative; width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; }
.qbtn .qplus { position: absolute; bottom: -2px; right: -3px; background: var(--surface-card);
  border-radius: 50%; display: grid; place-items: center; width: 14px; height: 14px; }
.qbtn .l { font-size: 10px; font-weight: 600; color: var(--text-secondary); }

/* 概览环图 */
.rings { display: flex; gap: 8px; margin-bottom: 8px; }
.ring { flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; cursor: pointer; }
.dial { position: relative; width: 52px; height: 52px; display: grid; place-items: center; }
.dial .mid { position: absolute; }
.gauge { width: 52px; height: 52px; }
.pct { font-size: 13px; font-weight: 800; }
.lbl { font-size: 10px; color: var(--text-secondary); }
.ov2-side { display: flex; gap: 8px; }
.ov2-stat { flex: 1; display: flex; align-items: center; gap: 6px;
  padding: 8px 0 0; cursor: pointer; }
.ov2-stat .s-ic { flex: 0 0 auto; }
.ov2-stat .s-tx { min-width: 0; }
.ov2-stat .s-v { font-size: 15px; font-weight: 800; line-height: 1; }
.ov2-stat .s-l { font-size: 9px; color: var(--text-secondary); }

/* ============================================================
   习惯打卡表格
   ============================================================ */
.habit-tb { width: 100%; border-collapse: collapse; font-size: 11px; }
.habit-tb th { padding: 2px 4px 6px; font-size: 9px; color: var(--text-secondary); }
.habit-tb .tdcol { color: var(--module-1); font-weight: 800; }
.habit-tb td { text-align: center; padding: 2px; }
.hcell { display: inline-flex; width: 20px; height: 20px; border-radius: 5px;
  border: 1.5px solid var(--border-input); align-items: center; justify-content: center;
  cursor: pointer; color: transparent; transition: all .12s; }
.hcell.on { background: var(--module-3); border-color: var(--module-3); color: #fff; }
.hcell.off { background: transparent; }
.hn { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; }
.hdot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.hrate { font-size: 9px; font-weight: 800; }

/* ============================================================
   番茄钟
   ============================================================ */
.pomo { text-align: center; padding: 4px 0; }
.pomo .pen { font-size: 10px; color: var(--text-secondary); letter-spacing: .04em; }
.ring-wrap { position: relative; display: inline-block; margin: 6px auto; }
.ring-wrap .ptime { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.ptime .t { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ptime .s { font-size: 10px; color: var(--text-secondary); }
.pctl { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0; }
.pctl .primary { background: var(--accent); color: var(--on-accent); border: none;
  border-radius: 8px; padding: 7px 20px; font-size: 13px; font-weight: 700; cursor: pointer; }
.pctl button:not(.primary) { background: none; border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 14px; font-size: 12px; cursor: pointer; }
.pstats { display: flex; justify-content: center; gap: 20px; }
.ps { text-align: center; }
.ps .pv { font-size: 16px; font-weight: 800; }
.ps .pl { font-size: 9px; color: var(--text-secondary); }

/* ============================================================
   趋势图
   ============================================================ */
.trend-svg { width: 100%; height: auto; margin-top: 6px; }
.trend-empty { display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 16px 0; color: var(--text-tertiary); font-size: 12px; }
.trend-x { display: flex; justify-content: space-between; padding: 0 4px; margin-top: 2px; }
.trend-x span { font-size: 8px; color: var(--text-tertiary); }

/* ============================================================
   消费/书籍/目标 — 通用栏目行
   ============================================================ */
.book-list { display: flex; flex-direction: column; gap: 6px; }
.book-row { display: flex; align-items: center; gap: 8px; padding: 4px 0;
  cursor: pointer; }
.book-row .spine { width: 24px; height: 24px; border-radius: 5px;
  display: grid; place-items: center; flex: 0 0 auto; }
.bmid { min-width: 0; flex: 1; }
.bmid .btt { font-size: 12px; font-weight: 700; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.bmid .bsub { font-size: 10px; color: var(--text-secondary); }
.bbar { height: 3px; border-radius: 999px; background: var(--border);
  overflow: hidden; margin-top: 3px; }
.bbar i { display: block; height: 100%; border-radius: 999px; }
.bpct { font-size: 11px; font-weight: 800; }
.spend-sum { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.spend-total { font-size: 20px; font-weight: 800; }
.spend-cap { font-size: 10px; color: var(--text-secondary); }

/* ============================================================
   模块视图 — 普通记录
   ============================================================ */
.toolbar { display: flex; align-items: center; gap: 6px; margin: 8px 0; }
.search-box { flex: 1; display: flex; align-items: center; gap: 6px;
  background: var(--surface-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; }
.search-box input { border: none; background: none; outline: none; flex: 1;
  font-size: 13px; color: var(--text); }
.sec-title { display: flex; align-items: center; font-size: 13px; font-weight: 700;
  margin: 6px 0 4px; }
.empty { text-align: center; padding: 30px 0; color: var(--text-tertiary); }
.empty .e { display: block; margin-bottom: 8px; opacity: .5; }

/* ============================================================
   进度条
   ============================================================ */
.prog-line { height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: auto; }
.prog-line i { display: block; height: 100%; border-radius: 999px; }

.stat-big { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat-big small { font-size: 13px; color: var(--text-secondary); font-weight: 700; }
.stat-cap { font-size: 11px; color: var(--text-secondary); margin-top: 5px; }

.hero { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-tile);
  background: var(--surface-card); border: 1px solid var(--border); box-shadow: var(--shadow-card); margin-bottom: 4px; }
.hero-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.hero-tx { min-width: 0; flex: 1; }
.hero-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.hero-v { font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.hero-l { font-size: 11px; color: var(--text-secondary); }

.mod-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 4px; }
.mini { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-tile);
  box-shadow: var(--shadow-card); padding: 10px; }
.mini .l { font-size: 10px; color: var(--text-secondary); }
.mini .v { font-size: 16px; font-weight: 800; margin-top: 2px; }

.rec-grid { display: flex; flex-direction: column; gap: 7px; }
.rec { position: relative; background: var(--surface-card); border: 1px solid var(--border);
  border-radius: var(--radius-tile); box-shadow: var(--shadow-card); padding: 10px 12px; }
.rec .top { display: flex; align-items: center; gap: 10px; }
.rec .chk { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; border: 1.6px solid var(--border-input);
  display: grid; place-items: center; cursor: pointer; background: var(--surface-card); color: var(--on-accent); transition: all .12s; }
.rec .chk.on { background: var(--module-1); border-color: var(--module-1); }
.rec .chk svg { opacity: 0; } .rec .chk.on svg { opacity: 1; }
.rec .body { flex: 1; min-width: 0; cursor: pointer; }
.rec .rname { font-weight: 700; font-size: 13px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec .rname.done { text-decoration: line-through; color: var(--text-secondary); }
.rec .rnote { color: var(--text-secondary); font-size: 11px; margin-top: 3px; white-space: pre-wrap; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rec .pbar { height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; margin-top: 5px; }
.rec .pbar i { display: block; height: 100%; border-radius: 999px; }
.rec .rdate { color: var(--text-secondary); font-size: 10.5px; white-space: nowrap; }
.rec .streak { font-size: 10px; color: var(--module-3); font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.rec .amt { font-size: 14px; font-weight: 800; white-space: nowrap; }
.rec .amt.exp { color: var(--danger); } .rec .amt.inc { color: var(--module-1); }
.rec .acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; }
.rec .acts button { border: none; background: var(--surface-card); color: var(--text-tertiary); cursor: pointer;
  width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; transition: all .12s; }
.rec .pin-btn.on { color: var(--module-3); }
.rec .del:hover { background: var(--danger-muted); color: var(--danger); }

/* ============================================================
   月历网格（手机版紧凑）
   ============================================================ */
.cal-nav { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px; margin-bottom: 6px; }
.cal-nav .cal-title { font-size: 14px; font-weight: 800; color: var(--module-1); }
.cal-nav button { background: none; border: 1px solid var(--border); border-radius: 7px;
  width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; color: var(--module-1); }
.cal-nav button svg { width: 16px; height: 16px; }
.cal-grid { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.cal-grid th { font-size: 10px; font-weight: 700; color: var(--text-secondary); padding: 2px 0 4px; text-align: center; }
.cal-grid th.cal-sun { color: var(--danger); }
.cal-grid th.cal-sat { color: var(--module-1); }
.cal-grid td { text-align: center; vertical-align: top; padding: 1px; width: 14.28%; }
.cal-day { display: flex; flex-direction: column; align-items: center; padding: 2px 1px 4px; border-radius: 6px; min-height: 42px; }
.cal-day:hover { background: var(--accent-muted); }
.cal-day.today { background: rgba(90,138,170,.12); border: 1px solid var(--accent); }
.cal-day.other-month { opacity: .35; }
.cal-day .d { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.2; }
.cal-day .lunar { font-size: 8px; color: var(--text-secondary); font-family: 'KaiTi','STKaiti','FangSong','STSong','楷体',cursive; line-height: 1.1; }
.cal-day .cal-events { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; margin-top: 1px; }
.cal-event-icon { display: inline-flex; margin: 0; }
.cal-event-dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; margin: 0; }

/* ============================================================
   MODAL — 弹窗/编辑器
   ============================================================ */
.overlay { position: fixed; inset: 0; background: rgba(44,58,78,0.44);
  background: color-mix(in srgb, var(--text) 44%, transparent);
  backdrop-filter: blur(3px); z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  animation: fade .16s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface-card); border-radius: 20px 20px 0 0; padding: 20px 16px;
  width: 100%; max-width: 100vw; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 -8px 30px rgba(44,58,78,0.20);
  box-shadow: 0 -8px 30px color-mix(in srgb, var(--text) 20%, transparent);
  animation: pop .18s cubic-bezier(.2,.8,.3,1); }
@keyframes pop { from { transform: translateY(20px); opacity: 0; } }
.modal h3 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.modal .sub { color: var(--text-secondary); font-size: 12px; margin: 4px 0 14px; }
.field { margin-bottom: 12px; }
.field label { display: block; color: var(--text-secondary); font-size: 12px; margin-bottom: 4px; }
.frow { display: flex; gap: 8px; } .frow .field { flex: 1; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg .opt { flex: 1; min-width: 56px; text-align: center; padding: 8px 6px; border-radius: 9px;
  border: 1px solid var(--border-input); cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); transition: all .12s; }
.seg .opt.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.modal-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.link-danger { color: var(--danger); background: none; border: none; font-size: 13px; font-weight: 600; cursor: pointer; padding: 8px; border-radius: 7px; }
.link-danger:hover { background: var(--danger-muted); }

/* ============================================================
   SYNC 状态指示器 — 头部彩色圆点
   ============================================================ */
.sync-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  transition: background .3s, box-shadow .3s; }
.sync-dot.sync-online { background: #4caf50; box-shadow: 0 0 4px rgba(76,175,80,.5); }
.sync-dot.sync-offline { background: #e53935; box-shadow: 0 0 4px rgba(229,57,53,.5); }
.sync-dot.sync-pending { background: #ff9800; box-shadow: 0 0 4px rgba(255,152,0,.5);
  animation: syncPulse 1s infinite; }
.sync-dot.sync-pushing { background: #2196f3; box-shadow: 0 0 4px rgba(33,150,243,.5);
  animation: syncPulse .6s infinite; }
@keyframes syncPulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ============================================================
   SYNC 面板 — 手机版紧凑
   ============================================================ */
#wb-sync-panel-m { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 99999;
  display: flex; align-items: flex-end; justify-content: center; }
#wb-sync-panel-m .c { background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-height: 80vh;
  overflow-y: auto; padding: 20px 16px; font-family: system-ui, sans-serif; position: relative; }
#wb-sync-panel-m .c h2 { font-size: 16px; font-weight: 700; margin: 0 0 4px; color: #1a1a2e; }
#wb-sync-panel-m .c .sub { font-size: 11px; color: #888; margin-bottom: 12px; }
#wb-sync-panel-m .c .stat { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #f5f7fa; border-radius: 8px; font-size: 12px; margin-bottom: 6px; }
#wb-sync-panel-m .c .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
#wb-sync-panel-m .c .dot.ok { background: #4caf50; }
#wb-sync-panel-m .c .dot.offline { background: #e53935; }
#wb-sync-panel-m .c .dot.pending { background: #ff9800; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
#wb-sync-panel-m .c .row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
#wb-sync-panel-m .c button { padding: 7px 12px; border-radius: 7px; border: none; font-size: 11px; font-weight: 600; cursor: pointer; }
#wb-sync-panel-m .c .bp { background: #5a8aaa; color: #fff; }
#wb-sync-panel-m .c .bo { background: #fff; color: #5a8aaa; border: 1.5px solid #5a8aaa; }
#wb-sync-panel-m .c .bx { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 18px; cursor: pointer; color: #aaa; }
#wb-sync-panel-m .c pre { background: #1a1a2e; color: #a8e6cf; padding: 8px; border-radius: 6px; font-size: 10px; line-height: 1.4; overflow: auto; max-height: 100px; margin-top: 6px; white-space: pre-wrap; word-break: break-all; }

/* ============================================================
   SCROLLBAR 美化
   ============================================================ */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 3px; }

/* ============================================================
   八字日记 — 组件样式（宋式 · 小猫元素）
   ============================================================ */
/* 首页「今日八字」卡片 */
.diary-tile { position: relative; overflow: hidden; }
.diary-tile::after { content:"🐾"; position:absolute; right:14px; bottom:10px; font-size:22px; opacity:.5; transform:rotate(-15deg); }
.diary-gz-badge { display:inline-flex; align-items:center; padding:2px 9px; border-radius:999px;
  background: linear-gradient(135deg, rgba(141,184,216,.22), rgba(107,154,196,.18));
  border: 1px solid rgba(107,154,196,.35); color: var(--module-4);
  font-family: var(--font-kai); font-size: 13px; font-weight: 800; letter-spacing:.05em; }
.diary-tile-main { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.diary-tile-gz b { font-family: var(--font-kai); font-size: 26px; font-weight: 800; color: var(--module-4); letter-spacing:.06em; }
.diary-tile-gz span { font-size: 11px; color: var(--text-secondary); margin-left: 4px; }
.diary-tile-meta { font-size: 11px; color: var(--text-tertiary); }

/* 模块顶部「今日」卡 */
.diary-today { display:flex; align-items:center; gap:12px; }
.diary-today-gz { display:flex; flex-direction:column; align-items:center; gap:1px; flex:0 0 auto;
  padding: 8px 12px; border-radius: 12px; background: linear-gradient(135deg, rgba(141,184,216,.25), rgba(107,154,196,.15));
  border: 1px solid rgba(107,154,196,.35); }
.diary-today-gz b { font-family: var(--font-kai); font-size: 22px; font-weight: 800; color: var(--module-4); letter-spacing:.06em; }
.diary-today-gz span { font-size: 9px; color: var(--text-secondary); }
.diary-today-info { flex:1; min-width:0; }
.diary-today-date { font-size: 14px; font-weight: 800; font-family: var(--font-kai); }
.diary-today-lunar { font-size: 10px; color: var(--text-secondary); margin-top: 2px; line-height:1.5; }
.diary-today-btn { flex:0 0 auto; }

/* 天干/地支筛选 chips */
.diary-chips { display:flex; flex-direction:column; gap:6px; margin: 0 0 12px; }
.diary-chips-row { display:flex; flex-wrap:wrap; align-items:center; gap:5px; }
.diary-chips-tag { font-size:10px; color: var(--text-tertiary); font-weight:700; margin-right:2px; }
.diary-chip { display:inline-flex; align-items:center; justify-content:center; min-width:30px; height:26px;
  padding: 0 8px; border-radius: 999px; border: 1px solid var(--border-input);
  background: var(--surface-card); color: var(--text-secondary);
  font-family: var(--font-kai); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .12s; }
.diary-chip.on { background: var(--module-4); border-color: var(--module-4); color: #fff; }

/* 事件统计 */
.diary-stats { display:flex; flex-direction:column; gap:7px; }
.diary-stat-row { display:flex; align-items:center; gap:7px; }
.diary-stat-ic { display:inline-flex; flex:0 0 auto; }
.diary-stat-name { font-size: 12px; font-weight: 700; width: 44px; flex:0 0 auto; }
.diary-stat-bar { flex:1; height: 6px; border-radius: 999px; background: var(--border); overflow:hidden; }
.diary-stat-bar i { display:block; height:100%; border-radius: 999px; }
.diary-stat-n { font-size: 11px; font-weight: 800; color: var(--text-secondary); flex:0 0 auto; }

/* 日记条目 */
.diary-rec-head { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.diary-rec-date { font-size: 11px; color: var(--text-secondary); }
.diary-rec .rnote { white-space: pre-wrap; }

/* 编辑器干支预览 */
.diary-gz { font-family: var(--font-kai); font-size: 16px; color: var(--module-4); }
.diary-gz b { font-size: 20px; letter-spacing:.06em; }

/* 7 个底部 Tab 时略微收紧 */
.tab-item .tab-label { font-size: 10px; letter-spacing: 0; }
.tab-item { gap: 2px; padding: 5px 1px 3px; }