/* ============================================================
   我的灯塔 · My Lighthouse
   全局设计令牌 / 奶油风 + 莫兰迪六模块分色
   ============================================================ */

:root {
  /* ---- 全局奶油配色 ---- */
  --cream: #FBF7F2;
  --card: #FFFFFF;
  --ink: #4A4542;
  --ink-2: #8A8582;
  --line: #EFEAE4;
  --line-soft: #F5F0EA;
  --fill-soft: #FDFBF8;

  /* ---- 阴影 ---- */
  --sh-1: 0 2px 8px rgba(74, 69, 66, .04);
  --sh-2: 0 8px 24px rgba(74, 69, 66, .06);
  --sh-3: 0 14px 40px rgba(74, 69, 66, .10);

  /* ---- 圆角 ---- */
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 14px;

  /* ---- 布局 ---- */
  --rail-w: 76px;

  /* ---- 模块配色（默认：首页暖中性） ---- */
  --m-main: #C9BEB2;
  --m-soft: #EFE7DE;
  --m-deep: #8A8582;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---- 六大模块专属莫兰迪配色 ---- */
[data-view="news"]    { --m-main: #A9B8C7; --m-soft: #D7DEE6; --m-deep: #7F94A8; } /* 雾霾蓝 */
[data-view="english"] { --m-main: #B7C9BE; --m-soft: #D7E2DB; --m-deep: #8FAE9B; } /* 薄荷绿 */
[data-view="books"]   { --m-main: #D8C7B5; --m-soft: #EEE3D6; --m-deep: #B59E84; } /* 浅杏色 */
[data-view="skills"]  { --m-main: #BFB5C7; --m-soft: #E2DCE7; --m-deep: #9A8CA8; } /* 薰衣草紫 */
[data-view="life"]    { --m-main: #BFA894; --m-soft: #E9DFD4; --m-deep: #9A8069; } /* 浅茶棕 */
[data-view="culture"] { --m-main: #B9A7A3; --m-soft: #E7DEDB; --m-deep: #94807B; } /* 灰豆沙 */
[data-view="memo"]    { --m-main: #D9B5B0; --m-soft: #F0DDDA; --m-deep: #B5847E; } /* 浅珊瑚 */
[data-view="finance"] { --m-main: #A5B7B8; --m-soft: #D6E0E1; --m-deep: #7A9395; } /* 灰蓝绿 */
[data-view="beauty"]  { --m-main: #D3B3BC; --m-soft: #EFDDE2; --m-deep: #AE8A97; } /* 柔玫瑰粉 */

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }

/* ============================================================
   左侧固定纵向导航栏
   ============================================================ */
.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 0 calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-right: 1px solid var(--line);
}

.rail-brand {
  width: 32px; height: 32px;
  border-radius: 11px;
  background: linear-gradient(150deg, #EFE7DE, #FBF7F2 60%, #E7EEF4);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  margin-bottom: 6px;
  flex: none;
}
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(140deg, #A9B8C7, #B7C9BE 45%, #D8C7B5 80%);
  box-shadow: 0 2px 6px rgba(74, 69, 66, .12);
}

.rail-nav {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow-y: auto;
  scrollbar-width: none;
}
.rail-nav::-webkit-scrollbar { display: none; }

.rail-btn {
  width: 62px;
  padding: 7px 2px 6px;
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--ink-2);
  transition: background .26s var(--ease), color .26s var(--ease), transform .18s var(--ease);
}
.rail-btn .rail-ico { display: grid; place-items: center; height: 21px; }
.rail-btn .rail-ico svg { width: 21px; height: 21px; }
.rail-btn .rail-label { font-size: 9.5px; letter-spacing: .01em; white-space: nowrap; }
.rail-btn:active { transform: scale(.94); }
.rail-btn.is-on {
  background: var(--m-soft);
  color: var(--m-deep);
}
.rail-btn.is-on .rail-label { font-weight: 600; }
.rail-btn:not(.is-on):hover { background: var(--line-soft); }

.rail-foot { width: 100%; display: flex; justify-content: center; padding-top: 6px; }
.ico-muted { color: var(--ink-2); }

/* ============================================================
   主内容区
   ============================================================ */
.stage {
  margin-left: var(--rail-w);
  min-height: 100%;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px calc(env(safe-area-inset-bottom, 0px) + 48px);
  max-width: 900px;
}

.view { display: none; }
.view.is-active { display: block; animation: viewIn .42s var(--ease) both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.view.is-active .card,
.view.is-active .mini-stats,
.view.is-active .filter-row,
.view.is-active .segmented {
  animation: fadeIn .46s var(--ease) both;
}
.view.is-active .card:nth-of-type(2) { animation-delay: .05s; }
.view.is-active .card:nth-of-type(3) { animation-delay: .09s; }

/* ---- 视图头部 ---- */
.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.eyebrow {
  font-size: 10.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--m-deep);
  opacity: .9;
  margin-bottom: 4px;
}
.view-title { font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.view-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 26px 0 10px;
  padding-left: 2px;
}
.foot-note { font-size: 11.5px; color: var(--ink-2); margin-top: 14px; line-height: 1.7; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.hint-line { font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; line-height: 1.7; }

/* ============================================================
   卡片
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: 18px;
}
.card + .card, .card + .list-grid, .list-grid + .card, .card + .fin-summary { margin-top: 12px; }

/* ============================================================
   首页
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 26px 20px 22px;
  text-align: center;
}
.hero-clock { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.clock {
  font-size: clamp(52px, 17vw, 72px);
  font-weight: 250;
  letter-spacing: -.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.clock-sec {
  font-size: 15px;
  font-weight: 500;
  color: var(--m-deep);
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  text-align: left;
}
.clock-date { margin-top: 12px; font-size: 14px; color: var(--ink); font-weight: 500; }
.clock-meta { margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.hero-glow {
  position: absolute;
  inset: -60% -20% auto -20%;
  height: 180px;
  background: radial-gradient(closest-side, rgba(233, 224, 214, .55), rgba(233, 224, 214, 0));
  pointer-events: none;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}
.stat-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  padding: 13px 12px;
}
.stat-tile .v {
  font-size: 19px;
  font-weight: 600;
  color: var(--m-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.stat-tile .v small { font-size: 11px; font-weight: 500; margin-left: 2px; }
.stat-tile .k { font-size: 11px; color: var(--ink-2); margin-top: 3px; }

.mode-card { padding: 14px 16px; }
.mode-inline { display: flex; align-items: center; gap: 12px; }
.mode-inline > div { flex: 1; min-width: 0; }
.mode-inline strong { font-size: 14px; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ---- 每日一句 ---- */
.sentence-card { position: relative; overflow: hidden; }
.sentence-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--m-main), var(--m-soft));
}
.sentence-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.sentence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--m-deep);
  background: var(--m-soft);
  border-radius: 999px;
  padding: 4px 10px;
}
.sentence-en {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: .002em;
}
.sentence-zh { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.sentence-note {
  font-size: 12px;
  color: var(--m-deep);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  line-height: 1.7;
}
.sentence-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--sh-1);
  transition: transform .16s var(--ease), background .24s var(--ease),
    box-shadow .24s var(--ease), color .24s var(--ease), opacity .24s var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(.955); box-shadow: none; }
.btn:disabled { opacity: .5; }
.btn.primary {
  background: var(--m-main);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--m-main) 42%, transparent);
}
.btn.ghost { background: rgba(255, 255, 255, .7); }
.btn.quiet { background: var(--line-soft); border-color: transparent; box-shadow: none; color: var(--ink); }
.btn.danger { color: #B5847E; border-color: #F0DDDA; background: #FDF7F6; }
.btn.tiny { padding: 6px 12px; font-size: 12px; box-shadow: none; }
.btn.on { background: var(--m-soft); border-color: var(--m-main); color: var(--m-deep); }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 12px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  transition: transform .16s var(--ease), background .24s var(--ease);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:active { transform: scale(.92); }

/* ============================================================
   分段控件 / 筛选 chip
   ============================================================ */
.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--line-soft);
  border-radius: 999px;
  margin-bottom: 14px;
}
.seg {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  transition: background .26s var(--ease), color .26s var(--ease), box-shadow .26s var(--ease);
}
.seg.is-on { background: var(--card); color: var(--m-deep); font-weight: 600; box-shadow: var(--sh-1); }
.tiny-seg { margin-bottom: 4px; }
.tiny-seg .seg { padding: 7px 10px; font-size: 12.5px; }

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filter-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 12.5px;
  white-space: nowrap;
  transition: all .24s var(--ease);
}
.chip.is-on {
  background: var(--m-soft);
  border-color: color-mix(in srgb, var(--m-main) 60%, var(--line));
  color: var(--m-deep);
  font-weight: 600;
}
.chip:active { transform: scale(.95); }

/* ============================================================
   表单
   ============================================================ */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--fill-soft);
  font-size: 14px;
  transition: border-color .24s var(--ease), box-shadow .24s var(--ease), background .24s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) center, calc(100% - 11px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--m-main);
  background: var(--card);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--m-main) 22%, transparent);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.field + .field, .field-row + .field, .field + .field-row { margin-top: 10px; }
.form-actions { display: flex; gap: 8px; margin-top: 14px; }
.form-actions.wrap { flex-wrap: wrap; }
.tiny-field > span { font-size: 11.5px; }

/* ---- 折叠式添加卡片 ---- */
.add-card { padding: 0; overflow: hidden; }
.add-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--m-deep);
  text-align: left;
}
.add-toggle .plus {
  width: 22px; height: 22px;
  border-radius: 8px;
  background: var(--m-soft);
  display: grid; place-items: center;
  flex: none;
}
.add-toggle .plus svg { width: 13px; height: 13px; }
.add-toggle:active { background: var(--line-soft); }
.add-body { display: none; padding: 0 18px 18px; }
.add-card.is-open .add-body { display: block; animation: fadeIn .3s var(--ease) both; }

/* ============================================================
   列表 / 条目
   ============================================================ */
.list-grid { display: grid; gap: 12px; }

.item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  padding: 15px 16px;
  transition: box-shadow .26s var(--ease), transform .2s var(--ease);
}
.item:active { transform: scale(.995); }
.item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.item-title { font-size: 15px; font-weight: 600; line-height: 1.45; }
.item-sub { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.item-body { font-size: 13.5px; line-height: 1.7; color: var(--ink); margin-top: 8px; }
.item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}
.item-acts { display: flex; gap: 6px; align-items: center; }
.item-acts .icon-btn { width: 30px; height: 30px; border-radius: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--m-soft);
  color: var(--m-deep);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.pill.plain { background: var(--line-soft); color: var(--ink-2); }

.trend-box {
  margin-top: 10px;
  background: var(--m-soft);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.75;
  color: color-mix(in srgb, var(--m-deep) 78%, var(--ink));
}
.trend-box b { color: var(--m-deep); font-weight: 600; }

.empty {
  text-align: center;
  color: var(--ink-2);
  font-size: 12.5px;
  padding: 26px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .5);
  line-height: 1.8;
}

/* ============================================================
   统计条 / 进度条 / 打卡
   ============================================================ */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.mini-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  padding: 12px;
}
.mini-stat .v {
  font-size: 17px;
  font-weight: 650;
  color: var(--m-deep);
  font-variant-numeric: tabular-nums;
}
.mini-stat .v small { font-size: 11px; font-weight: 500; }
.mini-stat .k { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
  margin-top: 12px;
}
.bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--m-soft), var(--m-main));
  transition: width .5s var(--ease);
}

.goal-card .goal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.goal-card .goal-head strong { font-size: 14.5px; font-weight: 600; }
.goal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

.checkin-strip { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.ck {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--line-soft);
  color: var(--ink-2);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}
.ck svg { width: 13px; height: 13px; }
.ck.done { background: var(--m-main); color: #fff; }
.ck.today { border-color: var(--m-main); box-shadow: 0 0 0 3px color-mix(in srgb, var(--m-main) 20%, transparent); }

/* ============================================================
   技能模块
   ============================================================ */
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.skill-card { border-left: 4px solid var(--m-main); }
.match-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--m-deep);
  background: var(--m-soft);
  border-radius: 999px;
  padding: 3px 9px;
}
.know-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.know-list .pill { background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 500; }

.path { margin-top: 12px; display: grid; gap: 8px; }
.path-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  line-height: 1.65;
}
.path-idx {
  flex: none;
  width: 20px; height: 20px;
  border-radius: 7px;
  background: var(--m-soft);
  color: var(--m-deep);
  font-size: 11px;
  font-weight: 700;
  display: grid; place-items: center;
  margin-top: 1px;
}
.tut-list { margin-top: 10px; display: grid; gap: 8px; }
.tut {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink);
  background: var(--fill-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 11px;
}
.tut .tut-type {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  color: var(--m-deep);
  background: var(--m-soft);
  border-radius: 6px;
  padding: 2px 6px;
}
.tut .tut-meta { margin-left: auto; color: var(--ink-2); font-size: 11px; white-space: nowrap; }

.sub-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--m-deep);
  margin: 14px 0 2px;
}

/* ============================================================
   备忘录
   ============================================================ */
.memo-grid { grid-template-columns: 1fr; }
.memo-text { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.75; }
.memo-meta { font-size: 11px; color: var(--ink-2); }

/* ============================================================
   记账
   ============================================================ */
.fin-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.fin-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  padding: 14px 12px;
  text-align: center;
}
.fin-tile .k { font-size: 11px; color: var(--ink-2); }
.fin-tile .v {
  font-size: 17px;
  font-weight: 650;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.fin-tile .v.income { color: #B5847E; }  /* 收入 · 暖色 */
.fin-tile .v.expense { color: #7A9395; } /* 支出 · 冷色 */
.fin-tile .v.balance { color: var(--ink); }

.chart-card { margin-top: 12px; }
.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.chart-head strong { font-size: 14px; font-weight: 600; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.legend { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.breakdown { display: grid; gap: 10px; }
.bk-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: center; }
.bk-name { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-bar { height: 9px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bk-bar > i { display: block; height: 100%; border-radius: 999px; }
.bk-val { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.rec-amount { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rec-amount.income { color: #B5847E; }
.rec-amount.expense { color: #7A9395; }

/* ============================================================
   设置面板（底部抽屉）
   ============================================================ */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet[hidden] { display: none; }
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(74, 69, 66, .26);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn .28s var(--ease) both;
}
.sheet-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--cream);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--line);
  box-shadow: 0 -14px 40px rgba(74, 69, 66, .14);
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 22px);
  animation: sheetUp .38s var(--ease) both;
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.sheet-grab {
  width: 40px; height: 4px; border-radius: 999px;
  background: var(--line);
  margin: 6px auto 4px;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 2px 12px;
}
.sheet-head h2 { font-size: 18px; font-weight: 650; }
.sheet-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  padding: 15px 16px;
  margin-bottom: 12px;
}
.sheet-block h3 { font-size: 13.5px; font-weight: 650; margin-bottom: 8px; }
.sheet-block .segmented { margin-bottom: 10px; }

.switch-list { display: grid; gap: 2px; margin-top: 10px; }
.switch-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.switch-row:last-child { border-bottom: none; }
.switch-row .sw-name { flex: 1; font-size: 13.5px; }
.switch-row .sw-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.switch { position: relative; flex: none; width: 46px; height: 28px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.switch .track {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: var(--line);
  transition: background .28s var(--ease);
}
.switch .knob {
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(74, 69, 66, .18);
  transition: transform .28s var(--ease);
}
.switch input:checked ~ .track { background: var(--m-main); }
.switch input:checked ~ .knob { transform: translateX(18px); }

/* ============================================================
   Toast / 其它
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 26px);
  transform: translate(-50%, 12px);
  background: rgba(74, 69, 66, .94);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--sh-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
  z-index: 80;
  max-width: 84vw;
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.tts-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.tts-pulse {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--m-main);
  flex: none;
}
.tts-pulse.on { animation: pulse 1.25s var(--ease) infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--m-main) 55%, transparent); }
  50% { transform: scale(1.12); opacity: .8; box-shadow: 0 0 0 7px color-mix(in srgb, var(--m-main) 0%, transparent); }
}
.tts-text { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   生活常识
   ============================================================ */
.tip-points {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}
.tip-points li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
}
.tip-points li::before {
  content: "";
  position: absolute;
  left: 4px; top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--m-main);
}
.tip-cat {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--m-soft);
  color: var(--m-deep);
  font-size: 11px;
  font-weight: 600;
}
.icon-btn.is-fav {
  background: var(--m-soft);
  border-color: color-mix(in srgb, var(--m-main) 55%, var(--line));
  color: var(--m-deep);
}
.icon-btn.is-fav svg { fill: currentColor; }

/* ============================================================
   知识文化每日储备
   ============================================================ */
.culture-today {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 18px;
}
.culture-today::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--m-main), var(--m-soft));
}
.culture-title { font-size: 17px; font-weight: 650; margin-top: 8px; line-height: 1.5; }
.quote-block {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  background: var(--fill-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--m-main);
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
  letter-spacing: .01em;
}
.quote-block .src {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--m-deep);
  letter-spacing: .02em;
}
.culture-note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-2);
}
.culture-note b { color: var(--m-deep); font-weight: 600; }
.saved-quote {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--fill-soft);
  border: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ============================================================
   美丽修养
   ============================================================ */
.pitfall {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--m-soft) 55%, #ffffff);
  border: 1px dashed color-mix(in srgb, var(--m-main) 60%, var(--line));
  font-size: 12.5px;
  line-height: 1.75;
  color: color-mix(in srgb, var(--m-deep) 82%, var(--ink));
}
.pitfall b { color: var(--m-deep); font-weight: 650; }

/* 每日推送卡片（与文化储备通用，柔玫瑰粉模块同样适用） */
.daily-card {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 18px;
}
.daily-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--m-main), var(--m-soft));
}

/* ============================================================
   响应式：更宽屏幕
   ============================================================ */
@media (min-width: 620px) {
  :root { --rail-w: 88px; }
  .rail-btn { width: 74px; }
  .rail-btn .rail-label { font-size: 11px; }
  .list-grid { grid-template-columns: 1fr 1fr; }
  .memo-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .stage { padding-left: 24px; padding-right: 24px; }
  .sheet-panel {
    left: 50%; right: auto;
    transform: translateX(-50%);
    width: min(560px, 92vw);
    border-radius: 28px 28px 0 0;
    animation: sheetUp .38s var(--ease) both;
  }
}
@media (min-width: 900px) {
  .stage { padding-left: 32px; }
}
