/* ============================================================
   念安 NIAN·AN — 宠物云端纪念馆 UI 设计系统
   视觉基底 Token / 交付页样式 / 原型样式
   Version 1.0 · Light-first · WCAG AA
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

/* ============================================================
   1. DESIGN TOKENS — 浅色（默认 · 日间温柔模式）
   ============================================================ */
:root {
  /* — 品牌情绪色 ——————————————————————— */
  --paper:        #F5F1EC;  /* 浅杏米白 · 全站底色 */
  --paper-sunk:   #EFE9E2;  /* 下沉层背景 */
  --mist:         #EAECEF;  /* 薄雾浅灰 · 卡片/分区 */
  --mist-blue:    #B8C8D8;  /* 柔雾奶蓝 · 原色（装饰/肌理用） */
  --mist-blue-t:  #DDE4EB;  /* 柔雾奶蓝 · 淡化（大面积分区） */
  --clay:         #C9B9A8;  /* 暖柔浅棕 · 原色（描边/装饰） */
  --clay-ink:     #7A6448;  /* 暖柔浅棕 · 加深文本版 AA */
  --clay-deep:    #6B5942;  /* 暖褐 · 主按钮底 */
  --clay-deep-h:  #5B4B36;  /* 暖褐 · 按钮 hover */
  --ob-wash:      rgba(122,100,72,.10);  /* 引导页第 4 屏插画底衬（比照 .ob-halo 的淡填充） */
  --rose:         #D9C0C0;  /* 柔粉豆沙 · 原色（关怀提示底） */
  --rose-t:       #F2E7E7;  /* 柔粉豆沙 · 淡化 */
  --rose-ink:     #6E5252;  /* 柔粉豆沙 · 加深文本版 AA */

  /* — 底部导航「重点色块」· 取自甲方提供的图标原色（天蓝 #A3C2E1） ———
     浅蓝在浅底上只有 1.6:1，够不上 WCAG 1.4.11 的 3:1，所以选中态不靠它单打独斗：
     底块 / 描边环 / 标签色三层同时变化，「状态不靠颜色单独表意」。 */
  --tab-emph:       #A3C2E1;                /* 选中图标实色（原色直用，不随主题换） */
  --tab-emph-wash:  rgba(163,194,225,.48);  /* 选中底块 · 上（实测底块/页面 ≈1.17:1） */
  --tab-emph-wash-b:rgba(163,194,225,.22);  /* 选中底块 · 下 */
  --tab-emph-halo:  rgba(163,194,225,.62);  /* 图标背后的光晕 */
  --tab-emph-ring:  rgba(103,138,180,.55);  /* 点击扩散环 */
  --tab-emph-ink:   #47698B;                /* 选中标签文字 5.15:1 */

  /* — 中性暖灰阶（替代纯黑） ————————————— */
  --ink-900: #332E28;  /* 一级标题 */
  --ink-700: #4C443B;  /* 正文 body */
  --ink-500: #6F665B;  /* 次要文字 */
  --ink-400: #8C8275;  /* 辅助/占位（限 ≥18px） */
  --ink-300: #A79C8E;  /* 禁用 / 分隔装饰 */
  --hairline: rgba(51, 46, 40, 0.10);
  --hairline-s: rgba(51, 46, 40, 0.06);
  --on-primary: #FBF8F4;

  /* — 字号阶梯 (1.125 · Major-second-ish) ———————— */
  --fs-2xs: 0.6875rem;  /* 11px 标签 */
  --fs-xs:  0.75rem;    /* 12px 辅助 */
  --fs-sm:  0.875rem;   /* 14px 次要正文 */
  --fs-base:1rem;       /* 16px 正文 */
  --fs-md:  1.125rem;   /* 18px 小标题 */
  --fs-lg:  1.25rem;    /* 20px */
  --fs-xl:  1.5rem;     /* 24px 区块标题 */
  --fs-2xl: 1.875rem;   /* 30px */
  --fs-3xl: clamp(2.25rem, 4.4vw, 3.25rem); /* Hero */

  /* — 字体栈 ————————————————————————— */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", SimSun, Georgia, serif;
  --font-sans:  "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;

  /* — 间距阶梯（4pt 基准） ————————————— */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* — 圆角 ——————————————————————————— */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;

  /* — 阴影（无硬核黑影，暖调扩散） ——————————— */
  --sh-1: 0 1px 2px rgba(51,46,40,.04);
  --sh-2: 0 2px 6px -2px rgba(51,46,40,.08), 0 1px 2px rgba(51,46,40,.04);
  --sh-3: 0 18px 40px -24px rgba(51,46,40,.26), 0 2px 8px -4px rgba(51,46,40,.08);
  --sh-glow: 0 0 0 3px rgba(122,100,72,.10);

  /* — 动效 ——————————————————————————— */
  --ease-out: cubic-bezier(.22,.86,.31,1);      /* 出场·缓和如叹息 */
  --ease-quart: cubic-bezier(.165,.84,.44,1);
  --ease-breath: cubic-bezier(.45,0,.55,1);     /* 呼吸对称 */
  --t-fast: 180ms; --t-base: 320ms; --t-slow: 620ms; --t-breath: 6000ms;

  /* — 交付页用（非产品 token） ————————————— */
  --doc-bg: #F5F1EC;
  --doc-surface: #FBF9F6;
  --device-bg: #2E2A26;
}

/* ============================================================
   2. DESIGN TOKENS — 夜间温柔模式
   ============================================================ */
[data-theme="night"] {
  --paper:      #1B1917;
  --paper-sunk: #161413;
  --mist:       #241F1B;
  --mist-blue:  #3A4149;
  --mist-blue-t:#232629;
  --clay:       #574C3F;
  --clay-ink:   #C3AF94;
  --clay-deep:  #8A7458;
  --clay-deep-h:#9C8567;
  --ob-wash:    rgba(242,236,228,.07);  /* 夜间底衬换成浅色低透明，深底上才看得见 */
  --rose:       #5C4A4A;
  --rose-t:     #221D1D;
  --rose-ink:   #CDB6B6;

  /* 导航选中态：浅蓝在深底上反差反而最好（#A3C2E1 vs #1B1917 = 9.8:1），
     故图标实色日夜一致，只把底块与光晕压暗，避免夜里糊成一块亮斑。 */
  --tab-emph:       #A3C2E1;
  --tab-emph-wash:  rgba(163,194,225,.24);
  --tab-emph-wash-b:rgba(163,194,225,.10);
  --tab-emph-halo:  rgba(163,194,225,.38);
  --tab-emph-ring:  rgba(163,194,225,.50);
  --tab-emph-ink:   #A9C7E6;                /* 选中标签文字 8.9:1 */

  --ink-900: #F2ECE4;
  --ink-700: #DDD5CA;
  --ink-500: #AFA597;
  --ink-400: #8E8478;
  --ink-300: #5E564D;
  --hairline: rgba(242,236,228,.10);
  --hairline-s: rgba(242,236,228,.06);
  --on-primary: #171412;

  --sh-1: 0 1px 2px rgba(0,0,0,.30);
  --sh-2: 0 2px 8px -2px rgba(0,0,0,.40);
  --sh-3: 0 20px 44px -26px rgba(0,0,0,.70);
  --sh-glow: 0 0 0 3px rgba(195,175,148,.14);

  --doc-bg: #131110;
  --doc-surface: #1F1C19;
}

/* ============================================================
   3. BASE
   ============================================================ */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--doc-bg);
  color: var(--ink-700);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 350;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--t-slow) var(--ease-out), color var(--t-slow) var(--ease-out);
}
/* 页面级微光晕（装饰层，不影响交互） */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 600px at 12% -8%, rgba(200,184,166,.20), transparent 62%),
    radial-gradient(760px 520px at 92% 6%, rgba(184,200,216,.18), transparent 60%);
}
[data-theme="night"] body::before {
  background:
    radial-gradient(900px 600px at 12% -8%, rgba(138,116,88,.16), transparent 62%),
    radial-gradient(760px 520px at 92% 6%, rgba(58,65,73,.30), transparent 60%);
}
::selection { background: rgba(122,100,72,.18); color: var(--ink-900); }
:focus-visible { outline: 2px solid var(--clay-ink); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; color: var(--ink-900); line-height: 1.28; }
p { text-wrap: pretty; }

/* ============================================================
   4. LAYOUT
   ============================================================ */
.shell { display: grid; grid-template-columns: 216px minmax(0,1fr); gap: var(--sp-12);
  max-width: 1360px; margin: 0 auto; padding: 0 var(--sp-8) var(--sp-24); position: relative; z-index: 1; }

/* — 侧边索引 — */
.rail { position: sticky; top: 0; height: 100vh; padding: var(--sp-12) 0; }
.rail-brand { margin-bottom: var(--sp-10); }
.rail-mark { font-family: var(--font-serif); font-size: var(--fs-md); color: var(--ink-900); letter-spacing: .16em; }
.rail-sub { font-size: var(--fs-2xs); letter-spacing: .34em; text-transform: uppercase; color: var(--ink-400); margin-top: 2px; }
.rail-nav { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--hairline); }
.rail-link { padding: 7px 0 7px 14px; font-size: var(--fs-sm); color: var(--ink-400); text-decoration: none;
  border-left: 2px solid transparent; margin-left: -1px;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out), padding-left var(--t-fast) var(--ease-out); }
.rail-link:hover { color: var(--ink-700); }
.rail-link.is-active { color: var(--clay-ink); border-left-color: var(--clay-ink); padding-left: 18px; font-weight: 500; }
.rail-foot { position: absolute; bottom: var(--sp-12); font-size: var(--fs-2xs); color: var(--ink-300); letter-spacing: .04em; }

main { padding-top: var(--sp-12); }

/* — 通用区块 — */
.sec { padding: var(--sp-16) 0; border-top: 1px solid var(--hairline-s); }
.sec:first-child { border-top: 0; padding-top: 0; }
.sec-head { display: flex; align-items: baseline; gap: var(--sp-4); margin-bottom: var(--sp-8); }
.sec-index { font-family: var(--font-serif); font-size: var(--fs-xs); color: var(--clay-ink); letter-spacing: .2em; padding-top: 6px; }
.sec-title { font-size: var(--fs-xl); letter-spacing: .04em; }
.sec-lede { max-width: 60ch; color: var(--ink-500); font-size: var(--fs-base); margin-top: calc(var(--sp-2) * -1 + 4px); margin-bottom: var(--sp-10); }

/* ============================================================
   5. HERO
   ============================================================ */
.hero { padding: var(--sp-16) 0 var(--sp-12); position: relative; }
.hero-eyebrow { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.hero-eyebrow span { font-size: var(--fs-2xs); letter-spacing: .38em; text-transform: uppercase; color: var(--ink-400); }
.hero-eyebrow i { display: block; width: 44px; height: 1px; background: var(--clay); }
.hero h1 { font-size: var(--fs-3xl); letter-spacing: .06em; font-weight: 300; line-height: 1.18; }
.hero h1 em { font-style: normal; color: var(--clay-ink); }
.hero-lede { margin-top: var(--sp-6); max-width: 56ch; font-size: var(--fs-md); color: var(--ink-500); line-height: 2; }
.hero-meta { margin-top: var(--sp-10); display: flex; flex-wrap: wrap; gap: var(--sp-8) var(--sp-12); }
.hero-meta div { border-top: 1px solid var(--hairline); padding-top: var(--sp-3); min-width: 150px; }
.hero-meta dt { font-size: var(--fs-2xs); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-400); }
.hero-meta dd { font-family: var(--font-serif); font-size: var(--fs-md); color: var(--ink-900); margin-top: 2px; }

/* ============================================================
   6. 原型舞台（手机 + 注解）
   ============================================================ */
.stage { display: grid; grid-template-columns: 400px minmax(0,1fr); gap: var(--sp-16); align-items: start; }

.stage-device { position: sticky; top: var(--sp-10); }
.devtoolbar { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px;
  border: 1px solid var(--hairline); border-radius: var(--r-pill); background: var(--doc-surface);
  font-size: var(--fs-xs); color: var(--ink-500); letter-spacing: .06em;
  transition: all var(--t-fast) var(--ease-out); }
.chip:hover { border-color: var(--clay); color: var(--ink-900); }
.chip.is-on { background: var(--clay-deep); color: var(--on-primary); border-color: var(--clay-deep); }
.chip svg { width: 13px; height: 13px; }

/* — 手机外壳 — */
.phone {
  position: relative; width: 390px; height: 844px; border-radius: 54px;
  background: var(--device-bg); padding: 12px;
  box-shadow: var(--sh-3), 0 0 0 1px rgba(0,0,0,.06) inset;
}
[data-theme="night"] .phone { background: #000; }
.phone-screen {
  position: relative; width: 100%; height: 100%; border-radius: 43px; overflow: hidden;
  background: var(--paper); color: var(--ink-700);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.7;
  transition: background var(--t-slow) var(--ease-out), color var(--t-slow) var(--ease-out);
  isolation: isolate;
}
/* 原 .phone-notch 已由「灵动岛」.island 取代（见 §20） */

/* ============================================================
   7. APP 通用
   ============================================================ */
.app-scroll { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none; padding-bottom: 96px; }
.app-scroll::-webkit-scrollbar { width: 0; height: 0; }
.app-status { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 26px 4px; font-size: 11px; letter-spacing: .06em; color: var(--ink-500); z-index: 60; position: relative; }
.app-status b { font-weight: 500; }

/* 页面切换 */
.app-page { position: absolute; inset: 0; opacity: 0; pointer-events: none;
  transform: translateY(6px); transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out); }
.app-page.is-active { opacity: 1; pointer-events: auto; transform: none; }

/* 微光呼吸背景 */
.app-aura { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(320px 300px at 78% 4%, rgba(184,200,216,.26), transparent 70%),
    radial-gradient(300px 260px at 6% 22%, rgba(201,185,168,.20), transparent 72%);
  animation: aura var(--t-breath) var(--ease-breath) infinite; }
@keyframes aura { 0%,100% { opacity: .78; } 50% { opacity: 1; } }
[data-theme="night"] .app-aura {
  background: radial-gradient(320px 300px at 78% 4%, rgba(122,100,72,.24), transparent 70%),
              radial-gradient(300px 260px at 6% 22%, rgba(58,65,73,.30), transparent 72%); }

.app-body { position: relative; z-index: 10; padding: 0 26px; }

/* — 通用小件 — */
.kicker { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-400); }
.app-h { font-family: var(--font-serif); font-weight: 400; font-size: 23px; letter-spacing: .05em; color: var(--ink-900); }
.app-h2 { font-family: var(--font-serif); font-weight: 400; font-size: 17px; letter-spacing: .05em; color: var(--ink-900); }
.app-p { font-size: 14px; color: var(--ink-500); line-height: 1.85; }
.divider { height: 1px; background: var(--hairline-s); margin: 22px 0; }

/* — 卡片（柔形无硬影） — */
.acard {
  position: relative; border-radius: var(--r-lg); padding: 18px;
  background: linear-gradient(168deg, rgba(255,255,255,.72), rgba(255,255,255,.34));
  border: 1px solid var(--hairline-s); box-shadow: var(--sh-1);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
}
[data-theme="night"] .acard { background: linear-gradient(168deg, rgba(255,255,255,.055), rgba(255,255,255,.018)); }
.acard:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: rgba(122,100,72,.22); }
.acard:active { transform: scale(.985); }

/* — 图标底座 — */
.ico-badge { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: linear-gradient(160deg, rgba(184,200,216,.36), rgba(201,185,168,.26));
  border: 1px solid rgba(122,100,72,.10); }
.ico-badge svg { width: 21px; height: 21px; stroke: var(--clay-ink); fill: none; stroke-width: 1.25;
  stroke-linecap: round; stroke-linejoin: round; }
/* 甲方原图直接落进列表行（我的订单 / 消息静默）。
   这两张是「大画布 + 极细线」：订单图 186×206 的画布里线宽只有 5.7px。
   按原始细度缩到这儿能用的十几 px，线宽只剩 0.4px —— 覆盖度峰值 0.42，
   整条线淡成灰、糊掉（实测见 _dev/_newicon_thin.py）。
   所以生成时按「目标显示线宽」做了 SDF 加粗：形状 / 比例 / 颜色一概不动，
   只把线宽重定到小尺寸下还能辨的档位。
   生成方 _dev/_rowicon_gen.py，尺寸契约 _dev/_rowicon.json（手改尺寸要同步那边）。
   上色走 var(--clay-ink)：与旁边 .ico-badge svg 的描边同一个 token ——
   日间 #7A6448 与甲方文件墨色 #7B664A 只差 1/255（肉眼无分），
   夜间随 token 转浅；若硬锁原色，夜间会糊在深底上。 */
.row-ico {
  flex: none;
  background-color: var(--clay-ink);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
/* 遮罩里「图形较长边」= 160px，屏幕上正好 13 CSS px，四周各留 2px 安全边 */
.row-ico.ri-order { width: 12.19px; height: 13.33px;
  -webkit-mask-image: url("icons/row-order.png"); mask-image: url("icons/row-order.png"); }
.row-ico.ri-mute { width: 13.33px; height: 11.29px;
  -webkit-mask-image: url("icons/row-mute.png"); mask-image: url("icons/row-mute.png"); }
[data-theme="night"] .ico-badge { background: linear-gradient(160deg, rgba(195,175,148,.16), rgba(138,116,88,.10)); }

/* — 行式列表 — */
.row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--hairline-s); }
.row:last-child { border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 15px; color: var(--ink-900); letter-spacing: .02em; }
.row-sub { font-size: 12.5px; color: var(--ink-400); margin-top: 1px; }
/* 箭头是"这行可点"的唯一视觉提示，--ink-300 只有 2.40:1；提到 --ink-400（3.36:1）达标 */
.row-arrow { width: 16px; height: 16px; stroke: var(--ink-400); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* — 标签 — */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: 11px; letter-spacing: .08em; }
.tag--mist { background: var(--mist-blue-t); color: #4A5461; }
.tag--rose { background: var(--rose-t); color: var(--rose-ink); }
.tag--clay { background: rgba(122,100,72,.10); color: var(--clay-ink); }
[data-theme="night"] .tag--mist { color: #B9C3CE; }
.tag svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 1.4; }

/* ============================================================
   8. 启动页
   ============================================================ */
#p-splash { z-index: 80; }
.splash { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper); }
.splash-in { text-align: center; animation: splashIn 1200ms var(--ease-quart) both; }
@keyframes splashIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* 旧 SVG 版启动插画遗留的两行已删除（`.splash-art { width:168px; animation:breathe }` 与
   `.splash-art svg {…}`）：宽高被下面新版的 .splash-art 覆盖、动画被 `.splash-in > *` 的
   riseIn 覆盖，两行都不生效却会让人读成「整幅在呼吸」，是上一轮已标记的误导性死代码。
   注意 @keyframes breathe **不能删** —— 纪念馆爪印 .mem-paw 还在用。 */
@keyframes breathe { 0%,100% { opacity: .80; transform: scale(.988); } 50% { opacity: 1; transform: scale(1); } }
.splash-title { font-family: var(--font-serif); font-size: 27px; letter-spacing: .34em; color: var(--ink-900); text-indent: .34em; line-height: 1.6; }
.splash-sub { margin-top: 14px; font-size: 12px; letter-spacing: .3em; color: var(--ink-400); text-indent: .3em; }
.splash-dots { display: flex; gap: 6px; justify-content: center; margin-top: 46px; }
.splash-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--clay); animation: dot 2.4s var(--ease-breath) infinite; }
.splash-dots i:nth-child(2) { animation-delay: .25s; } .splash-dots i:nth-child(3) { animation-delay: .5s; }
@keyframes dot { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* ============================================================
   9. 页面一：陪伴（首页）
   ============================================================ */
.greet { padding: 16px 0 4px; }
.greet-date { font-size: 11px; letter-spacing: .26em; color: var(--ink-400); text-transform: uppercase; }
.greet-line { font-family: var(--font-serif); font-size: 21px; letter-spacing: .06em; color: var(--ink-900); margin-top: 8px; line-height: 1.6; }

.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
/* v1.9：四块服务由「上下图文」改为「左右图文」——图案在左、标题与说明在右。
   机身去掉 12px 外壳后再减 26px 版心、12px 栅格间距，单卡内宽只剩约 151px；
   扣掉 11px×2 内边距后，左边给图案、右边才是文字——宽度必须两边一起算。
   所以历史上底座一路从 40px 收到 34px、标题从 14.5px 降到 13.5px —— 否则
   「宠物临终咨询」这类 6 字标题会折成两行，把卡片高度顶成参差。
   （v1.10 起连底座一起撤掉，图案放大到 30px 裸放，详见下方 .ico-img.svc-ico。） */
.svc { display: flex; align-items: center; gap: 9px; padding: 12px 11px; border-radius: var(--r-lg); text-align: left;
  background: linear-gradient(168deg, rgba(255,255,255,.74), rgba(255,255,255,.36));
  border: 1px solid var(--hairline-s); box-shadow: var(--sh-1);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out); }
[data-theme="night"] .svc { background: linear-gradient(168deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); }
.svc:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.svc:active { transform: scale(.98); }
/* v1.10：四块服务的图案放大到 30px，并**撤掉 34px 圆角底座**，让图案直接落在卡面上。
   目的：和底部 Tab Bar 拉开层级——Tab 是"22px 小图标 + 选中时填色块"，这里是"30px 裸图案"，
   一眼就能看出「导航」与「内容」不是同一种东西。
   顺带也解决了宽度问题：去掉底座后文字列反而从 86px 宽到 89px，6 字标题更不容易折行。 */
.ico-img.svc-ico { width: 30px; height: 30px; flex: none; }
.svc-ico.ico-img--consult  { -webkit-mask-image: url("icons/svc-consult-big.png");  mask-image: url("icons/svc-consult-big.png"); }
.svc-ico.ico-img--homecare { -webkit-mask-image: url("icons/svc-homecare-big.png"); mask-image: url("icons/svc-homecare-big.png"); }
.svc-ico.ico-img--funeral  { -webkit-mask-image: url("icons/svc-funeral-big.png");  mask-image: url("icons/svc-funeral-big.png"); }
.svc-ico.ico-img--ceremony { -webkit-mask-image: url("icons/svc-ceremony-big.png"); mask-image: url("icons/svc-ceremony-big.png"); }
.svc-txt { flex: 1; min-width: 0; }
.svc-t { font-size: 13.5px; color: var(--ink-900); letter-spacing: .02em; }
.svc-d { font-size: 11px; color: var(--ink-400); margin-top: 3px; line-height: 1.6; }

/* 关怀横幅 */
.care { margin-top: 16px; display: flex; gap: 13px; align-items: flex-start; padding: 15px 16px; border-radius: var(--r-lg);
  background: var(--rose-t); border: 1px solid rgba(110,82,82,.10); }
.care svg { width: 20px; height: 20px; stroke: var(--rose-ink); fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; flex: none; margin-top: 2px; }
.care-t { font-size: 13.5px; color: var(--rose-ink); letter-spacing: .03em; }
.care-d { font-size: 12px; color: var(--rose-ink); opacity: .82; margin-top: 3px; line-height: 1.75; }

/* 科普 —— v1.11 起缩略图内嵌甲方图标（指南书 / 挥手 / 情绪清单，均带爪印），
   不再是纯色渐变块。图标走 mask + currentColor：跟随 --clay-ink，夜间自动转浅。 */
.know-item { display: flex; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--hairline-s);
  position: relative; transition: transform 180ms var(--ease-out); }
.know-item:last-child { border-bottom: 0; }
/* 悬停底色交给伪元素「出血」到发丝线之外：直接改 padding/margin 会把 1px 分隔线一起推歪 */
.know-item::before { content: ""; position: absolute; inset: 3px -9px; border-radius: 12px;
  background: rgba(201,185,168,.20); opacity: 0; pointer-events: none;
  transition: opacity 200ms var(--ease-out); }
.know-item:hover::before { opacity: 1; }
.know-item:active { transform: scale(.985); }
.know-thumb { width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--mist-blue-t), rgba(201,185,168,.42)); position: relative; overflow: hidden; }
.know-thumb::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 30% 25%, rgba(255,255,255,.55), transparent 70%); }
/* 原图是 3508×2480 的细线插画（笔画仅占画布长边 1.6%~2.4%），
   已在 _dev/_iconfin.py 里按目标线宽做过形态学加粗，28px 下笔画约 1.3px，
   与 21/24/30px 三处自绘图标（1.25~1.75px）粗细一致。 */
.ico-img.know-ico { position: relative; z-index: 1; width: 28px; height: 28px; color: var(--clay-ink);
  transition: transform 320ms var(--ease-quart); }
.know-ico--care     { -webkit-mask-image: url("icons/know-care.png");     mask-image: url("icons/know-care.png"); }
.know-ico--farewell { -webkit-mask-image: url("icons/know-farewell.png"); mask-image: url("icons/know-farewell.png"); }
.know-ico--heal     { -webkit-mask-image: url("icons/know-heal.png");     mask-image: url("icons/know-heal.png"); }
.know-item .row-arrow { transition: transform 200ms var(--ease-out), opacity 200ms var(--ease-out); }
.know-item:hover .know-ico { transform: scale(1.12); }
.know-item:hover .row-arrow { transform: translateX(3px); }
.know-t { font-size: 14px; color: var(--ink-900); }
.know-m { font-size: 11.5px; color: var(--ink-400); margin-top: 2px; letter-spacing: .05em; }

/* 悬浮一键倾诉 */
.fab { position: absolute; right: 20px; bottom: 104px; z-index: 70; width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center; color: var(--on-primary);
  background: linear-gradient(160deg, var(--clay-deep), var(--clay-deep-h));
  box-shadow: 0 14px 28px -14px rgba(107,89,66,.72), 0 0 0 6px rgba(107,89,66,.07);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out); }
.fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 20px 34px -14px rgba(107,89,66,.62), 0 0 0 9px rgba(107,89,66,.09); }
.fab:active { transform: scale(.95); }
.fab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.fab-label { position: absolute; right: 74px; white-space: nowrap; font-size: 11.5px; letter-spacing: .16em;
  color: var(--clay-ink); background: var(--doc-surface); padding: 5px 10px; border-radius: var(--r-pill); box-shadow: var(--sh-1); opacity: 0;
  transform: translateX(6px); transition: all var(--t-base) var(--ease-out); pointer-events: none; }
.fab:hover .fab-label { opacity: 1; transform: none; }

/* ============================================================
   10. 页面二：纪念馆
   ============================================================ */
.mem-cover { position: relative; border-radius: var(--r-xl); overflow: hidden; padding: 22px 20px 20px; min-height: 172px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(150deg, #DDE4EB 0%, #E7E1D8 46%, #F0E4E4 100%); }
[data-theme="night"] .mem-cover { background: linear-gradient(150deg, #2A2E34 0%, #2E2823 46%, #33292A 100%); }
.mem-cover::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 30% 20%, rgba(255,255,255,.55), transparent 70%); pointer-events: none; }
.mem-grain { position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(51,46,40,.055) .6px, transparent .6px); background-size: 4px 4px; }
/* 爪印：甲方第二轮给的线条插画（爪印 + 爱心），直接铺原图 —— 用 background-image
   而不是矢量描边染色，因为甲方明确要「原图本色 + 原图线宽」，不做主题换色。
   ⚠ 路径用 CSS 相对 URL（相对 styles.css 自己，不是相对页面）：这样 index.html、
   _dev 下的探针页、样机克隆页里都能解析到 icons/ 下同一份资产。
   旧版那次事故是 `.mem-paw svg { … }` 落空（svg 内部只有 <use>，没有后代 svg）；
   现在宿主是 <i>，连 svg 都没有了，选择器就是 .mem-paw 本身。 */
/* 它是装饰性水印，不是内容：视线该先落在「豆豆」和那句墓志铭上。
   原画线色 #C9B9A8（暖棕，≈ --clay），在浅底封面上的对比度天生低于原来的饱和蓝，
   所以日间 alpha 要给到 .85 才读得出「有一枚印记」（实测约 1.5:1，比旧版 2.27:1 更含蓄，
   反而更贴近甲方要的「若隐若现」）。夜间封面极暗，暖棕比底亮得多，alpha 必须压住
   才不会糊在暗底上刺眼 —— 沿用 .28（实测约 2.8:1，仍在装饰区间内）。
   判据见 _pawmeasure.py（差分法：与 opacity=0 的参考图逐像素相减）。 */
/* 尺寸按原图宽高比 606:746 = 0.812 给：宽 86px → 高 106px，与旧版那枚爪印的视觉尺寸
   （约 85×87px）同量级。原图线宽约占图案宽度 3.7%，按甲方要求保持原图比例，未做归一化。 */
.mem-paw { position: absolute; right: 10px; top: 12px; width: 86px; height: 106px;
  background: url("icons/mem-paw-heart.png") center / contain no-repeat;
  opacity: .85; }
/* 夜间封面底极暗、爪印比底亮，压 alpha 等于朝底色靠，弱化幅度比日间更大 */
[data-theme="night"] .mem-paw { opacity: .28; }
.mem-name { position: relative; z-index: 2; font-family: var(--font-serif); font-size: 30px; letter-spacing: .1em; color: var(--ink-900); line-height: 1.2; }
.mem-meta { position: relative; z-index: 2; margin-top: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mem-quote { position: relative; z-index: 2; margin-top: 14px; font-size: 12.5px; line-height: 1.9; color: var(--ink-700); opacity: .9;
  border-left: 2px solid var(--clay); padding-left: 10px; }
.mem-lock { position: absolute; top: 16px; right: 16px; z-index: 3; }

/* 六宫格 */
.mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 4px; margin-top: 20px; }
.mem-cell { text-align: center; padding: 12px 2px 10px; border-radius: var(--r-md); cursor: pointer;
  transition: background var(--t-fast) var(--ease-out); }
.mem-cell:hover { background: rgba(122,100,72,.055); }
.mem-cell:active { transform: scale(.96); }
.mem-cell .ico-badge { margin: 0 auto 9px; width: 46px; height: 46px; border-radius: 16px; }
.mem-cell span { display: block; font-size: 11.5px; color: var(--ink-700); letter-spacing: .04em; }

/* 时间线画廊 */
.tl { position: relative; margin-top: 22px; padding-left: 18px; }
.tl::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--hairline), var(--clay), var(--hairline-s)); }
.tl-item { position: relative; padding: 0 0 20px; }
.tl-item::before { content: ""; position: absolute; left: -18px; top: 8px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 1.2px solid var(--clay); box-shadow: 0 0 0 3px var(--paper); }
.tl-year { font-size: 11px; letter-spacing: .24em; color: var(--clay-ink); }
.tl-t { font-size: 14px; color: var(--ink-900); margin-top: 3px; }
.tl-d { font-size: 12.5px; color: var(--ink-500); margin-top: 3px; line-height: 1.8; }

/* 星光打卡 */
.stars { display: flex; gap: 9px; margin-top: 14px; }
.star { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--hairline); background: var(--doc-surface); cursor: pointer;
  transition: all var(--t-base) var(--ease-out); }
.star svg { width: 15px; height: 15px; stroke: var(--ink-300); fill: none; stroke-width: 1.2; stroke-linejoin: round; }
.star.is-lit { border-color: var(--clay); background: rgba(122,100,72,.10); animation: pop 520ms var(--ease-quart); }
.star.is-lit svg { stroke: var(--clay-ink); fill: rgba(122,100,72,.18); }
.star:hover { transform: translateY(-2px); }
@keyframes pop { 0% { transform: scale(.7); } 55% { transform: scale(1.14); } 100% { transform: scale(1); } }

/* ============================================================
   11. 页面三：情绪树洞
   ============================================================ */
.pour { border-radius: var(--r-lg); padding: 16px; background: rgba(255,255,255,.5); border: 1px solid var(--hairline-s); }
[data-theme="night"] .pour { background: rgba(255,255,255,.04); }
.pour textarea { width: 100%; min-height: 88px; resize: none; border: 0; background: none; outline: none;
  font-size: 14px; color: var(--ink-900); line-height: 1.9; }
.pour textarea::placeholder { color: var(--ink-300); }
.pour-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline-s); }
.pour-anon { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-400); letter-spacing: .06em; }
.pour-send { height: 34px; padding: 0 16px; border-radius: var(--r-pill); background: var(--clay-deep); color: var(--on-primary);
  font-size: 12.5px; letter-spacing: .1em; transition: all var(--t-fast) var(--ease-out); }
.pour-send:hover { background: var(--clay-deep-h); }

.quote-card { border-radius: var(--r-lg); padding: 20px 18px; background: linear-gradient(165deg, var(--rose-t), rgba(221,228,235,.45));
  border: 1px solid var(--hairline-s); }
.quote-txt { font-family: var(--font-serif); font-size: 16px; line-height: 2.05; color: var(--ink-900); letter-spacing: .05em; }
.quote-src { margin-top: 12px; font-size: 11.5px; color: var(--ink-400); letter-spacing: .18em; }

.audio { display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: var(--r-lg);
  background: rgba(255,255,255,.52); border: 1px solid var(--hairline-s); }
[data-theme="night"] .audio { background: rgba(255,255,255,.04); }
.audio-play { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1px solid var(--hairline); background: var(--doc-surface); transition: all var(--t-fast) var(--ease-out); }
.audio-play:hover { border-color: var(--clay); transform: scale(1.04); }
.audio-play svg { width: 15px; height: 15px; stroke: var(--clay-ink); fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.audio-wave { flex: 1; display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.audio-wave i { flex: 1; border-radius: 2px; background: var(--clay); opacity: .55; animation: wv 2600ms var(--ease-breath) infinite; }
@keyframes wv { 0%,100% { height: 22%; } 50% { height: 100%; } }
.is-paused .audio-wave i { animation-play-state: paused; opacity: .35; }

/* ============================================================
   12. 页面四：我的
   ============================================================ */
.me-head { display: flex; align-items: center; gap: 15px; padding: 18px 0 22px; }
.me-ava { width: 60px; height: 60px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--mist-blue-t), var(--rose-t)); border: 1px solid var(--hairline-s); }
.me-ava svg { width: 26px; height: 26px; stroke: var(--clay-ink); fill: none; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.me-name { font-family: var(--font-serif); font-size: 19px; letter-spacing: .1em; color: var(--ink-900); }
.me-sub { font-size: 12px; color: var(--ink-400); margin-top: 3px; letter-spacing: .06em; }

.storage-bar { height: 6px; border-radius: var(--r-pill); background: var(--mist); overflow: hidden; margin-top: 10px; }
.storage-bar i { display: block; height: 100%; width: 38%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--clay), var(--clay-ink)); }

.switch { width: 46px; height: 27px; border-radius: var(--r-pill); flex: none; position: relative; cursor: pointer;
  background: var(--mist); border: 1px solid var(--hairline-s); transition: all var(--t-base) var(--ease-out); }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--doc-surface); box-shadow: var(--sh-1); transition: transform var(--t-base) var(--ease-quart), background var(--t-base); }
.switch.is-on { background: var(--clay-deep); border-color: var(--clay-deep); }
.switch.is-on::after { transform: translateX(19px); background: var(--on-primary); }

/* ============================================================
   13. Tab Bar
   ============================================================ */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 75; height: 84px; padding: 8px 14px 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: start;
  background: linear-gradient(to top, var(--paper) 62%, rgba(245,241,236,0));
  backdrop-filter: blur(14px) saturate(1.05); -webkit-backdrop-filter: blur(14px) saturate(1.05); }
[data-theme="night"] .tabbar { background: linear-gradient(to top, var(--paper) 62%, rgba(27,25,23,0)); }
/* 未选中态原用 --ink-300（#A79C8E / 夜 #5E564D），在底色上只有 2.40:1 / 2.43:1，
   低于 WCAG 1.4.11 对图形元素要求的 3:1；再经 1.75px 细线的抗锯齿稀释，实测仅 1.9~2.1:1，
   图标肉眼几乎消失。改为 --ink-500（5.01:1 / 7.22:1），10.5px 标签也一并满足 1.4.3 的 4.5:1。 */
.tab { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 0 4px; color: var(--ink-500);
  transition: color var(--t-fast) var(--ease-out), transform var(--t-base) var(--ease-out); }
.tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--t-base) var(--ease-quart); }
.tab .tab-label { font-size: 10.5px; letter-spacing: .12em;
  transition: color var(--t-fast) var(--ease-out); }
/* v1.11：选中态图标换成甲方提供的天蓝实心图（原色 #A3C2E1 直用）。
   标签必须跟着走同色系加深版 —— 暖褐文字配冷蓝图标会割裂，且天蓝在浅底上只有 1.6:1，
   直接当文字色用读不清；--tab-emph-ink 在日间 5.15:1 / 夜间 8.9:1，均过 AA。 */
.tab.is-active { color: var(--tab-emph-ink); }
.tab.is-active svg { transform: translateY(-1px) scale(1.04); }
.tab.is-active::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--tab-emph); margin-top: 1px; }
.tab:hover { color: var(--ink-700); }
.tab.is-active:hover { color: var(--tab-emph-ink); }
/* 线性图标在 Tab 内已由甲方蒙版图标取代，隐藏原有 ::after 圆点避免双重指示 */
.tabbar .tab.is-active::after { display: none; }

/* 选中色块：圆润底块 + 悬浮光影 + 顶层光晕，随图标一起「弹」出来
   —— 参考微信选中态：图标本身变成实心色块，而不是只换颜色
   v1.11：底块与光晕由暖褐改为与图标同源的天蓝（--tab-emph-wash / -halo），
   否则冷蓝实心图压在暖褐底块上会显脏。 */
.tab-badge { position: relative; display: grid; place-items: center;
  width: 46px; height: 30px; flex: none;
  border-radius: 15px;
  transition: background-color 380ms var(--ease-out), box-shadow 380ms var(--ease-out),
              transform 220ms var(--ease-out); }
/* 图标背后的柔和光晕（选中时淡入） */
.tab-badge::before { content: ""; position: absolute; inset: -4px;
  border-radius: 19px; opacity: 0; transform: scale(.8);
  background: radial-gradient(60% 60% at 50% 45%, var(--tab-emph-halo), transparent 72%);
  transition: opacity 420ms var(--ease-out), transform 520ms var(--ease-quart); }
.tab.is-active .tab-badge { background: linear-gradient(180deg, var(--tab-emph-wash), var(--tab-emph-wash-b));
  box-shadow: 0 2px 8px -3px rgba(90,124,164,.34), inset 0 1px 0 rgba(255,255,255,.62); }
.tab.is-active .tab-badge::before { opacity: 1; transform: none; }
.tab.is-active .tab-badge .tab-ico,
.tab.is-tap .tab-badge .tab-ico { animation: tabFill 520ms var(--ease-quart); }
@keyframes tabFill {
  0%   { transform: scale(.86); }
  52%  { transform: scale(1.06); }
  100% { transform: scale(.94); }
}

/* — 点击手感（v1.11 新增）———————————————
   ① 按下：底块与图标一起「沉」一下（90ms，比页面切换快，才跟手）；
   ② 松开落座：图标弹一次（tabFill），同时底块外扩一圈蓝色描边环（tabRing）。
   环用 .tab-badge::after 画 —— .tab::after 已被「未选中圆点」占用（见上）。 */
.tab:active .tab-badge { transform: scale(.90); transition-duration: 90ms; }
.tab:active .tab-ico { transform: scale(.84); }
.tab-badge::after { content: ""; position: absolute; inset: -1px; border-radius: 16px;
  border: 1.5px solid var(--tab-emph-ring); opacity: 0; pointer-events: none; }
.tab.is-tap .tab-badge::after { animation: tabRing 560ms var(--ease-quart); }
@keyframes tabRing {
  0%   { opacity: 0; transform: scale(.70); }
  28%  { opacity: .85; }
  100% { opacity: 0; transform: scale(1.42); }
}
[data-theme="night"] .tab.is-active .tab-badge { background: linear-gradient(180deg, var(--tab-emph-wash), var(--tab-emph-wash-b));
  box-shadow: 0 2px 10px -4px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.10); }

/* ============================================================
   14. 注解列
   ============================================================ */
.notes { display: flex; flex-direction: column; gap: var(--sp-10); padding-top: 4px; }
.note { border-top: 1px solid var(--hairline); padding-top: var(--sp-5); }
.note-top { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.note-idx { font-family: var(--font-serif); font-size: var(--fs-xs); color: var(--clay-ink); letter-spacing: .16em; }
.note-title { font-size: var(--fs-md); font-family: var(--font-serif); color: var(--ink-900); letter-spacing: .04em; }
.note-body { color: var(--ink-500); font-size: var(--fs-sm); line-height: 1.95; }
.note-body strong { color: var(--ink-700); font-weight: 500; }
.note-list { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: 6px; }
.note-list li { position: relative; padding-left: 15px; font-size: var(--fs-sm); color: var(--ink-500); line-height: 1.85; }
.note-list li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 1px; background: var(--clay); }
.spec-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.spec-pill { font-size: var(--fs-2xs); letter-spacing: .06em; padding: 4px 9px; border-radius: var(--r-sm);
  background: var(--doc-surface); border: 1px solid var(--hairline-s); color: var(--ink-500); font-family: var(--font-sans); }
.spec-pill b { color: var(--ink-900); font-weight: 500; }

/* ============================================================
   15. 色彩系统展示
   ============================================================ */
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: var(--sp-4); }
.sw { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--hairline-s); background: var(--doc-surface); }
.sw-chip { height: 84px; position: relative; }
.sw-chip span { position: absolute; left: 12px; bottom: 9px; font-size: var(--fs-2xs); letter-spacing: .16em;
  color: rgba(51,46,40,.55); text-transform: uppercase; }
.sw-body { padding: 11px 13px 13px; }
.sw-name { font-size: var(--fs-sm); color: var(--ink-900); letter-spacing: .04em; }
.sw-token { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; color: var(--ink-400); margin-top: 2px; }
.sw-hex { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--clay-ink); margin-top: 6px; letter-spacing: .04em; }
.sw-note { font-size: 11px; color: var(--ink-400); margin-top: 5px; line-height: 1.7; }
.warn { display: inline-block; margin-top: 6px; font-size: 11px; color: var(--rose-ink); background: var(--rose-t);
  padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; }

/* ============================================================
   16. 字体 / 间距 / 组件 展示
   ============================================================ */
.spec-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--sp-12); }
.type-sample { border: 1px solid var(--hairline-s); border-radius: var(--r-lg); padding: var(--sp-8); background: var(--doc-surface); }
.type-line { padding: 14px 0; border-bottom: 1px dashed var(--hairline-s); display: flex; align-items: baseline; gap: var(--sp-6); }
.type-line:last-child { border-bottom: 0; }
.type-meta { flex: none; width: 128px; font-size: var(--fs-2xs); color: var(--ink-400); letter-spacing: .08em; line-height: 1.9; }
.type-meta b { display: block; color: var(--clay-ink); font-weight: 500; font-size: 11.5px; }
.type-demo { flex: 1; min-width: 0; }
.t-serif-3xl { font-family: var(--font-serif); font-size: var(--fs-3xl); font-weight: 300; letter-spacing: .06em; color: var(--ink-900); line-height: 1.2; }
.t-serif-xl { font-family: var(--font-serif); font-size: var(--fs-xl); letter-spacing: .06em; color: var(--ink-900); }
.t-serif-md { font-family: var(--font-serif); font-size: var(--fs-md); letter-spacing: .08em; color: var(--ink-900); }
.t-base { font-size: var(--fs-base); line-height: 1.85; color: var(--ink-700); }
.t-sm { font-size: var(--fs-sm); line-height: 1.8; color: var(--ink-500); }
.t-xs { font-size: var(--fs-xs); letter-spacing: .16em; color: var(--ink-400); }

.scale-row { display: flex; align-items: flex-end; gap: var(--sp-3); margin-top: var(--sp-6); flex-wrap: wrap; }
.scale-cell { text-align: center; }
.scale-bar { width: 100%; background: linear-gradient(180deg, var(--clay), rgba(201,185,168,.35)); border-radius: 5px 5px 2px 2px; }
.scale-cap { font-size: 10.5px; color: var(--ink-400); margin-top: 6px; letter-spacing: .04em; }
.scale-cap b { display: block; color: var(--ink-700); font-weight: 500; }

.comp-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: var(--sp-6); align-items: start; }
.comp-unit { }
.comp-label { font-size: var(--fs-2xs); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-400); margin-bottom: var(--sp-3); }
.comp-stack { display: flex; flex-direction: column; gap: var(--sp-3); }

/* 交付页组件演示 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: var(--r-pill); font-size: var(--fs-sm); letter-spacing: .06em;
  transition: all var(--t-fast) var(--ease-out); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--clay-deep); color: var(--on-primary); box-shadow: var(--sh-1); }
.btn--primary:hover { background: var(--clay-deep-h); transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn--primary:active { transform: translateY(0) scale(.985); }
.btn--secondary { background: var(--doc-surface); color: var(--ink-700); border: 1px solid var(--hairline); }
.btn--secondary:hover { border-color: var(--clay); color: var(--ink-900); }
.btn--ghost { background: none; color: var(--clay-ink); }
.btn--ghost:hover { background: rgba(122,100,72,.07); }
.btn--sm { height: 36px; padding: 0 15px; font-size: var(--fs-xs); }
.btn:disabled { opacity: .42; pointer-events: none; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-xs); letter-spacing: .1em; color: var(--ink-500); }
.inp { height: 46px; padding: 0 15px; border-radius: var(--r-md); border: 1px solid var(--hairline);
  background: var(--doc-surface); color: var(--ink-900); font-size: var(--fs-sm); outline: none;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
.inp::placeholder { color: var(--ink-300); }
.inp:focus { border-color: var(--clay-ink); box-shadow: var(--sh-glow); }
.inp.is-error { border-color: var(--rose-ink); }
.inp.is-error:focus { box-shadow: 0 0 0 3px rgba(110,82,82,.12); }
.field-hint { font-size: var(--fs-xs); color: var(--ink-400); }
.field-err { font-size: var(--fs-xs); color: var(--rose-ink); }

.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: var(--sp-3); }
.icon-cell { aspect-ratio: 1; border-radius: var(--r-md); border: 1px solid var(--hairline-s); background: var(--doc-surface);
  display: grid; place-items: center; gap: 6px; transition: all var(--t-fast) var(--ease-out); }
.icon-cell:hover { border-color: var(--clay); transform: translateY(-2px); }
.icon-cell svg { width: 24px; height: 24px; stroke: var(--clay-ink); fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-cell span { font-size: 10.5px; color: var(--ink-400); letter-spacing: .06em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--hairline-s); border-radius: var(--r-md); background: var(--doc-surface); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 560px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--hairline-s); }
th { font-size: var(--fs-2xs); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-400); font-weight: 500; }
td { color: var(--ink-500); }
td:first-child { color: var(--ink-900); }
tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; }
.pass { color: #4E7A57; }
[data-theme="night"] .pass { color: #8FBF9C; }
.fail { color: var(--rose-ink); }

.prin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 1px; background: var(--hairline-s);
  border: 1px solid var(--hairline-s); border-radius: var(--r-lg); overflow: hidden; }
.prin { background: var(--doc-bg); padding: var(--sp-6); }
.prin-n { font-family: var(--font-serif); font-size: var(--fs-xs); color: var(--clay-ink); letter-spacing: .2em; }
.prin-t { font-family: var(--font-serif); font-size: var(--fs-md); color: var(--ink-900); margin: 8px 0 8px; letter-spacing: .05em; }
.prin-d { font-size: var(--fs-sm); color: var(--ink-500); line-height: 1.85; }

/* ============================================================
   17. Footer
   ============================================================ */
.sig { margin-top: var(--sp-20); padding-top: var(--sp-8); border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-6); flex-wrap: wrap; }
.sig-mark { font-family: var(--font-serif); font-size: var(--fs-xl); color: var(--ink-900); letter-spacing: .16em; }
.sig-meta { font-size: var(--fs-xs); color: var(--ink-400); letter-spacing: .1em; line-height: 2; text-align: right; }

/* ============================================================
   17b. 启动页 · 扫墓场景（宠念时光）
   ============================================================ */
.splash { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper); overflow: hidden; }
.splash-halo { position: absolute; width: 440px; height: 440px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(201,185,168,.30), rgba(184,200,216,.16) 48%, transparent 66%);
  animation: haloPulse 7000ms var(--ease-breath) infinite; }
[data-theme="night"] .splash-halo { background: radial-gradient(circle, rgba(138,116,88,.30), rgba(58,65,73,.24) 48%, transparent 66%); }
@keyframes haloPulse { 0%,100% { transform: scale(.90); opacity: .48; } 50% { transform: scale(1.06); opacity: .92; } }

/* 共用插画 —— 甲方线条图切成的 6 层遮罩：各层用 mask 染主题色（跟随 --clay-ink 的日/夜切换），
   彼此独立，所以能分别做动效。图层来源与坐标见 _dev/_splashsplit.py 与 _dev/_splashparts.json
   —— 生成方与校验方共用同一份坐标，不许各猜一套。

   **启动页 .splash-art 与登录页 .lg-art 共用这一套 .sf-* 图层**（两页只差容器尺寸），
   所以图层样式必须写成与容器无关的百分比 —— 换容器就自动跟着缩放。

   前缀从 .sp-* 改成 .sf-* 是修一个真缺陷：服务二级页的滚动容器也叫 .sp-body
   （`flex:1; overflow-y:auto; padding:0 22px 34px`，index.html 里出现 7 次），
   插画层的 .sp-body 因此白沾了那套服务页样式。全局 box-sizing:border-box 让它
   侥幸没露出视觉破绽，但只要哪天给 .sp-body 添一条 margin/background，插画就会
   静默移位 —— 属于「读代码看不出来」的那类耦合。改名后 .sf-* 全局唯一。
   校验脚本会读计算值确认 padding/overflow/flex 回到初始态（见探针的 layers[].padding）。 */
.splash-art, .lg-art { position: relative; aspect-ratio: 3 / 2; }
.splash-art { width: 232px; margin: 0 auto 26px; }
.sf { position: absolute; background-color: var(--clay-ink);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; }
.sf-body   { left: 0;        top: 14.5%;  width: 100%;     height: 85.5%;
  -webkit-mask-image: url("icons/splash-body.png");   mask-image: url("icons/splash-body.png"); }
.sf-halo   { left: 44.3333%; top: 0.5%;   width: 18.1667%; height: 11.5%;
  -webkit-mask-image: url("icons/splash-halo.png");   mask-image: url("icons/splash-halo.png"); }
.sf-wing-l { left: 30.5%;    top: 0;      width: 12.1667%; height: 13.25%;
  -webkit-mask-image: url("icons/splash-wing-l.png"); mask-image: url("icons/splash-wing-l.png"); }
.sf-wing-r { left: 64.1667%; top: 0;      width: 12.1667%; height: 13.25%;
  -webkit-mask-image: url("icons/splash-wing-r.png"); mask-image: url("icons/splash-wing-r.png"); }
.sf-heart  { left: 19.5%;    top: 16.75%; width: 10.6667%; height: 15.25%;
  -webkit-mask-image: url("icons/splash-heart.png");  mask-image: url("icons/splash-heart.png"); }
.sf-flower { left: 11%;      top: 37%;    width: 23%;      height: 37%;
  -webkit-mask-image: url("icons/splash-flower.png"); mask-image: url("icons/splash-flower.png"); }
/* 花要叠两层旋转才摆得不像节拍器：外层带 mask，内层只负责第二个频率 */
.sf-core { position: absolute; inset: 0; background-color: var(--clay-ink);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-image: url("icons/splash-flower.png"); mask-image: url("icons/splash-flower.png"); }

/* ① 鲜花随风飘动 —— 绕茎底端摆。原点 (54%, 98.6%) 就是花茎与台基的接合点，
   所以花怎么摆接缝都不动，不会露缝。两个周期 5.8s : 3.4s 不是整数比，
   合成出来疏密不均 —— 像风，不像节拍器。 */
.sf-flower { transform-origin: 54% 98.6%;
  animation: spSway 5800ms var(--ease-breath) infinite; }
.sf-flower .sf-core { transform-origin: 54% 98.6%;
  animation: spSway2 3400ms var(--ease-breath) infinite; }
@keyframes spSway  { 0%,100% { transform: rotate(-2.2deg); } 50% { transform: rotate(2.2deg); } }
@keyframes spSway2 { 0%,100% { transform: rotate(1.1deg); }  50% { transform: rotate(-1.1deg); } }
/* ② 天使翅膀扇动 —— 绕翼根开合。左右镜像：一只顺时针抬、另一只就逆时针抬，
   合起来才是「两翼同时上下扇」，而不是两只各扇各的。 */
.sf-wing-l { transform-origin: 91.8% 66%; animation: spFlapL 3200ms var(--ease-breath) infinite; }
.sf-wing-r { transform-origin: 9.6% 66%;  animation: spFlapR 3200ms var(--ease-breath) infinite; }
@keyframes spFlapL { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(6.5deg); } }
@keyframes spFlapR { 0%,100% { transform: rotate(3deg); }  50% { transform: rotate(-6.5deg); } }
/* ③ 爱心轻微跳动 —— 双峰（lub-dub）节奏，峰值只放大 9%：是「轻微跳动」，不是弹跳 */
.sf-heart { transform-origin: 50.8% 50%; animation: spBeat 2000ms var(--ease-breath) infinite; }
@keyframes spBeat {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.09); }
  28%      { transform: scale(1); }
  42%      { transform: scale(1.05); }
  56%      { transform: scale(1); }
}

/* 品牌区 —— 甲方要求去掉名字左边的猫爪印，只留中间的名字与副标题 */
.splash-brand { display: flex; align-items: center; justify-content: center; }
/* 更名前是两字名，34px/.42em 是那时的设定。改四字「宠念时光」时带爪印标，收到 30px/.36em。
   现在爪印已按甲方要求移除，容器余量从 14px 放宽到 49px，但字号保持不动 ——
   本轮只要求去掉图标，没要求动字阶，少改少错。 */
.splash-title { font-size: 30px; letter-spacing: .36em; text-indent: .36em; line-height: 1.5; }

/* 启动页 stagger 入场 */
.splash-in > * { animation: riseIn 900ms var(--ease-quart) both; }
.splash-in > *:nth-child(1) { animation-delay: 120ms; }
.splash-in > *:nth-child(2) { animation-delay: 300ms; }
.splash-in > *:nth-child(3) { animation-delay: 460ms; }
.splash-in > *:nth-child(4) { animation-delay: 620ms; }
@keyframes riseIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: none; } }

/* ============================================================
   17c. 新用户引导（Onboarding）
   ============================================================ */
.ob { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 48px 26px 32px; z-index: 10; }
.ob-top { display: flex; justify-content: flex-end; }
.ob-skip { font-size: 12.5px; letter-spacing: .12em; color: var(--ink-400); padding: 7px 12px; border-radius: var(--r-pill);
  transition: all var(--t-fast) var(--ease-out); }
.ob-skip:hover { color: var(--ink-700); background: rgba(122,100,72,.06); }

.ob-stage { flex: 1; position: relative; }
.ob-panel { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; opacity: 0; transform: translateX(16px); pointer-events: none;
  transition: opacity 460ms var(--ease-out), transform 460ms var(--ease-out); }
.ob-panel.is-on { opacity: 1; transform: none; pointer-events: auto; }
.ob-panel.is-out { transform: translateX(-16px); }

.ob-art { width: 232px; margin-bottom: 26px; }
.ob-art svg { width: 100%; height: auto; stroke: var(--clay-ink); fill: none;
  stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.ob-card { fill: rgba(255,255,255,.55); stroke: var(--clay); }
[data-theme="night"] .ob-card { fill: rgba(255,255,255,.05); }
.ob-ph { opacity: .42; }
.ob-ring { stroke: var(--mist-blue); opacity: .55; transform-box: fill-box; transform-origin: center;
  animation: ringPulse 3200ms var(--ease-breath) infinite; }
@keyframes ringPulse { 0%,100% { transform: scale(.94); opacity: .25; } 50% { transform: scale(1.03); opacity: .7; } }
.ob-plus { stroke: var(--clay-ink); stroke-width: 1.5; transform-box: fill-box; transform-origin: center;
  animation: nudge 2400ms var(--ease-breath) infinite; }
@keyframes nudge { 0%,100% { transform: translate(0,0); } 50% { transform: translate(2px,-2px); } }
.ob-tl { stroke: var(--hairline); stroke-width: 1; }
.ob-dot { fill: var(--clay); stroke: none; transform-box: fill-box; transform-origin: center;
  animation: dotPulse 2400ms var(--ease-breath) infinite; animation-delay: var(--d,0ms); }
@keyframes dotPulse { 0%,100% { opacity: .28; transform: scale(1); } 50% { opacity: 1; transform: scale(1.18); } }
.ob-halo { fill: rgba(184,200,216,.28); stroke: none; }
.ob-star { fill: rgba(122,100,72,.16); stroke: var(--clay); transform-box: fill-box; transform-origin: center;
  animation: starSpin 14000ms linear infinite; }
@keyframes starSpin { to { transform: rotate(360deg); } }
/* 第 4 屏插画 v1.12：甲方提供的「小狗趴着被抚摸」线稿，线宽与颜色对齐前 3 屏。
   线宽：源图笔画 15px（内容 989px 宽），在源图分辨率上腐蚀 3px 磨细，按 2× 出资产
         300×194、显示 150×97 → 屏上线宽 1.55px；前 3 屏 SVG 是 1.45px
         （232 容器 / viewBox 200 × stroke-width 1.25），差 7%，肉眼不可分。
         （v1.11 是 200×129 直接落原线宽，屏上 2.34px，比别屏粗 61% —— 一眼两样。）
   颜色：仍走 mask + --clay-ink，与 .ob-art svg 的 stroke 同色。
   底衬：照第 3 屏 .ob-halo 的做法补一层淡底。前 3 屏都是「淡填充 + 深主线」两层，
         第 4 屏原先只有一层实心深线，观感比别屏重，补上才像同一套画。 */
.ob-art--img { display: grid; place-items: center; position: relative; }
.ob-art--img::before { content: ""; position: absolute; left: 50%; top: 50%;
  width: 196px; height: 132px; margin: -66px 0 0 -98px; border-radius: 50%;
  background: var(--ob-wash); animation: obBreathe 3600ms var(--ease-breath) infinite; }
.ob-art--img .ico-img.ob-ico { position: relative; width: 150px; height: 97px; color: var(--clay-ink);
  -webkit-mask-image: url("icons/know-only.png"); mask-image: url("icons/know-only.png"); }
@keyframes obBreathe { 0%,100% { transform: scale(.97); opacity: .72; } 50% { transform: scale(1.02); opacity: 1; } }
.ob-panel.is-on .ob-art--img { animation: stgIn 620ms var(--ease-quart) both; }

.ob-t { font-family: var(--font-serif); font-size: 26px; letter-spacing: .04em; color: var(--ink-900); font-weight: 400; }
.ob-d { margin-top: 14px; font-size: 14.5px; line-height: 1.9; color: var(--ink-500); letter-spacing: .06em; }

/* 短句节奏：标题先落，副句跟上 —— 让「3 秒内读完」成为版式的一部分 */
.ob-panel.is-on .ob-kick { animation: stgIn 520ms var(--ease-quart) both; }
.ob-panel.is-on .ob-t    { animation: stgIn 560ms var(--ease-quart) 90ms both; }
.ob-panel.is-on .ob-d    { animation: stgIn 560ms var(--ease-quart) 190ms both; }

/* — 第 5 屏 · 功能地图 ————————————————— */
.ob-kick { font-size: 10.5px; letter-spacing: .3em; text-indent: .3em; color: var(--clay-ink);
  opacity: .72; margin-bottom: 12px; }
.ob-map { width: 100%; max-width: 308px; margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.ob-map-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-md);
  border: 1px solid var(--hairline); background: var(--doc-surface); text-align: left; }
.ob-map-row.is-core { border-color: var(--clay);
  background: linear-gradient(160deg, rgba(201,185,168,.32), var(--doc-surface) 78%);
  box-shadow: 0 3px 12px -6px rgba(122,100,72,.30); }
/* 蒙版图标靠 currentColor 着色，这里必须显式给色：否则会继承 onboarding 面板的
   正文色，主题一切换就跟着飘。与同格内的 svg 规格（--clay-ink）保持一致。 */
.ob-map-ico { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--hairline-s); color: var(--clay-ink); }
.ob-map-ico svg { width: 18px; height: 18px; stroke: var(--clay-ink); fill: none; stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round; }
.ob-map-txt { min-width: 0; flex: 1; }
.ob-map-t { display: flex; align-items: center; gap: 7px; font-size: 13.5px; letter-spacing: .06em;
  color: var(--ink-900); }
.ob-map-tag { font-style: normal; font-size: 10px; letter-spacing: .12em; padding: 2px 7px;
  border-radius: var(--r-pill); background: var(--clay-deep); color: var(--on-primary); }
.ob-map-s { margin-top: 3px; font-size: 11px; line-height: 1.75; color: var(--ink-400); letter-spacing: .01em; }
.ob-first { margin-top: 20px; display: flex; align-items: center; gap: 8px; max-width: 300px;
  font-size: 12px; line-height: 1.85; color: var(--ink-500); text-align: left; }
.ob-first svg { width: 14px; height: 14px; flex: none; stroke: var(--clay-ink); fill: none; stroke-width: 1.3;
  stroke-linecap: round; stroke-linejoin: round; }
.ob-first b { color: var(--clay-ink); font-weight: 500; }

/* 功能地图逐行浮现 */
.ob-panel.is-on .ob-map-row { animation: stgIn 560ms var(--ease-quart) both; }
.ob-panel.is-on .ob-map-row:nth-child(1) { animation-delay: 230ms; }
.ob-panel.is-on .ob-map-row:nth-child(2) { animation-delay: 300ms; }
.ob-panel.is-on .ob-map-row:nth-child(3) { animation-delay: 370ms; }
.ob-panel.is-on .ob-map-row:nth-child(4) { animation-delay: 440ms; }
.ob-panel.is-on .ob-first { animation: stgIn 620ms var(--ease-quart) both; animation-delay: 560ms; }

/* 指示点不再待在左下角的底栏里 —— 它现在跟着每一屏的内容流，落在最后一句的正下方
   居中（.ob-panel 本身是 align-items:center，所以这里不用再写居中）。
   用 <button> 而不是 <i>：去掉「下一步」后，圆点就是跳页的唯一显式入口，
   必须能聚焦、能用键盘操作，点击区域也要够大（见下方 ::before 撑开的 24px 触控区）。 */
.ob-dots { display: flex; gap: 7px; margin-top: 26px; }
.ob-dots button { width: 6px; height: 6px; border: 0; padding: 0; cursor: pointer;
  border-radius: 999px; background: var(--ink-300); position: relative;
  transition: width 460ms var(--ease-quart), background 460ms var(--ease-out); }
/* 6px 的点点太小按不到，用伪元素把可点区域撑到 24px —— 视觉尺寸不变 */
.ob-dots button::before { content: ""; position: absolute; left: 50%; top: 50%;
  width: 24px; height: 24px; transform: translate(-50%, -50%); }
.ob-dots button.is-on { width: 24px; background: var(--clay-ink); }
.ob-dots button:focus-visible { outline: 2px solid var(--clay-ink); outline-offset: 3px; }

/* ============================================================
   白噪音播放器（二级页 #sp-audio）
   ============================================================ */
/* 封面：雾蓝渐变 + 两圈呼吸环。环只在播放时转 —— 暂停是默认状态，
   静止的封面才符合「不催促」的调性。 */
.pl-art { position: relative; width: 176px; height: 176px; margin: 22px auto 0;
  display: grid; place-items: center; }
.pl-art-disc { position: relative; z-index: 2; width: 128px; height: 128px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(155deg, #B9CBDD 0%, #A8BCD2 44%, #C3C6CE 100%);
  box-shadow: 0 10px 26px rgba(90,104,120,.22), inset 0 1px 0 rgba(255,255,255,.5); }
.pl-art-disc svg { width: 46px; height: 46px; stroke: #FFFFFF; fill: none; stroke-width: 1.2;
  stroke-linecap: round; stroke-linejoin: round; opacity: .92; }
.pl-art-ring { position: absolute; left: 50%; top: 50%; width: 128px; height: 128px;
  margin: -64px 0 0 -64px; border-radius: 50%; border: 1px solid var(--mist-blue);
  opacity: 0; pointer-events: none; }
.pl-art-ring--2 { animation-delay: 1300ms; }
.pl-art.is-playing .pl-art-ring { animation: plRing 4200ms var(--ease-breath) infinite; }
@keyframes plRing {
  0%   { transform: scale(1);    opacity: .42; }
  70%  { transform: scale(1.62); opacity: 0; }
  100% { transform: scale(1.62); opacity: 0; }
}

.pl-meta { margin-top: 22px; text-align: center; }
.pl-t { font-family: var(--font-serif); font-size: 22px; letter-spacing: .08em; color: var(--ink-900); font-weight: 400; }
.pl-s { margin-top: 6px; font-size: 11.5px; letter-spacing: .1em; color: var(--ink-400); }

/* 进度条 3px：白噪音不需要精确拖拽，细一点才不会变成「任务进度」 */
.pl-bar { position: relative; margin-top: 26px; padding: 12px 0; cursor: pointer; }
.pl-bar:focus-visible { outline: 2px solid var(--clay-ink); outline-offset: 4px; border-radius: 4px; }
.pl-bar-track { height: 3px; border-radius: 999px; background: rgba(122,100,72,.16); overflow: hidden; }
.pl-bar-fill { width: 0; height: 100%; border-radius: 999px; background: var(--clay-ink);
  transition: width 260ms linear; }
.pl-bar-knob { position: absolute; top: 50%; left: 0; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%; background: var(--clay-ink); box-shadow: 0 1px 4px rgba(90,72,50,.3);
  transition: left 260ms linear; }
.pl-time { margin-top: 2px; display: flex; justify-content: space-between;
  font-size: 11px; letter-spacing: .06em; color: var(--ink-300); font-variant-numeric: tabular-nums; }

.pl-ctrl { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 26px; }
.pl-skip { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--hairline); color: var(--ink-500);
  transition: all var(--t-fast) var(--ease-out); }
.pl-skip:hover { border-color: var(--clay); color: var(--clay-ink); }
.pl-skip:active { transform: scale(.94); }
.pl-skip svg { width: 17px; height: 17px; stroke: currentColor; fill: currentColor; stroke-width: 0; }
.pl-play { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: var(--clay-deep); color: var(--on-primary); border: 0;
  box-shadow: var(--sh-1); transition: all var(--t-fast) var(--ease-out); }
.pl-play:hover { background: var(--clay-deep-h); transform: translateY(-1px); box-shadow: var(--sh-2); }
.pl-play:active { transform: scale(.96); }
.pl-play svg { width: 22px; height: 22px; stroke: none; fill: currentColor; }

.pl-vol { margin-top: 24px; display: flex; align-items: center; gap: 11px; }
.pl-vol-ico { width: 15px; height: 15px; flex: none; stroke: var(--ink-400); fill: none;
  stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.pl-vol-range { flex: 1; -webkit-appearance: none; appearance: none; height: 22px; background: transparent; }
.pl-vol-range::-webkit-slider-runnable-track { height: 3px; border-radius: 999px; background: rgba(122,100,72,.16); }
.pl-vol-range::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5px;
  border-radius: 50%; background: var(--clay-ink); box-shadow: 0 1px 4px rgba(90,72,50,.28); }
.pl-vol-range::-moz-range-track { height: 3px; border-radius: 999px; background: rgba(122,100,72,.16); }
.pl-vol-range::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--clay-ink); }

/* 曲目列表：给了「上一首 / 下一首」，还得能直接选 ——
   三首里想听第二首，不该被迫连点两次下一首。 */
.pl-list { margin-top: 26px; display: flex; flex-direction: column; gap: 6px; }
.pl-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px;
  border-radius: var(--r-md); border: 1px solid transparent; background: transparent;
  text-align: left; transition: all var(--t-fast) var(--ease-out); }
.pl-row:hover { background: rgba(122,100,72,.05); }
.pl-row.is-on { border-color: var(--clay); background: rgba(122,100,72,.06); }
.pl-row-ico { width: 17px; height: 17px; flex: none; stroke: var(--ink-400); fill: none;
  stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.pl-row.is-on .pl-row-ico { stroke: var(--clay-ink); }
.pl-row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pl-row-main b { font-size: 13px; font-weight: 500; letter-spacing: .06em; color: var(--ink-800); }
.pl-row-main em { font-style: normal; font-size: 11px; letter-spacing: .04em; color: var(--ink-400); }
.pl-row.is-on .pl-row-main b { color: var(--clay-ink); }

.pl-note { margin-top: 22px; text-align: center; font-size: 11.5px; line-height: 1.9;
  letter-spacing: .06em; color: var(--ink-300); }

/* 「减少动态效果」下不该有呼吸环在转 */
@media (prefers-reduced-motion: reduce) {
  .pl-art.is-playing .pl-art-ring { animation: none; opacity: .3; }
}

/* ============================================================
   17d. 登录页
   ============================================================ */
.lg-back { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; margin: 8px 0 0 -6px;
  border: 1px solid var(--hairline); background: var(--doc-surface); transform: rotate(180deg);
  transition: all var(--t-fast) var(--ease-out); }
.lg-back:hover { border-color: var(--clay); transform: rotate(180deg) translateX(2px); }
.lg-back svg { width: 16px; height: 16px; stroke: var(--ink-500); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.lg-head { text-align: center; margin-top: 12px; }
/* 图标本体（背景图、尺寸比例）与顶栏 .wb-mark 共用一条规则，见下方「App 图标」样式块；
   这里只管登录页特有的间距与浮动。 */
.lg-mark { width: 54px; height: 54px; margin: 0 auto; display: block;
  animation: markFloat 5200ms var(--ease-breath) infinite; }
@keyframes markFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.lg-title { font-family: var(--font-serif); font-size: 26px; letter-spacing: .36em; text-indent: .36em;
  color: var(--ink-900); margin-top: 15px; line-height: 1.5; }
.lg-slogan { margin-top: 9px; font-size: 12px; letter-spacing: .28em; color: var(--ink-400); }

/* 登录页插画 —— 与启动页**同一幅** 6 层遮罩插画（同一套 .sf-* 图层与三个动效），
   只差容器尺寸；尺寸别在这儿写死成 mask 的绝对值，遮罩层是百分比定位，换宽度会自动等比缩放。
   宽度取 232px 与启动页一致：同一幅图在两页以同一尺寸出现，视觉上才是「同一个图形」。
   原先是内联 SVG（石头 + 爪印 + 烛焰 + 微光粒子，viewBox 200x92），已整体撤掉。 */
.lg-art { width: 232px; margin: 18px auto 8px; }

.lg-ways { margin-top: 22px; }

/* 三大主入口：圆形图标 */
.lg-circles { display: flex; justify-content: center; gap: 26px; }
.lg-circ { display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 0; border: 0; background: none; }
.lg-circ-ico { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--doc-surface); border: 1px solid var(--hairline); position: relative;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-fast) var(--ease-out); }
.lg-circ-ico::before { content: ""; position: absolute; inset: -7px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(122,100,72,.15), transparent 68%);
  opacity: 0; transform: scale(.88); transition: all 620ms var(--ease-out); }
.lg-circ:hover .lg-circ-ico { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--clay); }
.lg-circ:hover .lg-circ-ico::before { opacity: 1; transform: none; }
.lg-circ:active .lg-circ-ico { transform: scale(.95); }
.lg-circ-ico svg { position: relative; width: 23px; height: 23px; stroke: var(--clay-ink); fill: none;
  stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.lg-circ-t { font-size: 12px; letter-spacing: .1em; color: var(--ink-400);
  transition: color var(--t-fast) var(--ease-out); }
.lg-circ:hover .lg-circ-t { color: var(--clay-ink); }
.lg-circ:focus-visible .lg-circ-ico { outline: 2px solid var(--clay-ink); outline-offset: 3px; }

/* 其他方式：折叠入口 */
.lg-more { display: flex; align-items: center; gap: 6px; margin: 20px auto 0; padding: 4px 2px;
  font-size: 12.5px; letter-spacing: .1em; color: var(--ink-400);
  border-bottom: 1px solid transparent; transition: all var(--t-fast) var(--ease-out); }
.lg-more:hover { color: var(--clay-ink); border-bottom-color: var(--clay); }
.lg-more-chev { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg);
  transition: transform 460ms var(--ease-out); }
.lg-more.is-open .lg-more-chev { transform: rotate(-90deg); }

/* 折叠面板：邮箱 / Apple ID */
.lg-alt { max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 480ms var(--ease-quart), opacity 340ms var(--ease-out), margin-top 480ms var(--ease-quart); }
.lg-alt.is-open { max-height: 168px; opacity: 1; margin-top: 12px; }
.lg-alt-in { display: flex; flex-direction: column; gap: 9px; }
.lg-alt-btn { display: flex; align-items: center; justify-content: center; gap: 9px; height: 46px;
  border-radius: var(--r-pill); border: 1px solid var(--hairline); background: var(--doc-surface);
  color: var(--ink-900); font-size: 13.5px; letter-spacing: .06em; position: relative; overflow: hidden;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-fast) var(--ease-out); }
.lg-alt-btn:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--clay); }
.lg-alt-btn:active { transform: scale(.98); }
.lg-alt-btn::before { content: ""; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(122,100,72,.16), transparent 62%);
  transition: opacity 620ms var(--ease-out); }
.lg-alt-btn:active::before { opacity: 1; transition-duration: 80ms; }
.lg-alt-btn--apple { background: var(--ink-900); color: var(--paper); border-color: transparent; }
.lg-alt-btn--apple::before { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.18), transparent 62%); }
.lg-ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.3;
  stroke-linecap: round; stroke-linejoin: round; }

.lg-agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; cursor: pointer; }
.lg-check { width: 19px; height: 19px; flex: none; margin-top: 2px; border-radius: 6px; display: grid; place-items: center;
  border: 1px solid var(--hairline); background: var(--doc-surface); transition: all 320ms var(--ease-out); }
.lg-check svg { width: 11px; height: 11px; stroke: var(--on-primary); fill: none; stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.4);
  transition: all 320ms var(--ease-quart); }
.lg-check.is-on { background: var(--clay-deep); border-color: var(--clay-deep); }
.lg-check.is-on svg { opacity: 1; transform: none; }
.lg-agree-t { font-size: 11.5px; line-height: 1.9; color: var(--ink-400); }
.lg-agree-t a { color: var(--clay-ink); text-decoration: none; border-bottom: 1px solid rgba(122,100,72,.38); }
.lg-foot { text-align: center; margin-top: 24px; font-size: 11.5px; line-height: 2; color: var(--ink-300); letter-spacing: .12em; }

/* ============================================================
   17d-2. 登录方式页（微信 / QQ / 手机号 —— 可真实输入）
   这三个页面是独立于登录页的整屏页面，不是覆盖层二级页：
   输入框要能真的打字、真的校验，所以不能复用 .subpage 的浮层容器。
   ============================================================ */
.lw-head { text-align: center; margin-top: 18px; }
.lw-badge { width: 58px; height: 58px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--mist-blue-t), var(--rose-t));
  border: 1px solid var(--hairline-s); animation: markFloat 5200ms var(--ease-breath) infinite; }
.lw-badge svg { width: 24px; height: 24px; stroke: var(--clay-ink); fill: none; stroke-width: 1.15;
  stroke-linecap: round; stroke-linejoin: round; }
.lw-title { margin-top: 14px; font-family: var(--font-serif); font-size: 21px; letter-spacing: .2em;
  text-indent: .2em; color: var(--ink-900); font-weight: 500; }
.lw-sub { margin-top: 8px; font-size: 12px; letter-spacing: .08em; color: var(--ink-400); }

.lw-form { margin-top: 30px; }
.lw-field { display: block; position: relative; }
.lw-field + .lw-field { margin-top: 16px; }
.lw-lab { display: block; margin-bottom: 8px; font-size: 11.5px; letter-spacing: .14em; color: var(--ink-500); }
.lw-in { width: 100%; height: 50px; padding: 0 16px; border-radius: var(--r-md);
  background: var(--doc-surface); border: 1px solid var(--hairline); color: var(--ink-900);
  font-size: 15px; letter-spacing: .04em;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out); }
/* 系统里其它 placeholder 用 --ink-300（2.6:1，不达 AA）。登录页要真的打字，
   提示得看得清，这里提到 --ink-500（5.4:1）；与已输入文字 --ink-900 仍有明显明度差。 */
.lw-in::placeholder { color: var(--ink-500); letter-spacing: .04em; }
/* 不能用 outline: none 了事 —— 键盘用户仍需看得见焦点，用暖调光环代替 */
.lw-in:focus { outline: none; border-color: var(--clay); box-shadow: var(--sh-glow); }
.lw-field.is-err .lw-in { border-color: var(--rose-ink); }
.lw-err { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.6; color: var(--rose-ink);
  opacity: 0; transform: translateY(-3px); pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out); }
.lw-field.is-err .lw-err { opacity: 1; transform: none; }

/* 验证码：输入框右侧留出发码按钮的位置，按钮绝对定位到框内右端 */
.lw-sms-row { display: block; position: relative; }
.lw-in--sms { padding-right: 108px; }
.lw-sms { position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  height: 38px; padding: 0 13px; border-radius: var(--r-sm); font-size: 12px; letter-spacing: .06em;
  color: var(--clay-ink); background: var(--mist); border: 1px solid var(--hairline-s);
  transition: all var(--t-fast) var(--ease-out); }
.lw-sms:hover { border-color: var(--clay); background: var(--mist-blue-t); }
.lw-sms:active { transform: translateY(-50%) scale(.97); }
.lw-sms:disabled { color: var(--ink-300); background: transparent; cursor: default; }

.lw-go { width: 100%; height: 50px; margin-top: 26px; border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center;
  background: var(--clay-deep); color: var(--on-primary); font-size: 15px; letter-spacing: .3em;
  text-indent: .3em; box-shadow: var(--sh-1);
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out), opacity var(--t-fast) var(--ease-out); }
.lw-go:hover { background: var(--clay-deep-h); transform: translateY(-1px); box-shadow: var(--sh-2); }
.lw-go:active { transform: translateY(0) scale(.985); }
/* 提交中：只降透明度，不做旋转 loading —— 那会打断"温柔"的调子 */
.lw-go.is-busy { opacity: .66; pointer-events: none; }

.lw-alt { display: flex; justify-content: space-between; margin-top: 18px; padding: 0 2px; }
.lw-link { font-size: 12px; letter-spacing: .06em; color: var(--ink-400); padding: 4px 0;
  transition: color var(--t-fast) var(--ease-out); }
.lw-link:hover { color: var(--clay-ink); }
.lw-foot { text-align: center; margin-top: 26px; font-size: 11.5px; line-height: 2;
  color: var(--ink-300); letter-spacing: .1em; }

/* 夜间：输入框底色跟着 --doc-surface 走，不需要单独兜底；
   唯独 .lw-sms 用了 --mist，夜里对比度偏低，单独压深一档。 */
[data-theme="night"] .lw-sms { background: var(--paper-sunk); border-color: var(--hairline); }

@media (prefers-reduced-motion: reduce) {
  .lw-badge { animation: none; }
}

/* ============================================================
   17e. 界面动效系统（全局增强）
   ============================================================ */

/* 页面内元素依次浮现 */
.app-page.is-active .app-body > * { animation: stgIn 620ms var(--ease-quart) both; }
.app-page.is-active .app-body > *:nth-child(1) { animation-delay: 60ms; }
.app-page.is-active .app-body > *:nth-child(2) { animation-delay: 140ms; }
.app-page.is-active .app-body > *:nth-child(3) { animation-delay: 220ms; }
.app-page.is-active .app-body > *:nth-child(4) { animation-delay: 300ms; }
.app-page.is-active .app-body > *:nth-child(5) { animation-delay: 380ms; }
.app-page.is-active .app-body > *:nth-child(6) { animation-delay: 460ms; }
.app-page.is-active .app-body > *:nth-child(n+7) { animation-delay: 520ms; }
@keyframes stgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* 引导页与登录页不适用列表 stagger（其内部自带节奏） */
#p-onboard .app-body > *, #p-login .app-body > * { animation: none; }
#p-login.is-active .lg-head, #p-login.is-active .lg-art,
#p-login.is-active .lg-agree, #p-login.is-active .lg-foot {
  animation: stgIn 640ms var(--ease-quart) both; }
#p-login.is-active .lg-head  { animation-delay: 80ms; }
#p-login.is-active .lg-art   { animation-delay: 180ms; }
#p-login.is-active .lg-agree { animation-delay: 470ms; }
#p-login.is-active .lg-foot  { animation-delay: 540ms; }
/* 三个圆形入口依次浮现，替代整块 .lg-ways 的统一进场 */
#p-login.is-active .lg-circ { animation: stgIn 620ms var(--ease-quart) both; }
#p-login.is-active .lg-circ:nth-child(1) { animation-delay: 300ms; }
#p-login.is-active .lg-circ:nth-child(2) { animation-delay: 380ms; }
#p-login.is-active .lg-circ:nth-child(3) { animation-delay: 460ms; }
#p-login.is-active .lg-more { animation: stgIn 620ms var(--ease-quart) both; animation-delay: 540ms; }

/* 卡片柔光扫过 */
.svc { position: relative; overflow: hidden; }
.svc::after { content: ""; position: absolute; top: -10%; left: -70%; width: 45%; height: 120%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-14deg); opacity: 0; pointer-events: none; }
.svc:hover::after { opacity: 1; animation: sheen 900ms var(--ease-out); }
[data-theme="night"] .svc::after { background: linear-gradient(100deg, transparent, rgba(255,255,255,.10), transparent); }
@keyframes sheen { from { left: -70%; } to { left: 130%; } }

/* 悬浮键向外扩散的光环 */
.fab::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--clay-ink);
  opacity: 0; pointer-events: none; animation: fabPulse 3800ms var(--ease-out) infinite; }
@keyframes fabPulse { 0% { transform: scale(1); opacity: .34; } 65% { transform: scale(1.62); opacity: 0; } 100% { opacity: 0; } }

/* Tab 图标切换动效 */
.tab.is-active svg { animation: tabPop 560ms var(--ease-quart); }
@keyframes tabPop { 0% { transform: scale(.84) rotate(-8deg); } 58% { transform: scale(1.1) rotate(2deg); } 100% { transform: scale(1) rotate(0); } }

/* 纪念馆封面纹理缓慢漂移 */
.mem-grain { animation: grainDrift 18000ms linear infinite; }
@keyframes grainDrift { 0% { background-position: 0 0; } 100% { background-position: 40px 40px; } }
.mem-paw { animation: breathe 7000ms var(--ease-breath) infinite; }

/* 时间线节点依次亮起 */
.tl-item::before { animation: nodeBlink 3200ms var(--ease-breath) infinite; }
.tl-item:nth-child(1)::before { animation-delay: 0ms; }
.tl-item:nth-child(2)::before { animation-delay: 700ms; }
.tl-item:nth-child(3)::before { animation-delay: 1400ms; }
@keyframes nodeBlink { 0%,100% { box-shadow: 0 0 0 3px var(--paper); } 50% { box-shadow: 0 0 0 5px rgba(122,100,72,.10); } }

/* Toast（温柔提示） */
/* z-index 必须高于 .subpage(200) 与 .fly(210)：二级页里点主行动按钮同样会弹 toast，
   若沿用一级页的 96 会被二级页整层盖住，用户点完看不到任何反馈。 */
.toast { position: absolute; left: 50%; bottom: 118px; z-index: 260; padding: 11px 20px; border-radius: var(--r-pill);
  background: var(--ink-900); color: var(--paper); font-size: 12.5px; letter-spacing: .08em; white-space: nowrap;
  box-shadow: var(--sh-3); opacity: 0; transform: translate(-50%, 14px); pointer-events: none;
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out); }
.toast.is-on { opacity: .96; transform: translate(-50%, 0); }

/* 骨架加载 */
.sk { border-radius: 8px; background: linear-gradient(90deg, var(--mist) 22%, rgba(255,255,255,.62) 46%, var(--mist) 70%);
  background-size: 220% 100%; animation: shim 1700ms linear infinite; }
[data-theme="night"] .sk { background: linear-gradient(90deg, var(--mist) 22%, rgba(255,255,255,.08) 46%, var(--mist) 70%); background-size: 220% 100%; }
@keyframes shim { from { background-position: 120% 0; } to { background-position: -20% 0; } }

/* 交付页滚动进场 */
.rise { opacity: 0; transform: translateY(20px);
  transition: opacity 760ms var(--ease-quart), transform 760ms var(--ease-quart); }
.rise.is-in { opacity: 1; transform: none; }

/* ============================================================
   18. 响应式
   ============================================================ */
@media (max-width: 1180px) {
  .stage { grid-template-columns: 1fr; gap: var(--sp-12); }
  .stage-device { position: static; display: flex; flex-direction: column; align-items: center; }
  .spec-grid { grid-template-columns: 1fr; gap: var(--sp-10); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; gap: 0; padding: 0 var(--sp-5) var(--sp-16); }
  .rail { position: static; height: auto; padding: var(--sp-8) 0 var(--sp-6); display: flex; align-items: center; gap: var(--sp-6); flex-wrap: wrap; }
  .rail-brand { margin: 0; }
  .rail-nav { flex-direction: row; flex-wrap: wrap; border-left: 0; gap: var(--sp-1); }
  .rail-link { border-left: 0; border-bottom: 2px solid transparent; padding: 4px 8px; margin: 0; }
  .rail-link.is-active { border-bottom-color: var(--clay-ink); padding-left: 8px; }
  .rail-foot { display: none; }
  main { padding-top: 0; }
}
@media (max-width: 460px) {
  .phone { width: 100%; max-width: 352px; height: 760px; }
  .hero-meta { gap: var(--sp-6); }
  .hero-meta div { min-width: 128px; }
  .svc-grid { gap: 10px; }
  .mem-grid { gap: 6px 2px; }
  /* v1.10：卡片里的图案不再装在 32px 底座里，改为裸放并收到 26px；
     窄屏下本体再次可以让出一个底座的宽度给标题，所以只需 rows 的上限值。
     图标尺寸的窄屏版统一写在样式表末尾（@media 不增加特异性，写在这里会被反盖）。 */
  .svc { gap: 8px; padding: 12px 10px; }
  .svc-t { font-size: 12.5px; letter-spacing: 0; }
  .svc-d { font-size: 10.5px; }
}

/* 动效敏感用户 / 系统减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   19. 交互工作台布局（单屏整合 · 无分页）
   ============================================================ */
html, body { height: 100%; }
body { overflow: hidden; }

.wb { --ph: .78; position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }

/* — 顶栏 — */
.wb-top { flex: none; height: 60px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid var(--hairline); background: rgba(251,249,246,.72); backdrop-filter: blur(14px); }
.wb-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
/* App 图标：甲方原图**整块**导入 —— 自带蓝→米白纵向渐变底，线稿是原图的陶土/蓝，
   一个像素都不改色。顶栏 .wb-mark 与登录页 .lg-mark 共用下面这一条 background：
   图片、比例、定位只有这一份，两处只差盒子尺寸（34px / 54px）。
   生成方 _dev/_iconimport.py：按原图 alpha 包围盒裁到方块（1533×1526）→ 补齐透明区
   残留 RGB → 预乘 alpha 缩放，输出 icons/app-icon-tile.png 512×510。
   比例 1533:1526 保住不做正方化 —— 拉成正方形会把圆形圆角拉成椭圆。 */
.wb-mark, .lg-mark {
  display: block;
  background: url("icons/app-icon-tile.png") center / contain no-repeat;
  /* 圆角来自图片自身的 alpha（占方块宽 8.09%，与甲方原图一致）。
     box 上不要再写 border-radius：只要比 8.09% 小，就会把方块四角切掉一块。 */
  border-radius: 0;
}
/* ⚠ 这两处不得加 filter / opacity / 主题色覆盖：图标是一个整体色（甲方原图），
   按主题调色就破了「颜色不变」这条契约 —— 回归里有一条负向用例专门盯它。 */
.wb-mark { width: 34px; height: 34px; flex: none; }
.wb-bt { display: flex; align-items: baseline; gap: 9px; flex: none; }
.wb-bt strong { font-family: var(--font-serif); font-size: 19px; letter-spacing: .14em; color: var(--ink-900); font-weight: 400; }
.wb-bt em { font-style: normal; font-size: 10.5px; letter-spacing: .26em; color: var(--clay-ink); opacity: .8; }
.wb-bs { font-size: 12px; color: var(--ink-400); letter-spacing: .04em; padding-left: 14px; border-left: 1px solid var(--hairline);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-act { display: flex; align-items: center; gap: 10px; flex: none; }
.wb-tip { font-size: 11.5px; color: var(--clay-ink); letter-spacing: .08em; padding: 5px 11px; border-radius: var(--r-pill);
  background: rgba(201,185,168,.22); border: 1px solid var(--hairline-s); white-space: nowrap;
  transition: opacity 900ms var(--ease-out); }
.wb-tip.is-dim { opacity: .3; }

/* — 三栏主体 — */
.wb-main { flex: 1; min-height: 0; display: grid; gap: 16px; padding: 16px 18px;
  grid-template-columns: 296px minmax(0, 1fr) 372px; }
.wb-col { min-height: 0; display: flex; flex-direction: column; border-radius: 22px;
  background: rgba(251,249,246,.66); border: 1px solid var(--hairline); overflow: hidden; }
[data-theme="night"] .wb-col { background: rgba(255,255,255,.04); }
.col-head { flex: none; height: 46px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--hairline-s); }
.col-t { font-size: 12px; letter-spacing: .2em; color: var(--ink-500); }
.col-n { font-size: 11px; letter-spacing: .1em; color: var(--ink-400); }
.col-x { font-size: 11.5px; letter-spacing: .06em; color: var(--clay-ink); padding: 5px 10px; border-radius: var(--r-pill);
  border: 1px solid transparent; transition: all var(--t-fast) var(--ease-out); }
.col-x:hover { background: rgba(122,100,72,.08); border-color: var(--hairline); }
.col-foot { flex: none; padding: 9px 16px; font-size: 11px; color: var(--ink-300); letter-spacing: .1em;
  border-top: 1px solid var(--hairline-s); text-align: center; }
.col-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; }
.col-scroll::-webkit-scrollbar { width: 7px; }
.col-scroll::-webkit-scrollbar-thumb { background: rgba(122,100,72,.2); border-radius: 999px; }
.col-scroll::-webkit-scrollbar-track { background: transparent; }

/* — 左：界面全景（真实界面的等比克隆） — */
.map-grid { --ms: .28; display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.map-card { position: relative; width: 100%; overflow: hidden; cursor: pointer; border-radius: 14px;
  background: var(--doc-surface); border: 1px solid var(--hairline); padding: 5px 5px 0;
  height: calc(844px * var(--ms) + 40px);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-fast) var(--ease-out); }
.map-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--clay); }
.map-card.is-on { border-color: var(--clay-ink); box-shadow: 0 0 0 1px var(--clay-ink), var(--sh-2); }
.map-num { position: absolute; top: 8px; left: 8px; z-index: 3; width: 17px; height: 17px; border-radius: 6px;
  display: grid; place-items: center; font-size: 10px; color: var(--ink-500);
  background: rgba(255,255,255,.84); border: 1px solid var(--hairline-s); }
.map-lab { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  background: linear-gradient(to top, var(--doc-surface) 60%, rgba(251,249,246,0)); }
.map-lab b { font-size: 12px; font-weight: 500; color: var(--ink-900); letter-spacing: .06em; }
.map-lab em { font-style: normal; font-size: 9px; letter-spacing: .1em; color: var(--ink-300); }
.map-card.is-on .map-lab b { color: var(--clay-ink); }

.map-shot { width: 390px; height: 844px; position: relative; pointer-events: none;
  transform: scale(var(--ms)); transform-origin: top left; }
.map-shot *, .map-shot *::before, .map-shot *::after { animation: none !important; transition: none !important; }
.map-shot .app-page { opacity: 1 !important; transform: none !important; }
/* 缩略图里的二级页默认是关闭态，克隆后要强制显形才能看到内容 */
.map-shot .subpage { opacity: 1 !important; transform: none !important; pointer-events: none !important; }
.map-shot .tabbar { display: none; }

/* 左侧全景里的二级页缩略图：整体收窄、加「二级」角标，层级一眼可辨 */
.map-card.is-sub { opacity: .94; }
.map-card.is-sub .map-num { width: auto; padding: 0 5px; border-radius: 6px;
  background: var(--clay-ink); color: var(--on-primary); border-color: transparent;
  font-size: 9px; letter-spacing: .06em; }
.map-card.is-sub .map-lab b { font-size: 11.5px; }
.map-shot .splash-in, .map-shot .app-body > * { opacity: 1 !important; transform: none !important; }
.map-shot .tabbar, .map-shot .fab { display: none; }

/* — 中：聚焦真机 — */
.wb-col--stage { background: transparent; border-color: transparent; }
.col-scroll--stage { display: flex; align-items: flex-start; justify-content: center; padding: 4px 0 0; }
.stage-head { flex: none; height: 46px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: 18px 18px 0 0; }
.stage-crumb { display: flex; align-items: baseline; gap: 9px; }
.stage-crumb b { font-family: var(--font-serif); font-size: 17px; font-weight: 400; color: var(--ink-900); letter-spacing: .08em; }
.stage-crumb span { font-size: 11px; letter-spacing: .12em; color: var(--ink-400); }
.stage-meta { font-size: 11px; letter-spacing: .1em; color: var(--clay-ink); padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(201,185,168,.2); white-space: nowrap; }
.stage-foot { flex: none; padding: 8px; text-align: center; font-size: 11px; color: var(--ink-300); letter-spacing: .1em; }
.wbdev { width: 390px; height: 844px; transform: scale(var(--ph)); transform-origin: top left; }
.stage-wrap { width: calc(390px * var(--ph)); height: calc(844px * var(--ph)); overflow: hidden; flex: none; }
#realPhone.phone { width: 390px; height: 844px; max-width: none; flex: none; }

/* — 可点击模块的可视化反馈（用 outline，避免覆写已有 position） — */
.mod { cursor: pointer; }
.mod:hover { outline: 1.5px dashed rgba(122,100,72,.42); outline-offset: 4px; }
.mod.mod-on { outline: 2px solid var(--clay-ink); outline-offset: 4px; }

/* — 右：模块详情 — */
.pv { padding: 12px 14px 16px; border-radius: 18px; background: var(--doc-surface);
  border: 1px solid var(--hairline); animation: stgIn 420ms var(--ease-quart) both; }
.pv-k { display: inline-block; font-size: 10px; letter-spacing: .2em; color: var(--clay-ink); padding: 3px 9px;
  border-radius: var(--r-pill); background: rgba(201,185,168,.24); }
.pv-t { font-family: var(--font-serif); font-size: 19px; font-weight: 400; color: var(--ink-900); margin-top: 10px; line-height: 1.45; }
.pv-d { margin-top: 9px; font-size: 13px; line-height: 1.95; color: var(--ink-500); }
.pv-hl { color: var(--clay-ink); font-weight: 500; }
.pv-li { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pv-li li { position: relative; padding-left: 15px; font-size: 12.5px; line-height: 1.85; color: var(--ink-500); }
.pv-li li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 5px; height: 5px; border-radius: 50%; background: var(--clay); }
.pv-sp { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.sp-pill { font-size: 11px; letter-spacing: .04em; color: var(--ink-500); padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(184,200,216,.18); border: 1px solid var(--hairline-s); }
/* 夜间版：同 .sp-mine —— 硬编码的浅蓝底必须换成暗色，否则夜间是一块突兀的亮片 */
[data-theme="night"] .sp-pill { background: rgba(195,175,148,.13); border-color: rgba(195,175,148,.14); }
.sp-pill b { color: var(--ink-900); font-weight: 500; margin-right: 6px; }
.pv-a { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline-s);
  display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; line-height: 1.8; color: var(--ink-500); }
.pv-a svg { width: 14px; height: 14px; flex: none; margin-top: 4px; stroke: var(--clay-ink); fill: none;
  stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.pv-chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.pv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline); background: var(--paper); font-size: 12px; color: var(--ink-500);
  transition: all var(--t-fast) var(--ease-out); }
.pv-chip:hover { border-color: var(--clay); color: var(--ink-900); transform: translateY(-1px); }
.pv-chip i { font-style: normal; font-size: 10px; color: var(--ink-300); }

/* — 设计系统速查 — */
.sys { margin-top: 16px; }
.sys-h { font-size: 11px; letter-spacing: .2em; color: var(--ink-400); padding: 0 4px 8px; }
.sys-d { border-radius: 16px; border: 1px solid var(--hairline); background: var(--doc-surface); margin-bottom: 8px; overflow: hidden; }
.sys-d summary { cursor: pointer; list-style: none; padding: 11px 14px; font-size: 12.5px; color: var(--ink-700);
  display: flex; align-items: center; gap: 10px; letter-spacing: .06em; }
.sys-d summary::-webkit-details-marker { display: none; }
.sys-d summary i { font-style: normal; font-size: 10px; letter-spacing: .12em; color: var(--ink-300); margin-left: auto; }
.sys-d summary::after { content: ""; width: 6px; height: 6px; border-right: 1.4px solid var(--ink-300);
  border-bottom: 1.4px solid var(--ink-300); transform: rotate(45deg); transition: transform 260ms var(--ease-out); }
.sys-d[open] summary::after { transform: rotate(-135deg); }
.sys-b { padding: 2px 14px 14px; }
.sw-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sw { display: flex; align-items: center; gap: 8px; font-size: 11px; min-width: 0; }
.sw b { width: 22px; height: 22px; flex: none; border-radius: 7px; background: var(--c); border: 1px solid var(--hairline); }
.sw u { text-decoration: none; color: var(--ink-500); }
.sw em { font-style: normal; font-size: 9.5px; color: var(--ink-300); margin-left: auto; }
.ty-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 0;
  border-bottom: 1px dashed var(--hairline); }
.ty-row em { font-style: normal; font-size: 10.5px; color: var(--ink-300); white-space: nowrap; }
.ty-serif { font-family: var(--font-serif); font-size: 18px; color: var(--ink-900); }
.sp-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.sp-row span { height: 8px; border-radius: 3px; background: var(--clay); opacity: .6; }
.mo-row { display: grid; grid-template-columns: 66px 74px 1fr; gap: 8px; align-items: baseline; padding: 6px 0; font-size: 11.5px; }
.mo-row span { color: var(--ink-500); }
.mo-row b { color: var(--clay-ink); font-weight: 500; }
.mo-row em { font-style: normal; font-size: 10.5px; color: var(--ink-300); }
.sys-note { margin-top: 11px; font-size: 11.5px; line-height: 1.85; color: var(--ink-400); }
.sys-list { margin-top: 4px; }
.sys-list li { position: relative; padding-left: 14px; font-size: 11.5px; line-height: 1.9; color: var(--ink-500); }
.sys-list li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 4px; height: 4px; border-radius: 50%; background: var(--clay); }

/* — 响应式 — */
@media (min-height: 940px) { .wb { --ph: .84; } }
@media (min-height: 1080px) { .wb { --ph: .9; } }
@media (max-width: 1279px) {
  html, body { height: auto; overflow: visible; }
  .wb { height: auto; }
  .wb-main { grid-template-columns: 1fr; }
  .wb-col { max-height: 82vh; }
  .wb-col--stage { max-height: none; }
  /* 堆叠布局（含手机）必须让「可运行的机身」排在最前。
     原因：DOM 顺序是「界面全景 → 机身 → 模块清单」，单栏时缩略图会占满首屏，
     而 .map-shot 的 --ms=.26 会把 26px 的图标压到 7px、把精心调过的 2.05px
     描边压到 0.55px —— 低于一个物理像素，抗锯齿后只剩一层灰雾，用户看到的就是
     「图标不见了」。真正的机身被推到 y=872（折叠线 844 以下），等于没看见 App。
     提升 order 不影响桌面：这条规则只在单栏断点内生效。 */
  .wb-col--stage { order: -1; }
  .map-grid { --ms: .24; grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 760px) {
  .wb-top { height: auto; padding: 12px 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .wb-bs, .wb-tip { display: none; }
  .wb-main { padding: 12px; }
  .map-grid { --ms: .26; grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   20. 真机运行形态 —— 设备外壳 / 操控反馈 / 沉浸模式
   ============================================================ */

/* — 舞台留出机身副作用 overflow 的安全边距 — */
.stage-wrap { width: calc(390px * var(--ph) + 30px); height: calc(844px * var(--ph) + 18px);
  padding: 9px 15px; overflow: hidden; flex: none; }

/* — 机身：金属边框 + 双侧高光 — */
.phone {
  box-shadow: var(--sh-3),
    0 0 0 1px rgba(255,255,255,.14) inset,
    0 0 0 1.5px rgba(0,0,0,.10) inset,
    0 0 0 6px rgba(255,255,255,.05) inset;
}
.phone::before {
  content: ""; position: absolute; inset: 0; border-radius: 54px; z-index: 96;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.26) 0%, rgba(255,255,255,.05) 20%,
              transparent 44%, transparent 64%, rgba(255,255,255,.07) 88%, rgba(255,255,255,.18) 100%);
  opacity: .55;
}

/* — 侧边物理按键 — */
.dev-key { position: absolute; width: 3px; border-radius: 2px; z-index: 1;
  background: linear-gradient(180deg, #6f6a63, #41403d 40%, #57544f 70%, #2e2d2b);
  box-shadow: -1px 0 2px rgba(0,0,0,.22); }
.dev-key--silent { left: -3px; top: 128px; height: 30px; border-radius: 2px 0 0 2px; }
.dev-key--volup  { left: -3px; top: 182px; height: 58px; border-radius: 2px 0 0 2px; }
.dev-key--voldn  { left: -3px; top: 250px; height: 58px; border-radius: 2px 0 0 2px; }
.dev-key--power  { right: -3px; top: 208px; height: 92px; border-radius: 0 2px 2px 0;
  box-shadow: 1px 0 2px rgba(0,0,0,.22); }

/* — 灵动岛 — */
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 106px; height: 31px; border-radius: 20px; background: #08080a; z-index: 92;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 11px;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.28); }
.island-cam { width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #2c3444 0%, #141a24 55%, #05070a 100%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05); }

/* — 底部 Home 指示条 — */
.home-bar { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 132px; height: 5px; border-radius: 3px; z-index: 95; pointer-events: none;
  background: rgba(26,24,22,.34); }
[data-theme="night"] .home-bar { background: rgba(255,255,255,.42); }

/* — 点击水波：给所有操作一个物理落点 — */
.ripple { position: absolute; border-radius: 50%; pointer-events: none; z-index: 88;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  background: radial-gradient(circle, rgba(122,100,72,.30) 0%, rgba(122,100,72,.14) 45%, transparent 70%);
  animation: tap-ripple 620ms cubic-bezier(.22,.61,.36,1) forwards; }
[data-theme="night"] .ripple { background: radial-gradient(circle, rgba(255,255,255,.26) 0%, rgba(255,255,255,.12) 45%, transparent 70%); }
@keyframes tap-ripple {
  from { transform: scale(.4); opacity: .95; }
  to   { transform: scale(16); opacity: 0; }
}

/* — 按压微反馈：只动 filter，不碰 transform / position — */
.mod.tap { animation: tap-flash 340ms var(--ease-out); }
@keyframes tap-flash {
  0%, 100% { filter: none; }
  42%      { filter: brightness(.945) saturate(.92); }
}

/* — 演示状态呼吸：让"正在运行"被看见 — */
.stage-crumb b { position: relative; }
.wb.is-touring .stage-meta::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px;
  border-radius: 50%; background: var(--clay-ink); vertical-align: 1px;
  animation: demo-pulse 1600ms var(--ease-out) infinite; }
@keyframes demo-pulse {
  0%, 100% { opacity: .28; transform: scale(.72); }
  50%      { opacity: 1;   transform: scale(1); }
}

/* — 沉浸模式：只留 App 本体 — */
body.is-immersive .wb-col--map,
body.is-immersive .wb-col--side { display: none; }
body.is-immersive .wb-main { grid-template-columns: minmax(0, 1fr); padding: 10px 18px 6px; }
body.is-immersive .wb-col--stage { background: transparent; }
body.is-immersive .stage-head { justify-content: center; height: 40px; }
body.is-immersive .stage-foot { display: none; }
body.is-immersive { background: radial-gradient(120% 90% at 50% 0%, #f6f3ef 0%, #ebe6e0 60%, #e6e0d9 100%); }
[data-theme="night"] body.is-immersive { background: radial-gradient(120% 90% at 50% 0%, #26241f 0%, #1a1815 60%, #14120f 100%); }

/* — 动效敏感用户：新增装饰全部降级 — */
@media (prefers-reduced-motion: reduce) {
  .ripple, .wb.is-touring .stage-meta::before, .mod.tap { animation: none !important; }
  .ripple { opacity: 0; }
}

/* ============================================================
   21. 甲方图标包（PSD 转 alpha 蒙版）
   来源：ui结课作业.zip —— 陪伴 / 纪念馆 / 树洞 / 我的 + 四项服务卡
   实现：mask-image 着色，使图标天然跟随 currentColor 与主题切换，
        与原有 SVG <use> 图标的着色行为保持一致。
   ============================================================ */

/* — 通用蒙版基类 — */
.ico-img, .tab-ico {
  display: block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;  mask-position: center;
  -webkit-mask-size: contain;     mask-size: contain;
}

/* — 四个服务图案的蒙版（17.5px 源线宽 → 24/30/56px 通用） —
   .ico-img 的 21px 只是"没有指明尺寸时的兜底值"；v1.10 起首页四张卡用的是
   .ico-img.svc-ico（30px，无底座），二级页页头是 .ico-img.sp-hero-ico（56px），
   两者都换成 -big.png 放大版。只有 .ob-map-ico 等仍是 21px 常规版。 */
.ico-img { width: 21px; height: 21px; color: var(--clay-ink); }
.ico-img--consult  { -webkit-mask-image: url("icons/svc-consult.png");  mask-image: url("icons/svc-consult.png"); }
.ico-img--homecare { -webkit-mask-image: url("icons/svc-homecare.png"); mask-image: url("icons/svc-homecare.png"); }
.ico-img--funeral  { -webkit-mask-image: url("icons/svc-funeral.png");  mask-image: url("icons/svc-funeral.png"); }
.ico-img--ceremony { -webkit-mask-image: url("icons/svc-ceremony.png"); mask-image: url("icons/svc-ceremony.png"); }
/* 夜间原用 --clay（#574C3F），在 #1B1917 底色上只有 2.10:1 —— 服务卡图标在夜间几乎全黑。
   改为与日间同一支 --clay-ink（夜间 #C3AF94，8.25:1），靠 token 自身换值完成主题适配。 */
[data-theme="night"] .ico-img { color: var(--clay-ink); }

/* — Tab Bar 四栏图标（24px） —
   沿用 .tab 的 color 继承，因此选中变暖褐、未选中变浅灰的逻辑无需改动 */
.tab-ico { width: 24px; height: 24px; flex: none;
  transform: scale(1);
  -webkit-mask-image: var(--mask); mask-image: var(--mask);
  transition: transform var(--t-base) var(--ease-quart),
              background-color var(--t-fast) var(--ease-out),
              -webkit-mask-image var(--t-fast) var(--ease-out),
              mask-image var(--t-fast) var(--ease-out); }

/* 常态与选中态两套蒙版。顺序很重要：
   ① 先声明各图标的常态 --mask（--mask-s 同时在此声明为选中态备用）
   ② 再写 .tab.is-active 的覆盖规则 —— 它必须排在 ① 之后，否则同优先级下会被 ① 反盖。
   常态与选中态线宽均按 24px 显示反算过（1.75px / 2.49px），视觉粗细与
   服务卡 21px、二级页 30px 三处完全一致。 */
.tab-ico--companion { --mask: url("icons/companion.png"); --mask-s: url("icons/companion-s.png"); }
.tab-ico--memorial  { --mask: url("icons/memorial.png");  --mask-s: url("icons/memorial-s.png"); }
.tab-ico--treehole  { --mask: url("icons/treehole.png");  --mask-s: url("icons/treehole-s.png"); }
.tab-ico--profile   { --mask: url("icons/profile.png");   --mask-s: url("icons/profile-s.png"); }

/* 选中态：换用实心色块蒙版，图标整体「沉」下去成为色块（微信观感）。
   v1.11：-s.png 已换成甲方提供的四张天蓝实心图（3508×2480 源图裁成 256 紧贴画布），
   常态仍是自绘线稿。底色写死 --tab-emph 而不用 currentColor —— 标签文字为可读性需加深，
   图标却要保持原色 #A3C2E1，两者从此解耦。 */
.tab.is-active .tab-ico {
  -webkit-mask-image: var(--mask-s); mask-image: var(--mask-s);
  background-color: var(--tab-emph);
}

@media (prefers-reduced-motion: reduce) {
  .tab.is-active .tab-badge .tab-ico, .tab.is-tap .tab-badge .tab-ico {
    animation: none !important; transform: scale(.94); }
  .tab.is-tap .tab-badge::after { animation: none !important; opacity: 0; }
  .tab:active .tab-badge, .tab:active .tab-ico { transform: none; }
  .tab-badge, .tab-badge::before { transition: none !important; }
}


/* ============================================================
   22. 二级页面（详情页 / 寄回反馈）
   —— 从一级页面「推进」而不是「替换」：位移更大、有返回键、
      打开时 Tab Bar 退场，形成清晰的层级纵深
   ============================================================ */
.subpage {
  position: absolute; inset: 0; z-index: 200;
  background: var(--paper);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateX(26px) scale(.994);
  transition: opacity 380ms var(--ease-out), transform 460ms var(--ease-quart);
}
.subpage.is-open { opacity: 1; pointer-events: auto; transform: none; }
/* 关闭时反向退场更快，减少等待感 */
.subpage.no-anim { transition: none; }

/* 二级页打开时，底部导航与悬浮键一起退场 */
.phone-screen .tabbar,
.phone-screen .fab { transition: transform 420ms var(--ease-quart), opacity 320ms var(--ease-out); }
.phone-screen.has-sub .tabbar { transform: translateY(110%); opacity: 0; pointer-events: none; }
.phone-screen.has-sub .fab { transform: translateY(24px) scale(.9); opacity: 0; pointer-events: none; }

/* 引导页 / 登录页不需要底部导航 —— 流程尚未进入 App，给用户看到能点的 Tab
   只会让人分心（点了还会跳到还没授权的首页）。由 app.js 的 focus() 打 no-tab。
   写法与 has-sub 完全一致：平移 + 淡出，保留 transition 让切换是滑走而不是闪没。
   同时把 .app-scroll 预留给 Tab Bar 的 96px 底部留白收回，否则登录页底部会空一大块。 */
.phone-screen.no-tab .tabbar { transform: translateY(110%); opacity: 0; pointer-events: none; }
.phone-screen.no-tab .app-scroll { padding-bottom: 30px; }

.sp-top { display: flex; align-items: center; gap: 12px; padding: 14px 20px 10px; flex: none; }
.sp-back { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--hairline); background: var(--doc-surface);
  transition: all var(--t-fast) var(--ease-out); }
.sp-back:hover { border-color: var(--clay); transform: translateX(-2px); }
.sp-back svg { width: 16px; height: 16px; stroke: var(--ink-700); fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; }
.sp-top-t { font-size: 14px; letter-spacing: .1em; color: var(--ink-900); }
.sp-top-s { margin-top: 2px; font-size: 11px; letter-spacing: .08em; color: var(--ink-400); }

.sp-body { flex: 1; overflow-y: auto; scrollbar-width: none; padding: 0 22px 34px; }
.sp-body::-webkit-scrollbar { display: none; }

/* 页头：文字左、图案右（v1.9）
   旧版是「58px 淡蓝渐变底座 + 1px 描边 + 30px 图案」整块压在标题上方，
   占了 78px 高、还和标题抢注意力。现在底座与描边全部去掉，只留图案、
   放大到 56px 摆到文字右侧，页头高度直接降到标题本身的高度。 */
.sp-hero { display: flex; align-items: flex-start; gap: 16px; padding: 8px 0 20px; }
.sp-hero-txt { flex: 1; min-width: 0; }
/* 去掉底座后不再有 background / border / border-radius / place-items。
   注意选择器要写 .ico-img.sp-hero-ico（0,2）——否则压不住基类 .ico-img 的 21px。 */
.ico-img.sp-hero-ico { width: 56px; height: 56px; flex: none; margin-top: 4px; }
/* 与首页四张卡共用同一张放大版蒙版（svc-*-big.png，源线宽 17.5）：
   这里 56px → 屏幕线宽 3.83px（= 2.05 × 56/30）；卡里 30px → 2.05px。
   同一枚图案、同一套比例，只是放大；不是按各自尺寸反算出来的两枚不同图标。 */
.sp-hero-ico.ico-img--consult  { -webkit-mask-image: url("icons/svc-consult-big.png");  mask-image: url("icons/svc-consult-big.png"); }
.sp-hero-ico.ico-img--homecare { -webkit-mask-image: url("icons/svc-homecare-big.png"); mask-image: url("icons/svc-homecare-big.png"); }
.sp-hero-ico.ico-img--funeral  { -webkit-mask-image: url("icons/svc-funeral-big.png");  mask-image: url("icons/svc-funeral-big.png"); }
.sp-hero-ico.ico-img--ceremony { -webkit-mask-image: url("icons/svc-ceremony-big.png"); mask-image: url("icons/svc-ceremony-big.png"); }
.sp-hero-t { margin-top: 0; font-family: var(--font-serif); font-size: 25px; letter-spacing: .04em;
  color: var(--ink-900); line-height: 1.35; }
.sp-hero-d { margin-top: 10px; font-size: 13.5px; line-height: 1.9; color: var(--ink-500); }

/* 内容区块 */
.sp-sec { margin-top: 22px; }
.sp-sec-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 11px; }
.sp-sec-t { font-family: var(--font-serif); font-size: 16px; letter-spacing: .05em; color: var(--ink-900); }

/* 流程步骤（横向时间轴） */
.sp-steps { display: flex; flex-direction: column; gap: 2px; }
.sp-step { position: relative; display: flex; gap: 13px; padding-bottom: 16px; }
.sp-step:last-child { padding-bottom: 0; }
.sp-step::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 0; width: 1px;
  background: var(--hairline); }
.sp-step:last-child::before { display: none; }
.sp-step-n { width: 25px; height: 25px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; color: var(--clay-ink); background: var(--doc-surface);
  border: 1px solid var(--hairline); z-index: 1; }
.sp-step-t { font-size: 14px; color: var(--ink-900); letter-spacing: .02em; padding-top: 2px; }
.sp-step-d { margin-top: 4px; font-size: 12.5px; line-height: 1.8; color: var(--ink-400); }

/* 内容卡列表 */
.sp-list { border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--hairline); background: var(--doc-surface); }
.sp-item { display: flex; align-items: center; gap: 13px; padding: 14px 15px;
  border-bottom: 1px solid var(--hairline-s); text-align: left; width: 100%; }
.sp-item:last-child { border-bottom: 0; }
.sp-item-ico { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--hairline-s); }
.sp-item-ico svg { width: 17px; height: 17px; stroke: var(--clay-ink); fill: none; stroke-width: 1.35;
  stroke-linecap: round; stroke-linejoin: round; }
.sp-item-t { font-size: 14px; color: var(--ink-900); }
.sp-item-d { margin-top: 2px; font-size: 12px; line-height: 1.7; color: var(--ink-400); }
.sp-item-price { margin-left: auto; flex: none; font-size: 13px; color: var(--clay-ink); letter-spacing: .02em; }
.sp-item-price em { font-style: normal; font-size: 10.5px; color: var(--ink-400); }

/* v1.10：三个二级页内容区块去边框（咨询会聊什么 / 服务包含 / 可以这样安排）
   用户要求「整体文字边框 + 图标边框都去掉」——所以这里同时处理三圈描边：
     ① .sp-list 整块的外框与卡面底色
     ② .sp-item 的行间分割线
     ③ .sp-item-ico 图标底座的描边（连带把纸白底色也撤了，否则剩一个无描边的白方块悬浮着）
   撤掉底座后，34px 的盒子会变成一段"看不见的空白"，把图案到文字的间距撑到 21.5px，
   因此同步收到 26px、图案从 17px 提到 19px —— 视觉间距回到 ~16px，图案也不至于显得空。 */
.sp-sec--plain .sp-list { border: 0; background: transparent; }
.sp-sec--plain .sp-item { border-bottom: 0; padding: 11px 0; }
.sp-sec--plain .sp-item-ico { width: 26px; height: 26px; border: 0; background: transparent; }
.sp-sec--plain .sp-item-ico svg { width: 19px; height: 19px; }

/* 服务者 / 陪伴者卡 */
.sp-person { display: flex; align-items: center; gap: 13px; padding: 14px 15px; border-radius: var(--r-lg);
  border: 1px solid var(--hairline); background: var(--doc-surface); }
.sp-ava { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--mist-blue-t), var(--rose-t)); border: 1px solid var(--hairline-s); }
.sp-ava svg { width: 23px; height: 23px; stroke: var(--clay-ink); fill: none; stroke-width: 1.3;
  stroke-linecap: round; stroke-linejoin: round; }

/* 承诺 / 提示条 */
.sp-note { display: flex; gap: 10px; margin-top: 18px; padding: 13px 15px; border-radius: var(--r-md);
  background: linear-gradient(160deg, rgba(201,185,168,.22), rgba(201,185,168,.08));
  border: 1px solid rgba(122,100,72,.12); }
.sp-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; stroke: var(--clay-ink); fill: none;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.sp-note p { font-size: 12.5px; line-height: 1.85; color: var(--ink-700); }

/* 底部行动区（吸底） */
.sp-foot { flex: none; padding: 12px 22px 26px;
  background: linear-gradient(to top, var(--paper) 72%, rgba(245,241,236,0)); }
.sp-cta { width: 100%; height: 50px; border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--clay-deep); color: var(--on-primary); font-size: 14.5px; letter-spacing: .1em;
  box-shadow: 0 6px 18px -8px rgba(107,89,66,.6);
  transition: all var(--t-fast) var(--ease-out); }
.sp-cta:hover { background: var(--clay-deep-h); transform: translateY(-1px); }
.sp-cta:active { transform: scale(.985); }
.sp-cta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
.sp-cta-quiet { margin-top: 9px; text-align: center; font-size: 11.5px; letter-spacing: .08em; color: var(--ink-300); }

/* ---------- 树洞：纸飞机飞出 ---------- */
/* 三拍：① 从「寄出」按钮上弹出来 → ② 放大到机身正中（整段最大）
   → ③ 由大到小，向右上角飞出画面。
   所有距离由 app.js 按机身内部坐标算好写进变量，CSS 里不写死任何一段：
     --fly-x / --fly-y   起飞点 = 按钮中心
     --fly-mx / --fly-my 起飞点 → 机身正中
     --fly-ex / --fly-up 起飞点 → 右上角画面外

   流畅的关键：位移 / 缩放 / 淡出拆成三条动画，各自一条曲线走到底。
   上一版把三者塞进同一个 transform、每段各自 ease-in-out —— 每段首尾速度都归
   零，飞机在每个关键帧上都要重新起步，看上去一格一格顿。现在：
     flyPath 只有 0% / 40% / 100% 三帧，段内不插帧，路线是两段直线；
     40% 处前段减速到 0、后段从 0 起步，速度对得上 —— 于是「在正中停一下」
     是曲线自己走出来的，不是靠关键帧硬停出来的。 */
.fly { position: absolute; z-index: 210; width: 30px; height: 30px; pointer-events: none;
  opacity: 0; left: var(--fly-x, 50%); top: var(--fly-y, 62%); }
.fly svg { width: 100%; height: 100%; stroke: var(--clay-ink); fill: rgba(201,185,168,.34);
  stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
/* 整体必须 linear：缓动全交给帧内的 animation-timing-function，
   否则整体曲线会和帧内曲线相乘，把「停顿—加速」的手感压平。 */
.fly.is-go { animation: flyPath 1500ms linear forwards,
                        flyFade 1500ms linear forwards; }
.fly.is-go svg { animation: flyZoom 1500ms linear forwards; }

/* ① 位移：三帧两段，中间不插帧。插帧就会重新起步，一插就顿。 */
@keyframes flyPath {
  0%   { transform: translate(-50%, -50%);
         /* 起步慢（先在按钮上露个脸）→ 中途加速 → 末端减速到 0。
            末端必须与下一段的起点速度对齐，正中那一下才不顿。 */
         animation-timing-function: cubic-bezier(.5, .12, .3, 1); }
  40%  { transform: translate(calc(-50% + var(--fly-mx, 0px)), calc(-50% + var(--fly-my, -180px)));
         /* 后段从 0 起步一路加速（末端约 2.6 倍平均速度）—— 这才是「飞出去」 */
         animation-timing-function: cubic-bezier(.5, 0, .78, .42); }
  100% { transform: translate(calc(-50% + var(--fly-ex, 150px)), calc(-50% - var(--fly-up, 620px))); }
}
/* ② 缩放 + 朝向：独立一层，不被位移的加速曲线拖着走 */
@keyframes flyZoom {
  0%   { transform: scale(.28) rotate(-30deg);
         /* back-out：冒头时冲过一点再落回 —— 「弹动」在这一下 */
         animation-timing-function: cubic-bezier(.34, 1.5, .64, 1); }
  12%  { transform: scale(1.08) rotate(-48deg);
         /* 继续放大到峰值，途中轻微过冲再落回 2.9 */
         animation-timing-function: cubic-bezier(.34, 1.32, .5, 1); }
  40%  { transform: scale(2.9) rotate(-64deg);
         animation-timing-function: cubic-bezier(.5, 0, .78, .42); }
  100% { transform: scale(.22) rotate(-40deg); }
}
/* ③ 淡出：单列一条。跟位移共用曲线的话，会被飞出段的加速拖到最后一瞬才消失，
   看着像「啪」地没了；这里让它在飞出途中匀速淡尽。 */
@keyframes flyFade {
  0%   { opacity: 0; }
  9%   { opacity: 1; }
  56%  { opacity: 1; }
  100% { opacity: 0; }
}
/* 起飞前的小小蓄力：输入框轻缩一下，形成「投递」的手感 */
.pour.is-sending textarea { transform: scale(.985); opacity: .5; }
.pour textarea { transition: transform 300ms var(--ease-out), opacity 300ms var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  /* 位移和缩放两条都得停，只停 .fly 的话内层 svg 还在跑 flyZoom */
  .fly.is-go { animation: flyAway 240ms linear forwards; }
  .fly.is-go svg { animation: none; }
  @keyframes flyAway { 0% { opacity: 1; } 100% { opacity: 0; } }
  .sp-cta:hover, .sp-back:hover { transform: none; }
}

/* ---------- 树洞：寄回反馈页 ---------- */
.sp-back-hero { padding: 4px 0 6px; text-align: center; }
.sp-seal { width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(70% 70% at 50% 34%, rgba(184,200,216,.42), rgba(201,185,168,.20));
  border: 1px solid rgba(122,100,72,.14);
  animation: sealIn 760ms var(--ease-quart) both; }
/* 同 .sp-hero-ico：浅色径向渐变在夜间必须换成暗色版，否则封印图标（--clay-ink 浅褐）糊在浅底上 */
[data-theme="night"] .sp-seal { background: radial-gradient(70% 70% at 50% 34%, rgba(195,175,148,.18), rgba(138,116,88,.08));
  border-color: rgba(195,175,148,.14); }
.sp-seal svg { width: 34px; height: 34px; stroke: var(--clay-ink); fill: none; stroke-width: 1.25;
  stroke-linecap: round; stroke-linejoin: round; }
@keyframes sealIn { 0% { opacity: 0; transform: scale(.72) rotate(-12deg); }
  62% { opacity: 1; transform: scale(1.05) rotate(3deg); } 100% { transform: none; } }
.sp-back-t { margin-top: 18px; font-family: var(--font-serif); font-size: 21px; letter-spacing: .05em;
  color: var(--ink-900); }
.sp-back-s { margin-top: 7px; font-size: 12px; letter-spacing: .1em; color: var(--ink-400); }

.sp-letter { margin-top: 20px; padding: 22px 20px; border-radius: var(--r-lg);
  background: var(--doc-surface); border: 1px solid var(--hairline);
  animation: letterIn 820ms var(--ease-quart) 180ms both; }
@keyframes letterIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sp-letter p { font-family: var(--font-serif); font-size: 15px; line-height: 2.15; letter-spacing: .045em;
  color: var(--ink-700); }
.sp-letter p + p { margin-top: 14px; }
.sp-letter-src { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--hairline-s);
  font-size: 11.5px; letter-spacing: .1em; color: var(--ink-300); }

.sp-reply-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.sp-reply { padding: 14px 16px; border-radius: var(--r-md); background: var(--doc-surface);
  border: 1px solid var(--hairline); display: flex; gap: 11px; }
.sp-reply-n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: 10.5px; color: var(--paper); background: var(--clay-ink); }
.sp-reply p { font-size: 13px; line-height: 1.9; color: var(--ink-700); }
.sp-reply-s { margin-top: 5px; font-size: 11px; letter-spacing: .08em; color: var(--ink-300); }

.sp-mine { margin-top: 18px; padding: 15px 16px; border-radius: var(--r-md);
  background: linear-gradient(160deg, rgba(184,200,216,.22), rgba(184,200,216,.06));
  border: 1px dashed rgba(122,100,72,.26); }
/* 夜间版：底色是硬编码的浅蓝渐变，夜间不换就变成"浅底 + 浅文字/浅图标"，
   与 v1.8.1 修过的「图标看不见」完全同一类问题（那次实测只有 1.83:1）。
   暗色版沿用 .ico-badge / .sp-seal 夜间处理的同一支棕金调。 */
[data-theme="night"] .sp-mine { background: linear-gradient(160deg, rgba(195,175,148,.16), rgba(138,116,88,.05));
  border-color: rgba(195,175,148,.18); }
.sp-mine-h { font-size: 11px; letter-spacing: .16em; color: var(--clay-ink); }
.sp-mine p { margin-top: 8px; font-size: 13px; line-height: 1.9; color: var(--ink-500); }

/* ============================================================
    窄屏补充修正 —— 必须放在全表最后
    @media 不增加特异性：若把二级页页头的窄屏版写在 §11 的 @media 块里，
    会被后面（约 1385 行）同特异性的 .sp-hero / .ico-img.sp-hero-ico 反盖，
    结果窄屏依旧用 56px 大图案把标题挤到换行。改到这里才能压住。
    ============================================================ */
@media (max-width: 460px) {
  /* 二级页页头：给文字留够宽度，大图案收一档 */
  .sp-hero { gap: 12px; }
  .ico-img.sp-hero-ico { width: 46px; height: 46px; margin-top: 3px; }
  /* 首页四张卡的放大版图案：窄屏给标题让出宽度，30px -> 26px */
  .ico-img.svc-ico { width: 26px; height: 26px; }
  /* 窄屏卡片里的说明文字已经很挤，行高再松一点点读起来才不糊 */
  .svc-d { line-height: 1.65; }
}
