/* discover 的页面样式（从 templates/discover.html.html 的内联 <style> 外置而来）
 *
 * ⚠ 为什么要外置：内联 CSS 没法单独缓存 —— 每页访问都要重新下载、
 *   重新解析。一个达人主页原本 72KB，其中 31KB 就是这段。
 *   外置后浏览器缓存它，换页/回头再访都不再下载。
 * ⚠ 改样式请改**这个文件**，改 templates/discover.html.html 里的内联块无效
 *   （外置脚本已经把那段搬走了）。
 */
/* ═══════════════════════════════════════════════════════════
   公益达人展示平台 · 发现页
   视觉基准与 showcase.html 一致：同一套变量命名、同一套字阶、
   同一套卡片语言（衬线标题 + 主题色渐变 + 细边框 + 轻投影）。
   完全自包含：无外链字体 / 无外链 JS / 无外链图片。
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:        #FAF7F2;
  --surface:   #FFFFFF;
  --surface-2: #F3EEE5;
  --text:      #1A1814;
  --text-2:    #6B6357;
  --text-3:    #6F685C;   /* 5.01:1 on --bg（旧值 #9A9184 只有 2.91:1） */
  --accent:    #B04A34;   /* 白字 5.42:1 / 作文字 5.07:1 on --bg */
  --accent-2:  #8F3323;   /* 作文字 7.37:1 */
  --accent-ink: #FFFFFF;  /* 铺在 --accent 上的字色 */
  --accent-soft: rgba(176, 74, 52, .10);
  --border:    #E8E0D4;
  --border-2:  #D8CDBC;
  --radius:    16px;
  --radius-sm: 12px;
  --shadow:    0 1px 3px rgba(26, 24, 20, .06);
  --shadow-lg: 0 10px 30px rgba(26, 24, 20, .13);
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 卡片封面兜底色（按达人主题切换） */
  --cover-a: #C9A88C; --cover-b: #8E6A52; --cover-c: #E8D9C4;
  /* Hero 专用深色梯度，保证白字对比度 */
  --hero-a: #F3EADA; --hero-b: #DFCFB6; --hero-c: #FBF7EF;
  --shimmer: rgba(255, 255, 255, .62);

  /* ── Hero 前景色（2026-10-24 重排版新增）────────────────────
     Hero 底图换成了 AI 生成的实景图，前景就得跟着底图走：
     「素纸」主题的底图是一张**亮宣纸**，墨字压在上面才雅；
     暗底的「墨青」主题继续用白字。
     所以 Hero 的文字/描边/按钮全部走变量，而不是写死 #fff。 */
  --h-fg:      #241C14;              /* 标题 / 正文 */
  --h-fg-2:    rgba(36, 28, 20, .76); /* 次级文字 */
  --h-rule:    rgba(36, 28, 20, .30); /* 细线 / 描边 */
  --h-btn-bg:  #2C2118;              /* 主按钮底 */
  --h-btn-fg:  #FBF8F3;              /* 主按钮字 */
  /* 蒙版：宣纸是亮底，用**浅色**veil 把左侧文字区压干净；
     右侧留给梅花/远山，别糊掉。 */
  --h-shade: linear-gradient(100deg, rgba(252,249,244,.88) 0%, rgba(252,249,244,.70) 38%,
                            rgba(252,249,244,.26) 68%, rgba(252,249,244,.05) 100%),
              linear-gradient(180deg, rgba(252,249,244,.22) 0%, rgba(252,249,244,0) 28%);
  --h-grain: .10;            /* 宣纸是亮底，噪点轻一点 */
  --h-char-op: .07;
  --h-text-shadow: none;     /* 亮底上的字不需要投影 */
  --h-text-shadow-2: none;
  --h-badge-bg: rgba(255,255,255,.58);
  --h-hover: rgba(36,28,20,.08);
  --h-ring: rgba(252,249,244,.95);
  /* AI 生成的 Hero 底图（宽版 = 宽屏，窄版 = 手机竖屏） */
  --hero-img: url("/static/showcase/bg-paper-wide.jpg");
}

html[data-theme="ink"] {
  --bg:        #13191B;
  --surface:   #1B2326;
  --surface-2: #222C2F;
  --text:      #EDF2F1;
  --text-2:    #9FB0AE;
  --text-3:    #879795;   /* 4.79:1 on --bg */
  --accent:    #6FBFAE;
  --accent-2:  #8FD5C4;
  --accent-ink: #0C2420;  /* 亮青底色上用深色字（7.56:1） */
  --accent-soft: rgba(111, 191, 174, .14);
  --border:    #2A3538;
  --border-2:  #364347;
  --shadow:    0 1px 3px rgba(0, 0, 0, .30);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .42);
  --cover-a: #2E5D63; --cover-b: #14303A; --cover-c: #3F8C86;
  --hero-a: #1E4A52; --hero-b: #0B171C; --hero-c: #2E5D63;
  --shimmer: rgba(255, 255, 255, .10);
  /* 墨青：暗底白字 */
  --h-fg:     #FFFFFF;
  --h-fg-2:   rgba(255, 255, 255, .88);
  --h-rule:   rgba(255, 255, 255, .46);
  --h-btn-bg: #FFFFFF;
  --h-btn-fg: #0E1A1D;
  --h-shade:  linear-gradient(100deg, rgba(6,16,19,.72) 0%, rgba(6,16,19,.58) 40%,
                              rgba(6,16,19,.36) 68%, rgba(6,16,19,.14) 100%),
              linear-gradient(180deg, rgba(6,16,19,.26) 0%, rgba(6,16,19,0) 36%);
  --h-grain: .13;
  --h-char-op: .10;
  --h-text-shadow: 0 2px 14px rgba(0,0,0,.30);
  --h-text-shadow-2: 0 1px 10px rgba(0,0,0,.26);
  --h-badge-bg: rgba(6,16,19,.34);
  --h-hover: rgba(255,255,255,.14);
  --h-ring: rgba(255,255,255,.92);
  --hero-img: url("/static/showcase/bg-ink-wide.jpg");
}

/* ═══════════════════════════════════════════════════════════
   auto = 跟随系统（契约 §四）
   浅色系统 → 按 paper 渲染；深色系统 → 按 ink 渲染。
   下面两套令牌值与上面 :root / html[data-theme="ink"] **逐字一致** ——
   抄错一个变量就会有一处颜色对不上（改这里时对着上面抄，别凭记忆）。
   ⚠️ 不要在 JS 里把 auto 解析成 paper/ink 再写回 data-theme：
      那样首屏会闪一下，系统主题在运行中切换时也不会自动重算。
   ═══════════════════════════════════════════════════════════ */
html[data-theme="auto"] {
  --bg:        #FAF7F2;
  --surface:   #FFFFFF;
  --surface-2: #F3EEE5;
  --text:      #1A1814;
  --text-2:    #6B6357;
  --text-3:    #6F685C;   /* 5.01:1 on --bg（旧值 #9A9184 只有 2.91:1） */
  --accent:    #B04A34;   /* 白字 5.42:1 / 作文字 5.07:1 on --bg */
  --accent-2:  #8F3323;   /* 作文字 7.37:1 */
  --accent-ink: #FFFFFF;  /* 铺在 --accent 上的字色 */
  --accent-soft: rgba(176, 74, 52, .10);
  --border:    #E8E0D4;
  --border-2:  #D8CDBC;
  --radius:    16px;
  --radius-sm: 12px;
  --shadow:    0 1px 3px rgba(26, 24, 20, .06);
  --shadow-lg: 0 10px 30px rgba(26, 24, 20, .13);
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 卡片封面兜底色（按达人主题切换） */
  --cover-a: #C9A88C; --cover-b: #8E6A52; --cover-c: #E8D9C4;
  /* Hero 专用深色梯度，保证白字对比度 */
  --hero-a: #F3EADA; --hero-b: #DFCFB6; --hero-c: #FBF7EF;
  --shimmer: rgba(255, 255, 255, .62);

  /* ── Hero 前景色（2026-10-24 重排版新增）────────────────────
     Hero 底图换成了 AI 生成的实景图，前景就得跟着底图走：
     「素纸」主题的底图是一张**亮宣纸**，墨字压在上面才雅；
     暗底的「墨青」主题继续用白字。
     所以 Hero 的文字/描边/按钮全部走变量，而不是写死 #fff。 */
  --h-fg:      #241C14;              /* 标题 / 正文 */
  --h-fg-2:    rgba(36, 28, 20, .76); /* 次级文字 */
  --h-rule:    rgba(36, 28, 20, .30); /* 细线 / 描边 */
  --h-btn-bg:  #2C2118;              /* 主按钮底 */
  --h-btn-fg:  #FBF8F3;              /* 主按钮字 */
  /* 蒙版：宣纸是亮底，用**浅色**veil 把左侧文字区压干净；
     右侧留给梅花/远山，别糊掉。 */
  --h-shade: linear-gradient(100deg, rgba(252,249,244,.88) 0%, rgba(252,249,244,.70) 38%,
                            rgba(252,249,244,.26) 68%, rgba(252,249,244,.05) 100%),
              linear-gradient(180deg, rgba(252,249,244,.22) 0%, rgba(252,249,244,0) 28%);
  --h-grain: .10;            /* 宣纸是亮底，噪点轻一点 */
  --h-char-op: .07;
  --h-text-shadow: none;     /* 亮底上的字不需要投影 */
  --h-text-shadow-2: none;
  --h-badge-bg: rgba(255,255,255,.58);
  --h-hover: rgba(36,28,20,.08);
  --h-ring: rgba(252,249,244,.95);
  /* AI 生成的 Hero 底图（宽版 = 宽屏，窄版 = 手机竖屏） */
  --hero-img: url("/static/showcase/bg-paper-wide.jpg");
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg:        #13191B;
    --surface:   #1B2326;
    --surface-2: #222C2F;
    --text:      #EDF2F1;
    --text-2:    #9FB0AE;
    --text-3:    #879795;   /* 4.79:1 on --bg */
    --accent:    #6FBFAE;
    --accent-2:  #8FD5C4;
    --accent-ink: #0C2420;  /* 亮青底色上用深色字（7.56:1） */
    --accent-soft: rgba(111, 191, 174, .14);
    --border:    #2A3538;
    --border-2:  #364347;
    --shadow:    0 1px 3px rgba(0, 0, 0, .30);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .42);
    --cover-a: #2E5D63; --cover-b: #14303A; --cover-c: #3F8C86;
    --hero-a: #1E4A52; --hero-b: #0B171C; --hero-c: #2E5D63;
    --shimmer: rgba(255, 255, 255, .10);
    /* 墨青：暗底白字 */
    --h-fg:     #FFFFFF;
    --h-fg-2:   rgba(255, 255, 255, .88);
    --h-rule:   rgba(255, 255, 255, .46);
    --h-btn-bg: #FFFFFF;
    --h-btn-fg: #0E1A1D;
    --h-shade:  linear-gradient(100deg, rgba(6,16,19,.72) 0%, rgba(6,16,19,.58) 40%,
                              rgba(6,16,19,.36) 68%, rgba(6,16,19,.14) 100%),
              linear-gradient(180deg, rgba(6,16,19,.26) 0%, rgba(6,16,19,0) 36%);
    --h-grain: .13;
    --h-char-op: .10;
    --h-text-shadow: 0 2px 14px rgba(0,0,0,.30);
    --h-text-shadow-2: 0 1px 10px rgba(0,0,0,.26);
    --h-badge-bg: rgba(6,16,19,.34);
    --h-hover: rgba(255,255,255,.14);
    --h-ring: rgba(255,255,255,.92);
    --hero-img: url("/static/showcase/bg-ink-wide.jpg");
  }
}

/* 手机竖屏：底图换成竖构图那版（宽版在 375px 宽的屏上裁得太狠，
   梅花和远山都会落在框外）。两张图都在构建期转成同尺寸的 jpg，
   Worker 侧按客户端能力自动发 .webp。 */
@media (max-width: 899px) {
  html[data-theme="paper"] { --hero-img: url("/static/showcase/bg-paper-tall.jpg"); }
  html[data-theme="ink"]   { --hero-img: url("/static/showcase/bg-ink-tall.jpg"); }
  /* auto：浅色系统用纸的竖版，深色系统用墨的竖版（见下面的组合查询） */
  html[data-theme="auto"]  { --hero-img: url("/static/showcase/bg-paper-tall.jpg"); }
  /* 竖屏时文字占满整幅宽度，左右分层的浅色veil 挡不住右侧的正文，
     改成上下分层：上厚下薄。 */
  html[data-theme="paper"] {
    --h-shade: linear-gradient(180deg, rgba(252,249,244,.76) 0%, rgba(252,249,244,.54) 46%,
                              rgba(252,249,244,.24) 78%, rgba(252,249,244,.07) 100%);
  }
  html[data-theme="auto"] {
    --h-shade: linear-gradient(180deg, rgba(252,249,244,.76) 0%, rgba(252,249,244,.54) 46%,
                              rgba(252,249,244,.24) 78%, rgba(252,249,244,.07) 100%);
  }
  html[data-theme="ink"] {
    --h-shade: linear-gradient(180deg, rgba(6,16,19,.72) 0%, rgba(6,16,19,.64) 34%,
                              rgba(6,16,19,.56) 56%, rgba(6,16,19,.28) 78%, rgba(6,16,19,.05) 100%);
  }
}

/* 竖屏 + 深色系统：auto 要跟 ink 完全一致（底图与蒙版都换）。
   必须排在上面那条 max-width 规则**之后** —— 同优先级时后者胜出。 */
@media (max-width: 899px) and (prefers-color-scheme: dark) {
  html[data-theme="auto"] { --hero-img: url("/static/showcase/bg-ink-tall.jpg"); }
  html[data-theme="auto"] {
    --h-shade: linear-gradient(180deg, rgba(6,16,19,.72) 0%, rgba(6,16,19,.64) 34%,
                              rgba(6,16,19,.56) 56%, rgba(6,16,19,.28) 78%, rgba(6,16,19,.05) 100%);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
/* iOS Safari 对 font-size < 16px 的输入框聚焦时会自动放大并把视口推歪，
   目标用户是 50–70 岁的传承人，误触概率高 —— 可输入元素一律 ≥ 16px。 */
input, textarea, select { font-family: inherit; font-size: 16px; }
a { color: inherit; }

/* 全局兜底：任何「自己的 display 规则比浏览器默认 [hidden]{display:none}
   更 specific」的组件（下面 .hero-faces{display:flex} 就是）都会让 hidden=true 失效。 */
[hidden] { display: none !important; }

.page { max-width: 560px; margin: 0 auto; background: var(--bg);
        box-shadow: 0 0 0 1px var(--border); min-height: 100vh; }
@media (min-width: 561px) { .page { box-shadow: 0 0 60px rgba(0,0,0,.08); } }

/* ── 按钮 ─────────────────────────────────────────────── */
.btn {
  border: 0; border-radius: 999px; padding: 12px 20px; font-size: 14.5px;
  font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; text-decoration: none;
  transition: transform .15s ease, opacity .15s ease, background-color .25s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 10px var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }
.btn-sm { padding: 9px 15px; font-size: 13.5px; min-height: 44px; }

/* ── Hero ─────────────────────────────────────────────── */
/* 2026-10-24 重排版：
     · 底图从「一整块褐色渐变」换成 AI 生成的高清意境图（宣纸 / 墨青 两套 + 跟随系统）
     · 前景色跟着底图走 —— 亮宣纸配墨字，暗底配白字（--h-fg 系列变量）
     · 统计条从 Hero 内部挪出来，浮在 Hero 下沿，做出层次
   底图与前景的对比度由 05-dev/verify-discover-hero.mjs 实测像素校验。 */
.hero { position: relative; overflow: hidden; padding: 46px 22px 46px; color: var(--h-fg); }
.hero-bg {
  position: absolute; inset: 0;
  /* 层次（从前往后）：① 主题蒙版（浅色/深色）② AI 意境图 ③ 主题渐变（图片没加载时的兜底）
     ⚠️ 渐变兜底必须放在**图片后面** —— 放前面的话它是不透明的，会把整张图挡死
        （2026-10-24 实测踩过：图明明加载了，页面却是一片纯色渐变）。 */
  background-image:
    var(--h-shade),
    var(--hero-img),
    linear-gradient(158deg, var(--hero-a) 0%, var(--hero-b) 78%);
  background-size: auto, cover, auto;
  background-position: 0 0, center center, 0 0;
  background-repeat: no-repeat;
  transition: background .35s ease;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0; opacity: var(--h-grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* 「坊」字：压在实景图上当水印用，要够淡，否则像贴纸 */
.hero-char {
  position: absolute; right: 8px; bottom: 80px;
  font-family: var(--serif); font-size: 126px; line-height: .8;
  color: var(--h-fg); opacity: var(--h-char-op); letter-spacing: .04em;
  user-select: none; pointer-events: none;
}
/* 装饰几何：只动 transform */
.geo { position: absolute; border: 1px solid var(--h-rule); pointer-events: none; }
.geo-a { width: 188px; height: 188px; border-radius: 50%; right: -62px; top: -56px;
         animation: floaty 7.5s ease-in-out infinite; }
.geo-b { width: 92px; height: 92px; border-radius: 20px; right: 44px; top: 96px;
         transform: rotate(18deg); animation: floaty-tilt 9s ease-in-out infinite; }
.geo-c { width: 250px; height: 250px; border-radius: 50%; left: -118px; bottom: -140px;
         animation: floaty 11s ease-in-out infinite reverse; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
@keyframes floaty-tilt {
  0%,100% { transform: rotate(18deg) translateY(0); }
  50%     { transform: rotate(26deg) translateY(-9px); }
}
.hero-inner { position: relative; z-index: 2; }
/* 竖排题字：右上角补一块空白，竖着读，是东方版式里最省事的一笔意境外 */
.hero-verse {
  position: absolute; right: 15px; top: 44px; z-index: 3;
  writing-mode: vertical-rl;
  font-family: var(--serif); font-size: 13px; letter-spacing: .30em;
  color: var(--h-fg-2); user-select: none; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-verse::after { content: ""; width: 1px; height: 30px; background: var(--h-rule); }
/* 品牌行：图形 + 达人坊 / PROHUB，右侧是「整页配色」切换按钮。
   品牌是 <a>，按钮是 <button> —— 分开两行会让按钮掉到标题下面去，
   所以用一行 flex 摆一起。 */
.hero-brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hero-brand {
  display: flex; align-items: center; gap: 10px; width: fit-content;
  color: var(--h-fg); text-decoration: none;
}
.hero-brand svg { width: 34px; height: 34px; display: block; flex: none; }
/* 配色切换（纸 → 墨 → 跟随系统）：材质跟 .hero-badge 同一套
   （半透明底 + 细描边 + 前景色），亮底暗底都读得清；
   图标随状态变：素纸=日、墨青=月、跟随系统=半圆。 */
.hero-theme {
  /* ⚠ 触控目标 ≥ 44px（2026-10-31）：原来 38×38。图标 18px 不变。 */
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--h-badge-bg); border: 1px solid var(--h-rule);
  color: var(--h-fg); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .18s var(--ease), background-color .2s var(--ease);
}
.hero-theme:active { transform: scale(.92); }
.hero-theme svg { width: 18px; height: 18px; display: block; }
.hero-brand-name { display: flex; flex-direction: column; line-height: 1.06; }
.hero-brand-name b {
  font-family: var(--serif); font-size: 19px; font-weight: 600;
  letter-spacing: .14em; text-shadow: var(--h-text-shadow);
}
.hero-brand-name i {
  font-style: normal; font-size: 9px; font-weight: 600;
  letter-spacing: .34em; opacity: .72; margin-top: 3px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; letter-spacing: .05em;
  background: var(--h-badge-bg); backdrop-filter: blur(6px);
  border: 1px solid var(--h-rule);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 15px;
}
.hero-badge svg { width: 12px; height: 12px; }
/* 标题前的一道朱线
   ⚠️ 这是 <span>，默认 inline —— 不写 display:block 的话 width/height 全不生效，
   朱线就是 0 宽，整道装饰凭空消失（实测踩过）。 */
.hero-rule {
  display: block;
  width: 32px; height: 2px; border-radius: 2px;
  background: var(--accent); margin-bottom: 13px; opacity: .92;
}
.hero-title {
  font-family: var(--serif); font-size: 34px; font-weight: 600;
  line-height: 1.24; margin: 0 0 12px; letter-spacing: .015em;
  text-shadow: var(--h-text-shadow);
}
.hero-sub {
  font-size: 14px; line-height: 1.75; margin: 0 0 22px;
  max-width: 25em; color: var(--h-fg-2);
  text-shadow: var(--h-text-shadow-2);
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn-primary {
  background: var(--h-btn-bg); color: var(--h-btn-fg);
  box-shadow: 0 4px 16px rgba(0,0,0,.16);
}
.hero .btn-ghost { color: var(--h-fg); border-color: var(--h-rule); }
.hero .btn-ghost:hover { background: var(--h-hover); border-color: var(--h-fg); color: var(--h-fg); }

/* 达人头像行：Airbnb 式的「已经有多少人在这儿」 */
.hero-faces { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
/* display:flex 的优先级高于浏览器默认的 [hidden]{display:none}，
   不显式写这一条的话 hidden=true 藏不住它（实测 display 仍是 flex）。 */
.hero-faces[hidden] { display: none; }
.faces { display: flex; flex: none; }
.faces img {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--h-ring); margin-left: -11px;
  background: rgba(255,255,255,.18); display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.faces img:first-child { margin-left: 0; }
.faces-t { font-size: 12.5px; color: var(--h-fg-2); letter-spacing: .01em; }

/* ── 统计条 ─────────────────────────────────────────────── */
/* 从 Hero 内部挪出来，浮在 Hero 下沿：一层薄卡片压着 Hero 的边，
   比「整块底色里再塞三个数字」有层次。 */
.hero-stats {
  position: relative; z-index: 4;
  margin: -30px 22px 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(26,24,20,.10);
  overflow: hidden;
}
.hstat { padding: 13px 8px; text-align: center; }
.hstat + .hstat { border-left: 1px solid var(--border); }
.hstat-n { font-family: var(--serif); font-size: 25px; font-weight: 600; line-height: 1.2; }
.hstat-l { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }


/* ── 通用区块 ─────────────────────────────────────────── */
.sec { padding: 26px 22px 0; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
/* 「发现」做成一枚小方印 —— 东方版式里最省事的一枚装饰 */
.sec-index {
  font-family: var(--serif); font-size: 11.5px; color: var(--accent);
  letter-spacing: .18em; font-weight: 600; line-height: 1.5;
  border: 1px solid currentColor; border-radius: 3px;
  padding: 1px 6px 2px 7px; flex: none;
}
.sec-title { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 0; letter-spacing: .02em; }
.sec-sub { font-size: 12.5px; color: var(--text-3); margin-left: auto; }

/* ── 筛选栏 ───────────────────────────────────────────── */
.filters {
  position: sticky; top: 0; z-index: 20;
  margin: 0 -22px 16px; padding: 12px 22px 13px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.search { position: relative; display: flex; align-items: center; }
.search-ico { position: absolute; left: 13px; width: 16px; height: 16px;
              color: var(--text-3); pointer-events: none; }
.search input {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  /* 内边距从 11px 收到 10px，抵消字号 14→16 长出来的那 2px，高度不变 */
  padding: 10px 38px 10px 36px; outline: none; -webkit-appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  /* ⚠ 触控目标 ≥ 44px（2026-10-31）：原来 40px 高。 */
  min-height: 48px;
}
.search input::placeholder { color: var(--text-3); }
/* ⚠ 藏掉浏览器**自带**的搜索清除按钮（WebKit 的蓝色 ×）：
   ① 页面已经自带一个 #qClear（带 aria-label「清空搜索」），
      两个 × 挨在一起是重复控件；
   ② 自带的那个不受我们控制，尺寸远小于 44px，触控目标不合格。
   我们自己的那个已经做到 44×44 了。 */
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-clear {
  /* ⚠ 触控目标 ≥ 44px（2026-10-31）：原来 24×24。
     做法：**盒子**放大到 44×44，可见的小圆点用 radial-gradient 画在正中
     （24px 直径），「×」字仍然居中 —— 视觉尺寸一点没变，命中区域从 24 变 44。
     ⚠ 不用 ::before 画圆点：这个按钮是 display:grid，
        ::before 会变成**第二个网格项**，把「×」挤到第二行去
        （实测 gridTemplateRows 变成 "26.5px 17.5px"）。 */
  position: absolute; right: 8px; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; color: var(--text-2);
  background: radial-gradient(circle at center, var(--surface-2) 0 12px, transparent 12px);
  font-size: 15px; line-height: 1; display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease, transform .15s ease;
}
.search-clear.show { opacity: 1; visibility: visible; }
.search-clear:active { transform: scale(.9); }

.chips { position: relative; display: flex; gap: 8px; margin-top: 11px; }
/* 品类筛选：第二行 chip，比主题那行更轻 */
.chips-type { margin-top: 8px; flex-wrap: wrap; }
.chips-type .chip { font-size: 12.5px; padding: 5px 13px; }
.chip {
  position: relative; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 13px; padding: 7px 16px; border-radius: 999px;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
  /* ⚠ 触控目标 ≥ 44px（2026-10-31）：原来 29px 高。
     必须显式写 display/align-items —— min-height 只把盒子撑高，
     文字会贴着上边，下面空一截（按钮是块级盒，不会自动垂直居中）。 */
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
}
/* 选中态：文字用 --accent-2（更深一档）——
   accent-soft 是浅色底，--accent 压在上面只有 4.8:1，--accent-2 有 6.9:1 */
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); font-weight: 600; }

/* ── 卡片墙 ───────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.grid[hidden] { display: none; }
.grid.loading { opacity: .55; transition: opacity .2s ease; }
@media (min-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }

.rv-card { opacity: 0; transform: translateY(14px);
           transition: opacity .5s ease, transform .5s ease;
           transition-delay: var(--d, 0ms); }
.rv-card.in { opacity: 1; transform: none; }
.grid.fading .rv-card { --d: 0ms; opacity: 0; transform: translateY(8px); transition-duration: .18s; }

.card-item {
  display: block; text-decoration: none; color: inherit; height: 100%;
  background: var(--surface); border: 0;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(26,24,20,.05), 0 6px 18px rgba(26,24,20,.07);
  transition: transform .26s cubic-bezier(.2,.7,.3,1), box-shadow .26s ease;
}
.card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(26,24,20,.09), 0 18px 42px rgba(26,24,20,.14);
}
.card-item:active { transform: translateY(-1px) scale(.995); }
/* 卡片配色 = **该达人自己的 theme**（作者层），不是访客的整页配色。
   auto 的卡片按**访客系统**解析：浅色系统看纸色、深色系统看墨色。 */
.card-item[data-theme="ink"]  { --cover-a: #2E5D63; --cover-b: #14303A; --cover-c: #3F8C86; }
.card-item[data-theme="auto"] { --cover-a: #C9A88C; --cover-b: #8E6A52; --cover-c: #E8D9C4; }
@media (prefers-color-scheme: dark) {
  .card-item[data-theme="auto"] { --cover-a: #2E5D63; --cover-b: #14303A; --cover-c: #3F8C86; }
}

/* 封面比例从 4:3 改成 16:10：卡片更高雅，图露得更多，
   一屏能看到的人也就更多。 */
.card-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); }
.card-cover {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .45s ease, transform .55s ease;
}
.card-cover.ready { opacity: 1; }
.card-item:hover .card-cover { transform: scale(1.05); }
/* 封面兜底：主题色渐变 + 姓名首字 */
.card-cover-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(92% 108% at 84% 6%, var(--cover-c) 0%, transparent 54%),
    linear-gradient(128deg, var(--cover-a), var(--cover-b));
}
.card-cover-fallback::after {
  content: attr(data-ch);
  position: absolute; right: 12px; bottom: -12px;
  font-family: var(--serif); font-size: 62px; line-height: 1;
  color: rgba(255,255,255,.22); user-select: none; pointer-events: none;
}
.card-verified {
  position: absolute; right: 10px; top: 10px; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(255,255,255,.92); color: var(--accent);
  display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.16);
}
.card-verified svg { width: 13px; height: 13px; }
/* 「示例」角标（内置范例档案）—— 跟认证勾标占同一个位置，两者互斥：
   范例不是真人，不能一边标「示例」一边挂「公益认证达人」的勾。 */
.card-example {
  position: absolute; right: 10px; top: 10px;
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  /* 底色用不透明的 --surface，文字对比度就只跟主题走，
     两套外观都在 15:1 以上（对比度不依赖封面图的颜色）。 */
  background: var(--surface); color: var(--text);
  border: 1px dashed var(--border-2);
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
}

.card-body { padding: 34px 15px 15px; }
.card-head { display: flex; align-items: flex-end; gap: 11px; }
.card-head-main { min-width: 0; flex: 1; padding-bottom: 2px; }
/* 头像骑在封面下沿（Apple 风格卡片），由 .card-body 的上内边距让出位置 */
.card-avatar {
  position: absolute; left: 14px; bottom: -22px; z-index: 3;
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  background: var(--surface); border: 3px solid var(--surface);
  box-shadow: 0 2px 10px rgba(0,0,0,.16);
  display: grid; place-items: center;
}
.card-avatar-img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.card-avatar-img.ready { opacity: 1; }
/* 头像兜底 */
.card-avatar-fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-family: var(--serif); font-size: 22px; color: #fff;
  background:
    radial-gradient(78% 78% at 28% 18%, var(--cover-c) 0%, transparent 62%),
    linear-gradient(135deg, var(--cover-a), var(--cover-b));
}
.card-avatar-fallback::after { content: attr(data-ch); }

.card-name {
  font-family: var(--serif); font-size: 16.5px; font-weight: 600; margin: 0;
  line-height: 1.32; letter-spacing: .01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-title {
  font-size: 12.5px; color: var(--text-2); margin: 4px 0 0; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-tagline {
  font-size: 13px; color: var(--text-2); margin: 11px 0 0; line-height: 1.55;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 11px; font-size: 12px; color: var(--text-3);
}
.card-city { display: inline-flex; align-items: center; gap: 4px; min-width: 0;
             white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-city svg { width: 13px; height: 13px; flex: none; }
.card-nums { flex: none; }
.card-nums b { font-family: var(--serif); font-size: 14px; color: var(--text); font-weight: 600; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font-size: 11px; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px;
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
/* 品类标签：传承人 / 特色体验达人 */
.tag-type { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-soft); font-weight: 600; }

/* ── 骨架屏 ───────────────────────────────────────────── */
.card-skel { pointer-events: none; }
.skel { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 6px; }
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 18%, var(--shimmer) 50%, transparent 82%);
  transform: translateX(-100%);
  animation: shimmer 1.35s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-cover { aspect-ratio: 16 / 10; border-radius: 0; }
.skel-body { padding: 14px 15px 16px; }
.skel-line { height: 11px; margin-bottom: 9px; }
.skel-line.w60 { width: 60%; } .skel-line.w85 { width: 85%; } .skel-line.w40 { width: 40%; }

/* ── 空态 ─────────────────────────────────────────────── */
.empty {
  text-align: center; padding: 34px 22px;
  border: 1px dashed var(--border-2); border-radius: var(--radius);
  background: var(--surface); color: var(--text-2);
}
.empty[hidden] { display: none; }
.empty-t { font-family: var(--serif); font-size: 17px; margin: 0 0 8px; color: var(--text); }
.empty-d { font-size: 13.5px; margin: 0 0 18px; line-height: 1.7; }
.empty-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── 底部 CTA + 页脚 ──────────────────────────────────── */
.cta {
  margin: 30px 22px 0; padding: 26px 22px 24px; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.cta-t { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.cta-d { font-size: 13.5px; color: var(--text-2); margin: 0 0 18px; line-height: 1.7; }
.foot {
  margin-top: 28px; padding: 24px 22px 30px;
  border-top: 1px solid var(--border);
  text-align: center; color: var(--text-3); font-size: 12.5px; line-height: 1.85;
}
.foot-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: 12px; color: var(--accent); letter-spacing: .04em;
}
.foot-badge svg { width: 13px; height: 13px; }
.foot a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--border-2); }

/* ── 无 JS 兜底名单 ───────────────────────────────────── */
.ns-wrap { padding: 4px 0 8px; }
.ns-tip { font-size: 12.5px; color: var(--text-3); margin: 0 0 10px; }
.ns-list { list-style: none; margin: 0; padding: 0; }
.ns-list li { padding: 11px 0; border-bottom: 1px solid var(--border); }
.ns-list li:last-child { border-bottom: 0; }
.ns-list a { font-family: var(--serif); font-size: 15.5px; font-weight: 600; text-decoration: none; }
.ns-list .ns-sub { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.ns-empty { font-size: 13px; color: var(--text-3); margin: 0; }

/* ── 吸底条 ───────────────────────────────────────────── */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--border);
  transform: translateY(115%);
  transition: transform .3s ease;
}
.bar.on { transform: translateY(0); }
.bar-inner { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.bar .btn-primary { flex: 1; }
.spacer-bottom { height: 78px; }

/* ── Toast ────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 12px);
  background: rgba(20,18,15,.92); color: #fff; font-size: 13.5px;
  padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; z-index: 90;
  max-width: 78vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── 视觉隐藏（读屏仍能读到）────────────────────────────
   .sr-only 不是 display:none —— display:none 的内容读屏软件也读不到，
   那就失去「播报」的意义了。这里用 clip 把内容裁掉，保留在无障碍树里。 */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── 减弱动效 ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .rv-card { transform: none !important; transition: opacity .2s ease !important;
             transition-delay: 0ms !important; }
  .grid.fading .rv-card { transform: none !important; transition-duration: .2s !important; }
  .card-item:hover, .card-item:active { transform: none !important; }
  .card-item:hover .card-cover { transform: none !important; }
  .geo, .skel::after { animation: none !important; }
  .skel::after { opacity: .4; transform: none !important; }
  .bar { transition: none !important; }
}
/* ═══════════════════════════════════════════════════════════
   宽屏自适应（≥900px）
   ───────────────────────────────────────────────────────────
   窄屏（≤899px）是移动优先的主战场（375–430px），版式一个字不动。
   宽屏原来整页锁在 560px —— 在电脑上就是一条窄柱浮在大屏中间，
   看着像「把手机网页搬到电脑上」。这里按设备宽度换一套版式：
     · 内容容器放开到 1160 / 1280px
     · 达人卡片墙 2 列 → 3 列 → 4 列
     · Hero、筛选条、区块留白跟着放大
   ⚠️ 所有宽屏覆盖集中放在这一个块里，不要散到各处 —— 散开的媒体
      查询改起来必漏，而且「窄屏没动过」这条前提就没法一眼验证了。
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .page {
    max-width: 1160px;
    /* 宽屏不再做「手机画框」：去掉边框与投影，内容直接落在页面底色上 */
    box-shadow: none;
    background: transparent;
  }
  .sec { padding: 34px 40px 0; }
  .hero { padding: 84px 40px 58px; }
  .hero-title { font-size: 44px; }
  .hero-sub { font-size: 15.5px; max-width: 34em; }
  .hero-verse { right: 26px; top: 58px; font-size: 14px; }
  .hero-stats { margin: -34px 40px 0; max-width: 560px; }
  .hero-faces { margin-top: 26px; }
  /* 筛选条是 .sec 里的负边距通栏条 —— .sec 内边距改了，这里必须同步 */
  .filters { margin: 0 -40px 22px; padding: 14px 40px 15px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .bar-inner { max-width: 1160px; }
  .sec-title { font-size: 24px; }
}

@media (min-width: 1280px) {
  .page { max-width: 1280px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sec { padding-left: 56px; padding-right: 56px; }
  .hero { padding-left: 56px; padding-right: 56px; }
  .hero-stats { margin-left: 56px; margin-right: 56px; }
  .filters { margin-left: -56px; margin-right: -56px; padding-left: 56px; padding-right: 56px; }
}
