/* ===== 成长引擎 - 主样式 ===== */
/* 设计原则：移动优先、iOS 风格、单手操作、柔和配色 */

:root {
  /* 主题色 - 亮色 */
  --bg: #f5f6fa;
  --bg-card: #ffffff;
  --bg-soft: #f0f2f8;
  --bg-elevated: #ffffff;
  --text: #1a1d29;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --border: #e8eaef;
  --border-soft: #f0f2f8;

  --primary: #4f6ef7;
  --primary-light: #7c8ff9;
  --primary-soft: #eef1fe;
  --primary-dark: #3a54d4;

  --success: #10b981;
  --success-soft: #d1fae5;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --purple: #8b5cf6;
  --purple-soft: #ede9fe;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
  --shadow-pop: 0 12px 32px rgba(79, 110, 247, 0.18);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --nav-h: 64px;
  --header-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

[data-theme="dark"] {
  --bg: #0f1115;
  --bg-card: #1a1d29;
  --bg-soft: #15171f;
  --bg-elevated: #232636;
  --text: #f5f6fa;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  --border: #2a2e3a;
  --border-soft: #1f2230;

  --primary: #6b85f9;
  --primary-light: #8a9ffb;
  --primary-soft: #1e2438;
  --primary-dark: #4f6ef7;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-pop: 0 12px 32px rgba(107, 133, 249, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

input, textarea, [contenteditable] {
  user-select: text;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ===== App 布局 ===== */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
}

.app-header {
  height: var(--header-h);
  padding: var(--safe-top) 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-soft);
}

.header-left h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.header-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.header-right {
  display: flex;
  gap: 6px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.15s;
}

.icon-btn:active {
  background: var(--bg-soft);
}

.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(var(--nav-h) + var(--safe-bottom) + 24px);
}

.app-nav {
  height: var(--nav-h);
  padding-bottom: var(--safe-bottom);
  display: flex;
  background: var(--bg-card);
  border-top: 1px solid var(--border-soft);
  position: relative;
  z-index: 10;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-tertiary);
  font-size: 11px;
  transition: color 0.2s;
  padding-top: 8px;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item:active {
  background: var(--bg-soft);
}

/* ===== 通用组件 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:active {
  background: var(--primary-dark);
}

.btn-ghost {
  background: var(--bg-soft);
  color: var(--text);
}

.btn-ghost:active {
  background: var(--border-soft);
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 13px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* 表单 */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text);
  transition: border-color 0.15s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* 进度条 */
.progress-bar {
  height: 8px;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-fill.success {
  background: linear-gradient(90deg, var(--success), #34d399);
}

.progress-bar-fill.warning {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-soft);
  color: var(--text-secondary);
}

.tag-primary {
  background: var(--primary-soft);
  color: var(--primary);
}

.tag-success {
  background: var(--success-soft);
  color: var(--success);
}

.tag-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.tag-purple {
  background: var(--purple-soft);
  color: var(--purple);
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 0;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s;
}

.modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 24px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 29, 41, 0.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  max-width: 80%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 成就解锁动画 ===== */
.achievement-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 32px;
}

.achievement-popup.show {
  display: flex;
  animation: fadeIn 0.3s;
}

.achievement-popup-content {
  background: linear-gradient(135deg, #fff8e1, #fff);
  border-radius: 24px;
  padding: 32px 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.4);
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.achievement-popup-icon {
  font-size: 64px;
  margin-bottom: 12px;
  animation: bounce 1s ease infinite;
}

.achievement-popup-label {
  font-size: 12px;
  color: #f59e0b;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.achievement-popup-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1d29;
  margin-bottom: 6px;
}

.achievement-popup-desc {
  font-size: 13px;
  color: #6b7280;
}

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== 看板视图 ===== */
.dashboard-hero {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: var(--radius-lg);
  padding: 20px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: var(--shadow-pop);
  position: relative;
  overflow: hidden;
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.dashboard-hero-title {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 6px;
}

.dashboard-hero-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

.dashboard-hero-sub {
  font-size: 12px;
  opacity: 0.85;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.stat-card-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.stat-card-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.stat-card-trend {
  font-size: 11px;
  margin-top: 2px;
}

.stat-card-trend.up { color: var(--success); }
.stat-card-trend.down { color: var(--danger); }

/* 目标进度项 */
.goal-progress-item {
  margin-bottom: 14px;
}

.goal-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.goal-progress-name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.goal-progress-percent {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.goal-progress-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
}

/* 任务清单 */
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}

.task-item:last-child { border-bottom: none; }

.task-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.task-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
}

.task-checkbox.checked svg {
  display: block;
}

.task-checkbox svg {
  display: none;
  color: #fff;
}

.task-info {
  flex: 1;
  min-width: 0;
}

.task-name {
  font-size: 14px;
  font-weight: 500;
}

.task-name.done {
  text-decoration: line-through;
  color: var(--text-tertiary);
}

.task-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* 原则卡片 */
.principle-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.principle-card.category-method { border-left-color: var(--primary); }
.principle-card.category-mindset { border-left-color: var(--purple); }
.principle-card.category-quote { border-left-color: var(--warning); }
.principle-card.category-skill { border-left-color: var(--success); }

.principle-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.principle-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.principle-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-tertiary);
}

.principle-source {
  display: flex;
  align-items: center;
  gap: 4px;
}

.principle-actions {
  display: flex;
  gap: 4px;
}

.principle-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 14px;
}

.principle-action-btn:active { background: var(--bg-soft); }
.principle-action-btn.active { color: var(--warning); }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-tertiary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.empty-state-desc {
  font-size: 13px;
  margin-bottom: 16px;
}

/* AI 教练 */
.ai-chat {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

/* AI 视图包裹层 — flex 列布局，输入区始终在底部 */
.ai-view-wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-h) - var(--nav-h) - 105px);
  height: calc(100dvh - var(--header-h) - var(--nav-h) - 105px);
}

.ai-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.7;
  animation: msgIn 0.3s;
}

.ai-message.assistant {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.ai-message.user {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.ai-message pre {
  background: rgba(0,0,0,0.06);
  padding: 8px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 6px 0;
  font-size: 12px;
}

[data-theme="dark"] .ai-message pre {
  background: rgba(255,255,255,0.08);
}

.ai-message h1, .ai-message h2, .ai-message h3 {
  font-size: 15px;
  margin: 8px 0 4px;
  font-weight: 700;
}

.ai-message ul, .ai-message ol {
  padding-left: 20px;
  margin: 6px 0;
}

.ai-message p { margin: 6px 0; }
.ai-message strong { font-weight: 700; }

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ai-suggestion-chip {
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.ai-suggestion-chip:active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.ai-input-area {
  flex-shrink: 0;
  background: var(--bg);
  padding: 10px 0 0;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  border-top: 1px solid var(--border-soft);
}

.ai-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text);
  resize: none;
  max-height: 100px;
  min-height: 40px;
  line-height: 1.4;
}

.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-send-btn:active { background: var(--primary-dark); }
.ai-send-btn:disabled { opacity: 0.4; }

.ai-typing {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  padding: 14px 18px;
  display: flex;
  gap: 4px;
}

.ai-typing span {
  width: 7px;
  height: 7px;
  background: var(--text-tertiary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* 目标树 */
.goal-tree-item {
  position: relative;
  padding-left: 16px;
}

.goal-tree-item.has-parent::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.goal-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.goal-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.goal-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--primary-soft);
}

.goal-card-info {
  flex: 1;
  min-width: 0;
}

.goal-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.goal-card-meta {
  font-size: 11px;
  color: var(--text-tertiary);
}

.goal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.goal-level-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
}

.goal-level-annual { background: var(--primary-soft); color: var(--primary); }
.goal-level-quarterly { background: var(--purple-soft); color: var(--purple); }
.goal-level-monthly { background: var(--success-soft); color: var(--success); }
.goal-level-weekly { background: var(--warning-soft); color: var(--warning); }

/* 设置列表 */
.settings-list {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.settings-item {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}

.settings-item:last-child { border-bottom: none; }

.settings-item:active { background: var(--bg-soft); }

.settings-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--primary-soft);
}

.settings-item-value {
  font-size: 13px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 成就墙 */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.achievement-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.achievement-item.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.achievement-item-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.achievement-item-title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.achievement-item-date {
  font-size: 9px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* 快速操作菜单 */
.action-sheet {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-sheet-item {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
}

.action-sheet-item:active { background: var(--bg-soft); }

.action-sheet-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* 时间轴 */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 14px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
}

.timeline-date {
  font-size: 11px;
  color: var(--text-tertiary);
}

.timeline-content {
  font-size: 13px;
  margin-top: 2px;
}

/* 工具类 */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-16 { font-size: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 16px 0 10px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

/* 打卡日历热力图 */
.heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--bg-soft);
}

.heatmap-cell.level-1 { background: #c7e9c0; }
.heatmap-cell.level-2 { background: #74c476; }
.heatmap-cell.level-3 { background: #31a354; }
.heatmap-cell.level-4 { background: #006d2c; }

[data-theme="dark"] .heatmap-cell.level-1 { background: #1a3a2a; }
[data-theme="dark"] .heatmap-cell.level-2 { background: #2a5a3a; }
[data-theme="dark"] .heatmap-cell.level-3 { background: #3a8a4a; }
[data-theme="dark"] .heatmap-cell.level-4 { background: #4aba5a; }

/* 列表项可点击 */
.clickable { cursor: pointer; transition: background 0.15s; }
.clickable:active { background: var(--bg-soft); }

/* 隐藏滚动条 */
::-webkit-scrollbar { width: 0; height: 0; }
