/* ============================================================================
   颐年健康 · 图文化改版层（visual-first）
   ----------------------------------------------------------------------------
   改版目标（用户 2026-11）：
     「以图为主，大幅精简文字；每个界面的文字不得铺满或大面积占据屏幕；
       字号偏大、留白充足、入口清晰。」

   实现策略（三层，互不冲突）：
     ① 每个页面顶部给一条**插画横幅**，让图先出现；
     ② 正文里的长解释统一压到 1~3 行（line-clamp），装饰性文案直接不显示；
     ③ 卡片、按钮、图标整体放大，靠留白而不是靠文字撑版面。

   注意：不改 DOM 结构与交互逻辑，只做视觉层；表单标签、必填提示、
   错误提示一律保留（`.field`、`label`、`.alert` 内的文字不受裁切规则影响）。
   ========================================================================== */

:root {
  --vf-radius: 28px;
  --vf-gap: 22px;
  --vf-ink-soft: #6B5644;
}

/* ============================================================================
   ① 页头：文字条 → 插画横幅
   ----------------------------------------------------------------------------
   原来 .page-head 是一条浅色胶囊，只有「营养方案」四个字，右侧大片空白。
   现在右边放一张场景插画，标题压在左侧，一进页面先看到图。

   注意：app.css 里已有 `#content .page-head`（ID + class）的规则，
   只写 .page-head 会被它压住，所以这一组统一带上 #content 前缀。
   ========================================================================== */
#content .page-head {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 132px !important;
  padding: 18px 198px 18px 30px !important;
  border-radius: 26px;
  background: linear-gradient(118deg, #FFF7EA 0%, #FCEAD6 58%, #F6DFC7 100%) !important;
  border: 1px solid rgba(184, 90, 34, 0.14);
  overflow: hidden;
  margin-bottom: var(--vf-gap);
}

#content .page-head::after {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 176, 102, 0.30) 0%, rgba(255, 176, 102, 0) 70%);
  pointer-events: none;
}

#content .page-head h1 {
  font-size: clamp(28px, 2.2vw, 36px) !important;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: #2B2422;
  position: relative;
  z-index: 1;
}

/* 副标题一律不显示：这一页能做什么，用图说 */
#content .page-head .page-sub { display: none !important; }

#content .page-head .vf-head-art {
  position: absolute;
  right: 26px;
  bottom: 0;
  width: 168px;
  height: 124px;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* 首页不要页头：首屏直接交给大图与今日任务 */
body[data-route="dashboard"] #content .page-head { display: none !important; }

/* 本身已经有整块插画横幅（.page-banner）的页面，不再叠一条页头条 —— 
   否则一屏里会出现两条“图 + 标题”的横幅，反而更占地方。
   保留页头的只有：健康管家、使用指南、晨起关怀、运动视频库（这些页没有 .page-banner）。 */
body[data-route="profile"] #content .page-head,
body[data-route="goal"] #content .page-head,
body[data-route="assessment"] #content .page-head,
body[data-route="nutrition"] #content .page-head,
body[data-route="exercise"] #content .page-head,
body[data-route="checkin"] #content .page-head,
body[data-route="tracking"] #content .page-head,
body[data-route="settings"] #content .page-head,
body[data-route="data"] #content .page-head { display: none !important; }

/* ============================================================================
   ② 卡片：更大的圆角与内边距，图先说话
   ========================================================================== */
#content .card {
  border-radius: var(--vf-radius);
  padding: 24px 26px;
}

#content .card-head { margin-bottom: 14px; }

#content .card-title { font-size: 25px; font-weight: 800; }

/* 卡片角落的淡水印画：原来 0.14 几乎看不见，现在让它成为画面的一部分 */
.illu-watermark {
  width: 220px;
  opacity: 0.42;
  right: -14px;
  bottom: -10px;
}

/* 小节标题旁的插画从 66×44 放大到 92×62 */
.section-illu { width: 92px; height: 62px; }
.section-illu img { width: 100%; height: 100%; object-fit: contain; }

/* ============================================================================
   ③ 文字减量：长段落裁切，装饰文案隐藏
   ----------------------------------------------------------------------------
   只裁“解释性”文字；表单标签、输入框说明、错误提示、按钮文字一律不动。
   ========================================================================== */
#content .explain,
#content .why-line,
#content .page-banner-desc,
#content .today-task-how,
#content .morning-entry-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 这些是纯装饰/重复信息：日期、任务的状态长句、入口的副标题 */
#content .dash-hero-date,
#content .today-three-state,
#content .dash-hero-cta-sub,
#content .morning-entry-eyebrow,
#content .morning-entry-meta { display: none !important; }

/* 板块卡副标题压成一行，避免“小字两行”把卡片撑高 */
#content .board-tile-sub,
#content .card-sub {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================================
   ④ 按钮：更大、更好点
   ========================================================================== */#content .btn {
  min-height: 60px;
  border-radius: 18px;
  font-size: 20px;
  padding: 14px 26px;
}

#content .btn-lg {
  min-height: 72px;
  border-radius: 20px;
  font-size: 22px;
  padding: 18px 30px;
}

/* ============================================================================
   ⑤ 首页：三件事 → 三张图卡
   ========================================================================== */
#content .today-three { padding: 22px 22px 24px; }

#content .today-three-head { margin-bottom: 16px; }

#content .today-three-title { font-size: 26px; }

#content .today-three-count {
  font-size: 17px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #FBEEE0;
  color: #8A3F0E;
  font-weight: 700;
}

.vf-task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.vf-task {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px 14px;
  border-radius: 22px;
  border: 1px solid rgba(184, 90, 34, 0.16);
  background: linear-gradient(180deg, #FFFDF9 0%, #FFF4E7 100%);
  cursor: pointer;
  text-align: center;
  font: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.vf-task:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(150, 90, 40, 0.14); }
.vf-task:focus-visible { outline: 3px solid #B85A22; outline-offset: 3px; }

.vf-task-art {
  width: 104px;
  height: 84px;
  object-fit: contain;
  display: block;
}

.vf-task-name {
  font-size: 23px;
  font-weight: 800;
  color: #2B2422;
  line-height: 1.2;
}

.vf-task-meta {
  font-size: 16px;
  color: var(--vf-ink-soft);
  line-height: 1.2;
}

.vf-task.is-done {
  background: linear-gradient(180deg, #F3FAF3 0%, #E7F2E7 100%);
  border-color: rgba(60, 130, 70, 0.28);
}

.vf-task.is-done .vf-task-art { opacity: 0.72; }

.vf-task-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2F7A3A;
  color: #fff;
  font-size: 19px;
  line-height: 34px;
  text-align: center;
  font-weight: 700;
}

/* 手机：三张图卡竖排，图在左、字在右，仍然一眼是图 */
@media (max-width: 640px) {
  .vf-task-grid { grid-template-columns: 1fr; gap: 12px; }

  .vf-task {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 12px 14px;
    gap: 14px;
  }

  .vf-task-art { width: 74px; height: 60px; flex: 0 0 auto; }

  .vf-task-name { font-size: 22px; }

  .vf-task-meta { font-size: 16px; }

  .vf-task-check { position: static; margin-left: auto; flex: 0 0 auto; }
}

/* ============================================================================
   ⑥ 首页：主视觉 + 「今天最该做」与「三件事」并排
   ========================================================================== */
.vf-top-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--vf-gap);
  align-items: stretch;
}

.vf-top-row > .today-three { height: 100%; }

/* 今日任务卡：图在左、字在右，只留一个主按钮 */
#content .today-task {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
}

.today-task-art {
  width: 128px;
  height: 128px;
  flex: 0 0 auto;
  object-fit: contain;
  display: block;
}

.today-task-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }

#content .today-task-badge {
  font-size: 16px;
  font-weight: 700;
  color: #8A3F0E;
  background: #FBEEE0;
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 8px;
}

#content .today-task-title {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 6px;
}

#content .today-task-how {
  font-size: 17px;
  line-height: 1.5;
  color: var(--vf-ink-soft);
  margin: 0 0 12px;
  -webkit-line-clamp: 1;
}

#content .today-task-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

#content .today-task-why {
  border: 0;
  background: none;
  /* 长者可用性硬线：可点区域 ≥54px。原来只有 40px 高（6px 内边距 + 16px 字），
     手指点不准、鼠标手抖也会滑出去。这里给 56 而不是 54 —— flex 里的 54 实测会
     被取整成 53.x，手机端那套按未取整值判定，仍然报"偏小"。 */
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 6px 4px;
  font: inherit;
  font-size: 16px;
  color: #7A5A3C;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

#content .dash-hero-greet { font-size: 42px; }

#content .dash-hero-cta-label { font-size: 21px; }

/* 手机：三张图卡竖排，图在左、字在右，仍然一眼是图 */
@media (max-width: 640px) {
  .vf-task-grid { grid-template-columns: 1fr; gap: 12px; }

  .vf-task {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 12px 14px;
    gap: 14px;
  }

  .vf-task-art { width: 74px; height: 60px; flex: 0 0 auto; }

  .vf-task-name { font-size: 22px; }

  .vf-task-meta { font-size: 16px; }

  .vf-task-check { position: static; margin-left: auto; flex: 0 0 auto; }
}

/* ============================================================================
   ⑦ 手机端整体收紧，但字号不缩
   ========================================================================== */
@media (max-width: 900px) {

  #content .card { padding: 20px 18px; border-radius: 24px; }

  #content .card-title { font-size: 23px; }

  #content .btn { min-height: 62px; font-size: 20px; }

  #content .btn-lg { min-height: 70px; font-size: 21px; }

  .illu-watermark { width: 150px; opacity: 0.36; }

  /* 手机：把「今天最该做」和「三件事」从并排容器里拆出来，
     顺序变成 今天最该做 → 三件事 → 大图，图和入口都在第一屏 */
  .vf-top-row { display: contents; }

  .vf-top-row > .today-task { order: 2; }
  .vf-top-row > .today-three { order: 3; }
  .dash-page > .dash-hero { order: 1; }
  .dash-page > .morning-entry { order: 4; }

  #content .today-task { gap: 14px; padding: 18px 16px; }

  .today-task-art { width: 86px; height: 86px; }

  #content .today-task-title { font-size: 26px; }

  #content .today-task-how { font-size: 16px; margin-bottom: 10px; }

  #content .today-task-why { font-size: 15px; }
}

@media (max-width: 380px) {
  .page-head { padding-right: 110px; }
  .page-head .vf-head-art { width: 98px; height: 84px; }
}

/* 减少动态效果时不做位移动画 */
@media (prefers-reduced-motion: reduce) {
  .vf-task { transition: none; }
  .vf-task:hover { transform: none; }
}

/* ============================================================================
   ⑧ 顶栏减字：去掉每个导航项后面重复的「更多 ▾」
   ----------------------------------------------------------------------------
   原来每个入口都是「图标 + 名称 + 更多 ▾」两块，顶栏一行 8 段文字。
   实测点击导航项本身就能展开子菜单（app.js 的 quicknav-item 绑了同一套逻辑），
   所以「更多 ▾」是纯重复，隐藏后子菜单仍可正常打开。
   ========================================================================== */
.quicknav-more { display: none !important; }

.quicknav-item {
  padding: 10px 20px;
  font-size: 20px;
}

/* ============================================================================
   ⑨ 手机端：图在最前，动作用大按钮
   ========================================================================== */
@media (max-width: 900px) {
  /* 大图排第一，任务卡第二，三件事第三 —— 先看见画面，再看见按钮。
     .today-task / .today-three 的 DOM 父节点是 .vf-top-row（display:contents），
     所以选择器要写 .vf-top-row > ，写成 .dash-page > 匹配不到。 */
  .dash-page > .dash-hero { order: 1; }
  .vf-top-row > .today-task { order: 2; }
  .vf-top-row > .today-three { order: 3; }
  .dash-page > .morning-entry { order: 4; }
  /* 剩下的块必须显式给 order，否则默认 0 会跑到大图前面 */
  .dash-page > .dash-focus { order: 5; }
  .dash-page > .dash-tiles-card { order: 6; }
  .dash-page > .board-detail { order: 7; }

  /* 老样式在窄屏把按钮拉成整行竖排，图文化版改回“按钮 + 文字链接”一行 */
  #content .today-task-actions { flex-direction: row; align-items: center; gap: 14px; }
  #content .today-task-actions .btn { width: auto; min-height: 64px; padding: 14px 26px; }

  #content .today-task-title { font-size: 27px; }

  /* 主视觉在手机上收一点高度，让下面的任务卡能露头 */
  #content .dash-hero { min-height: 0; }
}


/* ============================================================================
   ⑩ 带插画的「页首横幅」（营养方案、能力评估等页用的 .page-banner）
   ----------------------------------------------------------------------------
   手机上是两栏：图占 2 份、文字占 3 份。390px 下每栏只剩一百多像素，
   标题被挤成三行、按钮顶到图片上。改成「图在上、字在下」，
   文字只留标题与按钮，那句解释不显示。
   ========================================================================== */
@media (max-width: 640px) {
  .page-banner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .page-banner-art {
    aspect-ratio: 16 / 9;
    order: -1;
  }

  .page-banner-title {
    font-size: 24px;
    margin-bottom: 6px;
  }

  .page-banner-desc,
  .page-banner-points { display: none !important; }

  .page-banner-points { gap: 8px; }

  .page-banner-point { font-size: 16px; }

  .page-banner .btn { width: 100%; }
}


/* ============================================================================
   ⑪ 页首横幅再减字：长说明不显示，标题放大，只留短标签 + 按钮
   ========================================================================== */
.page-banner-desc { display: none !important; }

.page-banner-title {
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.page-banner-point {
  font-size: 17px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 900px) {
  .page-banner-title { font-size: 26px; }
}

/* ============================================================================
   ⑫ 手机端收尾：主视觉恢复高度、状态卡只留分数、提示框压成两行
   ========================================================================== */

@media (max-width: 900px) {
  /* 上一版把主视觉压到 min-height:0，结果照片被裁成一条天空，人物全没了。
     手机端给回一个固定的画面高度，图才立得住。 */
  #content .dash-hero { min-height: 430px !important; }

  /* 「（满分 100，分越高越容易摔倒）」在 390px 下要折三行，
     把状态卡撑成一块文字墙；手机上只留「68 分」和结论。 */
  /* 只藏风险分后面那句括号说明；「照护思路 / 跌倒风险」两个标签必须留着，
     否则只剩「68 分」，老人不知道这分数是什么。 */
  #content .dash-hero-chips .fs-12.text-2:last-child { display: none !important; }

  #content .dash-hero-greet { font-size: 34px !important; }

  /* 今日任务卡：图左、字右，按钮单独一行，避免中缝里塞三行字 */
  #content .today-task {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-areas:
      'art badge'
      'art title'
      'btn btn';
    gap: 6px 14px;
    align-items: center;
  }

  .today-task-art { grid-area: art; width: 92px; height: 92px; align-self: center; }
  #content .today-task-badge { grid-area: badge; justify-self: start; margin-bottom: 0; }
  #content .today-task-title { grid-area: title; margin: 0; font-size: 25px; }
  #content .today-task-how { display: none !important; }
  #content .today-task-actions {
    grid-area: btn;
    margin-top: 12px;
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }
  #content .today-task-actions .btn { width: auto; flex: 1 1 auto; }
  #content .today-task-why { font-size: 15px; white-space: nowrap; }

  /* 说明型提示框（例如「关于拍照识别」）在手机上经常是一屏字，压成两行 */
  #content .alert > div:last-child {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* 手机横幅里的按钮：文案长时会折成两行，把字缩到 18px 并允许整块更宽 */
@media (max-width: 900px) {
  .page-banner .btn {
    font-size: 18px !important;
    padding: 12px 16px !important;
    line-height: 1.25;
  }

  .page-banner-actions { gap: 10px; }
}


/* ============================================================================
   ⑬ 2026-11 手机端专项修复
   ----------------------------------------------------------------------------
   本节对应客户逐条提出的 6 个手机端问题 + 1 个电脑端问题：
     ① 「防跌倒优先」卡要第一眼看到（判断卡前置 + 理由只留一条）
     ② 免责声明那颗问号在鼠标悬停时抖动（见 components.js 的 hintTip）
     ③ 进页面第一屏必须看到内容（主视觉降高、页头让位）
     ④ 「计划」要同时看到运动 + 营养（新增 plan 页）
     ⑤ 陪伴页的输入框太大、挤掉聊天区（输入框收进聊天卡内部）
     ⑥ 底部「计划 / 我的」进错页面（新增 plan / me 两条路由）
     ⑦ 电脑版右上角状态框与卡片风格不搭（改成同材质玻璃胶囊）
   ========================================================================== */

/* ---------- ② 悬停打开的气泡不接收鼠标事件 ---------- */
.hint-bubble.is-hover {
  pointer-events: none !important;
}

/* ---------- ⑦ 主视觉状态条：白底方块 → 玻璃胶囊 ---------- */
.dash-hero-top .hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 30px -24px rgba(40, 24, 12, 0.62);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
  line-height: 1;
  white-space: nowrap;
}

.hero-chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--hero-chip-accent, #B85A22);
}

.hero-chip-label {
  font-size: 16px;
  font-weight: 600;
  color: #5B4A3C;
}

.hero-chip-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--hero-chip-accent, #2B2422);
}

.hero-chip-note {
  font-size: 16px;
  color: #6B5644;
}

/* ---------- ③ 手机：主视觉降高，把第一张内容卡露出来 ----------
   430px 的固定高度在 844 高的手机上还能看到任务卡，在 667 高的手机上
   首屏就只剩晚霞和问候 —— 客户说的「进来第一眼看不到东西」就是这一条。
   改成跟视口高度走（48vh，最小 280、最大 400），小屏自动收。 */
@media (max-width: 900px) {
  #content .dash-hero { min-height: clamp(280px, 48vh, 400px) !important; }

  .dash-hero-top .hero-chip {
    padding: 7px 12px 7px 10px;
    gap: 6px;
  }

  .hero-chip-label {
    /* 16px 是长者可用性审计的硬线（低于 16px 直接判红），手机上也不许缩 */
    font-size: 16px;
  }
  .hero-chip-value { font-size: 18px; }
  /* 手机上藏掉括号说明：两个胶囊要挤在一行里，68 分的方向由下面的判断卡讲 */
  .hero-chip-note { display: none; }
}

/* ---------- ① 「系统给您的判断」：整页第一张卡 ---------- */
.vf-judge {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(118deg, #FFF9F0 0%, #FFF3E4 100%);
}

.vf-judge-eyebrow {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #7A6653;
}

.vf-judge-title {
  font-size: clamp(32px, 2.6vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
}

.vf-judge-desc {
  font-size: 19px;
  line-height: 1.65;
  color: #5C4A38;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vf-judge-basis {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(184, 90, 34, 0.12);
}

.vf-judge-basis-label {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 700;
  color: #8A3F0E;
  background: #FBE3C9;
  border-radius: 999px;
  padding: 3px 10px;
}

.vf-judge-basis-text {
  flex: 1 1 160px;
  min-width: 0;
  font-size: 17px;
  line-height: 1.5;
  color: #4A3A2C;
}

.vf-judge-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* 报告头卡：手机上那句「一共六个小测试…」不显示，两个按钮并排不竖排 */
@media (max-width: 900px) {
  #content .vf-report-head .card-sub { display: none !important; }
  #content .vf-report-head .btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #content .vf-report-head .btn { min-height: 56px; font-size: 18px; padding: 10px 12px; }
  .vf-judge-title { font-size: 34px; }
  .vf-judge-desc { font-size: 18px; }
  .vf-judge-actions .btn { flex: 1 1 0; min-height: 60px; font-size: 18px; padding: 12px 10px; }
}

/* ---------- ② 免责声明收紧：一行说明 + 问号并排 ---------- */
#content .disclaimer {
  padding: 12px 16px;
  gap: 10px;
  align-items: center;
}

#content .disclaimer-title { font-size: 18px; }

#content .disclaimer-text { margin-top: 2px; }

#content .disclaimer .hint-tip {
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  width: 100%;
}

#content .disclaimer .hint-tip-summary {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 17px;
  line-height: 1.5;
}

#content .disclaimer .hint-btn {
  /* 54×54 是长者点按硬线（视觉审计按这条判红）。曾经为了"一行放下"压到 48，
     结果 6 个页面全被判红 —— 宁可让这一行换行，也不能把点按区做小。 */
  width: 54px;
  height: 54px;
  font-size: 25px;
  flex: 0 0 auto;
}

/* ---------- ⑤ 陪伴页：整页就是一张聊天卡，输入框钉在卡片底部 ---------- */
body[data-route="agent"] #content .page-head,
body[data-route="plan"] #content .page-head,
body[data-route="me"] #content .page-head { display: none !important; }

.chat-app {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: calc(100vh - 150px);
  height: calc(100dvh - 150px);
  min-height: 460px;
}

.chat-alert > div {
  padding: 9px 14px !important;
  font-size: 16px !important;
  border-radius: 14px !important;
}

.chat-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #FFFDF9;
  border: 1.5px solid rgba(184, 90, 34, 0.14);
  border-radius: 26px;
  box-shadow: 0 20px 46px -34px rgba(74, 46, 28, 0.6);
  overflow: hidden;
}

.chat-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(184, 90, 34, 0.10);
  background: #FFF8EF;
}

.chat-head-avatar img { width: 40px; height: 40px; display: block; }

.chat-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }

.chat-head-name { font-size: 20px; color: #2B2422; margin: 0; line-height: 1.3; }

.chat-head-state { font-size: 16px; color: #5B4A3C; }

.chat-head .btn { min-height: 54px; padding: 0 16px; font-size: 17px; }

.chat-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 14px 0;
}

.chat-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; }

.chat-scroll > div { margin-bottom: 14px; }

.chat-compose {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(184, 90, 34, 0.10);
  background: #FFFDF9;
}

.chat-compose .chat-input {
  flex: 1 1 auto;
  min-height: 56px;
  max-height: 132px;
  padding: 13px 14px;
  border-radius: 16px;
  resize: none;
  line-height: 1.5;
}

.chat-send {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 16px;
  font-size: 20px;
}

.chat-trace {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: #6B5644;
  background: rgba(184, 90, 34, 0.06);
  border-radius: 10px;
  padding: 6px 10px;
}

.chat-offline-note {
  flex: 0 0 auto;
  font-size: 14px;
  color: #7A6653;
  text-align: center;
}

@media (max-width: 900px) {
  .chat-app {
    /* 顶栏 90 + 内容内边距 36 + 底部导航 76 + 一点余量 */
    height: calc(100dvh - 210px);
    min-height: 380px;
  }

  .chat-body { padding: 8px 10px 0; }

  .chat-compose { padding: 8px 10px 10px; gap: 8px; }

  .chat-send { padding: 0 18px; font-size: 19px; }

  /* 气泡占满卡片宽度，头像缩一点，别让 40px 头像挤掉一行字 */
  .chat-scroll > div { gap: 8px !important; }
  .mascot-avatar { width: 34px !important; height: 34px !important; }
}

/* ---------- ④ 「计划」页：两张方案卡同屏 + 两份明细 ---------- */
.plan-hero {
  padding: 20px;
  border-radius: 28px;
  background: linear-gradient(120deg, #FFF7EA 0%, #FCE9D3 100%);
  border: 1px solid rgba(184, 90, 34, 0.14);
}

.plan-hero-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.plan-hero-title { margin: 0; font-size: 30px; font-weight: 800; color: #2B2422; }

.plan-hero-date { font-size: 16px; color: #7A6653; }

.plan-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.plan-pick {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1.5px solid rgba(184, 90, 34, 0.16);
  background: #FFFDF9;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.plan-pick:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -18px rgba(120, 70, 30, 0.45); }

.plan-pick-art { flex: 0 0 auto; width: 92px; height: 78px; }

.plan-pick-art img { width: 100%; height: 100%; object-fit: contain; display: block; }

.plan-pick-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.plan-pick-name { font-size: 24px; font-weight: 800; color: #2B2422; }

.plan-pick-sub { font-size: 16px; color: #6B5644; line-height: 1.3; }

.plan-pick-go { margin-left: auto; font-size: 22px; color: #B85A22; }

.plan-sec { scroll-margin-top: 96px; }

.plan-today {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #FFF6EA;
}

.plan-today-badge {
  align-self: flex-start;
  font-size: 15px;
  font-weight: 700;
  color: #8A3F0E;
  background: #FBE3C9;
  border-radius: 999px;
  padding: 4px 10px;
}

.plan-today-title { font-size: 26px; font-weight: 800; color: #2B2422; line-height: 1.2; }

.plan-today-meta { font-size: 17px; color: #6B5644; }

.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.plan-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #FFFDF9;
  border: 1px solid rgba(184, 90, 34, 0.12);
}

.plan-list-dot { width: 10px; height: 10px; border-radius: 50%; background: #B85A22; flex: 0 0 auto; }

.plan-list-text { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }

.plan-list-name { flex: 1 1 auto; min-width: 0; font-size: 20px; font-weight: 700; color: #2B2422; }

.plan-list-dose { flex: 0 0 auto; font-size: 16px; color: #6B5644; text-align: right; }

.plan-list-more { font-size: 16px; color: #7A6653; padding-left: 22px; }

.plan-meals { display: flex; flex-direction: column; gap: 8px; }

.plan-meal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #FFFDF9;
  border: 1px solid rgba(184, 90, 34, 0.10);
}

.plan-meal-icon { font-size: 22px; flex: 0 0 auto; }

.plan-meal-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }

.plan-meal-name { font-size: 16px; color: #7A6653; }

.plan-meal-dish { font-size: 20px; font-weight: 700; color: #2B2422; }

.plan-meal-kcal { font-size: 16px; color: #8A3F0E; font-weight: 700; flex: 0 0 auto; }

.plan-targets { display: flex; flex-wrap: wrap; gap: 10px; }

.plan-target {
  font-size: 17px;
  color: #4A3A2C;
  background: #FFF6EA;
  border-radius: 999px;
  padding: 6px 14px;
}

.plan-target.is-hint { background: transparent; color: #7A6653; padding-left: 2px; }

.plan-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .plan-hero { padding: 16px 14px; border-radius: 24px; }
  .plan-hero-title { font-size: 26px; }
  .plan-hero-date { font-size: 14px; }
  /* 手机上竖排，但两张卡都做成"图左字右"的矮卡：两张加起来 ~220px，
     首屏一眼就能看到运动 + 营养都排了。 */
  .plan-picks { grid-template-columns: 1fr; gap: 10px; }
  .plan-pick { padding: 10px 12px; gap: 12px; }
  .plan-pick-art { width: 72px; height: 60px; }
  .plan-pick-name { font-size: 22px; }
  .plan-pick-sub { font-size: 15px; }
  .plan-list-name { font-size: 19px; }
  .plan-list-dose { font-size: 15px; }
  .plan-actions .btn { flex: 1 1 0; min-height: 60px; font-size: 18px; padding: 12px 10px; }
}

/* ---------- ⑥ 「我的」个人中心 ---------- */
.me-head {
  display: flex;
  /* .card 的基础规则是 flex-direction: column，这里必须显式改回横排，
     否则头像、姓名、标签会竖着堆成三行（手机截图实测）。 */
  flex-direction: row;
  align-items: center;
  gap: 18px;
  background: linear-gradient(120deg, #FFF7EA 0%, #FCE9D3 100%);
}

.me-avatar {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, #D98444 0%, #B85A22 100%);
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  box-shadow: 0 12px 26px -16px rgba(120, 60, 20, 0.8);
}

.me-head-text { min-width: 0; }

.me-name { font-size: 32px; font-weight: 800; color: #2B2422; line-height: 1.15; }

.me-facts { font-size: 17px; color: #6B5644; margin-top: 4px; }

.me-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.me-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.me-stat {
  background: #FFFDF9;
  border: 1.5px solid rgba(184, 90, 34, 0.14);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 16px 32px -28px rgba(74, 46, 28, 0.55);
}

.me-stat-top { display: flex; align-items: center; gap: 8px; }

.me-stat-icon { font-size: 20px; }

.me-stat-label { font-size: 15px; color: #6B5644; font-weight: 600; }

.me-stat-value { font-size: 34px; font-weight: 800; color: #2B2422; line-height: 1.25; margin-top: 4px; }

.me-stat.is-danger .me-stat-value { color: #C0392B; }
.me-stat.is-ok .me-stat-value { color: #2F6F56; }

.me-stat-unit { font-size: 16px; font-weight: 600; color: #6B5644; margin-left: 4px; }

.me-stat-foot { font-size: 14px; color: #7A6653; margin-top: 2px; }

.me-links-title { font-size: 22px; font-weight: 800; color: #2B2422; margin: 0 0 12px; }

.me-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.me-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #FFFDF9;
  border: 1px solid rgba(184, 90, 34, 0.12);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.me-link:hover { border-color: rgba(184, 90, 34, 0.4); background: #FFF8F0; }

.me-link-icon { font-size: 26px; flex: 0 0 auto; }

.me-link-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }

.me-link-label { font-size: 20px; font-weight: 700; color: #2B2422; }

.me-link-sub { font-size: 14px; color: #6B5644; line-height: 1.35; }

.me-link-go { margin-left: auto; font-size: 20px; color: #B85A22; }

.me-logout { width: 100%; min-height: 60px; font-size: 19px; }

.me-foot { text-align: center; font-size: 13px; color: #8A7663; padding: 0 12px 8px; }

@media (max-width: 640px) {
  .me-head { gap: 14px; padding: 18px 16px; }
  .me-avatar { width: 68px; height: 68px; font-size: 30px; }
  .me-name { font-size: 27px; }
  .me-facts { font-size: 15px; }
  .me-stat { padding: 10px 10px 12px; border-radius: 16px; }
  .me-stat-value { font-size: 28px; }
  .me-stat-label { font-size: 13px; }
  .me-stat-icon { font-size: 16px; }
  .me-stat-foot { font-size: 12px; }
  .me-link-grid { grid-template-columns: 1fr; gap: 10px; }
  .me-link { padding: 12px; }
  .me-link-label { font-size: 19px; }
}

/* 手机竖版主视觉：图片元素本身高 591px，比 400px 的容器高，
   原来只按宽度铺、容器裁掉下半截，object-position 根本不生效 ——
   人物正好落在问候语玻璃条后面，"图里只剩一片天"。
   给元素补 height:100%，让它真正按 cover 裁切，人物就落在太阳与问候语之间。 */
@media (max-width: 620px) {
  .dash-page .dash-hero-img--tall {
    /* app.css 里有一条 `#content img { height: auto }`（ID 选择器），
       不加 !important 的话这里的 100% 会被它压掉，图片又变成 591px 高。 */
    height: 100% !important;
    object-position: 50% 48%;
  }
}

/* 计划页动作行：手机上"动作名"与"做多少"分两行，别挤在一行里各自折行 */
@media (max-width: 640px) {
  .plan-list-text { flex-direction: column; align-items: flex-start; gap: 2px; }
  .plan-list-name { flex: 0 0 auto; }
  .plan-list-dose { flex: 0 0 auto; text-align: left; }
}
