/* ============================================================
   AI识餐 · 柠檬黄 Q 版主题（反推自《喜欢的UI风格手册》2026-11-19）
   仅视觉层：保留全部 class / 布局骨架，不改动任何 id 与交互逻辑
   主色 #FFF134 柠檬黄 + #151513 近黑黑胶囊黄字 + 奶油暖白卡片
   ============================================================ */
:root {
  /* 品牌色板（手册 2.1 实测值） */
  --yellow: #FFF134;
  --lime: #C8FA54;
  --yellow-soft: #FFF4A1;
  --peach: #FFF0D6;
  --ink: #151513;
  --white: #FFFFFF;
  --bg-warm: #F4F4F1;
  --field: #F6F6F2;
  --ink-2: #7C7C74;
  --ink-3: #A6A69E;
  --line-warm: #ECEAE0;
  --yellow-press: #EBDD12;
  --scrim: rgba(21,21,19,.53);

  /* 兼容旧变量名（JS 仍在引用，语义映射到新主题） */
  --primary: #151513;        /* 主填充/黑按钮 */
  --accent: #FFF134;         /* 品牌黄（仅填充/强调，禁止白底黄字） */
  --accent-deep: #EBDD12;    /* 黄按压态 */
  --accent-soft: #FFF4A1;    /* 浅黄底 */
  --green: #5FC46A;
  --green-soft: #EAFBD2;
  --red: #E5483D;
  --red-soft: #FFE3E0;
  --bf: #FFC93C;
  --bf-soft: #FFF0D6;
  --ink-soft: #7C7C74;
  --ink-faint: #A6A69E;
  --line: #ECEAE0;
  --card: #FFFFFF;
  --bg: #F4F4F1;

  /* 餐次圆点（饱和暖调，10px 小点需可辨） */
  --bf-breakfast: #FFC93C;
  --bf-lunch: #7ED321;
  --bf-dinner: #FF9A3D;
  --bf-snack: #FF7AA2;
  /* 餐次浅彩底（预留卡片化） */
  --meal-breakfast: #FFF0D6;
  --meal-lunch: #EAFBD2;
  --meal-dinner: #FFF4A1;
  --meal-snack: #FFE3EA;

  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 13px;
  --tabbar-h: 68px;

  --shadow-card: 0 4px 14px rgba(21,21,19,.05);
  --shadow-fab: 0 8px 20px rgba(21,21,19,.18);
  --shadow-pop: 0 12px 32px rgba(21,21,19,.22);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #ECEAE0;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.screen { display: none; min-height: 100vh; min-height: 100dvh; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); }
.screen.active { display: block; }
.screen.nopad { padding-bottom: 0; }

/* 顶部状态栏占位 */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.topbar .time { font-weight: 800; font-size: 14px; color: var(--ink); }
.page-head { padding: 8px 16px 14px; display: flex; align-items: center; justify-content: space-between; }
.page-title { font-size: 28px; font-weight: 900; letter-spacing: -.4px; color: var(--ink); line-height: 1.25; }
.icon-btn { width: 38px; height: 38px; border-radius: 999px; border: none; background: var(--yellow-soft); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); flex-shrink: 0; }
.icon-btn:active { background: var(--yellow); }
.icon-btn svg { width: 19px; height: 19px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; margin: 0 16px 12px; box-shadow: var(--shadow-card); }
.card-title { font-size: 16px; font-weight: 800; margin-bottom: 12px; color: var(--ink); }

/* 一级内容 Tab 统一黄色 Header 块（纯视觉，不改结构；设置页除外，其黄色主角为升级卡） */
#scr-home .topbar, #scr-friends .topbar, #scr-recipes .topbar, #scr-insight .topbar, #scr-settings .topbar {
  background: var(--yellow); padding-left: 16px; padding-right: 16px;
}
#scr-home .page-head, #scr-friends .page-head, #scr-recipes .page-head, #scr-insight .page-head, #scr-settings .page-head {
  background: linear-gradient(180deg, var(--yellow) 0%, #FFF7B8 58%, var(--bg) 100%);
  padding: 6px 16px 20px; margin-bottom: 12px; border-radius: 0 0 26px 26px;
}
#scr-home .page-title { font-size: 30px; font-weight: 900; letter-spacing: -.5px; }
#scr-home .page-title::after { content: " ✦"; color: var(--ink); font-size: 22px; }
/* 黄头下方首个内容区消除多余顶部塌陷，衔接更顺 */
#scr-friends .page-head + .card, #scr-recipes .page-head + #recipeList,
#scr-insight .page-head + #insightGrid, #scr-settings .page-head + #settingsUpgrade { margin-top: 0; }
/* 黄色 Header 上的圆形图标钮（齿轮/返回）用白底，对比更清晰 */
#scr-home .topbar .icon-btn, #scr-friends .topbar .icon-btn, #scr-recipes .topbar .icon-btn,
#scr-insight .topbar .icon-btn, #scr-settings .topbar .icon-btn { background: #fff; }
#scr-home .topbar .icon-btn:active, #scr-friends .topbar .icon-btn:active, #scr-recipes .topbar .icon-btn:active,
#scr-insight .topbar .icon-btn:active, #scr-settings .topbar .icon-btn:active { background: var(--yellow-soft); }

/* 付费墙黄色 Header 块 */
#scr-paywall .topbar { background: linear-gradient(180deg, var(--yellow) 0%, #FFF7B8 100%); }
#scr-paywall .page-head {
  background: linear-gradient(180deg, #FFF7B8 0%, var(--bg) 100%);
  padding-top: 4px; padding-bottom: 18px; margin-bottom: 12px;
}
#scr-paywall .page-title { font-size: 26px; }
/* 付费墙：隐藏主底栏后，CTA 固定底部黑胶囊黄字（支付逻辑不变，仅定位） */
#scr-paywall { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
#payBtn { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 14px); width: calc(100% - 32px); max-width: 398px; min-height: 54px; z-index: 50; box-shadow: 0 14px 30px rgba(21,21,19,.30); }
#payBtn:active { transform: translateX(-50%) scale(.99); }

/* Onboarding（步骤表单型：干净白底，黄色仅用于进度段/选中/CTA 点缀） */
.ob-wrap { padding: calc(env(safe-area-inset-top) + 14px) 20px 20px; min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 28px; }
.progress i { display: block; height: 100%; background: var(--yellow); border-radius: 999px; transition: width .3s; }
.ob-title { font-size: 27px; font-weight: 900; letter-spacing: -.4px; line-height: 1.28; margin-bottom: 6px; }
.ob-sub { color: var(--ink-2); font-size: 13px; font-weight: 500; margin-bottom: 24px; }
.opt-list { display: flex; flex-direction: column; gap: 12px; }
.opt { border: 1.5px solid var(--line); background: #fff; border-radius: 15px; padding: 16px; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
.opt:active { background: var(--field); }
.opt.sel { border-color: var(--ink); background: var(--yellow-soft); }
.opt .dot { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--ink-3); background: #fff; flex-shrink: 0; }
.opt.sel .dot { border-color: var(--ink); background: radial-gradient(var(--ink) 45%, transparent 50%); }
.field { width: 100%; border: 1.5px solid transparent; border-radius: 14px; padding: 15px 16px; font-size: 16px; background: var(--field); color: var(--ink); }
.field::placeholder { color: var(--ink-3); }
.field:focus { outline: none; border-color: var(--ink); background: #fff; }
.ob-actions { margin-top: auto; padding-top: 20px; display: flex; gap: 12px; }
.btn { flex: 1; border: none; border-radius: 999px; padding: 15px 18px; min-height: 52px; font-size: 16px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--ink); color: var(--yellow); box-shadow: 0 8px 20px rgba(21,21,19,.14); }
.btn-primary:active { background: #000; }
.btn-primary:disabled { background: #E7E5DC; color: var(--ink-3); box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: var(--bg-warm); color: var(--ink); font-weight: 800; }
.btn-ghost:active { background: #E9E7DD; }
.btn:disabled { opacity: 1; }
.seg-row { display: flex; gap: 10px; flex-wrap: wrap; }
.seg { padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; }
.seg.sel { border-color: var(--ink); background: var(--ink); color: var(--yellow); font-weight: 800; }

/* 周历 */
.week-strip { display: flex; gap: 6px; padding: 0 16px 12px; }
.week-day { flex: 1; background: var(--field); border-radius: 14px; padding: 8px 0; text-align: center; cursor: pointer; }
.week-day.sel { background: var(--ink); color: var(--yellow); }
.week-day .wd { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.week-day.sel .wd { color: rgba(255,241,52,.75); }
.week-day .dd { font-size: 16px; font-weight: 800; margin-top: 2px; }

/* 热量环 */
.ring-card { display: flex; align-items: center; gap: 18px; }
.ring { width: 132px; height: 132px; position: relative; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .big { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ring .unit { font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.ring-info { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.ring-info .ri { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); }
.ring-info .ri b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }

/* 营养素 */
.macro-row { display: flex; gap: 10px; }
.macro { flex: 1; text-align: center; }
.macro .mbar { height: 7px; border-radius: 999px; background: #EFEDE4; margin: 8px 0; overflow: hidden; }
.macro .mbar i { display: block; height: 100%; border-radius: 999px; }
.macro .mv { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.macro .ml { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

/* 记录列表 */
.meal-group { margin-bottom: 8px; }
.meal-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 20px; }
.meal-head .left { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.meal-dot { width: 11px; height: 11px; border-radius: 999px; border: 1.5px solid rgba(21,21,19,.12); }
.meal-head .add { color: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; background: var(--yellow-soft); padding: 5px 13px; border-radius: 999px; }
.meal-head .add:active { background: var(--yellow); }
.food-line { display: flex; align-items: center; justify-content: space-between; background: var(--field); border-radius: 14px; padding: 12px 14px; margin: 0 16px 8px; }
.food-line .fn { font-weight: 700; font-size: 14px; }
.food-line .fm { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.food-line .fk { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.grouped-food-line { gap: 7px; padding: 10px 11px; }
.food-count { display: inline-flex; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: 10.5px; vertical-align: 1px; }
.food-total { flex-shrink: 0; font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.food-total span { display: block; text-align: right; font-size: 10px; color: var(--ink-3); font-weight: 700; }
.food-stepper { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.food-stepper button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 17px; line-height: 1; cursor: pointer; }
.food-stepper button:disabled { opacity: .35; cursor: default; }
.food-stepper b { min-width: 20px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.exercise-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 11px; border-radius: 14px; background: var(--field); }
.exercise-row > span { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--peach); color: #C76A12; flex-shrink: 0; }
.exercise-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exercise-row b { font-size: 13px; }
.exercise-row small { color: var(--ink-2); font-size: 11.5px; }
.exercise-row strong { font-size: 13px; color: #C76A12; white-space: nowrap; }
.exercise-row button { border: none; background: transparent; color: var(--ink-3); padding: 4px; cursor: pointer; }
.empty { text-align: center; color: var(--ink-3); font-size: 13px; padding: 18px; line-height: 1.6; }

/* FAB（右下黄色圆钮，黑图标） */
/* 中央记录钮：固定在底栏顶边正中上方（保留 #fab id 与原记录菜单事件） */
.fab { position: fixed; left: auto; right: max(16px, calc(50% - 199px)); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); width: 54px; height: 54px; border-radius: 999px; background: var(--yellow); color: var(--ink); border: 4px solid #fff; box-shadow: 0 10px 24px rgba(21,21,19,.24); cursor: pointer; z-index: 51; display: flex; align-items: center; justify-content: center; transition: transform .15s ease, background .15s ease; }
.fab:active { background: var(--yellow-press); transform: scale(.94); }
.fab svg { width: 27px; height: 27px; }

/* 底部弹窗 */
.sheet-mask { position: fixed; inset: 0; background: var(--scrim); display: none; align-items: flex-end; z-index: 60; }
.sheet-mask.show { display: flex; }
.sheet { width: 100%; max-width: 430px; margin: 0 auto; background: #fff; border-radius: 28px 28px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-pop); }
.sheet-handle { width: 40px; height: 4px; border-radius: 999px; background: #E3E1D6; margin: 0 auto 16px; }
.sheet-title { font-size: 19px; font-weight: 900; letter-spacing: -.3px; margin-bottom: 14px; }
.sheet-opt { display: flex; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 16px; cursor: pointer; }
.sheet-opt:active { background: var(--field); }
.sheet-ic { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sheet-ic svg { width: 23px; height: 23px; }
.sheet-opt .sn { font-weight: 800; font-size: 15px; }
.sheet-opt .sd { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.tag-lock { font-size: 11px; font-weight: 700; color: #8A6D1F; background: var(--yellow-soft); padding: 4px 10px; border-radius: 999px; margin-left: auto; }
.tag-free { font-size: 11px; font-weight: 700; color: #2E7D32; background: var(--green-soft); padding: 4px 10px; border-radius: 999px; margin-left: auto; }

/* 搜索 */
.search-box { display: flex; gap: 8px; margin-bottom: 12px; }
.search-box input { flex: 1; border: 1.5px solid transparent; border-radius: 14px; padding: 13px 16px; font-size: 14px; background: var(--field); color: var(--ink); font-family: inherit; }
.search-box input::placeholder { color: var(--ink-3); }
.search-box input:focus { outline: none; border-color: var(--ink); background: #fff; }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 12px; border-radius: 14px; cursor: pointer; }
.search-result:active { background: var(--field); }

/* Tabbar：白底 + 选中黄色胶囊图标底 */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 50; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); cursor: pointer; font-size: 11px; font-weight: 600; }
.tab svg { width: 23px; height: 23px; padding: 5px 15px; box-sizing: content-box; border-radius: 999px; background: transparent; transition: background .16s ease, color .16s ease; }
.tab.active { color: var(--ink); font-weight: 800; }
.tab.active svg { background: var(--yellow); color: var(--ink); }
/* 中央凸起记录钮的空槽位（左右各 2 个 Tab，中央对称留槽） */

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 58px); transform: translateX(-50%); background: rgba(21,21,19,.94); color: var(--yellow); font-weight: 700; padding: 12px 20px; border-radius: 999px; font-size: 14px; z-index: 90; opacity: 0; transition: opacity .25s; pointer-events: none; max-width: 86%; text-align: center; }
.toast.show { opacity: 1; }

/* 套餐卡（行式/双列通用，选中浅黄底 + 黑描边） */
#planCards { gap: 12px; }
.plan-card { flex: 1; position: relative; border: 1.5px solid var(--line); border-radius: 18px; padding: 18px 14px 16px; background: #fff; cursor: pointer; text-align: center; }
.plan-card.sel { border-color: var(--ink); border-width: 1.5px; background: var(--yellow-soft); }
.plan-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--yellow); font-size: 11px; padding: 4px 11px; border-radius: 999px; font-weight: 800; white-space: nowrap; }
.plan-name { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.plan-price b { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.plan-price s { font-size: 12px; color: var(--ink-3); margin-left: 4px; }
.plan-days { font-size: 12px; color: var(--ink-2); margin-top: 6px; font-weight: 600; }

/* 权益对比行 */
.benefit-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.benefit-row:last-child { border-bottom: none; }
.benefit-row .b-free { color: #2E7D32; background: var(--green-soft); font-size: 12px; padding: 4px 11px; border-radius: 999px; font-weight: 800; flex-shrink: 0; }
.benefit-row .b-premium { color: var(--ink); background: var(--yellow-soft); font-size: 12px; padding: 4px 11px; border-radius: 999px; font-weight: 800; flex-shrink: 0; }

/* 食谱卡 & 天 Tab */
.recipe-card { cursor: pointer; transition: transform .08s ease; }
.recipe-card:active { transform: scale(.99); }
.day-tab { cursor: pointer; }
.day-tab.sel { background: var(--ink); border-color: var(--ink); color: var(--yellow); }

/* 洞察六图 */
.insight-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 16px 12px; }
.insight-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-card); }
.insight-stat b { font-size: 27px; font-weight: 900; font-variant-numeric: tabular-nums; }
.insight-stat span { font-size: 13px; color: var(--ink-2); }
.dist-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13px; }
.dist-bar { flex: 1; height: 8px; border-radius: 999px; background: #EFEDE4; overflow: hidden; }
.dist-bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.disclaimer { padding: 4px 20px 12px; font-size: 12px; color: var(--ink-3); line-height: 1.7; }

/* AI 结果 */
.ai-result { margin-top: 8px; }

/* 闺蜜位 */
.bond-slots { display: flex; gap: 14px; }
.bond-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.bond-avatar { width: 62px; height: 62px; border-radius: 999px; background: var(--yellow); color: var(--ink); border: 3px solid #fff; box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: center; font-size: 23px; font-weight: 900; }
.bond-item:active .bond-avatar { transform: scale(.96); }
.bond-item .bond-name { font-size: 12px; font-weight: 600; color: var(--ink-2); max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-slot .bond-avatar { background: var(--field); color: var(--ink-3); border: 1.5px dashed var(--ink-3); box-shadow: none; }
.social-entries { padding: 0 16px; }
.social-entry { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; cursor: pointer; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 4px; }
.social-entry:active { background: var(--field); }
.social-entry b { font-size: 15px; font-weight: 800; }
.social-entry span { font-size: 12px; color: var(--ink-2); }
.my-code { text-align: center; font-size: 32px; font-weight: 900; letter-spacing: 5px; margin-bottom: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* 排行榜 */
.rank-row { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-bottom: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.rank-row:last-child { border-bottom: none; }
.rank-row:active { background: var(--field); }
.rank-no { width: 30px; height: 30px; border-radius: 999px; background: var(--field); color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; flex-shrink: 0; }
#rankList .rank-row:nth-child(2) { background: var(--yellow-soft); }
#rankList .rank-row:nth-child(2) .rank-no { background: var(--yellow); color: var(--ink); }
#rankList .rank-row:nth-child(3) { background: var(--green-soft); }
#rankList .rank-row:nth-child(3) .rank-no { background: var(--lime); color: var(--ink); }
#rankList .rank-row:nth-child(4) { background: var(--peach); }
#rankList .rank-row:nth-child(4) .rank-no { background: #FFD9A8; color: var(--ink); }
.rank-name { flex: 1; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-like { font-size: 12px; font-weight: 700; color: var(--ink-2); }

/* 扫描取景（暖黑取景层 + 黄色取景框/扫描线） */
.scan-area { margin: 0 16px 14px; background: var(--ink); border-radius: var(--radius-lg); padding: 32px 22px; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.scan-frame { width: 184px; height: 184px; border: 2px solid rgba(255,255,255,.32); border-radius: 22px; position: relative; }
.scan-frame::before, .scan-frame::after { content: ""; position: absolute; left: 10px; right: 10px; height: 3px; border-radius: 3px; background: var(--yellow); }
.scan-frame::before { top: 10px; }
.scan-frame::after { top: 50%; }
.scan-area .btn { width: 100%; }
#customBody .opt { margin-bottom: 10px; }

/* 设置页升级卡 → 黑底黄字会员卡（右侧黄色胶囊“去开通”，整卡仍可点） */
#settingsUpgrade {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-height: 88px; padding: 16px 112px 16px 18px;
  background: var(--ink); border: none; border-radius: 20px;
  box-shadow: 0 12px 26px rgba(21,21,19,.20); cursor: pointer;
}
#settingsUpgrade:active { transform: scale(.99); }
#settingsUpgrade .card-title { color: var(--yellow); font-size: 17px; margin-bottom: 5px !important; }
#settingsUpgrade > div:last-child { color: rgba(255,255,255,.72) !important; font-size: 13px; }
#settingsUpgrade::after {
  content: "去开通"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 13px;
  padding: 9px 17px; border-radius: 999px; white-space: nowrap;
}

/* ============================================================
   饭团团团 IP（纯视觉层：首页/排行空状态 · AI结果 · 支付成功）
   仅新增 class，不覆盖既有业务组件规则
   ============================================================ */
#homeEmptyIp[hidden], #paySuccessMascot[hidden] { display: none !important; }

/* 首页当天无记录：首屏横向浅黄引导卡（位于餐次列表之前，有记录即隐藏） */
.home-empty-ip {
  display: flex; align-items: center; gap: 12px; margin: 2px 16px 14px; padding: 12px 14px;
  background: linear-gradient(135deg, var(--yellow-soft) 0%, #FFF9DC 100%);
  border: 1.5px solid rgba(21,21,19,.07); border-radius: 20px;
  box-shadow: 0 8px 18px rgba(21,21,19,.06); animation: ip-fade-up .35s ease both;
}
.home-empty-ip img {
  width: 92px; height: 92px; flex: 0 0 auto; object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(21,21,19,.12)); animation: ip-float 3.4s ease-in-out infinite;
}
.home-empty-ip .hei-text { flex: 1 1 auto; min-width: 0; }
.home-empty-ip .hei-title { font-size: 14.5px; font-weight: 800; line-height: 1.35; color: var(--ink); }
.home-empty-ip .hei-sub { margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.home-empty-ip .hei-plus {
  display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px;
  margin: 0 1px; border-radius: 999px; background: var(--yellow); color: var(--ink);
  font-weight: 900; font-size: 11px; line-height: 1; vertical-align: 1px;
}
@keyframes ip-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes ip-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 排行榜“我的排名”空状态 */
.rank-empty-ip {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 10px 8px; color: var(--ink-3); font-size: 12.5px; text-align: center;
}
.rank-empty-ip img { width: 84px; height: 84px; object-fit: contain; }

/* AI 识餐结果顶部形象 + 气泡 */
.ai-mascot { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; animation: ip-fade-up .3s ease both; }
.ai-mascot img {
  width: 76px; height: 76px; flex: 0 0 auto; object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(21,21,19,.10));
}
.ai-mascot.is-sm img { width: 60px; height: 60px; }
.ai-mascot-bubble {
  position: relative; flex: 1 1 auto; min-width: 0; background: var(--yellow-soft); color: var(--ink);
  font-size: 12.5px; line-height: 1.6; font-weight: 600; padding: 9px 12px; border-radius: 14px 14px 14px 4px;
}

/* 支付成功轻反馈浮层（pointer-events:none，不阻挡原页面交互与返回时序） */
.psm-layer {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 24px; pointer-events: none; background: rgba(21,21,19,.46);
  animation: ip-scrim-in .25s ease both;
}
@keyframes ip-scrim-in { from { opacity: 0; } to { opacity: 1; } }
.psm-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; max-width: 288px;
  background: #fff; border: 1.5px solid var(--line-warm); border-radius: 26px; padding: 20px 22px 24px;
  box-shadow: 0 24px 60px rgba(21,21,19,.28); pointer-events: none;
}
.psm-card img { width: 132px; height: 132px; object-fit: contain; margin-top: -4px; filter: drop-shadow(0 10px 16px rgba(21,21,19,.14)); }
.psm-title { margin-top: 4px; font-size: 17px; font-weight: 900; color: var(--ink); }
.psm-sub { margin-top: 7px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.psm-pop { animation: psm-pop .42s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes psm-pop {
  0% { opacity: 0; transform: scale(.82) translateY(14px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .home-empty-ip img, .home-empty-ip, .ai-mascot, .psm-pop { animation: none; }
}
