/* ==========================================================
   你今天偷吃了么 · 深色科技主题
   沉稳高级 · 墨蓝黑底 + 青绿强调 · 玻璃质感 · 克制的科技感
   ========================================================== */

:root {
  --bg-0: #0a1322;
  --bg-1: #0e1b2e;
  --bg-2: #12233a;
  --card: rgba(255, 255, 255, .035);
  --card-strong: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e9f0f8;
  --text-2: #aebfd2;
  --text-3: #6f8499;
  --green: #2dd4a8;
  --green-dark: #17b78c;
  --green-light: rgba(45, 212, 168, .14);
  --blue: #5b8cff;
  --blue-light: rgba(91, 140, 255, .14);
  --orange: #f5a85b;
  --orange-light: rgba(245, 168, 91, .14);
  --purple: #a78bfa;
  --purple-light: rgba(167, 139, 250, .14);
  --red: #f26d6d;
  --red-light: rgba(242, 109, 109, .14);
  --radius: 16px;
  --shadow: 0 8px 28px rgba(0, 0, 0, .38);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, .5);
  --header-h: 58px;
  --tabbar-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(91, 140, 255, .10), transparent 62%),
    radial-gradient(900px 480px at -10% 28%, rgba(45, 212, 168, .08), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(167, 139, 250, .06), transparent 55%),
    linear-gradient(168deg, var(--bg-0) 0%, var(--bg-1) 52%, var(--bg-2) 100%);
  background-attachment: fixed;
}

/* ---------- 顶部栏 ---------- */
.app-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: var(--safe-t);
  background: linear-gradient(120deg, rgba(10, 19, 34, .92), rgba(14, 30, 52, .92) 60%, rgba(16, 36, 62, .92));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); padding: 0 18px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-logo {
  font-size: 17px; width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(45, 212, 168, .22), rgba(91, 140, 255, .18));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 2px 10px rgba(45, 212, 168, .18);
}
.brand-name {
  font-size: 18px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(90deg, #7df5d0, #9db8ff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.header-date {
  font-size: 12.5px; color: var(--text-2);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  padding: 5px 12px; border-radius: 20px;
}

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(10, 19, 34, .88);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-3); position: relative;
  transition: color .18s;
}
.tab-icon { font-size: 21px; line-height: 1; transition: transform .18s; }
.tab-label { font-size: 11px; font-weight: 600; }
.tab.active { color: var(--green); }
.tab.active .tab-icon { transform: translateY(-2px) scale(1.08); }
.tab.active::before {
  content: ""; position: absolute; top: -1px; width: 30px; height: 2px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--green), var(--blue));
  box-shadow: 0 0 10px rgba(45, 212, 168, .7);
}

/* ---------- 页面容器 ---------- */
.page-container { max-width: 520px; margin: 0 auto; padding: 16px 14px 8px; }
.view { display: none; animation: fadeUp .24s ease; }
.view.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
}
.card-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text);
}
.card-title .sub { font-size: 12px; font-weight: 400; color: var(--text-3); }
.card-title .em {
  font-size: 14px; margin-right: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--green-light);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 168, .18);
}

/* ---------- 今日概览条 ---------- */
.today-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ts-item {
  background: linear-gradient(150deg, rgba(45, 212, 168, .16), rgba(91, 140, 255, .12));
  border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 8px; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.ts-item b { font-size: 19px; font-weight: 800; line-height: 1.2; color: #c9f6e8; font-variant-numeric: tabular-nums; }
.ts-item .ts-icon { font-size: 15px; }
.ts-item .ts-label { font-size: 11px; color: var(--text-2); }

/* ---------- 看板统计块 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-box {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 6px 11px; text-align: center; box-shadow: var(--shadow);
}
.stat-box .sb-icon {
  width: 32px; height: 32px; margin: 0 auto 7px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.stat-box .sb-value { font-size: 18px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-box .sb-value small { font-size: 11px; font-weight: 600; color: var(--text-3); }
.stat-box .sb-label { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.ic-green { background: var(--green-light); } .ic-blue { background: var(--blue-light); }
.ic-orange { background: var(--orange-light); } .ic-purple { background: var(--purple-light); }
.ic-red { background: var(--red-light); }
.v-green { color: #7df5d0; } .v-blue { color: #9db8ff; }
.v-orange { color: #ffc48a; } .v-purple { color: #c4b0ff; } .v-red { color: var(--red); }

/* ---------- 目标进度 ---------- */
.goal-bar {
  height: 14px; border-radius: 8px; overflow: hidden; margin: 10px 0 8px;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4);
}
.goal-bar > i {
  display: block; height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, var(--green), #4fd6c0, var(--blue));
  box-shadow: 0 0 12px rgba(45, 212, 168, .45);
  transition: width .6s ease; position: relative;
}
.goal-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.goal-meta b { color: #7df5d0; }

/* ---------- 今日打卡 ---------- */
.checkin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.checkin-btn {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  border-radius: 14px; padding: 13px 8px; cursor: pointer; text-align: center;
  transition: all .2s; display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-2);
}
.checkin-btn .cb-icon { font-size: 28px; transition: transform .2s; }
.checkin-btn .cb-name { font-size: 13.5px; font-weight: 700; }
.checkin-btn .cb-state { font-size: 11px; color: var(--text-3); }
.checkin-btn.done {
  border-color: rgba(45, 212, 168, .45);
  background: linear-gradient(160deg, rgba(45, 212, 168, .16), rgba(45, 212, 168, .05));
  box-shadow: 0 0 16px rgba(45, 212, 168, .12);
}
.checkin-btn.done .cb-name { color: #7df5d0; }
.checkin-btn.done .cb-state { color: var(--green-dark); font-weight: 700; }
.checkin-btn.done .cb-icon { transform: scale(1.1); }
.encourage {
  margin-top: 12px; border-radius: 12px; padding: 11px 14px;
  background: linear-gradient(120deg, rgba(45, 212, 168, .12), rgba(91, 140, 255, .1));
  border: 1px solid var(--line);
  font-size: 13.5px; color: #bfe6d8; line-height: 1.6; display: flex; gap: 8px; align-items: flex-start;
}
.encourage b { color: #7df5d0; }

/* ---------- 表单 ---------- */
.form-row { margin-bottom: 12px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-input, .form-select {
  width: 100%; height: 46px; border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 0 13px; font-size: 16px; color: var(--text);
  background: rgba(255, 255, 255, .05);
  outline: none; transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.form-input:focus, .form-select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45, 212, 168, .15); }
.form-input::placeholder { color: var(--text-3); }
.form-select option { background: #12233a; color: var(--text); }
/* 日期输入框日历图标：白色 SVG 直接替换 UA 图标（不依赖 filter，兼容性最佳） */
input[type="date"]::-webkit-calendar-picker-indicator {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='4'%20width='18'%20height='18'%20rx='2'%20ry='2'/%3E%3Cline%20x1='16'%20y1='2'%20x2='16'%20y2='6'/%3E%3Cline%20x1='8'%20y1='2'%20x2='8'%20y2='6'/%3E%3Cline%20x1='3'%20y1='10'%20x2='21'%20y2='10'/%3E%3C/svg%3E");
  background-size: 18px 18px;
  background-position: center;
  background-repeat: no-repeat;
  cursor: pointer;
  filter: none; /* 关键：去掉 invert，避免白色被反成黑色 */
}
input[type="date"] { color-scheme: dark; }
/* ===== 点击打击感（按下缩小 + 光晕 + 松手回弹） ===== */
button, .chip, .tab, .btn, .suggest-item, .wk-item, .summary-item,
.toggle-row, .list-item, .plan-tip, .menu-row, .hint-chip, .mult {
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
button:active, .chip:active, .tab:active, .btn:active, .suggest-item:active,
.wk-item:active, .summary-item:active, .toggle-row:active, .list-item:active,
.plan-tip:active, .menu-row:active, .hint-chip:active, .mult:active {
  transform: scale(.90);
  box-shadow: 0 0 0 4px rgba(45, 212, 168, .18);
}
/* 松手回弹：弹过 1.03 再回正（JS 在松开时添加 .press-pop） */
.press-pop {
  animation: press-pop .18s ease;
}
@keyframes press-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* ===== 设置页开关（iOS 风格拨动开关） ===== */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; cursor: pointer; user-select: none;
}
.toggle-label { font-size: 14px; color: var(--text); }
.toggle-switch {
  width: 48px; height: 28px; border-radius: 14px;
  background: rgba(255, 255, 255, .12); border: 1px solid var(--line-strong);
  position: relative; transition: background .18s, border-color .18s;
  flex-shrink: 0;
}
.toggle-switch.on { background: var(--green); border-color: rgba(45, 212, 168, .6); }
.toggle-knob {
  position: absolute; top: 2px; left: 2px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; transition: left .18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.toggle-switch.on .toggle-knob { left: 22px; }

/* 食物多选：本次已选清单 */
.cart-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 6px; background: rgba(255, 255, 255, .03);
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease;
}
.cart-item:active { transform: scale(.98); }
.cart-item .ci-name { font-size: 13px; color: var(--text); flex-shrink: 0; }
.cart-item .ci-meta { font-size: 11px; color: var(--text-3); flex: 1; text-align: right; }
.cart-item .ci-del {
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .08); color: var(--text-2); font-size: 12px;
  cursor: pointer; flex-shrink: 0;
}

/* 表单栅格（恢复：勿删） */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 48px; padding: 0 20px; border: none; border-radius: 13px; cursor: pointer;
  font-size: 16px; font-weight: 700; font-family: inherit; width: 100%;
  transition: transform .1s, opacity .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(120deg, var(--green), #3aa7d8);
  color: #06281f;
  box-shadow: 0 4px 18px rgba(45, 212, 168, .3);
}
.btn-ghost { background: var(--green-light); color: #7df5d0; border: 1px solid rgba(45, 212, 168, .25); }
.btn-danger { background: var(--red-light); color: var(--red); border: 1px solid rgba(242, 109, 109, .25); }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 10px; width: auto; font-weight: 600; }
.btn-soft-blue { background: var(--blue-light); color: #9db8ff; }

/* ---------- 历史记录列表 ---------- */
.rec-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 2px; border-bottom: 1px solid var(--line);
}
.rec-row:last-child { border-bottom: none; }
.rec-date { width: 62px; flex-shrink: 0; }
.rec-date .rd-day { font-size: 17px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.rec-date .rd-month { font-size: 10.5px; color: var(--text-3); }
.rec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rec-metrics { display: flex; gap: 12px; }
.rec-note { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.rec-metric { text-align: center; }
.rec-metric .rm-value { font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.rec-metric .rm-label { font-size: 10px; color: var(--text-3); }
.rec-delta { font-size: 12px; font-weight: 700; min-width: 46px; text-align: right; }
.delta-down { color: var(--green); }
.delta-up { color: var(--red); }
.delta-keep { color: var(--text-3); }
.rec-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 34px; height: 34px; border: none; border-radius: 10px; cursor: pointer;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  transition: transform .1s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.edit { background: var(--blue-light); }
.icon-btn.del { background: var(--red-light); }

.filter-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.filter-bar .form-input { flex: 1; height: 40px; font-size: 14px; }

/* ---------- 弹窗（底部抽屉） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 10, 18, .7);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .18s ease;
  backdrop-filter: blur(4px);
}
.modal {
  background: #0f1c30;
  width: 100%; max-width: 520px;
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  padding: 18px 18px calc(20px + var(--safe-b));
  max-height: 88vh; overflow-y: auto;
  animation: slideUp .24s ease;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
}
@keyframes slideUp { from { transform: translateY(60px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-full {
  width: 100%; max-width: 100%; height: 100dvh; border-radius: 0;
  padding: 18px 18px calc(14px + var(--safe-b));
  display: flex; flex-direction: column;
}
.modal-full form { flex: 1; overflow-y: auto; padding-bottom: 10px; }
.food-dock {
  flex-shrink: 0; position: sticky; bottom: 0;
  background: #0f1c30;
  border-top: 1px solid var(--line);
  padding: 10px 2px 2px;
}
.food-dock-title { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { font-size: 17px; font-weight: 800; color: var(--text); }
.modal-close { border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--text-2); width: 32px; height: 32px; border-radius: 50%; font-size: 15px; cursor: pointer; }

/* ---------- Toast ---------- */
#toastRoot {
  position: fixed; top: calc(var(--header-h) + var(--safe-t) + 12px); left: 0; right: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  background: rgba(8, 16, 28, .94); color: #e8f4ff;
  padding: 11px 20px; border-radius: 24px; font-size: 14px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5); max-width: 88vw; text-align: center;
  animation: fadeUp .2s ease;
}

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 26px 12px; color: var(--text-3); font-size: 14px; }
.empty .e-icon { font-size: 42px; display: block; margin-bottom: 10px; }

/* ---------- 图表 ---------- */
.chart-wrap { position: relative; height: 230px; }
.chart-note {
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  font-size: 12px; color: var(--text-2); line-height: 1.8;
}
.chart-fallback {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 13px; text-align: center; padding: 0 16px;
  background: rgba(255, 255, 255, .03); border-radius: 12px; border: 1px dashed var(--line-strong);
}

/* ---------- 设置页 ---------- */
.menu-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 2px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.menu-row:last-child { border-bottom: none; }
.menu-row .mr-icon { font-size: 19px; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.menu-row .mr-text { flex: 1; font-size: 15px; font-weight: 600; color: var(--text); }
.menu-row .mr-value { font-size: 12.5px; color: var(--text-3); }
.menu-row .mr-arrow { color: var(--text-3); font-size: 14px; }
.summary-list { display: flex; flex-direction: column; gap: 10px; }
.summary-item {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 13px;
}
.summary-item .si-label { font-size: 13px; color: var(--text-2); }
.summary-item .si-value { font-size: 15px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.summary-item .si-value.hl { color: #7df5d0; }

/* ---------- 运动/饮食：建议与进度 ---------- */
.plan-tip {
  margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(120deg, rgba(45, 212, 168, .1), rgba(91, 140, 255, .08));
  border: 1px solid var(--line);
  font-size: 13px; color: #bfe6d8; line-height: 1.7;
}
.plan-tip span { color: #8fa6bd; font-size: 12px; }
.plan-tip b { color: #7df5d0; }

.item-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.item-row:last-child { border-bottom: none; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.item-value { font-size: 15px; font-weight: 700; color: #7df5d0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item-value small { font-size: 11px; color: var(--text-3); font-weight: 500; }

.kcal-status {
  margin-top: 9px; padding: 9px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
}
.kcal-status.ok { background: var(--green-light); color: #7df5d0; }
.kcal-status.warn { background: var(--orange-light); color: #ffc48a; }
.kcal-status.over { background: var(--red-light); color: var(--red); }

/* 蛋白质达标 */
.protein-box {
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.protein-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text);
}

/* 本周周报 */
.weekly-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wk-item {
  background: rgba(255, 255, 255, .035); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px;
  display: flex; flex-direction: column; gap: 3px;
}
.wk-item b { font-size: 18px; font-weight: 800; color: #7df5d0; font-variant-numeric: tabular-nums; }
.wk-item span { font-size: 11px; color: var(--text-3); }

/* 食物快捷选择与检索 */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .04);
  border-radius: 16px; padding: 5px 11px; font-size: 12px; color: var(--text-2); cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.chip:active, .chip.sel {
  background: var(--green-light); border-color: rgba(45, 212, 168, .4); color: #7df5d0; font-weight: 700;
}
.suggest {
  display: none; position: absolute; left: 0; right: 0; z-index: 10;
  background: #101d32; border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: var(--shadow-lg); max-height: 220px; overflow-y: auto; margin-top: 4px;
}
.form-row { position: relative; }
.suggest-item {
  padding: 10px 13px; font-size: 14px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:active { background: var(--green-light); }
.suggest-item .muted { font-size: 11px; }

/* 体脂率自动计算展示 */
.bf-auto {
  display: flex; align-items: center; gap: 8px;
  color: #7df5d0; font-weight: 700; font-size: 17px;
  background: var(--green-light);
  border: 1px solid rgba(45, 212, 168, .25);
}

/* 自动保存提示 */
.auto-save-tip {
  margin-top: 4px; text-align: center; font-size: 12px; color: var(--text-3);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px;
}

/* ---------- 其他 ---------- */
.muted { color: var(--text-3); font-size: 12px; line-height: 1.7; }
.center { text-align: center; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.badge-green { background: var(--green-light); color: #7df5d0; }
.badge-blue { background: var(--blue-light); color: #9db8ff; }
.badge-orange { background: var(--orange-light); color: #ffc48a; }
.badge-red { background: var(--red-light); color: var(--red); }
.welcome-card {
  background: linear-gradient(160deg, rgba(45, 212, 168, .12), rgba(91, 140, 255, .08));
  border-color: rgba(45, 212, 168, .25);
}
.welcome-card .muted { color: #a9c4d8; }
