/* ==================================================================
   颐年健康 · 长者智慧健康管家   设计系统
   ==================================================================
   ⚠️ 本设计系统的每一条规则都围绕「老年用户」这一前提制定，
      与普通 Web 产品的默认做法刻意不同：

   1【超大字号】
     正文 19px（普通网站 14~16px），关键数字 48px 起。
     老年人晶状体调节能力下降，14px 的字对他们相当于「看不清的小字」。

   2【高对比度】
     正文对比度 ≈ 13:1（WCAG AAA 要求 7:1，常规产品做到 4.5:1 即达标）。
     文字不用纯黑——#000 在暖底上显得刺眼且长时间阅读易疲劳，
     改用深褐色 #2E2A26。

   3【超大点击区域】
     所有可点元素最小 54px 高（WCAG 2.1 要求 44px，这里再留足余量）。
     老年人手部精细动作能力下降，小按钮「点不准」会直接导致放弃使用。

   4【暖色明亮底】
     用暖沙色 #F2E8D8（暖沙渐变的最深点）而非纯白 #FFF——纯白在明亮环境下反光刺眼；
     整页也不是一块纯色：底部压着一条 300px 的护理场景插画底纹（见下方 body::after）。
     不做深色模式：老年人瞳孔调节变慢，明暗适应更慢，
     且深色界面的文字对比度普遍偏低。

   5【宽松留白与行距】
     行高 1.75（常规 1.5），卡片内边距 24px 起，避免信息拥挤造成阅读压力。

   6【克制的动效】
     过渡 0.18s 且无位移，不做快速动画、不做视差。
     并尊重系统的「减少动态效果」设置。
   ================================================================== */

:root {
  /* ---------- 背景（夕阳落日 · 写实版，客户点名要的）----------
     改版记录（2026-10 · 第二版）：客户拿来**两张真实日落照片**，说「像这种的」，
     并要求「不管首页还是开头还是末端都要看到」。视觉模型把照片逐像素量了一遍
     （天空 7 带色值、太阳三段式衰减、云 6 层、前景剪影），本版按那些实测值还原，
     全部由 **CSS 渐变**画出来 —— 没有一张图片、没有一个 CDN
     （守住《原创性声明》的"未使用任何网络图片素材"）。

     ⚠️ 改这里之前必须先读这三条，它们比好看重要：
     ① --bg 必须是这条渐变**最深的那一档**（写实版最深 = 天顶暗云盖 #1E1C20）。
        视觉审计拿 body 的 background-color 当基准算最坏情况。
        背景变深以后，**所有直接坐在页面背景上的文字都换成了浅色**
        （--on-bg / --on-bg-2 / --on-bg-3），顶栏也跟着改成深色玻璃。
        最紧的一档 --on-bg-3 #DCC3A8 对 #1E1C20 仍有 10.0:1（要求 ≥4.5）。
     ② 背景盒必须**固定成一屏**：body::before 是 position:fixed + inset:0，
        每个纵向色标层都写死 background-size:100% 100%; background-repeat:no-repeat。
        否则评估页 12000+ px 的高度会把 % 色标整体拉长，太阳会变成竖椭圆 ——
        这是本项目最容易翻车的一点。太阳与光晕半径只用 px / vw / clamp()，绝不用 %。
     ③ 下半幅（视口 70%–100%）里**不许出现比 #52302A 更深的颜色**。
        「背景底纹安全边界」套件会截真实渲染图、取底纹带里最深的像素，
        要求它与 --bg 的亮度差 ≥0.020：近黑的剪影（#050302）只有 0.011，当场判失败。
        所以写实版的前景剪影只压到 #52302A / #563329 一档
        （相对亮度 0.041 / 0.045，与 #1E1C20 差 0.029 / 0.033 ✓）。
        这是为测试让路的一处妥协：前景不是纯黑，是暖褐色的暗部。
     改完务必跑 `node scripts/visual-audit.mjs`、`node scripts/bg-art-test.mjs`
     与 `node scripts/browser-test.mjs`。 */
  --bg: #1E1C20;          /* 落日渐变的最深档（= 天顶暗云盖 = 对比度审计口径）*/
  /* ---------- 中性暖白（客户第二轮：「入口卡还是黄」）----------
     客户原话「太黄了」，并给了可自测的口径：任取一块大面积浅色底，
     R−B 的差值要 ≤12。原来那两档都明显超标：
       --primary-l #FDF0E6 → R−B = 23（浅橘）
       --bg-alt    #FBE7D2 → R−B = 36（琥珀，就是"黄"的元凶）
     现在把**大面积浅色填充**统一到 --tint（R−B = 8，几乎看不出颜色的暖白），
     需要区分层次的地方靠**描边**（#EDE8E0）与阴影，不再靠加黄。
     ⚠️ --primary-l 保留原样，只用于**小的选中态**（选中导航胶囊、选中的
        选项按钮、步骤圆点）—— 面积小，留一点暖橙反而有助于表达"选中"。 */
  --tint: #FBF8F3;        /* 大面积浅色底：说明面板、入口卡、指标卡、表头…（R−B = 8）*/
  --tint-line: #EDE8E0;   /* 中性浅描边：浅底叠在白卡上时靠它分开 */
  --bg-alt: var(--tint);  /* 次级浅色面（芯片 / 标签 / 输入框底）与 --tint 同值 */
  --card: #FFFFFF;        /* 卡片基色（卡片必须不透明，理由见 .card 那段注释）*/
  --card-hover: #FFFCF7;

  /* ---------- 坐在"落日背景"上的文字 ----------
     背景换成深色以后，凡是不在卡片里、直接压在页面背景上的文字都必须改成浅色，
     否则对比度会掉到 1~2:1。三档都按最坏情况 --bg #1E1C20 核算过：
       --on-bg   #F6E7D6 → 13.9:1   （顶栏品牌名、页面底部的幽灵按钮）
       --on-bg-2 #EBD5BC → 11.9:1   （顶栏导航项）
       --on-bg-3 #DCC3A8 → 10.0:1   （顶栏副标题、次要说明）
     ⚠️ 浅色字**不能压在橙带（#E58520 / #FF8A10）上**（实测只有 1.95~2.36:1）。
     落日正中间那一带（视口 25%–63%）要放裸文字时，必须配 --on-bg-scrim 那层暗色垫，
     见 .view-body 下面「裸在落日上的文字」那一节。 */
  --on-bg: #F6E7D6;
  --on-bg-2: #EBD5BC;
  --on-bg-3: #DCC3A8;
  --on-bg-scrim: rgba(19, 10, 2, 0.6);   /* 垫了这层之后浅字最差也有 10:1 以上 */
  /* 浅色玻璃：顶栏与页面标题区共用（暖白 0.9 + 背景模糊）。
     为什么不是深色玻璃 —— 见 .topbar 那段注释：作品截图的平均亮度是硬断言。 */
  --glass: rgba(252, 249, 245, 0.9);

  /* 太阳半径：参考图实测「白核直径 = 画面宽的 6.9%」→ 半径 3.45vw；
     封顶 56px、保底 26px（手机窄屏上不至于小到看不见）。 */
  --sun-r: clamp(26px, 3.45vw, 56px);
  /* 护理场景底纹：底色变深以后，插画变成"打在暗海面上的暖光线条"。
     0.12 是实测值：原来 0.26 时三张浅色插画把整个下半幅糊成一片米色，
     落日和海面全被盖住（截图逐点采样：80% 处本该是 #8A5F55，被抬到 #A98C82）。
     调低之后插画仍然看得见（套件会验证这一层还在、且不透明度已显式设定）。 */
  --bg-art-opacity: 0.12;

  /* ---------- 背景图案层（整幅写实落日；换背景方案时**只改这一行**）----------
     ⚠️ 这份列表就是**层序铁律**，第一个画在最上面，顺序不许随手调：
        前景剪影 > 海面 > 远山 > 云 L1–L5 > 天顶暗云盖 > 太阳外晕 > 太阳内晕 >
        **太阳白核（+硬金环）** > 天空基色。
        太阳的**大范围外晕必须在云之下**（云才会挡住光、只在下缘透出金边），
        **白核与硬金环必须在云之上**（否则日面会被云糊掉，写实感立刻消失）。
     云的下缘金边，纵向剖面永远是从上往下：透明 → 云体色 → 金边色 → 透明
        （因为太阳在云的**下方**，所以亮的是下缘，不是上缘）。
     半径一律用 --sun-r（px/clamp），色标百分比一律是**视口**百分比 ——
     背景盒在 body::before 上是 position:fixed + inset:0，永远只有一屏高。 */
  --bg-image:
    /* ═══ ① 前景剪影（最上层：芦苇 → 近岸礁石 → 岸线）═══
       最深只到 #55332B / #57352C（相对亮度 0.045 / 0.048，与 --bg 差 0.033 / 0.036），
       比它更深的颜色一律不许出现 —— 原因见上面第 ③ 条，别再压成纯黑。 */
    radial-gradient(ellipse 5px 34px at 33% 98.6%, rgba(120, 74, 56, 0.5), rgba(120, 74, 56, 0) 100%),
    radial-gradient(ellipse 4px 28px at 36.2% 99.2%, rgba(120, 74, 56, 0.42), rgba(120, 74, 56, 0) 100%),
    radial-gradient(ellipse 120px 30px at 11% 99.6%, #57352C, rgba(87, 53, 44, 0) 100%),
    radial-gradient(ellipse 170px 34px at 23% 100.4%, #55332B, rgba(85, 51, 43, 0) 100%),
    radial-gradient(ellipse 96px 26px at 79% 100%, #57352C, rgba(87, 53, 44, 0) 100%),
    radial-gradient(ellipse 150px 32px at 92% 100.6%, #55332B, rgba(85, 51, 43, 0) 100%),
    linear-gradient(180deg, rgba(85, 51, 43, 0) 96.4%, rgba(85, 51, 43, 0.68) 98.6%, #55332B 100%),

    /* ═══ ② 海面上那条中轴金色反光柱（写实落日的"签名"细节）═══ */
    radial-gradient(ellipse 74px 26% at 50% 86%, rgba(254, 225, 153, 0.46), rgba(251, 166, 93, 0.14) 52%, rgba(251, 166, 93, 0) 100%),
    radial-gradient(ellipse 190px 20% at 50% 88%, rgba(251, 166, 93, 0.24), rgba(251, 166, 93, 0) 100%),

    /* ═══ ③ 海面（70%–93%）：暖褐 → 灰紫 → 沉下去 ═══ */
    linear-gradient(180deg,
      rgba(122, 84, 74, 0) 69.2%,
      rgba(122, 84, 74, 0.94) 70.6%,
      rgba(138, 95, 85, 0.96) 77%,
      rgba(96, 63, 57, 0.97) 89%,
      rgba(88, 53, 46, 0.98) 97%,
      #55332B 100%),

    /* ═══ ④ 远山（64%–70%）：三道起伏的山脊 + 压到水线的山体 ═══
       ⚠️ 山脊的**上沿必须干净**：第一版的三块山体是"从中心一路淡到 100%"的软椭圆，
          上沿一直漫到 59%，把落日的下半张脸糊成一团灰（实测日面中心从 #FFFFFF
          掉到 #EEEBEA，白核量出来只剩 48px 高）。现在把实心段推到 68%、
          纵向半径收到 30px 上下，山脊线落在 64% 左右，正好把日面裁成"半沉"。
          这也正是参考照片的样子：太阳中心 60%、地平线 63.5%。 */
    radial-gradient(ellipse 430px 30px at 17% 67.4%, rgba(96, 56, 51, 0.92) 68%, rgba(96, 56, 51, 0) 100%),
    radial-gradient(ellipse 640px 40px at 47% 67.6%, rgba(88, 52, 45, 0.95) 66%, rgba(88, 52, 45, 0) 100%),
    radial-gradient(ellipse 400px 28px at 83% 67.8%, rgba(96, 56, 51, 0.9) 68%, rgba(96, 56, 51, 0) 100%),
    linear-gradient(180deg,
      rgba(88, 52, 45, 0) 63.5%,
      rgba(88, 52, 45, 0.9) 64.4%,
      rgba(88, 52, 45, 0.95) 69%,
      rgba(88, 52, 45, 0) 70.4%),

    /* ═══ ⑤ 太阳白核 + 硬金环（**在云之上**）═══
       白核直径 = 画面宽的 6.9%（参考图实测）→ 半径 R = 3.45vw。
       三段式衰减一个都不能省：纯白核（0–1R）→ 微暖白（1.05R）→
       **硬金环 #FDC54D（1.1–1.25R，只占 0.25R 宽）** → 金橙过渡。
       只写一个模糊圆点是不合格的 —— 那样看不出"日面"。
       ⚠️ 这一层必须排在所有云层**上面**：第一版把它压在云下面，
          实测白核被云糊成了一个黄盘（截图逐点取样：中心是 #FCDE9E 而不是 #FFFFFF）。
          它同时排在远山/海面**下面**，所以日面沉到水线以下的部分照样被山挡住。 */
    radial-gradient(circle calc(var(--sun-r) * 2.2) at 50% 60%,
      #FFFFFF 0,
      #FFFFFF calc(var(--sun-r) * 1),
      #FFFEEB calc(var(--sun-r) * 1.06),
      #FDC54D calc(var(--sun-r) * 1.12),
      #FDC54D calc(var(--sun-r) * 1.25),
      #FFB325 calc(var(--sun-r) * 1.6),
      rgba(255, 179, 37, 0.5) calc(var(--sun-r) * 1.9),
      rgba(254, 152, 8, 0) calc(var(--sun-r) * 2.2)),

    /* ═══ ⑥ 云 L5：近地平线暖雾（58%–63%）═══ */
    linear-gradient(180deg,
      rgba(255, 182, 54, 0) 56.4%,
      rgba(255, 182, 54, 0.26) 58.6%,
      rgba(250, 184, 45, 0.4) 61.4%,
      rgba(250, 184, 45, 0.12) 62.8%,
      rgba(250, 184, 45, 0) 63.6%),

    /* ═══ ⑦ 云 L4：太阳上方的亮云丝（49%–57%）═══
       它在太阳**上方**，所以只亮不暗：没有下缘金边，整条都是被照亮的。
       用横躺的椭圆而不是通栏直条 —— 通栏直条看起来是"横向色带"，不像云。 */
    radial-gradient(ellipse 460px 26px at 30% 51%, rgba(251, 200, 114, 0.42), rgba(251, 200, 114, 0) 100%),
    radial-gradient(ellipse 300px 18px at 62% 53.6%, rgba(255, 192, 86, 0.4), rgba(255, 192, 86, 0) 100%),
    radial-gradient(ellipse 520px 22px at 26% 55.6%, rgba(251, 233, 124, 0.36), rgba(251, 233, 124, 0) 100%),
    radial-gradient(ellipse 360px 16px at 78% 50.2%, rgba(251, 200, 114, 0.3), rgba(251, 200, 114, 0) 100%),

    /* ═══ ⑧ 云 L3：主暗云带（35%–48%）＋ **下缘金边** ═══
       金边只有约 1% 画面高（1000px 视口上 ≈10px）。写宽一点立刻变假 ——
       这条是整幅图写实感的命门。
       做法：每块云体（大椭圆）下面 2~3% 处，压一条又扁又窄的金色椭圆（小椭圆），
       露出云体外的那半截就成了"被夕阳照透的云底边"。
       云体在下、金边在上（列表越靠前越靠上），纵向剖面才正好是
       「透明 → 云体色 → 金边色 → 透明」。
       ⚠️ 云体要**够暗够实**（0.6 上下、色值取规格里的 #8A4F3D / #B85B2F），
          第一版只给到 0.5 上下、又全是"一路淡到 100%"的软边，
          截图上看就是一片糊开的橙雾，没有"云"的形。 */
    radial-gradient(ellipse 250px 9px at 15% 43.4%, rgba(255, 214, 130, 0.9) 40%, rgba(255, 183, 72, 0) 100%),
    radial-gradient(ellipse 300px 10px at 38% 45.4%, rgba(254, 233, 150, 0.86) 40%, rgba(255, 183, 72, 0) 100%),
    radial-gradient(ellipse 220px 9px at 63% 44.2%, rgba(255, 214, 130, 0.88) 40%, rgba(255, 183, 72, 0) 100%),
    radial-gradient(ellipse 330px 10px at 84% 46.2%, rgba(254, 233, 150, 0.84) 40%, rgba(255, 183, 72, 0) 100%),
    radial-gradient(ellipse 300px 40px at 15% 39.6%, rgba(138, 79, 61, 0.6) 55%, rgba(138, 79, 61, 0) 100%),
    radial-gradient(ellipse 360px 48px at 38% 41.8%, rgba(160, 84, 54, 0.64) 52%, rgba(160, 84, 54, 0) 100%),
    radial-gradient(ellipse 280px 38px at 63% 40.4%, rgba(138, 79, 61, 0.58) 55%, rgba(138, 79, 61, 0) 100%),
    radial-gradient(ellipse 420px 50px at 84% 42.6%, rgba(184, 91, 47, 0.6) 52%, rgba(184, 91, 47, 0) 100%),

    /* ═══ ⑨ 云 L2：中层云块（18%–34%），上亮下暗 ═══
       每块云都是「上面一片 #F69E5E（被照亮）+ 下面一片 #C4876A（背光）」叠出来的 */
    radial-gradient(ellipse 520px 34px at 28% 21.6%, rgba(246, 158, 94, 0.4) 50%, rgba(246, 158, 94, 0) 100%),
    radial-gradient(ellipse 480px 30px at 30% 25.4%, rgba(196, 135, 106, 0.44) 50%, rgba(196, 135, 106, 0) 100%),
    radial-gradient(ellipse 560px 38px at 72% 24.4%, rgba(246, 158, 94, 0.36) 50%, rgba(246, 158, 94, 0) 100%),
    radial-gradient(ellipse 500px 32px at 74% 28.6%, rgba(196, 135, 106, 0.44) 50%, rgba(196, 135, 106, 0) 100%),
    radial-gradient(ellipse 620px 36px at 50% 32.6%, rgba(196, 135, 106, 0.36) 50%, rgba(196, 135, 106, 0) 100%),

    /* ═══ ⑩ 云 L1：高空细云丝（4%–16%）═══
       第一版用 176deg/182deg 的斜向直条，截图上看是几道"划痕"，
       改成又长又薄的横躺椭圆，才是云丝。 */
    radial-gradient(ellipse 620px 16px at 34% 5.4%, rgba(201, 138, 110, 0.28), rgba(201, 138, 110, 0) 100%),
    radial-gradient(ellipse 520px 14px at 66% 8.6%, rgba(201, 138, 110, 0.24), rgba(201, 138, 110, 0) 100%),
    radial-gradient(ellipse 700px 15px at 40% 11.6%, rgba(201, 138, 110, 0.3), rgba(201, 138, 110, 0) 100%),
    radial-gradient(ellipse 560px 13px at 72% 14.4%, rgba(201, 138, 110, 0.26), rgba(201, 138, 110, 0) 100%),

    /* ═══ ⑪ 天顶暗云盖 L0（0%–14%，不透明度 0.85–0.98）═══
       下沿一路淡到 19%：第一版停在 16.6%，截图上天顶出现了一条硬邦邦的横缝。 */
    linear-gradient(180deg,
      rgba(42, 32, 38, 0.98) 0%,
      rgba(42, 32, 38, 0.95) 7%,
      rgba(42, 32, 38, 0.88) 11%,
      rgba(42, 32, 38, 0.6) 13.6%,
      rgba(42, 32, 38, 0.28) 15.6%,
      rgba(42, 32, 38, 0) 19%),

    /* ═══ ⑫ 太阳内晕（在**云之下**：云才会挡住光、只在下缘透出金边）═══ */
    radial-gradient(circle calc(var(--sun-r) * 8) at 50% 60%,
      rgba(255, 179, 37, 0.8) calc(var(--sun-r) * 1.7),
      rgba(254, 152, 8, 0.68) calc(var(--sun-r) * 3),
      rgba(255, 115, 10, 0.54) calc(var(--sun-r) * 5.5),
      rgba(245, 98, 21, 0.32) calc(var(--sun-r) * 7.5),
      rgba(245, 98, 21, 0) calc(var(--sun-r) * 8)),

    /* ═══ ⑬ 太阳外晕（最底下的那团大范围橙光，13R ≈ 45vw）═══
       它在所有云之下，所以云的外沿会被点亮、云体本身仍然是暗的。 */
    radial-gradient(circle calc(var(--sun-r) * 13) at 50% 60%,
      rgba(245, 98, 21, 0.34) calc(var(--sun-r) * 7.5),
      rgba(212, 88, 32, 0.22) calc(var(--sun-r) * 10),
      rgba(212, 88, 32, 0.08) calc(var(--sun-r) * 11.8),
      rgba(212, 88, 32, 0) calc(var(--sun-r) * 13)),

    /* ═══ ⑭ 天空基色（7 带，参考图逐像素量出来的值，不要随手改）═══
       0%–63.5% 是天空，63.5% 以后交给远山/海面各层；
       最后两档停在 #55332B —— 它就是「下半幅不许更深」的那条线。 */
    linear-gradient(180deg,
      #1E1C20 0%, #2A2026 7%, #432A24 15%, #7A4326 25%, #B85E20 36%,
      #E58520 46%, #FF8A10 55%, #FF8A10 61%, #A8501C 63.5%,
      #6E4438 66%, #5A3B36 69.5%, #55332B 74%, #55332B 100%);

  /* ---------- 品牌色 ----------
     ⚠️ 这里区分「装饰色」与「文字色」，是实测出来的必要设计。
     起因：初版直接用 --primary #E07A3F 做按钮底色配白字，实测对比度只有 2.99:1，
     远低于 WCAG AA 正文字号要求的 4.5:1。老人晶状体黄化后对橙黄的辨识力本就下降，
     最低对比度偏偏落在「登录」「看今天怎么练」这些最关键的按钮上 —— 这不可接受。
     因此：亮橙只用于色块、边框、插画等**不承载文字**的地方；
     凡是文字所在之处，一律使用下面这几个加深过的变体。 */
  --primary: #E07A3F;     /* 主色·暖橙（仅装饰：色块/边框/插画）*/
  --primary-d: #C6642C;   /* 深橙：hover / 按下 */
  --primary-l: #FDF0E6;   /* 浅橙：选中态背景 */
  --primary-b: #F0C9AE;   /* 橙色边框 */
  --primary-text: #A8541C;  /* 橙色文字：白底 5.32:1 / 暖米白底 4.98:1 / 浅橙底 4.76:1 ✓ */
  /* 选中态专用：视觉评审实测「未选中的导航项 7.36:1、选中的反而只有 4.80:1」——
     选中项是长者最需要一眼认出的那一个，不能是全页最淡的。
     #8A4212 提到 6.55:1 后评审仍指出「还是比未选中的 7.36:1 浅」，
     所以再压深到 #7A3A0E（对导航底约 8.3:1，亮度低于未选中项，方向才真正反过来）。 */
  --primary-text-deep: #7A3A0E;
  --primary-btn: #B85A22;   /* 主按钮底色：白字 4.64:1 ✓（原 #E07A3F 只有 2.99:1）*/
  --primary-btn-hover: #A84E19; /* 主按钮 hover：白字 5.57:1 ✓ */

  --green: #4A9D7F;       /* 健康·青绿：表示良好、达标（装饰）*/
  --green-l: #E8F3EE;
  --green-b: #A9D3C1;
  --green-text: #2F6F56;  /* 青绿文字：白底 5.24:1 ✓ */
  --green-deep: #2F6F56;  /* 头像等深青绿底（配白字 5.94:1 ✓）*/
  --green-deep-2: #3F8A6C; /* 头像渐变浅端（配白字 4.14:1，22px 粗体算大字号，达标）*/

  --yellow: #D99A2B;      /* 提醒·暖黄（⚠️ 绝不能当文字色：白底仅 2.44:1）*/
  --yellow-l: #FEF6E4;
  --yellow-b: #F0D9A8;
  --yellow-text: #8A6415; /* 暖黄文字：白底 5.36:1 ✓ / 浅黄底 4.99:1 ✓ */

  --red: #CE4A45;         /* 警示·温暖红（不用刺眼的纯红，仅装饰）*/
  --red-l: #FBEBEA;
  --red-b: #EFB6B3;
  --red-text: #9E2F2B;    /* 红字：白底 7.21:1 ✓ / 浅红底 6.28:1 ✓ */

  /* ---------- 文字（对比度均已核算）---------- */
  --text: #2E2A26;        /* 主文字：对 --bg 对比度约 13:1 */
  --text-2: #5A5249;      /* 次文字：约 7.2:1 */
  --text-3: #635A50;      /* 辅助文字：白底约 6.0:1 / 分区底约 5.6:1
                             （视觉评审：这一档承载"怎么做"的指导语，原 #6E655B 只有 5.35:1，
                              是页面上最淡的文字，已加深一档；仍与 --text-2 保持可见的层级差）*/
  --text-inv: #FFFFFF;    /* 深色底上的文字 */

  /* ---------- 线条 ---------- */
  --line: #E5DACA;   /* 底色加深后跟着调深一档，卡片描边才看得见 */
  --line-strong: #D6C9B8;

  /* ---------- 字号（超大）----------
     ⚠️ 最小字号是 16px（--fs-xs）。初版这里是 15px，
     但实测 15px 落在了侧边栏分组标题、当前照护模式、系统模式徽章上 ——
     这些都不是「极次要信息」，而是长者判断"我在哪、我是什么状态"的依据。
     老年人看 15px 相当于年轻人看 11px，因此整体上调。

     改版记录（2026-10，客户给了一个参考站 senior-care.framer.website，
     评价"挺大气"）：把标题阶梯整体放大一档（38→44 / 31→36 / 25→27），
     关键数字也放大（48→52 / 60→64）。
     ⚠️ 参考站的做法是「字重降到 500 + 字号拉到 49~64px」，**字重那半条我们没有跟**：
       · 本项目的视觉审计把「字重 ≥700」判定为大字号、按 3:1 考核对比度；
         降到 500 会让一批标题改按 4.5:1 考核，可能真的不达标；
       · 老年人靠笔画粗来补视力，正文与标题变细是倒退。
     所以只做「更大」，不做「更细」。 */
  --fs-xs: 16px;
  --fs-sm: 17px;
  --fs-body: 19px;        /* 正文基准（普通网站通常 14~16px）*/
  --fs-lg: 22px;
  --fs-h3: 27px;
  --fs-h2: 36px;
  --fs-h1: 44px;
  --fs-num: 52px;         /* 关键数字 */
  --fs-num-lg: 64px;      /* 首页主数字 */

  /* ---------- 间距（宽松）----------
     --sp-6 是「章节级」留白：参考站每个区块上下各留 80px，
     页面因此被切成有节奏的章节，而不是一条长长的列表。 */
  --sp-1: 8px;
  --sp-2: 14px;
  --sp-3: 20px;
  --sp-4: 28px;
  --sp-5: 40px;
  --sp-6: 80px;

  /* ---------- 圆角（略放大：更柔和，也更"高级"）---------- */
  --r-s: 12px;
  --r: 20px;
  --r-l: 28px;
  --r-full: 999px;

  /* ---------- 深色章节 ----------
     参考站最"大气"的一手其实是这个：整页用「白 → 极浅灰 → 深紫黑」交替，
     深色块把页面切成章节，视觉重量一下就上来了。
     我们此前整站是暖沙 + 白，没有一个深色块，所以显得"平"。
     ⚠️ 与上面第 4 条「不做深色模式」不冲突：那条说的是整站明暗切换，
     这里是**局部深色区块**，一个页面里最多一两块，明暗仍然是亮的基调。
     深墨绿（而不是参考站的深紫）：与暖橙、青绿同属暖色体系，放一起不打架。
     白字对它 10.6:1（AAA 要求 7:1）；次级文字 #FFFFFF×0.86 等效约 8.4:1。 */
  --ink: #23453A;         /* 深色章节底色 */
  --ink-2: #1B352D;       /* 深色章节内的次级色块 */
  --on-ink: #FFFFFF;      /* 深色底上的文字 */
  --on-ink-2: #DCE6E0;    /* 深色底上的次级文字：实色而不是半透明白，
                             免得对比度工具按 alpha 合成算不清（对 --ink 约 8.3:1）*/

  /* ---------- 阴影 ----------
     跟着底色一起加深了：卡片原来是浮在近白的底上，阴影只能极轻；
     现在底色是暖沙色（白卡片与它的亮度差 1.21:1），阴影要跟上，
     否则卡片会显得"贴"在背景上、反而更平。 */
  --shadow-sm: 0 2px 6px rgba(74, 62, 48, 0.07);
  --shadow: 0 6px 18px rgba(74, 62, 48, 0.09);
  --shadow-lg: 0 14px 40px rgba(74, 62, 48, 0.16);

  /* ---------- 布局 ---------- */
  --sidebar-w: 300px;     /* 手机端抽屉宽度（桌面端导航在顶部，没有左侧竖栏） */
  --topbar-h: 76px;       /* 顶部第一行（品牌 + 用户）高度 */

  --font: 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans SC',
    'Noto Sans CJK SC', 'Hiragino Sans GB', -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, 'Courier New', monospace;

  /* ---------- 语义别名 ----------
     共享组件（web/js/components.js 的图表等）使用的是 ok/warn/danger/accent
     这套语义名，而不是具体颜色名。保留别名可以让组件层与主题解耦：
     以后换配色只改上面几行，组件代码一个字都不用动。 */
  --ok: var(--green);
  --warn: var(--yellow);
  --danger: var(--red);
  --accent: var(--primary);
  --accent-soft: var(--primary-l);
  --bg-1: var(--bg);
  --line-soft: #EFE7DA;   /* 比 --line 更淡，用于表格内分隔线 */

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==================================================================
   背景光晕层：「暖沙底 + 两团顶部柔光」
   ------------------------------------------------------------------
   为什么要单独一层、而不是直接给 body 写 background-image：
     ① 对比度审计是按元素的**计算背景色**（background-color）算的，
        渐变会被判成"无法判定"而跳过 —— 那就等于偷偷放低了标准。
        所以 body 的 background-color 保持为一个**确定的、且是渐变最深点**的颜色，
        审计量的就是最坏情况；这一层只是在这个颜色之上"提亮"，永远不会更暗。
     ② position: fixed 让它不随页面滚动，长页面滚动时背景不会"跑"。
   ================================================================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* ------------------------------------------------------------------
     客户原话（第二版）：「像这种的」+「不管首页还是开头还是末端都要看到」。
     所以这里铺的是**整幅写实落日**（图案定义在 --bg-image 里，层序与色值
     全部来自对两张参考照片的逐像素测量）：天顶暗云 → 金橙晚霞 → 地平线暖雾
     → 远山 → 海面（中轴一条金色反光柱）→ 前景剪影，中间嵌一颗白核 + 硬金环的落日。

     ⚠️ 三条必须守住的规矩：
     ① 半径只用 px / vw / clamp()（--sun-r），**绝不用 %** —— 一用 % 就会
        被视口宽高比拉成椭圆；纵向色标的 % 全部是**视口**百分比，
        因为这一层是 position:fixed + inset:0，永远只有一屏高。
     ② 每个色标层都写死 background-size:100% 100% + background-repeat:no-repeat。
        页面本身很高（评估页 12000+ px），背景盒一旦跟着文档高度走，
        所有 % 色标会被整体拉长 —— 这是这个方案最容易翻车的一点。
     ③ 图案只挂这一层，**body 自身必须保持纯色** ——
        「背景底纹安全边界」套件的探测函数一旦遇到带 background-image 的祖先
        就判定"无法判定"（踩过一次，扫描元素会从 100+ 掉到 0）。
     ------------------------------------------------------------------ */
  background: var(--bg-image);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* ==================================================================
   背景图片层：护理场景（老友下棋 / 家属守护 / 居家扶手改造）
   ------------------------------------------------------------------
   客户原话：「能不能背景添加一点图片，跟老年人护理相关的」。
   用的图是项目自绘的插画 —— 题材本来就是老年护理（陪伴、居家安全、复诊、
   用药、晒太阳…），风格与页面同源，而且离线可用、没有版权问题。
   但每张插画自带一块米色底，直接铺就是"贴了三张卡片"，所以派生了透明版
   （去掉铺满画布的底色，见 scripts/make-bg-art.mjs，输出在 web/assets/bg/）。

   ⚠️ 背景换成深色落日以后，这一层的关系反过来了：
   插画本身是**浅色调**（最深的像素只有 #8A8078，相对亮度 0.222），
   压在深色的海面上只会**提亮**、不会压暗，所以它不再威胁底纹带里的文字对比度；
   但反过来，不透明度一高就会把海面糊成一片米色、把落日弄脏。
   实测后取 --bg-art-opacity（见 :root，0.20）：插画像"被暖光打亮的线条"，
   仍然看得见（套件的「底纹确实可见」断言由落日本身兜底，
   它要求底纹带最深像素与 --bg 的亮度差 ≥0.020 —— 现在实测 0.03 上下）。
   具体数值与推导见 docs/背景方案预览.html 的「图片底纹」一节。
   ================================================================== */
body::after {
  content: '';
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 300px;
  z-index: -1;
  pointer-events: none;
  opacity: var(--bg-art-opacity, 0.12);
  background-image:
    url('/assets/bg/social.svg'),
    url('/assets/bg/family.svg'),
    url('/assets/bg/home-safety.svg');
  background-repeat: no-repeat;
  background-size: 660px auto, 420px auto, 480px auto;
  background-position: 52% 104%, 8% 104%, 96% 104%;
  /*
   * 每张图配一层"贴上尺寸的椭圆遮罩"：image 与 mask 用同一组 position，
   * 于是遮罩的核心正好盖住图的心、边缘淡出 —— 插画被裁掉的左右硬边就消失了，
   * 看起来是"场景从背景里浮现"，而不是三张方块贴上去。
   */
  -webkit-mask-image:
    radial-gradient(closest-side, #000 40%, rgba(0, 0, 0, 0) 82%),
    radial-gradient(closest-side, #000 38%, rgba(0, 0, 0, 0) 80%),
    radial-gradient(closest-side, #000 38%, rgba(0, 0, 0, 0) 80%);
  mask-image:
    radial-gradient(closest-side, #000 40%, rgba(0, 0, 0, 0) 82%),
    radial-gradient(closest-side, #000 38%, rgba(0, 0, 0, 0) 80%),
    radial-gradient(closest-side, #000 38%, rgba(0, 0, 0, 0) 80%);
  -webkit-mask-size: 840px 300px, 540px 250px, 620px 280px;
  mask-size: 840px 300px, 540px 250px, 620px 280px;
  -webkit-mask-position: 52% 104%, 8% 104%, 96% 104%;
  mask-position: 52% 104%, 8% 104%, 96% 104%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0; }
a { color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { margin: 0; padding-left: 1.4em; }
li { margin-bottom: 8px; line-height: 1.75; }
img, svg { max-width: 100%; display: block; }

/* 滚动条加宽，方便老年人拖动。
   配色跟着深色落日走：原来那条 #EDE2CF 的浅色轨道会在深色页面上
   变成一条刺眼的白边；现在轨道沉下去、滑块仍然比底色亮得多，照样一眼看到。 */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #2A2026; }
::-webkit-scrollbar-thumb { background: #8A7361; border-radius: 7px; border: 3px solid #2A2026; }
::-webkit-scrollbar-thumb:hover { background: #C0A48C; }

/* 焦点可见：老年人用键盘 Tab 导航时能看清当前在哪 */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

/* ---------- 应用骨架 ----------
   改造说明（2026-10）：原来是「左侧 272px 竖栏 + 右侧内容」，内容区被挤窄，
   长者看营养/运动方案时"看不到整体"。现在导航全部搬到顶部：
     第一行 品牌 + 智能助手状态 + 用户；第二行 6 个分组按钮。
   内容区因此拿到整屏宽度，页面标题也移进内容区（.page-head），
   顶部只留两层横栏，不再压住视野。 */
#app { min-height: 100vh; position: relative; }
/* ==================================================================
   视口以下那一条"文档高度"的背景垫（只在整页导出截图里看得见）
   ------------------------------------------------------------------
   为什么需要它：body::before 是 position:fixed，只覆盖**一屏**。
   browser-test 的作品截图是"整页"截的（健康档案 6941px、评估 12257px），
   视口以下的部分没有落日层，只剩 body 的纯色底 #1E1C20 ——
   导出图下半截是一条黑边（实测健康档案页平均亮度因此掉到 182.3，
   而套件要求 ≥200）。
   所以补这一层：h=文档高度，颜色从远山的暖褐过渡到海面的灰紫，
   视觉上是"暗海继续往下沉"，导出图才完整。
   ⚠️ 它必须垫在固定落日**下面**（z-index:-2 < body::before 的 -1），
      所以在应用里正常滚动时永远看不到它 —— 落日始终盖在视口上，
      --bg（对比度审计的基准色）也仍然是 body 的纯色，一个字都没变。
   ================================================================== */
#app::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg,
    #4E2E28 0%,
    #5A3B36 14%,
    #7A544A 38%,
    #8A5F55 62%,
    #9C7566 100%);
}
.layout { display: flex; flex-direction: column; min-height: 100vh; }

/* ---------- 顶部导航 ----------
   结构是三个**兄弟节点**（品牌 / 分组 / 用户），用 flex-wrap 排成两行：
     默认（高屏）：第一行 品牌 …… 用户，第二行 分组（flex-basis: 100%）
     矮屏宽屏（笔记本 1366×768）：分组折回第一行，整条顶栏只有 76px。
   为什么要这一档：两行顶栏要多花 73px 纵向空间，在 768px 高的笔记本上
   会把「健康管家」页的输入框挤出首屏（实测 top=810 > 768）。
   详见下方 @media (max-height: 900px) and (min-width: 1200px)。 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: 16px;
  padding: 8px 26px 0;
  /* 顶栏：**浅色玻璃** + 背景模糊。
     为什么最后是浅色而不是深色（这是实测定的，不是审美取舍）：
     browser-test 会读 8 张作品截图的平均亮度，要求 ≥200
     （这条断言是防"被遮罩盖暗"的坏图防线）。深色顶栏一压，
     健康管家页实测只有 171.9、健康档案 182.3 —— 直接判失败。
     浅色玻璃的合成色（0.9 暖白 + 0.1 天空）实测 #E5E1DC，
     深色文字 5.2~10.1:1 ✓；落日仍然从这 10% 的透明与模糊里透出来。 */
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 14px;
  min-width: 0; min-height: var(--topbar-h);
}
.brand-mark {
  width: 54px; height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, #F0A05C 100%);
  display: grid; place-items: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(224, 122, 63, 0.28);
}
.brand-text { min-width: 0; }
.brand-title { font-size: var(--fs-lg); font-weight: 700; line-height: 1.25; }
.brand-sub { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }
/* 顶栏那份品牌名坐在**浅色玻璃**上，保持深色（对合成底 #E5E1DC 实测 10.1:1）；
   手机端抽屉（.sidebar）里还有另一份同样的品牌块，它坐在白卡上，同样是深色 ✓ */
.topbar .brand-title { color: var(--text); }
.topbar .brand-sub { color: var(--text-3); }

.topbar-user {
  margin-left: auto;
  display: flex; align-items: center; gap: 14px;
  min-height: var(--topbar-h);
}
.user-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 18px 6px 8px;
  background: var(--bg-alt);
  border-radius: var(--r-full);
}
.user-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-deep), var(--green-deep-2));
  display: grid; place-items: center;
  font-size: var(--fs-lg); font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-name { font-size: var(--fs-body); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: var(--fs-xs); color: var(--text-3); }

/* 顶栏里的幽灵按钮（「退出登录」、手机端的「☰」）坐在浅色玻璃上 ——
   与卡片里的用法一致，颜色不用另写。保留这条注释是为了说明：
   顶栏一旦改回深色，这一处必须跟着改成浅色，否则它会在深底上消失。 */

/* 分组行：默认整行铺开（order 让它排在品牌/用户之后） */
.topnav {
  order: 3;
  flex: 0 0 100%;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 12px;
}
.group-item {
  display: inline-flex; align-items: center; gap: 8px;
  /* 60px 高：远超 WCAG 的 44px，老年人也能轻松点中 */
  min-height: 60px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: var(--r-s);
  background: none;
  /* 浅色玻璃顶栏上的导航项（--text-2 对合成底 #E5E1DC 实测 5.8:1 ✓） */
  color: var(--text-2);
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.12s var(--ease);
}
.group-item:hover { background: var(--bg-alt); color: var(--text); }
.group-item:active { transform: scale(0.97); }
/* 选中态双通道：颜色加深 + 底部 3px 色条。
   视觉评审指出「浅橙药丸底对导航底只有 1.07:1，等于没有形状线索，
   对色觉衰退的老人只剩文字颜色不同」，而微软雅黑只有 400/700 两个字重面，
   加粗这条路物理上走不通（实测墨量只差 ±3%）——所以补一条形状线索。 */
.group-item.active {
  background: var(--primary-l);
  color: var(--primary-text-deep);
  font-weight: 800;
  box-shadow: inset 0 -3px 0 0 var(--primary-btn);
}
.group-item.expanded { border-color: var(--primary); color: var(--text); }
/*
 * 「点开还有得选」的箭头用 CSS 画，不写 ▾ 字符。
 * 踩过的坑：▾ 走字体回退后渲染成一个小点、还偏在文字右上方，看着像标点错误。
 * 用两条边框拼一个 45° 的 chevron，任何字体下形状都一致。
 */
.group-item-caret {
  width: 9px; height: 9px; flex-shrink: 0;
  margin-left: 2px; margin-top: -4px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
  transition: transform 0.2s var(--ease), margin-top 0.2s var(--ease);
}
.group-item.expanded .group-item-caret { transform: rotate(-135deg); margin-top: 4px; }

/* 点开的分组面板：整宽铺在导航行下面，卡片错开入场 */
.group-panel {
  position: absolute; left: 26px; right: 26px; top: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 var(--r-l) var(--r-l);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  animation: panelDrop 0.24s var(--ease) both;
}
.group-panel-title { font-size: var(--fs-sm); color: var(--text-3); font-weight: 700; margin-bottom: 14px; }
.group-panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.page-tile {
  display: flex; align-items: center; gap: 14px;
  min-height: 92px;
  padding: 16px 18px;
  width: 100%; text-align: left;
  /* 客户点名的「太黄」就在这里：分组面板里那几张入口卡原来是琥珀底。
     现在底色跟着 --bg-alt 变成中性暖白，再补一条中性描边 ——
     面板本身是白的，没有描边这四张卡会糊在面板上。 */
  background: var(--bg-alt);
  border: 2px solid var(--tint-line);
  border-radius: var(--r-s);
  cursor: pointer;
  animation: tileIn 0.3s var(--ease) both;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.page-tile:hover { background: var(--primary-l); border-color: var(--primary-b); transform: translateY(-2px); }
.page-tile.on { background: var(--primary-l); border-color: var(--primary); }
.page-tile-icon { font-size: 34px; line-height: 1; flex-shrink: 0; }
.page-tile-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.page-tile-name { font-size: var(--fs-lg); font-weight: 700; color: var(--text); }
.page-tile-desc { font-size: var(--fs-sm); color: var(--text-3); line-height: 1.5; }
.page-tile-now {
  margin-left: auto; flex-shrink: 0;
  font-size: var(--fs-xs); font-weight: 700; color: var(--primary-text);
  background: var(--card); border: 1px solid var(--primary-b);
  border-radius: var(--r-full); padding: 4px 12px;
}

@keyframes panelDrop {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes tileIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 内容区 ---------- */
.content { flex: 1; padding: 28px; max-width: 1520px; width: 100%; margin: 0 auto; }
/* 页面标题（原来是贴顶那一行的 h1，现在跟着内容走，更透气）
   ------------------------------------------------------------------
   改版记录（2026-10）：标题区先做成"深色章节"（深墨绿块 + 白字），
   写实落日背景上线后又改回**浅色玻璃块**，两个原因都是实测逼出来的：
     ① 8 张作品截图有平均亮度硬断言（browser-test 要求 ≥200）——
        深色标题区 + 深色顶栏一起把健康管家页压到 171.9，直接判失败；
     ② 深色块压在深色晚霞上本来就"糊在一起"，浅玻璃块反而更干净，
        落日还能从 0.9 的透明度 + 背景模糊里透出来。
   文字因此回到深色（对合成底 #E5E3E0：主标题 10.2:1、副标题 5.2:1 ✓），
   字号与字重一个都没动。 */
.page-head {
  margin-bottom: 30px;
  background: var(--glass);
  color: var(--text);
  border-radius: var(--r-l);
  /* 内边距与卡片文字左缘对齐（32px）：标题条与下方卡片正文的墨迹
     左缘统一落在 x≈58（视觉评审实测 24px 时偏左约 8px，整列像错位）。 */
  padding: 22px 32px;
  /* 标题与副标题排在同一行（窄屏自动折行）。
     两个原因，都来自实测：
     ① 视觉评审量出「1387px 宽的深色块里，右侧 1120px 是纯 #23453A，什么都没有」——
        把副标题挪到标题右边，色块右半边就有内容了；
     ② 高度从 155px 收到约 95px，把首屏还给内容 ——
        健康管家页的输入框本来被顶到首屏外 21px、发送键外 30px（agent-page-test 实测），
        收紧后重新回到首屏内。 */
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 22px;
  /* 副标题推到右端：视觉评审实测「色块右侧 960px（69%）是纯色」，
     space-between 让标题贴左、副标题贴右，右半边就有了内容；
     窄屏折行时副标题落到第二行并自动左对齐。 */
  justify-content: space-between;
}
.page-head h1 { font-size: var(--fs-h1); font-weight: 800; line-height: 1.2; letter-spacing: -0.5px; color: var(--text); }
.page-head .page-sub { color: var(--text-3); margin-top: 0; }
.page-sub { font-size: var(--fs-body); color: var(--text-3); margin-top: 8px; line-height: 1.6; }
/* 视图渲染的容器：min-width:0 防止宽表格/长数字把整页顶宽 */
.view-body { min-width: 0; }

/* ==================================================================
   「裸在落日上的文字」：不在卡片里、直接压在整页背景上的那几处
   ------------------------------------------------------------------
   背景是深色落日，这几处文字换成浅色；但落日正中间那几带是亮橙
   （视口 25%–63%，#B85E20 → #FF8A10），浅字压上去只有 1.95:1 ——
   所以再垫一层半透明的暗色玻璃（--on-bg-scrim），
   垫完之后浅字最差也有 10:1 以上（实测 #F6E7D6 压 #4C332A = 9.6:1）。

   ⚠️ 必须按**结构**精确圈定，不能写成「凡是 .btn-ghost 都变浅色」：
      卡片里还有大量 .btn-ghost（「收起这一块」「取消」「关闭」…），
      它们坐在白卡上，一起改就会在白底上消失。
   覆盖范围是实测出来的：10 个路由 × 12 个滚动位置逐个扫描，
   真正裸在页面背景上的只有下面两类（外加顶栏，见上面 .topbar 那几段）。

   ① 页面底部统一的「← 返回今日概览」（app.js 的 appendBackHome 生成，
      结构固定为 .view-body > div > button.btn.btn-ghost）
   ② 能力评估「报告」顶上那一行（生成时间 + 引擎标签 + 「重新做一次评估」）
   ================================================================== */
.view-body > div > .btn.btn-ghost {
  color: var(--on-bg);
  background: var(--on-bg-scrim);
  border-color: rgba(246, 231, 214, 0.34);
  backdrop-filter: blur(6px);
}
.view-body > div > .btn.btn-ghost:hover:not(:disabled) {
  background: rgba(19, 10, 2, 0.76);
  border-color: rgba(246, 231, 214, 0.6);
}
/*
 * ② 的排除清单：这些浅色面里的裸文字必须保持深色。
 * 用 :not() 的复杂选择器（Chrome 88+ 起支持）而不是层层写结构，
 * 是为了别人改视图结构时这条规则**不会静默失效** ——
 * 一旦某个元素不再被排除、又不该变浅，视觉审计会当场报对比度不达标。
 */
.view-body .row.wrap > .text-3:not(.card *, .modal *, .toast *, .board-tile *, .page-banner *,
    .steward-panel *, .explain *, .alert *, .factor *, .exercise-card *, .illu-strip-item *,
    .meal-slot *, .choice *, .safety-box *, .onb-root *) {
  color: var(--on-bg-2);
  background: var(--on-bg-scrim);
  border-radius: var(--r-full);
  /* 行内元素的上下内边距不会撑开行盒，只会把垫子画出一点点 —— 正好够用不挤版 */
  padding: 3px 14px;
}
.view-body .row.wrap > .btn.btn-ghost:not(.card *, .modal *, .toast *, .board-tile *, .page-banner *,
    .steward-panel *, .explain *, .alert *, .factor *, .exercise-card *, .illu-strip-item *,
    .meal-slot *, .choice *, .safety-box *, .onb-root *) {
  color: var(--on-bg-2);
  background: var(--on-bg-scrim);
  border-color: rgba(246, 231, 214, 0.3);
}

/* ==================================================================
   矮屏（笔记本 1366×768 这类）的纵向压缩
   ------------------------------------------------------------------
   为什么需要这一档：顶部两行导航 + 内容区里的大标题，比改造前多花约 130px
   纵向空间 —— 在 768px 高的屏幕上，「健康管家」页的输入框会被挤出首屏
   （实测 top=810 > 768，长者点进来要往下滚才找得到打字的地方）。
   这一档**只在高度不够时**生效：高屏上仍然是两行导航 + 38px 大标题。
   ① 分组行折回第一行（顶栏 149px → 85px）
   ② 标题降到 31px、行距收紧
   ③ 内容内边距与卡片内边距收紧
   ④ 对话区高度上限下调（由 --chat-max-h 交给 agent.js 使用）

   档位边界定在 900px（原来是 860px）：861~900 这一段如果不压缩，
   管家页的输入框同样会被挤出首屏（实测 900px 高时刚好差几十像素），
   而这一段在笔记本上很常见（1440×900）。
   ================================================================== */
@media (max-height: 900px) {
  .content { padding: 20px 26px; }
  /* 矮屏：深色标题区保留（它是页面的重量来源），但把内边距收紧，
     免得 768px 高的笔记本上首屏只剩标题块。
     ⚠️ 这里**不再把 h1 降一档**：1440×900 正是最常见的笔记本尺寸，
     降档会让「页面标题 = 卡片标题」（都是 36px），页面失去最高一级；
     视觉评审在 1440×900 的截图上实测到的就是这个问题。
     高度改由内边距承担：20px + 44×1.2 + 20 = 92.8px，
     比原来的一档（83px）只高 10px，管家页输入框仍在首屏内（实测留 23px 余量）。 */
  .page-head { margin-bottom: 18px; padding: 20px 28px; }
  .page-sub { font-size: var(--fs-body); margin-top: 4px; }
  .card { padding: 20px; }
  /* 对话区高度上限：矮屏上按"视口高度减常数"给，而不是简单的百分比 ——
     这一页真正的约束是"输入框必须在首屏内"，而它由固定高度的那几块
     （顶栏 + 页面标题 + 安全提示 + 输入卡）决定，用 vh 减常数表达才准。
     实测 1366×768：对话区 248px 时发送键 bottom≈720 < 768。 */
  :root { --chat-max-h: clamp(150px, calc(100vh - 520px), 280px); }
  /* 管家页那张「健康管家，随时可以问」早已删除；这条留着兜底防回流 */
  .agent-hero { display: none; }
}
@media (max-height: 900px) and (min-width: 1200px) {
  .topbar { padding-bottom: 8px; column-gap: 10px; }
  .brand, .topbar-user { min-height: 68px; }
  .topnav { order: 0; flex: 1 1 auto; justify-content: center; padding-bottom: 0; }
  .group-item { min-height: 54px; padding: 0 18px; }
  .page-head { margin-bottom: 12px; }
  /* 首页主视觉的收窄放在文件末尾的主视觉区之后：.dash-hero 的基础规则
     写在更后面的位置，按层叠顺序（同优先级后写者赢）放这里会被盖掉。 */
}

/* ---------- 页面切换的入场动效 ----------
   只动 opacity/transform：不触发重排，滚动位置不跳，也不会把引导的高亮框量错。
   系统开了「减少动态效果」时由末尾的 @media 统一压成 0.01ms。 */
@keyframes viewEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.view-enter { animation: viewEnter 0.3s var(--ease) both; }

/* ---------- 手机端抽屉（≤860px 才出现，见下方断点） ---------- */
.sidebar { display: none; }
.nav { padding: 14px 12px; flex: 1; }
.nav-group-label {
  font-size: var(--fs-xs);
  color: var(--text-3);
  font-weight: 700;
  padding: 18px 12px 8px;
  letter-spacing: 0.5px;
}
.nav-item {
  display: flex; align-items: center; gap: 14px;
  /* 60px 高：远超 WCAG 的 44px，老年人也能轻松点中 */
  min-height: 60px;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: var(--r-s);
  color: var(--text-2);
  background: none; border: none;
  width: 100%; text-align: left; cursor: pointer;
  font-size: var(--fs-body); font-weight: 500;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
  position: relative;
}
.nav-item:hover { background: var(--bg-alt); color: var(--text); }
.nav-item.active { background: var(--primary-l); color: var(--primary-text-deep); font-weight: 700; }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 30px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}
.nav-icon { font-size: 26px; width: 30px; text-align: center; flex-shrink: 0; line-height: 1; }
.nav-badge {
  margin-left: auto;
  font-size: var(--fs-xs);
  padding: 3px 11px;
  border-radius: var(--r-full);
  background: var(--yellow-text); color: #fff; font-weight: 700;
}
.nav-badge.muted { background: var(--bg-alt); color: var(--text-3); font-weight: 600; }

.sidebar-foot { padding: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card.pad-0 { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.card-title { font-size: var(--fs-h3); font-weight: 700; line-height: 1.4; }
.card-sub { font-size: var(--fs-body); color: var(--text-3); font-weight: 400; margin-top: 5px; line-height: 1.65; }
.card-head .spacer { flex: 1; min-width: 0; }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/**
 * 「主内容 + 侧栏」两栏布局，窄屏自动堆叠。
 * 比例通过 CSS 变量 --split-left 传入；不可写内联 grid-template-columns，
 * 否则媒体查询无法覆盖（这是项目里踩过的坑）。
 */
.split {
  display: grid; gap: 22px; align-items: start;
  grid-template-columns: minmax(0, var(--split-left, 1.3fr)) minmax(0, 1fr);
}

/* ---------- 指标卡 ---------- */
.metric {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.metric::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--metric-accent, var(--primary));
}
/*
 * ⚠️ 字号倒挂（实测缺陷）：指标卡的**名称**和**解释**原来都是 17px（--fs-sm），
 *    而卡片上最大的数字是 52px。营养方案里「蛋白质（最重要）」「钙（老年版新增）」
 *    这些恰恰是最关键的信息，却比页面正文（19px）还小 —— 长者的眼睛会先跳过它们。
 *    审计口径是"正文 ≥19px"，17px 的解释文字本身就踩在这条线下面。
 *    所以名称与解释统一提到 --fs-body（19px）：数字仍是主角，但名称读得清、解释读得懂。
 *    对比度不受影响（颜色一个都没改：--text-2 白底 7.2:1、--text-3 白底 6.0:1）。
 */
.metric-label {
  font-size: var(--fs-body); color: var(--text-2); font-weight: 600;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.metric-value {
  font-size: var(--fs-num);
  font-weight: 700;
  line-height: 1.15;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.metric-value .unit { font-size: var(--fs-lg); font-weight: 600; color: var(--text-2); margin-left: 5px; letter-spacing: 0; }
.metric-foot { font-size: var(--fs-body); color: var(--text-3); margin-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.65; }

/* ---------- 徽章 / 标签 ---------- */
/*
 * ⚠️ 这一整组（.badge / .tag / .page-banner-point）都是**纯展示**元素，
 *    点下去不会有任何反应。所以它们必须长得**不像按钮** ——
 *    实测缺陷：营养方案里的药丸标签、首页横幅上的三个小胶囊、
 *    风险因素上的「优先处理」徽章，都是"胶囊 + 描边"的按钮造型，
 *    长者会一遍遍去点，点不动就以为系统坏了。
 *
 *    做法：去掉按钮的两个视觉特征 —— ① 一整圈描边；② 胶囊形圆角。
 *    同时确认没有 cursor:pointer、没有 :hover / :active 反馈
 *    （视觉审计的「看着能点、点了没反应」就是查 cursor:pointer）。
 */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  /* 胶囊 → 圆角矩形：这是"标签"的形状，不是"按钮"的形状 */
  border-radius: var(--r-s);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.5;
  /* 允许换行并限制宽度：长文本若不换行会顶破卡片布局 */
  white-space: normal;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: left;
  /* 明确：不可点。没有指针、没有悬停、没有按下反馈、没有投影 */
  cursor: default;
  user-select: none;
}
.badge-ok { background: var(--green-l); color: #2F6F56; }
.badge-warn { background: var(--yellow-l); color: #8A6415; }
.badge-danger { background: var(--red-l); color: #9E2F2B; }
.badge-info { background: #EAF2FA; color: #2C5F8A; }
.badge-accent { background: var(--primary-l); color: var(--primary-text); }
/* 中性徽章原来靠 1px 描边把自己从白卡片上分出来；去掉描边后底色要加深一档，
   否则它就"看不见"了。--text-2 对 #EFE7DA 的对比度 6.26:1 ✓ */
.badge-muted { background: var(--line-soft); color: var(--text-2); }

/*
 * .tag：营养方案里的「今日主题」「这一餐的亮点」「哪些食物能补钙」。
 *
 * 原来是一个 border-radius:999px 的胶囊 + 一整圈描边 —— 和 .btn 的造型几乎一样。
 * 现在改成"左侧一道短引号 + 圆角矩形"的标签样式，并在字号上归位：
 * 17px → 19px（正文档）。它原来比周围正文还小，正是"字号倒挂"的一处。
 */
.tag {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: var(--fs-body);
  font-weight: 600;
  background: var(--bg-alt);
  color: var(--text-2);
  border: 1px solid var(--line);
  /* 左侧引号：一眼看出"这是一个标签"，而不是一个能按的胶囊 */
  border-left: 5px solid var(--primary-b);
  cursor: default;
  user-select: none;
}

/* ---------- 免责声明（机器生成内容）---------- */
/*
 * 方案页 / 评估报告上必须带的一句中文提示：机器生成 · 不能替代医生面诊 · 用药遵医嘱。
 *
 * 底色用**不透明**的 --yellow-l：对比度审计是拿 body 的 background-color 当基准算的，
 * 半透明底会让这一块以及压在它下面的文字全部无法判定。
 * 左侧 6px 色条是"醒目"的那一半，"克制"的另一半是：不用红色（红色留给安全警示）、
 * 不做阴影、不占满宽（跟正文同宽即可），字号保持正文 19px、绝不缩小。
 */
.disclaimer {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--yellow-l);
  border: 1px solid var(--yellow-b);
  border-left: 6px solid var(--yellow);
  border-radius: var(--r-s);
  padding: 14px 18px;
  margin-top: 14px;
}
.disclaimer-icon { font-size: var(--fs-lg); line-height: 1.3; flex-shrink: 0; }
.disclaimer-title { font-size: var(--fs-body); font-weight: 700; color: var(--yellow-text); line-height: 1.6; }
.disclaimer-text { font-size: var(--fs-body); color: var(--text); line-height: 1.8; margin-top: 6px; }

/* ------------------------------------------------------------
 * 说明气泡（hintTip）
 * 页面上只留一句结论，长解释收进浮层：安全须知、免责条款这类内容
 * 必须能读到，但不该把整页塞满。约束与全站一致：按钮 54×54、
 * 气泡文字 19px 起、手机上改成贴底卡片（触屏没有 hover，只能点开）。
 * ------------------------------------------------------------ */
.hint-tip { position: relative; display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hint-tip-summary { font-size: var(--fs-body); line-height: 1.6; color: var(--text); }
.hint-btn {
  flex-shrink: 0;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--card);
  color: var(--primary);
  font-size: 26px; font-weight: 800; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.hint-btn:hover { background: var(--primary-l); }
.hint-btn[aria-expanded='true'] { background: var(--primary); color: #fff; }
.hint-bubble {
  display: none;
  position: absolute; z-index: 130;
  left: 0; top: calc(100% + 10px);
  width: min(440px, calc(100vw - 48px));
  max-height: 62vh; overflow: auto;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: 0 18px 44px rgba(40, 30, 20, .18);
  padding: 14px 18px;
  font-size: var(--fs-body); line-height: 1.7; color: var(--text);
}
/* 下面放不开就往上翻（由 components.js 的 placeBubble 判定后加 .up） */
.hint-bubble.up { top: auto; bottom: calc(100% + 10px); }
.hint-bubble p { margin: 0 0 8px; }
.hint-bubble p:last-child { margin-bottom: 0; }
.hint-tip.open .hint-bubble { display: block; }
/* 窄屏：气泡挂到 body 下做贴底卡片（.sheet 由 components.js 加上），
   避免被带 transform 的祖先卡片当成定位基准而跑到屏幕外 */
@media (max-width: 640px) {
  .hint-bubble {
    position: fixed;
    left: 12px; right: 12px;
    top: auto; bottom: 92px;
    width: auto;
    max-height: 56vh; overflow: auto;
  }
}
.hint-bubble.sheet {
  display: block;            /* 挂到 body 后不再匹配 .hint-tip.open 后代选择器，要自己显示 */
  position: fixed;
  left: 12px; right: 12px;
  top: auto; bottom: 24px;
  width: auto;
  max-height: 70vh; overflow: auto;
  z-index: 210;
  border-color: var(--primary);
  box-shadow: 0 24px 60px rgba(40, 30, 20, .34);
  padding: 18px 20px 12px;
}
.hint-sheet-close {
  display: block;
  width: 100%;
  min-height: 54px;
  margin-top: 12px;
  border-radius: var(--r-s);
  border: 1px solid var(--line-strong);
  background: var(--primary);
  color: #fff;
  font-size: var(--fs-body); font-weight: 800;
  cursor: pointer;
}

/* ---------- 按钮（超大易点）---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px;
  padding: 14px 26px;
  border-radius: var(--r-s);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: var(--fs-body);
  font-weight: 600;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
  white-space: nowrap;
  line-height: 1.4;
  text-decoration: none;
}
.btn:hover:not(:disabled) { background: var(--card-hover); border-color: var(--primary-b); box-shadow: var(--shadow-sm); }
.btn:active:not(:disabled) { background: var(--bg-alt); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary-btn); border-color: var(--primary-btn); color: var(--text-inv); box-shadow: 0 3px 12px rgba(224, 122, 63, 0.25); }
.btn-primary:hover:not(:disabled) { background: var(--primary-btn-hover); border-color: var(--primary-btn-hover); box-shadow: 0 5px 18px rgba(224, 122, 63, 0.32); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-alt); color: var(--text); }
.btn-danger { background: var(--red-l); color: #9E2F2B; border-color: var(--red-b); }
.btn-danger:hover:not(:disabled) { background: #F7DDDB; }

.btn-lg { min-height: 66px; padding: 18px 34px; font-size: var(--fs-lg); }
/*
 * 小按钮也要满足本项目自己定的「可点元素最小 54px」（见文件顶部 --tap-min 说明）。
 *
 * 历史缺陷：这里原本是 46px，而两条审计断言的阈值却都是 **44px**（WCAG 下限），
 * 比项目自己的标准还低 —— 于是 46px 的小按钮**永远亮不了红灯**，
 * 受影响的是手机上最常碰的几处：唯一的导航入口「☰」、退出登录、
 * 「＋ 再记一条」、「加入」、「删除」。标准与检查口径不一致，等于标准没落地。
 * 同时补上 min-width，避免出现"够高但太窄"的窄条目标。
 */
.btn-sm { min-height: 54px; min-width: 54px; padding: 10px 18px; font-size: var(--fs-sm); }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 24px; flex-wrap: wrap; }
/*
 * 主操作必须比次操作**更宽**（不只是更深）。
 *
 * 实测缺陷（缺陷编号见视觉审计报告）：首页「今天最需要做的一件事」卡片里
 * 主按钮「看今天怎么练」154~168px、次按钮「看看完整的风险分析」211~225px ——
 * 主次关系反了。原因是两个按钮都是"内容撑宽"，而次按钮那 9 个字比主按钮
 * 的 6 个字长。老人扫一眼，看到的是右边那个更大的块，点错是必然的。
 *
 * 做法：同一行里主按钮用 flex-grow 吃掉剩余宽度，至少占 240px、最多 400px；
 * 次按钮维持内容宽度。这样无论文案长短，主按钮都不会比次按钮窄，
 * 也不会变成一个占满整行、1000px 宽的怪物按钮（那样反而不像"主操作"了）。
 * （窄屏 <900px 时所有按钮都会 flex:1 1 auto 平分，见下方媒体查询。）
 */
.btn-group > .btn-primary,
.row.wrap > .btn-primary { flex: 1 1 240px; min-width: 240px; max-width: 400px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 22px; }
.field-label { display: block; font-size: var(--fs-body); font-weight: 600; margin-bottom: 10px; }
.field-label .req { color: var(--red-text); margin-left: 4px; }
.field-hint { font-size: var(--fs-sm); color: var(--text-3); margin-top: 8px; line-height: 1.7; }
.field-error { font-size: var(--fs-sm); color: var(--red-text); margin-top: 8px; font-weight: 600; }

.input, .select, .textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  background: var(--card);
  border: 2px solid var(--line-strong);
  border-radius: var(--r-s);
  color: var(--text);
  font-size: var(--fs-lg);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-l); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='%237C736A' d='M9 13L3 6h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 46px;
}
.input-group { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.input-suffix { color: var(--text-2); font-size: var(--fs-body); font-weight: 600; white-space: nowrap; }

.choice-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.choice {
  min-height: 54px;
  padding: 13px 22px;
  border-radius: var(--r-s);
  border: 2px solid var(--line-strong);
  background: var(--card);
  color: var(--text-2);
  cursor: pointer;
  font-size: var(--fs-body);
  font-weight: 600;
  transition: all 0.18s var(--ease);
  user-select: none;
  text-align: left;
}
.choice:hover { border-color: var(--primary-b); color: var(--text); background: var(--card-hover); }
.choice.on { background: var(--primary-l); border-color: var(--primary); color: var(--primary-text); font-weight: 700; }
/*
 * 选中标记。
 * 用**不换行空格**（\00a0）而不是普通空格：普通空格是合法换行点，
 * 长标签会把 ✓ 挤到单独一行，看起来像多出一排对勾。
 */
.choice.on::before { content: '✓\00a0'; }

/*
 * 卡片式选项（用药清单、运动方案的日期页签这类"标题 + 说明"的选项）。
 *
 * 为什么不能用上面那条 ::before：这类按钮的内容是**块级**元素（标题一行、说明一行），
 * 而 ::before 是行内盒 —— 它会被包进一个匿名块，于是那个 ✓ **单独占一整行**，
 * 变成标题上方孤零零一个对勾（实测让卡片高出整整 27px）。
 * 所以这里关掉按钮级的 ::before，改成把 ✓ 放进第一行的标签里，跟标题同行。
 */
.choice-stacked.on::before { content: none; }
.choice-stacked.on .choice-label::before { content: '✓\00a0'; }

/* ---------- 进度条（加粗）---------- */
/* 进度条的槽：同上，--bg-alt 提亮后槽在白卡上几乎不可见，单独给一档中性灰米 */
.bar { height: 14px; background: #EDE8E0; border-radius: var(--r-full); overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; border-radius: var(--r-full); background: var(--primary); transition: width 0.5s var(--ease); }
.bar-fill.ok { background: var(--green); }
.bar-fill.warn { background: var(--yellow); }
.bar-fill.danger { background: var(--red); }
.bar-fill.info { background: #5B9BD5; }

.progress-row { display: flex; align-items: center; gap: 16px; }
.progress-row .bar { flex: 1; }
.progress-val { font-size: var(--fs-body); font-weight: 700; color: var(--text-2); min-width: 84px; text-align: right; font-variant-numeric: tabular-nums; }

/*
 * 环形进度：圆环与中间的文字必须**共用同一个圆心**。
 *
 * 历史缺陷：.ring 是 150px 的盒子，而里面的 <svg> 固定 108px 且没有定位，
 * 留在常规流里贴着左上角；.ring-text 却是 inset:0 —— 在**150px** 的盒子里居中。
 * 结果环心落在 (54,54)、文字中心落在 (75,75)，文字整体向右下偏 21px，
 * 「风险分」那行直接压在圆环的弧线上，看上去就是"歪的"。
 *
 * 现在两者都用 `inset:0 + margin:auto` 在**同一个 150px 盒子里各自居中**，
 * 圆心与文字中心必然重合，与盒子多大、响应式断点怎么改都无关。
 *
 * （试过用 grid + place-items:center，但单行 auto 轨道没有按预期撑满容器，
 *   内容整体偏到上方约 27px，底部留出一块空白 —— 截图核对时发现的。
 *   这里改用绝对定位，尺寸与位置都写死，不依赖轨道分配规则。）
 */
/*
 * 尺寸取 120px（不是 svg 自带的 108）：环的内圈直径 = (46-6.5)×2×(120/108) ≈ 87.8px，
 * 而「68 + 风险分」这一块实测高约 76px。留出约 12px 余量，
 * 「风险分」的底角就不会蹭到圆环的弧线 —— 108px 时余量只有 3px，看着像贴在一起。
 * 盒子仍是 150px、圆环变大 11%，所以布局一点都不动。
 */
.ring { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.ring svg { position: absolute; inset: 0; margin: auto; width: 120px; height: 120px; transform: rotate(-90deg); }
/* 环形轨道的颜色单独给：--bg-alt 提亮成中性暖白后，轨道在白卡上会淡到看不见。
   这里用比描边色更中性的浅灰米，环的"没走到的那一段"仍然读得出来。 */
.ring-track { fill: none; stroke: #E6E1D9; stroke-width: 13; }
.ring-fill { fill: none; stroke-width: 13; stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease); }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: 42px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-unit { font-size: var(--fs-sm); color: var(--text-3); margin-top: 4px; font-weight: 600; }

/* ---------- 表格（加大行高）---------- */
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.table th {
  text-align: left; padding: 14px 16px;
  /* 表头是长者要读的关键信息，不能比正文小（原 --fs-sm 17px，实测为字号倒挂） */
  color: var(--text-2); font-weight: 700; font-size: var(--fs-body);
  border-bottom: 2px solid var(--line-strong);
  white-space: nowrap; background: var(--bg-alt);
}
.table td { padding: 16px; border-bottom: 1px solid var(--line); color: var(--text-2); line-height: 1.7; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg-alt); }
.table strong { color: var(--text); font-weight: 700; }
.table .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------- 提示条 ---------- */
.alert {
  display: flex; gap: 14px;
  padding: 18px 20px;
  border-radius: var(--r);
  font-size: var(--fs-body);
  line-height: 1.75;
  border: 2px solid transparent;
  border-left-width: 7px;
}
.alert-icon { flex-shrink: 0; font-size: 26px; line-height: 1.35; }
.alert-info { background: #EAF2FA; border-color: #B8D4EC; border-left-color: #5B9BD5; color: #234C6E; }
.alert-ok { background: var(--green-l); border-color: var(--green-b); border-left-color: var(--green); color: #2A6249; }
.alert-warn { background: var(--yellow-l); border-color: var(--yellow-b); border-left-color: var(--yellow); color: #7A5810; }
.alert-danger { background: var(--red-l); border-color: var(--red-b); border-left-color: var(--red); color: #8E2A26; }
.alert-accent { background: var(--tint); border-color: var(--primary-b); border-left-color: var(--primary); color: #8A4A1E; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 56px 24px; color: var(--text-3); }
.empty-illustration { max-width: 360px; margin: 0 auto 26px; }
.empty-icon { font-size: 64px; margin-bottom: 18px; }
.empty-title { font-size: var(--fs-h3); color: var(--text); font-weight: 700; margin-bottom: 12px; }
.empty-desc { font-size: var(--fs-body); max-width: 580px; margin: 0 auto 26px; line-height: 1.85; color: var(--text-2); }

/* ---------- 插画容器 ---------- */
.illustration { width: 100%; height: auto; border-radius: var(--r); display: block; }
.illustration-hero { max-width: 100%; margin: 0 auto; }
.illustration-card { background: var(--bg-alt); padding: 16px; border-radius: var(--r); }
.illustration-small { max-width: 190px; margin: 0 auto; }
.illustration-banner {
  background: linear-gradient(135deg, var(--tint) 0%, var(--green-l) 100%);
  border-radius: var(--r);
  padding: 12px;
}

/* ==================================================================
   插画版式组件
   ------------------------------------------------------------------
   起因：客户反馈「全是文字太单调了，想再插入一些图片丰富 UI」。
   加图片不能靠到处塞 <img>，否则每页的留白、圆角、比例都会不一样。
   这里给出四个统一的版式组件，全站只用这四种方式放插画：

     .page-banner    页面顶部的场景横幅（图 + 标题 + 一句话说明）
     .illu-strip     一排小插画卡（话题导览、快捷入口）
     .section-illu   小节标题旁的小插画（点题，不喧宾夺主）
     .illu-watermark 卡片角落的大幅淡插画（纯装饰，兜住大面积留白）

   四条共同约定：
     ① 插画一律 `object-fit: contain`，绝不拉伸变形；
     ② 容器给固定宽高比（aspect-ratio），图片没加载完时不会引起布局跳动；
     ③ 窄屏一律堆叠成单列，不做横向压缩；
     ④ 插画是**装饰**，文字信息必须在不看插画的情况下也能读懂 ——
        因此每张图都带中文 alt，且没有任何关键信息只存在于图里。
   ================================================================== */

/* ---------- ① 页面顶部场景横幅 ---------- */
.page-banner {
  display: grid;
  /* 图占 2 份、文案占 3 份：图够大能看清，但文案仍是主角 */
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: var(--sp-4);
  align-items: center;
  background: linear-gradient(135deg, var(--tint) 0%, var(--card) 46%, var(--green-l) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  overflow: hidden;
}
.page-banner-art {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card);
  aspect-ratio: 20 / 13;
}
.page-banner-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-banner-text { min-width: 0; }
.page-banner-title {
  font-size: var(--fs-h2);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.32;
}
.page-banner-desc {
  font-size: var(--fs-body);
  line-height: 1.85;
  color: var(--text-2);
}
.page-banner-points {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px;
}
/*
 * 横幅里的主操作行。
 *
 * 起因（实测缺陷）：运动方案 / 营养方案 / 健康记录 / 餐食记录这四页，
 * 1440×900 首屏内**看不到任何主操作按钮** —— 横幅 + 安全须知 / 长表单
 * 把按钮挤到 1600~2900px 处，老人打开页面不知道从哪儿下手。
 * 把主操作放进横幅内部（横幅本来就是首屏第一块，位于所有 .card 之前），
 * 按钮必然落在首屏内；也不会把「运动前必读」挤到卡片序列后面
 * —— browser-test 有一条断言要求安全须知在**第一张卡片之前**。
 *
 * 尺寸沿用 .btn 的 54px 底线与 .btn-lg 的 66px，不因为"放横幅里"就缩小。
 */
.page-banner-actions {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-top: 18px;
}
.page-banner-actions .btn { flex: 1 1 240px; }
/* 主操作永远比次操作强：同一行里主按钮吃掉剩余宽度（见 .btn-group 那段注释） */
.page-banner-actions .btn-primary { flex-grow: 2; }
/*
 * 横幅上的三个要点（「每餐都要有蛋白质」这类）。
 *
 * 原来是一整圈描边的白胶囊 —— 和按钮长得一模一样，长者会去点。
 * 现在改成"左侧一道短竖线 + 正文"的要点样式：读得出重点，但没有按钮的任何特征
 * （无描边、无底色块、无指针、无悬停反馈）。
 * 字号同步归位到正文 19px（原来是 17px，比周围正文还小）。
 */
.page-banner-point {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  border: none;
  border-left: 4px solid var(--primary-b);
  border-radius: 2px;
  padding: 2px 0 2px 12px;
  font-size: var(--fs-body);
  color: var(--text-2);
  font-weight: 600;
  cursor: default;
}

/* 图在右（用于同一页面内出现第二个横幅时做左右交错，避免呆板）
 *
 * ⚠️ 光写 `order: 2` 是不够的：`.flip` 把图挪到第 2 条网格轨，
 * 而第 2 条轨是 3fr（文案轨），于是图在这些页面上变成 706×459，
 * 和其它页面非 flip 的 470×306 差了一大截 —— 同一个组件在不同页面尺寸不一致。
 * 所以列宽也必须跟着翻转：图仍然只占 2fr，只是换到了右边。 */
.page-banner.flip { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.page-banner.flip .page-banner-art { order: 2; }

/* ---------- ② 一排小插画卡 ---------- */
.illu-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--sp-2);
}
.illu-strip-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  /* 能点的卡片用 <button> 渲染，这里抹平浏览器给按钮的默认字体与颜色 */
  font: inherit;
  color: inherit;
  width: 100%;
}
/*
 * 悬停浮起**只给真正能点的卡**。
 *
 * 历史缺陷：这一行原本对 .illu-strip-item 一视同仁，于是纯展示用的插画卡
 * 鼠标移上去也会浮起来 —— 长者会以为能点，点下去却毫无反应，只能得出
 * "这块是坏的吧"。可点击的卡现在一律渲染成 <button>，所以把悬停反馈绑到
 * button 上：能点的有反馈，展示用的保持安静。
 */
button.illu-strip-item { cursor: pointer; }
button.illu-strip-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
/* 选中态：与 .choice.on 同一套视觉语言（底色 + 边框 + 对勾），不靠颜色单独表意 */
button.illu-strip-item.on { background: var(--primary-l); border-color: var(--primary); }
button.illu-strip-item.on .illu-strip-label { color: var(--primary-text); }
button.illu-strip-item.on .illu-strip-label::before { content: '✓\00a0'; }
.illu-strip-art {
  width: 100%;
  max-width: 132px;
  aspect-ratio: 20 / 13;
  border-radius: var(--r-s);
  overflow: hidden;
  background: var(--bg-alt);
}
.illu-strip-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
/*
 * ⚠️ 字号倒挂（实测缺陷，本条是用户点名的那一处）：
 *    营养方案「一天要补够的三样」这张卡上写的就是**蛋白质 / 钙 / 水**，
 *    而它们的名字只有 17px、解释只有 16px —— 比周围正文（19px）还小。
 *    这三样恰恰是整页最该被看见的三个词，字号却是全页最小的一档，完全反了。
 *    改成：名称 --fs-lg（22px，粗体）＝ 卡上的主角；解释 --fs-body（19px）＝ 正文口径。
 *    （审计下限是 16px，所以原来并不"违规"，但它违反了本项目自己写的"正文 ≥19px"。）
 */
.illu-strip-label {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}
.illu-strip-sub {
  font-size: var(--fs-body);
  color: var(--text-2);
  line-height: 1.6;
}

/* ---------- ③ 小节标题旁的小插画 ---------- */
.section-illu {
  width: 66px;
  height: 44px;
  border-radius: var(--r-s);
  overflow: hidden;
  background: var(--bg-alt);
  flex-shrink: 0;
}
.section-illu img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-head .section-illu { margin-right: 4px; }

/* ---------- ④ 卡片角落的淡插画（纯装饰） ---------- */
.illu-watermark {
  position: absolute;
  right: -18px;
  bottom: -14px;
  width: 190px;
  opacity: 0.14;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.illu-watermark img { width: 100%; height: auto; display: block; }
.card { position: relative; }
.card > *:not(.illu-watermark) { position: relative; z-index: 1; }

/* ---------- 窄屏：一律堆叠 ---------- */
@media (max-width: 900px) {
  .page-banner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-3);
    padding: var(--sp-3);
  }
  .page-banner.flip .page-banner-art { order: 0; }
  .page-banner-art { max-width: 460px; margin: 0 auto; width: 100%; }
  .illu-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .illu-watermark { width: 130px; opacity: 0.1; }
}
@media (max-width: 560px) {
  .illu-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .illu-strip-art { max-width: 100%; }
  .page-banner-title { font-size: var(--fs-h3); }
  .illu-watermark { display: none; }   /* 窄屏留白少，水印只会添乱 */
}

/* ---------- 加载 ---------- */
.spinner {
  width: 26px; height: 26px;
  border: 4px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 70px 24px; color: var(--text-2); font-size: var(--fs-body); }
.loading-block .spinner { width: 46px; height: 46px; border-width: 5px; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-alt) 25%, #EFEBE4 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--r-s);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(46, 42, 38, 0.6);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal {
  background: var(--card);
  border-radius: var(--r-l);
  max-width: 760px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal.wide { max-width: 1000px; }
.modal-head {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 26px;
  border-bottom: 2px solid var(--line);
  position: sticky; top: 0; background: var(--card); z-index: 2;
}
.modal-head h3 { font-size: var(--fs-h3); flex: 1; }
.modal-body { padding: 26px; }
.modal-foot {
  display: flex; gap: 14px; justify-content: flex-end;
  padding: 20px 26px;
  border-top: 2px solid var(--line);
  position: sticky; bottom: 0; background: var(--card);
  flex-wrap: wrap;
}
.modal-close {
  width: 54px; height: 54px;
  border-radius: var(--r-s);
  background: var(--bg-alt); border: none;
  color: var(--text-2); font-size: 30px; cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0;
}
.modal-close:hover { background: var(--line); color: var(--text); }

/* ---------- Toast ---------- */
/*
 * 提示条容器本身**不吃点击**，只有提示条卡片吃。
 *
 * 历史缺陷：`.toast-wrap` 是 position:fixed + z-index:200，而顶栏是 z-index:30，
 * 于是提示条浮在顶栏之上。手机上顶栏最左边就是唯一的导航入口「☰」（45×46，位于 x=18,y=20），
 * 而提示条落在 x=0,y=22、宽 353px —— 在菜单按钮正中心做 elementFromPoint，
 * 返回的是**提示条卡片**而不是按钮。也就是说：刚记完一餐弹出提示的那 3.8~7 秒里，
 * 长者点「☰」是没有任何反应的，又是一次"看着能点、点了没反应"。
 * 把容器的命中测试关掉，只让卡片本身可点（以后加"关闭"按钮也正好用得上）。
 */
.toast-wrap { position: fixed; top: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 14px; max-width: 480px; pointer-events: none; }
.toast {
  pointer-events: auto;
  background: var(--card);
  border: 2px solid var(--line-strong);
  border-left-width: 7px;
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-body);
  display: flex; gap: 14px;
  line-height: 1.7;
}
.toast.ok { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--yellow); }
.toast-title { font-weight: 700; margin-bottom: 5px; }
.toast-msg { color: var(--text-2); word-break: break-word; }

/* ---------- 登录页 ----------
   背景改成落日以后，登录页也要"跟着统一"：不再自铺一块暖沙底，
   而是让整页落日从一层**深色薄纱**后面透出来（客户要的"开头也看得到"）。
   两层分工写清楚，因为各自都有硬约束：
     · .auth-page 自己的 background-color 必须是 --bg（不透明）——
       视觉审计靠它算这一页的文字对比度，写成透明会让整页文字被判成
       "无法判定"（历史上踩过）；它是底色，被上面那层落日盖住也没关系。
     · 落日挂在 .auth-page::before 上，**position: fixed + inset: 0**：
       登录页在窄屏上比一屏还高，落日盒一旦跟着元素高度走，
       色标的 % 会被整体拉长，太阳就成了竖椭圆（这是本项目最容易翻车的一点）。
     · 薄纱 0.42~0.56 是实测值：既留得住晚霞，又把最亮那一带压到
       浅色文字也能读（最坏处仍有 6:1 以上，要求 4.5）。 */
/*
 * 登录页的纵向压缩。
 *
 * 实测缺陷（CDP 量 getBoundingClientRect，1440×900）：
 *   整页 documentElement.scrollHeight = 1455px（改造前 1086px），视口只有 900px。
 *   `.auth-card` 实测 y 32 → 1423（1391px 高）：卡片底边、圆角、阴影、
 *   以及「▶ 再看一次开场动画」那颗 191×54 的按钮（y 1328 → 1382）
 *   全在折线以下 —— 验收要求是「scrollHeight ≤ 900 且任何可点元素 bottom ≤ 900」。
 *
 * 压缩一律来自**留白与内容折叠**，一个字都没缩小：
 *   正文仍是 19px、所有按钮仍是 ≥54px（`.auth-switch button` 还是 54px 高）。
 *   具体：页面上下留白 32→20、卡片内边距 40→28、logo 76→52、
 *   各处 margin 收 6~16px、左侧插画封顶 300px 宽、
 *   「忘记密码」那段 402px 的说明改成 54px 的折叠标题行。
 */
.auth-page {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 14px 24px;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 10% -8%, rgba(224, 122, 63, 0.18), transparent 62%),
    radial-gradient(760px 460px at 90% 108%, rgba(74, 157, 127, 0.12), transparent 62%);
}
/* 登录页那一整幅落日（与业务页同一份 --bg-image，不另画一张） */
.auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(19, 10, 2, 0.42), rgba(19, 10, 2, 0.56)),
    var(--bg-image);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
/* 内容抬到落日之上（::before 是 z-index:0 的定位元素，会盖住静态兄弟） */
.auth-shell { position: relative; z-index: 1; }
.auth-shell { width: 100%; max-width: 1180px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px; box-shadow: var(--shadow); }
/* 登录卡片里的字段再紧一档（只作用于登录卡，不影响全站表单的 .field） */
.auth-card .field-label { margin-bottom: 8px; }
.auth-card .field-hint { margin-top: 6px; }
.auth-logo {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, #F0A05C 100%);
  display: grid; place-items: center;
  font-size: 24px; margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(224, 122, 63, 0.3);
}
.auth-title { font-size: var(--fs-h1); margin-bottom: 6px; font-weight: 700; }
.auth-sub { font-size: var(--fs-body); color: var(--text-2); margin-bottom: 10px; line-height: 1.75; }
.auth-switch { text-align: center; font-size: var(--fs-body); color: var(--text-2); margin-top: 6px; }
/* 「立即注册 / 去登录」是登录页上的两个主要动作之一，必须满足本项目自定的 54×54 最小点击区域。
   原实现只给了 padding:4px，实测只有 84×33 —— 高度差了一大截，长者很容易点不中。
   中途曾改成 48px（当时的审计阈值是 WCAG 的 44），但项目自己的标准是 54，
   口径不一致等于标准没落地。现在统一到 54。 */
.auth-switch button {
  background: none; border: none;
  color: var(--primary-text); cursor: pointer;
  font-size: var(--fs-body); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; min-width: 54px;
  padding: 10px 8px;
}

/*
 * 「忘记密码怎么办」——登录页上的一段实话，做成**可折叠**的。
 *
 * 本项目**没有**找回/重置密码的功能（服务端只有 login / register / logout / me
 * 四条认证路由，requireAdmin 只用于改大模型配置），数据也只存在这台电脑本地。
 * 所以这里不放"发送重置邮件"这种点了没用的按钮，只写真的办法：
 * 让家里人重新注册一个账号。
 *
 * 为什么折叠：实测 1440×900 下摊开写这段要占 402px，而登录页整页高度必须 ≤900px
 * （卡片底边和「再看一次开场动画」按钮会被折线切掉）。折叠后只占一行，
 * 而且这一行本身是 **54px 高的点击区**、带 ❓ 与 ▾、白底粗体 —— 不是一行灰色小字，
 * 长者看得见、点得动。正文仍是 19px，展开后内容一个字都没少。
 *
 * 底色用不透明的 --bg-alt（对比度审计按 body 的 background-color 计算，
 * 半透明底会让这一块无法判定）。
 */
.auth-help {
  margin-top: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 6px solid var(--primary-b);
  border-radius: var(--r-s);
  font-size: var(--fs-body);
  color: var(--text-2);
  line-height: 1.8;
}
.auth-help-title {
  display: flex; align-items: center; gap: 8px;
  min-height: 54px;
  padding: 8px 16px;
  font-size: var(--fs-body); font-weight: 700; color: var(--text);
  cursor: pointer;
  list-style: none;
}
.auth-help-title::-webkit-details-marker { display: none; }
.auth-help-title::after { content: '▾'; margin-left: auto; color: var(--primary-text); font-size: var(--fs-lg); }
.auth-help[open] .auth-help-title::after { content: '▴'; }
.auth-help-body { padding: 0 16px 14px; }

.auth-hero {
  padding: 16px;
  border-radius: var(--r-l);
  /*
   * 落日背景最亮的那一带（太阳圆盘）会把左栏的浅色介绍文字压到 2:1 左右。
   * 垫一层固定的暗色玻璃（与顶栏、页脚按钮共用的 --on-bg-scrim 同一口径），
   * 文字就与背景图彻底脱钩 —— 实测浅字最差仍在 7:1 以上。
   */
  background: var(--on-bg-scrim);
}
/* 插画封顶 300px 宽（原为整栏 607px → 395px 高），给首屏省下约 200px */
.auth-hero .illustration-hero { max-width: 300px; }
/* 左栏这两段话直接压在落日薄纱上（右边那张 .auth-card 是白卡，不受影响） */
.auth-hero-title { font-size: var(--fs-h2); margin-bottom: 12px; line-height: 1.45; color: var(--on-bg); }
.auth-hero-desc { font-size: var(--fs-body); color: var(--on-bg-2); line-height: 1.85; margin-bottom: 14px; }
.auth-features { display: grid; gap: 8px; }
.auth-feature {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 14px;
}
.auth-feature-icon { font-size: 26px; flex-shrink: 0; line-height: 1.3; }
.auth-feature-title { font-weight: 700; }
.auth-feature-desc { font-size: var(--fs-sm); color: var(--text-2); margin-top: 4px; line-height: 1.7; }

/* ---------- 长者可读性组件 ---------- */

/* 大号说明块：解释指标含义与"为什么重要" */
.explain {
  background: var(--bg-alt);
  border-left: 6px solid var(--primary);
  border-radius: var(--r-s);
  padding: 18px 20px;
  font-size: var(--fs-body);
  line-height: 1.85;
  color: var(--text-2);
}
.explain-title { font-weight: 700; color: var(--text); margin-bottom: 8px; font-size: var(--fs-lg); }
.explain-why { color: var(--primary-text); font-weight: 700; }

/* 分步引导：编号大、留白足 */
.steps { }
.step {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-body);
  line-height: 1.8;
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary-l); color: var(--primary-text);
  display: grid; place-items: center;
  font-weight: 700; font-size: var(--fs-lg);
  flex-shrink: 0;
}

/* 安全提示：老年系统的核心组件，必须醒目 */
.safety-box { background: var(--red-l); border: 2px solid var(--red-b); border-radius: var(--r); padding: 20px 22px; }
.safety-title { font-weight: 700; color: #8E2A26; font-size: var(--fs-lg); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.safety-list { margin: 0; padding-left: 1.3em; }
.safety-list li { color: #7A2521; line-height: 1.85; margin-bottom: 10px; }

/* 训练动作卡 */
.exercise-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 16px; }
.exercise-name { font-size: var(--fs-lg); font-weight: 700; }
.exercise-dose { font-size: var(--fs-body); color: var(--primary-text); font-weight: 600; margin-top: 6px; }
.exercise-detail { font-size: var(--fs-body); color: var(--text-2); line-height: 1.85; margin-top: 12px; }
.exercise-warn { color: #8E2A26; font-weight: 600; }

/* 风险因素条目 */
.factor {
  display: flex; align-items: stretch; gap: 16px;
  padding: 18px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}
.factor-level { width: 12px; border-radius: var(--r-full); flex-shrink: 0; }
.factor-level.ok { background: var(--green); }
.factor-level.mid { background: var(--yellow); }
.factor-level.high { background: var(--primary); }
.factor-level.critical { background: var(--red); }
.factor-body { flex: 1; min-width: 0; }
.factor-title { font-size: var(--fs-lg); font-weight: 700; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.factor-evidence { font-size: var(--fs-body); color: var(--text-2); margin-top: 8px; line-height: 1.7; }
.factor-detail { font-size: var(--fs-body); color: var(--text-2); margin-top: 10px; line-height: 1.85; }
.factor-action { font-size: var(--fs-body); color: var(--primary-text); font-weight: 700; margin-top: 12px; line-height: 1.7; }

/* 餐次卡（放大版，适合老人点选）*/
.meal-slot {
  border: 2px dashed var(--line-strong);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  background: var(--card);
  min-height: 180px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  transition: all 0.18s var(--ease);
  width: 100%;
}
/*
 * 「能点」的两个信号（手形光标 + 悬停变色）都只给真正是 <button> 的餐次卡。
 *
 * 历史缺陷：写着「点一下记录」的未记录餐次是 <button>，而已记录的餐次在
 * web/js/views/checkin.js 里渲染成 **<div class="meal-slot done">** ——
 * 但它同样吃到了 cursor:pointer 与 :hover，鼠标一放上去整张卡就亮起来，
 * 点下去却没有任何反应（真正的入口是卡里那个小按钮）。
 * 长者只会得出"这个坏了"。所以把这两个信号按元素类型分开。
 */
button.meal-slot { cursor: pointer; }
button.meal-slot:hover { border-color: var(--primary); background: var(--card-hover); }
.meal-slot.done { border-style: solid; border-color: var(--green-b); background: var(--green-l); }
.meal-slot-icon { font-size: 38px; }
.meal-slot-label { font-size: var(--fs-lg); font-weight: 700; }
.meal-slot-hint { font-size: var(--fs-sm); color: var(--text-2); }

/* ---------- 通用工具类 ---------- */
.row { display: flex; align-items: center; gap: 14px; }
/* flex 子元素默认 min-width:auto，长文本会顶破容器，统一允许收缩 */
.row > * { min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; min-width: 0; }

.mt-0 { margin-top: 0; } .mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; } .mb-2 { margin-bottom: 20px; } .mb-3 { margin-bottom: 30px; }

.text-1 { color: var(--text); } .text-2 { color: var(--text-2); } .text-3 { color: var(--text-3); }
.text-ok { color: var(--green-text); } .text-warn { color: var(--yellow-text); } .text-danger { color: var(--red-text); }
.text-accent { color: var(--primary-text); }

.fs-11 { font-size: var(--fs-xs); } .fs-12 { font-size: var(--fs-sm); } .fs-13 { font-size: var(--fs-body); }
.fs-14 { font-size: var(--fs-lg); } .fs-15 { font-size: var(--fs-h3); } .fs-16 { font-size: var(--fs-h2); }
.fw-6 { font-weight: 700; } .fw-7 { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.hidden { display: none !important; }
.divider { height: 2px; background: var(--line); margin: 24px 0; border-radius: 1px; }
.scroll-x { overflow-x: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-shell { grid-template-columns: 1fr; gap: 28px; }
  /*
   * 窄屏（手机 / 竖屏平板）把**表单排到最前面**。
   *
   * 实测缺陷：单列堆叠后 DOM 顺序决定了几何顺序，而 .auth-hero 在 .auth-card 之前 ——
   * 于是在 390×844 上，「登录」按钮落在 y≈1500px 处：老人打开手机要一路滚过
   * 插画 + 标题 + 四张介绍卡才找得到"在哪儿登录"。表单才是这一页的主操作。
   * 介绍内容移到表单下面，愿意看的人再往下看（插画仍然在，只是换了位置）。
   */
  .auth-card { order: -1; }
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  :root {
    --fs-h1: 32px;
    --fs-h2: 27px;
    --fs-h3: 23px;
    --fs-num: 42px;
    --fs-num-lg: 50px;
  }
  /* 手机端：顶部第二行（6 个分组）放不下 —— 收起抽屉入口 ☰ 代替，
     抽屉里是完整的两级导航（分组 + 页面），与改造前一致。 */
  .topnav { display: none; }
  /* 收窄内边距与列间距，让「☰ + 品牌 + 智能助手徽章」在 375px 上仍排成一行
     （挤不下时 flex-wrap 会把徽章甩到第二行，白白多占 60px 高） */
  .topbar { padding: 8px 14px; column-gap: 10px; }
  .topbar-user { gap: 10px; }
  .topbar-user .user-chip, .topbar-user .btn-logout { display: none; }
  .sidebar {
    display: flex; flex-direction: column;
    background: var(--card);
    border-right: 1px solid var(--line);
    overflow-y: auto;
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    transition: transform 0.26s var(--ease);
    box-shadow: var(--shadow-lg);
    z-index: 40;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar .brand { padding: 22px 20px; border-bottom: 1px solid var(--line); }
  .sidebar-mask { position: fixed; inset: 0; background: rgba(46, 42, 38, 0.5); z-index: 39; display: none; }
  .sidebar-mask.show { display: block; }
  .menu-btn { display: inline-flex !important; }

  /* 必须用 minmax(0,1fr)：1fr 会保留内容最小宽度，被宽表格顶破 */
  .grid-2, .grid-3, .grid-4, .grid-auto { grid-template-columns: minmax(0, 1fr); }
  .card-head { flex-wrap: wrap; }
  .card { min-width: 0; padding: 20px; }
  .table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table thead, .table tbody { display: table; width: 100%; min-width: max-content; }
  .card, .alert, .metric, .exercise-card, .factor, .explain { overflow-wrap: anywhere; }
  /* 两个内边距同时以变量暴露出去：首页主视觉要"真铺满"，就得用负 margin 把
     左右内边距抵消掉，而这两个值在 ≤900px（18px）与 ≤1099px（右侧 66px）
     两处分别定义，写死数字迟早对不上。 */
  .content { padding: 18px; --pad-l: 18px; --pad-r: 18px; }
  .page-head { margin-bottom: 16px; padding: 22px 20px; }
  .board-grid { grid-template-columns: minmax(0, 1fr); }
  .btn-group .btn { flex: 1 1 auto; }
  .ring { width: 128px; height: 128px; }

  /* ---------- 窄屏下长文案按钮必须能换行、能收缩 ----------
     实测：iPhone SE（375px）打开「营养方案」，按钮「✨ 生成今天的一日营养方案」
     把页面顶破 13px（元素 right=388px > 视口 375px）。
     根因是三件事叠加：
       ① .btn 有 white-space:nowrap —— 文案不允许换行；
       ② .btn-lg 左右内边距各 34px，光内边距就吃掉 68px；
       ③ 按钮放在「标题 + 右侧操作」的卡片头里，左侧标题占了剩余宽度。
     三者任一单独存在都还好，叠加起来在 375px 就必定溢出。
     这里的修法：窄屏允许按钮文字换行、把 .btn-lg 的内边距收窄、
     并给 .row 的直接子元素补上 min-width:0（否则 flex 子项不会收缩到内容宽度以下）。 */
  .btn { white-space: normal; max-width: 100%; }
  .btn-lg { padding: 16px 20px; min-height: 60px; }
  .btn-sm { padding: 10px 14px; }
  .row > * { min-width: 0; }
  .row.wrap > .btn { flex: 0 1 auto; }
}

.menu-btn { display: none; }

/* 抽屉开着时锁背景滚动（toggleSidebar 统一加/摘 body.no-scroll）：
   再点一次汉堡、点遮罩、或点抽屉里的导航项都会走 toggleSidebar 解除。
   只写 overflow:hidden 锁不住程序滚动（滚动容器是视口），必须配合
   position:fixed 让文档高度塌缩；解锁时 JS 会把滚动位置恢复回去。 */
body.no-scroll { overflow: hidden; position: fixed; left: 0; right: 0; }

/* 375px（iPhone SE）实测顶栏折成两行（高 169px，白白多占首屏约 60px）：
   ☰ + 品牌 + AI 状态徽章一行放不下。收掉品牌副标题「长者智慧健康管家」
   （品牌名「颐年健康」与徽章都保留），一行放下。 */
@media (max-width: 420px) {
  .brand-sub { display: none; }
}

/* 健康管家页的对话区（高度由 agent.js 的内联样式控制，见那里的验算注释）。
   这里只补一条：flex 子项默认 min-height:auto，不会收缩 ——
   不加这条，对话内容一多就会把下面的输入框挤出首屏。 */
.chat-scroll { min-height: 0; }

/* ==================================================================
   图表（web/js/components.js 的 lineChart / barChart 用）
   ------------------------------------------------------------------
   两个要点：
   ① svg 用 viewBox + width:100% + height:auto 等比缩放，
      绝不能写死像素高度 —— 否则容器变宽时文字会被横向拉伸变形。
   ② 图例文字跟随正文的 19px 体系，不用小字号。
      老人看不懂 11px 的图例，等于没画。
   ================================================================== */
.chart-wrap {
  width: 100%;
  margin: var(--sp-2) 0 var(--sp-1);
  overflow: hidden;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
  margin-top: var(--sp-2);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.5;
}

.chart-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: var(--r-full);
  flex: 0 0 auto;
}

/* ---------- 新手引导（三步全屏引导）----------
 *
 * 变暗的做法：一个透明元素 + 超大范围的外投影（`0 0 0 9999px`），
 * 于是"洞里"露出原页面、洞外全部压暗 —— 比铺四块遮罩简单得多，
 * 也不会因为高亮区尺寸变化而出现缝隙。
 *
 * 关键的取舍：`.onb-root` 与 `.onb-hole` 都 **pointer-events: none**。
 * 也就是说暗区与高亮区都还能点、能滚。长者可能想先滚一下看看，
 * 如果点哪儿都没反应，他会以为系统坏了 —— 这正是本项目反复修过的那类缺陷。
 * 只有气泡本身可点（要按里面的按钮）。
 */
.onb-root { position: fixed; inset: 0; z-index: 320; pointer-events: none; }
.onb-hole {
  position: fixed;
  border-radius: 16px;
  /*
   * 变暗层：0.66 → 0.45。
   * 使用者反馈原话：「方案这块用这个小框框不太好，用户不方便看整体」——
   * 0.66 压上去，高亮框以外的内容基本读不出来，长者想先看看整页再动手做不到。
   * 0.45 仍然一眼能看出"现在该看这里"，但旁边的内容还看得清。
   * ⚠️ 展开态（既没有 .onb-lite 也没有 .onb-bright）就是上面这一档，
   *    这是"聚焦"模式，不要动它。
   */
  box-shadow: 0 0 0 9999px rgba(28, 22, 16, 0.45);
  outline: 3px solid var(--primary-btn);
  outline-offset: 3px;
  pointer-events: none;
  transition: top 0.3s var(--ease), left 0.3s var(--ease), width 0.3s var(--ease),
    height 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* ==================================================================
   「收起」与「只说一次」两个状态：整页必须**完全高亮**
   ------------------------------------------------------------------
   客户原话：「你把引导也改一下，这种不合理，收起的时候应该保证界面是高亮的。」
   实测确认这是真 bug：上一版收起态只是把遮罩**调淡**（0.45 → 0.24），
   并没有撤掉 —— 收起之后整页仍然是发暗的，长者会以为屏幕坏了/没电了。

   第一轮改法：遮罩彻底归零（连描边、圆角一起撤掉）—— 整页确实全亮了。
   客户紧接着又补了一句：「收起了高亮也不够」——
   全亮之后就看不出该动哪一块了。所以最终形态是：

     **亮的页面 + 一个橙色描边圈住"该操作的那张卡" + 底部细提示条**

   于是 .onb-lite 的最终样式是：
     · 大面积遮罩 box-shadow 的 alpha = 0（连一圈暗边都不剩）；
     · 高亮框自己挂 3px 品牌橙描边（--primary-btn）+ 3px 外偏移
       + 一圈 6px 的柔和外发光 rgba(224,122,63,.18)；
     · 圆角与页面卡片一致（--r = 20px），不再是一个"挖洞残留框"。
   过渡仍是 0.3s（box-shadow 本来就在 transition 列表里），所以是"淡出"而不是"啪一下"。

   两个类名分开写、效果**刻意不同**，因为它们对应两件不同的事：
     · .onb-lite   —— 长者**主动点「收起」**：提示条还在（随时能展开），
                      **框也还在**（一眼看得出该点哪一块）；
     · .onb-bright —— 「只说一次」的阶段（评估表）**根本不该挖洞**：
                      那种阶段高亮框尺寸是 0，遮罩会铺满整屏、连洞都没有，
                      比原来更糟，所以这个类就是用来救它的 ——
                      整页全亮、只有底部提示条、**不画圈**
                      （那种阶段没有"该点哪一块"可言，画圈只会误导）。
   展开态（既没有 .onb-lite 也没有 .onb-bright）是"聚焦"模式，
   维持 0.45 遮罩 + 挖洞，一个字都不要动。
   ================================================================== */
.onb-root.onb-lite .onb-hole {
  /* 第一层是那个 9999px 的大面积遮罩 —— alpha 归零；
     第二层是贴着框的柔和外发光，让描边在浅色卡片上也托得住。 */
  box-shadow: 0 0 0 9999px rgba(28, 22, 16, 0), 0 0 0 6px rgba(224, 122, 63, 0.18);
  outline: 3px solid var(--primary-btn);
  outline-offset: 3px;
  border-radius: var(--r);
}
.onb-root.onb-bright .onb-hole {
  box-shadow: 0 0 0 9999px rgba(28, 22, 16, 0);
  outline: none;
  border-radius: 0;
}
/* 带看模式（资料已齐全时）的说明行：解释"为什么还带我走一遍"。
   配色沿用 .alert-accent 那一套（浅橙底 + 左橙边 + 深橙字），不引入新颜色。 */
.onb-tour-note {
  font-size: var(--fs-sm);
  line-height: 1.7;
  font-weight: 700;
  color: #8A4A1E;
  background: var(--tint);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
}

/*
 * 引导提示条：**固定贴在屏幕最底部**，不再浮在内容中间。
 *
 * 历史缺陷：原先是一张 430×190 的浮动卡片，按"优先放高亮区下方 → 放上方 →
 * 都放不下就贴屏幕底部"来摆位。问题是高亮的是整张卡片（常常 500px 以上高），
 * 上面下面都没有空间，于是兜底把它放到屏幕底部 —— **正好压住页面底部的
 * 「保存」按钮**，用户点不到保存，引导反而挡住要操作的东西。
 *
 * 现在改成一条贴底的横条，并且：
 *   ① 横条高度写进 CSS 变量，`.content` 据此留出下边距，
 *      所以页面**最后一块内容（含保存按钮）永远能滚到横条上方**，不会被永久遮住；
 *   ② 横条自带"收起"按钮，长者觉得碍事可以随时收起来只剩一条细边。
 */
.onb-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 321;
  width: min(860px, calc(100vw - 16px));
  background: var(--card);
  border: 2px solid var(--primary-btn);
  border-bottom: none;
  border-radius: var(--r-l) var(--r-l) 0 0;
  padding: 12px 18px 14px;
  box-shadow: 0 -6px 26px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  transition: padding 0.24s var(--ease);
}
/* 引导进行中：给内容区留出等于横条高度的下边距，保证底部内容滚得出来 */
body.onb-active .content { padding-bottom: calc(var(--onb-bar-h, 120px) + 28px) !important; }
.onb-bar-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.onb-progress {
  flex: 0 0 auto;
  background: var(--primary-btn); color: #fff;
  font-size: var(--fs-sm); font-weight: 800;
  padding: 4px 12px; border-radius: var(--r-full);
}
.onb-title { font-size: var(--fs-h3); font-weight: 800; color: var(--text); line-height: 1.4; }
.onb-hint { font-size: var(--fs-sm); line-height: 1.65; color: var(--text-2); }
.onb-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.onb-note { font-size: var(--fs-xs); color: var(--text-3); }
/* 收起后只剩一条细边：进度 + 标题 + 「展开」，不再占屏幕 */
.onb-collapsed .onb-body { display: none; }
.onb-collapsed { padding: 8px 16px; }
.onb-collapsed .onb-bar-head { margin-bottom: 0; }
.onb-collapsed .onb-title { font-size: var(--fs-body); }

/* ---------- 随时管家（悬浮入口 + 抽屉面板）---------- */
.steward-fab {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 180;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 62px; padding: 0 24px;
  border: none; border-radius: var(--r-full);
  background: var(--primary-btn); color: #fff;
  font-size: var(--fs-body); font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(184, 90, 34, 0.42);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.steward-fab:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(184, 90, 34, 0.5); }
.steward-fab-icon { font-size: 26px; }

.steward-mask { position: fixed; inset: 0; z-index: 340; background: rgba(28, 22, 16, 0.42); }
.steward-panel {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  z-index: 341;
  /* 440 → 480：窄屏上输入框还要放"发送"，太窄会把占位提示挤没 */
  width: min(480px, 100vw);
  /* 抽屉是一块独立的浅色面板（原来是 var(--bg)：背景变深以后，
     面板里的深色正文会整片压在同色底上）。用中性暖白 --tint（R−B = 8）。 */
  background: var(--tint);
  box-shadow: -8px 0 34px rgba(0, 0, 0, 0.22);
  display: flex; flex-direction: column;
}
.steward-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.steward-head-title { font-size: var(--fs-h3); font-weight: 800; color: var(--text); }
.steward-head-sub { font-size: var(--fs-xs); color: var(--text-3); }
.steward-close {
  margin-left: auto;
  min-width: 54px; min-height: 54px;
  background: none; border: none; border-radius: var(--r-full);
  font-size: 26px; line-height: 1; color: var(--text-2); cursor: pointer;
}
.steward-close:hover { background: var(--bg-alt); }
.steward-safety {
  flex: 0 0 auto;
  padding: 10px 18px;
  background: #FDF3F2; color: var(--red-text);
  font-size: var(--fs-sm); font-weight: 700;
  border-bottom: 1px solid #F3D9D7;
}
.steward-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.steward-msg { max-width: 88%; padding: 12px 14px; border-radius: 16px; font-size: var(--fs-body); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.steward-msg.user { align-self: flex-end; background: var(--primary-btn); color: #fff; border-bottom-right-radius: 4px; }
.steward-msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); color: var(--text); border-bottom-left-radius: 4px; }
.steward-msg-meta { margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-3); }
.steward-foot {
  flex: 0 0 auto;
  padding: 12px 18px 16px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
/*
 * 输入框**独占整行**，发送按钮放到它下面。
 *
 * 历史缺陷：输入框和"发送"挤在一行，面板里输入框只剩约 290px 宽，
 * 而占位提示文字较长 —— 19px 字号下提示被截断，"字都没显示全"。
 * 现在输入框占满整宽、默认两行高（92px），长者一眼能看清自己在写什么；
 * 发送键放到下面整行，点击区也更大更明确。
 */
.steward-input {
  width: 100%;
  min-height: 92px; max-height: 200px;
  padding: 14px 16px; border-radius: var(--r);
  border: 2px solid var(--line-strong);
  font-size: var(--fs-body); font-family: inherit;
  line-height: 1.6; resize: none; background: var(--card);
  color: var(--text);
}
.steward-input:focus { outline: none; border-color: var(--primary-btn); }
.steward-input-row { display: flex; gap: 10px; margin-top: 10px; }
.steward-input-row .btn { flex: 1 1 auto; min-height: 58px; font-size: var(--fs-body); }
.steward-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

@media (max-width: 560px) {
  .steward-fab { right: 14px; bottom: 14px; padding: 0 18px; min-height: 58px; }
  .steward-panel { width: 100vw; }

  /*
   * 顶栏在 375px 上必须排成一行。
   * 实测：☰(54) + 品牌(148) + 徽章(113) + 间距 = 335px，而
   * **桌面浏览器把窗口拖到 375px 时，14px 的滚动条会吃掉宽度**，
   * 可用只剩 333px —— 就差 2px，flex-wrap 会把徽章甩到第二行，
   * 白白多占约 76px 高度。这里把内边距/间距/徽标各收一点，留出 14px 余量。
   * （真机 mobile:true 是浮层滚动条，本来就不占宽度。）
   */
  .topbar { padding: 8px 12px; column-gap: 8px; }
  .brand { gap: 10px; }
  /* 只收顶栏里的副标题；抽屉里有的是地方，副标题照常显示 */
  .topbar .brand-sub { display: none; }
  .brand-mark { width: 46px; height: 46px; font-size: 24px; border-radius: 14px; }
  .topbar .badge { padding: 4px 8px; }
}

/* 极窄屏（≤360px）：徽章让位，保证「☰ + 品牌名」完整可读不被截断。
   智能助手运行模式在「系统设置」里仍然写得很清楚。 */
@media (max-width: 360px) {
  .topbar .badge { display: none; }
}

/* ---------- 打印 ---------- */
@media print {
  /* 打印时不要背景光晕（省墨，也避免灰底影响可读性）*/
  body::before { display: none !important; }
  .sidebar, .topbar, .group-panel, .btn, .toast-wrap,
  .steward-fab, .steward-panel, .steward-mask, .onb-root { display: none !important; }
  body { background: #fff; }
  .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
}

/* ---------- 尊重系统「减少动态效果」设置 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================================================================
   板块网格（board）
   ------------------------------------------------------------------
   客户原话：「老年人不可能全部都看完，只会挑他喜欢的看，
   这样我们就分板块，然后比如首页，你就改成几个框框，老人看啥就点进去。」

   所以日常 / 方案 / 记录 三组页面都改成：
   顶部一排**并列的板块框**（每块一句状态 + 「点开看」），
   点开哪一块，下面才出现哪一块的内容，其余收起来。
   一屏只讲一件事，长者不必滚一条十几屏的长页。

   为什么每块 76px 高、左对齐、带「点开看」三个字：
   老年人手部精细动作下降，框要大；而"这块可以点"必须写出来 ——
   只靠 hover 变色，触屏上根本看不到（项目历史上修过同类问题）。
   ================================================================== */
/*
 * 客户反馈（2026-10）：「这个不太大气，把框框放大，分成两排三列。」
 * 所以桌面上固定三列（六个框正好两排），框高从 76px 提到 108px，
 * 图标 30 → 38px、标题 22 → 24px，并给每个框加上"能按下去"的层次：
 * 极浅的斜向渐变（左上偏白、右下偏暖）+ 顶部一条高光 + 双层阴影。
 */
/*
 * 客户反馈（2026-10 · 第二轮）：
 *   ① 「图一的颜色改一下，太黄了」—— 底色原来是高饱和的暖沙/琥珀色，
 *      入口卡叠在上面就黄上加黄。现在整条色阶都往**中性暖白**靠：
 *      · --bg-alt 由 #FBE7D2（琥珀）改成 #FBF6EF（几乎不偏黄的暖白）；
 *      · 本组板块框的斜向渐变末端从 #F7ECD9 收到 #F6F2EC（中性暖灰白）。
 *      文字色一个都没动、字号一个都没改，所以对比度只升不降。
 *   ② 「图二的框框再大一点」—— 六个板块框整体放大一档：
 *      高 108→132px、图标 38→44px、标题 24→26px、副标题 17→18px、
 *      内边距 20/24→24/28、网格间距 18→20px。
 */
.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.board-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 132px;
  padding: 24px 28px;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  /* 去黄后的"有光的面"：仍是三段斜向渐变（左上偏白、右下偏暖灰），
     但末端不再是琥珀色 —— 叠在深色落日背景上也不显土。 */
  background: linear-gradient(152deg, #FFFFFF 0%, #FDFBF7 52%, #F6F2EC 100%);
  border: 1.5px solid rgba(74, 62, 48, 0.10);
  border-radius: var(--r);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(74, 62, 48, 0.05),
    0 12px 26px -16px rgba(74, 62, 48, 0.30);
  cursor: pointer;
  overflow: hidden;
  /* 动效克制：只做位移与阴影，时长短（0.18s），不做旋转/缩放位移以外的花活 */
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    border-color 0.18s var(--ease);
}
/* 左上角一抹品牌色斜光：静态时也有质感，鼠标压上去更亮 */
.board-tile::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto -30%;
  height: 150%;
  background: radial-gradient(120px 90px at 18% 22%, rgba(224, 122, 63, 0.10), rgba(224, 122, 63, 0) 70%);
  opacity: 0.9;
  transition: opacity 0.18s var(--ease);
  pointer-events: none;
}
.board-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 122, 63, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 4px rgba(74, 62, 48, 0.06),
    0 20px 38px -18px rgba(74, 62, 48, 0.36);
}
.board-tile:hover::before { opacity: 1; }
/* 按下去要有"按到了"的手感：老年人手指按压力度大，反馈必须明显 */
.board-tile:active { transform: translateY(-1px) scale(0.985); }
/* 选中态用三重线索：加深的橙字 + 浅橙底 + 实心描边 + 左下一条色条。
   老年用户色觉衰退很常见，只靠颜色深浅是不够的。 */
.board-tile.on {
  border-color: var(--primary-btn);
  /* 选中态：保留橙色描边 + 左下色条这两个形状线索（颜色之外还有第二通道），
     但底色的黄也一并去掉 —— 客户第二轮明确说「大面积浅色底都要去黄」。 */
  background: linear-gradient(152deg, #FFFDFA 0%, #FAF5EF 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 2px 4px rgba(74, 62, 48, 0.06),
    0 18px 34px -18px rgba(184, 90, 34, 0.42);
}
.board-tile.on::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-btn) 100%);
}
.board-tile-icon { font-size: 44px; line-height: 1; flex-shrink: 0; filter: drop-shadow(0 2px 3px rgba(74, 62, 48, 0.12)); }
.board-tile-main { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.board-tile-title { font-size: 26px; font-weight: 800; line-height: 1.3; letter-spacing: -0.2px; }
/*
 * 副标题：板块框上那句"现在怎么样" —— 营养页的框上写的就是
 * **「热量 1,300 千卡 · 蛋白质 68 克」**、首页写「68 分 · 跌倒风险很高」。
 * 这正是全页最该被看见的那一行，原来却是 18px —— 比正文（19px）还小，属于字号倒挂。
 * 现在提到 --fs-body（19px）。同样**不去动全局的 --fs-sm**（它管着全站 17px 那一档，
 * 改它等于整站字号漂移），只改这一个类。
 */
.board-tile-sub { font-size: var(--fs-body); color: var(--text-2); line-height: 1.5; }
.board-tile-go {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--primary-text-deep);
  white-space: nowrap;
  flex-shrink: 0;
}
/* 窄屏：两列 → 一列（框仍然要大，所以不减内边距，只减列数） */
@media (max-width: 1180px) {
  .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 720px) {
  .board-grid { grid-template-columns: minmax(0, 1fr); }
  .board-tile { min-height: 96px; padding: 18px 20px; }
  .board-tile-icon { font-size: 32px; }
  .board-tile-title { font-size: 22px; }
}
.board-detail { display: flex; flex-direction: column; gap: 22px; }

/* ==================================================================
   管家卡通形象（猫头鹰）的三种用法
   ------------------------------------------------------------------
   形象本体是插画 steward-butler.svg（800×520 的场景图：猫头鹰在 x 286~494、
   y 66~290，左边还有绿植、右边是窗户和茶杯）。

   ⚠️ 小尺寸处**不能直接把整张场景缩进圆圈**。视觉评审实测第一版就是这个做法，
      结果是：头像圈里角色只有 33px 高、脸盘 14px、瞳孔 2px，
      五官糊成一团，圈里还挤进一片被圆边切掉的绿植叶和一条窗框——
      "像一张缩略截图，不像头像"。
   现在的做法是：外层 span 固定尺寸 + overflow:hidden 当取景框，
   里面的 img 放大到 364%×236% 并偏移到只露出头肩那一片
   （等效于只显示源图 x 280~500、y 60~280）。这些比例是按 SVG 里的坐标算的。
   ================================================================== */
.mascot-avatar,
.mascot-head {
  position: relative;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
  background: #FDF3E7;
}
.mascot-avatar { width: 44px; height: 44px; border-radius: 50%; }
.mascot-head { width: 48px; height: 48px; border-radius: var(--r-s); }
.mascot-avatar img,
.mascot-head img {
  position: absolute;
  width: 364%; height: 236%;
  left: -127%; top: -27%;
  max-width: none;
}
/*
 * 圆形头像要再放宽一点。
 * 视觉评审实测：方形（.mascot-head）里能看到完整的头肩，是最好的一处；
 * 但同一组数值放进**圆形**时，圆的内接区域把头顶两撮耳羽切掉了。
 * 所以圆形单独重算：取景窗口从 220 放大到 260 个源坐标单位
 * （等效只看源图 x 260~520、y 44~304），圆心对准 (390,174)，
 * 于是耳尖 y=66 与下巴 y=290 都落在内接圆里。
 *   缩放 44/260 = 0.169 → 图宽 800×0.169 = 135px = 307%；图高 520×0.169 = 88px = 200%
 *   偏移 left = -(390×0.169 − 22) = −43.9px ≈ −100%；top = -(174×0.169 − 22) = −7.4px ≈ −17%
 */
.mascot-avatar img {
  width: 307%; height: 200%;
  left: -100%; top: -17%;
}
/* 面板空状态里的横条：宽度铺满，只留角色本身（上下裁到 y 60~335，保住耳朵） */
.mascot-banner {
  display: block; width: 100%; height: 150px;
  border-radius: var(--r-s);
  object-fit: cover; object-position: 46% 24%;
  background: var(--bg-alt);
}

/* ==================================================================
   质感与动效（2026-10 客户反馈：「太纯色了很单调，做个高级大气时尚的 UI，
   点击反馈、滑动反馈、界面切换反馈都做出点好看的特效」）
   ------------------------------------------------------------------
   做法分四层，全部是纯 CSS，不引入任何图片、字体或第三方库：

   ① 质感：把"纯色块"换成"有光的面"
      · 卡片：极浅的斜向渐变 + 顶部 1px 内高光 + 双层阴影（近处淡、远处柔）
        —— 这是"贵"的来源：物体有受光面、有接触阴影，而不是一块平色。
      · 深色标题区：墨绿渐变 + 右上一团柔光 + 左下一条品牌色短线。
      · 页面底纹：在原有暖沙渐变上再叠两层极淡的品牌色光晕（radial）。
      ⚠️ 每处都**同时写 background-color 和 background-image**：
         纯渐变会让 computed background-color 变成透明，
         而老年可用性视觉审计正是拿这个颜色算文字对比度的 ——
         写成透明会把整页文字判成"对比度无法判定"。

   ② 点击反馈：按下去必须有反应（长者手指按压力度大，反馈要明显）
      · 按钮/板块框：:active 时轻微缩小 + 阴影收拢
      · 悬停：上浮 2~3px + 阴影加深（桌面端鼠标）

   ③ 界面切换反馈：路由切换时内容淡入并轻微上移（.view-enter 已有动画钩子，
      这里把它做成"进入时更明显、但仍在 0.3s 内结束"）。

   ④ 滑动反馈：滚动时顶栏浮起（scroll-driven animation，只改阴影、不改布局）。
      用 animation-timeline: scroll()，Chrome/Edge 支持，不支持的浏览器
      只是没有这个效果，不会有任何降级问题。

   ⚠️ 全部动效都尊重系统的「减少动态效果」：prefers-reduced-motion: reduce 时一律关掉。
      项目设计原则第 6 条写的是「克制的动效、不做位移」，
      本轮按客户要求加了位移与光效，但仍守住两条底线：
      时长 ≤0.3s、不做视差与循环大幅运动（唯一例外是管家形象缓慢的呼吸/摆手，
      幅度 ≤4°，是它"像个活人"的关键）。
   ================================================================== */

/* ---------- ① 卡片：有光的面 ---------- */
/*
 * 卡片**不加渐变**，这一点是实测决定的：
 *   · 视觉评审量过，458×118 的卡上斜向渐变的亮度差只有 1.8%，肉眼根本看不见；
 *   · 但评估页整页高 12000+ px，满屏渐变会显著提高 PNG 熵，
 *     作品截图「每张 < 1MB」的要求当场被顶破（实测 1153 KB）。
 * 所以卡片只用「描边 + 顶部内高光 + 远近两层阴影」做出厚度，
 * 渐变留给面积小得多、又最显眼的板块框（.board-tile）和深色标题区。
 */
.card {
  /*
   * 卡片**必须不透明**，这一点是拿测试实测出来的，别再改成半透明：
   * 试过 rgba(255,255,255,.93) + backdrop-filter，想让落日从卡片背后透出来，
   * 结果「背景底纹安全边界」套件当场 11 项失败 —— 因为它的判定逻辑是
   * 「谁的祖先里没有不透明背景，就算坐在页面背景上」，
   * 卡片一透，卡片里的**每一段文字**都被算成坐在页面背景上，
   * 它们自己的深色文字像素又被当成"背景最深像素"，于是算出 1.00:1。
   * 落日已经由页面背景（--bg-image）与标题区承担，卡片保持纯白最稳。
   */
  background-color: var(--card);
  border: 1px solid rgba(74, 62, 48, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(74, 62, 48, 0.045),
    0 14px 30px -18px rgba(74, 62, 48, 0.26);
}
/* 浅色玻璃标题区：暖白 0.9 + 背景模糊 + 右上一团很淡的暖光 + 左下一条品牌色短线。
   为什么不再是深色块：见上面 .page-head 第一段注释（作品截图的亮度硬断言 + 深色压在晚霞上发糊）。 */
.page-head {
  background-color: rgba(252, 249, 245, 0.9);
  /* 只留一团很淡的暖光（不再铺整块橘红渐变，也就不会"黄上加黄"）——
     客户第二轮的原话是「入口卡还是黄」，所以连标题区的高光也一并降饱和。 */
  background-image:
    radial-gradient(600px 240px at 86% -22%, rgba(246, 214, 168, 0.45), rgba(246, 214, 168, 0) 72%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(74, 62, 48, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 36px -24px rgba(58, 35, 32, 0.5);
  position: relative;
  overflow: hidden;
}
.page-head::after {
  content: '';
  position: absolute;
  left: 34px; bottom: 0;
  width: 72px; height: 4px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, #F8C976 0%, #E07A3F 100%);
}
/*
 * ⚠️ 这里原本有一版「给 body 自己叠两团品牌色光晕」的写法，已撤销，原因有三：
 *   ① 背景图案在本项目里**只能**挂在 body::before 上（见文件开头的注释），
 *      body 自身必须是纯色 —— 因为「背景底纹安全边界」套件要靠
 *      body 的 background-color 来判断"哪些文字直接坐在页面背景上"，
 *      而它的探测函数一旦遇到带 background-image 的祖先就直接返回"无法判定"。
 *      实测把渐变加到 body 之后，那个套件从 100+ 个元素掉到 0 个，直接判失败。
 *   ② 整页那么高（评估页 12000+ px）再叠两个 900px 的大光晕，
 *      截图 PNG 体积会涨到 1MB 以上，而作品截图的要求是每张 < 1MB。
 *   ③ 视觉评审实测这两团光晕只是"把上半页提亮、下半页压闷"，观感并没有变好。
 * 质感改由卡片与标题区承担（见上面 .card / .page-head）。
 */

/* ---------- ② 点击 / 悬停反馈 ---------- */
/*
 * ⚠️ 只有**真能点**的元素才给悬停/按下反馈。
 *
 * 实测缺陷：这三条原来写的是 `.choice, .illu-strip-item, .meal-slot`，不带标签选择器，
 * 于是**纯展示**的元素也照单全收：
 *   · 营养方案「一天要补够的三样」、运动方案「一周怎么安排」、首页「今天这几件小事」
 *     用的是 <div class="illu-strip-item">（不能点），鼠标压上去却会浮起来、按下去会缩一下；
 *   · 餐食记录里**已记录**的那一餐是 <div class="meal-slot done">（不能点），
 *     同样有悬停浮起与按下回弹。
 * 长者得到的信号是"这里能点"，点下去毫无反应 —— 只能得出"这系统坏了吧"。
 * 能点的那几个位置渲染的都是 <button>，所以把反馈绑到标签上即可：
 * 能点的有反馈，展示用的保持安静。
 */
.btn { transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.18s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(74, 62, 48, 0.45); }
.btn:active { transform: translateY(0) scale(0.97); box-shadow: 0 3px 8px -6px rgba(74, 62, 48, 0.5); }
.btn-primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px -12px rgba(184, 90, 34, 0.7); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 14px 26px -12px rgba(184, 90, 34, 0.72); }
button.choice, button.illu-strip-item, button.meal-slot { transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.18s var(--ease); }
button.choice:hover, button.illu-strip-item:hover, button.meal-slot:hover { transform: translateY(-2px); }
button.choice:active, button.illu-strip-item:active, button.meal-slot:active { transform: translateY(0) scale(0.98); }

/* ---------- ③ 界面切换与滚动渐出 ---------- */
@keyframes view-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.view-enter { animation: view-rise 0.3s var(--ease) both; }

/*
 * 滚动渐出：卡片进入视口时淡入并轻轻上移（参数取自 deepseek.com/harness 的实测值：
 * ease-out、0.2s 的 opacity+transform 过渡、进场动画 0.7~0.9s）。
 * `.reveal` 由 util.js 的 render() 打上（见那里的注释：为什么不用纯 CSS 的
 * animation-timeline —— 整页截图会把屏幕外的内容拍成空白）。
 */
@keyframes reveal-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.996); }
  to   { opacity: 1; transform: none; }
}
.reveal { opacity: 0; }
.reveal.is-in {
  animation: reveal-rise 0.62s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

@media (prefers-reduced-motion: no-preference) {
  /* 卡片随界面切换依次亮起（最多 6 个错峰，避免长列表尾巴拖太久） */
  .view-enter .card { animation: view-rise 0.34s var(--ease) both; }
  .view-enter .card:nth-child(1) { animation-delay: 0.02s; }
  .view-enter .card:nth-child(2) { animation-delay: 0.06s; }
  .view-enter .card:nth-child(3) { animation-delay: 0.10s; }
  .view-enter .card:nth-child(4) { animation-delay: 0.14s; }
  .view-enter .card:nth-child(5) { animation-delay: 0.18s; }
  .view-enter .card:nth-child(n+6) { animation-delay: 0.22s; }
}

/* ---------- ④ 滑动反馈：滚动时顶栏浮起（只改阴影，不改布局） ---------- */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes topbar-lift {
      from { box-shadow: 0 0 0 rgba(74, 62, 48, 0); }
      to   { box-shadow: 0 10px 24px -16px rgba(74, 62, 48, 0.45); }
    }
    .topbar {
      animation: topbar-lift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 160px;
    }
  }
}

/* ---------- ⑤ 管家形象动起来 ---------- */
/*
 * 「右下角的管家有没有什么动态互动，更生动一点」——
 * 让它像一个在旁边待着的人：缓慢起伏（呼吸）、偶尔歪头摆手、
 * 过一会儿冒一句话邀请长者开口；鼠标移上去会站直一点，按下去会缩一下。
 */
@keyframes fab-breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes fab-wave {
  0%, 62%, 100% { transform: rotate(0deg); }
  68%           { transform: rotate(-5deg); }
  74%           { transform: rotate(4deg); }
  80%           { transform: rotate(-3deg); }
  86%           { transform: rotate(0deg); }
}
@keyframes fab-hint {
  0%, 70%, 100% { opacity: 0; transform: translateY(4px) scale(0.96); }
  76%, 96%      { opacity: 1; transform: translateY(0) scale(1); }
}
.steward-fab {
  /*
   * ⚠️ 这里**不能**写 position: relative —— 悬浮入口原来就是 position: fixed
   * 贴在右下角的，改成 relative 会让它掉回文档流里（实测 bottom 变成 -596px，
   * 「新手引导与随时管家」套件当场报错）。fixed 元素本身就是定位祖先，
   * 下面那个 ::after 气泡照样能挂在它上面。
   */
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
  animation: fab-breathe 4.2s ease-in-out infinite;
}
.steward-fab .mascot-avatar {
  transform-origin: 50% 78%;
  animation: fab-wave 9s ease-in-out infinite;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}
/* 悬停：站直、放大一点、阴影更深；按下：缩一下 —— 都是"活的"信号 */
.steward-fab:hover { transform: translateY(-4px) scale(1.04); animation-play-state: paused; }
.steward-fab:active { transform: translateY(-1px) scale(0.97); }
/* 过一会儿冒一句邀请（纯装饰，不挡内容、不拦点击） */
.steward-fab::after {
  content: '问我一句';
  position: absolute;
  right: 6px; bottom: calc(100% + 10px);
  padding: 8px 14px;
  border-radius: var(--r-s) var(--r-s) 2px var(--r-s);
  background: #FFFFFF;
  color: var(--primary-text-deep);
  font-size: var(--fs-sm);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 24px -14px rgba(74, 62, 48, 0.5);
  border: 1px solid rgba(224, 122, 63, 0.28);
  opacity: 0;
  pointer-events: none;
  animation: fab-hint 14s ease-in-out 3s infinite;
}

/* ==================================================================
   管家浮球的「安全区」：浮球不许压在正文文字上
   ------------------------------------------------------------------
   实测缺陷（CDP 逐文字节点做矩形相交，1440×900）：
     浮球占据 x∈[1243,1402]、y∈[811,873]，而正文卡片一直铺到 x=1412，于是
       · 今日概览压住正文一行（相交 81×25px）；
       · 营养方案压住「AI 大模型生成」徽章（相交 109×22px）；
       · 餐食记录压住「下午加餐」（相交 18×28px）。
     长者读到一半被挡住半个字，点一下又跳到别的页面 —— 这是最招人烦的一类缺陷。

   三点做法：
     ① ≥900px：正文列右侧留出一条 **管家竖栏**（--fab-rail），浮球停在栏里，
        正文一个字都不会伸进去（栏宽按浮球 159px + 右边距 24px + 余量实测取 200px）；
     ② <900px：浮球收成一个 64px 的圆形头像，并把「问一句」气泡关掉
        （气泡是绝对定位、会飘到浮球上方，小屏上必然压字）；
     ③ 页面底部再补一段与浮球等高的内边距：滚到最底下时最后一行也不会落到浮球下面。

   注意：浮球仍然固定在视口右下角、仍然满足 54px 点击标准
   （onboarding-test 有「固定定位 + 贴右下角 + ≥54px」三条断言），
   这里改的只是它占的位置和正文列让出来的空间。
   ================================================================== */
:root {
  --fab-rail: 0px;        /* ≥1100px 时右侧让给浮球的竖栏宽度 */  --fab-safe-bottom: 96px;  /* 页面底部为浮球留出的高度 */
}
/*
 * ⚠️【结论已推翻，保留作为取舍记录】下面这段当年是为**横向让位**辩护的，
 * 但客户实机反馈「界面都歪了」：左右内边距 26 / 140 不对称 + 一条整页高的平色带。
 * 横向让位已撤（见下方 @media 里的新注释），这里只保留**纵向**的底部留白。
 * 原文理由如下：
 * 让位区必须铺一层**不透明的浅色**，不能让落日渐变直接露出来。
 *
 * 为什么：作品截图有一条坏图门禁 —— 整页截图（browser-test：1280×900、
 * captureBeyondViewport）的平均亮度必须 ≥200，米白主题正常约 243。
 * 实测（CDP 截图 + 自写 PNG 解码，1280 宽）：
 *   健康档案页让位露出深色渐变时 195.4，把让位铺成 --tint 后回到 205 以上；
 *   健康管家页同理 196.2 → 209.7。深色让位一开就是 -10 分起步，直接压线不合格。
 * 这两块区域按设计本来就是**空的**（没有文字、没有卡片），铺浅色不影响任何文字的
 * 对比度：有文字的地方都在卡片里，卡片自己是不透明的，审计取到的背景是卡片底色。
 * 视觉上它读起来就是一条「管家竖栏」——浮球停在栏底，正文一个字都不进去。
 */
.content {
  padding-bottom: var(--fab-safe-bottom);
  /* 底部那条 --tint 平色带已删除：客户反馈「最下面怎么有个白色的地方不好看，每个界面都有」。
     它当初是为了把整页截图平均亮度从 195 拉回 200 以上而铺的，但代价是每个页面底部都多一条白带。
     下面 padding-bottom 保留 —— 那是**看不见的留白**，作用是不让浮球压住最后一张卡。 */

}
/*
 * 断点取 1100px，而不是 900px。
 *
 * 为什么：让位宽度直接决定正文列右边空出多宽，而 900~1099px 这一带本来就只剩
 * 900px 出头，一下让掉 112px 会突然变窄一大截，换个窗口大小版式就跳一次。
 * 代价是浮球不能再挂「健康管家」四个字（带字要 178px 宽），改成只留头像的圆钮 ——
 * 名字并没有丢：aria-label 是「打开健康管家」，抽屉面板标题、导航项也都是「健康管家」，
 * 浮球上的气泡写着「问一句」。浮球在「健康管家」页会自动收起，两个入口不会同时出现。
 */
@media (min-width: 1100px) {
  /*
   * ⚠️ 这里曾经让出 112px 宽的「管家竖栏」（padding-right + 一条 --tint 平色带）。
   *
   * 2026-10 客户在实机上看了一眼就指出「界面都歪了」——实测数据支持他：
   *   .content 左内边距 26px、右内边距 140px，整列内容被推向左边 114px；
   *   而且右侧 1310→1440 是一条整页高的纯色 #FBF8F3 平色带（逐像素取样确认）。
   * 为了一条亮度门禁的 10 分，把整页版式做成左右不对称，这个交换是错的：
   * 卡片本来就是**不透明**的，正文列铺满时它们自己就把深色落日渐变盖住了 ——
   * 撤掉让位之后亮度反而更高，两边的诉求根本不冲突。
   * 现在浮球改回标准做法：一个 62px 圆钮漂在右下角，正文列左右对称（都是 26px）；
   * 页面底部仍留 --fab-safe-bottom 的空白，那是**纵向**留白，不影响左右对称。
   */
  .content {
    /* 底部那条 --tint 平色带已删除：客户反馈「最下面怎么有个白色的地方不好看，每个界面都有」。
     它当初是为了把整页截图平均亮度从 195 拉回 200 以上而铺的，但代价是每个页面底部都多一条白带。
     下面 padding-bottom 保留 —— 那是**看不见的留白**，作用是不让浮球压住最后一张卡。 */

  }
  .steward-fab {
    width: 62px; min-width: 62px; min-height: 62px;
    padding: 0; justify-content: center;
    border-radius: 50%;
  }
  /* 让位里放不下带字的胶囊，只留头像（见上） */
  .steward-fab > span:not(.mascot-avatar) { display: none; }
  .steward-fab .mascot-avatar { width: 44px; height: 44px; }
  /*
   * 「问一句」气泡必须**整条落在竖栏里**，否则它自己就会压住正文。
   * 实测：气泡宽 81px、右边缘 = 浮球右边距 16 + 6 = 视口宽 − 22，
   * 左边缘 = 视口宽 − 103；竖栏宽 112 → 正文右边缘 = 视口宽 − 140，
   * 气泡仍在栏内，留 37px 余量。
   */
  .steward-fab::after {
    content: '问一句';
    right: 6px; bottom: calc(100% + 10px);
    padding: 8px 14px;
    font-size: var(--fs-sm);
  }
}
/*
 * 小屏（<1100px）的让位同样算着来。
 *
 * 踩过的坑：这里一开始写的是 `padding-right: calc(18px + 88px)`（浮球 64px + 右边距 14 + 余量），
 * 结果正文列窄了 88px，而「能力评估」页的人体示意图是按容器宽度等比缩放的 ——
 * 图上五个 60 单位的圆形编号（role=button）实测从 69px 缩到 48~52px，
 * 直接踩穿了项目自定的「所有可点元素 ≥54px」，手机端套件当场报 5 处不合格。
 *
 * 所以小屏改成：浮球收成 54×54 的圆、贴右边 8px，正文只让 66px。
 * 算账（375px 最小屏，实测值）：
 *   正文列 = 375 − 18（左） − 66（右）= 291px
 *   卡片内宽 = 291 − 2×18（≤560px 时 .card 内边距收到 18）= 255px
 *   人体图 svg = min(255, 300) = 255px → 编号 = 255 / 260 × 60 ≈ 58.8px ≥ 54 ✓
 *   浮球左边缘 = 375 − 8 − 54 = 313px；正文右边缘 = 375 − 66 = 309px → 间距 4px ✓
 */
@media (max-width: 1099px) {
  .content {
    padding-right: 66px;
    --pad-r: 66px;
    /* 右侧 66px 与底部两条 --tint 平色带都已删除（客户两次反馈：「界面都歪了」= 右侧那条；
       「每个界面最下面都有块白的」= 底部那条）。padding-right 保留：窄屏下它是给浮球
       让位的**看不见的留白**，不留就会让浮球压住正文。 */
  }
  .steward-fab {
    right: 8px; bottom: 14px;
    width: 54px; min-width: 54px; min-height: 54px;
    padding: 0; justify-content: center;
    border-radius: 50%;
  }
  .steward-fab > span:not(.mascot-avatar) { display: none; }
  /* 小屏上气泡会飘到 66px 的让位之外，直接关掉 */
  .steward-fab::after { content: none; }
  .steward-fab .mascot-avatar { width: 40px; height: 40px; }
}
/* 手机端把卡片内边距收一档：正文列本来就只有 291px，24px 的内边距太奢侈。
   这一档同时把「人体示意图按容器等比缩放 → 圆形编号不足 54px」的风险压下去（见上）。 */
@media (max-width: 560px) {
  .card { padding: 18px; }
}

/* ==================================================================
   首页通栏主视觉「夕阳下散步」
   ------------------------------------------------------------------
   客户原话：「像这个日常的首页能不能开头整个超大的老人在夕阳下散步的背景图，
   好直接吓哭评委」。它就是首页最上方那一整条落日海岸（本地手绘 SVG：
   web/assets/illustrations/sunset-walk.svg），问候语、日期、
   照护思路与跌倒风险分、今天那句状态说明**全部叠在这张图上**。

   为什么高度定在 360px 上下、而不是"占满整屏"：
     · 首页的纵向预算是被卡死的 —— 首屏要放得下「照护思路 / 跌倒风险分数 /
       今天最需要做的一件事」（visual-audit 有三条首屏断言，视口 1600×1000），
       还要放得下这条主视觉里的主操作按钮；
     · 高度再往上加，下面那张「今天最需要做的一件事」就会被推出首屏。

   ⚠️ 两条不能改坏的硬约束：
     ① .dash-hero 必须有一个**不透明**的 background-color。
        视觉审计取文字背景的口径是"向上找到第一个不透明的 background-color"，
        而它**看不见图片**。这里填的 #554C43 不是随手取的：
        它是"文字区最坏情况的合成色" —— v3 的暗纱（0.72 那一档）压在画面最亮的
        天空（#FDE9C8，亮度 233）上算出来的颜色。于是审计算出的对比度
        与真实像素基本一致，而不是被悄悄放高。
        实测（v3）：主色 #F6E7D6 对它 8.5:1、次级色 #EBD5BC 对它 5.9:1
        （要求均 ≥4.5）；同一处"逐像素采样文字行盒下最亮的那一点"则是
        问候语 7.1:1、日期 6.1:1、状态句 6.0:1 —— 两套口径都对得上。
        ⚠️ v3 换了暗纱色标之后**这个常量不用改**：实测文字行盒下最亮的合成像素
        是 #574B3D（亮度 77），与 #554C43（亮度 77.3）几乎一致 —— 它仍然精确地
        等于"最坏情况的合成色"，而不是一个被留在原地的旧值。
     ② 画面必须偏亮：browser-test 会算每张作品截图的平均亮度（要求 ≥200）。
        所以插画大面积是金橙天空、暗部只占很小一块 ——
        实测这条主视觉：插画本体在桌面端可见带（y 172~396）内的平均亮度
        200.6 → **211.3**（v3 返工后）；叠上暗纱的整条横幅 106.2 → 125.4。
   ================================================================== */
.dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-l);
  background-color: #554C43;
  color: var(--on-bg);
  min-height: 340px;
  display: flex;
  align-items: stretch;
  box-shadow: 0 18px 36px -26px rgba(58, 35, 32, 0.6);
}
/* 图片层：铺满整条。object-position 纵向 58% 是为了让要紧的东西
   （落日、海平线、三位老人）正好落在裁切后的可见区里 —— 见 SVG 文件头说明。 */
.dash-hero-art { position: absolute; inset: 0; }
.dash-hero-img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 58%;
}
/* 默认只用横版；竖版（手机）在 ≤620px 才启用 —— 见文件末尾「第十三代」 */
.dash-hero-img--tall { display: none; }
/* 暗纱：**只压在左边那一列文字后面**，过了文字列就迅速化开。
   v3 返工（客户看过实物图之后说「而且也不亮眼」）把它从"压掉画面 62% 宽"
   收成"只压文字列"：文字列最右端实测 x=533px（1280 宽、主视觉 1214×340 时
   .dash-hero-copy 是 34..533），所以暗纱在 545px 之前保持在 0.72 以上、
   645px 之后迅速化开、885px 归零。于是画面右半边的金橙天空与落日
   （1280 宽时太阳的日面落在 841~981px）几乎不再被压暗 ——
   这是整条主视觉"变亮"里贡献最大的一处（不是把插画画得更亮）。

   ⚠️ 色标用 **px 而不是 %**，这是这一版最关键的一处修正：
     文字列的实际宽度是**内容撑出来的**（由两个状态芯片的最大内容宽度决定，
     约 500px），它不随主视觉变宽而变宽 —— 所以按 % 写的暗纱在窄一点的窗口上
     会"提前化开"。按 44% 的色标推算：主视觉 1049px 宽（视口 1101px）时文字列
     已经伸到 50.8%，那一带的合成亮度约 118，19px 的字只剩 2.9:1；
     改成 px 之后这一档永远压在文字列右端（≤546px）之外。配合
     .dash-hero-copy 的 px 上限（min(78%, 500px)），文字列在 901px 以上的
     任何窗口宽度下都不会跑出暗纱 —— 实测 1024px 下仍是 6.2:1。

   ⚠️ 这几个数不是随手写的，它同时卡着三件事（都可以复测）：
     · 文字对比度：暗纱最薄的那一点上，最亮的天空像素（#FDE9C8，亮度 233）
       合成后要压到亮度 90 以下 —— 实测（无头浏览器把文字设 visibility:hidden 后
       逐像素采样文字行盒、取最亮像素算 WCAG）：19px 的状态句 6.0:1、日期 6.1:1、
       36px 的问候语 7.1:1（要求分别 ≥4.5 与 ≥3）；1024px 下 6.2:1、1600px 下 5.9:1；
     · 整页截图平均亮度：暗纱盖住的面积越大、整页越暗。这道闸门是 ≥200，
       实测（1280×900）这一条主视觉自身的平均亮度 125.4/255（返工前 106.2）；
     · 落日要完整露出来：暗纱必须赶在日面左缘之前化开（1280 宽时是 841px，
       暗纱在 805px 已经只剩 0.05），否则那颗白核落日会被压成一块灰盘。 */
.dash-hero-veil {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(96deg,
      rgba(20, 12, 6, 0.80) 0px,
      rgba(20, 12, 6, 0.76) 300px,
      rgba(20, 12, 6, 0.72) 545px,
      rgba(20, 12, 6, 0.50) 645px,
      rgba(20, 12, 6, 0.22) 725px,
      rgba(20, 12, 6, 0.05) 805px,
      rgba(20, 12, 6, 0) 885px),
    linear-gradient(180deg, rgba(20, 12, 6, 0) 64%, rgba(20, 12, 6, 0.12) 100%);
}
.dash-hero-body {
  position: relative;
  z-index: 1;
  padding: 28px 34px;
  max-width: 66%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
/*
 * 文字块：两层上限一起用 —— 78%（跟着父元素 .dash-hero-body 按比例缩）
 * 与 500px（绝对值兜底）。
 *
 * 为什么必须这样绕一层（而不是给每个文字元素写个 px 上限）：
 *   max-width 的百分比是**按父元素**算的。父元素 .dash-hero-body 的宽度
 *   是"内容的宽度"（两个状态芯片并排，约 640px），不是主视觉的固定比例，
 *   所以照抄一个 % 上去，换窗口宽度时文字列会跑到暗纱很薄的地方 ——
 *   实测（1280px 宽、只有一层时）：日期那一行的右端会伸到暗纱仅剩 0.35 的地方，
 *   那一带的天空一亮，19px 的日期就掉到 1.91:1。
 * 为什么还要 500px：v3 的暗纱是**按 px 定点**的（545px 之前保持 0.72），
 *   只有把文字列的绝对宽度也钉住，"文字一定在暗纱里"才是可证的 ——
 *   实测 1280px 下这一层算出来 498px，与加 px 上限之前**完全一致**（没有改版观感），
 *   它只在"芯片文案更长把 .dash-hero-body 撑宽"这种情形下才起作用。
 */
.dash-hero-copy { max-width: min(78%, 500px); }
.dash-hero-greet {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.24;
  color: var(--on-bg);
}
/* 日期用 --on-bg-2（而不是更暗的 --on-bg-3）：它只有 19px，
   对"文字区最亮的那一点"要留出余量 —— 实测 --on-bg-3 在 1280px 下会掉到 4.5 以下 */
.dash-hero-date { font-size: var(--fs-body); color: var(--on-bg-2); }
.dash-hero-line { font-size: var(--fs-body); color: var(--on-bg-2); line-height: 1.7; }
.dash-hero-actions { margin-top: 8px; }
/* 主操作按钮：白底 + 深橙字（对白底 8.3:1）。压在暗纱上最醒目，
   而且它就在主视觉里 —— 无论屏幕多矮，老人打开首页第一眼就能看到
   "今天该干什么"，不用滚动、不用找。58px 高，超过项目自定的 54px 标准。 */
.dash-hero-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px;
  padding: 0 30px;
  border: none;
  border-radius: var(--r-full);
  background: #FFFFFF;
  color: var(--primary-text-deep);
  font-size: var(--fs-lg);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(20, 12, 6, 0.65);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.dash-hero-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(20, 12, 6, 0.72); }
.dash-hero-cta:active { transform: translateY(0) scale(0.98); }
.dash-hero-cta-arrow { font-size: var(--fs-lg); }

/* 平板：文字列放宽一点，主视觉再收一档。
   ⚠️ 这一档的暗纱必须**另给一套 px 色标**：主视觉只有 900~1050px 宽，
   而 1280 那一套的化开位置在 885px —— 照抄过来的话，右侧那颗落日
   （这一档里它落在 620~740px）会被压在暗纱最厚的那一段下面。
   所以这里把整套色标按比例压到 640px 收尾，同时把文字列的上限也收到 396px，
   让"文字列右端 448px < 暗纱仍在 0.72 的 450px"这条关系继续成立。 */
@media (max-width: 1100px) {
  .dash-hero { min-height: 330px; }
  .dash-hero-body { max-width: 76%; padding: 24px 26px; }
  .dash-hero-copy { max-width: min(78%, 396px); }
  .dash-hero-veil {
    background-image:
      linear-gradient(96deg,
        rgba(20, 12, 6, 0.80) 0px,
        rgba(20, 12, 6, 0.76) 250px,
        rgba(20, 12, 6, 0.72) 450px,
        rgba(20, 12, 6, 0.50) 520px,
        rgba(20, 12, 6, 0.22) 570px,
        rgba(20, 12, 6, 0) 640px),
      linear-gradient(180deg, rgba(20, 12, 6, 0) 64%, rgba(20, 12, 6, 0.12) 100%);
  }
}
/* 手机竖屏：文字占满整幅，暗纱改成以纵向为主（横向渐变在窄屏上护不住右侧） */
@media (max-width: 900px) {
  .dash-hero { min-height: 300px; }
  .dash-hero-body { max-width: 100%; padding: 22px 22px; }
  /*
   * ⚠️ 窄屏要**换一扇窗**，不能沿用桌面端那个 50% 46%。
   *
   * 手机竖屏的容器又窄又高（306×约 470），object-fit:cover 会按**高度**缩放，
   * 横向只剩画面 43% 宽的一条 —— 实测 46% 那一档只截到画面中左部，
   * 落日与三位老人**全在窗外**，整条主视觉在手机上就变成一块看不出内容的暗板。
   * 换到 92% 才把"夕阳 + 三位散步的老人 + 岸边芦苇"这一组收进窗内。
   */
  .dash-hero-img { object-position: 92% 50%; }
  /*
   * ⚠️ 小屏把状态芯片排到主按钮**之后**。
   *
   * 实测（375×667，iPhone SE）：按"问候 → 日期 → 一句话 → 两个芯片 → 按钮"的顺序，
   * 主按钮落在 635~693px，被挤出首屏 26px —— 老人打开首页就看不到那个唯一的入口。
   * 芯片是背景信息、按钮是动作，窄屏上动作优先；宽屏两者都在首屏内，仍按原顺序。
   */
  .dash-hero-chips { order: 1; }
  .dash-hero-veil {
    background-image:
      linear-gradient(180deg,
        rgba(20, 12, 6, 0.68) 0%,
        rgba(20, 12, 6, 0.76) 44%,
        rgba(20, 12, 6, 0.86) 100%);
  }
}
@media (max-width: 560px) {
  .dash-hero { min-height: 286px; border-radius: var(--r); }
  .dash-hero-body { padding: 18px 18px; gap: 6px; }
  .dash-hero-greet { font-size: var(--fs-h3); }
  .dash-hero-cta { width: 100%; }
}

/* 矮屏笔记本（≥1200 宽 × ≤900 高）的首页纵向预算：
   1440×900 实测「今天最需要做的一件事」卡片里的两个按钮
   top=863 / bottom=931 —— 只露出 31px（改版前 869/937 同病）。
   这一档刻意放在**主视觉基础规则之后**（层叠顺序：同优先级后写者赢）。
   三处各收一点：主视觉 340→300（内容实测 295 装得下）、卡片头间距 18→12、
   提示条内边距 18→14，共约 54px —— 按钮落到 809~877，完整回到首屏。
   1600×1000 的视觉审计视口高度 1000 > 900，不命中本档，三条首屏断言不受影响。 */
@media (max-height: 900px) and (min-width: 1200px) {
  .dash-hero { min-height: 300px; }
  .dash-hero-body { padding-top: 20px; padding-bottom: 20px; gap: 6px; }
  .card-head { margin-bottom: 12px; }
  .alert { padding: 14px 20px; }
}

/* ==================================================================
   登录页在矮屏笔记本（1366×768 这类）上也要一屏放得下
   ------------------------------------------------------------------
   实测：1440×900 压到 scrollHeight = 900（见 .auth-page 那段注释），
   但同一份内容在 1366×768 上仍然是 879px —— 还得往下滚，
   「▶ 再看一次开场动画」那颗按钮照样在折线以下。
   这一档只在**桌面宽度 + 矮屏**时生效（min-width: 900px 排除了手机，
   手机的登录页是单列堆叠，另有自己的节奏），减的全是装饰内容：
   logo 方块与那句品牌副标题（大标题「颐年健康」还在）、以及各处 2~4px 的留白。
   正文 19px 与所有按钮的 ≥54px 一个都没动。
   ================================================================== */
@media (min-width: 900px) and (max-height: 830px) {
  .auth-page { padding: 12px 24px; }
  .auth-card { padding: 20px; }
  .auth-logo { display: none; }
  .auth-sub { display: none; }
  /* 左栏插画再收一档：这一档下"两列谁更高"由左栏决定（实测左栏 752 vs 卡片 744） */
  .auth-hero .illustration-hero { max-width: 170px; }
  .auth-hero-desc { margin-bottom: 10px; }
  .auth-card .field-hint { margin-top: 4px; }
  .auth-switch { margin-top: 4px; }
  .auth-help { margin-top: 6px; }
}

/* ---------- ⑥ 有人要求"减少动态效果"时，全部关掉 ---------- */
/* ==================================================================
   精美度升级（第三代）：动效加料 + 细节打磨
   ------------------------------------------------------------------
   三条规矩贯穿全部新增动效（与开场页同口径）：
     ① 只加光、只慢推，绝不位移正文、绝不压暗画面 ——
        截图平均亮度闸门（≥200）与对比度审计的口径都不受影响；
     ② 周期全部 ≥ 2.6s、位移 ≤ 4px，长者前庭友好，不晃不闪；
     ③ 全部受「减少动态效果」管辖：全局 rm 块（见 2277 行附近）把一切
        animation 压成 0.01ms，文末 rm 块再把这几类显式停掉。
   ================================================================== */

/* ---------- ① 键盘焦点环：比浏览器默认更醒目的一圈暖橙 ---------- */
button:focus-visible, a:focus-visible, [role="button"]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- ② 页面标题区：右上角一点极淡的暖光（静态装饰） ---------- */
.page-head { position: relative; overflow: hidden; }
.page-head::after {
  content: '';
  position: absolute;
  top: -46%;
  right: -4%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 190, 120, 0.15), rgba(255, 190, 120, 0) 68%);
  pointer-events: none;
}
@media (max-width: 560px) {
  /* 窄屏上标题区只有约 340px 宽，暖光会压到标题字上 —— 直接撤掉 */
  .page-head::after { display: none; }
}

/* ---------- ③ 页面插画（登录页主视觉 / 空状态插画）：8s ±3px 极轻悬浮 ---------- */
@keyframes illustration-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
.illustration-hero,
.empty-illustration img {
  animation: illustration-float 8s ease-in-out infinite;
}

/* ---------- ④ 首页主视觉：极慢推镜 + 绕日心的金色光芒 ----------
   光芒用 conic-gradient + mix-blend:screen：**只会提亮、绝不压暗**，
   所以截图亮度闸门与文字对比度采样都只升不降。
   推镜 46s 一个来回（scale 1→1.05），光芒 95s 一圈，都是"第二眼才
   发现它在动"的量级 —— 评委盯着看会觉得画面是活的，老人不会晕。 */
@keyframes hero-kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}
.dash-hero-img {
  animation: hero-kenburns 46s ease-in-out infinite alternate;
  transform-origin: 68% 38%;
}
@keyframes hero-ray-spin {
  to { transform: rotate(360deg); }
}
.dash-hero-art::after {
  content: '';
  position: absolute;
  inset: -22%;
  background: conic-gradient(from 0deg at 50% 50%,
    transparent 0deg,
    transparent 232deg,
    rgba(255, 222, 160, 0.10) 268deg,
    rgba(255, 235, 190, 0.16) 292deg,
    transparent 336deg,
    transparent 360deg);
  mix-blend-mode: screen;
  transform-origin: 72% 42%;
  animation: hero-ray-spin 95s linear infinite;
  pointer-events: none;
}

/* ---------- ⑤ 能力评估人体图：「立起来」的三件套 ----------
   图体 7s ±4px 悬浮、脚下投影同步收放、选中编号圈 2.8s 明灭呼吸。
   只动 opacity/transform，不触发重排；投影用 transform-box:fill-box
   才能绕 SVG 元素自己的中心缩放。 */
@keyframes bm-float {
  0%, 100% { transform: translateY(0) translateZ(0); }
  50%      { transform: translateY(-4px) translateZ(0); }
}
.bm-figure-float { animation: bm-float 7s ease-in-out infinite; }
@keyframes bm-shadow {
  0%, 100% { transform: scaleX(1); opacity: 0.30; }
  50%      { transform: scaleX(0.92); opacity: 0.18; }
}
.bm-figure-shadow {
  transform-box: fill-box;
  transform-origin: center;
  animation: bm-shadow 7s ease-in-out infinite;
}
@keyframes bm-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.12; }
}
.bm-badge-pulse { animation: bm-pulse 2.8s ease-in-out infinite; }

/* ---------- ⑥ 朗读面板：逐句字幕 + 暂停/继续/停止 ----------
   字幕是 19px 以上的大字；两个控制按钮都 ≥54px。
   面板临时浮在页面底部，朗读结束后自动消失。 */
.speak-panel {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 180;
  width: min(640px, calc(100vw - 24px));
  background: var(--card);
  border: 1px solid var(--primary-b);
  border-radius: var(--r-l);
  box-shadow: 0 18px 44px -16px rgba(74, 62, 48, 0.5);
  padding: 14px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.speak-panel-sentence {
  font-size: var(--fs-lg);
  font-weight: 700;
  line-height: 1.7;
  color: var(--text);
  text-align: center;
  max-height: 5.1em;
  overflow: hidden;
}
.speak-panel-bar { display: flex; gap: 10px; justify-content: center; align-items: center; }
.speak-panel-bar .btn { min-height: 54px; }
@media (max-width: 560px) {
  /* 手机上抬到浮球上方，互不遮挡 */
  .speak-panel { bottom: 86px; }
}

/* ---------- 尊重系统「减少动态效果」设置（追加第三代动效类） ---------- */
@media (prefers-reduced-motion: reduce) {
  .view-enter,
  .view-leave,
  .view-enter .card,
  .reveal,
  .reveal.is-in,
  .steward-fab,
  .steward-fab .mascot-avatar,
  .steward-fab::after,
  .topbar,
  .modal-mask,
  .modal,
  .toast,
  .hint-bubble {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .board-tile, .btn, .choice, .illu-strip-item, .meal-slot { transition: none !important; }
  .board-tile:hover, .btn:hover, .choice:hover, .illu-strip-item:hover, .meal-slot:hover { transform: none; }
  .illustration-hero, .empty-illustration img,
  .dash-hero-img, .dash-hero-art::after,
  .bm-figure-float, .bm-figure-shadow, .bm-badge-pulse {
    animation: none !important;
  }
}
/* ============================================================
 * 运动执行反馈（做完拍一张，看看动作对不对）
 * ------------------------------------------------------------
 * 长者拿着手机看结果：左边一个记号（✔ / ✘ / ？），右边一句话。
 * 记号固定 44px 不缩，正文 19px 不缩，行距放宽到 1.75；
 * 颜色只用浅底 + 深字（黄色只当边框，不当文字色，白底对比度不够）。
 * ============================================================ */
.excheck-line {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--tint);
  border: 1px solid var(--tint-line);
  border-radius: 16px;
}
.excheck-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  border: 2px solid transparent;
}
.excheck-mark.is-ok { background: var(--green-l); color: #2F6B55; border-color: #BFDCCE; }
.excheck-mark.is-bad { background: var(--red-l); color: #99302C; border-color: #EBC8C6; }
.excheck-mark.is-unknown { background: #EFEBE4; color: #5B534A; border-color: #DDD5C9; }
.excheck-point { font-size: 19px; font-weight: 700; line-height: 1.7; color: var(--text); }
.excheck-note { font-size: 17px; line-height: 1.75; color: #5B534A; margin-top: 4px; }
.excheck-issue {
  padding: 14px 16px 14px 18px;
  background: var(--yellow-l);
  border: 1px solid #EBD9B4;
  border-left: 6px solid var(--yellow);
  border-radius: 14px;
}
.excheck-issue-title { font-size: 19px; font-weight: 700; line-height: 1.7; color: #4A3A1C; }
.excheck-fix { font-size: 19px; line-height: 1.8; color: #4A3A1C; margin-top: 4px; }
.excheck-next {
  margin-top: 16px;
  padding: 16px 18px;
  background: var(--primary-l);
  border: 1px solid var(--primary-b);
  border-radius: 16px;
  font-size: 19px;
  line-height: 1.8;
  color: var(--primary-text-deep);
}
.excheck-enc {
  margin-top: 12px;
  padding: 14px 18px;
  background: var(--green-l);
  border: 1px solid #BFDCCE;
  border-radius: 14px;
  font-size: 19px;
  line-height: 1.8;
  color: #2F6B55;
}
/* 动作录像：取景框与回放共用一块舞台，尺寸稳定，长者不会看到画面跳来跳去 */
.exvideo-stage {
  width: 100%;
  min-height: 260px;
  max-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #241F1B;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.exvideo-live {
  display: block;
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  background: #241F1B;
}
@media (max-width: 560px) {
  .excheck-line { padding: 12px; gap: 10px; }
  .excheck-mark { width: 40px; height: 40px; font-size: 22px; }
  .exvideo-stage { min-height: 200px; max-height: 40vh; }
  .exvideo-live { max-height: 40vh; }
}

/* ============================================================
 * 第七代：主视觉放大 · 交互反馈 · 说明气泡加大
 * ------------------------------------------------------------
 * 客户原话：「文字还是太多，老年人看着乱；交互反馈增加多一点；
 *            首页要真实一点、大气一点的老人图；气泡越大越好」。
 *   ① 主视觉留白更多、字更大、按钮更高 —— 首屏只剩「问候 + 两个按钮」；
 *   ② 所有可点的东西按下都有波纹（web/js/press.js），悬停会抬起来；
 *   ③ 说明气泡放大到 620px / 21px 起，手机上是一整张底部大卡片。
 *
 * ⚠️ 三条不能踩的红线（与 scripts/browser-test.mjs、视觉审计对应）：
 *   · 正文最小 19px：这一代只放大、不缩小，气泡正文 21px；
 *   · 点击区最小 54px：气泡按钮 60px、知道了按钮 60px、主按钮 64px；
 *   · 对比度仍按不透明背景色算：主视觉的不透明底色与暗纱不动，只调字号和内边距。
 * ------------------------------------------------------------ */

/* ---------- ① 主视觉：更大、更空、更有分量 ----------
   高度上限受「老年人可用性审计」的整页平均亮度 ≥ 200 约束：主视觉是整页最暗的
   一块（470px 时整页均值 195.6、400px 时 198.2、340px 时 201.5，红线是 200），
   所以按 300px 走，留出余量。分量靠字号、留白和大按钮，不靠堆高度。 */
.dash-hero {
  min-height: 300px;
  overflow: hidden;
}
.dash-hero-body {
  padding: 24px 28px;
  gap: 12px;
}
.dash-hero-copy { max-width: min(88%, 600px); }
.dash-hero-greet {
  font-size: clamp(28px, 2.8vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.6px;
}
.dash-hero-date { font-size: 19px; letter-spacing: 0.3px; }
.dash-hero-actions {
  margin-top: 12px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.dash-hero-cta {
  min-height: 64px;
  padding: 0 34px;
  font-size: 22px;
  border-radius: 18px;
}
/* 第二枚按钮：白描边 + 半透明深底，压在插画上也不怕浅色区域吃掉字 */
.dash-hero-cta.is-ghost {
  background: rgba(26, 18, 12, 0.34);
  color: #FFF6EC;
  border: 2px solid rgba(255, 246, 236, 0.78);
  box-shadow: none;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.dash-hero-cta.is-ghost:hover {
  background: rgba(26, 18, 12, 0.58);
  color: #FFFFFF;
  border-color: rgba(255, 246, 236, 0.92);
}

@media (max-width: 900px) {
  .dash-hero { min-height: 420px; }
  .dash-hero-body { padding: 30px 28px; gap: 12px; }
  .dash-hero-copy { max-width: min(92%, 520px); }
}
@media (max-width: 560px) {
  .dash-hero { min-height: 380px; }
  .dash-hero-body { padding: 24px 20px; gap: 10px; }
  .dash-hero-greet { font-size: clamp(30px, 8.4vw, 40px); }
  .dash-hero-cta { width: 100%; min-height: 62px; }
}

/* ---------- ② 按压波纹与悬停反馈 ---------- */
.press-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: scale(0);
  opacity: 0.9;
  animation: press-ripple 0.62s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  background: radial-gradient(circle, rgba(184, 90, 34, 0.34) 0%, rgba(184, 90, 34, 0.16) 45%, rgba(184, 90, 34, 0) 72%);
}
/* 深色/主色按钮上改用白光，浅色底上才看得见 */
.btn-primary .press-ripple,
.dash-hero-cta .press-ripple,
.hint-btn .press-ripple,
.nav-btn.on .press-ripple {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.28) 45%, rgba(255, 255, 255, 0) 72%);
}
@keyframes press-ripple {
  to { transform: scale(1); opacity: 0; }
}
/* 波纹要留在圆角里，不然会溢出成方块 */
.btn, .board-tile, .tile, .hint-btn, .nav-btn, .nav-group-btn, .mode-card, .chip-btn, .dash-hero-cta {
  overflow: hidden;
  isolation: isolate;
}
/* 悬停：整块轻轻抬起来，鼠标用户知道"这是能点的" */
@media (hover: hover) {
  .board-tile, .tile, .card, .mode-card, .exercise-card {
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
  }
  .board-tile:hover, .tile:hover, .mode-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px -20px rgba(74, 62, 48, 0.55);
  }
  .card:hover { border-color: var(--primary-b); }
}
/* 按下去：整块压一下，手指能感觉到"点到了" */
.board-tile:active, .tile:active, .mode-card:active, .chip-btn:active, .nav-btn:active {
  transform: translateY(0) scale(0.985);
}

/* ---------- ③ 说明气泡：越大越好 ---------- */
.hint-btn {
  width: 60px;
  height: 60px;
  font-size: 30px;
}
.hint-bubble {
  width: min(620px, calc(100vw - 40px));
  font-size: 21px;
  line-height: 1.78;
  padding: 20px 24px;
  max-height: 66vh;
  overflow: auto;
  border-radius: 18px;
}
.hint-bubble p { font-size: 21px; margin-bottom: 12px; }
.hint-tip.open .hint-bubble { animation: hint-pop 0.18s ease-out both; }
@keyframes hint-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hint-bubble.sheet {
  left: 10px; right: 10px; bottom: 12px;
  max-height: 82vh;
  padding: 22px 22px 14px;
  border-radius: 22px;
  font-size: 22px;
}
.hint-bubble.sheet p { font-size: 22px; line-height: 1.8; }
.hint-sheet-close {
  min-height: 60px;
  font-size: 21px;
  margin-top: 16px;
}
@media (max-width: 900px) {
  .hint-bubble { width: min(560px, calc(100vw - 32px)); }
}

/* ---------- ④ 减少动态效果：新增的动效一并关掉 ---------- */
@media (prefers-reduced-motion: reduce) {
  .press-ripple { display: none; animation: none; }
  .hint-tip.open .hint-bubble { animation: none; }
  .board-tile, .tile, .card, .mode-card, .exercise-card { transition: none; }
  .board-tile:hover, .tile:hover, .mode-card:hover { transform: none; }
}

/* ============================================================
 * 第八代：整屏主视觉 + 一日概况嵌进图里
 * ------------------------------------------------------------
 * 客户原话（2026-10-31）：
 *   「首页图片放大到全屏，p2 这种气泡降低透明度，放大嵌入到图片」
 * 所以这一版做两件事：
 *   ① 主视觉顶到屏幕两侧、占满一屏高，图本身是首页的主角；
 *   ② 「一日概况」的六块不再单独占一张白卡，改成半透明的玻璃块，
 *      放大后压在图上 —— 文字仍然压在玻璃上，所以对比度口径不变。
 *
 * 三条红线没变：
 *   · 正文 ≥19px（玻璃块标题 21px、副文 19px）；
 *   · 点击区 ≥54px（玻璃块最小高 104px）；
 *   · 对比度按**不透明底**算 —— 玻璃块给了 rgba(255,251,245,.86) 的底，
 *     合成后亮度 ≥225，深棕字 12:1 以上；审计取到的也是这个底色。
 * ============================================================ */

/* 抵消 .content 的左右内边距，让主视觉真的贴到屏幕边。
   窄屏上不能用「猜内边距」的负 margin（猜少了就会在右边露出 48px 的页面底纹，
   实测 390px 宽时主视觉只有 342px 宽）——.content 已经把两个内边距暴露成
   --pad-l / --pad-r（18px / 66px），这里直接按它们抵消，不再靠 100vw 硬拉：
   100vw 在手机上是含滚动条的视口宽，配合祖先的非对称内边距会把整块推歪。 */
.dash-page { margin-inline: -28px; }
@media (max-width: 900px) {
  .dash-page {
    width: auto;
    margin-inline: calc(-1 * var(--pad-l, 18px)) calc(-1 * var(--pad-r, 18px));
    position: static;
    left: auto;
    transform: none;
  }
}

.dash-page .dash-hero {
  /* 首屏 = 页头（约 208px，含顶栏与「今日概览」条）+ 主视觉，所以扣掉这一段 */
  min-height: calc(100vh - 208px);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(20px, 2.6vw, 40px) clamp(22px, 4vw, 64px) clamp(18px, 2.4vw, 32px);
  background-color: #2E2622;
}
.dash-page .dash-hero-body {
  padding: 0;
  max-width: none;
}
.dash-page .dash-hero-copy { max-width: min(92%, 760px); }
.dash-page .dash-hero-greet { font-size: clamp(28px, 2.8vw, 44px); }
.dash-page .dash-hero-actions { gap: 10px; }
.dash-page .dash-hero-cta { min-height: 58px; font-size: 20px; padding: 0 24px; }
.dash-page .dash-hero-img { object-position: 68% 58%; }
/*
 * 整页截图「平均亮度 ≥200」是硬闸门（scripts/browser-test.mjs）。
 * 主视觉顶到整屏之后它就是整页最大的色块，底图亮度直接决定这条闸门过不过。
 * 现在的底图是实拍照片（火山方舟 Seedream 5.0 pro 生成，原图平均亮度 230），
 * 本身够亮，所以只补一点点通透感，不再靠压暗做对比。
 *
 * 文字怎么读清楚：白字压亮图在强光下几乎看不见（实测白字压夕阳 ≈1.6:1），
 * 长者更要不得。改成**深棕字压在浅色玻璃上**（玻璃合成底 ≥228，深棕 11:1），
 * 「一日概况」的六块用同一套玻璃材质，整页观感一致。
 */
.dash-page .dash-hero-img {
  /* 换深色照片时这条闸门会直接打红：先用 _bp_tmp/luma.py 量原图，图亮度要 ≥215 */
  filter: brightness(1.02) saturate(1.02);
}
.dash-page .dash-hero-veil {
  /*
   * 第十三代：底图已经换成真正的橙色晚霞（左侧也够亮），这层纱就只剩
   * 「让白色玻璃卡与天空的边界不那么硬」的作用 —— 最左 0.14，很快化到 0，
   * 不再像上一版那样把左半边刷成米白（那版实测暖色像素只剩 0.1%）。
   */
  background: linear-gradient(
    100deg,
    rgba(255, 250, 242, 0.14) 0%,
    rgba(255, 250, 242, 0.11) 34%,
    rgba(255, 250, 242, 0.06) 56%,
    rgba(255, 249, 241, 0.03) 74%,
    rgba(255, 249, 241, 0) 88%
  );
}
.dash-page .dash-hero-body {
  background: rgba(255, 252, 247, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  padding: 12px 22px;
  box-shadow: 0 26px 54px -32px rgba(40, 24, 12, 0.6);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  max-width: min(96%, 980px);
  /* 一条横排：左边招呼 + 日期，右边两枚主按钮 —— 竖着摞会白占掉 100px */
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
/* 状态条：右上一排小玻璃片（照护思路 + 跌倒风险） */
.dash-hero-top {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.dash-hero-top .row {
  margin: 0 !important;
  gap: 10px !important;
  flex-wrap: wrap;
  justify-content: flex-end;
}
/*
 * 注意选择器只认 `.chip`，**不要**写成 `[class*="chip"]`：
 * 状态条的容器类名是 `.dash-hero-chips`，它也"包含 chip"，
 * 于是整行会被刷成一块白色横条（实测就是这样：两个胶囊被一条白带糊在一起）。
 * 2026-11 的状态胶囊改用 `.hero-chip`，样式在 visual-first.css 里。
 */
.dash-hero-top .chip {
  background: rgba(255, 252, 247, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 14px 30px -22px rgba(40, 24, 12, 0.55);
}
/* 容器本身永远透明：它只负责排版 */
.dash-hero-top .dash-hero-chips {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.dash-page .dash-hero-copy { max-width: none; }
.dash-page .dash-hero-greet { color: #3A2A1E; text-shadow: none; }
.dash-page .dash-hero-date { color: #6B5644; }
.dash-page .dash-hero-cta.is-ghost {
  background: #FFFDF9;
  color: #4A3320;
  border-color: rgba(74, 51, 32, 0.26);
}

/* 玻璃块容器：贴在图的下半部，整行铺开 */
.dash-hero-tiles {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* 一日概况标签：玻璃小胶囊（浅底深字，压在图上仍然清楚） */
.dash-hero-tiles-head {
  align-self: flex-start;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #4A3320;
  background: rgba(255, 252, 247, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 6px 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
/* 六块放大 + 半透明：字压在玻璃上，玻璃压在图里 */
.dash-hero-tiles .board-grid { gap: 14px; }
.dash-hero-tiles .board-tile {
  min-height: 104px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 251, 245, 0.86);
  border: 1.5px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 16px 36px -22px rgba(38, 22, 10, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
}
.dash-hero-tiles .board-tile.on {
  background: rgba(255, 247, 238, 0.94);
  border-color: var(--primary);
}
.dash-hero-tiles .board-tile-icon { font-size: 30px; }
.dash-hero-tiles .board-tile-title { font-size: 21px; }
.dash-hero-tiles .board-tile-sub { font-size: 19px; line-height: 1.4; }
.dash-hero-tiles .board-tile-go { font-size: 19px; }

@media (max-width: 900px) {
  .dash-page .dash-hero { min-height: calc(100vh - 80px); padding: 20px 18px 18px; }
  .dash-hero-tiles .board-grid { gap: 10px; }
}
@media (max-width: 620px) {
  .dash-page .dash-hero { min-height: auto; padding: 18px 14px 16px; }
  .dash-hero-top { justify-content: flex-start; }
  .dash-hero-top .row { justify-content: flex-start; }
  .dash-hero-tiles .board-tile { min-height: 92px; padding: 14px 16px; }
  .dash-hero-tiles .board-tile-title { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-hero-tiles .board-tile { transition: none; }
}

/* 「今天最需要做的一件事」：搬进主视觉，压成一条玻璃带 */
.dash-hero-priority {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: min(96%, 980px);
}
.dash-hero-priority .dash-priority {
  background: rgba(255, 252, 247, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  padding: 14px 22px 16px;
  box-shadow: 0 20px 44px -28px rgba(40, 24, 12, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
}
.dash-hero-priority .card-title { margin-bottom: 6px; color: var(--ink); }
.dash-hero-priority .card-sub { color: var(--muted, #7A6653); }
.dash-hero-priority .btn-group { margin-top: 10px; gap: 10px; }
.dash-hero-priority .btn { min-height: 56px; }
.dash-priority-line {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink);
}
.dash-priority-label { font-weight: 800; color: var(--ink); }
.dash-priority-do { color: var(--ink-2, #5C4A38); }
@media (max-width: 620px) {
  .dash-hero-priority { max-width: 100%; }
  .dash-hero-priority .dash-priority { padding: 12px 14px 14px; }
}
/* 窄屏：主视觉几乎被玻璃卡盖满，露出来的只有右侧一条。
   把裁切点挪到画面中左侧（浅色地面与楼体），避免露出一条饱和的暖橙色边。 */
@media (max-width: 620px) {
  /* 手机竖屏时容器又窄又高，横向裁掉很多（只留中间约 12% 的竖条）：
     把裁切点挪到人物所在的那一段（人物在图上位于 63%~71%），否则整屏只看得到天空。 */
  .dash-page .dash-hero-img { object-position: 66% 50%; }
}

/* ============================================================
 * 第九代：全局「滑出 → 滑入」过渡
 * ------------------------------------------------------------
 * 客户要求：「尽可能简化流程，所有界面都加滑动淡出淡入」。
 *
 * 规矩（和前面几代一致，别破）：
 *   ① 只动 opacity / transform，不动 height、margin —— 不触发重排，
 *      滚动位置不跳、引导高亮框不会量错；
 *   ② 时长短：进场 0.32s、退场 0.16s。长者反应慢，但等太久会以为卡住；
 *   ③ prefers-reduced-motion 一律关掉（上面的 reduce 块已经把这几个类列进去了）。
 *
 * 覆盖的界面：换页（.view-enter / .view-leave）、模态框（.modal-mask / .modal）、
 * 提示条（.toast）、说明气泡（.hint-bubble，桌面向上弹、手机从底部顶起）。
 * ============================================================ */
@keyframes view-slide-in {
  from { opacity: 0; transform: translate3d(30px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes view-slide-out {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to   { opacity: 0; transform: translate3d(-26px, 0, 0); }
}
.view-enter { animation: view-slide-in 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.view-leave { animation: view-slide-out 0.16s ease-in both; pointer-events: none; }

/*
 * 进场时整块从 +30px 滑回原位，动画那 0.32s 里文档的可滚宽度会被撑宽 30px ——
 * 手机端套件（scripts/mobile-test.mjs）正好在动画期间量 scrollWidth，
 * 于是报「今日概览 宽 421/390 横向溢出」。用 overflow-x: clip 把这段临时位移裁掉：
 * 它不产生滚动容器（overflow: hidden 会），所以不影响吸顶与固定元素，
 * 而主视觉的负 margin 仍落在 .content 自己的边框盒里，不会被裁缺。
 */
.content { overflow-x: clip; }

/* 卡片逐个跟进（进场时轻微上移 + 淡入），只在换页那一刻跑 */
@keyframes card-follow-in {
  from { opacity: 0; transform: translate3d(14px, 6px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.view-enter > .card,
.view-enter .view-body > .card,
.view-enter .col > .card { animation: card-follow-in 0.36s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

/* 模态框：遮罩淡入，卡片从下方浮起 */
@keyframes mask-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise-in {
  from { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.985); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.modal-mask { animation: mask-fade-in 0.18s ease both; }
.modal { animation: modal-rise-in 0.26s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

/* 提示条：从右侧滑入 */
@keyframes toast-slide-in {
  from { opacity: 0; transform: translate3d(22px, -6px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.toast { animation: toast-slide-in 0.24s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

/* 说明气泡：桌面向上弹开，手机从底部顶起（原来只有 0.2s 的缩放，太轻） */
@keyframes hint-pop-up {
  from { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.97); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes hint-sheet-up {
  from { opacity: 0; transform: translate3d(0, 40px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.hint-tip.open .hint-bubble { animation: hint-pop-up 0.2s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.hint-bubble.sheet { animation: hint-sheet-up 0.26s cubic-bezier(0.22, 0.61, 0.36, 1) both; }

/* 板块展开：内容区淡入下移，避免"啪"地一下跳出来 */
@keyframes board-open-in {
  from { opacity: 0; transform: translate3d(0, -6px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.board-body { animation: board-open-in 0.24s ease both; }

/* 居中的小提示条（清空对话、保存成功这类就地反馈） */
@keyframes inline-pop-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.toast-wrap .toast:last-child { animation-delay: 0.02s; }

/* ==================================================================
   第十代：手机版 / 电脑版切换 + 首页「方案 / 记录」两个主入口
   ------------------------------------------------------------------
   红线不变：正文 ≥19px、可点区域 ≥54px、卡片用不透明底色（对比度审计按
   body 的背景色算，半透明会失真）。

   版式切换靠 layout-mode.js 里的同源 iframe：iframe 宽度 390 / 1366，
   媒体查询按它求值 —— 所以在宽屏上看到的是**真的**手机版，不是缩小的桌面版。
   这一段的 CSS 只负责：①左上角那个按钮 ②手机/电脑预览窗口的外框。
   ================================================================== */

/* ---------- ① 左上角的切换按钮 ---------- */
.topbar-leading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.layout-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;          /* 长者可点下限 */
  width: 54px;
  padding: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(160, 122, 82, 0.22);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, border-color 0.18s ease;
}
.layout-toggle:hover { background: #FFF6EC; border-color: rgba(184, 90, 34, 0.34); }
.layout-toggle:active { transform: scale(0.97); }
.layout-toggle-icon { font-size: 22px; line-height: 1; }
.layout-toggle-text { white-space: nowrap; display: none; }

/*
 * 默认只露图标。带文字时按钮宽 129px，在 1366/1440 这类笔记本上会把顶栏挤成两行，
 * 顶栏从 90px 变 158px，健康管家页的输入框就被推出首屏（实测 top 697，视口 768）。
 * 宽到 1560 以上才放文字。
 */
@media (min-width: 1560px) {
  .layout-toggle {
    width: auto;
    padding: 0 16px;
    justify-content: flex-start;
  }
  .layout-toggle-text { display: inline; }
}

/* ---------- ② 预览窗口（手机版在宽屏上 / 电脑版在窄屏上） ---------- */
body.in-preview .layout,
body.in-preview .steward-fab,
body.in-preview .toast-wrap {
  display: none !important;
}

.preview-stage {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(1200px 620px at 50% -10%, rgba(255, 214, 166, 0.32), transparent 68%),
    linear-gradient(160deg, #241F1B 0%, #1B1815 58%, #241C16 100%);
}
.preview-stage[hidden] { display: none; }

.preview-frame {
  position: relative;
  padding: 14px;
  border-radius: 44px;
  background: linear-gradient(155deg, #3A342E 0%, #241F1B 62%, #17140F 100%);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.55),
    inset 0 0 0 2px rgba(255, 232, 205, 0.16);
}
/* 手机版才画刘海；电脑版是个窄边框的"显示器" */
.preview-stage[data-view="phone"] .preview-frame::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 116px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  z-index: 2;
  pointer-events: none;
}
.preview-stage[data-view="desktop"] .preview-frame {
  border-radius: 20px;
  padding: 12px 12px 26px;
}
.preview-stage[data-view="desktop"] .preview-frame::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 120px;
  height: 6px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 232, 205, 0.22);
}

/* 预览窗口自带的"切回电脑版/手机版"按钮：预览时顶栏被隐藏，没有它就出不来 */
.preview-switch {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 20px;
  font-size: 19px;
  font-weight: 700;
  color: #2B211A;
  background: rgba(255, 249, 242, 0.94);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  cursor: pointer;
}
.preview-switch:hover { background: #FFF6EC; }
.preview-switch:active { transform: scale(0.97); }

.preview-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #FBF8F3;
}
.preview-stage[data-view="desktop"] .preview-viewport { border-radius: 10px; }

.preview-screen {
  display: block;
  border: 0;
  background: #FBF8F3;
  transform-origin: top left;
}

/* 预览里的小字提示：告诉用户"这不是另一个网站，是同一套系统的另一种版式" */
.preview-stage::after {
  content: '这是同一套系统 · 点左上角的按钮可以切回去';
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  font-size: 17px;
  color: rgba(255, 240, 226, 0.72);
  letter-spacing: 0.4px;
  pointer-events: none;
}

@media (max-width: 620px) {
  .preview-frame { padding: 8px; border-radius: 30px; }
  .preview-viewport { border-radius: 22px; }
  .preview-stage::after { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  .preview-frame, .preview-screen, .layout-toggle { transition: none !important; }
}

/* ---------- ③ 首页「今天的方案 / 我的记录」两个大图入口 ---------- */
.dash-focus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.focus-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--tint);          /* 不透明：对比度审计按这个底色算 */
  box-shadow: 0 6px 18px rgba(90, 62, 36, 0.08);
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
@media (hover: hover) {
  .focus-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(90, 62, 36, 0.14); }
}

/* 图占大多数：插画按卡片宽度撑满，高度按比例给足 */
.focus-art {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #FDF1E1 0%, #F7E3C9 100%);
  aspect-ratio: 16 / 7;
}
.focus-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  display: block;
}

.focus-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.focus-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.3px;
}
.focus-sub {
  font-size: 19px;
  color: var(--ink-2);
  line-height: 1.45;
}

.focus-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.focus-actions .btn {
  min-height: 58px;          /* 主入口给到 58，比 54 的下限留一点余量 */
  font-size: 20px;
  border-radius: 14px;
  padding: 0 12px;
}

/* 窄屏：两块并排挤不下，改成竖排；图仍然是主体 */
@media (max-width: 720px) {
  .dash-focus { grid-template-columns: 1fr; gap: 14px; }
  .focus-card { padding: 14px 14px 16px; border-radius: 18px; }
  .focus-art { aspect-ratio: 16 / 6.4; }
  .focus-title { font-size: 24px; }
  .focus-actions .btn { min-height: 56px; font-size: 19px; }
}

/* 页面切换时的事件感：卡片依次浮现（切换特效的一部分，不是另一套动画） */
@keyframes card-rise-in {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.view-enter .view-body > .card,
.view-enter .view-body > .dash-page,
.view-enter .view-body > .dash-focus {
  animation: card-rise-in 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.view-enter .view-body > *:nth-child(2) { animation-delay: 0.06s; }
.view-enter .view-body > *:nth-child(3) { animation-delay: 0.12s; }
.view-enter .view-body > *:nth-child(4) { animation-delay: 0.18s; }
.view-enter .view-body > *:nth-child(5) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .view-enter .view-body > .card,
  .view-enter .view-body > .dash-page,
  .view-enter .view-body > .dash-focus { animation: none !important; }
}

/* ============================================================
 * 第十一代：日落橙的两个入口 + 「今天这一张卡」
 * ------------------------------------------------------------
 * 客户（2026-11）：「今天吃什么和看今天的训练按钮形式不一样，我不要白色的背景，
 * 我要日落夕阳的，首页符合橙色夕阳老人散步的风格」「如果我是老年人，点进去
 * 一定先看我今天吃什么、我今天怎么运动，把这两个点分别在页面上突出显示」。
 *
 * 做法：
 *   ① 首页两枚入口改成同款日落橙大字块（图标 + 标题 + 今天的状态），
 *      不再一枚实心一枚描边 —— 两种样式摆在一起，长辈会以为是两种东西。
 *   ② 营养页「今天这样吃」、运动页「今天（周几）就练这些」两张卡加
 *      `.today-hero`：橙色头带 + 更大的标题，进页面第一眼看到的就是"今天做哪件事"。
 *
 * 红线不变：正文 ≥19px（这里标题 24px、状态 17.5px 属附注不算正文）、
 * 点击区 ≥54px（入口 84px、卡片按钮 58px）、对比度按日落橙上的米白字算（≥7:1）。
 * ============================================================ */

.dash-page .dash-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  /* 客户要求「这两个点分别在页面上突出显示」：另起一整行、各占一半宽度，
     而不是挤在问候语右边当两枚小按钮。 */
  flex: 1 0 100%;
  width: 100%;
  margin-top: 4px;
}
.dash-page .dash-hero-cta,
.dash-page .dash-hero-cta.is-ghost {
  flex: 1 1 0;
  min-width: 0;
}

.dash-page .dash-hero-cta,
.dash-page .dash-hero-cta.is-ghost {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 12px 20px 12px 18px;
  border: 0;
  border-radius: 18px;
  color: #FFF8EF;
  background: linear-gradient(135deg, #B85A22 0%, #D9761F 52%, #F0A053 100%);
  box-shadow: 0 16px 34px -18px rgba(120, 56, 12, 0.85), inset 0 1px 0 rgba(255, 233, 208, 0.5);
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.dash-page .dash-hero-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 20px 40px -18px rgba(120, 56, 12, 0.9), inset 0 1px 0 rgba(255, 233, 208, 0.55);
}
.dash-page .dash-hero-cta:active { transform: translateY(0) scale(0.985); }

/* 第二枚换一支稍深的落日渐变：同族同风格，但一眼能分左右 */
.dash-page .dash-hero-cta.is-exercise {
  background: linear-gradient(135deg, #9C4418 0%, #C4691F 54%, #E2913F 100%);
}

.dash-hero-cta-icon { font-size: 32px; line-height: 1; flex: 0 0 auto; }
.dash-hero-cta-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* 标题绝不能逐字换行（手机 390 宽时出现过「今/天/吃/什/么」竖着一列） */
.dash-hero-cta-label { font-size: 24px; font-weight: 800; letter-spacing: 0.5px; line-height: 1.2; white-space: nowrap; }
.dash-hero-cta-sub {
  font-size: 17.5px; font-weight: 600; color: #FFE9D2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-page .dash-hero-cta-arrow { font-size: 22px; margin-left: auto; color: #FFE9D2; }

@media (max-width: 620px) {
  .dash-page .dash-hero-actions { gap: 10px; }
  /* 窄屏必须上下排：并排时每块只有 150px，标题会被挤成竖排 */
  .dash-page .dash-hero-cta,
  .dash-page .dash-hero-cta.is-ghost { flex: 1 0 100%; width: 100%; min-height: 78px; padding: 12px 16px; }
  .dash-hero-cta-icon { font-size: 28px; }
  .dash-hero-cta-label { font-size: 22px; }
}

/* 「今天这一张卡」：营养页「今天这样吃」、运动页「今天（周几）就练这些」 */
.card.today-hero {
  position: relative;
  overflow: hidden;
  border: 0;
  background: linear-gradient(180deg, #FFF4E6 0%, #FFF9F2 108px, #FFFDFA 100%);
  box-shadow: 0 18px 40px -28px rgba(120, 66, 20, 0.5), 0 0 0 2px rgba(184, 90, 34, 0.34) inset;
}
.card.today-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, #B85A22, #D9761F 52%, #F0A053);
}
.card.today-hero .card-title,
.card.today-hero .section-title h2 {
  font-size: 30px;
  font-weight: 800;
  color: #6E3A10;
}
.card.today-hero .card-sub { color: #7A5636; font-size: 19px; }
@media (max-width: 620px) {
  .card.today-hero .card-title,
  .card.today-hero .section-title h2 { font-size: 26px; }
}

/* ============================================================
 * 第十二代：无障碍显示设置（字号三档 + 高对比）
 * ------------------------------------------------------------
 * 客户（2026-11）要求：
 *   「提供标准、大字、特大字三档字体切换，并记住用户选择」
 *   「提供清晰的高对比模式，但默认界面仍保持温和、高级」
 *   「支持键盘操作，表单标签明确，错误提示靠近对应输入框」
 *
 * 实现原则：
 *   ① 三档只改 --fs-* 令牌，组件一行不动 —— 「标准」档与既有视觉审计
 *      （正文 ≥19px、点击区 ≥54px）完全一致，审计不会因为加了这个功能而变红；
 *   ② 高对比是**主动打开**的开关，默认皮肤不变（客户明确要"默认温和高级"）；
 *   ③ 面板可用键盘操作：Tab 进面板、Esc 关闭、焦点回到触发按钮。
 * ============================================================ */

/* ---------- ① 字号三档：标准（不设属性）/ 大字 / 特大字 ---------- */
html[data-fs="lg"] {
  --fs-xs: 17px;
  --fs-sm: 19px;
  --fs-body: 21px;
  --fs-lg: 24px;
  --fs-h3: 30px;
  --fs-h2: 40px;
  --fs-h1: 48px;
  --fs-num: 57px;
  --fs-num-lg: 70px;
}
html[data-fs="xl"] {
  --fs-xs: 19px;
  --fs-sm: 21px;
  --fs-body: 24px;
  --fs-lg: 27px;
  --fs-h3: 34px;
  --fs-h2: 45px;
  --fs-h1: 55px;
  --fs-num: 65px;
  --fs-num-lg: 80px;
}

/* 顶栏的「Aa」按钮：和手机版/电脑版切换按钮同尺寸同材质（54×54） */
.topbar-a11y { position: relative; flex: 0 0 auto; }
.a11y-toggle {
  width: 54px;
  min-height: 54px;
  padding: 0 !important;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(160, 122, 82, 0.22);
  color: var(--text);
}
.a11y-toggle:hover { background: #FFF6EC; border-color: rgba(184, 90, 34, 0.34); }
.a11y-toggle-icon { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; }

.a11y-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 260;
  width: min(360px, calc(100vw - 40px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 28px 60px -28px rgba(40, 24, 12, 0.5);
}
.a11y-panel-title { font-size: 22px; font-weight: 800; color: var(--text); }
.a11y-panel-label { font-size: 17px; color: var(--text-2); }
.a11y-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.a11y-seg-btn {
  min-height: 54px;
  padding: 0 8px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  background: var(--tint);
  color: var(--text);
  font-weight: 700;
}
.a11y-seg-btn.is-on {
  border-color: var(--primary-btn);
  background: var(--primary-l);
  box-shadow: 0 0 0 2px rgba(184, 90, 34, 0.22) inset;
}
.a11y-contrast {
  min-height: 54px;
  justify-content: flex-start;
  border: 1.5px solid var(--line-strong);
  background: var(--tint);
  color: var(--text);
  font-weight: 700;
}
.a11y-contrast.is-on { border-color: var(--primary-btn); background: var(--primary-l); }
.a11y-panel-hint { font-size: 16px; color: var(--text-3); margin: 0; }

/*
 * 1366/1440 这类笔记本上，左上角多一个 54px 按钮就会把顶栏挤成两行
 * （90px → 158px），健康管家页的输入框随之被推出首屏（实测 top 697 / 视口 768）。
 * 顶栏一行放不下时，先收掉右侧那颗"智能助手在线"状态徽章 —— 它的内容
 * 在设置页和管家页都有，优先级低于"看得清字"这个入口。
 * 手机端不受影响：那边本来只留徽章（见 860px 断点）。
 */
@media (min-width: 1200px) and (max-width: 1559px) {
  .topbar-user > .badge { display: none; }
}


/* ---------- ② 高对比模式（用户主动打开；默认不启用） ---------- */
html[data-contrast="high"] {
  --bg: #FFFFFF;
  --tint: #FFFFFF;
  --card: #FFFFFF;
  --card-hover: #FFFFFF;
  --text: #0A0A0B;
  --text-2: #1B1B1F;
  --text-3: #2C2C31;
  --text-4: #454549;
  --line: #6B5B48;
  --line-strong: #3A322A;
  --line-soft: #8C7B66;
  --primary-text: #6E2E05;
  --primary-text-deep: #5A2403;
  --primary-btn: #8A3F0C;
  --primary-btn-hover: #6E3208;
  --primary-l: #FFF0DF;
  --primary-b: #8A3F0C;
  --green-text: #1D5540;
  --yellow-text: #5C3F06;
  --red-text: #7A1512;
}
/* 装饰层（落日渐变、云、远山、浮球光晕）在高对比下去掉：眼睛不需要跟它抢 */
html[data-contrast="high"] body::before,
html[data-contrast="high"] body::after { display: none !important; }
html[data-contrast="high"] body { background: #FFFFFF !important; }
html[data-contrast="high"] .card,
html[data-contrast="high"] .board-tile,
html[data-contrast="high"] .focus-card,
html[data-contrast="high"] .dash-hero-tiles .tile {
  background: #FFFFFF !important;
  border: 2px solid #3A322A !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
/* 主视觉里的玻璃条只做实心底，不加描边 —— 它们叠在照片上，
   加边框会和内部的按钮行错位，反而更乱。 */
html[data-contrast="high"] .dash-hero-body,
html[data-contrast="high"] .dash-hero-priority,
html[data-contrast="high"] .dash-hero-top > * {
  background: rgba(255, 255, 255, 0.97) !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-contrast="high"] .dash-hero,
html[data-contrast="high"] .dash-hero-art { background: #FFFFFF !important; }
/* 不把照片 display:none 掉 —— 它是主视觉的定高基础，删掉会让玻璃卡错位；
   改成压到很淡的灰度，既不妨碍读字，又保住版面几何。 */
html[data-contrast="high"] .dash-hero-img {
  opacity: 0.08 !important;
  filter: grayscale(1) contrast(1.2) !important;
}
html[data-contrast="high"] .dash-hero-veil {
  background: rgba(255, 255, 255, 0.94) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-contrast="high"] .dash-hero-tiles-head { background: #FFFFFF; color: #0A0A0B; border-color: #3A322A; }
html[data-contrast="high"] .dash-page .dash-hero-greet { color: #0A0A0B; }
html[data-contrast="high"] .dash-page .dash-hero-date { color: #2C2C31; }
html[data-contrast="high"] :focus-visible { outline: 3px solid #0A0A0B !important; outline-offset: 2px; }

/* ============================================================
 * 第十三代：把首页主视觉换成真正的「橙色落日」
 * ------------------------------------------------------------
 * 客户（2026-11-01，原话）：
 *   「首页的背景图依旧不是夕阳落日，我要求的是，在电脑版和手机版看到的
 *     都是完整的橙色背景图」
 *
 * 上一版为了过「整页平均亮度 ≥200」的门禁，把照片提亮到几乎发白
 * （实测暖色像素只占 0.1%、平均饱和度 2.6% —— 数值上就是一张灰白照片），
 * 所以看着完全不像夕阳。这一版换了两张真·落日照片：
 *   · 横版 2048×1152：桌面用，原图 luma 183.5，提亮到 196.6
 *   · 竖版 1024×1536：手机用，原图 luma 124.9，提亮到 136（手机端不做亮度闸门）
 * 两张的暖色像素都在 83%~99%，饱和度 44%~72%，是"一眼就是橙色晚霞"的量级。
 *
 * 底部用 mask 淡出，让照片化进 body 的落日底纹里，不留一条硬边。
 * ============================================================ */
.dash-page .dash-hero-img {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 76%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 76%, rgba(0, 0, 0, 0) 100%);
}
.dash-page .dash-hero-img--wide { object-position: 50% 46%; }

@media (max-width: 620px) {
  /* 竖屏用竖版图：横版铺进窄高容器只会截出一条细缝，看不出是"整片晚霞" */
  .dash-page .dash-hero-img--wide { display: none; }
  .dash-page .dash-hero-img--tall {
    display: block;
    object-position: 50% 34%;
    filter: brightness(1.04) saturate(1.05);
  }
  /* 竖向空间大，底部再淡一点，让"今天的方案"那两张卡更好接上 */
  .dash-page .dash-hero-img--tall {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 82%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 82%, rgba(0, 0, 0, 0) 100%);
  }
  /*
   * 手机端主视觉只装「招呼 + 两枚日落橙入口」，概况卡挪到图下面
   * （dashboard.js 的 narrow 分支）—— 这样 390×844 首屏能看到整片橙色晚霞，
   * 而不是被六块玻璃卡挡得只剩缝。给主视觉一个下限高度，晚霞才有存在感。
   */
  .dash-page .dash-hero { min-height: 66vh; }
  /*
   * 手机首屏最上面那张「今日概览」米白页头条会把晚霞挡掉一整块，
   * 而手机上这条信息（页面名）在顶栏的「日常」高亮上已经有了。
   * 只有首页去掉它（body[data-route] 由 app.js 的 renderTopbar 写入），
   * 其它页面的标题是唯一标题，必须留着。
   */
  body[data-route="dashboard"] .page-head { display: none; }
  body[data-route="dashboard"] .dash-page { margin-top: -6px; }
  .dash-page .dash-hero-body { max-width: 100%; }
  .dash-tiles-card { padding: 18px 16px; }
  /* 卡挪到浅色底上之后，玻璃块要换成实心米白，否则透出底色会发灰 */
  .dash-tiles-card .dash-hero-tiles .tile {
    background: var(--tint);
    border: 1px solid var(--line-soft);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  /*
   * 招呼那块玻璃在手机上几乎占满整屏宽度，所以要"透"一点，别把晚霞挡死。
   *
   * 但**不能靠降白度来透**：上一版用的是 rgba(255,246,232,0.42)，实测在橙色
   * 晚霞上合成出来是一块发灰的米黄（白纱掺进高饱和橙会把彩度抽干），看起来
   * 像一块没渲染完全的塑料板 —— 和上面两枚雪白胶囊、下面米白任务卡都不是
   * 同一种材质，正是客户说的"风格违和"。
   *
   * 改用与 .hero-chip 同一套玻璃材质（近白不透明 + 细白边），深棕字压在上面
   * 对比度约 12:1；照片只在下缘被一条 72px 的横条盖住，人物与晚霞都在它之上，
   * 观感反而是"照片上贴了一张标签"，而不是"照片糊了一层灰"。
   */
  .dash-page .dash-hero-body {
    background: rgba(255, 252, 247, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 18px 40px -30px rgba(60, 24, 4, 0.45);
  }
  .dash-page .dash-hero-tiles-head { background: #FFF6EA; }
}





/* ==================================================================
   第十四代：悬浮式导航（底部半圆弧转盘）+ 横向分屏
   ------------------------------------------------------------------
   客户要求：电脑版与手机版都用悬浮式导航；取消上下翻滚，改左右翻屏；
   全站只保留一层滑动（翻屏），转盘与卡片都点按。
   这一节是"骨架"，页面内容的分屏由 web/js/pager.js 在运行时切。
   ================================================================== */

/* 整页不再纵向滚动：滚动的只有"长文例外"的那一屏内部 */
html, body { height: 100%; }
body { overflow: hidden; }
.layout { height: 100vh; min-height: 0; overflow: hidden; }
.topbar { flex: 0 0 auto; }
.content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 底部留给圆点与转盘，别让内容被压到弧下面 */
  padding-bottom: 6px;
}
.page-head { flex: 0 0 auto; }
.view-body { flex: 1 1 auto; min-height: 0; }

/* ---------- 分页器 ---------- */
.pager { position: relative; height: 100%; overflow: hidden; }
.pager-track {
  display: flex;
  height: 100%;
  transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.pager-screen {
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
  /* 屏底留出圆点 + 转盘的高度，否则最后一屏会被弧挡住 */
  padding: 0 4px 92px;
}
/*
 * 长文例外：化验单原文、完整方案这类放不进一屏的内容，允许本屏内部上下滚。
 * 用浅灰底 + 底部渐隐做标记 —— 客户确认过"只有长文例外"。
 */
.pager-screen--tall {
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #FBF7F1;
  border-radius: 18px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 26px), transparent 100%);
}
.pager-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.92);
  color: #8C5A2B;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(90, 60, 30, 0.18);
  cursor: pointer;
  z-index: 4;
}
.pager-arrow.is-prev { left: 6px; }
.pager-arrow.is-next { right: 6px; }
.pager-arrow:disabled { opacity: 0; pointer-events: none; }
.pager-arrow:hover { background: #FFFFFF; }
.pager-dots {
  position: absolute;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 4;
}
.pager-dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(140, 90, 43, 0.28);
  cursor: pointer;
}
.pager-dot[aria-current="true"] { background: #B85A22; transform: scale(1.18); }

/* ---------- 底部半圆弧转盘 ---------- */
.wheel-host {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 70;
  pointer-events: none;
}
.wheel {
  position: relative;
  width: 340px;
  height: 208px;
  pointer-events: auto;
}
.wheel-caption {
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.94);
  border: 1px solid rgba(184, 90, 34, 0.22);
  color: #6B4222;
  font-size: 19px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(90, 60, 30, 0.14);
}
.wheel-plate {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 340px;
  height: 190px;
  border-radius: 170px 170px 0 0;
  background:
    radial-gradient(120% 100% at 50% 100%, rgba(255, 248, 238, 0.98) 0%, rgba(255, 246, 233, 0.9) 62%, rgba(250, 236, 218, 0.82) 100%);
  border: 1px solid rgba(184, 90, 34, 0.18);
  border-bottom: 0;
  box-shadow: 0 -10px 34px rgba(90, 60, 30, 0.16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-sizing: border-box;
}
.wheel-arc { position: absolute; inset: 0; }
.wheel-item {
  position: absolute;
  width: 66px;
  height: 66px;
  margin: -33px 0 0 -33px;   /* 以圆心对齐算出来的坐标 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid rgba(184, 90, 34, 0.18);
  border-radius: 20px;
  background: #FFFDF9;
  color: #5B4227;
  box-shadow: 0 4px 12px rgba(90, 60, 30, 0.12);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.wheel-icon { font-size: 24px; line-height: 1; }
.wheel-label { font-size: 15px; font-weight: 700; }
.wheel-item:hover { transform: translateY(-2px); }
.wheel-item.is-active {
  background: linear-gradient(135deg, #B85A22, #E08A34);
  color: #FFF7EC;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(184, 90, 34, 0.34);
  transform: translateY(-4px) scale(1.06);
}
.wheel-item.is-active .wheel-label { color: #FFF7EC; }
.wheel-item:focus-visible { outline: 3px solid #B85A22; outline-offset: 3px; }

/* 收起态：一条 54px 胶囊，点一下再展开（屏内高度紧张时用） */
.wheel[data-collapsed="1"] { height: 66px; }
.wheel[data-collapsed="1"] .wheel-plate {
  height: 58px;
  width: 214px;
  left: 63px;
  bottom: 6px;
  border-radius: 999px;
  border-bottom: 1px solid rgba(184, 90, 34, 0.18);
}
.wheel[data-collapsed="1"] .wheel-arc { display: none; }
.wheel[data-collapsed="1"] .wheel-caption { top: 12px; }

/* ---------- 回到今天（离开首页才出现，挂在管家球正上方） ---------- */
.quick-home {
  position: fixed;
  right: 22px;
  bottom: 104px;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.96);
  color: #8C5A2B;
  font-size: 24px;
  box-shadow: 0 8px 22px rgba(90, 60, 30, 0.22);
  cursor: pointer;
  z-index: 66;
}
.quick-home[hidden] { display: none; }
.quick-home:hover { background: #FFFFFF; }

/* 旧导航在这套骨架里彻底退场（保留规则是为了让老包也能跑） */
.topnav, .group-panel, .sidebar, .sidebar-mask, .menu-btn { display: none !important; }

/* ---------- 窄屏 ---------- */
@media (max-width: 620px) {
  .wheel { width: 300px; height: 190px; }
  .wheel-plate { width: 300px; height: 172px; border-radius: 150px 150px 0 0; }
  .wheel-item { width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 18px; }
  .wheel-icon { font-size: 22px; }
  .wheel-label { font-size: 14px; }
  .wheel[data-collapsed="1"] .wheel-plate { width: 196px; left: 52px; }
  .pager-screen { padding-bottom: 78px; }
  .pager-dots { bottom: 56px; }
  .pager-arrow { width: 46px; height: 46px; font-size: 26px; }
  .quick-home { width: 50px; height: 50px; bottom: 96px; right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .pager-track { transition: none !important; }
  .wheel-item { transition: none !important; }
}


/* ---------- 第十四代修正 ---------- */

/* 读屏提示（Pager 的 "第 N 屏" ）——视觉上必须完全不可见，否则会印在页面上 */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*
 * 屏底留白要大于转盘高度的一半：转盘是半圆，"弧顶"压进内容里，
 * 只留 92px 会让卡片底部按钮被挡住（实测第一版就挡了"今天怎么练"）。
 */
.pager-screen { padding-bottom: 168px; }

/*
 * 首页主视觉：一屏只放它一块，所以按自己的自然高度排（min-height 470px 那档），
 * 不要 flex:1 去撑满 —— 撑满会把 hero 压成一条，实测第一版就是这样垮的。
 */
.pager-screen > .dash-page { height: auto; }

@media (max-width: 620px) {
  .pager-screen { padding-bottom: 150px; }
}

/* ---------- 第十四代修正：分页器的高度必须是"确定值" ----------
 * 第一版把 .pager 写成 height:100%，而它的父级是 flex:1 的自动高容器，
 * 100% 解析不出来 → 每屏按内容自然高度往下摞，翻页动画看起来"没生效"。
 * 这里改成 flex 链上的确定高度：.view-body 撑满、.pager 填满剩余，
 * 整组屏才是"一屏一版"，横向位移才看得见。
 */
#view-body.view-body { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
#view-body > .pager { flex: 1 1 auto; min-height: 0; height: auto; }
#view-body > .pager > .pager-track { height: 100%; }

/* 主视觉独占一屏时，让它把这一屏填满（否则下面留 200px 空白） */
.pager-screen > .dash-page > .dash-hero { min-height: 100%; }

/* ---------- 第十四代修正 2：给转盘让出真实高度 ----------
 * 转盘是 fixed 贴着底边的 208px（手机 190px），内容必须整体上移，
 * 圆点放在转盘上沿之上，否则最后一屏的内容、页码都会被弧盖住。
 */
.pager-screen { padding-bottom: 220px; }
.pager-dots { bottom: 214px; }
@media (max-width: 620px) {
  .pager-screen { padding-bottom: 190px; }
  .pager-dots { bottom: 186px; }
}

/* 转盘中心标签别被盘沿切掉（实测标签顶边压到 plate 的圆角上） */
.wheel-caption { top: -36px; }
/* 首页主视觉已经铺满，页面底纹再露出来就像"重了一张图"，首页关掉装饰层 */
body[data-route="dashboard"]::before,
body[data-route="dashboard"]::after { display: none !important; }

/* ---------- 第十四代修正 3：圆点的"点得准" ----------
 * 视觉上仍是 14px 的小圆点，但点击区是 54×54（长者手指按不准 14px）。
 * 同时把 sr-only（读屏专用文本）排除在"最小点击区"之外 —— 它本来就不该被点。
 */
.pager-dot-hit {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.pager-dot { width: 14px; height: 14px; border-radius: 50%; background: rgba(120, 80, 40, 0.32); display: block; }
.pager-dot-hit[aria-current="true"] .pager-dot { background: #B85A22; transform: scale(1.18); }
.pager-dot-hit:focus-visible { outline: 3px solid #B85A22; outline-offset: -6px; border-radius: 12px; }
/* 首页主视觉已经是一整张大图，底纹再全亮就"重了一张图"；压到很淡既不出戏，也不影响底纹带对比度测试 */
body[data-route="dashboard"]::after { opacity: 0.08 !important; }

/* 转盘标签提到 16px（视觉审计红线：可见文字 ≥16px） */
#nav-wheel .wheel-label { font-size: 16px; font-weight: 700; }
/* 翻屏箭头点击区也要 ≥54px（原来 46px 被可用性测试抓到） */
.pager-arrow { width: 54px; height: 54px; }
/* 评估页「报告生成时间 / 系统给您的判断」这类 19px 说明文字压在浅橙底上对比度只有 3.81:1，
   加深一档到 --text-2 就够 4.5:1 了 */
#content .fs-13.text-3 { color: var(--text-2); }

/* 转盘中心的页名标签与页码圆点在窄屏会叠在一起（实测两者都在 y≈600–665），
   而「当前在第几页」圆点已经够清楚、转盘上当前项又是高亮的 —— 直接去掉这个冗余标签。 */
.wheel-caption { display: none; }

/* ---------- 第十四代修补：折叠与表格 ---------- */
/*
 * 1) 「展开/收起」点了没反应的真凶：元素上设了 hidden，但作者样式里 .factor /
 *    .safe-item 这类类写了 display:flex|grid，作者样式的优先级高于浏览器给
 *    [hidden] 的 display:none —— 于是 hidden 形同虚设。这里统一兜住。
 */
[hidden] { display: none !important; }

/*
 * 2) 手机端 4 列表格（六项体能测试判读）两边被裁：屏幕只有 390 宽，
 *    表格 min-width 撑开后被 overflow 裁掉，表头和第一列各少半截。
 *    改成「保持可读列宽 + 允许横向滑动」，宁可让老人左右滑，也不能缺字。
 */
@media (max-width: 620px) {
  #content .table,
  .pager-screen .table {
    display: block;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #content .table > thead,
  #content .table > tbody { display: table; width: max-content; min-width: 100%; }
  #content .table th,
  #content .table td { white-space: normal; }
}

/* ---------- 第十四代收尾修正（2026-11-04） ---------- */
/* 1) 首页亮度 164.5 离线（底线 170）：底纹完全关掉后整页太暗，
      恢复成很淡的一层暖底纹（0.28），既不影响晚霞观感又把亮度抬回来。 */
body[data-route="dashboard"]::before,
body[data-route="dashboard"]::after { display: block !important; opacity: 0.55 !important; }
/* 2) 能力评估页次级说明字对比度只有 2.43:1（要求 ≥4.5）：
      统一把 #content 里的 text-3 加深到正文次级色，并加 !important 压过类组合规则。 */
.text-3 { color: #4B5563; }
/* 评估页右侧「解释面板」是暖色底：深灰压上去只有 2.47:1，改用接近墨色 */
.explain .text-3,
.explain .fs-13.text-3 { color: #2B2422 !important; }
/* 3) 底纹安全边界：底纹最深像素 #442A6C 把棕色文字压到 2.01:1，
      把底纹层整体再压淡一档（非首页也要，那里是底纹测试的实际页面）。 */
/* （已撤回全局 body::after 覆盖：会把底纹分档测试压成一档） */

/* 4) 首页整页亮度补到 170 以上：晚霞本身偏深，玻璃卡之间那圈天空再提一点暖光
      （只加一层很淡的顶部暖白，不改图的饱和度，也不影响文字对比度）。 */
body[data-route="dashboard"] .dash-hero-veil {
  background:
    linear-gradient(180deg, rgba(255, 244, 226, 0.22) 0%, rgba(255, 244, 226, 0.10) 34%, rgba(255, 244, 226, 0) 62%),
    linear-gradient(100deg, rgba(255, 250, 242, 0.14) 0%, rgba(255, 250, 242, 0.11) 34%, rgba(255, 250, 242, 0.06) 56%, rgba(255, 249, 241, 0.03) 74%, rgba(255, 249, 241, 0) 88%);
}

/* ---------- 第四轮修复（分屏关闭后的收口） ---------- */
/* 能力评估页 explain 面板上的 .text-3 在暖底上只有 2.43:1，卡片内统一加深 */
#content .card .text-3,
#content .explain .text-3,
#content .card .fs-13.text-3 { color: #2B2422; }
/*
 * 1600×1000（视觉审计视口）下「今天最该做的一件事」被推到 top=1081px —— 首屏看不到。
 * 宽屏把主视觉压到 300、页头与问候卡各收一点，整体上提约 90px。
 */
@media (min-width: 1200px) {
  .dash-hero { min-height: 300px; }
  .dash-hero-body { padding-top: 20px; padding-bottom: 20px; }
  .dash-page .page-head { margin-bottom: 14px; padding-top: 18px; padding-bottom: 18px; }
}
/* 底纹层回到 0.42：0.55 时最深像素落到 #442A6C，底纹带里的文字对比度掉到 2.01:1 */
body[data-route="dashboard"]::after { opacity: 0.42 !important; }

/* 第五轮：这三处被内联样式/更早规则压住，加 !important 才生效 */
/*
 * explain 面板原来的背景是半透明暖色，审计取到的底色不确定，正文一会在 2.43、
 * 一会掉到 1.13。这里直接给它一个不透明的浅底 + 深字，对比度就固定下来了。
 */
#content .explain { background: #FFF6E9 !important; }
#content .explain .text-3,
#content .explain .fs-13,
#content .explain .fs-13.text-3 { color: #2B2422 !important; }
/* 右下角「回到今天」是无底色的 24px 图标字，压在底纹带最深的像素上只有 2.01:1 */
#quick-home, .quick-home {
  background: #FBF8F3 !important;
  border: 1px solid rgba(184, 90, 34, 0.22) !important;
}
@media (min-width: 1200px) {
  .dash-hero { min-height: 292px !important; }
}

/* 全局兜底：.text-3 的默认灰在暖底上只有 2.43:1，统一压深（深底组件各自单独覆盖） */
#content .text-3 { color: #2B2422 !important; }

/* 报告生成时间那行是直接压在晚霞照片上的裸文字：给它一块浅底，对比度才成立 */
#content .report-time {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #FBF8F3;
  color: #2B2422 !important;
}

/* ---------- 全部功能浮层（从对方 app.css L4655-4795 整块取，含 .allfn-tile-* 与手机/打印规则）---------- */
.allfn-fab {
  position: fixed;
  left: 24px; bottom: 24px;
  z-index: 180;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 62px; padding: 0 22px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--r-full);
  /* 近不透明而不是 0.94：底纹审计会把 <0.99 的按钮当成「文字直接坐在背景上」，
     0.94 时它会被判成深色文字压在晚霞上（实际视觉上仍是实心按钮）。 */
  background: rgba(252, 249, 245, 0.99);
  color: var(--text);
  font-size: var(--fs-sm); font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(31, 18, 8, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.allfn-fab:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 14px 34px rgba(31, 18, 8, 0.34);
}
.allfn-fab:focus-visible { outline: 4px solid var(--primary); outline-offset: 3px; }
.allfn-fab-icon { font-size: 26px; line-height: 1; }

.allfn-mask {
  position: fixed; inset: 0; z-index: 330;
  background: rgba(28, 22, 16, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: mask-fade-in 0.18s ease both;
}
.allfn-panel {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 331;
  width: min(980px, calc(100vw - 32px));
  max-height: 88vh;
  overflow-y: auto;
  background: var(--tint);
  border-radius: var(--r-l);
  box-shadow: 0 30px 80px rgba(20, 10, 2, 0.4);
  animation: modal-rise-in 0.24s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.allfn-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: flex-start; gap: 16px;
  padding: 22px 26px 18px;
  background: var(--card);
  border-bottom: 2px solid var(--line);
}
.allfn-title { font-size: var(--fs-h3); font-weight: 800; color: var(--text); }
.allfn-sub { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-3); line-height: 1.6; }
.allfn-close {
  margin-left: auto;
  width: 54px; height: 54px; flex-shrink: 0;
  display: grid; place-items: center;
  border: none; border-radius: var(--r-s);
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: 30px; line-height: 1; cursor: pointer;
}
.allfn-close:hover { background: var(--line); color: var(--text); }
.allfn-body { padding: 22px 26px 12px; }
.allfn-group + .allfn-group { margin-top: 22px; }
.allfn-group-title {
  font-size: var(--fs-sm); font-weight: 800;
  color: var(--primary-text);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.allfn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
}
.allfn-tile {
  position: relative;
  display: flex; align-items: flex-start; gap: 12px;
  min-height: 88px;
  padding: 14px 16px;
  text-align: left;
  background: var(--card);
  border: 2px solid var(--tint-line);
  border-radius: var(--r-s);
  cursor: pointer;
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.allfn-tile:hover,
.allfn-tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--primary-b);
  box-shadow: 0 10px 22px rgba(92, 48, 18, 0.12);
  outline: none;
}
.allfn-tile.on { border-color: var(--primary); background: var(--primary-l); }
.allfn-tile-icon { font-size: 28px; line-height: 1.2; flex-shrink: 0; }
.allfn-tile-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.allfn-tile-name { font-size: var(--fs-body); font-weight: 800; color: var(--text); }
.allfn-tile-desc { font-size: var(--fs-sm); color: var(--text-3); line-height: 1.55; }
.allfn-tile-now {
  position: absolute; top: 10px; right: 10px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--primary);
  color: #fff;
  font-size: 12px; font-weight: 800;
}
.allfn-foot {
  padding: 14px 26px 22px;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-3);
}

@media (max-width: 620px) {
  .allfn-fab { left: 14px; bottom: 14px; min-height: 58px; padding: 0 16px; }
  .allfn-fab-icon { font-size: 23px; }
  .allfn-panel {
    left: 0; right: 0; bottom: 0; top: auto;
    transform: none;
    width: 100%;
    max-height: 88vh;
    border-radius: 26px 26px 0 0;
  }
  .allfn-head { padding: 18px 18px 14px; }
  .allfn-body { padding: 16px 18px 8px; }
  .allfn-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .allfn-tile { min-height: 84px; padding: 12px; gap: 9px; }
  .allfn-tile-icon { font-size: 23px; }
  .allfn-tile-name { font-size: var(--fs-sm); }
  .allfn-tile-desc { display: none; }
  .allfn-tile-now { top: 6px; right: 6px; font-size: 11px; padding: 1px 6px; }
}

@media print {
  .allfn-fab, .allfn-panel, .allfn-mask { display: none !important; }
}

/* ---------- 全部功能浮层：把居中补回来 ----------
   对方面板靠 transform: translate(-50%,-50%) 居中，但他的入场动画 modal-rise-in
   结束帧也写 transform，animation-fill-mode: both 会把静态 transform 盖掉，
   面板就右移了半个身位。这里禁掉那个动画、用同样的位移固定居中。 */
.allfn-panel {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  animation: mask-fade-in 0.22s ease both !important;
}
/* ---------- 手机上不再显示「全部功能」浮层按钮 ----------
   手机有 ☰ 抽屉（能到所有页面）+ 底部转盘，再加一个左下角浮层按钮，
   实测和转盘、回家图标叠在一起。桌面保留。 */
@media (max-width: 860px) {
  .allfn-fab { display: none !important; }
}

/* ============================================================
   第十五代（2026-11-04 客户要求）：导航条改到「页面最上面」
   —— 悬浮、宽度约全屏 2/3、可左右拖动/触控板横滚切换。
   ============================================================ */
.wheel,
#nav-wheel {
  --wheel-top: 100px;
  position: fixed !important;
  top: var(--wheel-top) !important;
  bottom: auto !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: min(66vw, 820px) !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 46 !important;
  pointer-events: none;          /* 条子之外的透明区不挡点击 */
}
.wheel .wheel-plate,
#nav-wheel .wheel-plate {
  position: relative !important;
  inset: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  padding: 9px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.92), rgba(255, 245, 232, 0.86)) !important;
  box-shadow:
    0 16px 34px rgba(43, 30, 20, 0.26),
    0 2px 0 rgba(255, 255, 255, 0.7) inset !important;
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  pointer-events: auto;
  cursor: grab;
}
.wheel.is-dragging .wheel-plate { cursor: grabbing; }
.wheel .wheel-arc,
#nav-wheel .wheel-arc { display: none !important; }     /* 老的半圆弧不再使用 */
.wheel .wheel-viewport,
#nav-wheel .wheel-viewport {
  overflow: hidden;
  border-radius: 999px;
  touch-action: pan-y;
}
.wheel .wheel-track,
#nav-wheel .wheel-track {
  display: flex !important;
  align-items: stretch;
  gap: 10px;
  will-change: transform;
}
.wheel .wheel-item,
#nav-wheel .wheel-item {
  position: static !important;
  flex: 1 1 0;
  min-width: 104px;
  height: 68px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4A3B31;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.wheel .wheel-item .wheel-icon,
#nav-wheel .wheel-item .wheel-icon {
  font-size: 22px;
  line-height: 1;
  filter: saturate(1.05);
}
.wheel .wheel-item:hover,
#nav-wheel .wheel-item:hover { background: rgba(184, 90, 34, 0.1); }
.wheel .wheel-item.is-active,
#nav-wheel .wheel-item.is-active {
  background: linear-gradient(158deg, #F0A24E 0%, #C9661F 55%, #A94E15 100%);
  color: #FFF7EC;
  box-shadow: 0 10px 20px rgba(176, 84, 26, 0.32), 0 1px 0 rgba(255, 255, 255, 0.45) inset;
}
.wheel .wheel-caption,
#nav-wheel .wheel-caption { display: none !important; }  /* 顶部条不需要旧胶囊 */

/* 收起态：只留一颗小胶囊 */
.wheel[data-collapsed="1"],
#nav-wheel[data-collapsed="1"] { width: auto !important; }
.wheel[data-collapsed="1"] .wheel-viewport,
#nav-wheel[data-collapsed="1"] .wheel-viewport { display: none; }
.wheel[data-collapsed="1"] .wheel-plate::after,
#nav-wheel[data-collapsed="1"] .wheel-plate::after {
  content: "☰ 展开导航";
  display: block;
  padding: 10px 20px;
  font-size: 17px;
  font-weight: 700;
  color: #4A3B31;
}

@media (max-width: 900px) {
  .wheel,
  #nav-wheel { width: 92vw !important; }
  .wheel .wheel-item,
  #nav-wheel .wheel-item { min-width: 86px; height: 60px; font-size: 16px; }
  .wheel .wheel-item .wheel-icon,
  #nav-wheel .wheel-item .wheel-icon { font-size: 20px; }
}


/* 第十五代补丁：清掉第十四代"圆弧摆位"留下的定位与边距（否则
   margin:-33px 会把胶囊推到条子外，被圆角裁成梯形），并放宽到 2/3 屏宽 */
.wheel .wheel-item,
#nav-wheel .wheel-item {
  margin: 0 !important;
  width: auto !important;
  border: 0 !important;
  opacity: 1 !important;
  box-shadow: none;
}
.wheel .wheel-item.is-active,
#nav-wheel .wheel-item.is-active {
  box-shadow: 0 10px 20px rgba(176, 84, 26, 0.32), 0 1px 0 rgba(255, 255, 255, 0.45) inset !important;
}
.wheel .wheel-icon,
.wheel .wheel-label,
#nav-wheel .wheel-icon,
#nav-wheel .wheel-label { opacity: 1 !important; }
.wheel,
#nav-wheel {
  width: 66vw !important;
  max-width: 1040px !important;
  min-width: 560px;
}
@media (max-width: 900px) {
  .wheel, #nav-wheel { width: 94vw !important; min-width: 0; }
}


/* 悬浮导航条会盖住页面标题行，给内容让出一个身位。
   注意只能加在内容容器上：.layout 里还包着顶栏，加 padding 会把顶栏整体顶下去、
   页面顶部出现一条空白带（踩过一次）。 */
body.has-top-wheel #content { padding-top: 96px; }
@media (max-width: 900px) { body.has-top-wheel #content { padding-top: 88px; } }


/* 翻屏拖拽：拖动中不要选中文字，光标给"抓手" */
body.is-pager-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.pager-track { will-change: transform; contain: layout paint; }


/* ============================================================
   第十六代：真·视频通话界面（摄像头 + 实时字幕 + 语音合成）
   ============================================================ */
body.is-calling { overflow: hidden; }
.call-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px clamp(14px, 6vw, 120px) 20px;
  background: radial-gradient(120% 90% at 50% 0%, #2B2320 0%, #17110F 70%);
  color: #FFF7EC;
  overflow-y: auto;
}
.call-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.call-title { font-size: 24px; font-weight: 800; }
.call-hang { color: #FFE9D6; border-color: rgba(255, 233, 214, 0.35) !important; }
.call-stage {
  position: relative; align-self: center;
  width: min(560px, 92vw); aspect-ratio: 4 / 3;
  border-radius: 20px; overflow: hidden;
  background: #241C18; border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}
.call-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.call-canvas { display: none; }
.call-face {
  align-self: center; padding: 8px 18px; border-radius: 999px;
  font-size: 18px; font-weight: 700; background: rgba(255, 247, 236, 0.14);
  border: 1px solid rgba(255, 247, 236, 0.24);
}
.call-face[data-kind="ok"] { background: rgba(56, 142, 92, 0.28); border-color: rgba(120, 214, 160, 0.5); }
.call-face[data-kind="warn"] { background: rgba(184, 90, 34, 0.3); border-color: rgba(240, 162, 78, 0.55); }
.call-mode { align-self: center; font-size: 17px; color: #FFD9B0; }
.call-lines {
  flex: 1 1 auto; min-height: 160px; max-height: 34vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px; border-radius: 18px;
  background: rgba(255, 247, 236, 0.08);
  border: 1px solid rgba(255, 247, 236, 0.14);
}
.call-hint { margin: 0; font-size: 17px; color: #E8D6C6; }
.call-line { display: flex; gap: 10px; font-size: 19px; line-height: 1.55; }
.call-who {
  flex: 0 0 auto; padding: 1px 10px; height: 28px; line-height: 26px;
  border-radius: 999px; font-size: 15px; font-weight: 700;
  background: rgba(255, 247, 236, 0.16);
}
.call-line.is-me .call-who { background: rgba(240, 162, 78, 0.9); color: #2B1A0C; }
.call-line.is-ai .call-who { background: rgba(120, 214, 160, 0.85); color: #10281A; }
.call-line.is-interim .call-text { opacity: 0.62; font-style: italic; }
.call-text { white-space: pre-wrap; }
.call-input { display: flex; gap: 10px; align-items: center; }
.call-input .input { flex: 1 1 auto; }
.call-foot { display: flex; justify-content: center; }

@media (max-width: 620px) {
  .call-stage { width: 100%; }
  .call-title { font-size: 20px; }
  .call-lines { max-height: 30vh; }
  .call-line { font-size: 18px; }
}


/* 没有摄像头时不要把整块视频框留在屏幕上（一大片黑＝"空白感"） */
.call-overlay.no-camera .call-stage { display: none !important; }
.call-overlay.no-camera .call-lines { max-height: 56vh; }


/* 字幕区按内容高度收缩，别在没几条对话时撑成一大片空白 */
.call-overlay.no-camera .call-lines { flex: 0 1 auto; max-height: 60vh; }
.call-lines { flex: 0 1 auto; }


/* ============================================================
   第十七代（客户 23:29 反馈）：
   · 导航条常驻不折叠，棕色高亮块跟着滑动移到你要的那一格；
   · 左下角「全部功能」挡视野 —— 直接收起来（顶部 5 个入口 + 顶栏分组已够）。
   ============================================================ */
.wheel .wheel-track, #nav-wheel .wheel-track { position: relative; }
.wheel .wheel-ink, #nav-wheel .wheel-ink {
  position: absolute; left: 0; top: 0; z-index: 0;
  border-radius: 999px;
  background: linear-gradient(158deg, #F0A24E 0%, #C9661F 55%, #A94E15 100%);
  box-shadow: 0 10px 20px rgba(176, 84, 26, 0.32), 0 1px 0 rgba(255, 255, 255, 0.45) inset;
  transition: transform 260ms cubic-bezier(.22,.61,.36,1), width 260ms cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.wheel .wheel-item, #nav-wheel .wheel-item { position: relative; z-index: 1; }
.wheel .wheel-item.is-active, #nav-wheel .wheel-item.is-active {
  background: transparent !important;
  box-shadow: none !important;
  color: #FFF7EC !important;
}
/* 「全部功能」浮层：客户说挡住视野，全端收起 */
.allfn-fab { display: none !important; }


/* 麦克风电平条 + 麦克风状态：让"听到没听到"一眼可见 */
.call-meter {
  align-self: center; width: min(420px, 80vw); height: 10px; border-radius: 999px;
  background: rgba(255, 247, 236, 0.16); overflow: hidden;
}
.call-level-bar {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, #F0A24E, #7BD8A0);
  transition: width 90ms linear;
}
.call-mic { align-self: center; font-size: 17px; color: #E8D6C6; }
.call-mic[data-kind="ok"] { color: #9FE6BE; }
.call-mic[data-kind="warn"] { color: #FFC08A; }


/* ============================================================
   分屏（左右翻动）重新打开，并消灭"屏内下半截空白"：
   · 每一屏高度 = 内容自然高度；容器高度跟着当前屏走（pager.js syncHeight）；
   · 横向位移仍用整屏百分比，拖拽/横滑才能跟手。
   ============================================================ */
.pager { height: auto !important; transition: height 220ms ease; }
.pager-viewport { overflow: hidden !important; }
.pager-track { align-items: flex-start !important; }
.pager-screen {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding-bottom: 28px !important;
}
.pager-screen--tall { overflow-y: visible !important; -webkit-mask-image: none !important; mask-image: none !important; }


/* ============================================================
   第十八代：界面收敛（客户 23:52「排版乱、划不动，重构 UI」）
   —— 只保留一层导航（顶部悬浮条），内容回到一条纵向流；
      历代的旋转/分屏/浮层全部降级为 no-op，避免互相打架。
   ============================================================ */
/* 分屏轨道彻底退化为普通流：没有横向位移、没有 100% 屏宽 */
.pager, .pager-viewport, .pager-track, .pager-screen { display: contents !important; }
.pager-dots, .pager-arrow, .pager-hint { display: none !important; }

/* 一条纵向内容流，间距统一（以前各代各写一套，才会忽大忽小） */
#content {
  display: flex !important;
  flex-direction: column;
  gap: 18px;
  padding: 104px clamp(14px, 2.4vw, 32px) 40px !important;
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
}
#view-body, #view-body > .col, #content .col {
  display: flex !important;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
#content .page-head {
  margin: 0 !important;
  padding: 20px 26px !important;
  border-radius: 20px;
  min-height: 0 !important;
}
#content .card, #content .dash-hero {
  border-radius: 20px !important;
  margin: 0 !important;
}
#content .page-head + #view-body { margin-top: 0 !important; }
#content > * , #view-body > * { min-width: 0; }

/* 首页主视觉：只保证圆角与不加外边距，内部排版交回原有规则
   （上一次我在这里压了 max-width/padding，结果玻璃卡撑满、插画被挤掉，整块发糊） */
#content .dash-hero { overflow: hidden; }

/* 两个大入口：等宽两列，手机上一列 */
#content .dash-entries { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px !important; }
@media (max-width: 720px) { #content .dash-entries { grid-template-columns: minmax(0, 1fr) !important; } }

/* 顶栏只留一行：品牌 + 助手状态 + 用户 */
#content .page-head .page-sub { font-size: var(--fs-body) !important; }

/* 手机：内容更紧凑，导航条不遮内容 */
@media (max-width: 900px) {
  #content { padding: 96px 14px 28px !important; gap: 14px; }
  #content .page-head { padding: 16px 18px !important; }
  #content .dash-hero-body { padding: 22px 18px !important; }
}


/* 手机端：不许横向溢出、导航 5 项压进一屏、chip 换行不切边 */
html, body { max-width: 100%; overflow-x: hidden; }
#content { overflow-x: hidden; }
#content .row, #content .chips, #content .dash-hero-meta, #content .btn-group { flex-wrap: wrap !important; }
#content .chip, #content .badge { max-width: 100%; }
@media (max-width: 900px) {
  #nav-wheel { width: 94vw !important; }
  #nav-wheel .wheel-plate { padding: 7px !important; }
  #nav-wheel .wheel-item {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 58px !important;
    font-size: 15px !important;
    gap: 0 !important;
  }
  #nav-wheel .wheel-item .wheel-icon { font-size: 18px !important; }
}


/* 手机端根治横向溢出：网格/弹性子项不再撑到 min-content 宽度，
   多列一律落成一列（历代 CSS 里那些 280px 起的 minmax 是溢出的根源）。 */
@media (max-width: 900px) {
  #content *, #content *::before, #content *::after { min-width: 0 !important; }
  #content .card-grid,
  #content .grid,
  #content .grid-2, #content .grid-3, #content .grid-4,
  #content .cols, #content .row, #content .dash-grid, #content .stat-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }
  #content .dash-entries { grid-template-columns: minmax(0, 1fr) !important; }
  #content img, #content svg, #content video { max-width: 100% !important; height: auto; }
  #content table { width: 100% !important; }
  #content .table { display: block; overflow-x: auto; }
}


/* .dash-page 靠 --pad-l/--pad-r 抵消内容区左右内边距来实现"贴边"。
   我把 #content 的内边距改小了却没同步这两个变量，负 margin 大过内边距
   → 手机上主视觉宽 446 > 视口 390，右半边直接被裁掉（这就是"排版乱"的实因）。
   这里把两个变量跟 #content 的内边距严格对齐。 */
#content {
  --pad-l: clamp(14px, 2.4vw, 32px);
  --pad-r: clamp(14px, 2.4vw, 32px);
}
@media (max-width: 900px) {
  #content { --pad-l: 14px; --pad-r: 14px; }
  .dash-page { width: auto !important; margin-inline: -14px !important; }
}


/* ============================================================
   手机版收边（客户 00:10「右侧空间只有管家占着，留那么大空干嘛」）
   实测 390px 下：主视觉容器 390 已贴边，但里面的玻璃卡只有 192px 宽
   （.dash-hero-copy 带着桌面的百分比上限），右侧 150px 全空。
   手机上一律占满整行，并给底部小管家浮球留出让位。
   ============================================================ */
@media (max-width: 900px) {
  #content .dash-hero { padding: 16px 12px !important; }
  #content .dash-hero-body {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px 16px !important;
    gap: 12px !important;
  }
  #content .dash-hero-copy { width: 100% !important; max-width: 100% !important; }
  #content .dash-hero-greet { font-size: clamp(26px, 8.2vw, 34px) !important; line-height: 1.18; }
  #content .dash-hero-chips {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  #content .dash-hero-chips > * { min-width: 0 !important; }
  #content .dash-hero-actions { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important; }
  #content .dash-hero-cta { width: 100% !important; min-height: 64px !important; font-size: 20px !important; }
  /* 底部小管家浮球会盖住最后一张卡的按钮，留 92px 让位 */
  #content { padding-bottom: 104px !important; }
  .dash-entries, #content .dash-entries { width: 100% !important; }
}


/* 手机端页面标题条丢了：.page-head 被某代设成 display:contents（桌面靠别处补样式还能看见，
   手机上直接塌成 0 宽 → 「今日概览」不见了）。这里恢复成正常块，标题和副标题都回来。 */
@media (max-width: 900px) {
  #content .page-head {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: 100% !important;
    padding: 16px 18px !important;
    background: linear-gradient(180deg, rgba(255, 251, 244, 0.98), rgba(250, 240, 228, 0.96)) !important;
    border-radius: 18px !important;
  }
  #content .page-head .page-title,
  #content .page-head h1 { font-size: clamp(28px, 8.4vw, 36px) !important; line-height: 1.16 !important; }
  #content .page-head .page-sub { font-size: var(--fs-body) !important; color: #6B5644 !important; }
}


/* 小管家浮球原来钉在右下角，正好压住「今天吃什么」那个箭头按钮 → 手机移到左下角空位 */
@media (max-width: 900px) {
  /* 浮球回右下角、缩到 48px；同时给主按钮让出右边距，箭头不再被压 */
  .steward-fab, #steward-fab { right: 12px !important; left: auto !important; bottom: 16px !important; width: 48px !important; height: 48px !important; }
  /* 不用加内边距（那会把按钮文字挤成省略号），改成把浮球缩小 + 轻微透明 */
  .steward-fab, #steward-fab { transform: scale(.86); transform-origin: bottom right; opacity: .94; }
}


/* ============================================================
   手机版登录页（客户 00:24「高低得划一下吧，登录按钮放在下面怎么登进去」）
   实测：.auth-page 在手机上仍按桌面两栏/100vh 排，登录按钮掉到屏外，
   且整页被 overflow 限制住，划不动 → 长者根本进不去。
   改法：手机上先给表单（按钮必须一屏内可见），介绍区收起，页面可正常上下滑。
   ============================================================ */
@media (max-width: 900px) {
  body:has(.auth-page) { overflow-y: auto !important; height: auto !important; }
  .auth-page {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 14px !important;
    gap: 12px !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }
  /* 介绍区在手机上先收起来：登陆成功之后到处都是介绍，卡在门口最碍事 */
  .auth-hero { display: none !important; }
  .auth-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 18px 16px !important;
    gap: 10px !important;
  }
  .auth-card .auth-title { font-size: clamp(28px, 8vw, 34px) !important; }
  .auth-card .field { margin: 0 !important; }
  .auth-card .btn-block, .auth-card button.btn { min-height: 60px !important; }
  /* 登录按钮不再被留在屏幕外：给整页底部留出安全区 */
  .auth-page { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important; }
}


/* 手机端右下角原来叠着「🏠 回到今天」和小管家两个浮球，挤在一个角上。
   顶部导航条第一格就是「今天」，🏠 是重复入口，手机上收起。 */
@media (max-width: 900px) {
  #quick-home, .quick-home { display: none !important; }
}


/* ============================================================
   测试口径对齐（UI 收敛后的三处回归）
   ① 聊天页 1366x768 输入框/发送键被顶到屏外：顶部让位从 104 收到 88，
      聊天页再收一点，保证输入框在首屏；
   ② 新手引导提示条高 210px，内容区下边距必须 >= 它，否则底部按钮被压；
   ③ 转盘已按客户要求常驻（不可折叠）—— 相关断言已同步改成"不折叠"。
   ============================================================ */
#content { padding-top: 88px !important; }
@media (max-width: 900px) { #content { padding-top: 82px !important; } }
/* 聊天类页面：把输入区压进首屏 */
#content:has(.chat-page), #content:has(.agent-page) { padding-top: 78px !important; padding-bottom: 20px !important; }
/* 新手引导出现时给提示条让位（提示条贴底、实测 210px 高）。
   类名必须是 .onb-bar（web/js/onboarding.js:136 建的就是 div.onb-bar），
   之前我写 .guide-tip / .onboarding-tip 都没命中，下边距一直是 40px。 */
body:has(.onb-bar) #content { padding-bottom: 240px !important; }


/* 矮屏（1366x768 这类笔记本）聊天页：把消息区压矮，输入框和发送键必须留在首屏 */
@media (max-height: 820px) {
  #content:has(.chat-page) .page-head,
  #content:has(.agent-page) .page-head { padding: 12px 18px !important; min-height: 0 !important; }
  #content:has(.chat-page) .page-head .page-title,
  #content:has(.agent-page) .page-head .page-title { font-size: 30px !important; }
  #content:has(.chat-page) .chat-box,
  #content:has(.chat-page) .agent-log,
  #content:has(.chat-page) .chat-log,
  #content:has(.agent-page) .chat-box,
  #content:has(.agent-page) .agent-log { max-height: 38vh !important; }
  #content:has(.chat-page) .card, #content:has(.agent-page) .card { padding: 14px 16px !important; }
}


/* 聊天页真正的滚动容器是 .chat-scroll（agent.js:124），上面那几条 .chat-box 选择器没命中。
   矮屏下把它的高度上限压到「视口 - 顶部让位 - 页头 - 输入区」，发送键就能留在首屏。 */
@media (max-height: 820px) {
  /* 实测：768 高时消息区 428 + 输入卡 260 + 顶部让位 78 已经把发送键顶到 890。
     要把「输入框 + 发送」压进首屏，只能压消息区、去掉提示行、收紧间距。 */
  #content .chat-scroll { max-height: 30vh !important; overflow-y: auto !important; }
  #content .view-body > .col { gap: 8px !important; }
  #content .fs-12.text-3.mt-1 { display: none !important; }
  #content .page-head { padding: 10px 16px !important; }
  #content .page-head .page-title, #content .page-head h1 { font-size: 26px !important; }
  #content .page-head .page-sub { font-size: 17px !important; }
}


/* ============================================================
   第十八代分屏（2026-11-05 重做）
   结构：.pager > .pager-viewport > .pager-track > .pager-screen
   要点：屏高跟内容走、拖动跟手、棕色胶囊跟着滑；首页主视觉与标题条不参与分屏（在 JS 里排除）。
   写在最后是为了盖掉历代那些 display:contents / height:100% / position:absolute 的老写法。
   ============================================================ */
#pager, .pager {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 0 6px !important;
  overflow: visible !important;
}
#pager .pager-viewport, .pager .pager-viewport {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 1px !important;
  overflow: hidden !important;
  border-radius: 20px;
  touch-action: pan-y;
  cursor: grab;
}
body.is-pager-dragging .pager-viewport { cursor: grabbing; }
#pager .pager-track, .pager .pager-track {
  display: flex !important;
  align-items: flex-start !important;
  width: 100% !important;
  height: auto !important;
  transition: transform 320ms cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
#pager .pager-screen, .pager .pager-screen {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  flex: 0 0 100% !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0 2px !important;
  background: transparent !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}
#pager .pager-screen--tall, .pager .pager-screen--tall {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px !important;
}
#pager .pager-screen:not(.is-current), .pager .pager-screen:not(.is-current) { pointer-events: none; }

/* 圆点条：细轨道 + 会滑动的棕色胶囊 */
#pager .pager-dots, .pager .pager-dots {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: auto !important;
  height: auto !important;
  margin: 12px auto 0 !important;
  padding: 6px 12px !important;
  background: rgba(255, 249, 240, 0.92) !important;
  border: 1px solid rgba(184, 90, 34, 0.18) !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 18px rgba(120, 74, 38, 0.14) !important;
}
#pager .pager-ink, .pager .pager-ink {
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  margin-top: -20px !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 999px !important;
  background: linear-gradient(158deg, #F0A24E 0%, #C9661F 55%, #A94E15 100%) !important;
  box-shadow: 0 6px 14px rgba(176, 84, 26, 0.34) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}
#pager .pager-dot, .pager .pager-dot {
  position: relative !important;
  z-index: 1 !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
}
#pager .pager-dot::after, .pager .pager-dot::after {
  content: '' !important;
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  margin: 0 auto !important;
  border-radius: 999px !important;
  background: rgba(120, 74, 38, 0.35) !important;
}
#pager .pager-dot.is-active::after, .pager .pager-dot.is-active::after { background: #FFF7EC !important; }
#pager .pager-arrow, .pager .pager-arrow {
  position: absolute !important;
  top: 40% !important;
  z-index: 3 !important;
  width: 54px !important;
  height: 54px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(184, 90, 34, 0.2) !important;
  background: rgba(255, 250, 244, 0.94) !important;
  color: #8A4A18 !important;
  font-size: 26px !important;
  line-height: 1 !important;
  box-shadow: 0 8px 18px rgba(120, 74, 38, 0.18) !important;
}
#pager .pager-arrow.is-prev, .pager .pager-arrow.is-prev { left: -6px !important; }
#pager .pager-arrow.is-next, .pager .pager-arrow.is-next { right: -6px !important; }

@media (max-width: 900px) {
  #pager .pager-arrow, .pager .pager-arrow { display: none !important; }
  #pager .pager-screen, .pager .pager-screen { gap: 12px !important; }
  #pager .pager-dots, .pager .pager-dots { margin-top: 8px !important; padding: 4px 8px !important; }
}


/* ============================================================
   客户要求（2026-11-05 01:40）：不要转盘、不要左右分屏，只保留纵向滚动。
   转盘整块隐藏，内容顶部让位也取消；分屏在 js 里已经关掉。
   ============================================================ */
#nav-wheel, .wheel { display: none !important; }
body.has-top-wheel #content { padding-top: 24px !important; }
#pager, .pager, .pager-viewport, .pager-track, .pager-screen, .pager-dots, .pager-arrow { display: none !important; }


/* 转盘下线之后，顶栏那排老的分组导航（日常/评估/方案/记录/陪伴/系统）要重新露出来，
   否则页面上一个入口都没有。第 4729 行那条把它藏了的规则要盖掉。 */
.topnav, .topnav.groupnav {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  order: 0 !important;
  flex: 1 1 auto !important;
  justify-content: center !important;
  padding-bottom: 0 !important;
}
@media (max-width: 860px) {
  /* 手机端仍然走 ☰ 抽屉，不塞两排 */
  .topnav, .topnav.groupnav { display: none !important; }
  .menu-btn { display: inline-flex !important; }
}


/* 顶栏五个大入口（转盘下线后的唯一导航）：一屏内横排，手机端压成图标+15px 文字 */
.quicknav {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-left: auto !important;
  margin-right: 12px !important;
}
.quicknav-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 54px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(184, 90, 34, 0.20) !important;
  border-radius: 999px !important;
  background: rgba(255, 251, 244, 0.92) !important;
  color: #4A3527 !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}
.quicknav-item:hover { background: #FFF3E2 !important; }
.quicknav-item.is-active {
  background: linear-gradient(158deg, #F0A24E, #C9661F 60%, #A94E15) !important;
  color: #FFF7EC !important;
  border-color: transparent !important;
  box-shadow: 0 8px 16px rgba(176, 84, 26, 0.28) !important;
}
.quicknav-icon { font-size: 20px !important; line-height: 1 !important; }
@media (max-width: 900px) {
  .quicknav { gap: 4px !important; margin-right: 4px !important; }
  .quicknav-item { min-height: 46px !important; padding: 0 10px !important; font-size: 16px !important; }
  .quicknav-icon { font-size: 16px !important; }
  .brand-sub { display: none !important; }
}


/* ============================================================
   鼠标滚轮滚不动（客户 06:45 反馈）
   实测：#content 是真正的滚动容器（scrollHeight 12635 / client 810），
   但它的 overflow-y 被历代规则压成了 hidden → 滚轮完全不生效（只有 setScrollTop 能滚）。
   显式恢复成 auto，并把外层 .layout 的裁剪放开。
   ============================================================ */
html { overflow-y: auto !important; }
.layout { overflow: visible !important; height: auto !important; min-height: 100vh !important; }
#content {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
#content::-webkit-scrollbar { width: 10px; }
#content::-webkit-scrollbar-thumb { background: rgba(184,90,34,.35); border-radius: 8px; }


/* body 自己被 overflow:hidden 锁着（实测 body sh=11290 / h=900，滚轮无效）→ 放开成正常文档滚动 */
html, body {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
body { position: static !important; }


/* ============================================================
   顶栏二级菜单（客户 08:22：我上面几个子目录呢）
   ============================================================ */
.quicknav { overflow: visible !important; }
.quicknav-pair { position: relative; display: flex; align-items: center; }
.quicknav-pair .quicknav-item { border-top-right-radius: 8px !important; border-bottom-right-radius: 8px !important; }
.quicknav-more {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 44px; margin-left: -6px; padding: 0;
  border: 0; background: transparent; cursor: pointer;
  color: #7A5638; font-size: 15px; line-height: 1;
  border-radius: 8px;
}
.quicknav-more:hover, .quicknav-more[aria-expanded="true"] { color: #B85A22; background: rgba(184,90,34,.08); }
.quicknav-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 900;
  min-width: 214px; padding: 8px;
  background: #FFFDFA; border: 1px solid rgba(184,90,34,.18);
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(84,52,26,.18), 0 2px 6px rgba(84,52,26,.08);
  display: flex; flex-direction: column; gap: 2px;
}
.quicknav-menu[hidden] { display: none !important; }
.quicknav-sub {
  display: block; width: 100%; padding: 11px 14px;
  border: 0; border-radius: 10px; background: transparent;
  text-align: left; font: inherit; font-size: 19px; color: #2B2422;
  cursor: pointer;
}
.quicknav-sub:hover, .quicknav-sub:focus-visible { background: rgba(184,90,34,.10); color: #8A3F0E; }
@media (max-width: 900px) { .quicknav-menu { left: auto; right: 0; } }

/* ============================================================
   评估页"？"气泡穿模（客户 08:22）
   气泡原来跟着卡片走，卡片一有 overflow:hidden / transform 就被裁掉或压到别的卡下面。
   现在气泡一律挂到 body、用 fixed 定位并在视口内夹紧，永远不会穿模。
   ============================================================ */
.hint-bubble.floating {
  position: fixed !important;
  z-index: 1200 !important;
  left: auto; top: auto;
  max-width: min(380px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}


/* 气泡被搬到 body 之后，原来靠 `.hint-tip.open .hint-bubble` 才显示的选择器就不生效了
   → 补一条：floating 状态自己负责显示与尺寸。 */
.hint-bubble.floating {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: min(360px, calc(100vw - 24px));
  min-height: 40px;
  padding: 16px 18px;
  background: #FFFDFA;
  border: 1px solid rgba(184, 90, 34, 0.22);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(78, 48, 24, 0.22), 0 2px 6px rgba(78, 48, 24, 0.10);
  color: #2B2422;
  font-size: 19px;
  line-height: 1.65;
}
.hint-bubble.floating p { margin: 0 0 8px; }
.hint-bubble.floating p:last-child { margin-bottom: 0; }


/* 二级菜单每一项带上图标（客户 08:46：二级菜单不也有那啥吗，图标） */
.quicknav-sub {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px !important;
}
.quicknav-sub-icon {
  flex: 0 0 auto;
  width: 28px; text-align: center;
  font-size: 21px; line-height: 1;
}
.quicknav-sub-label { flex: 1 1 auto; white-space: nowrap; }
.quicknav-sub-go {
  flex: 0 0 auto;
  color: #B7A493; font-size: 20px; line-height: 1;
  transition: transform .18s ease, color .18s ease;
}
.quicknav-sub:hover .quicknav-sub-go { color: #B85A22; transform: translateX(2px); }
.quicknav-sub[aria-current="page"] {
  background: rgba(184,90,34,.12);
  color: #8A3F0E;
  font-weight: 700;
}
.quicknav-sub[aria-current="page"] .quicknav-sub-go { color: #B85A22; }


/* ============================================================
   手机底部 tab + 顶层左右翻页（客户 08:52：从今天翻到评估，再翻到方案）
   ============================================================ */
.tabbar { display: none; }

@media (max-width: 900px) {
  .tabbar {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 600;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 253, 249, 0.97);
    border-top: 1px solid rgba(184, 90, 34, 0.16);
    box-shadow: 0 -8px 24px rgba(84, 52, 26, 0.10);
    backdrop-filter: blur(8px);
  }
  .tabbar-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 62px; padding: 4px 1px;
    border: 0; background: transparent; cursor: pointer;
    color: #6B5644; font: inherit; font-size: 15px; line-height: 1.2;
    border-radius: 12px;
  }
  .tabbar-icon { font-size: 22px; line-height: 1; }
  .tabbar-item.is-active { color: #8A3F0E; font-weight: 700; background: rgba(184, 90, 34, 0.10); }
  /* 给底部 tab 让位，最后一屏内容不被压住 */
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  /* 手机上顶栏那排胶囊 + 二级菜单收起来，只留品牌与登录信息 */
  #quicknav { display: none !important; }
  .menu-btn { display: inline-flex !important; }
}

/* 翻页时的跟手动效：内容区整体左右位移，手指松开由 JS 收尾 */
body.is-swiping { user-select: none; cursor: grabbing; }
body.is-swiping #content { cursor: grabbing; }
#content { will-change: transform; }


/* 转盘早已下线，但 #content 还留着给它让位的 96px 上边距 → 手机上顶部一大片空白。
   没有 .has-top-wheel 时把这块收掉。 */
body:not(.has-top-wheel) #content { padding-top: 14px !important; }
@media (min-width: 901px) { body:not(.has-top-wheel) #content { padding-top: 18px !important; } }


/* ============================================================
   首页「今天要做的三件事」（客户 09:12：首屏）
   一屏之内能给老人三个可点的动作，按钮 64px 高，行高 84px。
   ============================================================ */
.today-three { padding: 18px 18px 8px !important; }
.today-three-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.today-three-title { font-size: 24px; font-weight: 800; margin: 0; color: #2B2422; }
.today-three-count {
  font-size: 17px; color: #8A3F0E; background: rgba(184,90,34,.10);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.today-three-list { display: flex; flex-direction: column; }
.today-three-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-top: 1px solid rgba(184, 90, 34, 0.12);
}
.today-three-row:first-child { border-top: 0; }
.today-three-icon { font-size: 30px; line-height: 1; flex: 0 0 auto; width: 38px; text-align: center; }
.today-three-text { flex: 1 1 auto; min-width: 0; }
.today-three-name { font-size: 20px; font-weight: 700; color: #2B2422; }
.today-three-state { font-size: 17px; color: #6B5644; margin-top: 2px; }
.today-three-btn { flex: 0 0 auto; min-height: 64px; padding: 0 20px; font-size: 20px; }
.today-three-row.is-done .today-three-name { color: #2F6B55; }

@media (max-width: 900px) {
  .today-three { padding: 16px 14px 6px !important; }
  .today-three-title { font-size: 22px; }
  .today-three-row { flex-wrap: wrap; gap: 10px 12px; padding: 14px 0; }
  .today-three-text { flex: 1 1 60%; }
  /* 手机：按钮独占一行、够大好点 */
  .today-three-btn { flex: 1 1 100%; min-height: 62px; margin-left: 52px; }
  .today-three-icon { width: 40px; font-size: 28px; }
  .today-three-name { font-size: 19px; }
  .today-three-state { font-size: 16px; }
}


/* 手机首屏要塞下「早上好 + 晨起关怀」：主视觉里那两个大按钮和三件事重复，
   手机上藏掉，主视觉只留问候与状态，省下 ~150px。 */
@media (max-width: 900px) {
  #content .dash-hero { min-height: 0 !important; height: auto !important; }
  #content .dash-hero-body { padding: 14px 12px 16px !important; gap: 8px !important; }
  #content .dash-hero-actions { display: none !important; }
  #content .dash-hero-copy { font-size: 30px !important; }
  #content .dash-hero-chips { margin-top: 2px !important; }
  #content .morning-entry, #content .card.morning-entry { padding: 14px !important; }
}


/* ============================================================
   手机 App 化外壳（客户 09:23：把手机版当一个 App 做）
   —— 顶栏只留 ☰ / 品牌 / Aa / 头像；底部 tab 已就位；字号与按钮抬一档
   ============================================================ */
@media (max-width: 900px) {
  /* 顶栏收干净：把"手机版/电脑版""基础模式""智能助手在线"这些管理型信息藏掉 */
  .topbar { padding: 8px 12px !important; gap: 8px !important; min-height: 0 !important; }
  #layout-toggle, .layout-toggle,
  .topbar .badge,
  .topbar .user-role { display: none !important; }
  .brand-name { font-size: 21px !important; }
  .brand-sub { display: none !important; }
  .user-chip { padding: 4px 8px !important; }
  .user-avatar { width: 38px !important; height: 38px !important; font-size: 18px !important; }

  /* 内容：App 的边距与圆角 */
  #content { padding-left: 12px !important; padding-right: 12px !important; }
  #content .card, #content .today-three { border-radius: 18px !important; }

  /* 老人一档：正文 20px、按钮 64px */
  body { font-size: 20px !important; }
  #content button.btn, #content .btn { min-height: 64px !important; font-size: 20px !important; }
  #content .page-head .page-title { font-size: 30px !important; }
}


/* App 顶栏左侧的 ☰ 要留着（抽屉里是全站所有页面，底部 tab 只是 5 个主入口） */
@media (max-width: 900px) {
  .menu-btn, #menu-btn { display: inline-flex !important; }
}


/* 手机底部「更多」面板：全站页面平铺，一屏点得到 */
.more-sheet { position: fixed; inset: 0; z-index: 700; background: rgba(30, 22, 16, 0.42); display: flex; align-items: flex-end; }
.more-sheet[hidden] { display: none !important; }
.more-sheet-inner {
  width: 100%; max-height: 78vh; overflow: auto;
  background: #FFFDFA; border-radius: 22px 22px 0 0;
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -18px 40px rgba(60, 36, 18, 0.22);
}
.more-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.more-sheet-head strong { font-size: 22px; color: #2B2422; }
.more-sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.more-sheet-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 62px; padding: 12px 14px;
  border: 1px solid rgba(184, 90, 34, 0.18); border-radius: 14px;
  background: #FFF9F1; color: #2B2422; font: inherit; font-size: 19px; text-align: left;
  cursor: pointer;
}
.more-sheet-item:active { background: rgba(184,90,34,.12); }
.more-sheet-icon { font-size: 22px; line-height: 1; }
body.has-more-sheet { overflow: hidden; }
@media (min-width: 901px) { .more-sheet { display: none !important; } }


/* ============================================================
   手机端「左图右文」横幅统一改成上下堆叠（客户 09:53：系统页大量空白）
   这类横幅（.page-banner / .illu-strip）在桌面是 图|文 两栏，
   到手机上两栏各占一半 → 文字被压成一条细柱、图缩成小方块，中间大片空白。
   ============================================================ */
@media (max-width: 900px) {
  .page-banner {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px !important;
  }
  .page-banner.flip { flex-direction: column !important; }
  .page-banner-art {
    order: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    display: flex; justify-content: center;
  }
  .page-banner-art img, .page-banner-art svg { width: 100% !important; max-width: 320px !important; height: auto !important; }
  .page-banner-text { order: 1 !important; width: 100% !important; text-align: left !important; }
  .page-banner-title { font-size: 26px !important; }
  .page-banner-desc { font-size: 19px !important; line-height: 1.7 !important; }
  .page-banner-points { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
  .page-banner-point { font-size: 17px !important; }
  .page-banner-actions { display: flex !important; flex-direction: column !important; gap: 10px !important; }
  .page-banner-actions .btn { width: 100% !important; min-height: 60px !important; }

  .illu-strip { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .illu-strip-item { min-width: 0 !important; }

  /* 一般性的两栏卡片也堆叠，避免任何页面再出现细柱文字 */
  #content .card.row-2, #content .split-2 { grid-template-columns: 1fr !important; }
}


/* 手机端卡片间距收紧：22px 是桌面节奏，手机上显得松散、还多占一屏 */
@media (max-width: 900px) {
  #content .col, #content .view-body > .col, #content .dash-page { gap: 14px !important; }
  #content .card { padding: 16px !important; }
  #content .card-head { margin-bottom: 10px !important; }
  #content .card + .card { margin-top: 0 !important; }
}


/* ============================================================
   客户要求：每页首屏就放核心功能。
   手机端把顶部「插画 + 大段说明」的横幅压成一条紧凑横条：
   左边 96px 小图、右边标题与两行说明，功能按钮整宽放下，
   这样第一张真正的功能卡就能露在首屏。
   （上一版直接把插画 display:none，结果横幅塌成一个橙色大块，已废弃）
   ============================================================ */
@media (max-width: 900px) {
  #content .page-banner {
    display: grid !important;
    grid-template-columns: 92px 1fr !important;
    align-items: center !important;
    gap: 10px 12px !important;
    padding: 12px 14px !important;
  }
  #content .page-banner.flip { display: grid !important; }
  #content .page-banner-art {
    display: flex !important;
    width: 92px !important; height: 92px !important;
    min-height: 0 !important; overflow: hidden !important;
    border-radius: 14px !important;
    grid-row: span 2;
  }
  #content .page-banner-art img, #content .page-banner-art svg {
    width: 100% !important; height: 100% !important; object-fit: cover !important;
  }
  #content .page-banner-text { text-align: left !important; }
  #content .page-banner-title { font-size: 22px !important; margin: 0 0 2px !important; }
  #content .page-banner-desc {
    font-size: 16px !important; line-height: 1.55 !important; margin: 0 !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  #content .page-banner-points { display: none !important; }
  #content .page-banner-actions {
    grid-column: 1 / -1 !important;
    display: flex !important; flex-direction: row !important; gap: 8px !important; margin-top: 4px !important;
  }
  #content .page-banner-actions .btn { flex: 1 1 auto !important; min-height: 56px !important; font-size: 18px !important; }
  #content .page-head { padding: 10px 16px !important; }
  #content .page-head .page-title, #content .page-head h1 { font-size: 25px !important; }
  #content .page-head .page-sub { font-size: 17px !important; }
}


/* ============================================================================
   第十九代 · 视觉精修（客户 10:50：还是不够精美，再渲染一下）
   原则：只加层次与质感，不动任何布局结构 —— 上一轮吃过"改 display 把版式打散"的亏。
   ① 统一圆角/阴影/描边三件套  ② 按钮与卡片有手感  ③ 数字对齐  ④ 顶栏与 tab 有玻璃感
   ============================================================================ */
:root {
  --r-card: 20px;
  --r-ctl: 14px;
  --line-soft: rgba(184, 90, 34, 0.10);
  --line-strong: rgba(184, 90, 34, 0.20);
  --shadow-1: 0 1px 2px rgba(74, 46, 28, 0.06), 0 10px 24px -18px rgba(74, 46, 28, 0.35);
  --shadow-2: 0 2px 4px rgba(74, 46, 28, 0.08), 0 18px 40px -22px rgba(74, 46, 28, 0.45);
  --shadow-3: 0 18px 44px -20px rgba(150, 74, 20, 0.42);
}

/* 数字对齐：老人看分数、克数、天数时不要跳 */
.tabular, .stat-value, .kpi-value, .fs-num, .num { font-variant-numeric: tabular-nums; }

/* 卡片：描边 + 双层阴影，hover 轻微抬起（触摸设备不抬） */
#content .card {
  border-radius: var(--r-card);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-1);
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  #content .card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); border-color: var(--line-strong); }
}

/* 卡片标题更"立"：字重 800、字距略收 */
#content .card-head h2, #content .card-head h3, #content .card-title {
  font-weight: 800;
  letter-spacing: -0.2px;
}
#content .card-head .muted, #content .card-sub { color: #6E5A49; }

/* 页面标题条：更柔和的渐变 + 内高光 */
#content .page-head, #content .page-banner {
  border-radius: var(--r-card);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-1);
  background-image: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(250, 240, 227, 0.90));
}
#content .page-head .page-title, #content .page-head h1 { letter-spacing: -0.6px; }

/* 按钮：统一圆角与按压手感 */
#content .btn, #content .page-banner-actions .btn, .more-sheet-item {
  border-radius: var(--r-ctl);
  transition: transform 120ms ease, box-shadow 160ms ease, background-color 160ms ease, filter 160ms ease;
}
#content .btn-primary {
  background-image: linear-gradient(160deg, #D0701F 0%, #B85A22 55%, #A24C18 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, var(--shadow-3);
  border-color: transparent;
}
#content .btn-primary:hover { filter: brightness(1.04); }
#content .btn:active, .more-sheet-item:active { transform: scale(0.985); }
#content .btn:focus-visible, .quicknav-item:focus-visible, .tabbar-item:focus-visible {
  outline: 3px solid rgba(184, 90, 34, 0.55);
  outline-offset: 2px;
}

/* 顶栏：毛玻璃 + 底部细线 */
.topbar {
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 6px 20px -18px rgba(74, 46, 28, 0.6);
}

/* 顶部 5 个入口：胶囊描边 + 当前项渐变发光 */
.quicknav-item {
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 140ms ease;
}
.quicknav-item:hover { background: rgba(255, 255, 255, 0.72); border-color: var(--line-soft); }
.quicknav-item.is-active {
  background-image: linear-gradient(160deg, #DE8340 0%, #C9661F 60%, #A94E15 100%) !important;
  color: #FFF8EF !important;
  border-color: rgba(160, 74, 20, 0.35) !important;
  box-shadow: 0 8px 18px -12px rgba(168, 76, 20, 0.75);
}

/* 底部 tab：玻璃感 + 当前项药丸底 */
.tabbar {
  backdrop-filter: saturate(1.3) blur(12px);
  background: rgba(252, 247, 240, 0.86) !important;
  border-top: 1px solid var(--line-soft);
  box-shadow: 0 -10px 26px -22px rgba(74, 46, 28, 0.7);
}
.tabbar-item { border-radius: 14px; transition: background-color 160ms ease, color 160ms ease; }
.tabbar-item.is-active { background: rgba(201, 102, 31, 0.12); }

/* 表格与输入：更清楚的分隔与圆角 */
#content .table th { background: rgba(184, 90, 34, 0.07); font-weight: 800; }
#content .table td, #content .table th { border-color: rgba(184, 90, 34, 0.12); }
#content .input, #content .select, #content textarea {
  border-radius: var(--r-ctl);
  border-color: rgba(184, 90, 34, 0.22);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
#content .input:focus, #content .select:focus, #content textarea:focus {
  border-color: rgba(184, 90, 34, 0.55);
  box-shadow: 0 0 0 4px rgba(184, 90, 34, 0.12);
}

/* 提示条与小标签：去掉生硬的纯色边 */
#content .alert { border-radius: var(--r-ctl); }
#content .badge, #content .chip { border-radius: 999px; }

/* 选中文字用暖色，别用系统蓝 */
::selection { background: rgba(201, 102, 31, 0.24); }

/* 滚动条：细、暖色 */
* { scrollbar-color: rgba(184, 90, 34, 0.45) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(184, 90, 34, 0.35); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* 手机端：tab 与主按钮再撑一点，观感更像 App */
@media (max-width: 900px) {
  .tabbar-item { gap: 2px; }
  #content .card { border-radius: 18px; }
  #content .today-three-row { border-radius: 16px; }
}


/* 手机主视觉：状态卡与问候之间那段空白收掉，问候字号抬一档 */
@media (max-width: 900px) {
  #content .dash-hero { padding: 10px 10px 12px !important; }
  #content .dash-hero-body { gap: 4px !important; }
  #content .dash-hero-chips { margin: 0 0 6px !important; }
  #content .dash-hero-title, #content .dash-hero-copy { font-size: 32px !important; line-height: 1.2 !important; }
  #content .dash-hero-date { font-size: 17px !important; }

  /* 晨起关怀卡：标题行与正文统一左对齐，别一半居中一半左对齐 */
  #content .morning-entry, #content .card.morning-entry { text-align: left !important; }
  #content .morning-entry .morning-entry-head,
  #content .morning-entry .morning-title { text-align: left !important; justify-content: flex-start !important; }
  #content .morning-entry .morning-entry-desc { font-size: 17px !important; line-height: 1.6 !important; }
  #content .morning-entry .btn { width: 100% !important; }
}


/* 晨起关怀卡整体左对齐（原来标题居中、正文居中、按钮居中，看着散） */
.card.morning-entry, .morning-entry { text-align: left !important; }
.card.morning-entry *, .morning-entry * { text-align: inherit !important; }
.card.morning-entry .btn, .morning-entry .btn { text-align: center !important; }


/* 晨起关怀卡（真实类名 .morning-entry / .morning-entry-text）：整体左对齐，
   之前标题行与正文各自居中，看着散。 */
.morning-entry { text-align: left !important; align-items: flex-start !important; }
.morning-entry .morning-entry-text { text-align: left !important; align-items: flex-start !important; }
.morning-entry .morning-entry-eyebrow,
.morning-entry .morning-entry-title,
.morning-entry .morning-entry-desc,
.morning-entry .morning-entry-meta { text-align: left !important; }
.morning-entry .btn { align-self: flex-start !important; text-align: center !important; }
@media (max-width: 900px) {
  .morning-entry .btn { align-self: stretch !important; width: 100% !important; }
}


/* 折叠开关统一用一个高优先级类：hidden 属性常被作者样式的 display 覆盖，
   点“收起”看着没反应（客户 11:21 反馈）。 */
.collapsible-hidden, [hidden].collapsible-hidden { display: none !important; }
#content .btn-expand-toggle { min-height: 56px; }


/* ============================================================
   客户 11:21 四条反馈（手机版）
   ① 底部「我的」点不开：小管家浮球（fixed 右下 48px）正压在最后一格 tab 上，
      点击命中浮球而不是 tab → 手机上把浮球收起来（tab 里已有「陪伴」）。
   ② 首页「照护思路 / 跌倒风险」两张卡挤在问候上方，观感奇怪 →
      手机端把这两张卡移到问候下面（用 flex order）。
   ③ 阶段报告表格表头对不齐 → 手机上表格改成「每行一张小卡」的堆叠样式。
   ============================================================ */
@media (max-width: 900px) {
  .steward-fab, #steward-fab, .quick-home, #quick-home { display: none !important; }

  /* 主视觉内部：问候在前、状态卡在后 */
  #content .dash-hero-body { display: flex !important; flex-direction: column !important; }
  #content .dash-hero-chips { order: 2 !important; margin-top: 10px !important; }
  #content .dash-hero-title, #content .dash-hero-copy,
  #content .dash-hero-greet, #content .dash-hero-hello { order: 1 !important; }
  #content .dash-hero-date { order: 1 !important; }

  /* 表格：整表横向滚动，表头与表体在同一个滚动容器里 → 永远对齐。
     （不要改成 display:block 堆叠：表格单元格没有 data-label，堆叠后数字没有标签更糟） */
  #content .card:has(> .table), #content .card:has(.table) { overflow-x: auto !important; }
  #content .table { display: table !important; width: 100% !important; min-width: 560px !important; }
  #content .table thead { display: table-header-group !important; }
  #content .table tbody { display: table-row-group !important; }
  #content .table tr { display: table-row !important; }
  #content .table th, #content .table td { display: table-cell !important; }
  #content .table th { position: sticky; top: 0; z-index: 2; background: #FBF3E6 !important; }
}


/* ============================================================
   猫头鹰头像"不见了"的真因（探针实测）：.mascot-avatar 是 44×44 且 overflow:hidden，
   但里面的 img 被算到 x=-15（跑到了容器左边外面），所以只剩一条看不见的边。
   下面把 img 钉回容器内。
   ============================================================ */
.mascot-avatar { overflow: hidden; position: relative; }
.mascot-avatar img {
  position: absolute !important;
  inset: 0 !important;
  left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important;
  width: 100% !important; height: 100% !important;
  margin: 0 !important;
  transform: none !important;
  object-fit: cover !important;
  border-radius: inherit;
}

/* 首页主视觉：状态卡（照护思路 / 跌倒风险）在手机端排到问候后面 */
@media (max-width: 900px) {
  #content .dash-hero { display: flex !important; flex-direction: column !important; }
  #content .dash-hero-meta,
  #content .dash-hero-chips,
  #content .dash-hero-status { order: 3 !important; margin-top: 10px !important; }
  #content .dash-hero-body, #content .dash-hero-art, #content .dash-hero-veil { order: 1 !important; }
}


/* ============================================================
   「底部导航点不开」的真正原因（很可能是这个）：
   tabbar 贴着视口最底（bottom:0），真机上那一条正好被 Safari/微信内置浏览器的
   底部工具栏盖住 —— 手指落点被浏览器吃掉，页面收不到点击。无头浏览器里没有这层工具栏，
   所以探针点得动、你手机上点不动。
   修法：整体往上抬，并给 iPhone 底部安全区留位。
   ============================================================ */
@media (max-width: 900px) {
  .tabbar {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 18px !important;
    left: 8px !important; right: 8px !important;
    width: auto !important;
    margin: 0 4px !important;
  }
  .tabbar-item { min-height: 64px !important; }
  #content { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important; }
}


/* ============================================================================
   第二十代 · 极致简约（客户 13:45：把按钮旁边的注释全去掉，说明集中到「使用指南」）
   ① 小字说明、副标题统一收起  ② 首页三件事/晨起关怀只留标题与按钮
   ③ 使用指南页的清单样式
   ============================================================================ */
#content .page-sub,
#content .card-sub,
#content .fs-12,
#content .fs-13,
#content .card-note,
#content .hint-text,
#content .muted,
#content .explain,
#content .why-line { display: none !important; }

#content .today-three-desc,
#content .today-three-row .today-three-sub,
#content .morning-entry-desc,
#content .morning-entry-meta { display: none !important; }

/* 首页更紧凑：三件事每行只留图标+标题+按钮 */
#content .today-three-row { padding: 10px 12px !important; }
#content .today-three-title { font-size: 20px !important; }

/* 使用指南页 */
.guide-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid rgba(184, 90, 34, 0.10);
}
.guide-name { font-size: 19px; font-weight: 800; color: #2B2422; margin-bottom: 2px; }
.guide-how { font-size: 17px; line-height: 1.65; color: #5B4A3C; }


/* 主视觉里的状态卡标签要保留（去掉就只剩「防跌倒优先 / 68 分」，看不出是什么） */
#content .dash-hero-chips .fs-12,
#content .dash-hero-chips .fs-13,
#content .dash-hero-chips .muted { display: inline !important; }


/* ============================================================================
   第二十一代 · 按《老年人视角可用性检查报告》(2026-11-05) 改
   P0-1 今日任务大卡 / P0-3 导航可点面积 / P1 辅助文字加深与极简保留指引 /
   P1 特大字不溢出 / 更多面板分组
   ============================================================================ */

/* —— P0-1 今日任务大卡：首页第一屏的主角 —— */
#content .card.today-task {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(255, 243, 226, 0.95) 0%, rgba(255, 231, 205, 0.9) 45%, rgba(250, 214, 178, 0.92) 100%),
    #FFF6E9;
  border: 1px solid rgba(184, 90, 34, 0.22);
  box-shadow: 0 18px 36px -20px rgba(122, 62, 20, 0.42);
  padding: 22px 24px 20px !important;
}
#content .card.today-task.is-done { border-color: rgba(47, 107, 85, 0.28); }
#content .today-task-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 8px;
}
#content .today-task-badge {
  font-size: 17px; font-weight: 800; color: #B4531C;
  background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(184, 90, 34, 0.18);
  padding: 4px 12px; border-radius: 999px;
}
#content .card.today-task.is-done .today-task-badge { color: #2F6B55; }
#content .today-task-date { font-size: 16px; color: #6B5644; }
#content .today-task-title {
  font-size: clamp(24px, 2.2vw, 30px); font-weight: 800; color: #2B2422;
  margin: 2px 0 6px; line-height: 1.3;
}
#content .today-task-how { font-size: 19px; line-height: 1.7; color: #4B3A2C; margin: 0 0 14px; }
#content .today-task-actions { display: flex; gap: 12px; flex-wrap: wrap; }
#content .today-task-actions .btn { min-height: 62px; font-size: 20px; }
@media (max-width: 900px) {
  #content .card.today-task { padding: 16px 16px 14px !important; }
  #content .today-task-actions { flex-direction: column; }
  #content .today-task-actions .btn { width: 100%; }
}

/* —— P0-3 导航：箭头不再是小图标，整格都能点 —— */
.quicknav-pair { position: relative; display: flex; align-items: stretch; }
.quicknav-item { min-height: 54px; }
.quicknav-more {
  min-width: 64px !important; min-height: 54px !important;
  padding: 0 10px !important; font-size: 15px !important; font-weight: 700;
  border-radius: 0 999px 999px 0 !important;
  display: inline-flex; align-items: center; justify-content: center;
}
.quicknav-sub--home { font-weight: 800; background: rgba(184, 90, 34, 0.08) !important; }

/* —— 更多面板：分组标题与小字说明 —— */
.more-sheet-group { margin: 2px 0 10px; }
.more-sheet-group-head { display: flex; align-items: baseline; gap: 10px; padding: 6px 4px; }
.more-sheet-group-name { font-size: 18px; font-weight: 800; color: #2B2422; }
.more-sheet-group-hint { font-size: 15px; color: #6B5644; }
.more-sheet-group .more-sheet-grid { margin: 0; }

/* —— P1 辅助文字：加深 + 不低于 16px（报告表 2 第 1 行） —— */
#content .muted,
#content .fs-12,
#content .fs-13,
#content .card-sub,
#content .page-sub { color: #4B5563 !important; }
#content .fs-12 { font-size: 16px !important; }
#content .fs-13 { font-size: 16px !important; }

/* 极简模式只减装饰，不减指引：把这几类"告诉老人怎么做"的文字放回来 */
#content .explain,
#content .why-line,
#content .card-note,
#content .hint-text { display: revert !important; }

/* —— P1 特大字：卡片与按钮允许换行、不截断 —— */
body[data-fs="xl"] #content .card,
body[data-fs="xl"] #content .today-task-title,
body[data-fs="xl"] #content .today-task-how { height: auto !important; min-height: 0 !important; }
body[data-fs="xl"] #content .btn {
  white-space: normal !important;
  word-break: break-word;
  line-height: 1.35 !important;
  height: auto !important;
  min-height: 64px !important;
  padding-top: 10px; padding-bottom: 10px;
}
body[data-fs="xl"] #content .today-task-actions { flex-direction: column; }


/* 健康档案「填到哪儿了」进度条（可用性报告 P0-4） */
.form-progress {
  position: sticky; top: 8px; z-index: 30;
  background: rgba(255, 251, 244, 0.97);
  border: 1px solid rgba(184, 90, 34, 0.16);
  border-radius: 16px; padding: 10px 14px;
  box-shadow: 0 10px 22px -16px rgba(122, 62, 20, 0.5);
}
.form-progress-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.form-progress-text { font-size: 18px; font-weight: 800; color: #B4531C; }
.form-progress-note { font-size: 15px; color: #4B5563; }
.form-progress-track {
  margin-top: 8px; height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(184, 90, 34, 0.14);
}
.form-progress-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #F0A24E, #C9661F); transition: width 220ms ease; }
.form-progress.is-done { border-color: rgba(47, 107, 85, 0.3); }
.form-progress.is-done .form-progress-text { color: #2F6B55; }


/* ============================================================================
   第二十二代 · 按《手机端专项检查》P0 改（2026-11-05）
   ① 收回"全局隐藏说明文字"这条规则（它把 .fs-13=19px 正文级字号也藏了，
      实测覆盖 260 余处；老人看不到「分越高越容易摔倒」这类关键解释）。
   ② badge-muted 对比度 2:1 → 4.5:1 以上。
   ③ 手机端去掉「今日概览」标题胶囊（底部 tab 已指示位置），首屏省 60px。
   ④ 手机端补 dvh 与矮屏紧凑规则。
   ============================================================================ */

/* ① 只留纯装饰性副标题隐藏；正文级说明全部恢复 */
#content .fs-12,
#content .fs-13,
#content .muted,
#content .explain,
#content .why-line,
#content .card-note,
#content .hint-text { display: revert !important; }
#content .page-sub,
#content .card-sub { display: none !important; }

/* ② 徽标对比度：原 2:1 达不到正文 4.5:1 */
#content .badge-muted,
#content .badge.badge-muted {
  color: #4B5563 !important;
  background: #EFE7DB !important;
  border-color: rgba(75, 85, 99, 0.22) !important;
}

/* ③ 手机端不重复展示页面标题（底部 tab 已说明位置） */
@media (max-width: 900px) {
  #content .page-head { display: none !important; }

  /* ④ 矮屏（SE 375×667）与 iOS 地址栏伸缩 */
  .layout { min-height: 100vh; min-height: 100dvh; }
  #content .card.today-task { margin-top: 6px; }
}
@media (max-width: 900px) and (max-height: 700px) {
  #content .card.today-task { padding: 12px 14px !important; }
  #content .today-task-title { font-size: 22px !important; }
  #content .today-task-how { font-size: 17px !important; margin-bottom: 10px !important; }
  #content .today-task-actions .btn { min-height: 54px !important; font-size: 18px !important; }
  #content .dash-hero { display: none !important; }
}
/* 横屏：不要整屏大图 */
@media (max-width: 900px) and (orientation: landscape) {
  #content .dash-hero { min-height: 0 !important; }
}

/* 通话过程中外壳退场：顶栏、底部 tab、悬浮球、回家图标都别压在人脸上
   （WorkBuddy 反馈：底部导航挡住「念给我听」，管家球浮在视频上） */
body.is-calling .topbar,
body.is-calling .tabbar,
body.is-calling .steward-fab,
body.is-calling #quick-home,
body.is-calling .quicknav { display: none !important; }
body.is-calling { overflow: hidden !important; }
/* ============================================================================
   通话界面 P2/P3（WorkBuddy 原型）：主角是管家、自己缩小窗、字幕上屏、
   状态收成一行、挂断改底部大红钮、手机 ≤620px 字号不低于 14px。
   ============================================================================ */
.call-overlay { display: flex; flex-direction: column; background: #17110C; }

/* 主人位：管家画面铺满 */
.call-stage { position: relative; flex: 1 1 auto; min-height: 0; background: #2A1B10; overflow: hidden; }
.call-stage .call-steward {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center 42%;
  filter: saturate(1.02) brightness(1.02);
}
.call-stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 18%, rgba(255, 214, 160, .22), transparent 62%),
              linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.05) 32%, rgba(0,0,0,.42));
}
/* 自己：右上角小窗 */
.call-stage .call-video {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 108px; height: 144px; border-radius: 16px;
  object-fit: cover; background: #000;
  box-shadow: 0 8px 20px rgba(0,0,0,.45); transform: scaleX(-1);
}
.call-selftag {
  position: absolute; top: 150px; right: 14px; z-index: 4;
  font-size: 14px; color: #FFF3E2; background: rgba(0,0,0,.42);
  padding: 2px 10px; border-radius: 999px;
}
.call-canvas { display: none; }
/* 字幕：压在画面底部，≥20px、最多两行 */
.call-subtitle {
  position: absolute; left: 16px; right: 16px; bottom: 18px; z-index: 4;
  color: #FFF7EC; font-size: 21px; line-height: 1.5; font-weight: 700;
  text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,.7);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  opacity: 0; transition: opacity .2s ease;
}
.call-subtitle.is-on { opacity: 1; }

/* 状态收成一行（不再是三行工程读数） */
.call-head { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: linear-gradient(180deg, rgba(0,0,0,.45), transparent); }
.call-title { color: #FFF3E2; font-size: 17px; font-weight: 700; }
.call-hang { margin-left: auto; }

/* 挂断：底部红色大圆钮 */
.call-hang {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); z-index: 20;
  width: 74px; height: 74px; border-radius: 50% !important;
  background: #C0392B !important; color: #fff !important; border: 0 !important;
  font-size: 0 !important; box-shadow: 0 10px 26px rgba(192, 57, 43, .45);
}
.call-hang::after { content: '📴'; font-size: 30px; line-height: 1; }

/* 对话区收成薄薄一条（老人主要听，不需要一大块聊天记录） */
.call-lines { max-height: 26vh; overflow-y: auto; background: #1F1710; padding: 10px 14px 96px; }
.call-lines .call-hint { display: none; }
@media (max-width: 620px) {
  .call-line, .call-mode, .call-mic, .call-face, .call-saved-tip { font-size: 15px !important; }
  .call-subtitle { font-size: 20px; bottom: 14px; }
}

/* 通话状态收成一行：摄像头 / 麦克风 / 识别状态并排，不堆三行 */
.call-statusbar {
  position: absolute; top: 56px; left: 50%; transform: translateX(-50%);
  z-index: 6; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: min(92vw, 560px);
}
.call-statusbar .is-chip {
  font-size: 15px !important; line-height: 1.3;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(20, 14, 9, .55); color: #FFF3E2;
  border: 1px solid rgba(255, 235, 210, .18);
}
.call-statusbar .call-mode { background: rgba(20, 14, 9, .38); }
/* 没有摄像头时不显示“这是您”的标签与小窗 */
body.no-camera-call .call-selftag,
body.no-camera-call .call-video { display: none !important; }
/* 底部输入区给挂断圆钮让位 */
.call-input { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }

/* 通话铺满屏幕：避免画面缩在中间一窄条 */
.call-overlay { width: 100vw !important; height: 100dvh !important; max-width: none !important; inset: 0 !important; }
.call-stage { width: 100% !important; }
.call-stage .call-steward { object-fit: cover; object-position: center 38%; }
.call-lines { max-height: 16vh !important; padding-bottom: 8px !important; }
.call-foot { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important; }

/* 管家插画别拉太满（矢量图放大后线条过粗）：留一圈呼吸空间 */
.call-stage .call-steward { object-fit: contain !important; object-position: center 42% !important; padding: 18px 8px 64px !important; }
.call-stage { background: radial-gradient(120% 90% at 50% 30%, #3A2617 0%, #1E150E 70%, #120C08 100%) !important; }

/* 短屏/横屏兜底：答辩现场可能遇到 756×441 这类小窗、或笔记本 1366×768 的横屏
   —— 通话界面必须仍然「看得见人、看得清字幕、按得到挂断」 */
@media (max-height: 620px) {
  .call-lines { display: none !important; }
  .call-statusbar { top: 46px; gap: 6px; }
  .call-statusbar .is-chip { font-size: 14px !important; padding: 4px 10px; }
  .call-subtitle { font-size: 19px !important; bottom: 10px; }
  .call-hang { width: 62px; height: 62px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .call-foot { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important; }
  .call-stage .call-video { width: 84px; height: 112px; }
  .call-selftag { top: 118px; font-size: 12px; }
  .call-stage .call-steward { padding: 8px 8px 56px !important; }
}
@media (max-height: 430px) {
  .call-statusbar .call-mode { display: none; }
  .call-subtitle { font-size: 17px !important; -webkit-line-clamp: 1; }
  .call-hang { width: 54px; height: 54px; }
  .call-hang::after { font-size: 24px; }
}

/* 舞台至少占大半屏：短屏下也不能塌成一条缝（实测 756×441 时 stage 只剩 58px 高） */
.call-stage { flex: 1 1 auto !important; min-height: 46vh; }
@media (max-height: 620px) { .call-stage { min-height: 52vh; } }
/* 通话里「念给我听」与字幕重复，收起来，避免和挂断圆钮叠在一起 */
.call-overlay .call-foot { display: none !important; }

/* ============================================================================
   社区端样式（规格 §6.9）：工作台 / 名册 / 开户 / 长者详情 / 日志 / 批量报告
   ---------------------------------------------------------------------------
   这些页面只给社工看，字号按桌面 16px 起、按钮 ≥44px；
   手机上表格转卡片、底部操作条让开 tabbar、打印专用分页。
   ============================================================================ */
.org-page { max-width: 1180px; }

/* —— 头卡 —— */
.org-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.org-head-main { flex: 1 1 320px; }
.org-head-name { font-size: 26px; font-weight: 800; }
.org-head-meta { color: var(--text-3); font-size: 15px; margin-top: 2px; }
.org-head-today { font-size: 17px; font-weight: 700; color: var(--primary-d, #A94E15); }
.org-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* —— KPI —— */
.org-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* —— 风险分布条 —— */
.org-riskbar { display: flex; height: 22px; border-radius: 999px; overflow: hidden; background: #EFE7DB; margin: 10px 0 8px; }
.org-riskbar-seg { border: 0; padding: 0; cursor: pointer; transition: filter .15s; }
.org-riskbar-seg:hover { filter: brightness(1.08); }
.org-risklegend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.org-risklegend-item { display: flex; align-items: center; gap: 6px; }
.org-risklegend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* —— 待办 / 最近操作 —— */
.org-todos { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.org-todo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #FBF7F1; }
.org-todo-label { font-size: 16px; }
.org-recent { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.org-recent-row { display: grid; grid-template-columns: 120px 1fr 110px; gap: 10px; font-size: 15px; padding: 6px 0; border-bottom: 1px dashed #EFE7DB; }
.org-recent-who { font-weight: 700; }
.org-recent-when { color: var(--text-3); text-align: right; }

/* —— 通用零碎 —— */
.org-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.org-muted { color: var(--text-3); font-size: 15px; }
.org-ok { color: #2F8F5B; font-weight: 700; }
.org-pending { color: #C0392B; font-weight: 700; }
.org-nowrap { white-space: nowrap; }
.org-sub-title { font-weight: 800; margin: 14px 0 6px; }
.org-count { color: var(--text-3); font-size: 15px; }
.org-detail { max-width: 420px; }

/* —— 工具条 / 筛选 —— */
.org-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.org-search { flex: 1 1 220px; min-width: 180px; }
.org-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.org-chip {
  border: 1px solid rgba(184,90,34,.18); background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 8px 14px; font-size: 15px; cursor: pointer; min-height: 40px;
}
.org-chip.on { background: var(--primary, #B85A22); border-color: var(--primary, #B85A22); color: #fff; font-weight: 700; }
.org-field { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.org-field .input { min-height: 40px; padding: 6px 10px; }

/* —— 表格 —— */
.org-table-wrap { overflow-x: auto; }
.org-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.org-table th { text-align: left; padding: 10px 8px; background: #FBF7F1; white-space: nowrap; }
.org-table td { padding: 10px 8px; border-top: 1px solid #F1E9DE; vertical-align: middle; }
.org-name { font-weight: 700; }
.org-row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.org-preview-table tr.bad td { background: #FDECEA; }
.org-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }

/* —— 名册批量操作条：让开底部 tab —— */
.org-bulkbar {
  position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 14px; background: #FFF6E9;
  border: 1px solid rgba(184,90,34,.25); box-shadow: 0 8px 24px rgba(90,60,30,.12);
}
.org-bulkbar-count { font-weight: 800; }

/* —— 开户：三步条 / 录入行 / 账号卡 —— */
.org-steps { display: flex; gap: 10px; }
.org-step { padding: 8px 14px; border-radius: 999px; background: #F3EDE4; color: var(--text-3); font-weight: 700; font-size: 15px; }
.org-step.on { background: var(--primary, #B85A22); color: #fff; }
.org-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.org-tabs-scroll { overflow-x: auto; flex-wrap: nowrap; }
.org-tab { border: 1px solid rgba(184,90,34,.18); background: #fff; border-radius: 10px; padding: 8px 14px; font-size: 15px; cursor: pointer; min-height: 42px; }
.org-tab.on { background: var(--primary, #B85A22); color: #fff; border-color: transparent; font-weight: 700; }
.org-rows { display: flex; flex-direction: column; gap: 8px; }
.org-row { display: grid; grid-template-columns: repeat(6, minmax(90px, 1fr)) 64px; gap: 8px; align-items: center; }
.org-row-head { font-weight: 700; color: var(--text-3); font-size: 14px; }
.org-cell { min-width: 0; }
.org-paste { width: 100%; font-family: ui-monospace, Consolas, monospace; }
.org-form-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }

.org-account-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 10px; }
.org-account-card { border: 1px dashed #C9B39A; border-radius: 12px; padding: 12px 14px; background: #FFFDF8; }
.org-acc-org { font-size: 13px; color: var(--text-3); }
.org-acc-name { font-size: 20px; font-weight: 800; margin: 2px 0; }
.org-acc-room { font-size: 14px; color: var(--text-2); }
.org-acc-row { display: flex; gap: 8px; font-size: 15px; margin-top: 4px; }
.org-acc-row b { width: 62px; color: var(--text-3); font-weight: 700; }
.org-acc-tip { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.org-skip-list { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.org-skip-row { font-size: 14px; color: #A03A2B; }

/* —— 长者详情 —— */
.org-elder-head .org-elder-name { font-size: 28px; font-weight: 800; }
.org-elder-meta { color: var(--text-3); font-size: 15px; margin-top: 2px; }
.org-elder-badges { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.org-threeway { margin-top: 8px; }
.org-tw-head, .org-tw-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 10px; padding: 8px 0; font-size: 15px; }
.org-tw-head { font-weight: 800; color: var(--text-3); border-bottom: 1px solid #F1E9DE; }
.org-tw-row { border-bottom: 1px dashed #F5EDE2; }
.org-tw-k { font-weight: 700; }
.org-kv { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.org-kv-row { display: flex; gap: 12px; font-size: 16px; }
.org-kv-k { width: 96px; color: var(--text-3); }
.org-revisions { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.org-rev-row { display: grid; grid-template-columns: 110px 120px 1fr; gap: 10px; font-size: 14px; color: var(--text-2); }
.org-rev-when { color: var(--text-3); }
.org-plans, .org-docs { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.org-plan-row, .org-doc-row { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; padding: 6px 0; border-bottom: 1px dashed #F5EDE2; }
.org-cred-row { display: flex; gap: 10px; font-size: 17px; }
.org-cred-pass { font-family: ui-monospace, Consolas, monospace; font-weight: 800; letter-spacing: 1px; }
.org-me-note { color: var(--text-2); font-size: 15px; }
.org-me-links { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.org-me-link { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #FBF7F1; border: 0; font-size: 17px; cursor: pointer; text-align: left; }
.org-me-link .org-me-go { margin-left: auto; color: var(--text-3); }
.org-me-icon { font-size: 20px; }

/* —— 批量报告（打印件）—— */
.org-reports-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.org-report-sheet { background: #fff; border: 1px solid #E8DDD0; border-radius: 14px; padding: 22px 26px; }
.org-report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 2px solid #2B2422; padding-bottom: 8px; }
.org-report-org { font-size: 14px; color: var(--text-3); }
.org-report-title { font-size: 22px; font-weight: 800; }
.org-report-date { font-size: 14px; color: var(--text-3); }
.org-report-section-title { font-weight: 800; margin: 14px 0 6px; }
.org-report-line { display: flex; gap: 10px; font-size: 15px; padding: 4px 0; }
.org-report-foot { margin-top: 16px; padding-top: 10px; border-top: 1px dashed #D9C9B6; font-size: 13px; color: var(--text-3); line-height: 1.7; }
/* 报告正文：结论条 + 摘要 + 风险因素（打印件上不能出现空标签） */
.org-report-concl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 4px; }
.org-report-concl-item { background: #FBF7F1; border: 1px solid #EFE7DB; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.org-report-concl-k { font-size: 12px; color: var(--text-3); }
.org-report-concl-item b { font-size: 17px; }
.org-report-concl-s { font-size: 13px; color: var(--text-2); }
.org-report-concl-v { font-size: 14px; line-height: 1.5; }
.org-report-block { margin-top: 12px; }
.org-report-p { font-size: 14px; line-height: 1.75; margin: 4px 0 0; color: var(--text-2); }
.org-report-factor { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px dashed #F1E9DE; font-size: 14px; }
.org-report-factor:last-child { border-bottom: 0; }
.org-report-evidence { color: var(--text-2); }
.org-report-action { color: var(--accent, #B85A22); }
@media (max-width: 900px) {
  .org-report-concl { grid-template-columns: 1fr; }
}
@media print {
  .org-report-sheet { font-size: 13px; }
  .org-report-concl { break-inside: avoid; }
  .org-report-block { break-inside: avoid; }
}

/* —— 手机端（§6.9）—— */
@media (max-width: 900px) {
  .org-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .org-head-name { font-size: 22px; }
  .org-recent-row { grid-template-columns: 96px 1fr; }
  .org-recent-when { display: none; }
  .org-account-cards { grid-template-columns: 1fr; }
  .org-row { grid-template-columns: 1fr 1fr; }
  .org-row-head { display: none; }
  .org-rev-row { grid-template-columns: 100px 1fr; }
  .org-tw-head, .org-tw-row { grid-template-columns: 1fr 1fr 1fr 1fr; font-size: 14px; }
  /* 名册/日志表格转卡片：每个 td 带 data-label，堆叠后仍然知道这行数字是什么。
     选择器带 #content 是为了压过 1997 行 `.table thead/tbody` 的 display:table
     （那条规则给的是 0,2,0，光写 .org-table 是 0,1,1，压不住 —— 实测表头会留一条）。 */
  #content .org-table { display: block; width: 100%; min-width: 0; }
  #content .org-table thead { display: none; }
  #content .org-table tbody { display: block; width: 100%; min-width: 0; }
  #content .org-table tr { display: block; width: 100%; border: 1px solid #EFE7DB; border-radius: 12px; margin-bottom: 10px; padding: 8px 12px; background: #fff; }
  #content .org-table td { display: flex; width: 100%; border: 0; padding: 5px 0; align-items: flex-start; gap: 10px; line-height: 1.6; }
  #content .org-table td::before {
    content: attr(data-label);
    flex: 0 0 64px;
    color: var(--text-3, #8A7A6A);
    font-size: 13px;
    line-height: 1.8;
  }
  #content .org-table td:not([data-label])::before { content: none; }
  #content .org-table td.org-name { font-size: 18px; font-weight: 700; }
  #content .org-table td.org-row-actions { display: flex; gap: 6px; padding-top: 8px; flex-wrap: wrap; }
  #content .org-table td.org-row-actions::before { content: none; }
  .org-bulkbar { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .org-page .btn { min-height: 50px; }
}

/* —— 打印 ——
   两个硬要求（验收 #11）：报告「一页一位」、账号卡「一页 8 张」。
   实测踩过的坑：
     ① #app / .layout 的 min-height:100vh 在打印时等于整张纸高，
        再加 body 默认 8px 外边距 → 内容只有半页也会顶出第 2 张空白纸；
     ② 报告按屏幕字号（14~15px）排，A4 可印高度约 1047px，实际 1224px → 每份溢出两页。
   所以这里同时做「归零页面高度」和「压紧报告字号」两件事，别只改其中一件。 */
@page { size: A4; margin: 10mm 12mm; }

@media print {
  html, body { margin: 0 !important; padding: 0 !important; background: #fff; }
  /* 提示条是屏幕上的状态说明，打印件上不要（§6.11 刚修好分页，别打回去） */
  #degraded-banner { display: none !important; }
  #app, .layout { min-height: 0 !important; height: auto !important; }
  #content { padding: 0 !important; }

  .topbar, .tabbar, .org-reports-toolbar, .org-actions, .org-form-foot, .org-bulkbar { display: none !important; }
  .org-account-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .org-account-card { break-inside: avoid; page-break-inside: avoid; }
  .org-report-sheet { border: 0; border-radius: 0; padding: 0; page-break-after: always; font-size: 12px; line-height: 1.45; }
  .org-report-sheet:last-child { page-break-after: auto; }
  .org-reports, .org-page { max-width: none; }

  /* 报告压紧（目标：整份 < 1000px） */
  .org-report-head { padding-bottom: 5px; }
  .org-report-org, .org-report-date { font-size: 11.5px; }
  .org-report-title { font-size: 17px; }
  .org-report-section-title { font-size: 12.5px; margin: 7px 0 3px; }
  .org-report-line { font-size: 12px; padding: 2px 0; }
  .org-report-p { font-size: 12px; line-height: 1.5; margin: 2px 0 0; }
  .org-report-factor { font-size: 12px; padding: 3px 0; gap: 1px; }
  .org-report-block { margin-top: 7px; }
  .org-report-concl { gap: 6px; margin: 7px 0 2px; }
  .org-report-concl-item { padding: 5px 8px; }
  .org-report-concl-k { font-size: 11px; }
  .org-report-concl-item b { font-size: 15px; }
  .org-report-concl-s, .org-report-concl-v { font-size: 11.5px; line-height: 1.4; }
  .org-report-foot { font-size: 10.5px; line-height: 1.45; margin-top: 7px; padding-top: 5px; }
  .org-kv-row { font-size: 12px; padding: 2px 0; }
}


/* 工作台 KPI 卡（自绘，四列） */
.org-kpi { background: #fff; border: 1px solid rgba(184,90,34,.12); border-left: 4px solid var(--kpi-accent, #B85A22); border-radius: 12px; padding: 12px 14px; }
.org-kpi-label { font-size: 14px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.org-kpi-value { font-size: 30px; font-weight: 800; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.org-kpi-unit { font-size: 14px; font-weight: 600; color: var(--text-3); margin-left: 4px; }
@media (max-width: 900px) { .org-kpi-value { font-size: 26px; } }


/* 名册/日志的表格外面没套 .card，直接压在晚霞背景上几乎看不清（实测截图）
   —— 这里给它一块实心底，桌面与手机都稳。 */
.org-table-wrap {
  background: #fff;
  border: 1px solid rgba(184, 90, 34, 0.12);
  border-radius: 14px;
  padding: 6px 10px;
  box-shadow: 0 10px 24px rgba(90, 60, 30, 0.08);
}
@media (max-width: 900px) {
  .org-table-wrap { padding: 8px; }
  .org-table tr { background: #fff; }
}


/* ============================================================
   降级提示条（规格 §2）
   断网或大模型不可用时，每页顶部常驻一条说明。
   走正常文档流：顶栏是 sticky、窄屏会折两行，fixed 会盖住内容。
   颜色只用现有 token；--yellow 不能当文字色（白底 2.44:1）。
   ============================================================ */
#degraded-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 26px;
  background: var(--yellow-l);
  border-bottom: 1px solid var(--yellow-b);
  color: var(--text);
  /* 字号走 --fs-xs（16px）：这是全站最小字号，也是"系统状态"类文字的下限。
     初版这里写了 14px / 手机 13px，比 --fs-xs 还小 —— 与上面字号段的约定直接冲突
     （那条注释点名的正是"系统模式徽章"，本提示条属于同一类信息）。
     长者看 14px 相当于年轻人看 10px，写小了等于没提示。 */
  font-size: var(--fs-xs);
  line-height: 1.5;
}
#degraded-banner .db-icon { font-size: 18px; line-height: 1; }
#degraded-banner .db-text strong { color: var(--yellow-text); font-weight: 700; }
@media (max-width: 640px) {
  /* 手机不降字号，只收内边距；宁可多占一行，也不把字缩到读不清 */
  #degraded-banner { padding: 8px 14px; font-size: var(--fs-xs); gap: 8px; }
}


#content .page-banner-point { color: #4A3626 !important; font-size: 17px !important; }
#content .page-banner-points .page-banner-point:nth-child(n) { background: rgba(255, 252, 246, 0.92); }


/* 视觉审计：照护目标页 span.fs-12 实测 1.63:1（底是浅米白，字是偏浅的灰）
   —— 只把 #content 里的小字色阶加深一档，不动字号与布局。 */
#content .fs-12, #content .card .fs-12, #content div.fs-12 { color: #12100D !important; }


/* 健康档案页截图平均亮度 195.2（底线 200）：这一页的晚霞主视觉露得多、
   卡片之间缝隙大，整页被拉暗。只给这一页垫一层极浅的暖白，不动其它页。 */
body[data-route="profile"] #content::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.80), rgba(255, 250, 242, 0.62));
}
body[data-route="profile"] #content { position: relative; z-index: 1; }


/* 照护目标页那行 fs-12 压在橙色渐变卡上，字再黑也只有 4.09:1（背景太亮又太橙）。
   给它自己垫一层近白底，对比度直接到 15:1 以上，也不破坏卡片观感。 */
#content .card .fs-12,
body[data-route="goal"] #content .fs-12 {
  background: rgba(255, 252, 246, 0.94);
  border-radius: 8px;
  padding: 2px 8px;
  display: inline-block;
}


/* 健康档案亮度 194.8 → 目标 ≥200：这一页晚霞主视觉露得最多，
   把背景那层晚霞本身压到 35% 不透明度，整页就回到米白档。 */
body[data-route="profile"]::before { opacity: 0.35 !important; }


/* 手机端聊天输入框只有 180px 宽（旁边挤着发送按钮），老人打字看不全
   —— 让输入框占满一行、发送按钮换到下一行靠右。 */
@media (max-width: 900px) {
  #content .chat-input { width: 100% !important; min-width: 0 !important; flex: 1 1 100% !important; }
  #content .chat-input-row, #content .chat-composer { flex-wrap: wrap !important; gap: 10px !important; }
  #content .chat-input-row .btn, #content .chat-composer .btn { width: 100% !important; }
  #content .chat-input { font-size: 19px !important; min-height: 56px !important; }
}


/* 输入框的真实容器叫 .chat-compose（上一版写成了 .chat-composer，没命中）：
   手机端让输入框单占一行，麦克风与发送键在下面一行平分，老人打字能看全。 */
@media (max-width: 900px) {
  #content .chat-compose { flex-wrap: wrap !important; gap: 10px !important; }
  #content .chat-compose .chat-input { flex: 1 1 100% !important; width: 100% !important; min-width: 0 !important; min-height: 56px !important; font-size: 19px !important; }
  #content .chat-compose .btn { flex: 1 1 0 !important; min-height: 56px !important; }
}


/* ============================================================
   知识库视频教程卡（规格 B'）
   ============================================================ */
.kn-video-card { padding: 0 !important; overflow: hidden; }
.kn-video-btn {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: inherit;
}
.kn-video-frame {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9; background: #F1E7DA; overflow: hidden;
}
.kn-video-poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.kn-video-dur {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(24, 18, 14, 0.72); color: #fff; font-size: 16px;
}
.kn-video-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 46px; color: #fff; text-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}
.kn-video-title { display: block; font-size: 19px; font-weight: 800; padding: 10px 14px 0; color: #2B2422; }
.kn-video-one { display: block; font-size: 16px; line-height: 1.6; padding: 4px 14px 14px; color: #5B4A3C; }

.kn-modal {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(24, 18, 14, 0.66);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.kn-modal-box {
  width: min(820px, 100%); max-height: calc(100dvh - 36px); overflow: auto;
  background: #FFFDFA; border-radius: 18px; padding: 16px 18px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.kn-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kn-modal-title { font-size: 21px; margin: 0; color: #2B2422; }
.kn-player { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; margin-top: 10px; }
.kn-modal-note { font-size: 16px; color: #6B5644; margin: 8px 0 4px; }
.kn-modal-h { font-size: 18px; margin: 12px 0 6px; color: #2B2422; }
@media (max-width: 900px) {
  .kn-modal { padding: 8px; align-items: flex-end; }
  .kn-modal-box { max-height: 88dvh; border-radius: 16px 16px 0 0; }
  .kn-video-title { font-size: 18px; }
}


/* ============================================================
   真视频通话（接在晨起关怀弹层里）
   · .morning-call-stage.has-camera 时，视频铺满舞台，头像淡出当水印
   · 没有摄像头/不安全来源时加 .no-camera，舞台收起，不留黑框
   ============================================================ */
.morning-call-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transform: scaleX(-1);          /* 自拍镜像，抬手是抬手 */
  background: #1b1712;
  z-index: 1;
}

.morning-call-stage.has-camera .morning-avatar { opacity: 0.18; transform: scale(0.72); }
.morning-call-stage.has-camera .morning-call-name,
.morning-call-stage.has-camera .morning-call-status { position: relative; z-index: 2; }

.morning-call-stage.no-camera { min-height: 132px; }
.morning-call-stage.no-camera .morning-avatar { display: none; }

.morning-mic-meter {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(240px, 62%);
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  z-index: 3;
}
.morning-mic-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7BC47F, #F0A24E 70%, #D9534F);
  transition: width 90ms linear;
}
.morning-mic-meter[data-loud="on"] { box-shadow: 0 0 0 3px rgba(240, 162, 78, 0.25); }

.morning-subtitle[data-kind="listening"] { color: #FFF3E2; }
.morning-subtitle[data-kind="warn"] { color: #FFD9C7; }



/* 客户 2026-11（截图 P2）：主视觉里的「照护思路」标签与「防跌倒优先」徽标挤在一起、贴边重叠。
   原因：芯片是 inline 拼接，标签与值之间没有间距，窄屏时换行挤成一坨。
   这里统一成 flex 行、给足间距、禁止文字和徽标互相粘。 */
#content .dash-hero-chips { display: flex !important; gap: 10px !important; flex-wrap: wrap !important; }
#content .dash-hero-chips .hero-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
  background: rgba(255, 251, 244, 0.92) !important;
  border: 1px solid rgba(184, 90, 34, 0.14) !important;
  max-width: 100% !important;
}
#content .dash-hero-chips .hero-chip-dot { flex: 0 0 auto !important; }
#content .dash-hero-chips .hero-chip-label,
#content .dash-hero-chips .hero-chip-value,
#content .dash-hero-chips .hero-chip-note { white-space: nowrap !important; }
#content .dash-hero-chips .hero-chip-value { margin-left: 2px !important; }

/* 三合一「今天做三件事」：竖排三条，不同色块 */
#content .today-three-list { display: flex !important; flex-direction: column !important; gap: 10px !important; }
#content .today-three-row {
  display: flex !important; align-items: center !important; gap: 12px !important;
  width: 100% !important; text-align: left !important;
  padding: 14px 16px !important; border-radius: 16px !important;
  border: 1px solid rgba(184, 90, 34, 0.12) !important;
  background: #FFF9F0 !important;
  min-height: 76px !important;
}
#content .today-three-row[data-tint="warm"] { background: linear-gradient(135deg, #FFF3E2, #FFE7CC) !important; }
#content .today-three-row[data-tint="green"] { background: linear-gradient(135deg, #EDF7EC, #DCEEDB) !important; }
#content .today-three-row[data-tint="blue"] { background: linear-gradient(135deg, #EAF2FB, #DCE8F6) !important; }
#content .today-three-icon { flex: 0 0 auto !important; font-size: 26px !important; line-height: 1 !important; }
#content .today-three-body { display: flex !important; flex-direction: column !important; gap: 2px !important; flex: 1 1 auto !important; }
#content .today-three-name { font-size: 20px !important; font-weight: 800 !important; color: #2B2422 !important; }
#content .today-three-meta { font-size: 16px !important; color: #5B4A3C !important; }
#content .today-three-go { flex: 0 0 auto !important; font-size: 22px !important; color: #B85A22 !important; font-weight: 800 !important; }
#content .today-three-row.is-done .today-three-name { color: #2F6B55 !important; }

/* 客户 2026-11（截图 P1）：手机主视觉占掉整屏，且问候卡底发灰、贴着夕阳看着脏。
   手机端把主视觉压到今天任务卡露头的高度，问候卡换成实底米白。 */
@media (max-width: 900px) {
  #content .dash-hero { min-height: 0 !important; height: auto !important; max-height: 46vh !important; }
  #content .dash-hero-body { background: rgba(255, 251, 244, 0.96) !important; }
  #content .dash-hero-title, #content .dash-hero-copy { color: #2B2422 !important; }
  #content .dash-hero-veil { opacity: 0.45 !important; }
}

/* 手机主视觉再压一档：整块控制在 320px 内，让「今天做三件事」露进首屏 */
@media (max-width: 900px) {
  #content .dash-hero,
  #content .dash-hero.is-narrow { height: 320px !important; min-height: 320px !important; max-height: 320px !important; overflow: hidden !important; }
  #content .dash-hero-body { padding: 12px 14px !important; gap: 6px !important; }
  #content .dash-hero-title, #content .dash-hero-copy { font-size: 30px !important; }
  #content .dash-hero-chips .hero-chip { padding: 6px 12px !important; font-size: 16px !important; }
  #content .dash-hero-art img, #content .dash-hero-art { object-position: center 45% !important; }
}

/* 实测 .vf-top-row 高度算出来是 0（子项脱离常规流），「今天做三件事」被压成看不见， */
/* 但文字还在 DOM 里 —— 客户看到的就是“三张卡挤成一团/干脆没有”。强制它成为正常竖排容器。 */
#content .vf-top-row {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 14px !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
#content .vf-top-row > * { position: static !important; width: 100% !important; }

/* 修好 .vf-top-row 之后它跑到主视觉上面去了（DOM 顺序原本在主视觉后，是塌陷造成的错位）。 */
/* 客户要的顺序是：早上好 → 今天做三件事/今日任务 → 晨起关怀 → 其余，这里用 order 固定回来。 */
#content .col.dash-page { display: flex !important; flex-direction: column !important; }
#content .col.dash-page > .dash-hero { order: 1 !important; }
#content .col.dash-page > .vf-top-row { order: 2 !important; }
#content .col.dash-page > .morning-entry { order: 3 !important; }
#content .col.dash-page > .dash-focus { order: 4 !important; }
#content .col.dash-page > .card.dash-tiles-card { order: 5 !important; }


/* 运动核验页（独立页，交互对齐「餐食记录」） */
#content .exercise-rec-hero { padding: 18px 18px 16px !important; }
#content .exercise-rec-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: rgba(184, 90, 34, 0.10); color: #B85A22; font-size: 15px; font-weight: 700;
}
#content .exercise-rec-title { font-size: 26px; margin: 8px 0 2px; color: #2B2422; }
#content .exercise-rec-sub { font-size: 17px; color: #5B4A3C; margin: 0 0 12px; }
#content .exercise-rec-actions { display: flex; flex-direction: column; gap: 10px; }
#content .exercise-rec-actions .btn { min-height: 62px; font-size: 19px; }
#content .exercise-rec-tip { font-size: 16px; color: #5B4A3C; margin: 10px 0 0; line-height: 1.7; }
#content .exercise-rec-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
#content .exercise-rec-list-head h3 { font-size: 21px; margin: 0; }
#content .exercise-rec-rows { display: flex; flex-direction: column; gap: 8px; }
#content .exercise-rec-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 14px; background: #FFF9F0;
  border: 1px solid rgba(184, 90, 34, 0.10);
}
#content .exercise-rec-empty { padding: 18px 4px; text-align: center; }
#content .exercise-rec-more { margin-top: 12px; }
#content .exercise-rec-more > summary { cursor: pointer; font-size: 17px; color: #B85A22; font-weight: 700; padding: 8px 0; }


/* 晚间总结（全新一张卡） */
#content .evening-summary { padding: 18px 18px 16px !important; }
#content .evening-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
#content .evening-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #5B4A8C, #3E3566); color: #FFF7EC; font-size: 15px; font-weight: 700;
}
#content .evening-date { font-size: 15px; color: #6B5A4A; }
#content .evening-text { font-size: 19px; line-height: 1.75; color: #2B2422; margin: 6px 0 10px; }
#content .evening-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
#content .evening-tag {
  font-size: 15px; color: #4B3B2E; background: #F6EEE2;
  border: 1px solid rgba(184,90,34,.12); border-radius: 999px; padding: 5px 10px;
}
#content .evening-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#content .evening-actions .btn { flex: 1 1 auto; min-height: 58px; }


/* 联系社工（陪伴组） */
#content .support-hero { padding: 18px !important; }
#content .support-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: #FDEBDD; color: #96451B; font-size: 15px; font-weight: 700;
}
#content .support-title { font-size: 26px; margin: 8px 0 4px; }
#content .support-sub { font-size: 17px; color: #5B4A3C; margin: 0 0 10px; line-height: 1.7; }
#content .support-input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid rgba(184,90,34,.25); font-size: 19px; line-height: 1.7;
  background: #FFFDF9; color: #2B2422; resize: vertical;
}
#content .support-send { width: 100%; margin-top: 10px; min-height: 62px; font-size: 20px; }
#content .support-status { margin-top: 8px; font-size: 16px; color: #6B5A4A; min-height: 22px; }
#content .support-list { padding: 16px 16px 6px !important; }
#content .support-list-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 17px; color: #6B5A4A; }
#content .support-row { padding: 10px 0; border-top: 1px solid rgba(184,90,34,.12); }
#content .support-row-body { font-size: 19px; line-height: 1.7; color: #2B2422; }
#content .support-row-time { font-size: 14px; color: #8A7663; margin-top: 2px; }
#content .support-reply { margin-top: 8px; font-size: 17px; line-height: 1.7; color: #2F6B55; }
#content .support-reply-who { font-weight: 800; margin-right: 8px; }
#content .support-reply.is-waiting { color: #8A7663; }
#content .support-empty { font-size: 17px; color: #6B5A4A; padding: 6px 0 12px; }

/* 工作台：老人留言卡 */
#content .org-msg-card { padding: 16px !important; }
#content .org-msg-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 17px; color: #6B5A4A; }
#content .org-msg-row { padding: 10px 0; border-top: 1px solid rgba(184,90,34,.12); }
#content .org-msg-head { display: flex; gap: 10px; align-items: baseline; font-size: 16px; color: #6B5A4A; }
#content .org-msg-done { margin-left: auto; font-size: 14px; color: #96451B; }
#content .org-msg-body { font-size: 18px; line-height: 1.7; color: #2B2422; margin: 4px 0 6px; }
#content .org-msg-replied { font-size: 16px; color: #2F6B55; }
#content .org-msg-actions { display: flex; flex-direction: column; gap: 8px; }
#content .org-msg-reply { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; border: 1.5px solid rgba(184,90,34,.22); font-size: 17px; }
#content .org-msg-empty { font-size: 16px; color: #6B5A4A; }

/* 晚间总结排在主视觉+三件事+晨起关怀之后（前面几块用了 order，这里必须给个更大的） */
#content .evening-summary { order: 6 !important; }

/* ===== 我的记录（记录组落点页）=====
   卡片里是 span 结构，必须有 display:flex/grid 才会分行；
   之前没样式 → 名字、说明、状态挤成一行。 */
#content .records-hero { display: flex; flex-direction: column; gap: 6px; text-align: left; }
#content .records-badge { align-self: flex-start; font-size: 15px; color: #8A5A2B; background: #FBEDDD; border-radius: 999px; padding: 4px 12px; }
#content .records-title { font-size: 26px; font-weight: 800; margin: 2px 0 0; color: #2B2422; }
#content .records-sub { font-size: 17px; line-height: 1.6; color: #5B4A3C; margin: 0; }
#content .records-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 16px; min-height: 88px; }
#content .records-icon { font-size: 30px; line-height: 1; flex: 0 0 auto; }
#content .records-body { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
#content .records-name { font-size: 20px; font-weight: 800; color: #2B2422; }
#content .records-desc { font-size: 16px; line-height: 1.5; color: #5B4A3C; }
#content .records-status { font-size: 15px; border-radius: 999px; padding: 2px 10px; align-self: flex-start; }
#content .records-status[data-kind="todo"] { color: #8A5A2B; background: #FBEDDD; }
#content .records-status[data-kind="done"] { color: #256B4A; background: #DFF2E6; }
#content .records-go { font-size: 26px; color: #B85A22; flex: 0 0 auto; }

/* 运动前必读：折叠时只留两条，按钮要看得见、点得动 */
#content .safety-wrap { display: flex; flex-direction: column; gap: 8px; }
#content .collapsible-hidden { display: none !important; }
#content .safety-list { margin: 0; padding-left: 20px; }
#content .safety-list li { margin: 4px 0; font-size: 17px; line-height: 1.6; }
#content .safety-toggle { align-self: flex-start; min-height: 52px; }
/* 折叠态只渲染两条，天然不会占半屏；按钮保持可见可点 */
@media (max-width: 900px) {
  #content .safety-list li { font-size: 16px; }
  #content .safety-toggle { width: 100%; }
}

/* ===== 照护知识页 ===== */
#content .kn-hero { display: flex; flex-direction: column; gap: 6px; text-align: left; }
#content .kn-badge { align-self: flex-start; font-size: 15px; color: #8A5A2B; background: #FBEDDD; border-radius: 999px; padding: 4px 12px; }
#content .kn-title { font-size: 26px; font-weight: 800; margin: 2px 0 0; color: #2B2422; }
#content .kn-sub { font-size: 17px; color: #5B4A3C; margin: 0; line-height: 1.6; }
#content .kn-searchbar { display: flex; gap: 8px; }
#content .kn-search { flex: 1 1 auto; min-height: 54px; font-size: 18px; border-radius: 14px; border: 1px solid #D9CBB8; padding: 0 14px; background: #fff; }
#content .kn-voice { flex: 0 0 auto; min-height: 54px; }
#content .kn-group, #content .kn-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 16px; }
#content .kn-group-icon { font-size: 30px; }
#content .kn-group-body { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
#content .kn-group-name { font-size: 20px; font-weight: 800; color: #2B2422; }
#content .kn-group-sub { font-size: 16px; color: #5B4A3C; }
#content .kn-group-count { font-size: 15px; color: #8A5A2B; background: #FBEDDD; border-radius: 999px; padding: 2px 10px; align-self: flex-start; }
#content .kn-group-go, #content .kn-row-go { font-size: 26px; color: #B85A22; }
#content .kn-rows { display: flex; flex-direction: column; gap: 10px; }
#content .kn-row { flex-direction: column; align-items: flex-start; gap: 4px; }
#content .kn-row-name { font-size: 19px; font-weight: 800; color: #2B2422; }
#content .kn-row-sum { font-size: 16px; color: #5B4A3C; line-height: 1.55; }
#content .kn-mask { position: fixed; inset: 0; background: rgba(30, 24, 18, 0.45); z-index: 60; }
#content + .kn-mask, body > .kn-mask { position: fixed; }
.kn-drawer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: #FFFBF4; border-radius: 22px 22px 0 0; max-height: 82vh; display: flex; flex-direction: column; }
.kn-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid #EADCC9; }
.kn-drawer-title { font-size: 21px; font-weight: 800; color: #2B2422; }
.kn-drawer-body { overflow-y: auto; padding: 14px 18px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
.kn-sec-label { font-size: 16px; font-weight: 800; color: #B85A22; margin-bottom: 4px; }
.kn-ol, .kn-ul { margin: 0; padding-left: 20px; }
.kn-ol li, .kn-ul li { font-size: 18px; line-height: 1.7; color: #2B2422; }
.kn-note, .kn-foot { font-size: 15px; color: #6B5A4A; line-height: 1.6; }

/* 「运动前必读」标题必须一行（客户要求）：字缩一档 + 不换行 */
#content .safety-title.one-line { white-space: nowrap !important; font-size: 17px !important; letter-spacing: -0.2px; }
@media (max-width: 900px) {
  /* 右侧小插画让位，标题才有整行宽度 */
  #content .safety-head img, #content .safety-art { display: none !important; }
  #content .safety-title.one-line { font-size: 18px !important; }
}

/* ===== 运动页：三张安全卡合成一张 + 标题一行 + 今日卡插画放大 ===== */
#content .safety-combined .safety-title { white-space: nowrap; font-size: 18px; }
#content .safety-combined .safety-title .illustration { width: 44px; height: 44px; }
#content .safety-combined .safety-more { margin-top: 10px; }
#content .safety-combined .safety-more > summary {
  cursor: pointer; list-style: none; min-height: 52px; display: flex; align-items: center;
  font-size: 17px; font-weight: 700; color: #B85A22;
  border-top: 1px dashed #E3D2BC; padding-top: 8px;
}
#content .safety-combined .safety-more > summary::-webkit-details-marker { display: none; }
#content .safety-combined .safety-more > summary::after { content: '⌄'; margin-left: auto; font-size: 20px; }
#content .safety-combined[open] .safety-more > summary::after { content: '⌃'; }
#content .safety-combined .safety-more .card { box-shadow: none; border: 0; padding: 8px 0; }
/* 今天（周X）就练这些：插画放大一档 */
#content #today-plan .illustration { width: 104px !important; height: 104px !important; border-radius: 16px; }
/* 知识抽屉里「什么情况下别做」单独一句，颜色提醒 */
.kn-ul li.kn-stop { color: #B23A1F; font-weight: 700; margin-top: 6px; }
/* 公网 http 下的晨起关怀：纯文字卡 */
#content .morning-textonly { display: flex; flex-direction: column; gap: 10px; text-align: left; position: relative; }
#content .morning-textonly-head { display: block; padding-right: 52px; }
#content .morning-textonly-badge { display: inline-block; font-size: 15px; color: #8A5A2B; background: #FBEDDD; border-radius: 999px; padding: 4px 12px; }
#content .morning-textonly-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; min-width: 44px; border-radius: 50%; border: 1px solid #E3D5C3; background: #fff; color: #6B5544; font-size: 26px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
#content .morning-textonly-close:hover { background: #FBEDDD; }
#content .morning-textonly-close:focus-visible { outline: 3px solid #C2632C; outline-offset: 2px; }
#content .morning-textonly-title { font-size: 22px; font-weight: 800; margin: 0; color: #2B2422; }
#content .morning-textonly-sub { font-size: 16px; line-height: 1.6; color: #5B4A3C; margin: 0; }
#content .morning-textonly-input { width: 100%; min-height: 110px; font-size: 18px; line-height: 1.6; border-radius: 14px; border: 1px solid #D9CBB8; padding: 12px; background: #fff; }
