/* ==================================================================
   开场页（Entry Screen）· 第二代：与整页背景同一幅写实日落
   ==================================================================
   客户的第一句话是「像游戏一样的、有动态化的进入界面」；
   换完写实日落背景之后的第二句话是
   「开场动画你能改一下跟背景一样的精美，渲染程度高一点」。

   于是这一版做了三件事：

   1【场景重画，而不是加料】
     手写 SVG（web/js/welcome.js 的 SCENE）用 **app.css --bg-image 的同一套
     配色与同一套层序**重画了一遍：天空 7 带 → 太阳外晕/内晕 → 天顶暗云盖
     → 云 L1–L5（下缘金边）→ 太阳白核 + 硬金环 → 远山 → 海面 → 金色反光柱
     → 前景剪影（岸线 / 礁石 / 芦苇 / 拄杖长者）。一张图片、一个 CDN 都没有。

   2【文字改用"落日上的浅色字 + 暗色垫"，与业务页同一套做法】
     背景换成深色日落以后，原来那层"暖白柔光垫 + 深色字"会把整幅日落糊掉。
     现在改成 app.css 里那套已经算过对比度的组合：
       --on-bg #F6E7D6（对 --bg 13.9:1）· --on-bg-2 #EBD5BC（11.9:1）
       · --on-bg-3 #DCC3A8（10.0:1）＋ --on-bg-scrim 那一层暗色垫。
     字号一个字没动，按钮一个没动，对比度只升不降（见下方各条注释）。
     ⚠️ 落日正中那一带（视口 25%–63%）是亮橙，浅字压上去只有 1.95:1 ——
        所以正文下面必须留 Scrim，这就是 .welcome::after 存在的原因。

   3【动效只留"慢、柔、循环"】
     周期全部 ≥ 9s、位移一律 ≤ 画面高的 1.5%，没有一处闪烁、没有一处弹跳。
     分幕入场仍然走一条 0.25s→4.9s 的时间轴，像游戏开场一样层层展开，
     但每一幕都只做淡入与轻微上浮。系统开启「减少动态效果」时全部静止。
   ================================================================== */

.welcome {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  /* 底色 = 落日渐变最深的那一档（与 app.css 的 --bg 同值）。
     它有两个作用：① SVG 万一解析失败时兜底；② 视觉审计的对比度基准 ——
     审计拿"不透明背景色"当最坏情况算浅色字的对比度，这里与业务页同口径。 */
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 落日上的暗色垫（Scrim）----------
   浅色字压在亮橙带（#FF8A10）上只有 1.95:1，必须垫一层暗色。
   垫的是一整屏的椭圆，而不是"文案框那么大一块" ——
   文案框的边界会切出一道硬边，暗色垫铺满视口、四角自然淡出才看不出来。
   最暗处（画面正中）rgba(19,10,2,.72)：即使背后正好是日面纯白，
   浅字仍有 ~5:1；实际正文所在的位置（天空暗带、海面）都在 8:1 以上。 */
.welcome::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* 垫子的水平半径只取 47%：文案列最宽 640px（±320px），
     47% × 1440 = 677px 已经足够罩住它，而画面左右各 1/4 会被留在
     垫子之外 —— 那两带正是最亮的橙带，露出来才像日落，而不是一块暗菜板。
     实测：x=2% 处 0 遮挡（原始 #8E5817），x=25% 处 0.70（#48230D）。 */
  background: radial-gradient(ellipse 47% 58% at 50% 50%,
    rgba(19, 10, 2, 0.72) 0%,
    rgba(19, 10, 2, 0.66) 50%,
    rgba(19, 10, 2, 0.44) 72%,
    rgba(19, 10, 2, 0.16) 88%,
    rgba(19, 10, 2, 0) 100%);
}
/* 窄屏上文案几乎占满整幅画面（.welcome-fore 宽 92vw），
   垫子必须跟着铺满，否则左右两端会露在亮橙带上（那里只有 1.9:1）。 */
@media (max-width: 700px) {
  .welcome::after {
    background: radial-gradient(ellipse 96% 58% at 50% 50%,
      rgba(19, 10, 2, 0.72) 0%,
      rgba(19, 10, 2, 0.66) 50%,
      rgba(19, 10, 2, 0.48) 74%,
      rgba(19, 10, 2, 0.24) 90%,
      rgba(19, 10, 2, 0) 100%);
  }
}

/* ---------- 背景场景层 ---------- */
.welcome-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.welcome-scene svg {
  width: 100%;
  height: 100%;
  display: block;
  /* 铺满靠的是 SVG 自己的 preserveAspectRatio="xMidYMid slice"（= cover 语义）。
     ⚠️ 内联 <svg> 不是替换元素，`object-fit` 对它不生效 ——
        第一代只写了 object-fit: cover，于是 375×667 上场景被压成中间一条横带
        （viewBox 1200×700 用默认的 meet 缩放，上下各留 224px 空白）。
        现在两个都写上：老浏览器认 object-fit，现代浏览器认 slice。 */
  object-fit: cover;
}
.welcome-scene-fallback {
  position: absolute;
  inset: 0;
  /* 兜底：一份"压缩版落日"（天顶深冷黑 → 金 → 炽橙 → 暗海），
     与场景 SVG 同一套色标，SVG 解析失败时也不会露出一块白 */
  background: 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%);
}

/* 文案列本身不再铺底色：暗色垫由 .welcome::after 统一负责，
   这里再铺一层就会出现"文案框"的硬边。 */
.welcome-fore {
  position: relative;
  z-index: 2;
  width: min(1080px, 92vw);
  padding: 40px 0 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ---------- 文案 ---------- */
.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* 白底小胶囊压在深色落日上：颜色与文字色一个字没动，
     只把阴影换成暗色投影（浅色底 + 浅阴影在深背景上会发飘）。 */
  background: var(--card);
  border: 1px solid var(--primary-b);
  color: var(--primary-text);
  font-size: var(--fs-sm);
  font-weight: 700;
  padding: 10px 20px;
  border-radius: var(--r-full);
  box-shadow: 0 6px 20px rgba(20, 10, 2, 0.32);
}

.welcome-title {
  font-size: clamp(44px, 7.2vw, 76px);
  line-height: 1.16;
  font-weight: 800;
  /* 落日上的浅色字：--on-bg 对 --bg 是 13.9:1（原来是深色字对暖白底约 13:1，
     只升不降）。再配一层很淡的暗色描边，日面从背后透出来时也压得住。 */
  color: var(--on-bg);
  letter-spacing: 0.04em;
  margin: 18px 0 4px;
  text-shadow: 0 2px 22px rgba(14, 7, 1, 0.55), 0 1px 3px rgba(14, 7, 1, 0.4);
}

/* ---------- 标题金光扫过（第三代加料：只动背景渐变，不位移、不闪字）----------
   标题文字本身保持 .wl-fade-up 的分幕入场（welcome-test 断言过它的时间线），
   这一层挂在**里面的 span** 上：入场后每隔 9s 有一道极淡的金光从左上扫到右下。
   对比度口径不变：span 的 computed color 仍是 --on-bg（13.9:1），
   渐变的每一档都比 --on-bg 更亮（最低 #F6E7D6），真实对比只升不降。 */
.wl-title-shine {
  display: inline-block;
  /* 不支持 background-clip:text 的老浏览器保持纯色继承（--on-bg），绝不透明消失 */
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .wl-title-shine {
    background-image: linear-gradient(100deg,
      #F6E7D6 0%, #FFF6E6 24%, #FFD9A0 46%, #FFEFCB 62%, #F6E7D6 88%);
    background-size: 260% 100%;
    background-position: 0% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* 暗色投影仍按字形绘制，垫在渐变下面，标题和背景不会"糊"在一起 */
    text-shadow: 0 2px 22px rgba(14, 7, 1, 0.5);
    animation: wl-shine-pan 9s ease-in-out 4.6s infinite;
  }
}
@keyframes wl-shine-pan {
  0%, 18% { background-position: 0% 0; }
  55%, 100% { background-position: 100% 0; }
}

.welcome-lead {
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.9;
  /* --on-bg-2 对 --bg 是 11.9:1（原来是 7.2:1） */
  color: var(--on-bg-2);
  max-width: 640px;
  margin: 4px 0;
  text-shadow: 0 1px 14px rgba(14, 7, 1, 0.5);
}

/* ---------- 三张特色卡 ---------- */
.welcome-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* 原来是 16px：三张白卡在亮橙天空上会连成一条白带，老人看不出"这是三件不同的事"。
     改成 24px 后卡片自动收窄（1fr 栅格），不会溢出。 */
  gap: 24px;
  width: 100%;
  margin: 30px 0 6px;
}

.welcome-feature {
  /* 卡片改用**不透明白卡**：① 与业务页的 .card 完全一致；
     ② 卡片自己的文字（--text / --text-2 深色）必须坐在不透明底上，
        半透明的 0.94 会让对比度审计把它算到底色上（深字压深底 = 违规）。 */
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 22px 20px;
  box-shadow: 0 10px 30px rgba(20, 10, 2, 0.3);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
/*
 * 悬停浮起**只给真正能点的卡**。
 *
 * 历史缺陷：这三张卡在 welcome.js:352 渲染成 <div>，整段代码里没有任何 onClick，
 * 但 `.welcome-feature:hover` 一视同仁地让它们上浮 3px、阴影变深 ——
 * 长者点下去毫无反应。位置最糟：这是打开系统的**第一屏**，
 * "点一下没反应"会直接让人得出"这系统不好使"。
 * 与 DEF-15（插画卡、已记录餐次卡）是同一个根因：反馈挂在类名上，没区分元素能不能点。
 */
.welcome-feature:is(button, a):hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.welcome-feature-icon {
  font-size: 34px;
  line-height: 1;
}

.welcome-feature-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
}

.welcome-feature-desc {
  /* 17px → 19px：这是卡片的正文（"量一次小腿围、握一次握力…"），
     不是装饰性小字，必须过项目自定的 19px 正文底线（实测原为 17px）。 */
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text-2);
}

/* ---------- 主按钮 ---------- */
.welcome-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.welcome-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  /* 开场页的最大动作，给到 72px 高、字号 26px */
  min-height: 72px;
  padding: 20px 52px;
  border: none;
  border-radius: var(--r-full);
  background: var(--primary-btn);
  color: var(--text-inv);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(184, 90, 34, 0.34);
  /* 「呼吸」光晕：幅度极小、周期长，只是让按钮显得有生命，不刺眼 */
  animation: wl-breathe 3.4s ease-in-out 5s infinite;
  transition: transform 0.16s var(--ease), background 0.16s var(--ease);
}
.welcome-start:hover { background: var(--primary-btn-hover); transform: translateY(-2px); }
.welcome-start:active { transform: translateY(0); }
.welcome-start-arrow { font-size: 30px; line-height: 1; }

.welcome-sub-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.welcome-link {
  background: none;
  border: none;
  /* --on-bg-3 对 --bg 是 10.0:1（原来是 7.2:1）。
     字号从 17px 提到正文 19px：这是"直接登录"的实际入口，不是装饰小字。 */
  color: var(--on-bg-3);
  font-size: var(--fs-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 点击区域必须达标 —— 项目自定标准 54px（不是 WCAG 的 44）。
     实测过：这里原本是 48px，老人手指按不准。 */
  min-height: 54px;
  padding: 12px 12px;
}
.welcome-link:hover { color: var(--on-bg); }
.welcome-dot { color: var(--on-bg-3); }

.welcome-foot {
  margin-top: 20px;
  /* 16px → 19px：这是"本系统仅供健康管理与科普参考，不构成医疗建议"的免责声明，
     是全页最该被看清的一句，实测原为 16px（全页最小）。 */
  font-size: var(--fs-body);
  color: var(--on-bg-3);
  line-height: 1.7;
  max-width: 620px;
  /* 视觉评审实测末行只剩「与治疗」3 个字（590:55 的断层）：
     balance 让每行字数自动均衡，不再出现孤字行（不支持的老浏览器原样换行） */
  text-wrap: balance;
}

/* ---------- 跳过 ---------- */
.welcome-skip {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 5;
  /* 同上：分幕要等几秒，急着进的人第一眼就想点它，点击区域必须够大 */
  min-height: 54px;
  padding: 14px 24px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  /* 不透明白：它压在深色天空上，白底 + --text-2（7.2:1）比半透明玻璃更清楚，
     也让对比度审计拿到的是真实底色而不是"透过去的落日"。 */
  background: var(--card);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(20, 10, 2, 0.35);
}
.welcome-skip:hover { background: #fff; color: var(--text); }

/* ---------- 登录页上的「再看一次开场动画」入口 ---------- */
.auth-replay {
  background: none;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-full);
  color: var(--text-3);
  font-size: var(--fs-xs);
  cursor: pointer;
  /* 文字很小，但点击区域必须达标 —— 项目自定标准是 54px（不是 WCAG 的 44） */
  min-height: 54px;
  padding: 10px 20px;
}
.auth-replay:hover { color: var(--primary-text); border-color: var(--primary-b); }

/* ==================================================================
   开场场景动效（第二代：写实日落）
   ------------------------------------------------------------------
   一条规矩贯穿全部循环动效：**周期 ≥ 9s、位移 ≤ 画面高的 1.5%、不闪烁**。
   老年人前庭功能与对比敏感度都在下降，快、抖、闪的动画会直接引起头晕，
   所以这里连"水面波光"都是十几秒一呼一吸，而不是一闪一闪。
   ================================================================== */

/* ---------- ① 分幕入场：文案层（与第一代完全一致，一个字没动） ----------
   标题 3.7s、说明 4.0s、三张卡 4.25s 起、按钮 4.7s、落款 4.9s。
   welcome-test.mjs 会断言"第 0.9 秒标题还没入场"，所以这套延迟不能改。 */
@keyframes wl-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wl-fade-up {
  opacity: 0;
  animation: wl-fade-up 0.75s cubic-bezier(0.22, 0.8, 0.3, 1) forwards;
}

/* ---------- ② 分幕入场：场景层（淡入 + 轻微上浮） ---------- */
@keyframes wl2-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wl2-in { opacity: 0; animation: wl2-in 1.6s cubic-bezier(0.22, 0.8, 0.3, 1) forwards; }

/* 只淡入、不位移：远山 / 海面 / 岸线用它 ——
   地面层若也跟着上下动，会和天空之间露出缝。 */
@keyframes wl2-fade-in { from { opacity: 0; } to { opacity: 1; } }
.wl2-fade-in { opacity: 0; animation: wl2-fade-in 1.9s ease-out forwards; }

.wl2-in-sky     { animation-delay: 0.25s; }   /* 天空、天顶暗云盖、星光 */

/* 天空单独"加光"而不是"从无到有"：
   像素实测首帧（0.6s）全屏平均亮度只有 28/255（最暗点 #18100C），
   肉眼读起来就是"页面没加载出来"。天空是面积最大的一层，让它从 0.52 起，
   第一帧就已经是一幅压暗的落日；其余图层仍从 0 起，所以分幕不会塌。
   （本规则必须排在 .wl2-fade-in 之后：同为一个类选择器，靠源序取胜。） */
@keyframes wl2-sky-in { from { opacity: 0.52; } to { opacity: 1; } }
.wl2-in-sky { opacity: 0.52; animation-name: wl2-sky-in; animation-delay: 0.25s; }
.wl2-in-far     { animation-delay: 1.05s; }   /* 远层云（细云丝 / 中层云块）*/
.wl2-in-near    { animation-delay: 1.35s; }   /* 近层云（主暗云带 + 下缘金边）*/
.wl2-in-land    { animation-delay: 1.75s; }   /* 远山 */
.wl2-in-sea     { animation-delay: 1.95s; }   /* 海面 */
.wl2-in-reflect { animation-delay: 2.25s; }   /* 金色反光柱与波光 */
.wl2-in-shore   { animation-delay: 2.5s; }    /* 岸线、礁石、芦苇、主角 */
.wl2-in-bird    { animation-delay: 3.0s; }    /* 飞鸟 */

/* ---------- ② 太阳：从远山后面升起来 + 光晕缓慢呼吸 ---------- */
@keyframes wl-sunrise {
  from { opacity: 0; transform: translateY(64px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* ⚠️ `.wl-sunrise` 是 welcome-test.mjs 明确断言过的类名（要读到 wl-sunrise
   这个动画名），因此沿用到第二代：现在它挂在外晕组与日面组上，
   两组用同一个 transform-origin，升起时不会脱节。 */
.wl-sunrise {
  opacity: 0;
  transform-origin: 600px 420px;
  /* 原来 0.7s 延迟 + 2.8s 时长 = 3.5s 才全亮，而抬头看它的窗口只有 0~4.5s
     （之后白色卡片就压到日面上了）。像素实测 1.6s/3.0s 时太阳只有中性灰
     L≈80，而同一帧右侧天空已到 L=133 —— 画面最亮的不是太阳，落日的写实感
     就没了。提前到 0.3s + 2.0s：2.3s 全亮，太阳重新成为画面最亮点。 */
  animation: wl-sunrise 2s cubic-bezier(0.22, 0.8, 0.3, 1) 0.3s forwards;
}

/* 光晕呼吸：11s 一周期、只放大 3.5%、透明度 0.9→1。
   这是"太阳还活着"的暗示，不是闪烁。 */
@keyframes wl2-breath {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%      { transform: scale(1.035); opacity: 1; }
}
.wl2-breath {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: wl2-breath 11s ease-in-out infinite;
}

/* ---------- ③ 云带漂移：两档速度做出视差 ----------
   位移量 = 一个整画幅（1200 单位），到了就无缝接回 —— 因为每一套云都画了两遍。
   近层 8.3 单位/秒、远层 5.7 单位/秒（1440 宽下约 10.7 / 7.3 像素每秒）。 */
@keyframes wl2-drift { from { transform: translateX(0); } to { transform: translateX(1200px); } }
.wl2-drift-far  { animation: wl2-drift 210s linear infinite; }
.wl2-drift-near { animation: wl2-drift 145s linear infinite; }

/* ---------- ④ 海面：金色反光柱缓慢明灭 + 碎波光呼吸 ---------- */
@keyframes wl2-shimmer {
  0%, 100% { opacity: 0.62; }
  50%      { opacity: 0.96; }
}
.wl2-glint { animation: wl2-shimmer 13s ease-in-out infinite; }
.wl2-glint-2 { animation-duration: 16s; animation-delay: -3s; }
.wl2-glint-3 { animation-duration: 15s; animation-delay: -6s; }
.wl2-glint-4 { animation-duration: 17s; animation-delay: -9s; }
.wl2-glint-5 { animation-duration: 14s; animation-delay: -12s; }
.wl2-glint-6 { animation-duration: 16s; animation-delay: -5s; }
.wl2-glint-7 { animation-duration: 15s; animation-delay: -8s; }

/* 远处的细浪：横向只走 ±10 单位（画面宽 0.8%），18~26s 一往返 */
@keyframes wl2-ripple {
  0%, 100% { transform: translateX(-10px); opacity: 0.6; }
  50%      { transform: translateX(10px);  opacity: 1; }
}
.wl2-ripple { animation: wl2-ripple 22s ease-in-out infinite; }
.wl2-ripple-2 { animation-duration: 26s; animation-delay: -7s; }
.wl2-ripple-3 { animation-duration: 19s; animation-delay: -11s; }
.wl2-ripple-4 { animation-duration: 24s; animation-delay: -3s; }

/* ---------- ⑤ 芦苇：随风轻摆（±1.1°，9~12s）----------
   旋转中心在根部（transform-box: fill-box + 100%），所以摆的是梢，不是整丛。 */
@keyframes wl2-sway {
  0%, 100% { transform: rotate(-1.1deg); }
  50%      { transform: rotate(1.1deg); }
}
/* ⚠️ `.wl-wave` 同样是 welcome-test.mjs 断言过的类名（"减少动态效果下招手
   动画已停"），第二代场景里它挂在左簇芦苇上 —— 芦苇随风摆动，本来就是 wave。 */
.wl-wave,
.wl2-sway {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: wl2-sway 10.5s ease-in-out infinite;
}
.wl2-sway-b { animation-duration: 12s; animation-delay: -3.5s; }
.wl2-sway-c { animation-duration: 9.5s; animation-delay: -6s; }

/* ---------- ⑥ 飞鸟：110s 横穿一程，加一点缓慢的上下浮动 ---------- */
@keyframes wl2-fly {
  from { transform: translateX(1280px); }
  to   { transform: translateX(-180px); }
}
.wl2-fly { animation: wl2-fly 110s linear infinite; }
@keyframes wl2-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.wl2-bird { animation: wl2-bob 4.6s ease-in-out infinite; }
.wl2-bird:nth-child(2) { animation-delay: -0.9s; }
.wl2-bird:nth-child(3) { animation-delay: -1.8s; }
.wl2-bird:nth-child(4) { animation-delay: -2.4s; }
.wl2-bird:nth-child(5) { animation-delay: -3.1s; }
.wl2-bird:nth-child(6) { animation-delay: -3.8s; }

/* ---------- ⑧ 太阳光芒公转 + 金色微尘上浮（第三代，只加光、周期长、幅度小） ---------- */
@keyframes wl2-ray-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
/* 两条动画并行：2.25s 起淡入（跟反光柱同一拍），全程 240s 一圈极慢公转。
   wl2-fade-in 只动 opacity、ray-spin 只动 transform，互不打架。 */
.wl2-rays {
  opacity: 0;
  transform-origin: 600px 420px;
  animation: wl2-fade-in 1.9s ease-out 2.25s forwards,
             wl2-ray-spin 240s linear infinite;
}

@keyframes wl2-dust-rise {
  0%, 100% { transform: translateY(0); opacity: 0.10; }
  50%      { transform: translateY(-9px); opacity: 0.38; }
}
.wl2-dust-p { animation: wl2-dust-rise 18s ease-in-out infinite; }
.wl2-dust-2  { animation-duration: 22s; animation-delay: -4s; }
.wl2-dust-3  { animation-duration: 15s; animation-delay: -8s; }
.wl2-dust-4  { animation-duration: 26s; animation-delay: -2s; }
.wl2-dust-5  { animation-duration: 20s; animation-delay: -6s; }
.wl2-dust-6  { animation-duration: 24s; animation-delay: -10s; }
.wl2-dust-7  { animation-duration: 16s; animation-delay: -12s; }
.wl2-dust-8  { animation-duration: 21s; animation-delay: -3s; }
.wl2-dust-9  { animation-duration: 25s; animation-delay: -7s; }
.wl2-dust-10 { animation-duration: 23s; animation-delay: -13s; }
.wl2-dust-11 { animation-duration: 17s; animation-delay: -5s; }
.wl2-dust-12 { animation-duration: 19s; animation-delay: -9s; }

/* ---------- ⑦ 主角：极轻微的起伏（±1.6 单位 ≈ 2px，11s）----------
   ⚠️ `.wl-hero` 是 welcome-test.mjs 断言过的类名（"减少动态效果下主角立即可见"）。
   摆位由外层 <g transform="translate(560,664)"> 负责，这一层只管起伏，
   所以减少动态效果时把动画停掉也不会跑位。 */
@keyframes wl2-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-1.6px); }
}
.wl-hero {
  opacity: 0;
  animation: wl2-in 1.8s cubic-bezier(0.22, 0.8, 0.3, 1) 2.7s forwards,
             wl2-float 11s ease-in-out 4.5s infinite;
}

/* 主按钮呼吸光晕 */
@keyframes wl-breathe {
  0%, 100% { box-shadow: 0 8px 26px rgba(184, 90, 34, 0.34); }
  50%      { box-shadow: 0 10px 34px rgba(184, 90, 34, 0.52); }
}

/* ---------- 平板与手机 ---------- */
@media (max-width: 900px) {
  .welcome-fore { width: 92vw; padding: 28px 0 36px; }
  .welcome-features { grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 22px 0 4px; }
  .welcome-feature { padding: 18px 18px; }
  .welcome-start { min-height: 66px; font-size: 24px; padding: 18px 40px; }
  .welcome-title { letter-spacing: 0.02em; }
}

@media (max-width: 560px) {
  /* ⚠️ 原来这里写的是 `object-position: 42% 40%` —— 对**内联** <svg> 完全无效
     （object-position/object-fit 只作用于替换元素），窄屏上真正决定怎么裁的
     是 SVG 自己的 preserveAspectRatio="xMidYMid slice"。
     构图已按"中央 1/3 必须自成画面"设计：太阳、反光柱、岸上的长者的 x 都在
     404–796 之间，所以手机裁掉两侧也照样成立，这里不再需要任何补偿。 */
  .welcome-lead { font-size: 16px; }
  .welcome-feature { padding: 14px 16px; gap: 6px; }
  .welcome-feature-title { font-size: var(--fs-body); }
  .welcome-feature-icon { font-size: 26px; }

  /* ---------- 小屏必须让「开始使用」留在首屏 ----------
     实测：iPhone SE（375×667）下，三张特色卡竖着排会占掉约 270px，
     把主按钮挤到 top=622px —— 按钮底边 689px 已经超出 667px 的视口，
     用户必须往下滚才能找到唯一的入口。首次使用者（尤其是长者）
     很可能就此以为"这页没有能点的地方"。
     所以小屏把特色卡压成一行三个，并且**隐藏说明文字**：
     只留图标与标题。实测这两条一起做才够 ——
     只改成三列、但保留说明文字的话，每张卡在 110px 宽的列里
     会折成十几行、整行高 379px，主按钮反而被推得更低（635px）。 */
  .welcome-feature-desc { display: none; }
  .welcome-features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 16px 0 2px;
  }
  .welcome-feature {
    padding: 10px 6px;
    gap: 4px;
    text-align: center;
    align-items: center;
  }
  .welcome-feature-title { font-size: var(--fs-sm); line-height: 1.4; }
  .welcome-feature-icon { font-size: 22px; }

  .welcome-fore { padding: 20px 0 24px; }
  .welcome-lead { line-height: 1.75; }
  .welcome-actions { margin-top: 16px; gap: 10px; }
  .welcome-skip { padding: 10px 16px; }
}

/* ---------- 矮屏（横屏手机 / 小笔记本）----------
   按**高度**而不是宽度兜底：这类屏幕宽度够、高度不够，
   单靠宽度断点发现不了。 */
@media (max-height: 700px) {
  .welcome-fore { padding: 16px 0 18px; }
  .welcome-title { margin: 10px 0 2px; }
  .welcome-lead { line-height: 1.65; }
  .welcome-features { margin: 14px 0 2px; }
  .welcome-feature { padding: 12px 14px; }
  .welcome-actions { margin-top: 14px; }
  .welcome-foot { margin-top: 12px; }
  .welcome-start { min-height: 62px; padding: 16px 36px; font-size: 23px; }
}

/* ==================================================================
   尊重系统「减少动态效果」设置
   ------------------------------------------------------------------
   老年人前庭功能与前庭适应能力下降，快速运动会引起头晕甚至跌倒。
   用户一旦在系统里开启「减少动态效果」，这里所有动画直接到终态：
   不位移、不缩放、不循环，元素只做最淡的淡入（0.01s）。

   分两组写，是有原因的：
     A 组（入场动画）必须补上 `opacity: 1` 与 `transform: none` ——
       它们的初始态是 opacity:0 / 位移 14px，光停掉动画会停在"看不见"上；
     B 组（循环动画）只停动画、**不覆盖 opacity** ——
       它们的透明度是画在 SVG 里的设计值（波光 0.62、芦苇 1），
       一起写成 1 反而会让水面碎光变得比设计亮一档。
   ================================================================== */
@media (prefers-reduced-motion: reduce) {
  /* A 组：入场动画 → 直接到终态 */
  .wl-fade-up,
  .wl2-in,
  .wl2-fade-in,
  .wl-hero,
  .wl-sunrise,
  .wl2-rays {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  /* B 组：循环动画 → 停住，保持设计好的静态样子 */
  .wl2-breath,
  .wl2-drift-far,
  .wl2-drift-near,
  .wl2-glint,
  .wl2-ripple,
  .wl-wave,
  .wl2-sway,
  .wl2-fly,
  .wl2-bird,
  .wl2-rays,
  .wl2-dust-p,
  .wl-title-shine,
  .welcome-start {
    animation: none !important;
  }
  /* 分幕用的内联 animation-delay 也一并清掉 */
  .wl2-in-sky,
  .wl2-in-far,
  .wl2-in-near,
  .wl2-in-land,
  .wl2-in-sea,
  .wl2-in-reflect,
  .wl2-in-shore,
  .wl2-in-bird {
    animation-delay: 0s !important;
  }
}
