/* ============================================================
   珊珊食愈 - Shanshan Food Healing
   暖色调主题 · 食欲视觉 · 严格无 emoji
   ============================================================ */

:root {
  /* === 暖色调主色系 === */
  --c-primary: #E8734A;
  --c-primary-light: #F08C69;
  --c-primary-dark: #D15A2E;
  --c-primary-bg: #FFF3ED;

  --c-accent: #F5A623;
  --c-accent-light: #FBC252;
  --c-accent-dark: #D4891A;

  --c-warm-red: #C0392B;
  --c-warm-red-light: #E74C3C;
  --c-soft-pink: #FADBD8;

  --c-cream: #FFF8F0;
  --c-cream-dark: #F5E6D3;
  --c-warm-white: #FFFBF7;
  --c-terracotta: #D4775A;

  /* === 中性色 === */
  --c-text: #3D2C2C;
  --c-text-secondary: #7B6B6B;
  --c-text-light: #A89494;
  --c-border: #E8D5C4;
  --c-border-light: #F2E4D8;
  --c-bg: #FFFAF5;
  --c-surface: #FFFFFF;
  --c-shadow: rgba(180, 120, 80, 0.12);

  /* === 功能色 === */
  --c-success: #7CB342;
  --c-success-bg: #F1F8E9;
  --c-info: #5C8FBF;
  --c-info-bg: #EEF4FA;
  --c-warning: #F0A040;
  --c-warning-bg: #FFF8EC;

  /* === 布局 === */
  --nav-height: 62px;
  --header-height: 52px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 15px;
  line-height: 1.55;
  overscroll-behavior-y: none;
}

body { padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px); }

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; }
a { color: var(--c-primary-dark); text-decoration: none; }

/* === 通用容器 === */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--c-bg); position: relative; }

.page { display: none; padding: 0 0 16px; animation: fadeIn .28s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* === 顶部标题栏 === */
.header {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-height);
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  background: linear-gradient(120deg, var(--c-primary) 0%, var(--c-accent) 100%);
  color: #fff;
  box-shadow: 0 2px 10px var(--c-shadow);
}
.header .title { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.header .sub { font-size: 11px; opacity: .9; font-weight: 400; margin-top: -2px; }
.header .spacer { flex: 1; }
.header .icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18); color: #fff;
}
.header .icon-btn:active { background: rgba(255,255,255,.34); }

/* === 内容内边距 === */
.content { padding: 14px 14px 0; }

/* === 卡片 === */
.card {
  background: var(--c-surface);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px var(--c-shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card-title .bar { width: 4px; height: 16px; background: var(--c-primary); border-radius: 3px; }

/* === 按钮 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600;
  background: var(--c-primary); color: #fff;
  box-shadow: 0 3px 10px rgba(232,115,74,.3);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(1px); box-shadow: 0 2px 6px rgba(232,115,74,.3); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--c-primary-bg); color: var(--c-primary-dark); box-shadow: none; }
.btn.accent { background: var(--c-accent); box-shadow: 0 3px 10px rgba(245,166,35,.3); }
.btn.accent:active { box-shadow: 0 2px 6px rgba(245,166,35,.3); }
.btn.light { background: var(--c-cream-dark); color: var(--c-text); box-shadow: none; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* === 标签 / 徽章 === */
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; line-height: 1.4;
  background: var(--c-primary-bg); color: var(--c-primary-dark);
}
.tag.meat { background: #FDEBE5; color: var(--c-warm-red); }
.tag.veg { background: var(--c-success-bg); color: #5a8a2c; }
.tag.hard { background: #FDEDEC; color: var(--c-warm-red); }
.tag.easy { background: var(--c-success-bg); color: #5a8a2c; }
.tag.mid { background: var(--c-warning-bg); color: var(--c-accent-dark); }
.tag.kcal { background: var(--c-cream-dark); color: var(--c-text-secondary); }
.tag.blue { background: var(--c-info-bg); color: var(--c-info); }

/* === 底部导航 === */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  max-width: 480px; margin: 0 auto;
  display: flex; background: var(--c-warm-white);
  box-shadow: 0 -3px 18px rgba(180,120,80,.14);
  border-top: 1px solid var(--c-border-light);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--c-text-light); font-size: 10.5px; font-weight: 600; position: relative;
}
.nav-item.active { color: var(--c-primary); }
.nav-item.active::before {
  content: ""; position: absolute; top: 6px; width: 30px; height: 30px;
  border-radius: 50%; background: var(--c-primary-bg);
}
.nav-item svg { width: 23px; height: 23px; position: relative; z-index: 1; }
.nav-item span { position: relative; z-index: 1; }

/* === 首页 hero === */
.hero {
  margin: 14px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent-dark) 100%);
  color: #fff; padding: 22px 20px; position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(232,115,74,.28);
}
.hero h1 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: 1px; }
.hero p { margin: 8px 0 0; font-size: 13px; opacity: .92; line-height: 1.5; }
.hero .date-badge {
  display: inline-block; margin-top: 14px; padding: 5px 14px;
  background: rgba(255,255,255,.2); border-radius: 20px; font-size: 12.5px; font-weight: 600;
}
.hero .deco {
  position: absolute; right: -26px; top: -26px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255,255,255,.1);
}
.hero .deco2 {
  position: absolute; right: 30px; bottom: -40px; width: 90px; height: 90px;
  border-radius: 50%; background: rgba(255,255,255,.08);
}

/* === 快捷入口网格 === */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid.quick { grid-template-columns: repeat(3, 1fr); }
.quick-item {
  background: var(--c-surface); border-radius: var(--radius-md); padding: 14px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  box-shadow: 0 3px 12px var(--c-shadow); transition: transform .12s;
}
.quick-item:active { transform: scale(.96); }
.quick-item .ic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--c-primary-bg); color: var(--c-primary);
}
.quick-item .ic svg { width: 26px; height: 26px; }
.quick-item .nm { font-size: 13px; font-weight: 600; }
.quick-item .ds { font-size: 10.5px; color: var(--c-text-light); line-height: 1.3; }

/* === 统计数字条 === */
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.stat-box { background: var(--c-surface); border-radius: var(--radius-md); padding: 14px 10px; text-align: center; box-shadow: 0 3px 12px var(--c-shadow); }
.stat-box .num { font-size: 22px; font-weight: 800; color: var(--c-primary); line-height: 1.1; }
.stat-box .lab { font-size: 11px; color: var(--c-text-secondary); margin-top: 4px; }

/* === 输入控件 === */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--c-text-secondary); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--c-border); border-radius: var(--radius-sm);
  background: var(--c-cream); color: var(--c-text); transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-primary); background: #fff; }
.field textarea { resize: vertical; min-height: 72px; }
.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1; }

/* 分段切换 */
.segment { display: flex; background: var(--c-border-light); border-radius: var(--radius-sm); padding: 3px; }
.segment button { flex: 1; padding: 8px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--c-text-secondary); }
.segment button.active { background: var(--c-surface); color: var(--c-primary-dark); box-shadow: 0 1px 4px var(--c-shadow); }

/* === 筛选条 === */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding: 4px 14px 10px; -webkit-overflow-scrolling: touch; }
.filter-bar::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  background: var(--c-surface); color: var(--c-text-secondary); border: 1.5px solid var(--c-border); white-space: nowrap;
}
.chip.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* === 菜品卡 === */
.recipe-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; padding: 0 14px; }
.recipe-card {
  background: var(--c-surface); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: 0 3px 14px var(--c-shadow); transition: transform .12s; cursor: pointer;
}
.recipe-card:active { transform: scale(.975); }
.recipe-card .ph {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--c-cream-dark);
}
.recipe-card .ph-fallback {
  width: 100%; aspect-ratio: 4/3; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c-accent-light), var(--c-primary-light));
  color: #fff; font-size: 15px; font-weight: 700; text-align: center; padding: 8px;
}
.fb-icon { font-size: 28px; display: block; margin-bottom: 4px; }
.recipe-card .body { padding: 9px 11px 11px; }
.recipe-card .nm { font-size: 14px; font-weight: 700; margin: 0 0 6px; line-height: 1.3; }
.recipe-card .meta { display: flex; flex-wrap: wrap; gap: 5px; }

/* === 详情页 === */
.detail-hero { width: 100%; height: 210px; object-fit: cover; background: var(--c-cream-dark); }
.detail-hero-fallback { width: 100%; height: 210px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c-accent-light), var(--c-primary-light)); color: #fff; font-size: 20px; font-weight: 800; text-align: center; padding: 16px; }
.detail-back { position: absolute; }
.detail-title { font-size: 22px; font-weight: 800; margin: 14px 0 4px; }
.detail-sub { color: var(--c-text-secondary); font-size: 13px; margin-bottom: 14px; }
.meta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

.sec { margin-bottom: 18px; }
.sec h3 { font-size: 15px; font-weight: 700; margin: 0 0 10px; padding-left: 11px; border-left: 4px solid var(--c-accent); }
.ing-list { display: flex; flex-direction: column; gap: 7px; }
.ing-item { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--c-cream); border-radius: 8px; font-size: 14px; }
.ing-item .q { color: var(--c-primary-dark); font-weight: 600; }
.step-list { counter-reset: step; display: flex; flex-direction: column; gap: 11px; }
.step-list li { list-style: none; position: relative; padding-left: 38px; line-height: 1.55; }
.step-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--c-primary); color: #fff; font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
}

/* === 转盘 === */
.wheel-wrap { display: flex; flex-direction: column; align-items: center; padding: 10px 14px 0; }
.wheel-stage { position: relative; width: 300px; height: 300px; margin: 14px 0 6px; }
.wheel-canvas { width: 300px; height: 300px; border-radius: 50%; box-shadow: 0 8px 28px rgba(180,120,80,.22); }
.wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent;
  border-top: 26px solid var(--c-warm-red); z-index: 5; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2));
}
.wheel-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 62px; height: 62px; border-radius: 50%; background: var(--c-warm-white);
  box-shadow: 0 2px 10px rgba(0,0,0,.15); display: grid; place-items: center; z-index: 4;
  color: var(--c-primary-dark); font-weight: 800; font-size: 14px;
}
.wheel-result {
  margin: 10px 14px; padding: 16px; border-radius: var(--radius-md); text-align: center;
  background: linear-gradient(135deg, var(--c-accent-light), var(--c-primary-light)); color: #fff;
  box-shadow: 0 6px 18px rgba(232,115,74,.25);
}
.wheel-result .big { font-size: 21px; font-weight: 800; }
.wheel-result .small { font-size: 12.5px; opacity: .92; margin-top: 4px; }

/* === 心情选择 === */
.mood-row { display: flex; gap: 8px; padding: 4px 14px 6px; overflow-x: auto; }
.mood-row::-webkit-scrollbar { display: none; }
.mood {
  flex: 0 0 auto; padding: 8px 15px; border-radius: 20px; font-size: 13px; font-weight: 600;
  background: var(--c-surface); border: 1.5px solid var(--c-border); color: var(--c-text-secondary);
}
.mood.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* === 备菜清单 === */
.prep-dish { border: 1.5px solid var(--c-border-light); border-radius: var(--radius-md); padding: 13px; margin-bottom: 12px; }
.prep-dish .h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.prep-dish .h .n { font-size: 15px; font-weight: 700; }
.prep-dish .h .order { font-size: 12px; color: var(--c-accent-dark); font-weight: 700; background: var(--c-warning-bg); padding: 3px 9px; border-radius: 12px; }
.prep-sub { font-size: 12.5px; color: var(--c-text-secondary); margin: 8px 0 5px; font-weight: 600; }
.prep-list { display: flex; flex-direction: column; gap: 5px; }
.prep-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 5px 2px; }
.prep-item .box { width: 17px; height: 17px; border: 1.5px solid var(--c-border); border-radius: 5px; flex: 0 0 auto; }
.prep-item.done .box { background: var(--c-success); border-color: var(--c-success); }
.prep-item.done .txt { text-decoration: line-through; color: var(--c-text-light); }

/* === 统计图表 === */
.chart-bar { display: flex; flex-direction: column; gap: 11px; }
.chart-row { display: flex; align-items: center; gap: 10px; }
.chart-row .lab { width: 92px; font-size: 12.5px; color: var(--c-text-secondary); flex: 0 0 auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-row .track { flex: 1; background: var(--c-border-light); border-radius: 8px; height: 22px; position: relative; overflow: hidden; }
.chart-row .fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--c-accent), var(--c-primary)); transition: width .5s ease; }
.chart-row .val { width: 30px; text-align: left; font-size: 12.5px; font-weight: 700; color: var(--c-primary-dark); flex: 0 0 auto; }

/* === 列表项（转盘候选） === */
.list-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; background: var(--c-surface); border-radius: var(--radius-sm); box-shadow: 0 2px 8px var(--c-shadow); margin-bottom: 9px; }
.list-item .info { flex: 1; min-width: 0; }
.list-item .info .t { font-size: 14px; font-weight: 600; }
.list-item .info .s { font-size: 11.5px; color: var(--c-text-light); }
.list-item .del { color: var(--c-warm-red); font-size: 13px; font-weight: 600; padding: 6px 8px; }

/* === 空状态 === */
.empty { text-align: center; padding: 40px 20px; color: var(--c-text-light); }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; background: var(--c-border-light); display: grid; place-items: center; color: var(--c-text-light); }
.empty .ic svg { width: 32px; height: 32px; }
.empty .t { font-size: 14px; font-weight: 600; color: var(--c-text-secondary); }
.empty .d { font-size: 12.5px; margin-top: 5px; }

/* === 模态弹层 === */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(50,30,20,.45);
  display: none; align-items: flex-end; justify-content: center;
}
.modal-mask.show { display: flex; animation: fadeIn .2s; }
.modal {
  background: var(--c-warm-white); width: 100%; max-width: 480px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto;
  animation: slideUp .28s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head .mt { font-size: 17px; font-weight: 800; }
.modal-head .close { width: 32px; height: 32px; border-radius: 50%; background: var(--c-border-light); display: grid; place-items: center; color: var(--c-text-secondary); font-size: 18px; }

/* === 提示条 === */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-height) + 30px); transform: translateX(-50%) translateY(20px);
  background: rgba(50,30,20,.92); color: #fff; padding: 11px 20px; border-radius: 24px; font-size: 13.5px; font-weight: 600;
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; max-width: 86%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === 配菜建议横条 === */
.eat-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 14px 6px; -webkit-overflow-scrolling: touch; }
.eat-row::-webkit-scrollbar { display: none; }
.eat-card { flex: 0 0 130px; background: var(--c-surface); border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 3px 12px var(--c-shadow); }
.eat-card .ph { width: 100%; height: 90px; object-fit: cover; background: var(--c-cream-dark); }
.eat-card .ph-fallback { width: 100%; height: 90px; display: grid; place-items: center; background: linear-gradient(135deg, var(--c-accent-light), var(--c-primary-light)); color:#fff; font-weight:700; font-size:13px; text-align:center; padding:6px; }
.eat-card .b { padding: 8px 10px; }
.eat-card .b .n { font-size: 13px; font-weight: 700; }
.eat-card .b .k { font-size: 11px; color: var(--c-text-light); margin-top: 2px; }

/* === 抗炎菜单 === */
.day-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 14px 10px; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: 0 0 auto; padding: 8px 13px; border-radius: 12px; font-size: 13px; font-weight: 700; background: var(--c-surface); border: 1.5px solid var(--c-border); color: var(--c-text-secondary); text-align: center; }
.day-tab.active { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.day-tab .d { font-size: 10px; font-weight: 500; opacity: .8; }

/* 饮食时段条 */
.meal-band { border-left: 4px solid var(--c-accent); background: var(--c-cream); border-radius: 0 12px 12px 0; padding: 12px 14px; margin-bottom: 12px; }
.meal-band .mt { font-size: 14px; font-weight: 700; color: var(--c-accent-dark); margin-bottom: 6px; }
.meal-band .mc { font-size: 13px; color: var(--c-text); line-height: 1.5; }
.meal-band .mn { font-size: 12px; color: var(--c-text-secondary); margin-top: 5px; }
.meal-band.b { border-color: var(--c-primary); }
.meal-band.b .mt { color: var(--c-primary-dark); }
.meal-band.g { border-color: var(--c-success); }
.meal-band.g .mt { color: #5a8a2c; }

/* === 运动计算 === */
.exercise-grid { display: flex; flex-direction: column; gap: 9px; }
.ex-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--c-surface); border-radius: var(--radius-sm); box-shadow: 0 2px 8px var(--c-shadow); }
.ex-item .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--c-info-bg); color: var(--c-info); display: grid; place-items: center; flex: 0 0 auto; }
.ex-item .ic svg { width: 22px; height: 22px; }
.ex-item .info { flex: 1; }
.ex-item .info .n { font-size: 14px; font-weight: 600; }
.ex-item .info .s { font-size: 11.5px; color: var(--c-text-light); }
.ex-item .t { font-size: 16px; font-weight: 800; color: var(--c-primary); }

/* 切换大数字 */
.bignum { font-size: 40px; font-weight: 800; color: var(--c-primary); line-height: 1.1; }
.bignum-label { font-size: 13px; color: var(--c-text-secondary); }

/* 相机框 */
.cam-box {
  width: 100%; aspect-ratio: 1/1; border-radius: var(--radius-md); background: var(--c-cream-dark);
  border: 2px dashed var(--c-border); display: grid; place-items: center; color: var(--c-text-light);
  position: relative; overflow: hidden; margin-bottom: 14px;
}
.cam-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-box .ph { font-size: 13px; text-align: center; padding: 20px; }
.cam-box .ph svg { width: 40px; height: 40px; margin-bottom: 8px; opacity: .6; }

/* 进度条 */
.progress { height: 8px; border-radius: 6px; background: var(--c-border-light); overflow: hidden; margin: 4px 0 2px; }
.progress .fill { height: 100%; background: linear-gradient(90deg, var(--c-accent), var(--c-primary)); border-radius: 6px; }

/* 分割标题 */
.section-head { display: flex; align-items: center; gap: 8px; margin: 6px 14px 10px; }
.section-head .line { flex: 1; height: 1px; background: var(--c-border-light); }
.section-head .tx { font-size: 13px; font-weight: 700; color: var(--c-text-secondary); letter-spacing: .5px; }

/* 笔记/提示框 */
.tip { background: var(--c-warning-bg); border-radius: var(--radius-sm); padding: 11px 13px; font-size: 12.5px; color: var(--c-accent-dark); line-height: 1.5; margin-bottom: 12px; }
.tip.info { background: var(--c-info-bg); color: var(--c-info); }

/* 隐藏滚动条通用 */
.no-sb::-webkit-scrollbar { display: none; }

/* 顶部小字统计 */
.mini-stat { font-size: 12px; color: var(--c-text-light); }
.mini-stat b { color: var(--c-primary-dark); }

/* 安装提示 */
.install-bar {
  position: fixed; left: 50%; bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px); transform: translateX(-50%);
  z-index: 120; background: var(--c-warm-white); box-shadow: 0 6px 22px rgba(180,120,80,.25);
  border-radius: 24px; padding: 9px 9px 9px 18px; display: none; align-items: center; gap: 10px; max-width: 90%;
}
.install-bar.show { display: flex; animation: slideUp .3s; }
.install-bar .t { font-size: 12.5px; font-weight: 600; color: var(--c-text); }
.install-bar .btn { padding: 7px 14px; font-size: 12.5px; }
.install-bar .x { color: var(--c-text-light); font-size: 18px; padding: 0 4px; }

/* === 占位卡图标（无 emoji，显示分类单字） === */
.fb-icon { font-size: 22px; display: block; margin-bottom: 4px; font-weight: 700; line-height: 1; }

/* === 首页：今日主打 === */
.feat-card { display: flex; align-items: center; gap: 14px; padding: 14px; }
.feat-card .ph { width: 116px; height: 116px; flex: 0 0 auto; border-radius: 14px; object-fit: cover; background: var(--c-cream-dark); }
.feat-card .ph-fallback { width: 116px; height: 116px; flex: 0 0 auto; border-radius: 14px; font-size: 14px; }
.feat-meta { flex: 1; min-width: 0; }
.feat-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--c-primary-dark); background: var(--c-primary-bg); padding: 3px 10px; border-radius: 20px; margin-bottom: 7px; }
.feat-name { font-size: 19px; font-weight: 800; line-height: 1.25; }
.feat-sub { font-size: 12.5px; color: var(--c-text-secondary); margin-top: 6px; }

/* === 减脂：套餐卡片 === */
.plan-card { border: 1.5px solid var(--c-border-light); border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.plan-name { font-size: 16px; font-weight: 800; }
.plan-total { font-size: 14px; font-weight: 800; color: var(--c-accent-dark); }
.plan-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.plan-img { width: 100%; height: 112px; object-fit: cover; border-radius: 10px; background: var(--c-cream-dark); display: block; margin-bottom: 4px; }
.plan-card .detail-hero-fallback { width: 100%; height: 112px; border-radius: 10px; aspect-ratio: auto; font-size: 18px; margin-bottom: 4px; }

/* === 减脂：食材卡 === */
.ing-card { background: var(--c-surface); border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 3px 14px var(--c-shadow); transition: transform .12s, border-color .12s, background .12s; cursor: pointer; border: 2px solid transparent; }
.ing-card:active { transform: scale(.975); }
.ing-card.sel { border-color: var(--c-primary); background: var(--c-primary-bg); }
.ing-card .ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--c-cream-dark); }
.ing-card .ph-fallback { width: 100%; aspect-ratio: 4/3; display: grid; place-items: center; background: linear-gradient(135deg, var(--c-accent-light), var(--c-primary-light)); color: #fff; font-size: 15px; font-weight: 700; text-align: center; padding: 8px; }
.ing-card .body { padding: 9px 11px 11px; }
.ing-card .nm { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.ing-card .meta { display: flex; flex-wrap: wrap; gap: 5px; }

/* === 减脂：总热量浮条 === */
#fatBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px); z-index: 60; background: linear-gradient(120deg, var(--c-primary), var(--c-accent)); color: #fff; padding: 11px 20px; border-radius: 24px; box-shadow: 0 6px 20px rgba(232,115,74,.4); display: none; align-items: center; font-weight: 700; font-size: 14px; max-width: 90%; }
#fatBar:active { transform: translateX(-50%) scale(.97); }

/* === 减脂：热量统计弹窗 === */
.stat-group { margin-bottom: 10px; border: 1px solid var(--c-border-light); border-radius: 10px; overflow: hidden; }
.sg-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--c-cream); font-weight: 800; font-size: 14px; }
.sg-sub { color: var(--c-accent-dark); font-weight: 800; }
.stat-group .ing-item { padding: 7px 12px; border-top: 1px solid var(--c-border-light); }
.stat-gauge { height: 12px; border-radius: 8px; background: var(--c-cream-dark); overflow: hidden; margin-top: 4px; }
.stat-gauge-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--c-primary), var(--c-accent)); transition: width .3s; }
.stat-note { font-size: 13px; color: var(--c-text-soft); margin-top: 6px; }

/* === 7 项导航微调 === */
.nav-item.active::before { width: 28px; height: 28px; top: 7px; }
.nav-item svg { width: 22px; height: 22px; }
