/* ============================================
   个人工作台 - 全局样式
   严格视觉规范：奶油背景、深色侧栏、低饱和卡片、大圆角
   禁止 emoji，统一 SVG 图标
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --bg-page: #F7F7F5;
  --bg-white: #FFFFFF;
  --text-primary: #202124;
  --text-secondary: #6F7277;
  --border-light: #E6E7E4;
  --accent-green: #2F6B57;
  --accent-green-light: #E8F0ED;
  --card-yellow: #F4D85A;
  --card-yellow-light: #FCF3D1;
  --card-pink: #E9A8CF;
  --card-pink-light: #F8E1F0;
  --card-blue: #AFC9EA;
  --card-blue-light: #E5EDF7;
  --card-green: #B8CB9A;
  --card-green-light: #EDF2E3;

  --sidebar-bg: #202124;
  --sidebar-text: #B4B6B8;
  --sidebar-text-active: #FFFFFF;
  --sidebar-active-bg: #2F6B57;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --sidebar-width: 230px;
  --header-h: 52px;
  --bottom-nav-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --transition: 0.2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
svg { display: block; }

/* ---------- Desktop Sidebar ---------- */
#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.sidebar-logo .logo-icon { flex-shrink: 0; color: var(--accent-green); }
.nav-list { flex: 1; padding: 4px 10px; }
.nav-list .nav-separator {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 10px;
}
.nav-list li a, .nav-list li button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  text-align: left;
}
.nav-list li a:hover, .nav-list li button:hover {
  background: rgba(255,255,255,0.06);
  color: var(--sidebar-text-active);
}
.nav-list li a.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
}
.nav-list li a svg, .nav-list li button svg { flex-shrink: 0; }
.sidebar-footer { padding: 12px 18px 20px; }
.sidebar-date { font-size: 12px; color: rgba(255,255,255,0.3); }

/* ---------- Mobile Header ---------- */
#mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 90;
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}
#mobile-header h1 { font-size: 17px; font-weight: 700; flex: 1; text-align: center; }
.header-back, .header-search {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  flex-shrink: 0;
}
.header-back:active, .header-search:active { background: var(--bg-page); }

/* ---------- Mobile Drawer ---------- */
.drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s;
}
.drawer-overlay.show { display: block; opacity: 1; }
.mobile-drawer {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: var(--bg-white);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 16px;
  font-weight: 700;
}
.drawer-header button { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.drawer-list { flex: 1; overflow-y: auto; padding: 8px 10px; }
.drawer-list li a, .drawer-list li button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
}
.drawer-list li a:active { background: var(--bg-page); }
.drawer-list .drawer-separator {
  height: 1px; background: var(--border-light); margin: 8px 12px;
}

/* ---------- Main Content ---------- */
#content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 24px 28px 60px;
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.module-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.module-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.help-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--text-secondary);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.help-btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: var(--accent-green-light);
}

/* Help tooltip (desktop) */
.help-tooltip {
  position: absolute;
  max-width: 320px;
  background: var(--text-primary);
  color: #fff;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.7;
  z-index: 300;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  white-space: normal;
}
.help-tooltip.show { opacity: 1; pointer-events: auto; }
.help-tooltip h4 { font-size: 14px; margin-bottom: 6px; font-weight: 700; }
.help-tooltip p { margin-bottom: 4px; }
.help-tooltip .help-section { margin-top: 6px; }
.help-tooltip .help-label { color: var(--card-yellow); font-weight: 600; }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-yellow { background: var(--card-yellow-light); border-color: #E8D97A; }
.card-pink { background: var(--card-pink-light); border-color: #D8A0C0; }
.card-blue { background: var(--card-blue-light); border-color: #9BBAE0; }
.card-green { background: var(--card-green-light); border-color: #A8BD8E; }

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
  min-height: 38px;
}
.btn-primary {
  background: var(--accent-green);
  color: #fff;
}
.btn-primary:hover { background: #286050; }
.btn-secondary {
  background: var(--bg-white);
  color: var(--text-primary);
  border-color: var(--border-light);
}
.btn-secondary:hover { background: var(--bg-page); border-color: #D0D1CE; }
.btn-danger {
  background: #D94545;
  color: #fff;
}
.btn-danger:hover { background: #C03838; }
.btn-sm { padding: 5px 12px; font-size: 13px; min-height: 30px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group 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: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px var(--accent-green-light);
}
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-checkbox { display: flex; align-items: center; gap: 8px; }
.form-checkbox input { width: 18px; height: 18px; cursor: pointer; }

/* Tag input */
.tag-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  min-height: 42px;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--accent-green-light);
  color: var(--accent-green);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.tag-pill button { font-size: 14px; line-height: 1; color: inherit; }
.tag-input-wrapper input { border: none; outline: none; flex: 1; min-width: 80px; padding: 4px; }

/* ---------- Tables ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table thead {
  background: var(--accent-green-light);
}
.data-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-light);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
.data-table tbody tr:hover { background: var(--bg-page); }
.data-table tfoot td {
  font-weight: 700;
  background: var(--accent-green-light);
  color: var(--accent-green);
  border-bottom: none;
}
.data-table .table-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: var(--transition);
}
.icon-btn:hover { background: var(--bg-page); color: var(--text-primary); }
.icon-btn.danger:hover { color: #D94545; }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-light);
  flex-wrap: wrap;
}
.tab-item {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.tab-item:hover { color: var(--text-primary); }
.tab-item.active {
  color: var(--accent-green);
  border-bottom-color: var(--accent-green);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---------- Status Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-green { background: var(--card-green-light); color: #5A7340; }
.badge-yellow { background: var(--card-yellow-light); color: #8A7020; }
.badge-blue { background: var(--card-blue-light); color: #4A6B8A; }
.badge-pink { background: var(--card-pink-light); color: #8A4A70; }
.badge-gray { background: #F0F0EE; color: var(--text-secondary); }
.badge-red { background: #FDE8E8; color: #C03838; }

/* ---------- Empty State ---------- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-secondary);
}
.empty-state svg {
  margin: 0 auto 16px;
  opacity: 0.3;
}
.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.empty-state p {
  font-size: 14px;
  margin-bottom: 16px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 400;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal-overlay.show { display: block; opacity: 1; }
.modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  max-width: 92vw;
  max-height: 88vh;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  z-index: 401;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.modal.show { display: flex; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-header button { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--text-secondary); }
.modal-header button:hover { background: var(--bg-page); color: var(--text-primary); }
.modal-body { flex: 1; overflow-y: auto; padding: 20px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
}
.modal-footer:empty { display: none; }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--text-primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.25s ease;
  max-width: 360px;
}
.toast.success { background: var(--accent-green); }
.toast.error { background: #D94545; }
.toast.info { background: #3A7CC8; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- Quick Sheet (Mobile) ---------- */
.quick-sheet {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 401;
  padding: 8px 16px 24px;
  padding-bottom: calc(24px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.25s ease;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
}
.quick-sheet.show { display: block; animation: sheetUp 0.25s ease forwards; }
@keyframes sheetUp { to { transform: translateY(0); } }
.quick-sheet-handle {
  width: 40px; height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  margin: 0 auto 12px;
}
.quick-sheet-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; text-align: center; }
.quick-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.quick-sheet-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px;
  border-radius: var(--radius);
  background: var(--bg-page);
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
  min-height: 76px;
  justify-content: center;
}
.quick-sheet-item:active { background: var(--accent-green-light); }
.quick-sheet-item svg { color: var(--accent-green); }

/* ---------- Kanban Board ---------- */
.kanban {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kanban-column {
  flex: 1;
  min-width: 240px;
  background: var(--bg-page);
  border-radius: var(--radius);
  padding: 14px;
}
.kanban-column h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kanban-column h4 .count {
  background: var(--border-light);
  color: var(--text-secondary);
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 12px;
}
.kanban-card {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
}
.kanban-card:hover { box-shadow: var(--shadow-md); }
.kanban-card h5 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.kanban-card p { font-size: 12px; color: var(--text-secondary); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--border-light);
}
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -21px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--accent-green);
}
.timeline-item.done::before { background: var(--accent-green); }
.timeline-item-content h5 { font-size: 14px; font-weight: 600; }
.timeline-item-content .time { font-size: 12px; color: var(--text-secondary); }
.timeline-item-content .source { font-size: 12px; color: var(--accent-green); font-weight: 600; }

/* ---------- Progress Bar ---------- */
.progress-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent-green);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ---------- Search ---------- */
.search-bar {
  position: relative;
  margin-bottom: 20px;
}
.search-bar svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}
.search-bar input {
  width: 100%;
  padding: 11px 12px 11px 40px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg-white);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px var(--accent-green-light);
}
.search-results { display: flex; flex-direction: column; gap: 8px; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: var(--transition);
}
.search-result-item:hover { box-shadow: var(--shadow-sm); border-color: var(--accent-green); }
.search-result-item .result-module { font-size: 12px; color: var(--accent-green); font-weight: 600; }
.search-result-item .result-title { font-size: 14px; font-weight: 500; }

/* ---------- Section headers ---------- */
.section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title:first-child { margin-top: 0; }
.section-title .count { font-size: 13px; color: var(--text-secondary); font-weight: 400; }

/* ---------- Info grid ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.info-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border-light);
}
.info-card .info-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.info-card .info-value { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.info-card .info-value small { font-size: 14px; font-weight: 400; color: var(--text-secondary); }

/* ---------- List items ---------- */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 8px;
  transition: var(--transition);
}
.list-item:hover { box-shadow: var(--shadow-sm); }
.list-item-content { flex: 1; min-width: 0; }
.list-item-content h5 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.list-item-content p { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Settings ---------- */
.settings-section { margin-bottom: 28px; }
.settings-section h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.settings-list { background: var(--bg-white); border-radius: var(--radius); border: 1px solid var(--border-light); overflow: hidden; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row .setting-label { font-weight: 500; }
.settings-row .setting-value { color: var(--text-secondary); font-size: 13px; }

.usage-doc { background: var(--bg-white); border-radius: var(--radius); border: 1px solid var(--border-light); padding: 20px 24px; }
.usage-doc h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.usage-doc h4 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; color: var(--accent-green); }
.usage-doc p { font-size: 14px; line-height: 1.8; margin-bottom: 8px; color: var(--text-primary); }
.usage-doc ul { padding-left: 20px; margin-bottom: 8px; }
.usage-doc ul li { font-size: 14px; line-height: 1.8; }
.usage-doc .note { background: var(--card-yellow-light); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin: 8px 0; }

.update-log-item { padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.update-log-item:last-child { border-bottom: none; }
.update-log-item .log-date { font-size: 12px; color: var(--accent-green); font-weight: 700; }
.update-log-item .log-content { font-size: 14px; margin-top: 4px; }
.update-log-item .log-impact { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ---------- Checkbox list ---------- */
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 8px;
  transition: var(--transition);
}
.todo-item.done { opacity: 0.55; }
.todo-item.done .todo-text { text-decoration: line-through; }
.todo-checkbox {
  width: 20px; height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.todo-checkbox.checked { background: var(--accent-green); border-color: var(--accent-green); }
.todo-checkbox.checked svg { color: #fff; }
.todo-content { flex: 1; min-width: 0; }
.todo-text { font-size: 14px; font-weight: 500; }
.todo-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.todo-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ---------- Stat cards ---------- */
.stat-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
  flex: 1;
  min-width: 140px;
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border-light);
  text-align: center;
}
.stat-card .stat-num { font-size: 28px; font-weight: 700; color: var(--accent-green); }
.stat-card .stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ---------- Misc ---------- */
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.cursor-pointer { cursor: pointer; }

.divider { height: 1px; background: var(--border-light); margin: 16px 0; }

.link-text { color: var(--accent-green); text-decoration: underline; cursor: pointer; }
.link-text:hover { opacity: 0.8; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  /* 移动端：左侧类目菜单 + 右侧内容（左右分栏） */
  #sidebar {
    display: flex;
    flex-direction: column;
    width: 88px;
    padding: 6px 4px;
    z-index: 100;
    overflow-x: hidden;
  }
  #sidebar .sidebar-logo { justify-content: center; padding: 12px 4px 10px; }
  #sidebar .sidebar-logo span { display: none; }
  #sidebar .sidebar-footer { display: none; }
  #sidebar .nav-separator { display: none; }
  #sidebar .nav-list { padding: 2px 2px; }
  #sidebar .nav-list li a {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 9px 2px;
    font-size: 10px;
    line-height: 1.15;
    text-align: center;
    border-radius: 10px;
  }
  #sidebar .nav-list li a svg { width: 20px; height: 20px; }
  #sidebar .nav-list li.nav-quick a { background: var(--sidebar-active-bg); color: var(--sidebar-text-active); }

  #mobile-header { display: none; }
  #bottom-nav, #mobile-drawer, #drawer-overlay { display: none; }
  #content {
    margin-left: 88px;
    padding: 14px 14px 24px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  #bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    z-index: 100;
    padding-bottom: var(--safe-bottom);
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    min-height: 44px;
    transition: var(--transition);
  }
  .bottom-nav-item.active { color: var(--accent-green); }
  .bottom-nav-item:active { background: var(--bg-page); }
  .bottom-nav-item span { white-space: nowrap; }

  /* Cards become single column */
  .card-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-row { flex-direction: row; }
  .stat-card { min-width: 0; }

  /* Table -> list on mobile */
  .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Modal -> full screen on mobile */
  .modal {
    top: 0; left: 0; right: 0; bottom: 0;
    transform: none;
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  .modal-body { padding: 16px; }

  /* Kanban scroll horizontal */
  .kanban { padding-bottom: 12px; }

  /* Module header adjustments */
  .module-header h2 { font-size: 19px; }

  /* Help tooltip -> modal on mobile */
  .help-tooltip { display: none; }
}

@media (min-width: 901px) {
  #mobile-header { display: none; }
  #bottom-nav { display: none; }
  .drawer-overlay { display: none; }
  .mobile-drawer { display: none; }
  .quick-sheet { display: none; }
  .quick-sheet-overlay { display: none; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D0D1CE; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #B4B6B8; }

/* ---------- Loading ---------- */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0ee 25%, #e8e8e4 50%, #f0f0ee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- English Learning Module (清新薄荷绿) ---------- */

/* 模块整体背景 */
.english-module {
  background: linear-gradient(180deg, #E8F5E9 0%, #F1F8E9 40%, #F7FBF7 100%);
  min-height: 100%;
  padding: 24px 28px 40px;
}

/* 顶部标题区 */
.en-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(76, 175, 80, 0.10);
  border: 1px solid #C8E6C9;
}
.en-hero-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: #E8F5E9;
  border-radius: 14px;
  color: #2E7D32;
  flex-shrink: 0;
}
.en-hero-icon svg { width: 26px; height: 26px; }
.en-hero-text { flex: 1; }
.en-hero-title { font-size: 22px; font-weight: 800; color: #1B5E20; letter-spacing: 0.5px; }
.en-hero-subtitle { font-size: 13px; color: #66BB6A; margin-top: 2px; }
.en-fav-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: #FFF8E1;
  color: #FFB300;
  border: 1px solid #FFE082;
  cursor: pointer;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.en-fav-btn:hover { transform: scale(1.1); }
.en-fav-btn svg { width: 20px; height: 20px; }

/* 统计卡片 */
.english-module .stat-row { margin-bottom: 20px; }
.english-module .stat-card {
  background: #FFFFFF;
  border: 1px solid #C8E6C9;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.06);
}
.english-module .stat-num { color: #2E7D32; }
.english-module .stat-label { color: #66BB6A; }

/* 学习模块卡片 */
.en-section-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.08);
  border: 1px solid #E0E0E0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.en-section-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.15);
  border-color: #A5D6A7;
}
.en-section-card.en-section-done {
  background: linear-gradient(135deg, #E8F5E9 0%, #FFFFFF 100%);
  border-color: #81C784;
}
.en-section-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.en-section-card-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #E8F5E9;
  border-radius: 10px;
  color: #2E7D32;
}
.en-section-card-icon svg { width: 20px; height: 20px; }
.en-section-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: #FFF3E0;
  color: #E65100;
}
.en-section-done .en-section-status {
  background: #E8F5E9;
  color: #2E7D32;
}
.en-section-card-title { font-size: 17px; font-weight: 700; color: #1B5E20; margin-bottom: 4px; }
.en-section-card-subtitle { font-size: 13px; color: #888; margin-bottom: 10px; }
.en-section-preview {
  font-size: 13px;
  color: #999;
  line-height: 1.6;
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.en-section-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.en-section-reward { font-size: 12px; color: #999; }
.en-section-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(135deg, #66BB6A, #43A047);
  color: #fff;
  cursor: pointer;
  transition: filter 0.2s;
}
.en-section-btn:hover { filter: brightness(1.08); }
.en-section-btn.en-section-btn-secondary {
  background: #E8F5E9;
  color: #2E7D32;
}

/* 日历区标题 */
.en-calendar-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1B5E20;
  margin: 24px 0 12px;
}

/* 弹窗内容区 */
.en-hint {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: #F1F8E9;
  border-radius: 10px;
  line-height: 1.6;
}
.en-section-body { padding-bottom: 8px; }

/* 单词卡片 */
.en-word-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.07);
  border: 1px solid #E8F5E9;
  transition: box-shadow 0.2s ease;
}
.en-word-card:hover { box-shadow: 0 4px 16px rgba(76, 175, 80, 0.12); }
.en-word-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.en-word-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: #E8F5E9;
  color: #2E7D32;
}
.en-word-no { font-size: 13px; font-weight: 700; color: #BDBDBD; }
.en-word-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.en-word-title-block { flex: 1; }
.en-word-en { font-size: 22px; font-weight: 800; color: #1B5E20; display: block; margin-bottom: 2px; }
.en-word-phonetic { font-size: 13px; color: #9E9E9E; display: block; margin-bottom: 4px; }
.en-word-cn { font-size: 15px; font-weight: 600; color: #424242; display: block; }
.en-word-actions { display: flex; gap: 8px; flex-shrink: 0; }
.en-speak-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid #C8E6C9;
  background: #E8F5E9;
  color: #2E7D32;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s;
}
.en-speak-btn:hover { transform: scale(1.1); background: #C8E6C9; }
.en-speak-btn svg { width: 18px; height: 18px; }
.en-speak-btn.favorited { color: #FFB300; border-color: #FFE082; background: #FFF8E1; }
.en-word-example {
  background: #F1F8E9;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #DCEDC8;
}
.en-example-en { font-size: 14px; color: #424242; line-height: 1.7; margin-bottom: 4px; }
.en-example-cn { font-size: 13px; color: #888; line-height: 1.6; margin-bottom: 8px; }
.en-example-speak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #2E7D32;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}
.en-example-speak svg { width: 16px; height: 16px; }
.en-example-speak:hover { text-decoration: underline; }

/* 对话区 */
.en-dialogue-lines { display: flex; flex-direction: column; gap: 14px; }
.en-dialogue-line { display: flex; gap: 10px; }
.en-dialogue-line.a { flex-direction: row; }
.en-dialogue-line.b { flex-direction: row-reverse; }
.en-dialogue-speaker {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.en-dialogue-line.a .en-dialogue-speaker { background: #4FC3F7; }
.en-dialogue-line.b .en-dialogue-speaker { background: #FF8A80; }
.en-dialogue-bubble {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 12px 16px;
  max-width: 80%;
  border: 1px solid #E0E0E0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.en-dialogue-en { font-size: 15px; font-weight: 500; margin-bottom: 4px; color: #333; }
.en-dialogue-cn { font-size: 13px; color: #888; margin-bottom: 6px; }
.en-line-speak { width: 28px; height: 28px; }

/* 阅读区 */
.en-reading-card {
  background: #F1F8E9;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  border: 1px solid #C5E1A5;
}
.en-reading-text { font-size: 16px; line-height: 1.9; margin-bottom: 10px; color: #333; }
.en-reading-text p { margin-bottom: 10px; }
.en-reading-text p:last-child { margin-bottom: 0; }
.en-reading-speak {
  width: auto; padding: 6px 14px; border-radius: 20px;
  font-size: 13px; gap: 6px;
}
.en-reading-translation {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1px solid #E8E8E8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.en-reading-translation p { font-size: 14px; line-height: 1.8; margin-bottom: 6px; color: #888; }

/* 写作区 */
.en-writing-card {
  background: #FFF8E1;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  border: 1px solid #FFE082;
}
.en-writing-sentence { font-size: 18px; font-weight: 700; line-height: 1.6; color: #333; margin-bottom: 6px; }
.en-writing-translation { font-size: 14px; color: #888; margin-bottom: 12px; }
.en-writing-speak { width: auto; padding: 6px 14px; border-radius: 20px; font-size: 13px; gap: 6px; }
.en-writing-tip {
  background: #E3F2FD;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid #BBDEFB;
}
.en-writing-alts {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid #E8E8E8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.en-writing-alt { padding: 10px 0; border-bottom: 1px dashed #E0E0E0; }
.en-writing-alt:last-child { border-bottom: none; }
.en-writing-alt-cn { font-size: 13px; color: #888; }

/* 小区块标题 */
.en-block-title { font-size: 14px; font-weight: 700; color: #1B5E20; margin-bottom: 8px; }

/* 收藏按钮 */
.en-collect-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #C8E6C9;
  background: #FFFFFF;
  color: #2E7D32;
  cursor: pointer;
  transition: background 0.2s;
}
.en-collect-btn:hover { background: #E8F5E9; }
.en-collect-btn svg { width: 16px; height: 16px; }

/* 日历卡片 */
.en-calendar-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.08);
  border: 1px solid #C8E6C9;
}
.en-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.en-calendar-title { font-size: 16px; font-weight: 700; color: #1B5E20; }
.en-month-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid #C8E6C9;
  background: #E8F5E9;
  color: #2E7D32;
  cursor: pointer;
  transition: background 0.2s;
}
.en-month-btn:hover { background: #C8E6C9; }
.en-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.en-calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #81C784;
  padding: 4px 0;
}
.en-calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #E8E8E8;
  background: #FAFAFA;
  transition: all 0.2s ease;
}
.en-calendar-day.today {
  border-color: #66BB6A;
  box-shadow: 0 0 0 2px #E8F5E9;
  background: #F1F8E9;
}
.en-calendar-day.checked {
  background: linear-gradient(135deg, #C8E6C9, #A5D6A7);
  border-color: #81C784;
}
.en-calendar-date { font-size: 14px; font-weight: 600; color: #555; }
.en-calendar-day.checked .en-calendar-date { color: #1B5E20; }
.en-calendar-mark { color: #2E7D32; margin-top: 2px; }
.en-calendar-mark svg { width: 16px; height: 16px; }
.en-calendar-empty { height: 18px; }

/* 弹窗按钮 */
.en-modal-close {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 12px;
  border: 1px solid #E0E0E0;
  background: #F5F5F5;
  color: #666;
  cursor: pointer;
}
.en-modal-close:hover { background: #EEEEEE; }
.en-modal-reward {
  font-size: 14px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #66BB6A, #43A047);
  color: #fff;
  cursor: pointer;
  transition: filter 0.2s;
}
.en-modal-reward:hover { filter: brightness(1.08); }
.en-modal-reward.en-modal-reward-done {
  background: #E0E0E0;
  color: #999;
}

/* 收藏列表弹窗 */
.en-favorites-list { max-height: 60vh; overflow-y: auto; }
.en-fav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #C8E6C9;
  box-shadow: 0 1px 4px rgba(76,175,80,0.06);
}
.en-fav-item-content h5 { font-size: 14px; font-weight: 600; color: #1B5E20; }
.en-fav-item-content p { font-size: 12px; color: #999; }
.en-fav-del {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid #FFCDD2;
  background: #FFEBEE;
  color: #E53935;
  cursor: pointer;
}
.en-fav-del svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .english-module { padding: 16px 14px 32px; }
  .en-hero { padding: 14px 16px; }
  .en-hero-title { font-size: 19px; }
  .en-dialogue-bubble { max-width: 92%; }
  .en-word-en { font-size: 19px; }
  .en-writing-sentence { font-size: 16px; }
  .en-calendar-grid { gap: 4px; }
  .en-calendar-day { border-radius: 8px; }
  .en-calendar-date { font-size: 12px; }
}

/* ---------- Korean Learning Module (婴儿蓝 + 显眼黄 ins韩风) ---------- */

/* 模块整体背景 */
.korean-module {
  background: linear-gradient(180deg, #E3F2FD 0%, #E1F5FE 40%, #F7FBFF 100%);
  min-height: 100%;
  padding: 24px 28px 40px;
}

/* 顶部标题区 */
.kr-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(25, 118, 210, 0.10);
  border: 1px solid #BBDEFB;
}
.kr-hero-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: #E3F2FD;
  border-radius: 14px;
  color: #1976D2;
  flex-shrink: 0;
}
.kr-hero-icon svg { width: 26px; height: 26px; }
.kr-hero-text { flex: 1; }
.kr-hero-title { font-size: 22px; font-weight: 800; color: #1565C0; letter-spacing: 0.5px; }
.kr-hero-subtitle { font-size: 13px; color: #42A5F5; margin-top: 2px; }
.kr-fav-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: #FFFDE7;
  color: #FBC02D;
  border: 1px solid #FFF176;
  cursor: pointer;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.kr-fav-btn:hover { transform: scale(1.1); }
.kr-fav-btn svg { width: 20px; height: 20px; }

/* 统计卡片 */
.korean-module .stat-row { margin-bottom: 20px; }
.korean-module .stat-card {
  background: #FFFFFF;
  border: 1px solid #BBDEFB;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.06);
}
.korean-module .stat-num { color: #1976D2; }
.korean-module .stat-label { color: #42A5F5; }

/* 学习模块卡片 */
.kr-section-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.08);
  border: 1px solid #E0E0E0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.kr-section-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.15);
  border-color: #90CAF9;
}
.kr-section-card.kr-section-done {
  background: linear-gradient(135deg, #E3F2FD 0%, #FFFFFF 100%);
  border-color: #64B5F6;
}
.kr-section-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.kr-section-card-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #E3F2FD;
  border-radius: 10px;
  color: #1976D2;
}
.kr-section-card-icon svg { width: 20px; height: 20px; }
.kr-section-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: #FFFDE7;
  color: #F57F17;
}
.kr-section-done .kr-section-status {
  background: #E3F2FD;
  color: #1976D2;
}
.kr-section-card-title { font-size: 17px; font-weight: 700; color: #1565C0; margin-bottom: 4px; }
.kr-section-card-subtitle { font-size: 13px; color: #888; margin-bottom: 10px; }
.kr-section-preview {
  font-size: 13px;
  color: #999;
  line-height: 1.6;
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.kr-section-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.kr-section-reward { font-size: 12px; color: #999; }
.kr-section-btn {
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(135deg, #FFEB3B, #FBC02D);
  color: #1565C0;
  cursor: pointer;
  transition: filter 0.2s, transform 0.15s ease;
}
.kr-section-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.kr-section-btn.kr-section-btn-secondary {
  background: #E3F2FD;
  color: #1976D2;
}

/* 日历区标题 */
.kr-calendar-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1565C0;
  margin: 24px 0 12px;
}

/* 弹窗内容区 */
.kr-hint {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: #E3F2FD;
  border-radius: 10px;
  line-height: 1.6;
}
.kr-section-body { padding-bottom: 8px; }

/* 单词卡片 */
.kr-word-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.07);
  border: 1px solid #E3F2FD;
  transition: box-shadow 0.2s ease;
}
.kr-word-card:hover { box-shadow: 0 4px 16px rgba(25, 118, 210, 0.12); }
.kr-word-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.kr-word-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: #E3F2FD;
  color: #1976D2;
}
.kr-word-no { font-size: 13px; font-weight: 700; color: #BDBDBD; }
.kr-word-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.kr-word-title-block { flex: 1; }
.kr-word-en { font-size: 22px; font-weight: 800; color: #1565C0; display: block; margin-bottom: 2px; }
.kr-word-phonetic { font-size: 13px; color: #9E9E9E; display: block; margin-bottom: 4px; }
.kr-word-cn { font-size: 15px; font-weight: 600; color: #424242; display: block; }
.kr-word-actions { display: flex; gap: 8px; flex-shrink: 0; }
.kr-speak-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid #BBDEFB;
  background: #E3F2FD;
  color: #1976D2;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s;
}
.kr-speak-btn:hover { transform: scale(1.1); background: #BBDEFB; }
.kr-speak-btn svg { width: 18px; height: 18px; }
.kr-speak-btn.favorited { color: #FBC02D; border-color: #FFF176; background: #FFFDE7; }
.kr-word-example {
  background: #E3F2FD;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid #BBDEFB;
}
.kr-example-en { font-size: 14px; color: #424242; line-height: 1.7; margin-bottom: 4px; }
.kr-example-cn { font-size: 13px; color: #888; line-height: 1.6; margin-bottom: 8px; }
.kr-example-speak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #1976D2;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}
.kr-example-speak svg { width: 16px; height: 16px; }
.kr-example-speak:hover { text-decoration: underline; }

/* 对话区 */
.kr-dialogue-lines { display: flex; flex-direction: column; gap: 14px; }
.kr-dialogue-line { display: flex; gap: 10px; }
.kr-dialogue-line.a { flex-direction: row; }
.kr-dialogue-line.b { flex-direction: row-reverse; }
.kr-dialogue-speaker {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.kr-dialogue-line.a .kr-dialogue-speaker { background: #42A5F5; }
.kr-dialogue-line.b .kr-dialogue-speaker { background: #FBC02D; }
.kr-dialogue-bubble {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 12px 16px;
  max-width: 80%;
  border: 1px solid #E0E0E0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.kr-dialogue-en { font-size: 15px; font-weight: 500; margin-bottom: 4px; color: #333; }
.kr-dialogue-cn { font-size: 13px; color: #888; margin-bottom: 6px; }
.kr-line-speak { width: 28px; height: 28px; }

/* 阅读区 */
.kr-reading-card {
  background: #E3F2FD;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  border: 1px solid #90CAF9;
}
.kr-reading-text { font-size: 16px; line-height: 1.9; margin-bottom: 10px; color: #333; }
.kr-reading-text p { margin-bottom: 10px; }
.kr-reading-text p:last-child { margin-bottom: 0; }
.kr-reading-speak {
  width: auto; padding: 6px 14px; border-radius: 20px;
  font-size: 13px; gap: 6px;
}
.kr-reading-translation {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1px solid #E8E8E8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.kr-reading-translation p { font-size: 14px; line-height: 1.8; margin-bottom: 6px; color: #888; }

/* 写作区 */
.kr-writing-card {
  background: #FFFDE7;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 14px;
  border: 1px solid #FFF176;
}
.kr-writing-sentence { font-size: 18px; font-weight: 700; line-height: 1.6; color: #333; margin-bottom: 6px; }
.kr-writing-translation { font-size: 14px; color: #888; margin-bottom: 12px; }
.kr-writing-speak { width: auto; padding: 6px 14px; border-radius: 20px; font-size: 13px; gap: 6px; }
.kr-writing-tip {
  background: #E1F5FE;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid #B3E5FC;
}
.kr-writing-alts {
  background: #FFFFFF;
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid #E8E8E8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.kr-writing-alt { padding: 10px 0; border-bottom: 1px dashed #E0E0E0; }
.kr-writing-alt:last-child { border-bottom: none; }
.kr-writing-alt-cn { font-size: 13px; color: #888; }

/* 小区块标题 */
.kr-block-title { font-size: 14px; font-weight: 700; color: #1565C0; margin-bottom: 8px; }

/* 收藏按钮 */
.kr-collect-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #BBDEFB;
  background: #FFFFFF;
  color: #1976D2;
  cursor: pointer;
  transition: background 0.2s;
}
.kr-collect-btn:hover { background: #E3F2FD; }
.kr-collect-btn svg { width: 16px; height: 16px; }

/* 日历卡片 */
.kr-calendar-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.08);
  border: 1px solid #BBDEFB;
}
.kr-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.kr-calendar-title { font-size: 16px; font-weight: 700; color: #1565C0; }
.kr-month-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid #BBDEFB;
  background: #E3F2FD;
  color: #1976D2;
  cursor: pointer;
  transition: background 0.2s;
}
.kr-month-btn:hover { background: #BBDEFB; }
.kr-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.kr-calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #64B5F6;
  padding: 4px 0;
}
.kr-calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #E8E8E8;
  background: #FAFAFA;
  transition: all 0.2s ease;
}
.kr-calendar-day.today {
  border-color: #42A5F5;
  box-shadow: 0 0 0 2px #E3F2FD;
  background: #E3F2FD;
}
.kr-calendar-day.checked {
  background: linear-gradient(135deg, #FFFDE7, #FFF59D);
  border-color: #FBC02D;
}
.kr-calendar-date { font-size: 14px; font-weight: 600; color: #555; }
.kr-calendar-day.checked .kr-calendar-date { color: #F57F17; }
.kr-calendar-mark { color: #FBC02D; margin-top: 2px; }
.kr-calendar-mark svg { width: 16px; height: 16px; }
.kr-calendar-empty { height: 18px; }

/* 弹窗按钮 */
.kr-modal-close {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 12px;
  border: 1px solid #E0E0E0;
  background: #F5F5F5;
  color: #666;
  cursor: pointer;
}
.kr-modal-close:hover { background: #EEEEEE; }
.kr-modal-reward {
  font-size: 14px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #FFEB3B, #FBC02D);
  color: #1565C0;
  cursor: pointer;
  transition: filter 0.2s;
}
.kr-modal-reward:hover { filter: brightness(1.08); }
.kr-modal-reward.kr-modal-reward-done {
  background: #E0E0E0;
  color: #999;
}

/* 收藏列表弹窗 */
.kr-favorites-list { max-height: 60vh; overflow-y: auto; }
.kr-fav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid #BBDEFB;
  box-shadow: 0 1px 4px rgba(25,118,210,0.06);
}
.kr-fav-item-content h5 { font-size: 14px; font-weight: 600; color: #1565C0; }
.kr-fav-item-content p { font-size: 12px; color: #999; }
.kr-fav-del {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid #FFCDD2;
  background: #FFEBEE;
  color: #E53935;
  cursor: pointer;
}
.kr-fav-del svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .korean-module { padding: 16px 14px 32px; }
  .kr-hero { padding: 14px 16px; }
  .kr-hero-title { font-size: 19px; }
  .kr-dialogue-bubble { max-width: 92%; }
  .kr-word-en { font-size: 19px; }
  .kr-writing-sentence { font-size: 16px; }
  .kr-calendar-grid { gap: 4px; }
  .kr-calendar-day { border-radius: 8px; }
  .kr-calendar-date { font-size: 12px; }
}

/* ---------- Print ---------- */
@media print {
  #sidebar, #mobile-header, #bottom-nav, .module-header button, .icon-btn { display: none; }
  #content { margin: 0; padding: 0; }
}

/* ============================================================
   健康管理系统 - 粉嫩简约风格
   ============================================================ */
.health-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px;
  -webkit-overflow-scrolling: touch;
}
.health-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #F3D9E3;
  background: #FFF6FA;
  color: #B06689;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
}
.health-tab svg { width: 15px; height: 15px; }
.health-tab.active {
  background: linear-gradient(135deg, #FF9DC0, #FF6FA5);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255,111,165,0.32);
}
.health-content { padding-top: 6px; }

.health-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #C2567F;
  margin: 18px 0 10px;
}
.health-section-title svg { width: 17px; height: 17px; }

.health-profile-card {
  background: #fff;
  border: 1px solid #F6E2EA;
  border-radius: 14px;
  padding: 6px 14px;
}
.hp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed #F3E4EB;
  font-size: 14px;
}
.hp-row:last-child { border-bottom: none; }
.hp-row span { color: #9A8790; }
.hp-row b { color: #5A4A52; }
.hp-row b.hl-target { color: #FF6FA5; }

.health-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  width: 100%;
  border: none;
  background: linear-gradient(135deg, #FF9DC0, #FF6FA5);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255,111,165,0.28);
}
.health-btn-primary svg { width: 16px; height: 16px; }
.health-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  border: 1px solid #F3D9E3;
  background: #FFF6FA;
  color: #C2567F;
  font-weight: 600;
  font-size: 14px;
  padding: 11px;
  border-radius: 12px;
  cursor: pointer;
}
.health-btn-ghost svg { width: 15px; height: 15px; }
.health-actions { margin: 12px 0; }

.health-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.hm-card {
  background: #fff;
  border: 1px solid #F6E2EA;
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}
.hm-num { font-size: 22px; font-weight: 800; color: #FF6FA5; line-height: 1.1; }
.hm-label { font-size: 12px; color: #9A8790; margin-top: 4px; }
.hm-sub { font-size: 11px; color: #C7B3BC; margin-top: 2px; }

.health-progress { margin-top: 16px; }
.hp-head { display: flex; justify-content: space-between; font-size: 12.5px; color: #9A8790; margin-bottom: 6px; }
.hp-bar { height: 10px; background: #F7E3EB; border-radius: 999px; overflow: hidden; }
.hp-fill { height: 100%; background: linear-gradient(90deg, #FFB3D1, #FF6FA5); border-radius: 999px; transition: width 0.4s; }

.health-recipe-hint {
  background: #FFF6FA;
  border: 1px solid #F6E2EA;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #8A6E7A;
  margin-bottom: 12px;
}
.health-recipe-hint b { color: #FF6FA5; }

.health-recipe-box {
  background: #fff;
  border: 1px solid #F6E2EA;
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
}
.health-recipe-box.over { border-color: #FFC2C2; background: #FFF5F5; }
.hr-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: #5A4A52; margin-bottom: 10px; }
.hr-status { font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.hr-status.good { background: #E4F6EC; color: #2F9E6B; }
.hr-status.bad { background: #FFE6E6; color: #D94545; }
.hr-day { border-top: 1px dashed #F3E4EB; padding: 10px 0; }
.hr-day:first-of-type { border-top: none; }
.hr-day-title { font-size: 13px; font-weight: 700; color: #C2567F; margin-bottom: 6px; }
.hr-meals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.hr-meals span { font-size: 13px; color: #6B5A62; }
.hr-meals i { display: inline-block; width: 30px; color: #C7A7B5; font-style: normal; font-weight: 700; }
.hr-summary { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; margin-top: 10px; font-size: 13px; color: #8A6E7A; font-weight: 600; }
.hr-summary .hr-over { color: #D94545; }
.hr-actions { display: flex; gap: 10px; margin-top: 12px; }
.hr-actions .health-btn-primary, .hr-actions .health-btn-ghost { margin-top: 0; }

.health-saved-list { margin-top: 10px; }
.health-saved-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border: 1px solid #F6E2EA; border-radius: 12px;
  padding: 11px 13px; margin-bottom: 8px; font-size: 13px; color: #6B5A62;
}
.badge.badge-pink { background: #FFE3EE; color: #E84E92; }
.badge.badge-green { background: #E4F6EC; color: #2F9E6B; }

.health-checkin {
  background: linear-gradient(135deg, #FFF0F6, #FFE3EE);
  border: 1px solid #FBD3E3;
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
}
.health-checkin.done { background: #EFFAF3; border-color: #CDEBD8; }
.hc-info { display: flex; align-items: center; gap: 7px; font-weight: 800; color: #C2567F; font-size: 15px; }
.hc-info svg { width: 18px; height: 18px; }
.hc-sub { font-size: 12.5px; color: #A98FA0; margin-top: 4px; }

.health-video-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.health-video-card {
  background: #fff; border: 1px solid #F6E2EA; border-radius: 14px; padding: 13px;
}
.hv-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.hv-title { display: flex; align-items: center; gap: 7px; font-weight: 700; color: #5A4A52; font-size: 14px; }
.hv-title svg { width: 17px; height: 17px; color: #FF6FA5; }
.hv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.health-btn-small {
  display: inline-flex; align-items: center; gap: 5px;
  border: none; background: #FFEAF2; color: #E84E92;
  font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 10px; cursor: pointer;
}
.health-btn-small.ghost { background: #F4F1F3; color: #9A8790; text-decoration: none; }
.health-btn-small svg { width: 14px; height: 14px; }

.timer-wrap { text-align: center; padding: 6px 0; }
.timer-title { font-weight: 700; color: #5A4A52; margin-bottom: 14px; }
.timer-display {
  font-size: 52px; font-weight: 800; color: #FF6FA5;
  font-variant-numeric: tabular-nums; letter-spacing: 2px;
}
.timer-controls { display: flex; gap: 10px; justify-content: center; margin: 18px 0 10px; }
.timer-controls .health-btn-primary, .timer-controls .health-btn-ghost { width: auto; margin: 0; padding: 11px 22px; }
.timer-hint { font-size: 12.5px; color: #A98FA0; }

.health-chart {
  background: #fff; border: 1px solid #F6E2EA; border-radius: 14px;
  padding: 10px 6px 4px; margin: 6px 0 14px;
}
.chart-axis { display: flex; justify-content: space-between; padding: 0 14px 6px; font-size: 11px; color: #C7A7B5; }

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; }
.cal-arrow {
  border: 1px solid #F3D9E3; background: #FFF6FA; color: #C2567F;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.cal-arrow svg { width: 18px; height: 18px; }
.cal-title { font-weight: 800; color: #5A4A52; font-size: 15px; }
.cal-grid-head, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-week { text-align: center; font-size: 11px; color: #C7A7B5; padding: 4px 0; }
.cal-cell {
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  background: #F7E3EB;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: #9A8790; position: relative;
}
.cal-cell.empty { background: transparent; }
.cal-cell.lvl-0 { background: #F7E3EB; }
.cal-cell.lvl-1 { background: #FBC4D8; color: #fff; }
.cal-cell.lvl-2 { background: #F78BB4; color: #fff; }
.cal-cell.lvl-3 { background: #E84E92; color: #fff; }
.cal-num { font-weight: 700; }
.cal-dot { font-size: 9px; opacity: 0.9; margin-top: 1px; }
.cal-legend { display: flex; align-items: center; gap: 5px; justify-content: flex-end; margin-top: 12px; font-size: 11px; color: #C7A7B5; }
.cal-legend-cell { width: 14px; height: 14px; border-radius: 4px; }
.cal-legend-cell.lvl-0 { background: #F7E3EB; }
.cal-legend-cell.lvl-1 { background: #FBC4D8; }
.cal-legend-cell.lvl-2 { background: #F78BB4; }
.cal-legend-cell.lvl-3 { background: #E84E92; }
/* ============================================
   记账消费模块 - 粉嫩简约主题
   ============================================ */
.expense-header { margin-bottom: 6px; }
.expense-tabs {
  display: flex; gap: 10px; margin-bottom: 18px;
}
.expense-tab {
  flex: 1; padding: 10px 0; border-radius: 20px;
  background: #FFF0F5; color: #D45D8A; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: var(--transition);
}
.expense-tab.active {
  background: linear-gradient(135deg, #FF8FB8, #FF5C9A);
  color: #fff; box-shadow: 0 4px 12px rgba(255, 92, 154, 0.25);
}
.expense-tab svg { width: 16px; height: 16px; }

/* 顶部四宫格统计卡 */
.expense-summary {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px;
}
.expense-sum-card {
  border-radius: var(--radius-lg); padding: 16px 14px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.expense-sum-card.pink { background: linear-gradient(135deg, #FFE4EC, #FFF0F5); }
.expense-sum-card.green { background: linear-gradient(135deg, #E6F7F1, #F0FAF6); }
.expense-sum-card.red { background: linear-gradient(135deg, #FFEBEE, #FFF5F5); }
.expense-sum-card.yellow { background: linear-gradient(135deg, #FFF8E1, #FFFDF5); cursor: pointer; }
.expense-sum-card .sum-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.7); display: flex; align-items: center; justify-content: center;
  color: #666;
}
.expense-sum-card .sum-icon svg { width: 16px; height: 16px; }
.expense-sum-card .sum-label { font-size: 12px; color: #8A7A80; }
.expense-sum-card .sum-num { font-size: 22px; font-weight: 800; color: #4A3F45; letter-spacing: -0.5px; }

/* 预算进度条 */
.expense-budget-bar {
  background: #fff; border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.budget-info { display: flex; justify-content: space-between; font-size: 13px; color: #8A7A80; margin-bottom: 8px; }
.budget-track { height: 8px; background: #F2E4EA; border-radius: 4px; overflow: hidden; }
.budget-fill { height: 100%; background: linear-gradient(90deg, #FF8FB8, #FF5C9A); border-radius: 4px; transition: width 0.4s ease; }
.budget-fill.over { background: linear-gradient(90deg, #FF6B6B, #EE5253); }
.budget-warn { margin-top: 7px; font-size: 12px; color: #E84E5A; }

/* 日历卡片 */
.expense-cal-card {
  background: #fff; border-radius: var(--radius-lg); padding: 16px;
  box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.exp-cal-nav {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.exp-cal-title { font-size: 16px; font-weight: 700; color: #4A3F45; }
.exp-cal-arrow {
  width: 30px; height: 30px; border-radius: 50%;
  background: #FFF0F5; color: #D45D8A; display: flex; align-items: center; justify-content: center;
}
.exp-cal-arrow svg { width: 16px; height: 16px; }
.exp-cal-grid-head, .exp-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
}
.exp-cal-week { text-align: center; font-size: 12px; color: #B8A8B0; padding: 6px 0; }
.exp-cal-cell {
  aspect-ratio: 1 / 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 13px; color: #5D5257; position: relative;
  background: #FAFAFA;
}
.exp-cal-cell.empty { background: transparent; }
.exp-cal-cell.today { background: #FF5C9A; color: #fff; font-weight: 700; }
.exp-cal-cell.has-expense { background: #FFE4EC; color: #D45D8A; font-weight: 700; }
.exp-cal-cell .exp-cal-dot {
  width: 4px; height: 4px; border-radius: 50%; background: #FF5C9A;
  position: absolute; bottom: 4px;
}
.exp-cal-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12px; color: #A898A0; }

/* 账单列表 */
.expense-section-title { font-size: 15px; font-weight: 700; color: #4A3F45; margin-bottom: 12px; }
.expense-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.expense-item {
  background: #fff; border-radius: var(--radius); padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm);
}
.expense-item-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.expense-item-icon svg { width: 20px; height: 20px; }
.expense-item-content { flex: 1; min-width: 0; }
.expense-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.expense-item-cat { font-weight: 600; color: #4A3F45; font-size: 14px; }
.expense-item-amount { font-weight: 800; color: #E84E5A; font-size: 15px; }
.expense-item-amount.income { color: #2F9E6B; }
.expense-item-bottom { font-size: 12px; color: #A898A0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-item-actions { display: flex; gap: 4px; }

/* 收入来源明细 */
.expense-income-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px;
}
.expense-income-card {
  background: #fff; border-radius: var(--radius); padding: 14px 10px;
  text-align: center; box-shadow: var(--shadow-sm);
}
.expense-income-label { font-size: 12px; color: #A898A0; margin-bottom: 6px; }
.expense-income-num { font-size: 16px; font-weight: 800; color: #4A3F45; }

/* 记账表单 */
.expense-form-wrap { display: flex; flex-direction: column; gap: 18px; }
.expense-type-switch {
  display: flex; background: #FFF0F5; border-radius: 16px; padding: 4px;
}
.expense-type-btn {
  flex: 1; padding: 10px 0; border-radius: 13px;
  font-size: 14px; font-weight: 600; color: #A898A0;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: var(--transition);
}
.expense-type-btn.active {
  background: #fff; color: #FF5C9A; box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.expense-type-btn .type-mark { font-size: 16px; }

.expense-section-label { font-size: 13px; color: #8A7A80; margin-bottom: 10px; font-weight: 600; }

.expense-cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.expense-cat-item {
  background: #FAFAFA; border-radius: var(--radius); padding: 12px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 2px solid transparent; cursor: pointer; transition: var(--transition);
}
.expense-cat-item.selected {
  border-color: var(--cat-text); background: var(--cat-bg);
}
.expense-cat-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center;
  color: var(--cat-text);
}
.expense-cat-icon svg { width: 18px; height: 18px; }
.expense-cat-name { font-size: 12px; color: #5D5257; }

.expense-input-section { background: #fff; border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.expense-amount-row { display: flex; gap: 10px; margin-bottom: 12px; }
.expense-amount-input {
  flex: 1; display: flex; align-items: center; gap: 6px;
  background: #FFF8FB; border-radius: var(--radius); padding: 10px 12px;
  border: 1px solid #F8E1ED;
}
.expense-amount-input .currency { font-size: 20px; font-weight: 700; color: #FF5C9A; }
.expense-amount-input input {
  flex: 1; border: none; background: transparent; font-size: 20px; font-weight: 700; color: #4A3F45;
  outline: none; width: 100%;
}
.expense-note-input {
  flex: 1; display: flex; align-items: center;
  background: #FFF8FB; border-radius: var(--radius); padding: 10px 12px;
  border: 1px solid #F8E1ED;
}
.expense-note-input input {
  width: 100%; border: none; background: transparent; font-size: 14px; color: #4A3F45; outline: none;
}
.expense-date-input { display: flex; align-items: center; gap: 10px; }
.expense-date-input label { font-size: 13px; color: #8A7A80; }
.expense-date-input input {
  flex: 1; border: 1px solid #F8E1ED; border-radius: var(--radius); padding: 8px 10px;
  background: #FFF8FB; color: #4A3F45; font-size: 14px;
}

.expense-save-btn {
  background: linear-gradient(135deg, #FF8FB8, #FF5C9A); color: #fff;
  border-radius: 24px; padding: 14px 0; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 6px 16px rgba(255, 92, 154, 0.28);
}
.expense-save-btn svg { width: 18px; height: 18px; }

/* 语音按钮（看板顶部） */
.expense-voice-btn {
  width: 100%; background: linear-gradient(135deg, #FFF0F5, #FFE4EC);
  border: 2px dashed #FFB8D5; border-radius: var(--radius-lg);
  padding: 18px 0; margin-bottom: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #D45D8A; font-weight: 600; font-size: 14px;
}
.expense-voice-btn .voice-mic {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #FF8FB8, #FF5C9A); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 92, 154, 0.3);
}
.expense-voice-btn .voice-mic svg { width: 24px; height: 24px; }

/* 语音弹窗 */
.voice-modal { display: flex; flex-direction: column; align-items: center; padding: 10px 0; }
.voice-pulse {
  width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(135deg, #FF8FB8, #FF5C9A);
  display: flex; align-items: center; justify-content: center;
  color: #fff; position: relative; margin-bottom: 16px;
}
.voice-pulse.recording { animation: voicePulse 1.4s infinite; }
.voice-pulse svg { width: 36px; height: 36px; }
@keyframes voicePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 92, 154, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(255, 92, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 92, 154, 0); }
}
.voice-status { font-size: 14px; color: #8A7A80; margin-bottom: 10px; }
.voice-text { min-height: 40px; font-size: 15px; color: #4A3F45; text-align: center; margin-bottom: 18px; padding: 0 10px; }
.voice-stop-btn {
  background: #2F9E6B; color: #fff; border-radius: 20px; padding: 10px 24px;
  font-weight: 600; display: flex; align-items: center; gap: 5px;
}
.voice-stop-btn svg { width: 16px; height: 16px; }

/* 负债 */
.expense-debt-list { display: flex; flex-direction: column; gap: 10px; }
.expense-empty-small { text-align: center; color: #A898A0; padding: 20px 0; font-size: 14px; }
.expense-debt-item {
  background: #FAFAFA; border-radius: var(--radius); padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.expense-debt-name { font-weight: 700; color: #4A3F45; font-size: 14px; }
.expense-debt-date { font-size: 12px; color: #A898A0; }
.expense-debt-right { margin-left: auto; text-align: right; }
.expense-debt-remain { font-weight: 800; color: #E84E5A; font-size: 15px; }
.expense-debt-total { font-size: 11px; color: #A898A0; }
.expense-debt-actions { display: flex; gap: 4px; }

@media (max-width: 480px) {
  .expense-summary { gap: 8px; }
  .expense-sum-card { padding: 12px 10px; }
  .expense-sum-card .sum-num { font-size: 18px; }
  .expense-cat-grid { gap: 8px; }
  .expense-cat-item { padding: 10px 4px; }
  .expense-income-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

/* ============================================
   模块主题样式追加
   代办事项：红色醒目 / 个人账号：芭比梦幻粉
   ============================================ */

/* ---------- 代办事项 - 红色醒目主题 ---------- */
.todo-theme {
  background: linear-gradient(135deg, #FFF5F5 0%, #FFEFEF 100%);
  border-radius: 16px;
  padding: 18px;
  min-height: 60vh;
}
.todo-theme .module-header h2 { color: #C62828; }
.todo-theme .btn-primary { background: linear-gradient(135deg, #E53935, #C62828); border-color: #C62828; }
.todo-theme .btn-primary:hover { background: linear-gradient(135deg, #C62828, #B71C1C); }
.todo-theme .btn-secondary { color: #C62828; border-color: #FFCDD2; background: #FFEBEE; }
.todo-theme .stat-card { background: linear-gradient(135deg, #FFEBEE, #FFCDD2); border: 1px solid #FFCDD2; }
.todo-theme .stat-num { color: #C62828; }
.todo-theme .section-title { color: #B71C1C; }
.todo-theme .todo-item { background: #fff; border: 1px solid #FFCDD2; }
.todo-theme .todo-checkbox { border-color: #EF9A9A; }
.todo-theme .todo-checkbox.checked { background: #E53935; border-color: #E53935; }
.todo-theme .todo-text { color: #202124; font-weight: 600; }
.todo-theme .todo-meta { color: #C62828; }
.todo-theme .icon-btn:hover { color: #C62828; }
.todo-theme .form-input:focus,
.todo-theme .form-textarea:focus,
.todo-theme .form-select:focus { border-color: #E53935; box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12); }

/* ---------- 个人账号 - 芭比梦幻粉主题 ---------- */
.account-theme {
  background: linear-gradient(135deg, #FFF5F8 0%, #FFE3F0 50%, #FFF0F6 100%);
  border-radius: 16px;
  padding: 18px;
  min-height: 60vh;
}
.account-theme .module-header h2 { color: #FF1493; }
.account-theme .tabs { background: rgba(255,255,255,0.7); border-radius: 12px; padding: 4px; border-bottom: none; }
.account-theme .tab-item { color: #FF69B4; }
.account-theme .tab-item.active { color: #FF1493; background: #fff; box-shadow: 0 2px 10px rgba(255,20,147,0.18); border-bottom: none; }
.account-theme .btn-primary { background: linear-gradient(135deg, #FF69B4, #FF1493); border-color: #FF1493; }
.account-theme .btn-primary:hover { background: linear-gradient(135deg, #FF1493, #DB0F7D); }
.account-theme .btn-secondary { color: #FF1493; border-color: #FFB6D5; background: #FFE3F0; }
.account-theme .card { background: #fff; border: 1px solid #FFB6D5; }
.account-theme .card-yellow { background: #FFF8E1; border-color: #FFE082; }
.account-theme .card-title { color: #C71585; }
.account-theme .badge-green { background: #F8E1F0; color: #C71585; }
.account-theme .badge-pink { background: #FFE3F0; color: #FF1493; }
.account-theme .badge-yellow { background: #FFF8E1; color: #B08D00; }
.account-theme .stat-card { background: linear-gradient(135deg, #FFE3F0, #FFF0F6); border: 1px solid #FFB6D5; }
.account-theme .stat-num { color: #FF1493; }
.account-theme .icon-btn:hover { color: #FF1493; }
.account-theme .kanban-column { background: rgba(255,255,255,0.7); }
.account-theme .kanban-card { border-color: #FFB6D5; }
.account-theme .data-table thead th { background: #FFE3F0; color: #C71585; }
.account-theme .form-input:focus,
.account-theme .form-textarea:focus,
.account-theme .form-select:focus { border-color: #FF69B4; box-shadow: 0 0 0 3px rgba(255,105,180,0.15); }

/* ---------- 模块主题通用适配 ---------- */
.todo-theme .module-header,
.account-theme .module-header { margin-bottom: 16px; }
@media (max-width: 640px) {
  .todo-theme,
  .account-theme { padding: 12px; border-radius: 12px; }
}
/* ============================================
   可隐藏 Hello Kitty 左侧导航（粉彩卡片风）
   视觉规范：低饱和浅粉主色、圆角卡片、柔和卡通、无繁杂特效
   ============================================ */

:root {
  --nav-bg: #FFF5F7;
  --nav-card-bg: #FFFFFF;
  --nav-card-hover: #FFF0F4;
  --nav-card-active: #FFE4EC;
  --nav-text: #8F6674;
  --nav-text-active: #C75B85;
  --nav-border: #FAD4E0;
  --nav-shadow: 0 2px 8px rgba(201, 74, 122, 0.08);
}

html, body { overflow-x: hidden; }
body { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--nav-bg);
  color: var(--nav-text);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.25s ease;
  padding: 16px 12px;
  border-right: 1px solid var(--nav-border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 4px 18px;
  color: var(--nav-text-active);
  font-size: 16px;
  font-weight: 700;
}
.logo-title { display: flex; align-items: center; gap: 10px; }
.sidebar-logo .logo-icon { flex-shrink: 0; color: var(--nav-text-active); }

#sidebar-toggle {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--nav-card-bg);
  color: var(--nav-text-active);
  border: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow);
  flex-shrink: 0;
}
#sidebar-toggle:active { background: var(--nav-card-active); }

.nav-list { flex: 1; padding: 4px 0; overflow-y: auto; overflow-x: hidden; }
.nav-list .nav-separator { display: none; }
.nav-list li { margin-bottom: 10px; }
.nav-list li a,
.nav-list li button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--nav-card-bg);
  color: var(--nav-text);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-align: left;
  border: 1px solid transparent;
  box-shadow: var(--nav-shadow);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
.nav-list li a:hover,
.nav-list li button:hover {
  background: var(--nav-card-hover);
  color: var(--nav-text-active);
  border-color: var(--nav-border);
}
.nav-list li a.active {
  background: var(--nav-card-active);
  color: var(--nav-text-active);
  border-color: var(--nav-border);
  font-weight: 700;
}
.nav-list li a svg,
.nav-list li button svg { flex-shrink: 0; }

.nav-icon-img {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--nav-border);
  flex-shrink: 0;
}

.nav-list li.nav-quick a {
  background: var(--nav-card-hover);
  color: var(--nav-text-active);
  border-color: var(--nav-border);
}

.sidebar-footer { padding: 8px 4px 0; }
.sidebar-date { font-size: 12px; color: var(--nav-text); text-align: center; }

#content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 24px 28px 60px;
  transition: margin-left 0.25s ease, padding-top 0.25s ease;
  position: relative;
}

/* Content toggle (master button) */
#content-toggle {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 12px;
  z-index: 95;
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--nav-card-bg);
  color: var(--nav-text-active);
  border: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow);
  align-items: center;
  justify-content: center;
}
#content-toggle svg { width: 22px; height: 22px; }

/* Hidden sidebar state */
.sidebar-hidden #sidebar { transform: translateX(-100%); }
.sidebar-hidden #content { margin-left: 0; padding-top: 70px; }
.sidebar-hidden #content-toggle { display: flex; }

/* ---------- Mobile / narrow screens ---------- */
@media (max-width: 900px) {
  #mobile-header,
  #bottom-nav,
  #mobile-drawer,
  #drawer-overlay { display: none !important; }

  #sidebar {
    width: 92px;
    padding: 10px 6px;
    border-right: none;
    box-shadow: 2px 0 12px rgba(201, 74, 122, 0.08);
  }
  .sidebar-logo { justify-content: center; padding: 8px 0 12px; }
  .logo-title { display: none; }
  #sidebar-toggle { width: 28px; height: 28px; border-radius: 8px; }
  .nav-list { padding: 2px 0; }
  .nav-list li { margin-bottom: 6px; }
  .nav-list li a,
  .nav-list li button {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 2px;
    font-size: 10px;
    line-height: 1.15;
    text-align: center;
    border-radius: 12px;
  }
  .nav-icon-img { width: 36px; height: 36px; border-radius: 10px; }
  .sidebar-footer { display: none; }

  #content {
    margin-left: 92px;
    padding: 16px 14px 24px;
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .sidebar-hidden #content { margin-left: 0; padding-top: 70px; }

  /* Prevent auto-zoom on focus in iOS Safari */
  input, textarea, select { font-size: 16px; }

  .card-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-row { flex-direction: row; }
  .stat-card { min-width: 0; }

  .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .modal {
    top: 0; left: 0; right: 0; bottom: 0;
    transform: none;
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  .modal-body { padding: 16px; }
  .kanban { padding-bottom: 12px; }
  .module-header h2 { font-size: 19px; }
  .help-tooltip { display: none; }
}

@media (min-width: 901px) {
  #mobile-header { display: none !important; }
}
