/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  /* 天空彩虹 · 亮色炫彩主题 */
  --green: #00A8CC;          /* 海蓝 主色 */
  --green-dark: #0E7FA3;     /* 深海蓝（强调/文字） */
  --green-bright: #34D399;   /* 薄荷绿（渐变伴色） */
  --green-light: rgba(0, 168, 204, 0.10);   /* 海蓝淡底 */
  --bg: #F0F7FF;             /* 淡天蓝底 */
  --card: #FFFFFF;           /* 白卡片 */
  --text: #17324A;           /* 深蓝灰文字 */
  --muted: #7B93A8;          /* 灰蓝 */
  --danger: #FF5C8A;         /* 草莓粉 */
  --gold: #FBBF24;           /* 金黄 */
  --gold-deep: #FF8A3D;      /* 蜜橙 */
  --purple: #A855F7;         /* 葡萄紫 */
  --pink: #F472B6;           /* 粉 */
  --radius: 16px;
  --shadow: 0 6px 20px rgba(41, 98, 143, 0.10);
  --line: rgba(23, 50, 74, 0.10);
  --line-dash: rgba(23, 50, 74, 0.16);
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(52, 211, 153, 0.22), transparent 55%),
    radial-gradient(700px 500px at 110% 12%, rgba(244, 114, 182, 0.14), transparent 50%),
    radial-gradient(800px 600px at 45% 115%, rgba(0, 168, 204, 0.16), transparent 55%),
    radial-gradient(650px 500px at 88% 82%, rgba(168, 85, 247, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ============ 顶部栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, #0E9BC4, #34D399);
  color: #fff;
  box-shadow: 0 2px 14px rgba(14, 155, 196, 0.35);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  max-width: 720px;
  margin: 0 auto;
}
.topbar h1 { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.icon-btn {
  background: none; border: none; color: #fff;
  font-size: 22px; line-height: 1;
  padding: 4px 10px; cursor: pointer;
  min-width: 40px;
}

/* ============ 视图容器 ============ */
.view { padding: 16px 14px 96px; animation: fadein 0.25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-bottom: 14px;
}
.card-title {
  font-size: 17px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text);
}

/* ============ 首页 hero ============ */
.hero {
  text-align: center;
  padding: 28px 16px 20px;
}
.hero h2 {
  font-size: 26px; margin-bottom: 6px;
  background: linear-gradient(120deg, #0E9BC4, #34D399, #F472B6);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { color: var(--muted); font-size: 14px; }
.empty {
  text-align: center; color: var(--muted);
  padding: 24px 10px; font-size: 14px;
}

/* ============ 首页三键 ============ */
.home-menu { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.home-btn {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: none; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
  cursor: pointer; text-align: left; transition: all 0.15s;
  width: 100%;
}
.home-btn:active { transform: scale(0.98); }
.home-btn-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.home-btn-form .home-btn-icon { background: rgba(0, 168, 204, 0.14); }
.home-btn-plan .home-btn-icon { background: rgba(168, 85, 247, 0.14); }
.home-btn-checkin .home-btn-icon { background: rgba(255, 92, 138, 0.14); }
.home-btn-text { font-size: 17px; font-weight: 700; color: var(--text); }
.home-btn-sub { font-size: 12px; color: var(--muted); display: block; margin-top: 1px; }

/* ============ 客户列表 ============ */
.client-list { margin-bottom: 14px; }
.client-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.client-item:last-child { border-bottom: none; }
.client-item:active { background: rgba(0, 168, 204, 0.06); }
.client-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #0E9BC4, #34D399); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 168, 204, 0.35);
}
.client-info { flex: 1; min-width: 0; }
.client-name { font-size: 16px; font-weight: 600; color: var(--text); }
.client-meta { font-size: 12px; color: var(--muted); }
.client-arrow { color: #B7C7D6; font-size: 22px; }

/* ============ 按钮 ============ */
.btn {
  border: none; border-radius: 11px;
  padding: 12px 18px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #00A8CC, #34D399);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 168, 204, 0.3);
}
.btn-primary:active { filter: brightness(1.08); }
.btn-ghost { background: #E5F4FB; color: #0E7FA3; }
.btn-block { display: block; width: 100%; }
.btn-group { display: flex; gap: 10px; margin-top: 18px; }
.btn-group .btn { flex: 1; }

/* ============ 表单 ============ */
.form-hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.req { color: var(--danger); }
.form-group-title {
  font-size: 14px; font-weight: 700; color: #0E7FA3;
  background: linear-gradient(90deg, rgba(0, 168, 204, 0.12), rgba(52, 211, 153, 0.08));
  border: 1px solid rgba(0, 168, 204, 0.2);
  padding: 8px 12px; border-radius: 8px;
  margin: 16px 0 12px;
}
.form-group-title:first-of-type { margin-top: 0; }
.form-row { display: flex; gap: 10px; }
.field { margin-bottom: 12px; flex: 1; }
.field.half { flex: 1; }
.field label {
  display: block; font-size: 13px; color: var(--text);
  margin-bottom: 5px; font-weight: 500;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid #CFE3F0; border-radius: 10px;
  font-size: 15px; background: #FBFDFF;
  color: var(--text); outline: none;
  font-family: inherit;   /* 和建档其他输入框同字体 */
}
.field input::placeholder, .field textarea::placeholder { color: #A9BCCB; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 168, 204, 0.14);
}
.field input[readonly] { background: #F1F6FA; color: var(--muted); }
.chip-other { margin-top: 8px; }

/* 标签选择 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid #CFE3F0; background: #fff;
  color: var(--text); font-size: 13px;
  padding: 6px 14px; border-radius: 20px;
  cursor: pointer; transition: all 0.15s;
}
.chip.active {
  background: linear-gradient(135deg, #00A8CC, #34D399);
  color: #fff; border-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 168, 204, 0.3);
}

/* ============ 计划页 ============ */
.bmi-pill {
  display: inline-block;
  background: rgba(0, 168, 204, 0.10); color: #0E7FA3;
  border: 1px solid rgba(0, 168, 204, 0.22);
  font-size: 13px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 12px;
}
.ai-pill {
  background: rgba(255, 138, 61, 0.12); color: #E07A2A;
  border: 1px solid rgba(255, 138, 61, 0.25);
  margin-left: 6px;
}
.plan-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.plan-actions .btn { flex: 1; padding: 9px; font-size: 13px; }

.tabs {
  display: flex; gap: 4px;
  background: #E8F3FA; padding: 4px; border-radius: 11px;
  margin-bottom: 14px;
}
.tab {
  flex: 1; border: none; background: transparent;
  padding: 9px 0; font-size: 14px; border-radius: 8px;
  color: var(--muted); cursor: pointer;
}
.tab.active { background: #fff; color: #0E7FA3; font-weight: 600; box-shadow: 0 1px 6px rgba(41, 98, 143, 0.15); }

.plan-summary {
  background: rgba(0, 168, 204, 0.08);
  border: 1px solid rgba(0, 168, 204, 0.16);
  border-radius: 10px; padding: 12px 14px;
  font-size: 14px; color: #0E6A8A;
  margin-bottom: 14px;
}

/* 每日推荐摄入量 */
.daily-quick {
  background: #FBFDFF; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
}
.daily-quick-title { font-size: 14px; font-weight: 700; color: #0E7FA3; margin-bottom: 8px; }
.daily-quick-row {
  display: flex; gap: 8px; font-size: 13px;
  padding: 4px 0; border-bottom: 1px dashed var(--line-dash);
}
.daily-quick-row:last-child { border-bottom: none; }
.daily-quick-label {
  flex-shrink: 0; font-weight: 600; color: var(--text);
  width: 40px;
}
.plan-day {
  padding: 12px 4px;
  border-bottom: 1px dashed var(--line-dash);
}
.plan-day:last-child { border-bottom: none; }
.plan-day-head { display: flex; align-items: center; gap: 8px; }
.plan-day-name { font-weight: 700; font-size: 14px; color: var(--text); }
.plan-day-name small { font-weight: 400; color: var(--muted); font-size: 12px; }
.plan-day-text { font-size: 14px; color: #4A6176; margin-top: 4px; }

.adjust-box {
  margin-top: 16px;
  background: #FBFDFF; border: 1px dashed var(--line-dash);
  border-radius: 10px; padding: 14px;
}
.adjust-title { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.adjust-hint { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.adjust-card textarea {
  width: 100%; padding: 10px;
  border: 1px solid #CFE3F0; border-radius: 8px;
  font-size: 14px; font-family: inherit; resize: vertical;
  margin-bottom: 10px;
  background: #FBFDFF; color: var(--text);
}
.adjust-day-row { margin-bottom: 10px; }
.adjust-day-row label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.plan-summary-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

/* ============ 打卡页 ============ */

/* 日期翻看栏 */
.checkin-datebar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.checkin-date {
  font-size: 17px; font-weight: 700; color: var(--text);
  cursor: pointer; padding: 6px 10px;
}
.date-nav {
  background: #E5F4FB; color: #0E7FA3;
  border-radius: 10px; font-size: 20px; padding: 4px 14px;
}
.date-picker { display: flex; gap: 8px; margin-bottom: 10px; }
.date-picker input {
  flex: 1; padding: 8px 10px; border: 1px solid #CFE3F0;
  border-radius: 8px; font-size: 14px;
  background: #FBFDFF; color: var(--text);
}

/* 打卡项设置入口 */
.checkin-settings { margin-bottom: 14px; }

/* 设置弹窗 */
.settings-section { margin-bottom: 20px; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; color: var(--text); padding: 10px 0;
}
.switch { width: 44px; height: 24px; accent-color: var(--green); }
.settings-hint { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.settings-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.custom-add { display: flex; gap: 8px; margin-bottom: 10px; }
.custom-add input {
  flex: 1; padding: 9px 10px; border: 1px solid #CFE3F0;
  border-radius: 8px; font-size: 14px;
  background: #FBFDFF; color: var(--text);
}
.custom-item {
  display: flex; flex-direction: column;
  padding: 8px 10px; background: #F8FBFE;
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px;
  font-size: 14px; color: var(--text);
}
.custom-item-head {
  display: flex; align-items: center; justify-content: space-between;
}
.custom-del {
  background: none; border: none; color: var(--danger);
  font-size: 12px; cursor: pointer; padding: 4px 6px;
}
.custom-days {
  display: flex; gap: 5px; margin-top: 8px;
}
.dow-btn {
  flex: 1; padding: 4px 0; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: var(--muted);
  font-size: 12px; cursor: pointer;
}
.dow-btn.on {
  background: #5A93E0; border-color: #5A93E0; color: #fff;
}
.custom-days-hint {
  margin: 4px 0 0; font-size: 11px; color: var(--muted);
}

/* 待办事项 */
.todo-box {
  margin-top: 16px; background: #F8FBFE;
  border: 1px dashed var(--line-dash); border-radius: 12px; padding: 14px;
}
.todo-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.todo-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 12px; }
.todo-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px; border-bottom: 1px dashed var(--line-dash);
  cursor: pointer;
}
.todo-item.done .todo-text { text-decoration: line-through; color: var(--muted); }
.todo-text { flex: 1; font-size: 14px; color: var(--text); }
.todo-del {
  color: var(--danger); font-size: 14px; padding: 2px 6px;
  cursor: pointer;
}
.todo-add { display: flex; gap: 8px; margin-top: 10px; }
.todo-add input {
  flex: 1; padding: 9px 10px; border: 1px solid #CFE3F0;
  border-radius: 8px; font-size: 14px;
  background: #FBFDFF; color: var(--text);
}

/* 周统计 */
.week-summary-box { margin-top: 16px; }
.week-overall {
  font-size: 16px; font-weight: 700; color: #0E7FA3;
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.week-cat-list { margin-bottom: 12px; }
.week-cat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 13px; color: var(--text);
}
.week-cat-bar {
  flex: 1; height: 8px; background: #E8F2F8; border-radius: 4px; overflow: hidden;
}
.week-cat-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #00A8CC, #34D399);
  border-radius: 4px;
}
.week-cat-num { width: 44px; text-align: right; color: var(--muted); }
.week-sum-loading { font-size: 13px; color: var(--muted); text-align: center; padding: 18px 12px; }
.week-summary-text {
  font-size: 14px; line-height: 1.8; color: var(--text);
  background: rgba(0, 168, 204, 0.08); border: 1px solid rgba(0, 168, 204, 0.16);
  border-radius: 10px; padding: 12px 14px;
}
.week-sum-hint { font-size: 11px; color: var(--muted); margin-top: 6px; }
.checkin-progress {
  background: #EFF7FB; border-radius: 10px;
  padding: 14px; margin-bottom: 14px;
}
.progress-bar {
  height: 10px; background: #D9E9F3; border-radius: 6px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, #00A8CC, #34D399);
  box-shadow: 0 0 10px rgba(0, 168, 204, 0.4);
  transition: width 0.3s ease;
}
.progress-label { font-size: 13px; color: #0E7FA3; font-weight: 600; margin-top: 8px; }
.checkin-day-block { margin-bottom: 20px; }
.checkin-block-head {
  font-size: 15px; font-weight: 700; color: #0E7FA3;
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 2px solid rgba(0, 168, 204, 0.18);
}
.checkin-group { margin-bottom: 10px; }
.checkin-group-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 5px;
}
.checkin-group-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 8px;
  background: #FBFDFF; border: 1px solid #E3EEF5;
  border-left: 4px solid var(--gcol, #5A93E0);
  border-radius: 10px; cursor: pointer; transition: all 0.15s;
}
.checkin-group-card:active { transform: scale(0.98); }
.checkin-group-card .checkin-group-title { margin-bottom: 0; flex: 1; font-size: 15px; }
.checkin-group-progress { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.checkin-group-arrow { font-size: 18px; color: #B7C7D6; flex-shrink: 0; }
.checkin-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 6px;
  background: #FBFDFF; border: 1px solid #E3EEF5;
  border-radius: 10px; cursor: pointer;
  transition: all 0.15s;
}
.checkin-item:active { transform: scale(0.98); }
.checkin-item-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
.checkin-item.done {
  background: rgba(52, 211, 153, 0.14); border-color: rgba(0, 168, 204, 0.4);
  box-shadow: 0 2px 10px rgba(52, 211, 153, 0.18);
}
.checkin-item-body { flex: 1; min-width: 0; }
.checkin-item-label { font-size: 15px; font-weight: 600; color: var(--text); }
.checkin-item-detail {
  font-size: 13px; color: var(--muted); line-height: 1.6;
  margin-top: 2px;
}
.checkin-item.done .checkin-item-detail { color: #0E7FA3; }
.checkin-item-toggle {
  font-size: 17px; color: #B7C7D6; flex-shrink: 0; line-height: 1.4;
}
.checkin-item.done .checkin-item-toggle { color: #00A8CC; font-weight: 700; }

/* 三餐标签 */
.meal-line { margin-bottom: 3px; }
.meal-tag {
  display: inline-block;
  background: rgba(0, 168, 204, 0.12); color: #0E7FA3;
  font-size: 11px; padding: 1px 8px; border-radius: 10px;
  margin-right: 8px; font-weight: 600;
}
.plan-day-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.adjust-day-row input {
  width: 100%; padding: 9px 10px;
  border: 1px solid #CFE3F0; border-radius: 8px;
  font-size: 14px; margin-bottom: 8px; outline: none;
  background: #FBFDFF; color: var(--text);
}
.adjust-day-row input:focus { border-color: var(--green); }
.adjust-day-row textarea { margin-bottom: 8px; }
.adjust-quick-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.adjust-quick-row span {
  flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--text); width: 40px;
}
.adjust-quick-row textarea { margin-bottom: 0; flex: 1; }

/* ============ 个性化需求评估 ============ */
.needs-review { margin-top: 12px; }
.needs-review-title { font-size: 14px; font-weight: 700; color: #0E7FA3; margin-bottom: 8px; }
.needs-loading, .needs-error {
  font-size: 13px; color: var(--muted); text-align: center;
  background: #F8FBFE; border: 1px dashed var(--line-dash);
  border-radius: 10px; padding: 16px 12px; margin-top: 12px;
}
.needs-error { color: var(--danger); }
.spinner {
  display: inline-block; width: 16px; height: 16px; margin-right: 7px;
  vertical-align: -3px; box-sizing: border-box;
  border: 3px solid rgba(14,127,163,.22); border-top-color: #0E7FA3;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.spinner-lg {
  display: block; width: 36px; height: 36px; margin: 2px auto 10px;
  box-sizing: border-box;
  border: 4px solid rgba(14,127,163,.18); border-top-color: #0E7FA3;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* 按钮内的 spinner：白圈，适配渐变主按钮 */
.btn .spinner, button .spinner {
  border-color: rgba(255,255,255,.45); border-top-color: #fff;
  width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px;
}
.needs-item {
  border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
  font-size: 13px; line-height: 1.7;
}
.needs-item.verdict-ok { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(0, 168, 204, 0.3); }
.needs-item.verdict-adjust { background: rgba(251, 191, 36, 0.10); border: 1px solid rgba(251, 191, 36, 0.35); }
.needs-item-head { font-weight: 700; margin-bottom: 4px; }
.needs-item.verdict-ok .needs-item-head { color: #0E7FA3; }
.needs-item.verdict-adjust .needs-item-head { color: #C08A00; }
.needs-item-reason { color: var(--text); }
.needs-item-adjusted {
  margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(192, 138, 0, 0.35);
  color: #9C6E00;
}
.needs-item-adopted {
  margin-top: 6px; font-size: 12px; color: #0E7FA3; font-weight: 600;
}
.needs-item-choices {
  display: flex; gap: 8px; margin-top: 10px; padding-top: 8px;
  border-top: 1px dashed rgba(192, 138, 0, 0.3);
}
.choice {
  flex: 1; padding: 8px 6px; font-size: 12px; font-weight: 600;
  border-radius: 8px; border: 1px solid #E0EDF5; background: #F6FAFC; color: #9BB2C3;
  cursor: pointer; transition: all 0.15s;
}
.choice:active { transform: scale(0.97); }
.choice.active[data-choice="accept"] {
  background: linear-gradient(135deg, #00A8CC, #34D399);
  color: #fff; border-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 168, 204, 0.4);
  transform: scale(1.03);
}
.choice.active[data-choice="keep"] {
  background: linear-gradient(135deg, #FF8A3D, #FFB347);
  color: #fff; border-color: transparent;
  box-shadow: 0 2px 10px rgba(255, 138, 61, 0.4);
  transform: scale(1.03);
}
.needs-actions { display: flex; gap: 8px; margin-top: 12px; }
.needs-actions .btn { flex: 1; padding: 11px 8px; font-size: 13px; }

/* ============ 弹层 / 菜单 ============ */
.overlay {
  position: fixed; inset: 0; background: rgba(23, 50, 74, 0.45);
  z-index: 200; display: flex; justify-content: center; align-items: center;
}
.menu-panel {
  width: 280px; max-width: 85%;
  height: 100%;
  background: #fff;
  padding: 24px 16px;
  box-shadow: -4px 0 20px rgba(23, 50, 74, 0.2);
  overflow-y: auto;
  animation: slidein 0.2s ease;
  align-self: stretch; margin-left: auto; border-radius: 0;
}
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.menu-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.menu-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none;
  font-size: 15px; color: var(--text);
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.menu-item:active { color: #00A8CC; }
.menu-footer {
  margin-top: 24px; font-size: 11px; color: var(--muted);
  line-height: 1.7; text-align: center;
}

/* ============ 连胜 / 周进度 / 成就徽章 / 庆祝 ============ */
.streak-bar {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #FFF3E6, #FFFFFF);
  border: 1px solid rgba(255, 138, 61, 0.25);
}
.streak-num { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.streak-fire { font-size: 34px; line-height: 1; display: inline-block; animation: firePulse 1.6s ease infinite; }
.streak-count { font-size: 34px; font-weight: 800; color: #EE6E0C; line-height: 1; text-shadow: 0 2px 10px rgba(238, 110, 12, 0.3); }
.streak-num small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 2px; }
@keyframes firePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.streak-info { flex: 1; }
.streak-sub { font-size: 13px; color: var(--text); font-weight: 600; }
.streak-shield { font-size: 11px; color: var(--muted); margin-top: 3px; }

.week-grid { margin-bottom: 14px; }
.week-grid-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.week-grid-cells { display: flex; gap: 6px; }
.week-cell {
  flex: 1; text-align: center; padding: 7px 0 6px;
  border-radius: 9px; background: #EDF3F8;
  cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  border: 1px solid transparent;
}
.week-cell:active { transform: scale(.95); }
.week-cell.part { background: #FFF3DC; border-color: rgba(251, 191, 36, 0.25); }
.week-cell.full { background: linear-gradient(160deg, #ff9533, #ee6e0c); box-shadow: 0 2px 8px rgba(238, 110, 12, 0.4); }
.week-cell.today { outline: 2px solid #f39a2f; outline-offset: 1px; }
.week-cell.full.today { outline: none; }
.week-cell.view { box-shadow: inset 0 -2px 0 rgba(23, 50, 74, 0.25); }
.week-cell-dow { font-size: 10px; color: var(--muted); line-height: 1.2; }
.week-cell-date { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.2; }
.week-cell-count { font-size: 9px; color: #C08A00; line-height: 1.2; }
.week-cell.full .week-cell-count { color: #fff; font-weight: 700; }
.week-cell.full .week-cell-dow { color: rgba(255, 255, 255, 0.95); }
.week-cell.full .week-cell-date { color: #fff; }
.week-cell.part .week-cell-date { color: #E07A2A; }

.badge-wall { margin-top: 16px; }
.badge-wall-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.badge-wall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge-item {
  text-align: center; padding: 10px 4px;
  background: #F8FBFE; border: 1px solid var(--line);
  border-radius: 12px;
}
.badge-item.got { background: rgba(52, 211, 153, 0.12); border-color: rgba(0, 168, 204, 0.35); }
.badge-item.next { border-color: #FF8A3D; box-shadow: 0 0 0 1px #FF8A3D; }
.badge-icon { display: flex; justify-content: center; margin-bottom: 6px; }
.badge-icon i {
  width: 34px; height: 34px; border-radius: 50%;
  background: #EDF3F8;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; font-style: normal;
}
.badge-item.got .badge-icon i { background: rgba(52, 211, 153, 0.18); }
.badge-item.next .badge-icon i { background: #FFF3E6; }
.badge-name { display: block; font-size: 11px; font-weight: 700; color: var(--text); }
.badge-desc { display: block; font-size: 9px; color: var(--muted); margin-top: 2px; }
.badge-wall-sub {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--line-dash);
}
.badge-mini {
  font-size: 11px; padding: 3px 8px; border-radius: 12px;
  background: #F8FBFE; border: 1px solid var(--line); color: var(--muted);
}
.badge-mini.got { background: rgba(52, 211, 153, 0.12); color: #0E7FA3; border-color: rgba(0, 168, 204, 0.3); }

/* 首页今日概览 */
.home-today {
  background: linear-gradient(135deg, #E8F8FB, #F6FFF4);
  border: 1px solid rgba(0, 168, 204, 0.18);
}
.home-today-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.home-today-name { font-size: 16px; font-weight: 700; color: var(--text); }
.home-today-streak { font-size: 13px; font-weight: 700; color: #EE6E0C; }
.home-today-bar { height: 10px; background: #DCEAF2; border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.home-today-fill { height: 100%; background: linear-gradient(90deg, #ffb547, #ff8a2a); border-radius: 6px; box-shadow: 0 0 8px rgba(255, 138, 42, 0.35); transition: width .3s; }
.home-today-meta { font-size: 13px; color: var(--text); margin-bottom: 10px; }

/* 庆祝弹层（撒花 + 暖心话，无实框） */
.celebrate-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(10, 35, 50, 0.6);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.celebrate-center { position: relative; z-index: 2; text-align: center; padding: 24px; max-width: 340px; animation: fadeInUp .35s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.celebrate-emoji { font-size: 78px; line-height: 1.1; margin-bottom: 16px; animation: bounce 1.1s ease infinite; filter: drop-shadow(0 4px 18px rgba(0, 168, 204, 0.5)); }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.celebrate-title { font-size: 24px; font-weight: 800; color: #fff; margin-bottom: 10px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45); }
.celebrate-sub { font-size: 15px; line-height: 1.9; color: rgba(255, 255, 255, 0.95); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); }
.celebrate-close { margin-top: 30px; font-size: 12px; letter-spacing: 1px; color: rgba(255, 255, 255, 0.75); }
.celebrate-confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.cf { position: absolute; top: -20px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }

/* 今日打卡完成按钮 */
.checkin-finish { margin-top: 14px; }
.checkin-finish .btn {
  padding: 14px; font-size: 16px; border-radius: 12px;
  background: linear-gradient(135deg, #00A8CC, #34D399);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 168, 204, 0.35);
}
.checkin-finish-hint { font-size: 11px; color: var(--muted); text-align: center; margin-top: 8px; }

/* ================= v2：底部 Tab 栏 ================= */
/* 定位用 left/right + margin auto 而非 transform，避免微信 WebView
   对 fixed+transform/backdrop-filter 的渲染 bug 导致 tabbar 跑到页面中间 */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  margin: 0 auto; max-width: 720px;
  display: flex;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 22px rgba(23, 50, 74, 0.10);
  z-index: 150;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 7px 0 6px;
  background: none; border: none;
  color: #9BB2C3; cursor: pointer;
  font-size: 10px; font-weight: 600;
  transition: all 0.15s;
}
.tabbar-icon {
  font-size: 21px; line-height: 1.2;
  opacity: 0.72; filter: grayscale(0.55);
  transition: all 0.18s;
}
.tabbar-item.active { color: #0E7FA3; }
.tabbar-item.active .tabbar-icon {
  opacity: 1; filter: none;
  transform: scale(1.14) translateY(-1px);
  filter: drop-shadow(0 2px 8px rgba(0, 168, 204, 0.5));
}
.tabbar-label { font-size: 10px; line-height: 1.2; }

/* 顶部轻提示 toast */
#toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-70px);
  background: rgba(23, 50, 74, 0.92); color: #fff; font-size: 13px;
  padding: 9px 18px; border-radius: 999px; z-index: 999;
  opacity: 0; transition: all 0.25s ease; pointer-events: none;
  white-space: nowrap; max-width: 90vw; text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= v2：顶部栏 ================= */
.topbar-blank { min-width: 40px; }
.topbar-inner { justify-content: space-between; }
.topbar-inner h1 { flex: 1; }

/* ================= v2：首页看板 ================= */
.hero-big {
  text-align: center;
  padding: 24px 16px 20px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #FFF3E6, #FFFFFF 55%);
  border: 1px solid rgba(255, 138, 61, 0.24);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  cursor: pointer;
  position: relative; overflow: hidden;
}
.hero-big::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 170, 60, 0.18), transparent 70%);
}
.hero-big-fire { font-size: 46px; line-height: 1; display: inline-block; animation: firePulse 1.6s ease infinite; }
.hero-big-num { font-size: 64px; font-weight: 900; color: #EE6E0C; line-height: 1.05; text-shadow: 0 4px 18px rgba(238, 110, 12, 0.35); }
.hero-big-unit { font-size: 14px; color: #0E7FA3; font-weight: 700; margin-top: 4px; }
.hero-big-sub { font-size: 12px; color: var(--muted); margin-top: 8px; }

.home-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.home-stat {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 10px; text-align: center;
  border-top: 3px solid var(--sc);
}
.home-stat-icon { font-size: 24px; line-height: 1.3; }
.home-stat-num { font-size: 30px; font-weight: 900; color: var(--sc); line-height: 1.2; }
.home-stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ================= v2：首次引导卡片 ================= */
.onboard-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 20px; text-align: center; margin-bottom: 14px;
}
.onboard-title {
  font-size: 24px; font-weight: 800;
  background: linear-gradient(120deg, #0E9BC4, #34D399, #F472B6);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.onboard-sub { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.onboard-steps { text-align: left; margin-bottom: 22px; }
.onboard-step {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; border-radius: 12px; margin-bottom: 10px;
  background: #F8FBFE; border: 1px solid var(--line);
}
.onboard-step-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.onboard-step-title { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.onboard-step-desc { display: block; font-size: 12px; color: var(--muted); }
.onboard-btn { padding: 15px; font-size: 17px; border-radius: 14px; }

/* ================= v2：模态弹窗 ================= */
.modal-panel {
  width: 92%; max-width: 560px; max-height: 88vh;
  background: #fff; border-radius: 18px;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 44px rgba(23, 50, 74, 0.28);
  animation: fadeInUp 0.25s ease;
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-close { background: none; border: none; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.modal-close:active { background: #F0F5FA; }
.modal-body { padding: 16px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }

/* ================= v2：等级弹窗 ================= */
.level-dialog { max-width: 500px; }
.level-scroll {
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.level-scroll::-webkit-scrollbar { display: none; }
.level-track { display: flex; gap: 12px; padding: 18px 16px 14px; }
.level-card {
  min-width: 74%; max-width: 74%; scroll-snap-align: center;
  text-align: center; padding: 20px 14px;
  background: #F8FBFE; border: 1px solid var(--line); border-radius: 16px;
  transition: all .2s;
}
.level-card.cur { background: #FFF3E6; border-color: #FF8A3D; box-shadow: 0 4px 18px rgba(255, 138, 61, 0.25); }
.level-card.locked { opacity: 0.55; }
.level-card-icon { font-size: 40px; line-height: 1.2; }
.level-card-days { font-size: 28px; font-weight: 900; color: #EE6E0C; margin-top: 6px; }
.level-card-days small { font-size: 13px; font-weight: 600; color: var(--muted); }
.level-card-name { font-size: 17px; font-weight: 800; color: var(--text); margin-top: 4px; }
.level-card-desc { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.7; }
.level-card-state { margin-top: 10px; font-size: 12px; font-weight: 700; color: #0E7FA3; }
.level-card.locked .level-card-state { color: var(--muted); }
.level-dots { display: flex; justify-content: center; gap: 6px; padding-bottom: 14px; }
.level-dot { width: 6px; height: 6px; border-radius: 50%; background: #D9E9F3; transition: all .2s; }
.level-dot.active { background: #EE6E0C; width: 16px; }
.level-tip { text-align: center; font-size: 11px; color: var(--muted); padding-bottom: 16px; }

/* ================= v2：历史打卡 ================= */
.history-panel { max-width: 480px; }
.history-dow {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 11px; color: var(--muted);
  padding: 10px 8px 4px;
}
.history-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 4px 8px 10px; }
.history-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; border-radius: 10px;
  color: var(--text); cursor: pointer;
}
.history-cell.other { color: #C7D4E0; }
.history-cell.today { box-shadow: inset 0 0 0 2px #F39A2F; }
.history-cell.done { background: linear-gradient(160deg, #ff9533, #ee6e0c); color: #fff; box-shadow: 0 2px 8px rgba(238, 110, 12, 0.35); }
.history-cell.part { background: #FFF3DC; color: #E07A2A; }
.history-detail {
  margin: 6px 8px 14px; padding: 12px 14px;
  background: #F8FBFE; border: 1px dashed var(--line-dash); border-radius: 12px;
  font-size: 13px; color: var(--text); min-height: 40px;
}

/* ================= v2：我的页 ================= */
.mine-row, .mine-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 4px;
  background: none; border: none; border-bottom: 1px solid var(--line);
  cursor: pointer; text-align: left;
}
.mine-item:active { background: rgba(0, 168, 204, 0.05); }
.mine-row-icon { font-size: 22px; width: 32px; text-align: center; flex-shrink: 0; }
.mine-row-body { flex: 1; min-width: 0; }
.mine-row-title { display: block; font-size: 15px; font-weight: 600; color: var(--text); }
.mine-row-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.mine-arrow { color: #B7C7D6; font-size: 20px; flex-shrink: 0; }
.mine-item.mine-danger .mine-row-title { color: var(--danger); }
.mine-time {
  border: 1px solid #CFE3F0; border-radius: 8px; padding: 6px 8px;
  font-size: 14px; background: #FBFDFF; color: var(--text);
}
.switch-wrap { display: flex; align-items: center; flex-shrink: 0; }
.mine-hint { font-size: 11px; color: var(--muted); padding: 0 4px 10px; }
.mine-footer { text-align: center; font-size: 11px; color: var(--muted); line-height: 1.8; padding: 16px 0 10px; }

/* ================= v2：购菜清单 ================= */
.shopping-result { margin-top: 14px; }
.shop-cat {
  margin-bottom: 10px;
  background: #F8FBFE; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.shop-cat-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.shop-cat-head small { font-weight: 400; color: var(--muted); font-size: 12px; }
.shop-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-tag {
  font-size: 13px; padding: 4px 12px; border-radius: 16px;
  background: #fff; border: 1px solid #DFEAF2; color: var(--text);
}
.shop-tag.v { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.10); }
.shop-tag.f { border-color: rgba(255, 138, 61, 0.4); background: rgba(255, 138, 61, 0.10); }
.shop-tag.p { border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.10); }
.shop-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 14px; }

/* ================= v2：健康页 ================= */
.health-history-empty, .report-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 12px; }
.health-rec-item { padding: 9px 4px; border-bottom: 1px dashed var(--line-dash); }
.health-rec-item:last-child { border-bottom: none; }
.health-rec-date { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.3px; }
.health-rec-grid { display: grid; grid-template-columns: 1fr auto; column-gap: 14px; row-gap: 4px; font-size: 13px; }
.health-rec-name { color: var(--muted); }
.health-rec-val { text-align: right; font-weight: 600; color: #333A40; }
.health-rec-val .health-rec-unit { font-weight: 400; color: #9AA8A0; }
.health-rec-val.health-rec-ok { color: #1E9E6C; }
.health-rec-val.health-rec-danger { color: #E5533D; }
.rec-entry-title { font-size: 14px; font-weight: 700; color: #2A2F35; margin-top: 8px; }
.health-rec-summary-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 4px; border-bottom: 1px dashed var(--line-dash); font-size: 13px;
}
.health-rec-summary-row:last-child { border-bottom: none; }
.health-rec-sum-date { color: var(--muted); font-weight: 600; }
.health-rec-sum-info { color: #333A40; }
.health-rec-sum-danger { color: #E5533D; font-weight: 700; }
.health-rec-sum-ok { color: #1E9E6C; font-weight: 700; }
.report-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 4px; border-bottom: 1px dashed var(--line-dash);
}
.report-item:last-child { border-bottom: none; }
.report-thumb {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
  background: #EFF4F9; display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.report-name { flex: 1; min-width: 0; font-size: 13px; color: var(--text); }
.report-meta { font-size: 11px; color: var(--muted); display: block; }
.report-del { color: var(--danger); font-size: 12px; background: none; border: none; cursor: pointer; padding: 4px 6px; }

/* ================= v2：成就海报 ================= */
.poster-panel { max-width: 460px; }
.poster-canvas-box { text-align: center; padding: 14px; }
.poster-canvas-box canvas {
  width: 100%; max-width: 360px; height: auto;
  border-radius: 14px; box-shadow: var(--shadow);
}
.poster-actions { padding: 0 16px 16px; }

/* ============================================================
   v2.1 样本风格覆盖层
   参照「案例参考」截图视觉：沉浸渐变背景 + 暖橙金主调
   + 大圆角玻璃卡片 + 毛玻璃胶囊 Tab
   （只覆盖视觉，不改布局/逻辑）
   ============================================================ */

/* ---- 沉浸式渐变背景（顶部蓝→紫→粉→暖橙→米白） ---- */
html { background: #FFF6E9; }
body {
  background:
    radial-gradient(1200px 700px at 50% -12%, rgba(120, 200, 255, 0.38), transparent 60%),
    radial-gradient(900px 600px at -8% 18%, rgba(180, 150, 255, 0.26), transparent 55%),
    radial-gradient(800px 550px at 108% 30%, rgba(255, 160, 200, 0.24), transparent 55%),
    linear-gradient(180deg, #BFE6FF 0%, #D9D3FF 16%, #F3C8E8 34%, #FFD9B8 55%, #FFF0DC 76%, #FFF6E9 100%);
  background-attachment: fixed;
}

/* ---- 顶部栏：半透明彩虹渐变 + 毛玻璃 ---- */
.topbar {
  background: linear-gradient(135deg, rgba(120, 200, 255, 0.94), rgba(168, 140, 255, 0.94), rgba(255, 150, 190, 0.94));
  box-shadow: 0 2px 18px rgba(140, 140, 240, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---- 卡片：半透明玻璃 + 大圆角 ---- */
.card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow: 0 8px 28px rgba(23, 50, 74, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---- 主按钮：暖橙金渐变 ---- */
.btn-primary {
  background: linear-gradient(135deg, #FFB347, #FF7A2F);
  box-shadow: 0 6px 18px rgba(255, 122, 47, 0.4);
}
.btn-ghost { background: #FFF1E3; color: #E8720F; }

/* ---- 表单：橙色强调 ---- */
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #FF8A3D;
  box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.14);
}
.chip.active {
  background: linear-gradient(135deg, #FFB347, #FF7A2F);
  box-shadow: 0 3px 12px rgba(255, 122, 47, 0.35);
}
.form-group-title {
  color: #E8720F;
  background: linear-gradient(90deg, rgba(255, 138, 61, 0.14), rgba(255, 201, 61, 0.08));
  border-color: rgba(255, 138, 61, 0.25);
}
.tab.active { color: #E8720F; box-shadow: 0 1px 8px rgba(255, 122, 47, 0.2); }
.bmi-pill { color: #E8720F; background: #FFF1E3; border: 1px solid rgba(255, 138, 61, 0.25); }

/* ---- 进度条：金橙 ---- */
.progress-fill {
  background: linear-gradient(90deg, #FFC93D, #FF8A2A);
  box-shadow: 0 0 12px rgba(255, 138, 42, 0.5);
}
.progress-label { color: #E8720F; }

/* ---- 首页大数字：沉浸渐变卡 + 白字橙光晕 ---- */
.hero-big {
  background: linear-gradient(160deg, #7FC9F5 0%, #A8A8F0 38%, #F7A8D8 72%, #FFD9A0 100%);
  border-radius: 26px;
  padding: 28px 16px 24px;
  box-shadow: 0 14px 36px rgba(120, 120, 230, 0.32);
  position: relative; overflow: hidden;
}
.hero-big-num {
  color: #fff;
  text-shadow: 0 6px 24px rgba(255, 255, 255, 0.55), 0 3px 10px rgba(238, 110, 12, 0.4);
}
.hero-big-unit { color: rgba(255, 255, 255, 0.96); }
.hero-big-sub { color: rgba(255, 255, 255, 0.92); }
.hero-big-fire { filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.85)); }
.hero-big::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

/* ---- 底部 Tab：白底 + 橙色胶囊选中态（去掉 backdrop-filter，避免 fixed 失效） ---- */
.tabbar {
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 -6px 24px rgba(23, 50, 74, 0.08);
}
.tabbar-item { margin: 6px 8px; border-radius: 16px; }
.tabbar-item.active {
  background: linear-gradient(180deg, #FFB347, #FF7A2F);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 122, 47, 0.4);
}
.tabbar-item.active .tabbar-icon { filter: none; transform: scale(1.15); }
.tabbar-item.active .tabbar-label { color: #fff; font-weight: 700; }

/* ---- 打卡项：已完成用暖橙金底 ---- */
.checkin-item.done {
  background: rgba(255, 183, 87, 0.18);
  border-color: rgba(255, 138, 61, 0.45);
  box-shadow: 0 3px 12px rgba(255, 138, 61, 0.2);
}
.checkin-item.done .checkin-item-detail { color: #E8720F; }
.checkin-group-title { color: #E8720F; }

/* ---- 周格子：半透明白 ---- */
.week-cell { background: rgba(255, 255, 255, 0.78); }

/* ---- 我的页 / 计划页 卡片玻璃化 ---- */
.mine-row, .mine-item {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(23, 50, 74, 0.06);
}
.plan-day {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(23, 50, 74, 0.06);
}

/* ---- 引导卡 / 弹窗：玻璃大圆角 ---- */
.onboard-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 14px 36px rgba(23, 50, 74, 0.12);
}
.modal-panel {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 60px rgba(23, 50, 74, 0.18);
}

/* ============================================================
   v2.3 首页 + Tab 栏 = 与「案例参考」样图完全一致
   （像素采样还原：hero 横向 teal→indigo 渐变 + 奶油底条、
    一行 4 个薄荷/薰衣草统计框、白底彩色图标 Tab、
    中间「打卡」常驻薄荷胶囊）
   ============================================================ */

/* ---- 页面背景：浅薄荷灰白（样图 #F1F6F5→#F7F8FA） ---- */
html { background: #F3F7F6; }
body {
  background:
    radial-gradient(1000px 560px at 6% -10%, rgba(140, 210, 186, 0.16), transparent 55%),
    radial-gradient(900px 520px at 104% 18%, rgba(105, 132, 238, 0.10), transparent 55%),
    linear-gradient(180deg, #F1F6F5 0%, #F4F7F7 32%, #F6F7F9 72%, #F7F8FA 100%);
  background-attachment: fixed;
}

/* ---- 顶部栏：纯白 + 深色标题 ---- */
.topbar {
  background: #FFFFFF;
  color: #2A2F35;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}
.topbar h1 { color: #2A2F35; }

/* ---- 首页 hero：横向 teal→indigo 渐变 + 底部奶油条 ---- */
.hero-big {
  background: linear-gradient(100deg, #8CD2BA 0%, #85BCBC 28%, #78ACD3 55%, #6984F0 100%);
  border: none;
  border-radius: 22px;
  padding: 26px 16px 0;
  min-height: 232px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(105, 132, 238, 0.16);
}
.hero-big::after { content: none; }
.hero-big-fire { font-size: 40px; line-height: 1.15; filter: drop-shadow(0 3px 10px rgba(255, 255, 255, 0.55)); }
.hero-big-num { color: #fff; font-size: 60px; text-shadow: 0 5px 20px rgba(105, 132, 238, 0.45); }
.hero-big-unit { color: rgba(255, 255, 255, 0.96); font-size: 13px; margin-top: 2px; }
/* 底部奶油条 = sub 文字承载（棕色小字，居中于奶油条） */
.hero-big-sub {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 12px 12px 13px;
  background: linear-gradient(180deg, #EAF4E8 0%, #F6F9EA 55%, #FEFCF0 100%);
  color: #7A5A2E;
  font-size: 12px;
  font-weight: 600;
  border-radius: 0 0 22px 22px;
  z-index: 2;
}

/* ---- 首页区块标题（坚持统计） ---- */
.home-sec-head { display: flex; align-items: center; gap: 7px; margin: 2px 2px 10px; }
.home-sec-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(180deg, #6FD097, #3AAE90);
  box-shadow: 0 0 0 4px rgba(63, 190, 143, 0.14);
}
.home-sec-title { font-size: 16px; font-weight: 700; color: #2A2F35; }
.home-sec-sub { font-size: 11px; color: #9AA5B1; }

/* ---- 统计框：一行 4 个，薄荷→薰衣草冷色渐变 ---- */
.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.home-stat {
  background: #D2E9E1;
  border-radius: 16px;
  border-top: none;
  padding: 16px 4px 13px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(80, 120, 110, 0.08);
}
.home-stat:nth-child(2) { background: #D5E4E1; }
.home-stat:nth-child(3) { background: #D0D5E6; }
.home-stat:nth-child(4) { background: #C2C9E2; }
.home-stat-num { font-size: 26px; color: #3A4048; font-weight: 800; line-height: 1.15; }
.home-stat-label { font-size: 11px; color: rgba(58, 64, 72, 0.62); margin-top: 3px; line-height: 1.3; }

/* ---- 今日卡：薄荷绿主题 ---- */
.home-today {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(23, 50, 74, 0.06);
}
.home-today-name { font-size: 16px; font-weight: 700; color: #2A2F35; }
.home-today-streak { font-size: 13px; font-weight: 700; color: #3AAE90; }
.home-today-bar { height: 10px; background: #E8F2EE; border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.home-today-fill {
  height: 100%;
  background: linear-gradient(90deg, #6FD097, #3AAE90);
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(63, 190, 143, 0.4);
  transition: width .3s;
}
.home-today-meta { font-size: 13px; color: #6B7480; }
.home-today .btn-primary {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  box-shadow: 0 6px 16px rgba(63, 190, 143, 0.35);
}

/* ---- 周格：teal 高亮 ---- */
.week-cell.full {
  background: linear-gradient(160deg, #5DC4A4, #38A58C);
  box-shadow: 0 2px 8px rgba(56, 165, 140, 0.4);
}
.week-cell.part { background: #E9F7EF; border-color: rgba(63, 190, 143, 0.3); }
.week-cell.today { outline: 2px solid #3AAE90; outline-offset: 1px; }
.week-cell.full .week-cell-dow { color: rgba(255, 255, 255, 0.95); }
.week-cell.full .week-cell-date { color: #fff; }
.week-cell.part .week-cell-date { color: #2E9E6B; }

/* ---- 首页「查看历史」按钮：薄荷绿（原橙金） ---- */
#view-home .btn-ghost {
  background: #E9F7EF;
  color: #2E9E6B;
  border: 1px solid rgba(63, 190, 143, 0.3);
}

/* ---- Tab 栏：白底 + 彩色图标 + 中间打卡薄荷胶囊 ---- */
.tabbar {
  background: #FFFFFF;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 -6px 24px rgba(23, 50, 74, 0.06);
}
.tabbar-item {
  margin: 0;
  border-radius: 0;
  padding: 9px 0 8px;
  color: #9AA5B1;
}
.tabbar-item.active {
  background: none;
  box-shadow: none;
  color: var(--tc);
}
.tabbar-icon {
  font-size: 0;
  opacity: 1;
  filter: none;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.18s;
}
.tabbar-icon svg { width: 23px; height: 23px; color: #909090; opacity: 1; transition: opacity 0.18s; }
.tabbar-item.active .tabbar-icon { transform: scale(1.06); }
.tabbar-item.active .tabbar-icon svg { color: var(--tc); opacity: 1; }
.tabbar-item.active .tabbar-label { color: var(--tc); font-weight: 700; }
.tabbar-label { color: #989898; }
/* 中间打卡 Tab：常驻浅薰衣草胶囊 + 青蓝渐变图标 */
.tabbar-item[data-tab="checkin"] .tabbar-icon {
  background: linear-gradient(100deg, #E3F5EA 0%, #FFFFFF 16%, #D8E5F6 42%, #B3CCEE 50%, #D8E5F6 58%, #FFFFFF 84%, #E3F5EA 100%);
  border: 1px solid rgba(104, 184, 168, 0.5);
  border-radius: 24px;
  padding: 6px 13px;
  margin-top: -16px;
  box-shadow: 0 4px 14px rgba(104, 152, 216, 0.28);
}
.tabbar-item[data-tab="checkin"] .tabbar-icon svg { width: 30px; height: 30px; opacity: 1; }
.tabbar-item[data-tab="checkin"].active .tabbar-icon {
  background: linear-gradient(100deg, #D9F1E4 0%, #FFFFFF 16%, #CCDDF4 42%, #A4C2EC 50%, #CCDDF4 58%, #FFFFFF 84%, #D9F1E4 100%);
  box-shadow: 0 5px 16px rgba(104, 152, 216, 0.35);
}

/* ============================================================
   v2.4 对齐参考图：首页 + Tab 栏
   参考：案例参考\d60aefff9090c769e248423b6747aff0.png（@3x 1290x2796）
   - 页面浅灰底 #F1F1F3
   - hero：白字三行（顶部标签 / 大数字+天 / 底部副标），去火 emoji 与奶油条
   - 统计：一张白卡 + 4 列 + 浅灰竖分隔线，顺序 = 图标 → 灰标签 → 深色数字
   - 今日卡：薄荷→浅蓝渐变卡，左文案 + 右侧蓝色「去打卡」胶囊
   - 历史：居中文字链接
   - tabbar：非激活灰图标 #8A8A8A + 灰标签 #999999，激活用各 tab 主题色（首页绿），
     中心「打卡」= 实心 teal→blue 渐变圆角方块 + 白勾 + 细描边，上凸无胶囊背景
   ============================================================ */

/* ---- 页面浅灰底（参考 #F1F1F3） ---- */
html { background: #F1F1F3; }
body {
  background: #F6F6F8;
  background-attachment: fixed;
}

/* ---- hero：白字三行，去奶油条 ---- */
.hero-big {
  padding: 26px 20px 22px;
  min-height: 232px;
  justify-content: center;
}
.hero-big-fire { display: none !important; }
.hero-big-top {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 4px;
}
.hero-big-mid {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  line-height: 1.1;
}
.hero-big-num { font-size: 56px; }
.hero-big-unit {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 0;
}
.hero-big-sub {
  position: static;
  left: auto; right: auto; bottom: auto;
  margin: 10px 0 0;
  padding: 0;
  background: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 500;
  border-radius: 0;
  z-index: auto;
}

/* ---- 区块标题：橙色点缀（参考橙色圆点） ---- */
.home-sec-dot {
  background: linear-gradient(180deg, #FFB35C, #F2913D);
  box-shadow: 0 0 0 4px rgba(242, 145, 61, 0.15);
}

/* ---- 统计区：一张白卡 + 4 列 + 浅灰竖分隔线 ---- */
.home-stats {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(23, 50, 74, 0.06);
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 16px 4px 15px;
  margin-bottom: 14px;
}
.home-stat {
  background: none;
  border-radius: 0;
  border-top: none;
  box-shadow: none;
  padding: 2px 4px;
  border-right: 1px solid #EAEAEE;
}
.home-stat:last-child { border-right: none; }
.home-stat:nth-child(2),
.home-stat:nth-child(3),
.home-stat:nth-child(4) { background: none; }
.home-stat-icon { font-size: 20px; line-height: 1.3; margin-bottom: 4px; }
.home-stat-label { color: #999999; font-size: 11px; margin-top: 2px; }
.home-stat-num { color: #333333; font-size: 22px; }

/* ---- 今日卡：薄荷→浅蓝渐变 + 左侧文案 + 右侧蓝色去打卡 ---- */
.card.home-today { padding: 0; }
.home-today {
  background: linear-gradient(100deg, #D9EFE9 0%, #DDE3F1 100%);
  border: none;
  overflow: hidden;
}
.home-today-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
}
.home-today-left { flex: 1; min-width: 0; }
.home-today-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-today-name { font-size: 16px; font-weight: 800; color: #2C5A4E; }
.home-today-streak {
  font-size: 12px;
  font-weight: 700;
  color: #2C8C72;
  background: rgba(255, 255, 255, 0.6);
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.home-today-meta { font-size: 12px; color: #6B8A80; margin: 6px 0 8px; }
.home-today-bar { height: 8px; background: rgba(255, 255, 255, 0.75); margin: 0; }
.home-today-go {
  flex: none;
  background: linear-gradient(135deg, #6BA8E8, #5F7FE0);
  color: #FFFFFF;
  border: none;
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(95, 127, 224, 0.35);
  display: flex;
  align-items: center;
  gap: 3px;
}
.home-today-go-arrow { font-size: 16px; line-height: 1; }

/* ---- 周格：白卡（高亮格沿用 teal） ---- */
#homeWeekGrid {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(23, 50, 74, 0.06);
}

/* ---- 历史按钮：居中文字链接 ---- */
.home-history {
  display: block;
  width: 100%;
  margin: 4px 0 16px;
  padding: 10px;
  background: none;
  border: none;
  color: #6B9B8A;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* ---- Tab 栏：白底 + 灰非激活 + 绿激活 + 中心实心渐变方块 ---- */
.tabbar { background: #FFFFFF; border-top: 1px solid rgba(0, 0, 0, 0.06); }
.tabbar-item { color: #999999; }
.tabbar-icon svg { width: 24px; height: 24px; color: #8A8A8A; }
.tabbar-label { color: #999999; font-size: 11px; }
.tabbar-item.active .tabbar-label { color: var(--tc); font-weight: 700; }
.tabbar-item.active .tabbar-icon svg { color: var(--tc); opacity: 1; }

/* 中心打卡：实心 teal→blue 渐变圆角方块 + 白勾 + 细描边，上凸，无胶囊背景 */
.tabbar-item[data-tab="checkin"] .tabbar-icon {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-top: -30px;
  box-shadow: none;
  filter: drop-shadow(0 8px 14px rgba(80, 120, 200, 0.32));
}
.tabbar-item[data-tab="checkin"] .tabbar-icon svg { width: 88px; height: 88px; }
.tabbar-item[data-tab="checkin"] .tabbar-icon svg rect { stroke-width: 0.8; stroke: rgba(60, 70, 85, 0.5); }
.tabbar-item[data-tab="checkin"].active .tabbar-icon { background: none; box-shadow: none; filter: none; }
.tabbar-item[data-tab="checkin"] .tabbar-label { display: none; }

/* ============================================================
   v2.4.1 手机壳宽度 + 布局修正
   - ≥431px 视口整体收敛到 430px 居中（对齐参考图 430 宽，避免
     Edge/桌面 492 宽的布局被左裁切）
   - 首页卡片横向 8px 内缩（参考图圆角贴边卡）
   - tabbar 加高、中心渐变方块加大上凸
   ============================================================ */
@media (min-width: 431px) {
  body { max-width: 430px; }
  .tabbar { max-width: 430px; }
  .topbar-inner { max-width: 430px; }
}
#view-home { padding-left: 8px; padding-right: 8px; }
.home-sec-head { margin-left: 6px; margin-right: 6px; }

/* tabbar 加高对齐参考图（图标+标签更疏朗） */
.tabbar-item { padding-top: 15px; padding-bottom: 13px; }
.tabbar-icon svg { width: 25px; height: 25px; }
.tabbar-label { font-size: 10px; }

/* 中心渐变方块加大、上凸更多 */
.tabbar-item[data-tab="checkin"] .tabbar-icon { margin-top: -34px; }
.tabbar-item[data-tab="checkin"] .tabbar-icon svg { width: 98px; height: 98px; }

/* ============================================================
   v2.5 逐像素对照参考图收尾
   - 首页卡片横向内缩 8px → 20px（参考图卡片距屏边 ~21px）
   - hero 渐变改为「顶部 teal→blue、底部转浅」的参考样式
   - 区块标题：暖奶油底横幅（参考 y360-393 暖色带 + 橙色圆点）
   - 今日卡重构：薄荷→淡蓝渐变 + 白圈✓图标 + 左标题/完成 右连续/去打卡
   - 历史链接改灰色（参考 #999）
   - 周格高亮改薄荷渐变（参考 mint 高亮，替代橙色）
   ============================================================ */

/* ---- 首页侧边距：8px → 20px（对齐参考图卡片 ~21px 内缩） ---- */
#view-home { padding-left: 20px; padding-right: 20px; padding-top: 4px; }
.home-sec-head { margin-left: 0; margin-right: 0; }

/* ---- hero：对角 teal→indigo，teal 保持到 ~42%（参考图采样拟合） ---- */
.hero-big {
  background: linear-gradient(135deg, #91D8B8 0%, #8AC0C0 42%, #6078F0 100%);
  border-radius: 24px;
}

/* ---- 顶部：状态条 + 白色标题，总高 ~98px（对齐参考图 hero 起于 y≈98） ---- */
.status-bar {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: transparent;
  color: #0a0a0a;
}
.sb-time { font-size: 15px; font-weight: 600; letter-spacing: 0.5px; }
.sb-right { display: flex; align-items: center; gap: 5px; }
.sb-wifi, .sb-batt { display: block; }
.topbar {
  background: #FFFFFF;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}
.topbar-inner { padding: 6px 20px 12px; }
.topbar-inner h1 { text-align: center; }

/* ---- 区块标题：暖奶油底横幅 ---- */
.home-sec-head {
  background: linear-gradient(90deg, #FDF9EE 0%, #FAF3E3 100%);
  border-radius: 16px;
  padding: 13px 16px;
  margin: 6px 0 12px;
}
.home-sec-title { font-size: 15px; }
.home-sec-sub { margin-left: auto; }

/* ---- 今日卡：薄荷→淡蓝渐变，白圈✓ + 左标题/完成 + 右连续/去打卡 ---- */
.home-today {
  background: linear-gradient(90deg, #CFE8DE 0%, #B9C7DD 100%);
}
.home-today-inner {
  padding: 14px 16px;
  gap: 10px;
}
.home-today-left { display: flex; align-items: center; gap: 12px; }
.home-today-ic { flex: none; display: flex; align-items: center; justify-content: center; }
.home-today-ic-svg { display: block; border-radius: 50%; filter: drop-shadow(0 2px 5px rgba(80, 130, 120, 0.25)); }
.home-today-text { min-width: 0; }
.home-today-title { font-size: 16px; font-weight: 800; color: #2C5A4E; }
.home-today-meta { font-size: 12px; color: #5F7F74; margin: 3px 0 0; }
.home-today-streak {
  font-size: 12px;
  font-weight: 700;
  color: #3E6B5E;
  background: none;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
}
.home-today-right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.home-today-go {
  background: rgba(255, 255, 255, 0.6);
  color: #3B6E9E;
  border: none;
  border-radius: 18px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.home-today-go-arrow { font-size: 14px; line-height: 1; }
/* 去进度条（参考图无进度条），保留类以防旧代码引用 */
.home-today-bar, .home-today-fill { display: none !important; }

/* ---- 历史链接：灰色（参考 #999） ---- */
.home-history { color: #999999; font-weight: 500; }

/* ---- 周格高亮改薄荷（参考 mint 高亮） ---- */
.week-cell { background: #F4F7F9; border-radius: 12px; }
.week-cell.full { background: linear-gradient(160deg, #7FD6B6 0%, #5FBE9E 100%); box-shadow: 0 2px 8px rgba(80, 175, 145, 0.3); }
.week-cell.part { background: #EEF9F4; border-color: rgba(80, 175, 145, 0.25); }
.week-cell.full .week-cell-dow { color: rgba(255, 255, 255, 0.95); }
.week-cell.full .week-cell-date { color: #fff; }
.week-cell.part .week-cell-date { color: #3E8E74; }
.week-cell.today { outline: 2px solid #7BA9E8; outline-offset: 1px; }
.week-cell.full.today { outline: none; }



/* ============================================================
   v2.6 hero 高度/字号/底部薄荷条 对齐参考图
   - hero 卡片高 ~263px（参考 y97-360）
   - 底部 28px 薄荷→奶油横条（参考 y335-358 渐变，压住渐变下缘）
   - 大数字加大到 66px（参考数字字高 ~71px）
   - 副标移到卡片底部（白字，压在薄荷条上方）
   ============================================================ */
.hero-big {
  background:
    linear-gradient(180deg, #D8F0E3 0%, #EAF8EC 55%, #FDFAEF 100%) 0 100% / 100% 28px no-repeat,
    linear-gradient(135deg, #91D8B8 0%, #8AC0C0 42%, #6078F0 100%) 0 0 / 100% 100% no-repeat;
  min-height: 263px;
  justify-content: flex-start;
  padding: 40px 20px 22px;
}
.hero-big-mid { margin-top: 8px; }
.hero-big-num { font-size: 66px; line-height: 1.05; }
.hero-big-sub {
  position: absolute;
  left: 0; right: 0; bottom: 36px;
  margin: 0; padding: 0;
  background: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 500;
  border-radius: 0;
  z-index: 2;
}

/* ============================================================
   v2.7 压缩首页 hero 以下垂直节奏（对齐参考图：暖条 ~26px、
   区块间距 ~13px）
   ============================================================ */
.hero-big { box-shadow: 0 8px 18px rgba(105, 132, 238, 0.12); }
.hero-big { margin-bottom: 4px; }  /* 参考 hero 下缘距暖条 ~4px */
.home-sec-head { margin: 0 0 12px; padding: 4px 16px; }
.home-sec-title { line-height: 1.2; }
.home-sec-dot { box-shadow: 0 0 0 3px rgba(242, 145, 61, 0.12); }
.home-stats { padding: 23px 4px 8px; margin-bottom: 13px; }
.home-stat-icon { margin-bottom: 8px; }
.home-stat-label { margin-top: 0; }
.home-stat-num { margin-top: 8px; }
.home-today-inner { padding: 17px 16px; }
#homeTodayCard { margin-bottom: 13px; }
#homeWeekGrid { padding: 10px 16px; margin-bottom: 13px; }
.week-grid-title { margin-bottom: 2px; }
.home-history { margin-top: 4px; padding: 4px 0; }

/* ============================================================
   v2.8 hero 文案垂直节奏对齐参考图（四行结构）
   - 标题上移到 y~114（参考 y114-128），字号 20px 加宽到 ~8 字
   - 大数字保持 y~182；新增"连续打卡 · X 天"标签 y~262
   - 副标语上移到 y~298（参考 slogan 行）
   - 渐变中段加深（参考中部饱和度更高）
   ============================================================ */
.hero-big {
  background:
    linear-gradient(180deg, #D8F0E3 0%, #EAF8EC 55%, #FDFAEF 100%) 0 100% / 100% 28px no-repeat,
    linear-gradient(135deg, #8FDCC0 0%, #7BBAB4 38%, #6078F0 100%) 0 0 / 100% 100% no-repeat;
  padding: 9px 20px 22px;
}
.hero-big-top { font-size: 20px; letter-spacing: 7px; }
.hero-big-mid { margin-top: 30px; }
.hero-big-label {
  margin: 14px 0 0;
  padding: 0;
  background: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 500;
  border-radius: 0;
  text-align: center;
}
.hero-big-sub { bottom: 47px; }

/* ============================================================
   v2.9 5 Tab 改版：建档第2位 / 累计天数 / 线性图标 / 等级标识 /
   冷色调统一 / 报告识别 / 购菜清单弹窗
   ============================================================ */

/* ---- 首页统计图标：简约线性 SVG ---- */
.home-stat-icon svg { width: 22px; height: 22px; }
.home-stat:nth-child(1) .home-stat-icon svg { color: #3AAE90; }
.home-stat:nth-child(2) .home-stat-icon svg { color: #3A8F9E; }
.home-stat:nth-child(3) .home-stat-icon svg { color: #5A74C8; }
.home-stat:nth-child(4) .home-stat-icon svg { color: #6A76C0; }

/* ---- 首页今日卡下方的当前等级标识 ---- */
.home-level {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 13px;
  cursor: pointer;
  background: linear-gradient(135deg, #EAF7EF, #E8F0FA);
  border: 1px solid rgba(63, 190, 143, 0.25);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(23, 50, 74, 0.05);
  padding: 14px 16px;
  transition: transform .15s;
}
.home-level:active { transform: scale(0.98); }
.home-level-icon { font-size: 30px; line-height: 1; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(63, 190, 143, 0.3)); }
.home-level-body { flex: 1; min-width: 0; }
.home-level-title { font-size: 15px; font-weight: 800; color: #2C5A4E; }
.home-level-desc { font-size: 12px; color: #5F7F74; margin-top: 2px; line-height: 1.5; }
.home-level-arrow { color: #B7C7D6; font-size: 20px; flex-shrink: 0; }

/* ---- 全局冷色调统一（v2.1 暖橙被首页薄荷绿体系替换） ---- */
.btn-primary {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(78, 140, 240, 0.35);
}
.btn-ghost { background: #E9F7EF; color: #2E9E6B; }
.btn-soft {
  background: #E9F7EF; color: #2E9E6B;
  border: 1px solid rgba(63, 190, 143, 0.3);
  box-shadow: none; font-weight: 600;
}
.btn-soft:active { filter: brightness(0.96); }
.chip.active {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  box-shadow: 0 3px 12px rgba(63, 190, 143, 0.3);
}
.tab.active { color: #2E9E6B; box-shadow: 0 1px 8px rgba(63, 190, 143, 0.2); }
.form-group-title {
  color: #2E9E6B;
  background: linear-gradient(90deg, rgba(63, 190, 143, 0.14), rgba(63, 190, 143, 0.06));
  border-color: rgba(63, 190, 143, 0.25);
}
.bmi-pill { color: #2E9E6B; background: #E9F7EF; border: 1px solid rgba(63, 190, 143, 0.25); }
.progress-fill {
  background: linear-gradient(90deg, #6FD097, #3AAE90);
  box-shadow: 0 0 12px rgba(63, 190, 143, 0.4);
}
.progress-label { color: #2E9E6B; }
.date-nav { background: #E9F7EF; color: #2E9E6B; }
.checkin-item.done {
  background: rgba(63, 190, 143, 0.14);
  border-color: rgba(63, 190, 143, 0.4);
  box-shadow: 0 3px 12px rgba(63, 190, 143, 0.18);
}
.checkin-item.done .checkin-item-detail { color: #2E9E6B; }
.checkin-progress { background: #EFF7F3; }

/* 打卡连胜条：暖橙 → 薄荷 */
.streak-bar {
  background: linear-gradient(135deg, #EAF7F2, #FFFFFF);
  border: 1px solid rgba(63, 190, 143, 0.22);
}
.streak-count { color: #2E9E6B; text-shadow: 0 2px 10px rgba(63, 190, 143, 0.3); }
.streak-fire { filter: none; }

/* ---- 打卡项小按钮：小尺寸 + 图案 + 「打卡」文字 ---- */
.ci-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #D9E5EC; background: #fff;
  color: #7B93A8; font-size: 12px; font-weight: 700;
  padding: 5px 11px; border-radius: 20px; cursor: pointer;
  transition: all .15s;
}
.ci-btn .ci-ico { width: 14px; height: 14px; flex-shrink: 0; }
.ci-btn .ci-ico circle { fill: none; stroke: currentColor; stroke-width: 1.8; }
.ci-btn.done {
  background: linear-gradient(135deg, #7FD6B6, #5FBE9E);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 8px rgba(80, 175, 145, 0.35);
}
.ci-btn.done .ci-ico circle { fill: #fff; stroke: #fff; }

/* ---- 健康页 / 建档页大标题（显化）+ 保存键弱化 ---- */
.card-title.sec-title {
  font-size: 19px; font-weight: 800; letter-spacing: 0.5px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(63, 190, 143, 0.18);
  margin-bottom: 14px;
}

/* ---- 建档页：档案摘要卡 ---- */
.profile-summary { display: flex; gap: 14px; align-items: flex-start; }
.prof-avatar {
  width: 56px; height: 56px; border-radius: 18px; flex-shrink: 0;
  background: linear-gradient(135deg, #7FD6B6, #5F8FE0);
  color: #fff; font-size: 24px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(80, 150, 200, 0.3);
}
.prof-info { flex: 1; min-width: 0; }
.prof-name { font-size: 17px; font-weight: 800; color: #2A2F35; }
.prof-level {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 4px; font-size: 12px; font-weight: 700;
  color: #2E9E6B; background: #E9F7EF;
  border: 1px solid rgba(63, 190, 143, 0.25);
  border-radius: 12px; padding: 2px 9px; cursor: pointer;
}
.prof-meta { font-size: 12px; color: #6B7480; margin-top: 4px; line-height: 1.7; }
.prof-chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.prof-chip {
  font-size: 11px; padding: 3px 9px; border-radius: 14px;
  background: #F1F7F4; border: 1px solid #DFEAE5; color: #3E6B5E;
}

/* ---- 报告识别状态 ---- */
.report-recog { margin-top: 10px; }
.report-recog-ok {
  font-size: 13px; color: #2E9E6B; background: #E9F7EF;
  border: 1px solid rgba(63, 190, 143, 0.3);
  border-radius: 10px; padding: 10px 12px; line-height: 1.7;
}

/* ---- 计划页：冷色调 + 时间线弱化 ---- */
#view-plan .plan-day-text { color: #8A96A3; font-size: 13px; }
#view-plan .plan-day-name { color: #5A6470; }
#view-plan .plan-day-name small { color: #9AA5B1; }
#view-plan .daily-quick-title { color: #2E9E6B; }
#view-plan .plan-summary { color: #2C5A4E; border-color: rgba(63, 190, 143, 0.18); }
#view-plan .meal-tag { background: rgba(63, 190, 143, 0.12); color: #2E9E6B; }
#view-plan .plan-actions { margin-top: 2px; }
/* 时间线（plan-day）与购菜按钮拉开距离 */
#view-plan .plan-days { margin-bottom: 4px; }
#view-plan .btn-block { margin-top: 12px; }

/* ---- 购菜清单弹窗 ---- */
#shoppingModal .modal-body { padding: 16px; }

/* ============================================================
   v3.0 整体蓝色调（替换薄荷绿主色）+ Task C 细节
   - 全局主色偏蓝：按钮/进度/选中态/打卡完成/连胜/周格/等级
   - 首页：等级弹窗改紧凑卡 + 左右箭头；饮食/运动图标已换（index.html）
   - 建档页：设置卡（起始日期+提醒）+ 编辑按钮更明显
   - 打卡页：ci-btn 强化明显 + 连胜条顶部等级标识
   - 健康页：大标题色块展示
   - 计划页：推荐量参考弹窗
   ============================================================ */

/* ---- 页面背景：偏蓝 ---- */
body {
  background:
    radial-gradient(1000px 560px at 6% -10%, rgba(122, 168, 240, 0.16), transparent 55%),
    radial-gradient(900px 520px at 104% 18%, rgba(90, 124, 232, 0.10), transparent 55%),
    linear-gradient(180deg, #EEF3FB 0%, #F1F4FA 32%, #F4F5F9 72%, #F6F7F9 100%);
  background-attachment: fixed;
}

/* ---- 全局主色：薄荷绿 → 蓝 ---- */
.btn-primary {
  background: linear-gradient(135deg, #5FA8F0, #3A7FE0);
  box-shadow: 0 6px 18px rgba(58, 127, 224, 0.35);
}
.btn-ghost { background: #E8F1FB; color: #2E6FA3; }
.btn-soft {
  background: #E8F1FB; color: #2E6FA3;
  border: 1px solid rgba(58, 143, 224, 0.30);
}
.chip.active {
  background: linear-gradient(135deg, #5FA8F0, #3A7FE0);
  box-shadow: 0 3px 12px rgba(58, 127, 224, 0.30);
}
.tab.active { color: #2E6FA3; box-shadow: 0 1px 8px rgba(58, 127, 224, 0.20); }
.form-group-title {
  color: #2E6FA3;
  background: linear-gradient(90deg, rgba(58, 143, 224, 0.14), rgba(58, 143, 224, 0.06));
  border-color: rgba(58, 143, 224, 0.25);
}
.bmi-pill { color: #2E6FA3; background: #E8F1FB; border: 1px solid rgba(58, 143, 224, 0.25); }
.progress-fill {
  background: linear-gradient(90deg, #5FA8F0, #3A7FE0);
  box-shadow: 0 0 12px rgba(58, 127, 224, 0.40);
}
.progress-label { color: #2E6FA3; }
.date-nav { background: #E8F1FB; color: #2E6FA3; }
.checkin-progress { background: #EFF4FB; }
.needs-item.verdict-ok { background: rgba(95, 168, 240, 0.12); border-color: rgba(58, 143, 224, 0.30); }
.needs-item.verdict-ok .needs-item-head { color: #2E6FA3; }
.needs-item-adopted { color: #2E6FA3; }
.choice.active[data-choice="accept"] {
  background: linear-gradient(135deg, #5FA8F0, #3A7FE0);
  box-shadow: 0 2px 10px rgba(58, 127, 224, 0.40);
}
.checkin-finish .btn {
  background: linear-gradient(135deg, #5FA8F0, #3A7FE0);
  box-shadow: 0 4px 16px rgba(58, 127, 224, 0.35);
}
.week-summary-text { background: rgba(95, 168, 240, 0.10); border-color: rgba(58, 143, 224, 0.18); }
.week-overall { color: #2E6FA3; }

/* ---- 首页：hero / 区块点 / 统计图标偏蓝 ---- */
.hero-big {
  background:
    linear-gradient(180deg, #D9EAF8 0%, #EAF4FC 55%, #FDFAF3 100%) 0 100% / 100% 28px no-repeat,
    linear-gradient(135deg, #7FB8F0 0%, #6FA0E8 42%, #4A6FE8 100%) 0 0 / 100% 100% no-repeat;
  box-shadow: 0 10px 24px rgba(74, 111, 232, 0.16);
}
.hero-big-num { text-shadow: 0 5px 20px rgba(74, 111, 232, 0.40); }
.home-sec-dot {
  background: linear-gradient(180deg, #7FB8F0, #4A7FE0);
  box-shadow: 0 0 0 4px rgba(74, 127, 224, 0.14);
}
.home-sec-head { background: linear-gradient(90deg, #F1F6FC 0%, #E9F0FB 100%); }
.home-stat:nth-child(1) .home-stat-icon svg { color: #3A8FE0; }
.home-stat:nth-child(2) .home-stat-icon svg { color: #4A7FE0; }
.home-stat:nth-child(3) .home-stat-icon svg { color: #5A74C8; }
.home-stat:nth-child(4) .home-stat-icon svg { color: #6A76C0; }
.home-today {
  background: linear-gradient(90deg, #D4E7F8 0%, #C5D2EF 100%);
}
.home-today-title { color: #2C4A6E; }
.home-today-meta { color: #5F7F9E; }
.home-today-streak { color: #3B6E9E; }
.home-today-ic-svg path { stroke: #4A7FE0; }
.home-today-go {
  background: rgba(255, 255, 255, 0.70);
  color: #3B6E9E;
}
.home-history { color: #6B93B8; }
.week-cell.full {
  background: linear-gradient(160deg, #6FA8F0, #4A7FE0);
  box-shadow: 0 2px 8px rgba(74, 127, 224, 0.35);
}
.week-cell.part { background: #EAF2FC; border-color: rgba(58, 143, 224, 0.25); }
.week-cell.part .week-cell-date { color: #3A6FA8; }
.week-cell.today { outline: 2px solid #5FA8F0; outline-offset: 1px; }
.week-cell.full.today { outline: none; }
#view-home .btn-ghost { background: #E8F1FB; color: #2E6FA3; border: 1px solid rgba(58, 143, 224, 0.30); }

/* ---- 首页当前等级标识：偏蓝 ---- */
.home-level {
  background: linear-gradient(135deg, #E8F1FB, #E4EAFB);
  border: 1px solid rgba(58, 143, 224, 0.25);
}
.home-level-icon { filter: drop-shadow(0 2px 6px rgba(58, 143, 224, 0.30)); }
.home-level-title { color: #2C4A6E; }
.home-level-desc { color: #5F7F9E; }

/* ---- 打卡页：ci-btn 强化（更明显的大按钮） ---- */
.ci-btn {
  gap: 5px;
  border: 1.5px solid #C8DDF2;
  background: #F3F8FD;
  color: #4A7FB0;
  font-size: 12px;
  padding: 6px 13px;
  border-radius: 22px;
  box-shadow: none;
}
.ci-btn:active { transform: scale(0.96); }
.ci-btn .ci-ico { width: 15px; height: 15px; }
.ci-btn .ci-check { opacity: 0; fill: none; stroke: #3A7FE0; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: opacity .15s; }
.ci-btn.done {
  background: linear-gradient(135deg, #5FA8F0, #3A7FE0);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px rgba(58, 127, 224, 0.35);
}
.ci-btn.done .ci-check { opacity: 1; stroke: #3A7FE0; }
.ci-btn.done .ci-ico circle { fill: #fff; stroke: #fff; }
.checkin-item.done {
  background: rgba(95, 168, 240, 0.14);
  border-color: rgba(58, 143, 224, 0.40);
  box-shadow: 0 3px 12px rgba(58, 143, 224, 0.18);
}
.checkin-item.done .checkin-item-detail { color: #2E6FA3; }

/* ---- 打卡页连胜条：偏蓝 + 顶部等级标识 ---- */
.streak-bar {
  background: linear-gradient(135deg, #EAF1FB, #FFFFFF);
  border: 1px solid rgba(58, 143, 224, 0.22);
}
.streak-count { color: #2E6FA3; text-shadow: 0 2px 10px rgba(58, 143, 224, 0.30); }
.streak-level {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 12px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #E8F1FB, #E2EAFB);
  border: 1px solid rgba(58, 143, 224, 0.25);
  transition: transform .15s;
}
.streak-level:active { transform: scale(0.95); }
.streak-level-icon { font-size: 21px; line-height: 1.2; }
.streak-level-name { font-size: 12px; font-weight: 800; color: #2E6FA3; }
.streak-level-next { font-size: 9px; color: #7B93A8; line-height: 1.2; }

/* ---- 健康页 / 建档页大标题：色块展示（类似保存键） ---- */
.card-title.sec-title {
  background: linear-gradient(135deg, #6FA8F0, #4A7FE0);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 17px;
  letter-spacing: 0.5px;
}

/* ---- 建档页：编辑按钮更明显 + 摘要数据卡 ---- */
.btn-mine-edit {
  padding: 15px; font-size: 16px; border-radius: 14px;
  background: linear-gradient(135deg, #5FA8F0, #3A7FE0);
  color: #fff;
  box-shadow: 0 6px 18px rgba(58, 127, 224, 0.35);
}
.btn-mine-edit:active { filter: brightness(1.08); }
.prof-facts { display: flex; gap: 10px; margin-top: 14px; }
.prof-fact {
  flex: 1;
  background: #F0F6FC; border: 1px solid #DCEAF6; border-radius: 12px;
  padding: 10px 12px; text-align: center;
}
.prof-fact-label { display: block; font-size: 11px; color: var(--muted); }
.prof-fact b { display: block; font-size: 13px; color: #2E6FA3; margin-top: 2px; }
.prof-avatar {
  background: linear-gradient(135deg, #5FA8F0, #4A6FE8);
  box-shadow: 0 4px 12px rgba(74, 111, 232, 0.30);
}
.prof-chip { background: #EEF3FB; border-color: #DCE7F5; color: #3A6FA8; }

/* ---- 建档页：设置卡（起始日期 + 提醒） ---- */
.mine-set-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 8px 0;
}
.mine-set-label { font-size: 14px; font-weight: 600; color: var(--text); flex-shrink: 0; }
.mine-set-input { display: flex; align-items: center; gap: 8px; }
.mine-set-input input[type="date"],
.mine-set-input input[type="time"] {
  border: 1px solid #CFE3F0; border-radius: 10px;
  padding: 8px 10px; font-size: 14px;
  background: #FBFDFF; color: var(--text);
}

/* ---- 等级弹窗：紧凑卡 + 左右箭头 ---- */
.level-nav-row { display: flex; align-items: center; gap: 6px; padding: 10px 10px 0; }
.level-nav {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid #D9E5EC; background: #fff; color: #2E6FA3;
  font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(23, 50, 74, 0.08);
}
.level-nav:active { transform: scale(0.94); }
.level-scroll { flex: 1; min-width: 0; overflow-x: auto; }
.level-track { gap: 10px; padding: 14px 6px 10px; }
.level-card {
  min-width: 44%; max-width: 44%;
  padding: 12px 8px;
}
.level-card.cur {
  background: #EAF1FC; border-color: #5FA8F0;
  box-shadow: 0 4px 14px rgba(58, 143, 224, 0.22);
}
.level-card-icon { font-size: 26px; line-height: 1.2; }
.level-card-name { font-size: 14px; margin-top: 2px; }
.level-card-days { font-size: 20px; margin-top: 2px; }
.level-card-days small { font-size: 11px; }
.level-card-desc {
  font-size: 10px; margin-top: 4px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.level-card-state { font-size: 11px; margin-top: 6px; }
.level-dot.active { background: #4A7FE0; }

/* ---- 推荐量参考弹窗 ---- */
.rec-panel { max-width: 520px; }
.rec-group { margin-bottom: 14px; }
.rec-head {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #E8F1FB, #E7ECFA);
  border: 1px solid rgba(58, 143, 224, 0.18);
  border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
}
.rec-icon { font-size: 22px; }
.rec-title { font-size: 15px; font-weight: 800; color: #2E6FA3; flex-shrink: 0; }
.rec-note { font-size: 11px; color: var(--muted); margin-left: auto; text-align: right; }
.rec-list { border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; }
.rec-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px dashed var(--line-dash); font-size: 13px;
}
.rec-row:last-child { border-bottom: none; }
.rec-name { flex-shrink: 0; font-weight: 600; color: var(--text); }
.rec-val { color: #4A6176; text-align: right; }

/* ============================================================
   v3.1 首页还原薄荷绿 + 其他页蓝色加灰 + 细节优化
   - 首页色调恢复 v2.8 原样（薄荷 teal→indigo + 暖条 + 薄荷图标）
   - 其他页蓝色统一加灰（灰度蓝，跟首页更接近）
   - 打卡项设置：字体与主页一致 / 对号换好看 / 小项收进大类弹窗
   - 底部打卡 Tab 改正常尺寸（去大对号，图标+文字）
   - 建档页编辑按钮弱化；健康监测选中色与保存键一致
   - 计划页：运动/睡眠/冥想/服药推荐量内联展示
   ============================================================ */

/* ---- 2. 其他页改用首页薄荷青调色（与首页统一，替换灰度蓝） ---- */
/* 页面背景：薄荷青 → 淡蓝（同首页调色轴向，覆盖 v3.0 的偏灰蓝） */
body {
  background:
    radial-gradient(1000px 560px at 6% -10%, rgba(140, 210, 186, 0.16), transparent 55%),
    radial-gradient(900px 520px at 104% 18%, rgba(105, 132, 238, 0.10), transparent 55%),
    linear-gradient(180deg, #F1F6F5 0%, #F4F7F7 32%, #F6F7F9 72%, #F7F8FA 100%);
  background-attachment: fixed;
}
.btn-primary {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(78, 140, 240, 0.35);
}
.btn-ghost { background: #E9F7EF; color: #2E9E6B; }
.btn-soft {
  background: #E9F7EF; color: #2E9E6B;
  border: 1px solid rgba(63, 190, 143, 0.30);
}
.chip.active {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 12px rgba(63, 190, 143, 0.30);
}
.tab { background: rgba(255, 255, 255, 0.55); color: #5B7288; }
.tab.active { background: linear-gradient(135deg, #56C49B, #4E8CF0); color: #fff; box-shadow: 0 2px 10px rgba(78, 140, 240, 0.30); }
.form-group-title {
  color: #2E9E6B;
  background: linear-gradient(90deg, rgba(63, 190, 143, 0.14), rgba(63, 190, 143, 0.06));
  border-color: rgba(63, 190, 143, 0.25);
}
.bmi-pill { color: #2E9E6B; background: #E9F7EF; border: 1px solid rgba(63, 190, 143, 0.25); }
.progress-fill {
  background: linear-gradient(90deg, #56C49B, #4E8CF0);
  box-shadow: 0 0 12px rgba(78, 140, 240, 0.40);
}
.progress-label { color: #2E9E6B; }
.date-nav { background: #E9F7EF; color: #2E9E6B; }
.checkin-progress { background: #EFF7F3; }
.needs-item.verdict-ok { background: rgba(63, 190, 143, 0.12); border-color: rgba(63, 190, 143, 0.30); }
.needs-item.verdict-ok .needs-item-head { color: #2E9E6B; }
.needs-item-adopted { color: #2E9E6B; }
.choice.active[data-choice="accept"] {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  box-shadow: 0 2px 10px rgba(78, 140, 240, 0.40);
}
.checkin-finish .btn {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(78, 140, 240, 0.35);
}
.week-summary-text { background: rgba(63, 190, 143, 0.10); border-color: rgba(63, 190, 143, 0.18); }
.week-overall { color: #2E9E6B; }
.streak-bar {
  background: linear-gradient(135deg, #EAF7F2, #FFFFFF);
  border: 1px solid rgba(63, 190, 143, 0.22);
}
.streak-count { color: #2E9E6B; text-shadow: 0 2px 10px rgba(63, 190, 143, 0.30); }
.streak-level {
  background: linear-gradient(135deg, #EAF7EF, #E7F3EC);
  border: 1px solid rgba(63, 190, 143, 0.25);
}
.streak-level-name { color: #2E9E6B; }
.ci-btn { border-color: #C8DFD4; background: #F4FAF7; color: #3A7B63; }
.ci-btn.done {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  box-shadow: 0 3px 10px rgba(78, 140, 240, 0.35);
}
.ci-btn.done .ci-check { stroke: #3AAE90; }
.checkin-item.done {
  background: rgba(63, 190, 143, 0.14);
  border-color: rgba(63, 190, 143, 0.40);
  box-shadow: 0 3px 12px rgba(63, 190, 143, 0.18);
}
.checkin-item.done .checkin-item-detail { color: #2E9E6B; }
.card-title.sec-title {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  box-shadow: 0 3px 10px rgba(78, 140, 240, 0.20);
}
.prof-avatar { background: linear-gradient(135deg, #56C49B, #4E8CF0); box-shadow: 0 4px 12px rgba(78, 140, 240, 0.28); }
.prof-chip { background: #EFF7F3; border-color: #D8E8E0; color: #2E9E6B; }
.prof-fact b { color: #2E9E6B; }
/* 打卡页/其他页周格（首页周格用 #homeWeekGrid 还原成同款薄荷） */
.week-cell.full { background: linear-gradient(160deg, #56C49B 0%, #4E8CF0 100%); box-shadow: 0 2px 8px rgba(78, 140, 240, 0.30); }
.week-cell.part { background: #EEF9F4; border-color: rgba(80, 175, 145, 0.25); }
.week-cell.part .week-cell-date { color: #3E8E74; }
.week-cell.today { outline: 2px solid #7BA9E8; outline-offset: 1px; }

/* ---- 1. 首页色调还原（覆盖 v3.0 蓝色，恢复 v2.8 原样） ---- */
.hero-big {
  background:
    linear-gradient(180deg, #D8F0E3 0%, #EAF8EC 55%, #FDFAEF 100%) 0 100% / 100% 28px no-repeat,
    linear-gradient(135deg, #8FDCC0 0%, #7BBAB4 38%, #6078F0 100%) 0 0 / 100% 100% no-repeat;
  box-shadow: 0 8px 18px rgba(105, 132, 238, 0.12);
}
.hero-big-num { text-shadow: 0 5px 20px rgba(105, 132, 238, 0.45); }
.home-sec-dot {
  background: linear-gradient(180deg, #FFB35C, #F2913D);
  box-shadow: 0 0 0 4px rgba(242, 145, 61, 0.15);
}
.home-sec-head { background: linear-gradient(90deg, #FDF9EE 0%, #FAF3E3 100%); }
.home-stat:nth-child(1) .home-stat-icon svg { color: #3AAE90; }
.home-stat:nth-child(2) .home-stat-icon svg { color: #3A8F9E; }
.home-stat:nth-child(3) .home-stat-icon svg { color: #5A74C8; }
.home-stat:nth-child(4) .home-stat-icon svg { color: #6A76C0; }
.home-today { background: linear-gradient(90deg, #CFE8DE 0%, #B9C7DD 100%); }
.home-today-title { color: #2C5A4E; }
.home-today-meta { color: #5F7F74; }
.home-today-streak { color: #3E6B5E; }
.home-today-ic-svg path { stroke: #3AAE90; }
.home-today-go { background: rgba(255, 255, 255, 0.6); color: #3B6E9E; }
.home-history { color: #999999; }
#homeWeekGrid .week-cell.full { background: linear-gradient(160deg, #7FD6B6 0%, #5FBE9E 100%); box-shadow: 0 2px 8px rgba(80, 175, 145, 0.3); }
#homeWeekGrid .week-cell.part { background: #EEF9F4; border-color: rgba(80, 175, 145, 0.25); }
#homeWeekGrid .week-cell.part .week-cell-date { color: #3E8E74; }
#homeWeekGrid .week-cell.today { outline: 2px solid #7BA9E8; outline-offset: 1px; }
#homeWeekGrid .week-cell.full.today { outline: none; }
#view-home .btn-ghost { background: #E9F7EF; color: #2E9E6B; border: 1px solid rgba(63, 190, 143, 0.3); }
.home-level {
  background: linear-gradient(135deg, #EAF7EF, #E8F0FA);
  border: 1px solid rgba(63, 190, 143, 0.25);
}
.home-level-icon { filter: drop-shadow(0 2px 6px rgba(63, 190, 143, 0.3)); }
.home-level-title { color: #2C5A4E; }
.home-level-desc { color: #5F7F74; }

/* ---- 3. 打卡项设置：字体与主页一致 + 好看的对号 ---- */
.menu-panel .menu-title { font-size: 14px; }
.menu-panel .settings-title { font-size: 13px; }
.menu-panel .settings-hint { font-size: 11px; }
.menu-panel .switch-row, #subModal .switch-row { font-size: 13px; padding: 8px 0; font-weight: 600; }
.menu-panel .custom-add input { font-size: 13px; padding: 8px 10px; }
.menu-panel .custom-item { font-size: 13px; }
.menu-panel .custom-del { font-size: 12px; }
.sub-manage {
  background: #E9F7EF; color: #2E9E6B;
  border: none; border-radius: 10px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  padding: 2px 7px; margin-left: 6px;
}
.sub-manage:active { opacity: 0.7; }
/* 对号：原生 checkbox → 自定义圆角勾选框 */
.switch {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; border-radius: 7px;
  border: 2px solid #C6D3DF; background: #fff; cursor: pointer;
  position: relative; flex-shrink: 0;
  transition: border-color .15s, background .15s;
}
.switch:checked {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  border-color: transparent;
}
.switch:checked::after {
  content: '';
  position: absolute; left: 6px; top: 3px;
  width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
#subModal .modal-body { padding: 6px 16px 12px; }

/* ---- 4. 底部打卡键：蓝色正圆大按钮（参照样板：圆钮+白色符号，从底部突出） ---- */
.tabbar-item[data-tab="checkin"] .tabbar-icon {
  width: 54px; height: 54px;
  background: linear-gradient(135deg, #4E9FF0, #3A7FE0);
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  padding: 0;
  margin-top: -22px;
  box-shadow: 0 6px 16px rgba(58, 127, 224, 0.45), 0 2px 6px rgba(58, 127, 224, 0.30);
  filter: none;
}
.tabbar-item[data-tab="checkin"].active .tabbar-icon {
  background: linear-gradient(135deg, #3E8FE8, #2F6FD8);
  box-shadow: 0 7px 18px rgba(58, 127, 224, 0.55);
}
.tabbar-item[data-tab="checkin"] .tabbar-icon svg { width: 30px; height: 30px; color: #fff; }
.tabbar-item[data-tab="checkin"] .tabbar-icon svg rect { stroke-width: 2; stroke: currentColor; }
.tabbar-item[data-tab="checkin"].active .tabbar-icon svg { color: #fff; }
.tabbar-item[data-tab="checkin"].active .tabbar-label { color: #3A7FE0; font-weight: 700; }
.tabbar-item[data-tab="checkin"] .tabbar-label { display: inline-block; }

/* ---- 5. 建档页：编辑按钮弱化、与其他主项分开 ---- */
.mine-edit-zone { text-align: center; margin: 4px 0 12px; }
.btn-mine-edit {
  display: inline-flex; align-items: center; gap: 4px;
  background: #E9F7EF; color: #2E9E6B;
  border: 1px solid rgba(63, 190, 143, 0.30); border-radius: 20px;
  font-size: 12px; font-weight: 600;
  padding: 6px 16px; cursor: pointer;
  box-shadow: none; transition: all .15s;
}
.btn-mine-edit:active { background: #DDF3E9; }

/* ---- 6. 健康页：监测指标选中色 = 保存基础指标（btn-soft）色调 ---- */
#healthChips .chip.active {
  background: #E9F7EF;
  color: #2E9E6B;
  border: 1px solid rgba(63, 190, 143, 0.30);
  box-shadow: none;
}

/* ---- 7. 计划页：推荐量只显标题，点开弹窗看内容 ---- */
.rec-inline {
  display: flex; align-items: center; justify-content: space-between;
  background: #F1FAF6; border: 1px solid rgba(63, 190, 143, 0.25); border-radius: 12px;
  padding: 9px 12px; margin-bottom: 12px; cursor: pointer;
  transition: opacity .15s;
}
.rec-inline:active { opacity: 0.8; }
.rec-inline-title { font-size: 13px; font-weight: 800; color: #2E9E6B; }
.rec-inline-arrow { font-size: 12px; font-weight: 600; color: #8FB5A4; }

/* 推荐量弹窗：顶部 5 分类 tab + 一次只显示对应分类（绿→蓝调） */
.rec-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rec-tab {
  padding: 5px 12px; border-radius: 14px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: #2E9E6B;
  background: #E9F7EF; border: 1px solid rgba(63, 190, 143, 0.25);
  transition: all .15s;
}
.rec-tab.active {
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(78, 140, 240, 0.30);
}
.rec-head { background: linear-gradient(135deg, #E9F7EF, #E3F5EC); border-color: rgba(63, 190, 143, 0.25); }
.rec-title { color: #2E9E6B; }
.rec-group.rec-focus .rec-head { background: linear-gradient(135deg, #56C49B, #4E8CF0); border-color: transparent; }
.rec-group.rec-focus .rec-title { color: #fff; }
.rec-group.rec-focus .rec-note { color: rgba(255, 255, 255, 0.85); }

/* ============================================================
   v3.3 建档页等级标识：去框放大，直接展示等级 emoji 本身
   头像区不再用渐变方块框，等级行去掉绿色胶囊底色，纯标识
   ============================================================ */
.prof-avatar {
  width: auto; height: auto;
  background: none; box-shadow: none;
  color: inherit;
  font-size: 40px; font-weight: 800;
}
.prof-level {
  background: none; border: none;
  padding: 0; border-radius: 0;
  font-size: 14px; color: #2E9E6B;
}

/* ============================================================
   v3.4 08.14 四项修改
   1) 健康页：个体情况 textarea、AI 评估结果卡、频率标签、与上次对比色块、收录完成动效
   2) 打卡页：今日请假按钮 + 横幅 + 周格请假标记
   ============================================================ */

/* ---- 个体情况补充 textarea（字体样式与其他输入框一致） ---- */
#view-health textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid #CFE3F0; border-radius: 10px;
  background: #FBFDFF; color: var(--text);
  padding: 10px 12px; font-size: 15px; line-height: 1.6;
  font-family: inherit;   /* 和其他输入框同字体 */
  resize: vertical; min-height: 64px;
  margin-bottom: 10px;
}
#view-health textarea:focus {
  outline: none; border-color: #56C49B;
  box-shadow: 0 0 0 3px rgba(86, 196, 155, 0.15);
}
#btnSaveNotes { margin-top: 0; }

/* ---- AI 评估结果卡 ---- */
.assess-card {
  margin-top: 12px; border-radius: 14px;
  background: #F3F9F6; border: 1px solid rgba(63, 190, 143, 0.25);
  padding: 12px 14px;
}
.assess-head {
  font-weight: 800; color: #2E9E6B; font-size: 14px;
}
.assess-count {
  font-weight: 500; color: #8AA39A; font-size: 11px; margin-left: 6px;
}
.assess-summary {
  margin-top: 6px; font-size: 13px; color: #3E5A50; line-height: 1.7;
}
.assess-metrics { margin-top: 10px; }
.assess-metric {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 8px 0; border-top: 1px dashed rgba(63, 190, 143, 0.2);
}
.assess-metric-check {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: #2A2F35;
}
.assess-metric-check input {
  width: 16px; height: 16px; accent-color: #2E9E6B;
}
.assess-freq {
  border: 1px solid #C8DED4; border-radius: 8px;
  background: #fff; color: #2E9E6B; font-size: 12px; font-weight: 600;
  padding: 3px 6px; max-width: 130px;
}
.assess-reason {
  width: 100%; font-size: 12px; color: #6B7D75; line-height: 1.5;
}
.assess-compare {
  margin-top: 10px; border-radius: 10px;
  background: #E9F2FD; border: 1px solid rgba(80, 140, 230, 0.22);
  padding: 10px 12px; font-size: 13px; color: #33506E; line-height: 1.7;
}
.assess-compare-title {
  font-weight: 800; color: #3A6FA8; margin-bottom: 4px;
}
.assess-apply { margin-top: 12px; }

/* ---- 收录完成动效 ---- */
.assess-done {
  margin-top: 12px; text-align: center; padding: 18px 10px;
  animation: assessPop .4s ease;
}
.assess-done-check {
  width: 48px; height: 48px; margin: 0 auto 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  color: #fff; font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  animation: assessPop .5s ease;
}
.assess-done-title { font-size: 15px; font-weight: 800; color: #2E9E6B; }
.assess-done-sub { font-size: 12px; color: #6B7480; margin-top: 4px; }
@keyframes assessPop {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- 录入区：频率标签 + 与上次对比 ---- */
.freq-tag {
  display: inline-block; margin-left: 4px;
  background: #E9F7EF; color: #2E9E6B;
  border-radius: 8px; padding: 1px 6px; font-size: 11px; font-weight: 600;
}
.chg { margin-left: 6px; font-size: 11px; font-weight: 700; }
.chg-up { color: #E0564F; }
.chg-down { color: #2E9E6B; }
.chg-flat { color: #8A9AA0; }

/* ---- 打卡页：今日请假 ---- */
.checkin-leave { margin-top: 10px; }
.btn-leave {
  background: #FFF4E3; color: #D97B1F;
  border: 1px solid rgba(217, 123, 31, 0.35);
}
.btn-leave.active {
  background: linear-gradient(135deg, #F7A94A, #E8802A);
  color: #fff; border-color: transparent;
  box-shadow: 0 5px 14px rgba(232, 128, 42, 0.35);
}
/* 周格子请假标记 */
.week-cell.leave {
  background: #FFF3E0;
  border: 1px solid rgba(217, 123, 31, 0.35);
}
.week-cell.leave .week-cell-date { color: #C97A20; }
.week-cell-count.leave-count {
  color: #C97A20; font-weight: 800;
}

/* ============ v3.5 ============ */

/* ---- 建档页：编辑档案资料键撑满屏幕放大 ---- */
.mine-edit-zone { text-align: center; margin: 4px 0 14px; }
.btn-mine-edit {
  display: flex; width: 100%;
  align-items: center; justify-content: center; gap: 6px;
  background: #E9F7EF; color: #2E9E6B;
  border: 1px solid rgba(63, 190, 143, 0.30); border-radius: 11px;
  font-size: 15px; font-weight: 700;
  padding: 12px 18px; cursor: pointer;
  box-shadow: none;
  transition: background .15s, transform .12s ease;
}
.btn-mine-edit:active { background: #DDF3E9; }

/* ---- 建档页：清除数据危险行 ---- */
.mine-item.mine-danger {
  margin-top: 10px;
  background: #FFF5F4;
  border: 1px solid rgba(224, 86, 79, 0.25);
  border-radius: 12px;
}
.mine-item.mine-danger .mine-row-title { color: #E0564F; }
.mine-item.mine-danger .mine-row-sub { color: #B57972; }
.mine-item.mine-danger .mine-arrow { color: #E0564F; }

/* ---- 健康页录入区：每项带周期下拉 + 删除键 ---- */
.rec-item {
  background: #F8FBF9; border: 1px solid #E4EEE8;
  border-radius: 12px; padding: 8px 10px; margin-bottom: 8px;
}
.rec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rec-name { font-size: 14px; font-weight: 700; color: #2A2F35; }
.rec-name small { color: #9AA8A0; font-weight: 400; font-size: 11px; }
.rec-ops { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.rec-freq {
  border: 1px solid #C8DED4; border-radius: 8px;
  background: #fff; color: #2E9E6B; font-size: 12px; font-weight: 600;
  padding: 4px 6px; max-width: 118px;
}
.rec-del {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(224, 86, 79, 0.3); background: #FFF5F4;
  color: #E0564F; font-size: 13px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.rec-del:active { background: #FDE3E0; }
.rec-item input[type="text"] {
  width: 100%; margin-top: 6px;
  border: 1px solid #D6E3DA; border-radius: 10px;
  padding: 9px 10px; font-size: 15px;
}

/* ---- AI 评估输出文字样式优化 ---- */
.assess-card {
  background: #fff;
  border: 1px solid #E3ECE7;
  box-shadow: 0 6px 18px rgba(46, 158, 107, 0.08);
  padding: 14px 16px;
}
.assess-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; color: #2E9E6B; font-size: 15px;
}
.assess-count {
  background: #E9F7EF; border-radius: 6px;
  padding: 1px 6px; font-weight: 600; color: #2E9E6B;
  margin-left: 0;
}
.assess-summary {
  margin-top: 8px; font-size: 14px; color: #33413B;
  line-height: 1.8;
}
.assess-metric-check span { font-size: 14px; font-weight: 700; }
.assess-reason {
  width: 100%; font-size: 12.5px; color: #5A6B63;
  line-height: 1.6; padding-left: 22px;
}
.assess-compare {
  background: #F2F7FD; border: 1px solid rgba(80, 140, 230, 0.18);
}
.assess-compare-title {
  display: inline-flex; align-items: center; gap: 4px;
  background: #3A6FA8; color: #fff;
  border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 700;
  margin-bottom: 8px;
}

/* ============ v3.6 · 首次初始页（配置健康打卡） ============ */
#view-welcome { padding: 0 18px 30px; }
.welcome-hero { text-align: center; padding: 40px 0 24px; }
.welcome-logo {
  width: 64px; height: 64px; margin: 0 auto 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #56C49B, #4E8CF0);
  color: #fff; font-size: 34px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(78, 140, 240, 0.35);
}
.welcome-title { font-size: 24px; font-weight: 800; color: #23292F; margin-bottom: 8px; }
.welcome-sub { font-size: 14px; color: #8A9AA5; line-height: 1.6; }

.welcome-items { display: flex; flex-direction: column; gap: 10px; }
.welcome-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #E7EEF3; border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(31, 68, 110, 0.05);
}
.welcome-ic {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.welcome-body { flex: 1; min-width: 0; }
.welcome-name { display: block; font-size: 15px; font-weight: 700; color: #2A2F35; }
.welcome-desc { display: block; font-size: 12px; color: #9AA8B0; margin-top: 1px; }
.welcome-val { font-size: 12px; color: #2E9E6B; font-weight: 600; flex-shrink: 0; }

.welcome-steps {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 20px 0 16px;
}
.welcome-step {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: #6B7D85; font-weight: 600;
}
.welcome-step b {
  width: 18px; height: 18px; border-radius: 50%;
  background: #E9F7EF; color: #2E9E6B;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}
.welcome-step-line { width: 22px; height: 2px; background: #E3EBEF; border-radius: 2px; }

.welcome-start { margin-top: 4px; font-size: 16px; font-weight: 700; padding: 14px 18px; border-radius: 13px; }
.welcome-skip {
  width: 100%; margin-top: 12px;
  background: none; border: none;
  font-size: 13px; color: #9AA8B0;
  text-align: center; cursor: pointer;
  padding: 6px;
}
.welcome-skip:active { color: #6B7D85; }

/* v3.7 空状态引导 */
.checkin-empty { padding: 44px 26px; text-align: center; }
.checkin-empty-ic { font-size: 42px; margin-bottom: 12px; }
.checkin-empty-title { font-size: 17px; font-weight: 700; color: #2A2F35; margin-bottom: 8px; }
.checkin-empty-desc { font-size: 13px; color: #8A9AA3; line-height: 1.7; margin-bottom: 20px; }
.checkin-empty .btn-primary { max-width: 220px; margin: 0 auto; }

.mine-empty {
  padding: 26px 16px; text-align: center;
  font-size: 13px; color: #8A9AA3; line-height: 1.7;
  background: #F7F9FB; border-radius: 12px; border: 1px dashed #D5DFE6;
}

/* v3.8 计划详情字体清晰化（参照 AI 建议深色显示） */
#view-plan .plan-day-text { color: #2E3B47; font-size: 14px; line-height: 1.75; }
#view-plan .plan-day-name { color: #1F2733; }
#view-plan .plan-day-name small { color: #7C8A96; }
#view-plan .plan-day-sub { color: #4A5B68; font-size: 13px; }

/* v3.9 计划各天彩色卡片（参照 AI 建议显示） */
#view-plan .plan-day {
  background: #F5FAF7;
  border: 1px solid rgba(63, 190, 143, 0.25);
  border-bottom: 1px solid rgba(63, 190, 143, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
#view-plan .plan-day.diet { background: #F2FAF5; border-color: rgba(63, 190, 143, 0.28); }
#view-plan .plan-day.exercise { background: #F2F7FD; border-color: rgba(78, 140, 240, 0.28); }
#view-plan .plan-day.sleep { background: #F5F2FB; border-color: rgba(140, 110, 220, 0.28); }
#view-plan .plan-day.meditation { background: #F0FBFB; border-color: rgba(0, 168, 204, 0.28); }
#view-plan .plan-day.meds { background: #FDF5F3; border-color: rgba(230, 110, 90, 0.28); }

/* ============ v3.7 ============ */

/* ---- 打卡页：请假弹窗（可自由勾选当天已完成的打卡项） ---- */
.leave-empty { color: var(--muted); text-align: center; padding: 18px 0; font-size: 13px; }
.leave-group { margin-bottom: 12px; }
.leave-group-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.leave-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; margin-bottom: 6px;
  background: #FBFDFF; border: 1px solid #E3EEF5; border-radius: 10px;
  cursor: pointer; transition: all .15s;
}
.leave-item:active { transform: scale(0.98); }
.leave-item.done { background: rgba(52, 211, 153, 0.12); border-color: rgba(63, 190, 143, 0.4); }
.leave-item input[type=checkbox] { width: 18px; height: 18px; accent-color: #2E9E6B; flex-shrink: 0; }
.leave-item-ic { font-size: 18px; line-height: 1; flex-shrink: 0; }
.leave-item-name { flex: 1; font-size: 15px; font-weight: 600; color: var(--text); }
.leave-item-state { font-size: 12px; color: #2E9E6B; font-weight: 700; flex-shrink: 0; }

/* ---- 健康页：管理监测指标里体检报告已检出的标记 ---- */
.chip.has-data { position: relative; }
.chip-badge {
  position: absolute; top: -7px; right: -5px;
  font-style: normal; font-size: 11px; line-height: 1;
  background: #fff; border-radius: 8px; padding: 1px 3px;
  box-shadow: 0 0 0 1px rgba(0,168,204,.25);
}

/* ---- 健康页：历史记录单条删除按钮 ---- */
.health-rec-date {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted); font-weight: 600;
}
.health-rec-del {
  background: none; border: none; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 2px 4px;
  color: #C9D3DC; transition: color .15s;
}
.health-rec-del:hover { color: #E0564F; }

/* ============ v3.8 ============ */

/* ---- 打卡弹窗：一键全选工具条（饮食/服药等小项多的大类） ---- */
.sub-checkin-tools {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.sub-checkin-tools .btn {
  flex: 1; font-size: 13px; padding: 8px 12px;
}

/* ---- 打卡项：纯请假（全部请假）那天显示「已请假」样式 ---- */
.checkin-item .ci-btn.leave {
  color: #C97A20;
  border-color: rgba(201, 122, 32, 0.45);
  background: rgba(255, 245, 230, 0.7);
}

/* ============ v3.9 · 云端同步（登录 / 跨设备 / 冷启动） ============ */

/* ---- 冷启动提示条：云托管首次加载时接口较慢 ---- */
.cold-boot {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
  text-align: center; font-size: 13px; font-weight: 600; color: #8A6A2F;
  background: #FFF7E0; padding: 7px 12px;
  transform: translateY(-100%); transition: transform .35s ease;
}
.cold-boot.show { transform: translateY(0); }

/* 防呆：用 file:// 直接打开时，前端连不上后端，红字提示正确打开方式 */
.file-warn {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
  text-align: center; font-size: 13px; line-height: 1.5; font-weight: 600;
  color: #fff; background: #E2574C; padding: 9px 12px;
}
.file-warn b { text-decoration: underline; }

/* ---- 云端同步卡（我的页） ---- */
.sync-row {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0;
}
.sync-info { flex: 1; min-width: 0; }
.sync-title { font-size: 14.5px; font-weight: 700; color: #23292F; }
.sync-sub { font-size: 12px; color: #8A9AA5; margin-top: 2px; }
.sync-btns { display: flex; gap: 8px; flex-shrink: 0; }
.sync-btns .btn { font-size: 12.5px; padding: 7px 12px; }
.sync-status-ok { color: #2E9E6B; }
.sync-status-warn { color: #E8720F; }

/* 同步中骨架提示 */
.sync-loading {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #8A9AA5;
}
.sync-loading .spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #D7E3EE; border-top-color: #2E9E6B;
  animation: syncSpin .8s linear infinite;
}
@keyframes syncSpin { to { transform: rotate(360deg); } }

/* ---- 登录 / 注册 / 找回弹窗 ---- */
.auth-panel .field { margin-bottom: 14px; }
.auth-code-row { display: flex; gap: 8px; }
.auth-code-row input { flex: 1; min-width: 0; }
.auth-code-row .btn { flex-shrink: 0; white-space: nowrap; font-size: 13px; padding: 10px 14px; }
.auth-q-show {
  flex: 1; min-width: 0; padding: 11px 12px; border-radius: 12px;
  background: #EFF5FB; color: #234; font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 1px dashed #B8D4EE; line-height: 1.4;
}
.auth-panel select {
  width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid #D8E4EE;
  background: #fff; color: #234; font-size: 14px; appearance: auto; -webkit-appearance: auto;
}
.auth-tip {
  font-size: 12px; color: #9AA8B0; margin: -4px 0 14px;
  display: flex; align-items: center; gap: 4px;
}
.auth-tip::before { content: '🔒'; }
.auth-switch { margin-top: 10px; font-size: 13px; color: #2E6FA3; }
#btnAuthSendCode.disabled { opacity: .5; pointer-events: none; }
