/* ============================
   个人成长工作台 - 样式表（v4 布局版）
   ============================ */

/* --- 变量 --- */
:root {
  --primary: #F59E0B;
  --primary-light: #FCD34D;
  --primary-dark: #D97706;
  --primary-bg: #FFFBEB;
  --bg: #F3F4F6;
  --card-bg: #FFFFFF;
  --text: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --success: #10B981;
  --success-bg: #ECFDF5;
  --danger: #EF4444;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.07);
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ======== 顶部导航栏 ======== */
.header {
  background: #FFFFFF;
  color: var(--text);
  padding: 16px 0;
  flex-shrink: 0;
  z-index: 10;
  border-bottom: 2px solid var(--primary);   /* 琥珀橙细底边，呼应主色 */
}
.header .container { padding: 0 16px; }
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 1 auto;
  min-width: 0;
}
.header-mid { flex: 1 1 auto; }
.header-left-top { display: flex; align-items: center; gap: 8px; }
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: 0 1 auto;
  min-width: 0;
}
.greeting { font-size: 0.85rem; opacity: 0.85; color: var(--text-secondary); }
.user-name { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.5px; color: var(--text); }
.header-time {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 3px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.1;
}
.header-dateinfo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  font-size: 0.7rem;
  opacity: 0.9;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.4;
}
.header-dateinfo .date-divider { display: none; }
.daily-quote { font-size: 0.78rem; opacity: 0.6; font-style: italic; color: var(--text-muted); }

/* ======== 主体区域 ======== */
.app-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* --- 侧边导航（桌面端） --- */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 8px;
  background: linear-gradient(180deg, #1A1A2E 0%, #16213E 100%);
  flex-shrink: 0;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 10px;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 2px 12px rgba(245,158,11,0.3);
}
.nav-item .nav-icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.nav-item .nav-label { font-size: 0.82rem; font-weight: 500; }

/* --- 内容区 --- */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
}

/* ======== 移动端：底部导航（替代侧边栏） ======== */
@media (max-width: 767px) {
  .sidebar-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    flex-direction: row;
    justify-content: space-around;
    padding: 4px 0 env(safe-area-inset-bottom, 8px);
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    z-index: 100;
  }
  .nav-item {
    flex-direction: column;
    gap: 1px;
    padding: 4px 10px;
    font-size: 0.65rem;
    color: var(--text-muted);
    border-radius: var(--radius-xs);
  }
  .nav-item.active { color: var(--primary); background: var(--primary-bg); }
  .nav-item .nav-icon { font-size: 1.3rem; width: auto; }
  .nav-item .nav-label { font-size: 0.65rem; }
  .nav-item:hover { background: transparent; color: inherit; }

  .content-area { padding: 12px 0 80px; }
  .app-body { overflow: visible; }
  body { height: auto; }
}

/* ======== 容器 ======== */
.container { max-width: 640px; margin: 0 auto; padding: 0 12px; }

@media (min-width: 768px) {
  .sidebar-nav { width: 180px; }
  .content-area { padding: 20px 24px; }
  .header .container { max-width: 100%; padding: 0 24px; }
  .main.container { max-width: 960px; margin: 0 auto; }
}

/* --- 统计卡片 --- */
.stats-row { display: flex; gap: 8px; margin: 0 0 12px; }
.stat-card {
  flex: 1; min-width: 0; background: var(--card-bg); border-radius: var(--radius-sm);
  padding: 16px 10px; display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon { font-size: 1.2rem; flex-shrink: 0; }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 1.2rem; font-weight: 700; color: var(--primary-dark); line-height: 1.2; white-space: nowrap; }
.stat-label { font-size: 0.66rem; color: var(--text-secondary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-clickable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.stat-clickable:active { transform: scale(0.97); }
.stat-sub { font-size: 0.58rem; color: var(--text-muted); line-height: 1.2; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- 通用卡片 --- */
.section {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 16px 14px; margin-bottom: 12px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: var(--transition);
}
.section:hover { box-shadow: var(--shadow-md); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-header h2 { font-size: 0.95rem; font-weight: 600; }
.section-subtitle { font-size: 0.75rem; color: var(--text-secondary); }

/* --- 页面特色 --- */
#page-daily .section:first-of-type { border-left: 3px solid #F59E0B; }
#page-daily .section-header h2 { color: var(--primary-dark); }
#page-data .section:first-of-type { border-left: 3px solid #0EA5E9; }
#page-data .section-header h2 { color: #0284C7; }
.dc-sub-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.92rem; font-weight: 700; color: var(--primary-dark);
  margin: 18px 0 10px;
}
.dc-sub-title::before {
  content: ''; width: 4px; height: 15px; border-radius: 2px;
  background: var(--primary); flex-shrink: 0;
}

/* --- 任务列表 --- */
.task-list { display: flex; flex-direction: column; gap: 6px; }
.task-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  background: #E5E7EB; transition: var(--transition); cursor: pointer;
}
.task-item:hover { background: #D1D5DB; }
.task-item.completed { opacity: 0.6; background: var(--success-bg); }
.task-item.completed .task-label { text-decoration: line-through; color: var(--text-muted); }
.task-check { flex-shrink: 0; }
.check-box {
  display: block; width: 20px; height: 20px;
  border: 2.5px solid var(--text-muted); border-radius: 50%;
  transition: var(--transition); position: relative;
}
.task-item.completed .check-box { background: var(--success); border-color: var(--success); }
.task-item.completed .check-box::after {
  content: '✓'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); color: #fff; font-size: 0.65rem; font-weight: 700;
}
.task-content { flex: 1; display: flex; align-items: center; gap: 8px; }
.task-emoji { font-size: 1rem; }
.task-label { font-weight: 500; font-size: 0.85rem; }
.task-desc { font-size: 0.72rem; color: var(--text-muted); display: block; }
.task-streak { font-size: 0.75rem; color: var(--primary); flex-shrink: 0; }

/* --- 任务完成记录徽章 --- */
.record-badge {
  display: flex; align-items: center; gap: 8px;
  width: fit-content;
  font-size: 0.68rem; font-weight: 600;
  padding: 2px 10px; border-radius: 999px;
  margin-top: 4px; white-space: nowrap;
  background: var(--primary-bg); color: var(--primary-dark);     /* 统一淡黄背景 */
}
.record-badge .rb-value { font-weight: 700; }
.record-badge .rb-label { font-weight: 700; }
.record-badge .rb-time  { font-weight: 500; opacity: 0.75; }
/* 完成状态文字色：未达标绿 / 达标蓝 / 超额红 */
.record-under   .rb-label { color: var(--success); }             /* 未达标 绿 */
.record-reached .rb-label { color: #3B82F6; }                    /* 达标 蓝 */
.record-over    .rb-label { color: var(--danger); }              /* 超额 红 */
.record-plain { background: var(--primary-bg); color: var(--primary-dark); }  /* 无目标 淡黄 */

.task-item .eng-task-delete { opacity: 0.6; transition: var(--transition); background: none; border: none; font-size: 0.75rem; cursor: pointer; padding: 2px 6px; border-radius: 4px; color: var(--text-muted); flex-shrink: 0; }
.task-item .eng-task-delete:hover { opacity: 1; color: #EF4444; background: rgba(239,68,68,0.08); }
.task-item.completed .task-streak { color: var(--primary); }
/* 每日清单任务项：删除叉号 */
.task-item .task-item-del {
  flex-shrink: 0; font-size: 0.72rem; line-height: 1;
  color: var(--text-muted); background: none; border: none;
  cursor: pointer; padding: 4px 5px; border-radius: 4px; opacity: 0.5;
  transition: var(--transition); margin-left: 2px;
}
.task-item .task-item-del:hover { opacity: 1; color: #EF4444; background: rgba(239,68,68,0.08); }

/* --- 今日待办：未到执行日的任务（只展示，不可勾选） --- */
.task-item.not-due { opacity: 0.55; cursor: default; }
.task-item.not-due:hover { background: #E5E7EB; }
.task-item.not-due .task-label { color: var(--text-muted); }
.task-item.not-due .check-box { border-color: var(--border); background: var(--bg); }
.task-item.not-due .task-item-del { cursor: pointer; }
.task-notdue-hint {
  display: inline-flex; align-items: center;
  font-size: 0.68rem; font-weight: 600;
  color: var(--text-secondary); background: var(--bg);
  border: 1px dashed var(--border); border-radius: 999px;
  padding: 1px 8px; margin-top: 3px;
}

/* --- 任务列表通用 --- */
.task-list-generic { display: flex; flex-direction: column; gap: 6px; }
.eng-task-empty { text-align: center; color: var(--text-muted); font-size: 0.82rem; padding: 20px 0; }

/* --- 倒数日 --- */
.countdown-list { display: flex; flex-direction: column; gap: 6px; }
.countdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: #E5E7EB; transition: var(--transition);
}
.countdown-item .cd-icon { font-size: 1.2rem; }
.countdown-item .cd-body { flex: 1; min-width: 0; }
.countdown-item .cd-name { font-weight: 500; font-size: 0.85rem; }
.countdown-item .cd-name.completed { text-decoration: line-through; color: var(--text-muted); }
.countdown-item .cd-date { font-size: 0.72rem; color: var(--text-muted); }
.countdown-item .cd-badge { font-size: 0.62rem; color: var(--text-muted); background: var(--card-bg); padding: 1px 6px; border-radius: 3px; display: inline-block; margin-left: 4px; }
.countdown-item .cd-days {
  font-size: 0.85rem; font-weight: 600; color: var(--primary-dark);
  text-align: right; line-height: 1.4; white-space: nowrap;
}
.countdown-item .cd-days .cd-num { font-size: 1.3rem; font-weight: 800; }
.countdown-item .cd-days .cd-unit { opacity: 0.4; font-weight: 400; font-size: 0.72rem; }
.countdown-item .cd-delete { font-size: 0.75rem; color: var(--text-muted); background: none; border: none; cursor: pointer; padding: 2px 6px; border-radius: 4px; opacity: 0.6; }
.countdown-item .cd-delete:hover { opacity: 1; color: #EF4444; background: rgba(239,68,68,0.08); }
.countdown-empty { text-align: center; color: var(--text-muted); font-size: 0.82rem; padding: 20px 0; }

/* --- 日期选择器（倒数日弹窗） --- */
.cd-date-tabs {
  display: flex; gap: 0; margin-bottom: 8px; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--border); background: var(--bg);
}
.cd-date-tabs .cd-tab {
  flex: 1; text-align: center; padding: 7px 0; font-size: 0.82rem;
  font-weight: 500; cursor: pointer; transition: var(--transition);
  color: var(--text-muted); background: var(--bg); user-select: none;
}
.cd-date-tabs .cd-tab.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; box-shadow: 0 2px 8px rgba(245,158,11,0.25);
}
.cd-date-tabs .cd-tab:not(.active):hover { color: var(--text); background: var(--border); }
#cdSolarPicker { }
.cd-solar-selects { display: flex; gap: 6px; }
.cd-solar-selects select { flex: 1; }
.cd-lunar-selects { display: flex; gap: 6px; }
.cd-lunar-selects select { flex: 1; }
.cd-lunar-selects select:nth-child(1) { flex: 2.2; min-width: 130px; }

/* --- 模板管理 --- */
.template-manager { display: flex; flex-direction: column; gap: 8px; }
.template-list { display: flex; flex-direction: column; gap: 4px; max-height: 150px; overflow-y: auto; background: var(--bg); border-radius: var(--radius-sm); padding: 6px; }
.template-item { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; cursor: pointer; transition: var(--transition); background: var(--card-bg); border: 1px solid var(--border); font-size: 0.82rem; }
.template-item:hover { background: var(--primary-bg); border-color: var(--primary); }
.template-item.selected { background: var(--primary-bg); border-color: var(--primary); color: var(--primary-dark); font-weight: 500; }
.template-item .template-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-item .template-del { font-size: 0.7rem; color: var(--text-muted); background: none; border: none; cursor: pointer; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
.template-item .template-del:hover { color: #EF4444; background: rgba(239,68,68,0.08); }
.template-add-row { display: flex; gap: 6px; }
.template-add-row .template-input { flex: 1; }
.template-empty { text-align: center; color: var(--text-muted); font-size: 0.82rem; padding: 16px 0; }

/* --- 任务目标 --- */
.target-row { display: flex; align-items: center; gap: 8px; }
.target-type-select { flex: 0 0 100px; }
.target-input { flex: 0 0 100px; }
.target-unit { font-size: 0.85rem; color: var(--text-secondary); min-width: 30px; }

/* --- 进度条（阶段任务卡片复用，原「当前阅读」样式） --- */
.reading-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.reading-book { font-weight: 600; font-size: 0.88rem; }
.reading-chapter { font-size: 0.78rem; color: var(--text-secondary); }
.reading-bar { height: 5px; background: #E5E7EB; border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.reading-bar-fill { height: 100%; background: linear-gradient(90deg, #3B82F6, #8B5CF6); border-radius: 3px; transition: width 0.5s ease; }
.reading-actions { display: flex; gap: 8px; }

/* --- 阶段任务 --- */
.stage-task-list { display: flex; flex-direction: column; gap: 8px; }
.stage-task-card {
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg);
}
.stage-task-card.completed { opacity: 0.85; }
.stage-task-card.completed .reading-bar-fill { background: var(--success); }
.stage-task-intro { font-size: 0.78rem; color: var(--text-secondary); margin: 0 0 8px; line-height: 1.6; word-break: break-word; }
.stage-task-date { font-size: 0.75rem; color: var(--text-muted); }
.stage-task-done { background: var(--success); color: #fff; }
.stage-task-done:hover { filter: brightness(1.06); transform: translateY(-1px); }
.stage-task-del {
  background: none; border: none; color: var(--text-muted); font-size: 0.75rem;
  cursor: pointer; margin-left: auto; padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
}
.stage-task-del:hover { color: #EF4444; background: rgba(239,68,68,0.08); }

/* --- 按钮 --- */
.btn:disabled { opacity: 0.4; cursor: default; transform: none !important; box-shadow: none !important; }
.btn { border: none; border-radius: var(--radius-sm); padding: 7px 14px; font-size: 0.82rem; cursor: pointer; transition: var(--transition); font-weight: 500; }
.btn-small { padding: 5px 10px; font-size: 0.75rem; }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; box-shadow: 0 2px 8px rgba(245,158,11,0.25); }
.btn-primary:hover { box-shadow: 0 4px 16px rgba(245,158,11,0.35); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { background: var(--bg); border-color: var(--text-muted); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg); }

/* --- 读书计划 --- */
.book-plan { display: flex; flex-direction: column; gap: 5px; }
.book-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid transparent; transition: var(--transition); }
.book-item.active { border-color: var(--primary); background: var(--primary-bg); }
.book-left { display: flex; flex-direction: column; align-items: center; min-width: 50px; }
.book-period { font-size: 0.65rem; color: var(--text-muted); font-weight: 500; }
.book-priority { font-size: 0.9rem; }
.book-right { flex: 1; display: flex; flex-direction: column; }
.book-title { font-weight: 600; font-size: 0.85rem; }
.book-skill { font-size: 0.72rem; color: var(--text-muted); }

/* --- 日志/记账等通用列表 --- */
.log-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; background: var(--bg); border-radius: var(--radius-sm); font-size: 0.82rem; }
.log-item .log-date { font-size: 0.72rem; color: var(--text-muted); min-width: 50px; }
.log-item .log-content { flex: 1; }
.log-item .log-tag { font-size: 0.68rem; padding: 1px 6px; border-radius: 3px; background: var(--primary-bg); color: var(--primary-dark); }
.log-empty { text-align: center; color: var(--text-muted); font-size: 0.8rem; padding: 20px 0; }
.resource-list { display: flex; flex-direction: column; gap: 5px; }
.resource-item { padding: 7px 10px; background: var(--bg); border-radius: var(--radius-sm); font-size: 0.82rem; }
.finance-list { display: flex; flex-direction: column; gap: 6px; }
.finance-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; background: var(--bg); border-radius: var(--radius-sm); font-size: 0.82rem; }
.finance-item .fi-desc { flex: 1; }
.finance-item .fi-amount { font-weight: 600; }
.finance-item .fi-amount.income { color: var(--success); }
.finance-item .fi-amount.expense { color: #EF4444; }
.finance-item .fi-date { font-size: 0.72rem; color: var(--text-muted); min-width: 50px; }
.profile-card { display: flex; flex-direction: column; gap: 4px; }
.profile-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.profile-row:last-child { border-bottom: none; }
.profile-label { color: var(--text-secondary); font-size: 0.8rem; }
.settings-row { border-bottom: none; padding: 12px 4px; }
/* 个人信息编辑 */
.profile-input { flex: 1; max-width: 55%; text-align: right; padding: 6px 8px; }
.profile-row-col { flex-direction: column; align-items: stretch; gap: 4px; }
.profile-row-col .profile-textarea { margin-top: 2px; }
.profile-age { font-weight: 600; color: var(--primary-dark); }
/* 生日年月日下拉 */
.profile-birthday { flex: 1; max-width: 76%; }
.profile-birthday select { min-width: 0; }
.profile-birthday select:nth-child(1) { flex: 1.5; }   /* 年份需显示「2005年」，多占空间 */
/* 板块管理 */
.board-manager-list { display: flex; flex-direction: column; }
.board-manager-name { color: var(--text); font-weight: 500; }
.board-del-btn { flex-shrink: 0; margin-left: 8px; }
.board-del-btn:disabled { opacity: 0.4; cursor: default; }
/* 添加板块一行：输入框占满、按钮右对齐，视觉与板块行统一 */
.board-manager-add {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 6px 0 2px;
}
.board-manager-add .form-input { flex: 1; min-width: 0; }
.board-manager-add .btn { flex-shrink: 0; white-space: nowrap; min-width: 76px; }
/* 历史板块（已删除板块） */
.board-history { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.board-history-title { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.board-history-row { padding: 4px 0; }
.board-history-name { color: var(--text-secondary); }
/* 任务内容一览 */
.board-content-row { justify-content: flex-start; }
.board-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.board-content-name { color: var(--text); font-weight: 600; font-size: 0.88rem; }
.board-content-items { display: flex; flex-wrap: wrap; gap: 6px; }
.content-tag {
  display: inline-block; padding: 2px 8px; font-size: 0.78rem;
  background: var(--primary-light); color: var(--primary-dark);
  border-radius: 999px; white-space: nowrap;
}
.content-tag-hist { background: var(--bg); color: var(--text-secondary); border: 1px dashed var(--border); }
.content-hist-label { font-size: 0.75rem; color: var(--text-secondary); margin-right: 2px; }
.board-content-hist { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.content-empty { font-size: 0.8rem; color: var(--text-muted); }
/* 计划之外记录 */
.unplanned-item { cursor: default; background: var(--success-bg); }
.unplanned-item .task-content { flex: 1; min-width: 0; }
.unplanned-item .task-label { text-decoration: none; }
.unplanned-done { flex-shrink: 0; font-size: 0.9rem; }
.unplanned-date { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; }

/* 功能模板开关 */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 999px; transition: var(--transition); }
.slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: var(--transition); box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* --- 星期/日期选择 --- */
.day-checkboxes { display: flex; flex-wrap: wrap; gap: 5px; }
.day-cb { display: flex; align-items: center; gap: 3px; font-size: 0.8rem; cursor: pointer; padding: 3px 7px; border: 1px solid var(--border); border-radius: 5px; transition: var(--transition); background: var(--bg); }
.day-cb:has(input:checked) { background: var(--primary-bg); border-color: var(--primary); color: var(--primary-dark); }
.day-cb input { accent-color: var(--primary); }

/* --- 迷你日历 --- */
.mini-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; background: var(--bg); border-radius: var(--radius-sm); padding: 8px; }
.mini-calendar .cal-header { font-size: 0.68rem; color: var(--text-muted); text-align: center; font-weight: 600; padding: 3px 0; }
.mini-calendar .cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 500; border-radius: 7px; cursor: pointer; transition: var(--transition); color: var(--text); border: 1px solid transparent; user-select: none; }
.mini-calendar .cal-day:hover { background: var(--border); }
.mini-calendar .cal-day.selected { background: var(--primary); color: #fff; border-color: var(--primary-dark); box-shadow: 0 2px 8px rgba(245,158,11,0.25); }
.mini-calendar .cal-day.empty { cursor: default; visibility: hidden; }

/* --- 弹窗 --- */
.modal-overlay { display: none !important; position: fixed !important; inset: 0 !important; background: rgba(0,0,0,0.45); z-index: 200; align-items: center; justify-content: center; padding: 24px; overscroll-behavior: contain; }
.modal-overlay.open { display: flex !important; }
/* 弹窗打开时锁定背景滚动：body 与内容滚动区都不允许滑动 */
body.modal-open,
body.modal-open .content-area { overflow: hidden; }
.modal { background: var(--card-bg); border-radius: var(--radius); width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.15); animation: fadeIn 0.2s ease; }
.modal-sm { max-width: 320px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 0; }
.modal-header h3 { font-size: 0.95rem; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 1.1rem; color: var(--text-muted); cursor: pointer; padding: 4px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 14px 18px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 0 18px 16px; }
/* 删除确认弹窗 */
.del-confirm { text-align: center; padding: 10px 4px 6px; }
.del-confirm-icon { font-size: 2rem; line-height: 1; margin-bottom: 12px; }
.del-confirm-msg { font-size: 0.95rem; font-weight: 600; color: var(--text); margin: 0 0 8px; line-height: 1.5; }
.del-confirm-sub { font-size: 0.78rem; color: var(--text-secondary); margin: 0; line-height: 1.6; }
.del-confirm-footer { justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); }
.del-confirm-btn { background: #EF4444; color: #fff; }
.del-confirm-btn:hover { background: #DC2626; }
.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 500; margin-bottom: 3px; color: var(--text); }
.form-hint { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }
.form-hint.required { color: #EF4444; }  /* 必填提示用红色 */
.form-input, .form-textarea, .form-select { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 0.82rem; font-family: inherit; background: var(--bg); color: var(--text); transition: var(--transition); }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(245,158,11,0.1); }

/* --- 完成记录弹窗 --- */
.record-task-name { font-size: 0.92rem; font-weight: 600; margin-bottom: 2px; }
.record-target-line { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 12px; }
.record-preview {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  min-height: 36px; margin-top: 4px; padding: 8px 10px;
  border-radius: var(--radius-sm); background: var(--bg);
  font-size: 0.85rem; color: var(--text);
}

/* --- 桌面端微调 --- */
@media (min-width: 768px) {
  .stats-row { gap: 14px; }
  .stat-card { padding: 16px 14px; }
  .section { padding: 20px 18px; margin-bottom: 14px; }
  .main.container { max-width: 960px; margin: 0 auto; padding: 0; }
}

@media (min-width: 1024px) {
  .main.container { max-width: 1100px; }
}

/* --- 暗色模式 --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F172A; --card-bg: #1E293B; --text: #F1F5F9;
    --text-secondary: #94A3B8; --text-muted: #64748B; --border: #334155;
    --primary-bg: rgba(245,158,11,0.08);
    --shadow: 0 1px 3px rgba(0,0,0,0.3); --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  }
  .header { background: var(--card-bg); }   /* 暗色模式顶栏改为深色卡底 */
  .task-item { background: #1E293B; }
  .task-item:hover { background: #263548; }
  .task-item.completed { background: rgba(16,185,129,0.08); }
  .task-item.not-due:hover { background: #1E293B; }
  .task-notdue-hint { background: #0F172A; }
  .daily-note { background: #0F172A; }
  .daily-note:focus { background: #1E293B; }
  .stat-card { background: var(--card-bg); }
  .book-item { background: #0F172A; }
  .book-item.active { background: rgba(245,158,11,0.08); }
  .log-item { background: #0F172A; }
  .resource-item { background: #0F172A; }
  .finance-item { background: #0F172A; }
  .template-item { background: #0F172A; }
  .template-item:hover { background: rgba(245,158,11,0.08); }
  .template-item.selected { background: rgba(245,158,11,0.12); border-color: var(--primary); }
  .template-list { background: #0F172A; }
  .plan-project-card { background: #0F172A; }
  .plan-item { background: #1E293B; }
  .mini-calendar { background: #0F172A; }
  .mini-calendar .cal-day:hover { background: #1E293B; }
  .mini-calendar .cal-day.selected { background: var(--primary); }
  .countdown-item { background: #1E293B; }
  .stage-task-card { background: #0F172A; }
  .countdown-item .cd-delete { color: var(--text-muted); }
  .cd-date-tabs { border-color: var(--border); background: var(--bg); }
  .cd-date-tabs .cd-tab { background: var(--bg); color: var(--text-muted); }
  .cd-date-tabs .cd-tab:not(.active):hover { background: var(--border); color: var(--text); }
  .record-badge { background: rgba(245,158,11,0.12); color: #FCD34D; }
  .record-under   .rb-label { color: #34D399; }
  .record-reached .rb-label { color: #60A5FA; }
  .record-over    .rb-label { color: #F87171; }
  .record-preview { background: #0F172A; }

  @media (max-width: 767px) {
    .sidebar-nav { background: var(--card-bg); border-top-color: var(--border); }
  }
}

/* --- 时长目标 --- */
.target-set-btn { margin-left: auto; }
.target-track {
  height: 10px; border-radius: 999px;
  background: var(--border); overflow: hidden;
}
.target-track-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  transition: width 0.5s ease;
}
.target-track-fill.over { background: linear-gradient(90deg, #34d399, #10b981); }
.target-track-info {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin-top: 8px; font-size: 0.82rem;
}
.target-track-info .target-total { font-weight: 700; color: var(--text); }
.target-track-info .target-goal { font-weight: 600; color: var(--text-secondary); }
.target-track-info .target-pct {
  font-weight: 700; color: #0284C7;
  background: rgba(14,165,233,0.1); padding: 1px 8px; border-radius: 999px;
}
.target-track-info .target-pct.reached { color: var(--success); background: rgba(16,185,129,0.12); }
.target-hint { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }

/* --- 番茄时钟 --- */
.tomato-card { text-align: center; padding: 24px 16px; }
.tomato-mode {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 2px;
  color: var(--text-secondary); margin-bottom: 6px;
}
.tomato-mode.rest { color: var(--success); }
.tomato-timer {
  font-size: 4rem; font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text); margin: 8px 0 20px;
}
.tomato-timer.rest { color: var(--success); }
.tomato-controls { display: flex; gap: 10px; justify-content: center; margin-bottom: 24px; }
.tomato-start-btn { min-width: 110px; }
.tomato-settings {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.tomato-setting { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tomato-setting label { font-size: 0.72rem; color: var(--text-secondary); }
.tomato-setting .form-input { width: 80px; text-align: center; }

/* --- 秒表 --- */
.stopwatch-log { margin-top: 16px; text-align: left; }
.stopwatch-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 2px; border-top: 1px solid var(--border);
  font-size: 0.82rem;
}
.stopwatch-item .sw-time { font-weight: 600; font-variant-numeric: tabular-nums; }
.stopwatch-item .sw-date { color: var(--text-muted); font-size: 0.72rem; margin-left: auto; }
.stopwatch-item .sw-del {
  background: none; border: none; color: var(--text-muted); font-size: 0.72rem;
  cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.stopwatch-item .sw-del:hover { color: #EF4444; background: rgba(239,68,68,0.08); }
.stopwatch-empty { text-align: center; color: var(--text-muted); font-size: 0.78rem; padding: 14px 0 4px; }

/* --- 应用内提示 toast --- */
.toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(31,41,55,0.92); color: #fff;
  font-size: 0.82rem; padding: 9px 18px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 80vw; text-align: center; line-height: 1.5;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* --- 学习规划 --- */
.plan-project-card {
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); margin-bottom: 10px;
}
.plan-project-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.plan-project-name { font-weight: 600; font-size: 0.9rem; }
.plan-items { display: flex; flex-direction: column; gap: 4px; }
.plan-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; padding: 5px 8px;
  background: var(--card-bg); border-radius: 6px;
}
.plan-item-text { flex: 1; word-break: break-word; }
.plan-del {
  background: none; border: none; color: var(--text-muted); font-size: 0.72rem;
  cursor: pointer; padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
}
.plan-del:hover { color: #EF4444; background: rgba(239,68,68,0.08); }

/* --- 学习记录扇形图 --- */
.pie-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.pie-tab {
  flex: 1; padding: 7px 0; font-size: 0.82rem; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text-secondary); cursor: pointer;
  transition: var(--transition);
}
.pie-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pie-tab:active { transform: scale(0.97); }
.pie-wrap { position: relative; width: 170px; height: 170px; margin: 0 auto 14px; }
.pie-ring {
  width: 100%; height: 100%; border-radius: 50%;
  background: conic-gradient(var(--bg) 0deg, var(--bg) 360deg);
}
.pie-center {
  position: absolute; inset: 50%; transform: translate(-50%,-50%);
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--card-bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.pie-center .pc-total { font-size: 1.15rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.pie-center .pc-label { font-size: 0.66rem; color: var(--text-secondary); }
.pie-legend { display: flex; flex-direction: column; gap: 7px; }
.pie-legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text); }
.pie-legend-item .pl-swatch { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.pie-legend-item .pl-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pie-legend-item .pl-val { font-weight: 600; color: var(--text-secondary); font-size: 0.75rem; }
.pie-empty { text-align: center; color: var(--text-muted); font-size: 0.82rem; padding: 30px 0; }

/* --- 任务数据区域 --- */
.data-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.task-data-select { flex: 1; min-width: 0; }
.data-tabs { display: flex; gap: 6px; flex-shrink: 0; }
.data-tab {
  padding: 6px 14px; font-size: 0.8rem; font-weight: 500;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text-secondary); cursor: pointer;
  transition: var(--transition);
}
.data-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.data-tab:active { transform: scale(0.97); }
.data-metric-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.data-metric-tabs .data-tab { flex: 1; }

/* 扇形图暗色模式 */
@media (prefers-color-scheme: dark) {
  .pie-center { background: #1E293B; box-shadow: none; }
  .pie-center .pc-total { color: #F1F5F9; }
}

/* --- 学习热力图 --- */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.hm-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.hm-cell.hm-empty { background: transparent; border-color: var(--border); color: var(--text-muted); }
.hm-cell.hm-0    { background: var(--bg); color: var(--text-muted); border-color: var(--border); }   /* 无学习 灰 */
.hm-cell.hm-l1   { background: #FEF3C7; color: #92400E; }   /* <1h 浅黄 */
.hm-cell.hm-l2   { background: #FDE68A; color: #78350F; }   /* 1~2h 中黄 */
.hm-cell.hm-l3   { background: #F59E0B; color: #fff; }      /* ≥2h 深黄 */
.hm-cell.today { border: 2px solid var(--primary-dark); }
.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.heatmap-legend .hm-cell { width: 18px; height: 18px; aspect-ratio: auto; font-size: 0; }

/* --- 学习趋势柱状图（近30天） --- */
.study-chart {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;      /* 柱状图与下方总结文字/图例留白 */
}
/* 左侧竖轴（学习时长刻度，0h ~ 轴顶） */
.study-axis {
  position: relative;
  width: 34px;
  height: 168px;          /* 18 顶部留白 + 150 柱子区 */
  padding-top: 18px;
  flex-shrink: 0;
}
.study-y-label {
  position: absolute;
  right: 4px;
  transform: translateY(50%);
  font-size: 0.54rem;
  line-height: 1;
  color: var(--text-muted);
  white-space: nowrap;
}
/* 绘图区：18 顶部留白 + 150 柱子区 + 10 刻度行 */
.study-plot {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 178px;
}
/* 横网格线（整小时刻度） */
.study-gridlines {
  position: absolute;
  top: 18px; left: 0; right: 0;
  height: 150px;
  pointer-events: none;
}
.study-gridline {
  position: absolute;
  left: 0; right: 0;
  border-top: 1px solid var(--border);
}
/* 柱子（高度按竖轴比例） */
.study-bars {
  position: absolute;
  top: 18px; left: 0; right: 0;
  height: 150px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  border-bottom: 1px solid var(--border);
}
.study-bar-fill {
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: 3px 3px 0 0;
}
.study-bar-fill.b0 { background: transparent; }
.study-bar-fill.b1 { background: #FEF3C7; color: #92400E; }   /* <1h 浅黄 */
.study-bar-fill.b2 { background: #FDE68A; color: #78350F; }   /* 1~2h 中黄 */
.study-bar-fill.b3 { background: #F59E0B; color: #fff; }      /* ≥2h 深黄 */
.study-bar-fill.today { border: 1px solid var(--primary-dark); box-sizing: border-box; }
/* 柱顶上方标注每日使用时长（7日模式：缩短格式，小字号避免拥挤） */
.study-bar-val {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  line-height: 1;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding-bottom: 2px;
}
.study-bar-val.today { color: var(--primary-dark); }
/* 30日模式：柱窄，数值旋转 90° 写在柱内，文字颜色跟随柱色分档 */
.study-bar-val-in {
  top: 50%;
  left: 50%;
  bottom: auto;
  transform: translate(-50%, -50%) rotate(-90deg);
  color: inherit;
  padding-bottom: 0;
}
/* 底部每天一个刻度 */
.study-day-ticks {
  position: absolute;
  top: 168px; left: 0; right: 0;
  height: 10px;
  display: flex;
  gap: 2px;
}
.study-day-tick {
  flex: 1;
  min-width: 0;
  align-self: flex-start;
  width: 1px;
  height: 6px;
  margin: 0 auto;
  background: var(--border);
}
/* 最长 / 最短学习日日期标注（最长在上、最短在下），写清月日 */
.study-extremes {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 168px;
  pointer-events: none;
}
.study-ext {
  position: absolute;
  font-size: 0.58rem;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
  background: var(--card-bg);
  padding: 0 3px;
  border-radius: 3px;
  line-height: 1.3;
}
.study-ext-max { top: 0; color: var(--primary-dark); }
.study-ext-min { bottom: -22px; color: var(--text-muted); }
.study-bars-stats {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 14px;      /* 总结文字与下方图例留白 */
}
.study-bars-stats b { color: var(--text); font-weight: 600; }
.study-bars-stats .study-best-all {
  display: block;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--border);
  color: var(--text);
}
.study-bars-stats .study-best-all b { color: var(--primary-dark); }

/* --- 数据中心：细柱 + 柱顶数值 + 30日横向滑动 --- */
.study-chart.slim .study-plot { height: 192px; }   /* 柱区150 + 日期标签行24 */
.study-chart.slim .study-bars { gap: 10px; padding: 0 4px; justify-content: space-evenly; }
.study-chart.slim .study-bar-fill { flex: 1 1 auto; max-width: 26px; }
.study-chart.slim .study-day-ticks { gap: 10px; padding: 0 4px; justify-content: space-evenly; top: 168px; height: 24px; align-items: flex-start; }
.study-chart.slim .study-day-tick { flex: 1 1 auto; max-width: 26px; }
/* 柱下方日期标签：替代灰色刻度线，7日横排 */
.study-chart.slim .study-day-label {
  flex: 1 1 auto; max-width: 26px;
  font-size: 0.5rem; line-height: 1.3;
  color: var(--text-secondary);
  text-align: center; white-space: nowrap;
}
.study-chart.slim .study-bar-val { color: var(--text-secondary); font-size: 0.55rem; }
.study-chart.slim.scroll-x .study-plot { overflow-x: auto; overflow-y: hidden; height: 192px; }
.study-chart.slim.scroll-x .study-bars,
.study-chart.slim.scroll-x .study-day-ticks { gap: 8px; padding: 0 4px; justify-content: flex-start; }
.study-chart.slim.scroll-x .study-bar-fill { flex: 0 0 12px; width: 12px; max-width: none; }
.study-chart.slim.scroll-x .study-day-tick { flex: 0 0 12px; width: 12px; max-width: none; }
.study-chart.slim.scroll-x .study-day-ticks { align-items: center; }
/* 30日滑动：日期标签旋转 90° 竖排，居中于窄柱下方 */
.study-chart.slim.scroll-x .study-day-label {
  flex: 0 0 12px; width: 12px;
  font-size: 0.46rem;
  transform: rotate(-90deg);
}
.study-chart.slim.scroll-x .study-bar-val { font-size: 0.42rem; }

/* --- 数据中心：月度对比折线图（SVG） --- */
.study-chart.month-line { display: block; margin-bottom: 14px; }
.ml-svg { width: 100%; height: auto; display: block; }
.ml-grid { stroke: var(--border); stroke-width: 1; }
.ml-y { font-size: 10px; fill: var(--text-muted); text-anchor: end; }
.ml-x { font-size: 10px; fill: var(--text-secondary); }
.ml-line { stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ml-dot { fill: var(--card-bg); stroke: var(--primary); stroke-width: 2; }
.ml-val { font-size: 9px; fill: var(--text-secondary); font-weight: 600; }

/* 热力图暗色模式 */
@media (prefers-color-scheme: dark) {
  .hm-cell.hm-empty { border-color: var(--border); }
  .hm-cell.hm-0    { background: #0F172A; color: #64748B; border-color: var(--border); }
  .hm-cell.hm-l1   { background: rgba(245,158,11,0.25); color: #FCD34D; }
  .hm-cell.hm-l2   { background: rgba(245,158,11,0.45); color: #FDE68A; }
  .hm-cell.hm-l3   { background: #F59E0B; color: #fff; }
  /* 学习趋势柱状图 */
  .study-bar-fill.b1 { background: rgba(245,158,11,0.25); color: #FCD34D; }
  .study-bar-fill.b2 { background: rgba(245,158,11,0.45); color: #FDE68A; }
  .study-bar-fill.b3 { background: #F59E0B; color: #fff; }
  .study-bar-fill.today { border-color: var(--primary); }
  .study-ext-max { color: var(--primary); }
  .study-bar-val.today { color: var(--primary); }
  .study-bars-stats .study-best-all b { color: var(--primary); }
}

/* --- 动效 --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.25s ease; }
