/* ============================================================
   Ecclesia Global — Design System + public stylesheet
   ------------------------------------------------------------
   气质目标：温暖 · 国际化 · 可信 · 稳重 · 克制
   反面参照（都要避开）：亮蓝 SaaS 模板 / 科技公司后台 / 廉价教会模板

   ★ 这一段是【唯一的真相源】★
   页面样式一律 var(--token)，不要再往下面写第二套颜色/圆角/阴影。
   想加新颜色前先问：现有 token 里有没有语义相符的？
   （2026-07-29 建立 token 层时实测：全表 525 处已用 var()、308 处还硬编码，
     硬编码那些是历史遗留，改到哪清到哪，不要再新增。）
   ============================================================ */

:root {
  /* ---------- 品牌主色：Primary Navy ----------
     深海军蓝，不是科技蓝。用于主导航、主按钮、标题强调、品牌识别。 */
  --navy-900: #0F2739;   /* 最深，页脚/深底 */
  --navy-800: #173B57;   /* ★ 品牌主色 */
  --navy-700: #1D4A6B;   /* hover 加深 */
  --navy-600: #245B82;   /* 次级强调 */

  /* ---------- 链接/信息色 ----------
     刻意压低饱和度：亮蓝一上来整站就变 Bootstrap。 */
  --blue-500: #2B6584;
  --blue-100: #DCE8EE;
  --blue-50:  #EFF4F7;

  /* ---------- Accent Gold ----------
     低饱和稳重金，只给「认证 / 认领 / BiblePro 下载」这类少量重要操作。
     ⚠️ 不要调亮：一发黄就变廉价教会模板。 */
  --gold-500: #C69A4B;
  --gold-600: #B98A3D;
  --gold-100: #F5EDDD;

  /* ---------- 文字 ---------- */
  --ink-900:  #1D252C;   /* 正文/标题 */
  --ink-600:  #65717A;   /* 次要文字 */
  --ink-400:  #8A939B;   /* 占位/说明 */

  /* ---------- 面与线 ----------
     ⚠️ 背景【不是纯白】—— 暖白打底 + 纯白卡片，靠这一层差别产生空间感，
     而不是靠给每张卡片加阴影（那样整站会像卡片堆）。 */
  --bg:       #F8F6F1;   /* 页面底色（暖白） */
  --bg-soft:  #F2EFE8;   /* 交替区块，比 --bg 再深一点 */
  --surface:  #FFFFFF;   /* 卡片/弹窗表面 */
  --line:     #E4E1DA;   /* 边框（暖灰，不是冷灰） */
  --line-soft:#EDEAE3;   /* 分隔线 */

  /* ---------- 语义色 ---------- */
  --success:  #287A5B;
  --warning:  #B7791F;
  --error:    #B74444;
  --success-bg: #E6F1EC;
  --warning-bg: #FBF1DE;
  --error-bg:   #F7E6E6;

  /* ---------- 圆角比例 ----------
     ⚠️ 不要所有东西都超大圆角 —— 全站一个大圆角看起来像玩具。 */
  --r-sm:  9px;    /* 小按钮、标签 */
  --r-md:  11px;   /* 输入框 */
  --r-lg:  15px;   /* 普通卡片 */
  --r-xl:  22px;   /* 大型宣传区域 */
  --radius: var(--r-lg);   /* 历史别名，勿删：全表大量在用 */

  /* ---------- 阴影 ----------
     ⚠️ 默认靠【边框】区分层次，阴影只在 hover 时轻微出现。
     厚重黑阴影是「廉价模板」最明显的特征之一。 */
  --shadow-none: none;
  --shadow:     0 1px 2px rgba(23, 59, 87, .05), 0 2px 8px rgba(23, 59, 87, .04);
  --shadow-hover: 0 2px 6px rgba(23, 59, 87, .07), 0 8px 20px rgba(23, 59, 87, .07);
  --shadow-lg:  0 8px 30px rgba(23, 59, 87, .12);

  /* ---------- 间距比例（8pt 栅格） ---------- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* ---------- 字号比例 ----------
     手机端在下方 @media 里整体缩小，标题不允许挤出屏幕。 */
  --t-display: 56px;  --t-h1: 42px;  --t-h2: 32px;  --t-h3: 24px;
  --t-h4: 19px;  --t-body-lg: 18px;  --t-body: 16px;
  --t-sm: 14px;  --t-caption: 12.5px;

  /* ---------- 阅读宽度 ----------
     文章正文不铺满屏幕 —— 一行超过 ~90 字符就没人读得下去。 */
  --measure: 720px;

  /* ---------- 动效 ----------
     统一 150–250ms。再长就挡操作，再短就看不见。 */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur:  180ms;

  /* ---------- 字体 ----------
     ☠️ 泰文字体原先【一个都没有】—— 只能靠系统随便挑，字形和粗细都不受控。
     缅甸文虽然排在后面（拉丁字体没有缅文字形，会自动落到这里），但顺序靠后
     意味着一旦前面某个字体恰好带了残缺的缅文字形，就会被它接管。
     所以把两种文字的专用字体都补齐。
     ⚠️ Inter / Noto 全部走系统已装的，不额外加载外部字体文件：
        这个站一半流量在缅甸/泰国的移动网络上，多一个字体文件就是多几百毫秒白屏。 */
  --font: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont,
          "Helvetica Neue", Arial,
          "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei",
          "PingFang TC", "Noto Sans TC", "Microsoft JhengHei",
          "Noto Sans Myanmar", "Pyidaungsu", "Padauk", "Myanmar Text",
          "Noto Sans Thai", "Leelawadee UI", "Thonburi", sans-serif;
}

/* 尊重系统的「减少动态效果」设置 —— 无障碍要求，也让低端机不卡。 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   [hidden] 必须真的隐藏 —— 这条<b>不是多余的</b>
   ☠️ 浏览器的 [hidden] 是 `display:none`，但它是 UA 样式，
      <b>任何自己写的 display 都能压过它</b>。
      本站 .btn 是 `display:inline-flex` → 给按钮设 el.hidden = true <b>毫无效果</b>。
      实测代价：分步表单里「提交」按钮在<b>每一步</b>都露着（用户在第 1 步就能提交半张表），
      而 JS 里 submit.hidden 明明是 true —— 属性对了、界面没变。

   ⚠️ 更毒的是<b>测试也会跟着骗人</b>：我第一版断言 `e => !e.hidden`（读属性），
      它返回 true，测试全绿 —— 只有截图才看出按钮还在。
      → 涉及显隐的断言必须读<b>计算样式</b>（offsetParent / getComputedStyle），不能读属性。

   ⚠️ 用 !important：这是「隐藏」的语义底线，任何组件样式都不该赢过它。
   ══════════════════════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }
a { color: var(--blue-500); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 22px; }

/* ---------- Side promo rails (BiblePro app, ultra-wide screens) ---------- */
.side-rail {
  display: none; position: fixed; top: 92px; width: 230px; z-index: 60;
}
.side-rail-left  { left: 22px; }
.side-rail-right { right: 22px; }
.rail-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 18px; text-align: center;
}
.rail-card .rail-appicon { width: 64px; height: 64px; border-radius: 15px; margin: 0 auto 8px; display: block; }
.rail-card h4 { color: var(--navy-800); font-size: 15.5px; line-height: 1.3; margin-bottom: 2px; }
.rail-card .rail-sub { color: var(--gold-600); font-weight: 700; font-size: 12.5px; margin-bottom: 10px; }
.rail-card ul { list-style: none; text-align: left; margin: 0 0 12px; }
.rail-card li {
  font-size: 12.8px; color: var(--ink-600); padding: 4px 0 4px 20px; position: relative;
}
.rail-card li::before { content: "✓"; position: absolute; left: 2px; color: var(--gold-600); font-weight: 700; }
.rail-card .btn { width: 100%; padding: 10px 12px; font-size: 14px; }
.rail-card .rail-qr { width: 128px; height: 128px; margin: 12px auto 4px; display: block; image-rendering: pixelated; }
.rail-card .rail-qr-hint { font-size: 11.5px; color: var(--ink-400); }
.rail-shot-wrap { text-align: center; }
.rail-shot {
  width: 100%; border-radius: 22px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); display: block;
}
.rail-shot-caption {
  margin-top: 10px; font-size: 12.8px; color: var(--ink-600);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; box-shadow: var(--shadow);
}
.side-rail .rail-close {
  position: absolute; top: -10px; right: -10px; z-index: 5;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; color: var(--ink-600);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.side-rail .rail-close:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.side-rail.rail-hidden { display: none !important; }
/* Show the rails on ordinary desktop widths too: the content column
   yields just enough room for them, so the sides are never empty. */
@media (min-width: 1400px) {
  .side-rail { display: block; }
  /* content column = viewport minus two rails (width + edge gap + breathing room) */
  body:not(.rails-off) .container { max-width: min(1320px, calc(100vw - 2 * 286px)); }
  /* ☠️ 顶栏横跨在侧栏之上，必须保持完整宽度 —— 这条豁免【曾经是死规则】。
     2026-07-28 实测：1400px 屏幕上顶栏可用宽度只有 828px（1399px 时是 1320px），
     菜单被挤成两三行，四种语言都中招，而 1400~1600 正是最常见的笔记本宽度。

     原因是 CSS 优先级差了一点点：
       压窄规则 body:not(.rails-off) .container → (0,2,1)
       豁免规则 .site-header .container        → (0,2,0)   ← 输了，从来没生效
     注释写着「顶栏保持完整宽度」，代码却做不到 —— 属于「写了等于没写」，
     而且因为规则确实存在，看代码的人会以为已经处理过了。
     → 豁免必须至少和压窄规则一样具体。 */
  /* ☠️ 豁免【不能带 :not(.rails-off) 条件】—— 见下方 1400–1599 段的说明。 */
  .site-header .container { max-width: 1320px; }
}
@media (min-width: 1400px) and (max-width: 1599px) {
  .side-rail { width: 200px; }
  /* ☠️ 2026-07-29 修：这条收窄原先【没有 rails-off 守卫】，而它的豁免却有。
     于是侧栏一关（body 带上 .rails-off）：
       收窄  .container                              → 照常生效，1440px 只剩 928px
       豁免  body:not(.rails-off) .site-header ...   → 条件不成立，失效
     两条一叠，顶栏可用宽度反而【比开着侧栏时还窄】—— 完全反直觉。

     实测症状：缅甸文 @1440 整排菜单塌成汉堡，而 @1280 和 @1920 都正常
     （1280 不进这个区间，1920 走另一段规则）。宽的屏幕比窄的先塌，
     看着像 JS 竞态，其实是 CSS 条件写反了 —— 往 JS 里查会白查很久。

     两处都改：收窄加上守卫（没侧栏就不该给侧栏留位置），
     顶栏豁免去掉守卫（顶栏横跨全宽，任何情况下都不该被压窄）。 */
  body:not(.rails-off) .container { max-width: min(1320px, calc(100vw - 2 * 256px)); }
  .site-header .container { max-width: 1320px; }
}
/* Pages with their own in-content promo suppress the rails, so they take the
   full width back instead of leaving the reserved side gutters empty. On wide
   monitors the container keeps growing so the middle grid gains more columns
   rather than stranding empty margins on both sides. */
@media (min-width: 1400px) {
  body.dir-page .container { max-width: min(1960px, calc(100vw - 72px)); }
}
/* Ultra-wide: give the side columns a touch more room, let the grid breathe. */
@media (min-width: 1700px) {
  body.dir-page .directory-layout { grid-template-columns: 280px minmax(0, 1fr) 340px; gap: 30px; }
}

/* ---------- Buttons ----------
   ★ 一套按钮，全站通用。加新样式前先确认现有 5 种真的都不合适。

   ☠️ 2026-07-29 改的一件大事：`.btn-primary` 原本是【金色】。
   于是全站每一个主按钮都是金的 —— 金色一旦到处都是就不再是强调，
   只剩下「廉价教会模板」那个观感。
   现在：主按钮 = 深海军蓝；金色收窄到 `.btn-gold`，
   只给「认证 / 认领教会 / BiblePro 下载」这三类少量重要操作。

   触控尺寸：桌面最小高 44px、手机 48px（下方 @media 里加高）。 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--t-body);
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
/* 键盘可见焦点 —— 无障碍必需，不能用 outline:none 抹掉。 */
.btn:focus-visible,
a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--navy-600);
  outline-offset: 2px;
}
.btn[disabled], .btn[aria-disabled="true"], .btn.is-disabled {
  opacity: .5; cursor: not-allowed; pointer-events: none;
}
/* Loading 态：文字留在原位（避免按钮宽度跳动），前面转一个小圈。 */
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading::before {
  content: ""; width: 15px; height: 15px; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: btn-spin .6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ① Primary —— 深蓝底白字。默认主操作。 */
.btn-primary { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.btn-primary:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }

/* ② Secondary —— 白底深蓝字浅边框。与 Primary 并排时用这个。 */
.btn-secondary, .btn-light {
  background: var(--surface); color: var(--navy-800); border-color: var(--line);
}
.btn-secondary:hover, .btn-light:hover { background: var(--bg-soft); border-color: var(--ink-400); }

/* ③ Gold Accent —— ⚠️ 只给认证 / 认领 / BiblePro 下载。别的地方不要用。 */
.btn-gold { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }
.btn-gold:hover { background: var(--gold-600); border-color: var(--gold-600); color: var(--navy-900); }

/* ④ Ghost —— 导航与次级操作，无边框。 */
.btn-ghost { background: transparent; color: var(--navy-800); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-soft); }

/* ⑤ Danger —— 只给删除 / 举报 / 高风险操作。 */
.btn-danger { background: var(--error); color: #fff; border-color: var(--error); }
.btn-danger:hover { background: #9E3A3A; border-color: #9E3A3A; color: #fff; }

/* 历史别名，保留以免大面积改模板 */
.btn-navy { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.btn-navy:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn-outline {
  background: transparent; color: var(--navy-800); border: 1px solid var(--navy-800);
}
.btn-outline:hover { background: var(--navy-800); color: #fff; }

.btn-block { display: flex; width: 100%; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 17px; border-radius: var(--r-md); }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: var(--t-sm); border-radius: 8px; }

/* 手机端触控目标加大到 48px（§4.6） */
@media (max-width: 640px) {
  .btn { min-height: 48px; }
  .btn-sm { min-height: 40px; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy-800);
  box-shadow: 0 2px 10px rgba(16,28,51,.25);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 62px; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.brand-logo { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { color: #fff; font-weight: 700; font-size: 19px; letter-spacing: .3px; }
.brand-sub { color: var(--gold-500); font-size: 12.5px; font-weight: 600; }

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2.5px; background: #fff; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute; top: 62px; left: 0; right: 0;
  background: var(--navy-800);
  flex-direction: column; padding: 8px 18px 18px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.site-nav.open { display: flex; }
.site-nav a {
  color: var(--line); padding: 11px 4px; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-decoration: none !important;
}
.site-nav a:hover { color: var(--gold-500); }
.site-nav a.active { color: var(--gold-500); font-weight: 700; }
/* BiblePro 入口 —— 抽屉形态（手机 / 顶栏收起态）是「[logo] 下载 主内圣经」，
   桌面一排时缩成「[logo] BiblePro」。
   ⚠️ 顶栏和抽屉是同一份 HTML，所以两种文案都渲染出来，用 CSS 决定显示哪一个：
      桌面那排只有 6 个位置且要容纳缅甸语（实测最宽 1157px），
      直接把字面换成「下载 …」会把顶栏挤进收起态。 */
.site-nav .nav-cta {
  color: var(--gold-500); font-weight: 700;
  display: flex; align-items: center; gap: 9px;
}
.nav-cta-logo { width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto; }
.nav-cta-short { display: none; }          /* 抽屉里显示完整的「下载 …」 */
@media (min-width: 900px) {
  .site-nav .nav-cta { gap: 7px; }
  .nav-cta-logo { width: 19px; height: 19px; border-radius: 5px; }
  .nav-cta-full { display: none; }
  .nav-cta-short { display: inline; }
}
/* 收起态也是抽屉形态（宽屏但菜单装不下时）—— 跟手机一样显示完整文案 */
.site-header.nav-collapsed .nav-cta-full { display: inline; }
.site-header.nav-collapsed .nav-cta-short { display: none; }
/* Share-this-page item inside the mobile menu */
.site-nav .nav-share {
  display: flex; align-items: center; gap: 9px;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--line); padding: 11px 4px; font-weight: 500;
  font-size: 16px; font-family: var(--font);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.site-nav .nav-share:hover { color: var(--gold-500); }
.site-nav .nav-share svg { width: 17px; height: 17px; flex: 0 0 auto; }
@media (min-width: 900px) { .site-nav .nav-share { display: none; } }
/* Account entry — pill button set apart from the content nav */
.site-nav .nav-login {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  padding: 8px 16px; font-size: 14.5px; font-weight: 600;
  margin-top: 12px; align-self: flex-start;
}
.site-nav .nav-login:hover { border-color: var(--gold-500); color: var(--gold-500); }
.site-nav .nav-login .nav-avatar {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
  flex: 0 0 auto; margin-left: -6px;
  border: 1px solid rgba(255,255,255,.4);
}

/* Centered modal dialogs (account security / delete account) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1200; display: none;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(15, 23, 42, .55);
}
.modal-overlay.open { display: flex; }
.modal-card {
  position: relative; width: 100%; max-width: 420px;
  max-height: 90vh; overflow: auto;
  background: #fff; border-radius: 14px; padding: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .35);
}
.modal-card h3 { margin-bottom: 12px; }
.modal-close {
  position: absolute; top: 8px; right: 12px; border: 0; background: none;
  font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink-400); padding: 4px;
}
.modal-close:hover { color: #334155; }
/* Post card author chip → links to the author's public timeline */
.post-author { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.post-author .author-avatar {
  width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
}

/* Understated account actions under the profile form */
.account-links { font-size: 13.5px; color: var(--ink-400); }
.account-links a { color: #6b7280; }
.account-links a:hover { color: var(--navy-700); }
.account-links a.danger-link:hover { color: #dc2626; }
/* Language dropdown (flag + label) */
.lang-dropdown { position: relative; }

/* ── 语言切换在【顶栏本体】里，不在汉堡菜单里（Ray 2026-07-31）──────────────
   位置全靠 order 决定，DOM 里只有一份：
     · 手机 / 收起态 → 汉堡按钮【左边】，始终可见
     · 桌面一排时   → 导航【之后】，最右侧（与改动前的观感一致）
   `margin-left:auto` 负责把它推到右边：顶栏是 space-between，
   三个可见元素时若不推，它会停在正中间。 */
.header-inner > .lang-dropdown { margin: 0 6px 0 auto; flex: 0 0 auto; }
/* 手机上按钮要小一点 —— 顶栏里还有品牌区和汉堡，三样必须并排放得下 */
.header-inner > .lang-dropdown .lang-toggle { padding: 6px 10px; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); color: var(--line);
  border: 1px solid rgba(255,255,255,.25); border-radius: 9px;
  padding: 7px 14px; font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--gold-500); color: var(--gold-500); }
.lang-toggle .flag { font-size: 17px; line-height: 1; }
.lang-toggle .caret { font-size: 11px; opacity: .8; transition: transform .15s ease; }
.lang-dropdown.open .lang-toggle .caret { transform: rotate(180deg); }
.lang-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 200;
  min-width: 170px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; padding: 6px;
}
.lang-dropdown.open .lang-menu { display: block; }
.lang-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--ink-900) !important; font-size: 14.5px; font-weight: 600;
  border: 0 !important; text-decoration: none !important;
}
.lang-menu a .flag { font-size: 18px; line-height: 1; }
.lang-menu a:hover { background: var(--blue-50); color: var(--navy-700) !important; }
.lang-menu a.active { background: var(--gold-100); color: var(--gold-600) !important; }

/* ══════════════════════════════════════════════════════════════════════════
   顶栏一行到底 —— 2026-07-28 修

   ☠️ 问题：缅甸语首页顶栏高 118px（正常 62px），9 个元素被挤成两三行，很难看。
      泰语、中文也有同样的毛病，只是没那么夸张。

   ☠️ 根因有两层，只修一层没用：
      ① flex 子项默认 flex-shrink:1 —— 放不下时先被压扁，一压扁文字就换行。
         所以「Read & Learn」「Download BiblePro」「Ecclesia Global」都成了两行。
      ② 光加 nowrap 会走向另一个极端：实测缅甸语这一排需要 1157px，
         而容器（max-width 1320，减去品牌区）只给得出 868px —— 会直接撑破横向溢出。

   ★ 所以做成【自适应】：放得下就完整显示，放不下自动收成汉堡菜单（见 main.js 的 fitNav）。
     这样不依赖「每种语言的译文有多长」—— 以后改译文、加语言都不会再把顶栏挤坏。
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex; position: static; flex-direction: row; align-items: center;
    background: none; border: 0; padding: 0; gap: 4px;
  }
  /* ① 一律不换行、不被压扁 —— 顶栏永远是一行 */
  .site-nav > a, .site-nav > .nav-cta,
  .site-nav .nav-drop-toggle, .site-nav .nav-login,
  .brand-name, .brand-sub { white-space: nowrap; }
  .site-nav > a, .site-nav > .nav-dropdown, .site-nav > .nav-cta,
  .site-nav > .nav-login, .brand { flex: 0 0 auto; }
  .header-inner > .brand { min-width: 0; }

  /* ② 空间紧张时先收紧间距，再考虑收起 —— 能多留一档完整菜单就多留一档 */
  .site-nav a { border: 0; padding: 8px 12px; font-size: 15.5px; position: relative; }
  .site-nav a.active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
    height: 2px; border-radius: 2px; background: var(--gold-500);
  }
  /* 桌面：语言器排在导航之后（最右）。导航自己撑满并右对齐，
     否则 space-between 会把「导航」和「语言器」分到两端、中间裂一个大口子。 */
  .header-inner > .lang-dropdown { order: 3; margin: 0 0 0 8px; }
  .header-inner > .lang-dropdown .lang-toggle { padding: 7px 14px; }
  .site-nav { order: 2; flex: 1 1 auto; justify-content: flex-end; }
  .site-nav .nav-login {
    margin: 0 0 0 12px; padding: 8px 16px; font-size: 14.5px;
    border: 1px solid rgba(255,255,255,.35); align-self: center;
  }
}

/* ── 中等宽度：先收紧，尽量别收起 ────────────────────────────────────
   1200px 以下品牌副标题最先让位 —— 它是纯装饰，而缅甸语那句
   「ခရစ်ယာန် အရင်းအမြစ်များ」很长，占掉的正是菜单要用的地方。 */
@media (min-width: 900px) and (max-width: 1199px) {
  .site-nav { gap: 0; }
  .site-nav a { padding: 8px 8px; font-size: 15px; }
  .site-nav a.active::after { left: 8px; right: 8px; }
  .site-nav .nav-login { margin-left: 8px; padding: 7px 12px; font-size: 14px; }
  .header-inner > .lang-dropdown { margin-left: 4px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 17.5px; }
}

/* ── 中间档：先收紧，尽量别收起（由 main.js 的 fitNav 加上这个类）──────
   缅甸语那排菜单实测要 1157px，而 1920px 屏幕上顶栏也只有 1320px 减去品牌区 ——
   差一点点就要整排收进汉堡，很可惜。先把副标题、内边距、字号收一档再判断，
   多数情况下就够了。 */
@media (min-width: 900px) {
  .site-header.nav-tight .brand-sub { display: none; }
  .site-header.nav-tight .brand-name { font-size: 17px; }
  .site-header.nav-tight .site-nav { gap: 0; }
  .site-header.nav-tight .site-nav a,
  .site-header.nav-tight .site-nav .nav-drop-toggle { padding: 8px 7px; font-size: 14.5px; }
  .site-header.nav-tight .site-nav a.active::after { left: 7px; right: 7px; }
  .site-header.nav-tight .site-nav .nav-login { margin-left: 6px; padding: 7px 11px; font-size: 13.5px; }
  .site-header.nav-tight .header-inner > .lang-dropdown { margin-left: 4px; }
}

/* ── 放不下就收成汉堡菜单（由 main.js 的 fitNav 加上这个类）──────────
   ☠️ 纯 CSS 做不到「按内容实际宽度决定」：媒体查询只知道视口宽度，
      不知道这一排菜单在【当前语言】下要占多少。缅甸语要 1157px、英文只要 700 出头，
      写死一个断点必然有语言被夹坏 —— 要么挤成两行，要么早早收起浪费空间。 */
.site-header.nav-collapsed .site-nav {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  flex-direction: column; align-items: stretch;
  background: var(--navy-800); border-top: 1px solid rgba(255,255,255,.12);
  padding: 8px 0; gap: 0; z-index: 60;
}
.site-header.nav-collapsed .site-nav.open { display: flex; }
.site-header.nav-collapsed .nav-toggle { display: inline-flex; }
.site-header.nav-collapsed .site-nav > a,
.site-header.nav-collapsed .site-nav .nav-drop-toggle,
.site-header.nav-collapsed .site-nav > .nav-cta {
  padding: 11px 22px; white-space: normal;
}
.site-header.nav-collapsed .site-nav a.active::after { display: none; }
.site-header.nav-collapsed .site-nav .nav-login { margin: 8px 22px; }
.site-header.nav-collapsed .site-nav .nav-drop-menu {
  position: static; display: none; background: rgba(0,0,0,.18);
  border: 0; box-shadow: none; min-width: 0;
}
.site-header.nav-collapsed .site-nav .nav-dropdown.open .nav-drop-menu { display: block; }
.site-header.nav-collapsed .site-nav .nav-drop-menu a { padding-left: 38px; }
/* 收起态（宽屏但菜单放不下时也会进这个态）：语言器回到汉堡按钮左边。
   特异度高于上面 @media 里那条 order:3，所以两处宽度都按这条走。 */
.site-header.nav-collapsed .header-inner > .lang-dropdown { order: 0; margin: 0 6px 0 auto; }
.site-header { position: relative; }

/* ⚠️ 这里【曾经】写着 `.lang-menu { position: static }` —— 那是给「菜单在汉堡抽屉里
   顺流展开」用的。语言器搬到顶栏后必须去掉：static 会让它把顶栏顶开、把整页往下挤。
   现在它一律是锚在按钮下方的浮层。 */
@media (max-width: 899px) {
  .lang-menu { right: 0; min-width: 150px; }
}

/* "Read & Learn" content dropdown (articles / Q&A / devotionals) */
.nav-dropdown { position: relative; }
.nav-drop-toggle {
  display: flex; align-items: center; gap: 7px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--line); padding: 11px 4px; font-weight: 500;
  font-size: 16px; font-family: var(--font);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-drop-toggle:hover { color: var(--gold-500); }
.nav-drop-toggle.active { color: var(--gold-500); font-weight: 700; }
.nav-drop-toggle .caret { font-size: 11px; opacity: .8; transition: transform .15s ease; }
.nav-dropdown.open .nav-drop-toggle .caret { transform: rotate(180deg); }
.site-nav .nav-drop-menu { display: none; }
.nav-dropdown.open .nav-drop-menu { display: block; }

/* 下拉项 / 登录项里的 SVG 图标 —— 替代原先的 emoji（💬🙏🔍👤⬇）。
   emoji 在四种语言的系统上渲染各不相同，缅甸文/泰文系统上还常缺字形变豆腐块；
   SVG 用 currentColor，跟着文字颜色走，hover 和 active 态自动一致。 */
.nav-ico {
  width: 17px; height: 17px; flex: none;
  vertical-align: -3px; margin-right: 7px;
  stroke: currentColor; opacity: .75;
}
.nav-drop-menu a:hover .nav-ico,
.nav-drop-menu a.active .nav-ico { opacity: 1; }
.nav-login .nav-ico { margin-right: 5px; }
@media (max-width: 899px) {
  /* Sub-items flow inline, indented under the toggle. */
  .site-nav .nav-drop-menu a { padding-left: 22px; font-size: 15px; }
  /* Keep the current section visible even when collapsed. */
  .nav-dropdown.open-section .nav-drop-menu { display: block; }
}
@media (min-width: 900px) {
  .nav-drop-toggle { width: auto; border: 0; padding: 8px 12px; font-size: 15.5px; position: relative; }
  .nav-drop-toggle.active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
    height: 2px; border-radius: 2px; background: var(--gold-500);
  }
  .site-nav .nav-drop-menu {
    position: absolute; left: 0; top: 100%; z-index: 200;
    min-width: 190px; background: #fff; border: 1px solid var(--line);
    border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; padding: 6px;
  }
  .nav-dropdown:hover .nav-drop-menu { display: block; }
  .site-nav .nav-drop-menu a {
    display: block; padding: 10px 12px; border-radius: 8px;
    color: var(--ink-900) !important; font-size: 14.5px; font-weight: 600;
  }
  .site-nav .nav-drop-menu a:hover { background: var(--blue-50); color: var(--navy-700) !important; }
  .site-nav .nav-drop-menu a.active { background: var(--gold-100); color: var(--gold-600) !important; }
  .site-nav .nav-drop-menu a.active::after { display: none; }
}

/* ---------- Google sign-in ---------- */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: var(--ink-900); border: 1px solid var(--line);
}
.btn-google:hover { background: var(--blue-50); color: var(--ink-900); }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--ink-400); font-size: 13.5px;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ---------- Flash messages ---------- */
.flash { margin: 14px 0; padding: 13px 16px; border-radius: 10px; font-weight: 500; }
.flash-success { background: #e8f6ec; color: var(--success); border: 1px solid #bfe3c9; }
.flash-error   { background: #fdecec; color: var(--error); border: 1px solid #f3c3c3; }
.flash-info    { background: var(--blue-100); color: var(--navy-700); border: 1px solid #c9d9ee; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 420px at 85% -10%, rgba(201,162,39,.22), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 70%, var(--navy-600) 100%);
  color: #fff;
  padding: 52px 0 56px;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.22; font-weight: 800; letter-spacing: .2px;
  max-width: 21em;
}
.hero .hero-sub {
  margin-top: 16px; max-width: 46em;
  color: var(--line); font-size: clamp(15px, 2.4vw, 17.5px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero .btn-outline { border-color: #fff; color: #fff; }
.hero .btn-outline:hover { background: #fff; color: var(--navy-800); }

.hero-search { margin-top: 28px; max-width: 640px; }
.hero-search form { display: flex; gap: 0; box-shadow: var(--shadow-lg); border-radius: 12px; overflow: hidden; }
.hero-search input[type="search"] {
  flex: 1; min-width: 0; border: 0; padding: 15px 18px; font-size: 16px;
  font-family: var(--font); outline: none;
}
.hero-search button {
  border: 0; background: var(--gold-500); color: var(--navy-900);
  font-weight: 700; font-size: 16px; padding: 0 24px; cursor: pointer;
}
.hero-search button:hover { background: var(--gold-600); }

.hero-stats { display: flex; flex-wrap: wrap; gap: var(--s-5) var(--s-7); margin-top: var(--s-6); }
.hero-stat .num { font-size: 26px; font-weight: 800; color: var(--gold-500); }
.hero-stat .label { font-size: var(--t-sm); color: #B7C4CE; }
/* 统计来源说明 —— 「186 万」里绝大多数是公开数据集导入、没人核实过。
   不写这一句，用户会把它读成「186 万间已核实教会」。诚实比数字好看重要。 */
.hero-stats-note {
  margin-top: var(--s-3); max-width: 640px;
  font-size: var(--t-caption); line-height: 1.55; color: #97A6B3;
}

/* ---------- Hero 右侧的 BiblePro 下载位（2026-07-31）----------
   起因：Ray 截图指出「右边的空间实在是空荡荡的」——
   1900px 宽的屏上，Hero 文字最宽 46em，右边约三分之一首屏是纯渐变。

   ⚠️ 断点定在 1000px 而不是常用的 900：
      900 那档右栏只剩约 250px，手机截图缩到那个宽度就看不清界面了，
      而看不清的截图起不到「展示 App 长什么样」的作用，不如不放。 */
.hero-grid { display: grid; gap: var(--s-6); }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 330px; align-items: center; gap: var(--s-8); }
}
/* ⚠️ min-width:0 —— grid 子项默认 min-width:auto，长单词/长 URL 会把左栏撑破，
      表现是右栏被挤出容器。这一行是 grid 布局的常规必需项，不是可省的。 */
.hero-main { min-width: 0; }

.hero-app { display: none; }               /* 默认不出现，够宽才显示（见下方 @media） */
@media (min-width: 1000px) {
  .hero-app {
    display: block; text-align: center;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 20px;
    padding: var(--s-5) var(--s-4) var(--s-4);
    backdrop-filter: blur(6px);
  }
}
/* 产品图：800×500 的横版合成图（Mac + iPhone，机身框已烘焙在图里）。
   ☠️ 第一版我给它套了个 CSS 手机外框 —— 因为我<b>按想象中的「竖版手机截图」设计，
      没先量图的真实尺寸</b>，渲染出来是框套框。所以这里不加任何边框，只做圆角。
   往两侧各扩 4px 让图与卡片边缘齐平：卡内 padding 是给文字的，图留白反而显得局促。 */
.hero-app-shot {
  display: block; width: calc(100% + 8px); height: auto;
  margin: 0 -4px var(--s-4);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .34);
}
.hero-app-icon { border-radius: 11px; margin: 0 auto var(--s-2); display: block; }
.hero-app-h {
  font-size: 15px; font-weight: 700; color: #fff;
  margin: 0 0 var(--s-3); line-height: 1.45;
}
.hero-app .btn-gold { width: 100%; }
.hero-app-note { font-size: 11.5px; color: #97A6B3; margin: var(--s-2) 0 0; }

/* 整张卡可点 —— 用户看到产品截图的第一反应是点图，点了没反应会以为坏了。
   ☠️ <b>不能把整块包进 <a></b>：里面已经有一个下载按钮，
      <a> 套 <a> 是无效 HTML，浏览器会把它拆开，结果是链接错位、键盘 Tab 顺序乱掉。
   → 用按钮自己的链接「铺满」整张卡（伪元素撑满）：
     整卡可点，但<b>仍然只有一个链接</b> —— 屏幕阅读器和 Tab 键都跟原来一样。 */
.hero-app { position: relative; }
.hero-app .btn-gold::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.hero-app:hover .btn-gold { background: var(--gold-600); }   /* 让整卡的可点性看得出来 */
.hero-app-shot { cursor: pointer; }

/* ---- 手机上的替代形态：一条横幅 ----
   Hero 右栏在窄屏整块隐藏（竖着堆会把统计数字挤到第二屏外），
   但手机用户恰恰是唯一能立刻装 App 的人 —— 不能把广告对他们藏掉。 */
.hero-app-bar {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 11px var(--s-4);
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.hero-app-bar img { border-radius: 9px; flex: none; }
.hero-app-bar-t {
  flex: 1; min-width: 0; font-size: 13px; line-height: 1.35; color: var(--blue-100);
  /* 两行截断：缅甸文/泰文的这句话比中英文长得多，不截会把按钮挤没 */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-app-bar-b {
  flex: none; background: var(--gold-500); color: var(--navy-900);
  font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 8px;
  white-space: nowrap;
}
@media (min-width: 1000px) { .hero-app-bar { display: none; } }
/* 极窄屏（320px 的老 iPhone SE / 折叠屏外屏）收紧一圈。
   ☠️ 实测发现的：320px + 缅甸语时，按钮要占 183px，那句描述<b>只剩 45px</b> ——
      两行、每行三个字，不溢出，但看着像坏了。缅甸语是四种语言里最长的，
      只按中英文估宽度就会漏掉这种情况。 */
@media (max-width: 400px) {
  .hero-app-bar { gap: var(--s-2); padding: 10px 12px; }
  .hero-app-bar img { width: 30px; height: 30px; }
  /* 描述整句去掉 —— 先试过只缩小字号，320px 下它仍然只有 78px 宽：
     截成「BiblePro ဖြင့် နေ့စဉ်…」这样的残句，缅甸文的音标还被行截断削掉一截。
     残句不如没有；按钮上写着「下载 BiblePro」，话已经说清楚了。 */
  .hero-app-bar-t { display: none; }
  .hero-app-bar-b { flex: 1; text-align: center; font-size: 13px; }
}

/* 区块标题前的图标 —— 替代原先的 emoji（🌏🕊️📰❓）。
   emoji 会跟着系统字体走：同一个 🕊️ 在 Windows / macOS / 安卓上是三个样子，
   在缅甸文/泰文系统上还可能整个缺字形。SVG 用 currentColor，四端一致。 */
.sec-ico {
  width: 21px; height: 21px; vertical-align: -3px; margin-right: 8px;
  stroke: var(--gold-600); opacity: .9;
}

/* ---------- Sections ---------- */
.section { padding: 46px 0; }
.section-soft { background: var(--bg-soft); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 22px; flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(21px, 3.4vw, 27px); font-weight: 800; color: var(--navy-800);
}
.section-head .more { font-weight: 600; font-size: 15px; white-space: nowrap; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-cats { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-cats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid-cats { grid-template-columns: 1fr; } }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

.cat-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  text-decoration: none !important; color: inherit;
  transition: transform .12s ease, box-shadow .15s ease;
}
a.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cat-card .icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; background: var(--blue-100); color: var(--navy-700);
}
.cat-card h3 { font-size: 17px; color: var(--navy-800); margin-bottom: 3px; }
.cat-card p { font-size: 14px; color: var(--ink-600); }
.cat-card.disabled { opacity: .62; }

/* ---------- 平台四大支柱卡（首页）----------
   与 .cat-card 的区别是有意的：这四张是<b>平台入口</b>，不是列表项。
   所以竖排、有明确 CTA、四种配色各不相同但同一色系 ——
   目的是让人一眼看出「这是四个不同的地方」，而不是四张一样的白卡。

   ⚠️ 层次靠【边框 + 极浅底色】做，不是靠阴影。
      阴影只在 hover 时轻微出现；一上来就四张浮起来的卡 = 廉价模板观感。 */
.grid-pillars { grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
@media (max-width: 1080px) { .grid-pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .grid-pillars { grid-template-columns: 1fr; } }

.pillar-card {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-5) var(--s-4) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-decoration: none !important; color: inherit;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
a.pillar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--ink-400);
}
.pillar-ico {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--s-1);
}
.pillar-ico svg { width: 23px; height: 23px; }
.pillar-ico img { width: 26px; height: 26px; border-radius: 7px; }
.pillar-card h3 {
  font-size: var(--t-h4); line-height: 1.3; color: var(--navy-800); font-weight: 700;
}
.pillar-card p {
  font-size: var(--t-sm); line-height: 1.6; color: var(--ink-600); flex: 1 1 auto;
}
.pillar-cta {
  margin-top: var(--s-2); font-size: var(--t-sm); font-weight: 700; color: var(--navy-700);
}
a.pillar-card:hover .pillar-cta { color: var(--navy-800); }
.pillar-card.disabled { opacity: .6; }

/* 四种配色 —— 同一色系里拉开层次，不是四个撞色 */
.pillar-churches  .pillar-ico { background: #E7EEF3; color: var(--navy-700); }
.pillar-community .pillar-ico { background: var(--success-bg); color: var(--success); }
.pillar-faith     .pillar-ico { background: var(--gold-100); color: var(--gold-600); }
.pillar-app       .pillar-ico { background: var(--bg-soft); }

.badge-soon {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 20px;
  background: var(--gold-100); color: var(--gold-600);
  font-size: 11.5px; font-weight: 700; vertical-align: middle;
}

/* Church cards */
.church-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.church-card h3 { font-size: 18px; line-height: 1.35; }
.church-card h3 a { color: var(--navy-800); }
/* The church's name in its other language. Pulled back against the card's 10px
   flex gap so it reads as part of the title block, not as another metadata row. */
.church-alt-name { margin-top: -6px; font-size: 14.5px; line-height: 1.35; color: var(--ink-600); }
.church-meta { font-size: 14px; color: var(--ink-600); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.church-meta span { display: inline-flex; align-items: center; gap: 5px; }
.church-desc { font-size: 14.5px; color: var(--ink-600); }
.church-card .card-foot { margin-top: auto; padding-top: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 700;
}
.badge-verified { background: #e8f6ec; color: var(--success); }
.badge-online   { background: var(--blue-100); color: var(--navy-700); }
.badge-lang     { background: var(--bg-soft); color: var(--ink-600); border: 1px solid var(--line); font-weight: 600; }

/* Chip links (cities / languages) */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-block; padding: 9px 18px; border-radius: 24px;
  background: #fff; border: 1px solid var(--line); color: var(--navy-700);
  font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow);
  text-decoration: none !important;
}
.chip:hover { border-color: var(--gold-500); color: var(--gold-600); }
.chip small { color: var(--ink-400); font-weight: 500; }

/* ---------- BiblePro CTA block ---------- */
.cta-block {
  background:
    radial-gradient(600px 260px at 90% 0%, rgba(201,162,39,.25), transparent 60%),
    linear-gradient(150deg, var(--navy-800), var(--navy-600));
  color: #fff; border-radius: var(--radius);
  padding: 34px 28px; box-shadow: var(--shadow-lg);
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px 34px;
}
.cta-block .cta-appicon { width: 72px; height: 72px; border-radius: 16px; box-shadow: var(--shadow-lg); flex-shrink: 0; }
.cta-block .cta-text { flex: 1 1 320px; }
.cta-block h2, .cta-block h3 { font-size: clamp(19px, 3vw, 24px); margin-bottom: 8px; }
.cta-block p { color: var(--line); font-size: 15px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.breadcrumbs ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 0; font-size: 13.5px; color: var(--ink-400);
}
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--ink-400); }
.breadcrumbs a { color: var(--ink-600); }
.breadcrumbs span[aria-current] { color: var(--navy-700); font-weight: 600; }

/* ---------- Page headers ---------- */
.page-head { background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 38px 0; }
.page-head h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; }
.page-head p { margin-top: 10px; color: var(--line); max-width: 52em; }
/* The other-language name in the hero. Stated explicitly rather than left to
   `.page-head p` winning on specificity: the card rule paints it ink-grey,
   which is all but invisible on the navy gradient. */
.page-head .church-alt-head { margin-top: 4px; font-size: clamp(15px, 2.2vw, 19px); color: var(--line); }
/* Title row with an inline share button (replaces the old standalone panel) */
.ph-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ph-row h1 { min-width: 0; }
.page-head .share-dropdown { flex: 0 0 auto; margin-top: 4px; }
.page-head .share-toggle {
  color: #fff; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .32); border-radius: 9px; padding: 8px 16px;
}
.page-head .share-toggle:hover { background: rgba(255, 255, 255, .2); }

/* ---------- Filters ---------- */
.filters {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 24px;
}
.filters .filter-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.filters .filter-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.filters .full { grid-column: 1 / -1; }

label { display: block; font-size: 13.5px; font-weight: 700; color: var(--navy-800); margin-bottom: 5px; }
input[type="text"], input[type="search"], input[type="email"], input[type="url"],
input[type="password"], input[type="date"], input[type="number"], select, textarea {
  width: 100%; padding: 11px 13px; font-size: 15px; font-family: var(--font);
  border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-900);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(62,109,181,.15);
}
.checkbox-inline { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; color: var(--ink-600); }
.checkbox-inline input { width: auto; }

/* Honeypot — hide from humans, keep in DOM for bots */
.hp-wrap { position: absolute !important; left: -9999px !important; top: -9999px !important; height: 1px; overflow: hidden; }

/* ---------- Church directory: filters | cards | app promo ---------- */
.directory-layout { display: grid; gap: 24px; align-items: start; }
/* wide: three columns — filters left, cards centre, promo right */
@media (min-width: 1100px) {
  .directory-layout { grid-template-columns: 244px minmax(0, 1fr) 300px; }
}
/* medium: filters left + cards; promo drops full-width below */
@media (min-width: 760px) and (max-width: 1099px) {
  .directory-layout { grid-template-columns: 232px minmax(0, 1fr); }
  .dir-rail { grid-column: 1 / -1; }
}
.dir-filters { display: flex; flex-direction: column; gap: 14px; }
.filters-side { margin-bottom: 0; }
.filters-side .filter-grid { grid-template-columns: 1fr; }
.filter-actions-col { flex-direction: column; align-items: stretch; margin-top: 12px; }
.filter-actions-col .checkbox-inline { margin-bottom: 6px; }
.dir-side-links { display: flex; flex-direction: column; gap: 10px; }
.dir-main { min-width: 0; }
@media (min-width: 1100px) {
  .dir-filters, .dir-rail-sticky { position: sticky; top: 82px; }
}
/* the promo renders vertically in the narrow right rail */
.dir-rail-sticky .cta-block { flex-direction: column; text-align: center; padding: 26px 22px; gap: 16px; }
.dir-rail-sticky .cta-block .cta-text { flex: 1 1 auto; }
.dir-rail-sticky .cta-block .btn { width: 100%; justify-content: center; }

/* ---------- Church detail ---------- */
.detail-layout { display: grid; gap: 24px; }
@media (min-width: 900px) { .detail-layout { grid-template-columns: 1fr 340px; align-items: start; } }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 22px; }

/* List pages (Q&A / devotionals): content grid + a side BiblePro promo.
   The side promo shows on wider screens; on mobile it is hidden and the
   bottom CTA covers it, so the ad is never crammed into the middle. */
.list-layout { display: grid; gap: 24px; }
@media (min-width: 1000px) { .list-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.list-main { min-width: 0; }
.list-side { display: none; }
@media (min-width: 1000px) {
  .list-side { display: block; position: sticky; top: 84px; }
}

/* ---------- Detail sidebar widgets ---------- */
.side-widget { padding: 16px 18px; }
.side-widget-h {
  font-size: 15px; color: var(--navy-800, var(--navy-800));
  margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--bg-soft, var(--bg-soft));
}
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 8px 0; border-bottom: 1px solid var(--bg-soft, var(--bg-soft)); }
.side-list li:last-child { border-bottom: 0; }
.side-list a {
  display: block; color: var(--ink-900, #1a2233); text-decoration: none !important;
  font-size: 14px; line-height: 1.5; font-weight: 600;
}
.side-list a:hover { color: var(--navy-700, var(--navy-700)); }
.side-date { display: block; font-size: 12px; color: var(--ink-400, var(--ink-400)); font-weight: 400; margin-top: 2px; }
.side-list-num { counter-reset: sl; }
.side-list-num li { counter-increment: sl; position: relative; padding-left: 26px; }
.side-list-num li::before {
  content: counter(sl); position: absolute; left: 0; top: 8px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--gold-100, #fdf6e3);
  color: var(--gold-600, #a67c12); font-size: 11px; font-weight: 700;
  line-height: 18px; text-align: center;
}
.side-list-num li:nth-child(-n+3)::before { background: var(--navy-700, var(--navy-700)); color: #fff; }
.side-more {
  display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600;
  color: var(--navy-700, var(--navy-700)); text-decoration: none !important;
}
.side-more:hover { color: var(--gold-600, #a67c12); }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.panel h2, .panel h3 { color: var(--navy-800); margin-bottom: 14px; font-size: 19px; }

.dl-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.dl-table th, .dl-table td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--bg-soft); vertical-align: top; }
.dl-table th { color: var(--ink-400); font-weight: 600; white-space: nowrap; width: 38%; }
.dl-table td { color: var(--ink-900); word-break: break-word; }

.disclaimer {
  background: var(--gold-100); border: 1px solid #e8d9a8; border-radius: 10px;
  padding: 14px 16px; font-size: 13.5px; color: #6b5a17; line-height: 1.6;
}
.disclaimer p + p { margin-top: 8px; }

.action-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Share buttons ---------- */
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 9px; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-600);
  cursor: pointer; text-decoration: none !important;
}
.share-btn:hover { border-color: var(--blue-500); color: var(--blue-500); }

/* ---------- Download page ---------- */
.dl-buttons { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 760px; }
.dl-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 16px; border-radius: 14px; text-align: center;
  font-weight: 700; font-size: 16px; cursor: pointer; border: 0;
  text-decoration: none !important;
  transition: transform .12s ease, box-shadow .15s ease;
  box-shadow: var(--shadow);
}
.dl-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dl-btn small { font-weight: 500; font-size: 12.5px; opacity: .8; }
.dl-btn-android { background: var(--navy-800); color: #fff; }
.dl-btn-ios { background: var(--navy-600); color: #fff; }
.dl-btn-web { background: var(--gold-500); color: var(--navy-900); }
.dl-btn-copy { background: #fff; color: var(--navy-800); border: 2px solid var(--navy-700); }

.qr-box {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; text-align: center; max-width: 340px;
}
.qr-box img { width: 210px; height: 210px; object-fit: contain; }
.qr-placeholder {
  width: 210px; height: 210px; margin: 0 auto; border-radius: 12px;
  border: 2px dashed var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--ink-400); font-size: 13.5px; padding: 16px;
}

/* Feature list */
.feature-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.feature-item {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-weight: 600; font-size: 15px; color: var(--navy-800);
  box-shadow: var(--shadow);
}
.feature-item .dot {
  flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold-500);
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 800px; }
.faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 4px 20px; box-shadow: var(--shadow);
}
.faq-item summary {
  cursor: pointer; font-weight: 700; color: var(--navy-800);
  padding: 14px 0; list-style: none; position: relative; padding-right: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 21px; color: var(--gold-600); font-weight: 400;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-a { padding: 0 0 16px; color: var(--ink-600); font-size: 15px; }

/* Screenshots placeholder */
.shots-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); max-width: 760px; }
.shot-ph {
  aspect-ratio: 9 / 17; border-radius: 18px; border: 2px dashed var(--line);
  background: var(--bg-soft); display: flex; align-items: center; justify-content: center;
  color: var(--ink-400); font-size: 12.5px; text-align: center; padding: 10px;
}

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.pagination a, .pagination span {
  min-width: 40px; padding: 9px 13px; text-align: center; border-radius: 9px;
  background: #fff; border: 1px solid var(--line); color: var(--navy-700);
  font-weight: 600; font-size: 14.5px; text-decoration: none !important;
}
.pagination .current { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.pagination a:hover { border-color: var(--gold-500); }

/* ---------- Prose (articles, devotionals, Q&A, static pages) ---------- */
.prose { max-width: none; }
.prose h2 { color: var(--navy-800); font-size: 21px; margin: 28px 0 10px; }
.prose h3 { color: var(--navy-800); font-size: 18px; margin: 22px 0 8px; }
.prose h4 { color: var(--navy-800); font-size: 16.5px; margin: 18px 0 6px; }
.prose p { margin: 12px 0; color: var(--ink-600); }
.prose p:first-child { margin-top: 0; }
.prose ul, .prose ol { margin: 12px 0; padding-left: 28px; color: var(--ink-600); }
.prose li { margin: 4px 0; }
.prose img { border-radius: 10px; box-shadow: var(--shadow); margin: 14px 0; }
.prose blockquote {
  margin: 16px 0; padding: 10px 16px; border-left: 4px solid var(--gold-500);
  background: var(--blue-50); border-radius: 0 10px 10px 0; color: var(--ink-600);
}
.prose blockquote p { margin: 6px 0; }
.prose hr { border: 0; border-top: 2px solid var(--line); margin: 22px 0; }
.prose pre {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; overflow-x: auto; font-size: 14px; margin: 14px 0;
}
.prose table { border-collapse: collapse; margin: 14px 0; width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { background: var(--blue-50); color: var(--navy-800); }
.prose a { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #b9c7da; margin-top: 56px; }
/* Footer content spans a wider band than the page container so it fills
   large screens instead of clustering in the middle. */
.site-footer .container { max-width: 1500px; }
.footer-grid {
  display: grid; gap: 24px 18px; padding: 34px 18px 22px;
  grid-template-columns: 1fr 1fr;
}
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.7fr 1fr 1fr; gap: 40px; padding: 48px 18px 28px; }
  .footer-brand { grid-column: auto; }
}
/* Add the BiblePro promo column on wider screens (four balanced columns). */
@media (min-width: 1000px) {
  .footer-grid { grid-template-columns: 1.7fr 1fr 1fr 1.5fr; }
}
.footer-app-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.footer-app-brand h4 { margin: 0; }
.footer-app-icon { width: 46px; height: 46px; border-radius: 11px; flex: 0 0 auto; box-shadow: var(--shadow); }
.footer-app-text { margin: 0 0 14px; font-size: 14px; color: #b9c7da; max-width: 22em; }
.footer-app .btn { font-weight: 700; }
.footer-app-btn { display: inline-block; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #cdd8e8; font-size: 15px;
}
.footer-social a:hover { background: var(--gold-500); color: var(--navy-900); }
@media (max-width: 999px) { .footer-app { grid-column: 1 / -1; } }
.footer-col h4 {
  color: #fff; font-size: 15px; text-transform: uppercase;
  letter-spacing: .8px; margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #b9c7da; font-size: 14.5px; }
.footer-col a:hover { color: var(--gold-500); }
.footer-tagline { margin-top: 14px; font-size: 14px; max-width: 34em; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px; font-size: 12.5px; color: #7d8ca3;
  display: flex; flex-direction: column; gap: 6px;
}
@media (min-width: 720px) { .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-bottom p:first-child { max-width: 56em; }

/* ---------- Bottom tab bar (mobile, app style) ---------- */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  display: flex; align-items: stretch;
  background: rgba(22, 38, 74, .97); /* navy-800 */
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 18px rgba(16, 28, 51, .3);
}
.tab-item {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 3px; padding: 8px 2px 7px;
  color: #b9c7da; font-size: 11px; font-weight: 600; font-family: var(--font);
  /* Burmese/Thai stacked marks need the taller line box. */
  line-height: 1.7; text-align: center;
  background: none; border: 0; cursor: pointer;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}
.tab-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-item svg { width: 22px; height: 22px; flex: 0 0 auto; }
.tab-item:hover { color: #fff; }
.tab-item.active { color: var(--gold-500); }
/* 底部导航正中央那个凸起的大按钮。
   2026-07-29 起装的是【地图】（原先是跳出站外的 BiblePro，见 siteFooter.html 的注释）。
   .tab-app 选择器保留，方便将来想把某个功能重新放回中央位。 */
.tab-app .tab-app-btn, .tab-map .tab-app-btn {
  width: 46px; height: 46px; margin-top: -20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--gold-500), var(--gold-600));
  color: var(--navy-900);
  box-shadow: 0 4px 14px rgba(198, 154, 75, .40), 0 0 0 4px var(--navy-800);
}
.tab-app .tab-app-btn svg, .tab-map .tab-app-btn svg { width: 23px; height: 23px; }
.tab-app > span:last-child, .tab-map > span:last-child { color: var(--gold-500); }
.tab-app:hover .tab-app-btn, .tab-map:hover .tab-app-btn {
  background: linear-gradient(150deg, #D4AC63, var(--gold-500));
}

.tab-toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(6px);
  bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 130;
  padding: 9px 20px; border-radius: 22px;
  background: var(--navy-900); color: #fff;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.tab-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 899px) {
  /* Keep page content and footer clear of the fixed tab bar. */
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}
@media (min-width: 900px) {
  .tab-bar, .tab-toast { display: none; }
}

/* ---------- Utilities ---------- */
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 34px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-muted { color: var(--ink-400); font-size: 14px; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Me tab unread dot ---------- */
.tab-icon { position: relative; display: inline-flex; }
.tab-dot {
  position: absolute; top: -4px; right: -9px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
  background: #e5484d; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px var(--navy-800);
}

/* ---------- Notifications (me.php) ---------- */
.notif-list { list-style: none; }
.notif-item a {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 10px; border-radius: 10px; color: var(--ink-900);
  text-decoration: none !important; border-bottom: 1px solid var(--bg-soft);
}
.notif-item a:hover { background: var(--blue-50); }
.notif-item.unread a { background: var(--gold-100); }
.notif-item.unread a:hover { background: #f3e7c3; }
.notif-icon { flex: 0 0 auto; font-size: 17px; line-height: 1.4; }
.notif-body { font-size: 14.5px; line-height: 1.5; }
.notif-body em { color: var(--navy-700); font-style: normal; }
.notif-time { display: block; font-size: 12px; color: var(--ink-400); margin-top: 2px; }

/* ---------- Onboarding banner (new users) ---------- */
.onboard-panel { border-left: 4px solid var(--gold-500); }
.onboard-panel h3 { margin-bottom: 6px; }
.onboard-panel p { color: var(--ink-600); font-size: 14.5px; }

/* ---------- Danger zone (delete account) ---------- */
.panel-danger { border-color: #f3c3c3; }
.panel-danger h3 { color: var(--error); }
.btn-danger { background: #fdecec; color: var(--error); border: 1.5px solid #f3c3c3; }
.btn-danger:hover { background: var(--error); color: #fff; border-color: var(--error); }

/* ---------- Faith Q&A ---------- */
.answer-official {
  background: var(--gold-100, #fdf6e3);
  border-radius: 10px;
  padding: 14px !important;
  border-bottom: none !important;
  margin-bottom: 10px;
}

/* ---------- Devotionals ---------- */
.devo-scripture { border-left: 4px solid var(--gold-500, var(--gold-500)); }
.scripture-quote {
  margin: 10px 0 2px;
  padding: 4px 2px 4px 12px;
  font-size: 17px;
  line-height: 1.9;
  color: var(--navy-700, var(--navy-700));
  font-style: italic;
}
.devo-verse { font-style: italic; color: var(--ink-600, var(--ink-600)); }

/* ---------- Facebook-style interactions (like + comments) ---------- */
.fb-box { margin-top: 10px; }
.fb-actions {
  display: flex; gap: 4px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 3px 0; margin-bottom: 8px;
}
.fb-act {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: none; border: 0; border-radius: 8px; cursor: pointer;
  padding: 8px 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-600);
  font-family: var(--font); text-decoration: none !important;
}
.fb-act:hover { background: var(--blue-50); text-decoration: none; }
.fb-act.liked { color: var(--blue-500); }
.fb-act .fb-ico,
.feed-act .fb-ico { font-size: 16px; }
.fb-act.liked .fb-ico { transform: scale(1.15); }

/* ---------- Share dropdown (single button + menu) ---------- */
.share-dropdown { position: relative; }
.fb-actions .share-dropdown { flex: 1; display: flex; }
.fb-actions .share-dropdown .share-toggle { flex: 1; }
/* Feed card: the share button is one of the equal-width actions in the row. */
.feed-actions .share-dropdown { flex: 1; display: flex; }
.feed-actions .share-dropdown .share-toggle { flex: 1; }
.share-menu-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  display: none; min-width: 210px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px;
}
.share-dropdown.open .share-menu-pop { display: block; }
.share-pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 8px; background: none; border: 0;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  color: var(--ink-700); text-align: left; cursor: pointer;
  text-decoration: none !important; white-space: nowrap;
}
.share-pop-item:hover { background: var(--bg-soft); color: var(--ink-900); }
/* Standalone share (pages without the like/comment bar) */
.share-row-single { display: flex; }
.share-row-single .share-toggle {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 18px;
  color: var(--ink-600); flex: 0 0 auto;
}
.share-row-single .share-toggle:hover { border-color: var(--blue-500); color: var(--blue-500); background: none; }
.fb-count {
  background: var(--blue-100); color: var(--navy-700);
  border-radius: 999px; padding: 1px 8px; font-size: 12.5px; font-weight: 700;
}
.fb-comment { display: flex; gap: 9px; margin: 10px 0; }
.fb-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; object-fit: cover;
}
.fb-avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy-600); color: #fff; font-weight: 700; font-size: 14px;
}
.fb-bubble {
  background: var(--bg-soft); border-radius: 14px; padding: 8px 13px;
  max-width: 100%; overflow-wrap: anywhere;
}
.fb-bubble strong { font-size: 13.5px; color: var(--navy-800); display: block; }
.fb-bubble p { margin: 2px 0 0; font-size: 14.5px; color: var(--ink-900); }
.fb-bubble time { font-size: 11.5px; color: var(--ink-400); }
.fb-form { display: flex; gap: 9px; align-items: center; margin-top: 10px; }
.fb-form input[type="text"] {
  flex: 1; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px; font-size: 14.5px; font-family: var(--font);
  background: var(--bg-soft);
}
.fb-form input[type="text"]:focus { outline: none; border-color: var(--blue-500); background: #fff; }
.fb-send {
  background: var(--gold-500); color: var(--navy-900); border: 0; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%; font-size: 15px; flex: 0 0 auto;
}
.fb-send:hover { background: var(--gold-600); }
.fb-send:disabled { opacity: .5; }
.fb-pending {
  background: var(--gold-100); color: var(--gold-600);
  border-radius: 10px; padding: 8px 12px; font-size: 13.5px; margin: 8px 0 0;
}
.fb-login-hint { font-size: 14px; margin-top: 8px; }
.fb-compact .fb-actions { border-bottom: 0; padding-bottom: 0; margin-bottom: 4px; }

/* ---------- Me page: my questions / answers list ---------- */
.my-list { list-style: none; padding: 0; }
.my-list li {
  padding: 10px 0; border-bottom: 1px solid var(--bg-soft, var(--bg-soft));
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 14.5px;
}
.my-list li a { font-weight: 600; }
.my-list li .text-muted { font-size: 13px; }

/* ---------- Mobile hero polish ---------- */
@media (max-width: 640px) {
  .hero { padding: 34px 0 38px; }
  .hero h1 { font-size: 25px; line-height: 1.3; }
  .hero .hero-sub { font-size: 14.5px; line-height: 1.7; margin-top: 12px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
  .hero-actions .btn {
    width: 100%; padding: 13px 8px; font-size: 15px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  /* First (primary) action spans the full row; a lone second one too. */
  .hero-actions .btn:first-child { grid-column: 1 / -1; }
  .hero-actions .btn:nth-child(2):last-child { grid-column: 1 / -1; }
  .hero-search { margin-top: 16px; }
  .hero-search input[type="search"] { padding: 13px 14px; font-size: 15px; }
  .hero-search button { padding: 0 18px; font-size: 15px; }
  .hero-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
    margin-top: 24px; padding: 13px 4px; text-align: center;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
  }
  .hero-stat + .hero-stat { border-left: 1px solid rgba(255, 255, 255, .14); }
  .hero-stat .num { font-size: 21px; }
  .hero-stat .label { font-size: 12px; }
}

/* ---------- BiblePro app icon inside download buttons ---------- */
.btn-appicon {
  width: 22px; height: 22px; border-radius: 6px;
  vertical-align: -5px; margin-right: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.dl-btn .dl-appicon {
  width: 34px; height: 34px; border-radius: 8px; margin-bottom: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}

/* ---------- Dismissible "download BiblePro" bottom banner ---------- */
.app-banner {
  position: fixed; left: 12px; right: 12px; z-index: 95;
  /* Sits above the mobile tab-bar (~60px); desktop media query lowers it. */
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  margin: 0 auto; max-width: 620px;
  display: flex; align-items: center; gap: 12px;
  background: var(--navy-800); color: var(--line);
  border: 1px solid rgba(255,255,255,.14); border-radius: 16px;
  padding: 10px 12px; box-shadow: var(--shadow-lg);
}
.app-banner[hidden] { display: none; }

/* ☠️ 手机端底部的固定浮层会盖住页脚最后一行（2026-08-11 端到端实测）。
   实测：app-banner 在 y=710 高 62，tab-bar 在 y=782 高 62 —— 两者互不重叠，
   但 app-banner 正好压住页脚那句「教会与资源信息来自公开资料…」的免责声明。

   免责声明是【法律性质】的文字，被浮层盖住不是排版问题。
   → 给页脚留出「导航条 + 横幅」的高度，让它们永远落在内容之下。
   ⚠️ 用 env(safe-area-inset-bottom) 兜住 iPhone 的底部安全区。 */
@media (max-width: 899px) {
  .site-footer { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
}
.app-banner-icon { width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto; }
.app-banner-text {
  flex: 1; font-size: 13.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-banner-btn { white-space: nowrap; flex: 0 0 auto; }
.app-banner-close {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.1); color: #cbd6e6;
  border: 0; cursor: pointer; font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.app-banner-close:hover { background: rgba(255,255,255,.22); color: #fff; }
@media (min-width: 900px) {
  /* No tab-bar on desktop — drop to the true bottom. */
  .app-banner { max-width: 680px; padding: 12px 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .app-banner-text { font-size: 14.5px; }
}

/* ---------- Header notification bell ---------- */
.nav-bell { position: relative; display: inline-flex; align-items: center; }
/* 顶栏右侧那两个圆按钮（私信、通知）——【同一条规则】，不各写一份。
   各写一份的话，改一个忘一个只是时间问题，而结果是两个并排的按钮长得不一样。 */
.bell-btn, .nav-inbox {
  /* ⚠️ box-sizing 必须写死：<button> 默认 border-box、<a> 默认 content-box，
     同样写 40px + 1px 描边，一个渲染成 40×40、另一个 42×42 ——
     两个并排的圆按钮差 2 像素，肉眼看得出来「有一个大一点」，
     但看代码完全看不出为什么（两边写的数字一模一样）。实测量出来的。 */
  box-sizing: border-box;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  color: #eaf0fb; cursor: pointer; transition: background .15s, transform .12s;
}
.bell-btn:hover, .nav-inbox:hover { background: rgba(255,255,255,.16); }
.nav-inbox:hover { transform: translateY(-1px); }
.nav-inbox { text-decoration: none; }
.bell-btn svg, .nav-inbox svg { width: 20px; height: 20px; }
/* 未读红点 —— 与底部导航同一个信号（PageModel.showUnreadDm） */
.nav-inbox-dot {
  position: absolute; top: 7px; right: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--error); box-shadow: 0 0 0 2px var(--navy-800);
}
.bell-btn.ring { animation: bellRing .7s ease; }
@keyframes bellRing {
  0%,100% { transform: rotate(0); }
  20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); }
  60% { transform: rotate(8deg); } 80% { transform: rotate(-6deg); }
}
.bell-badge {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #e5484d; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--navy-800, var(--navy-800));
}
.bell-menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 340px; max-width: 86vw;
  background: #fff; color: var(--ink-900, #1a2233);
  border-radius: 14px; box-shadow: 0 18px 44px rgba(10,20,45,.28);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s; z-index: 1200; overflow: hidden;
}
.nav-bell.open .bell-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.bell-head { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--bg-soft, var(--bg-soft)); }
.bell-list { max-height: 360px; overflow-y: auto; }
.bell-list a {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px;
  color: var(--ink-900, #1a2233); text-decoration: none !important;
  border-bottom: 1px solid var(--bg-soft, var(--bg-soft));
}
.bell-list a:hover { background: var(--blue-50, #eef4ff); }
.bell-list a.unread { background: var(--gold-100, #fdf6e3); }
.bell-list a.unread:hover { background: #f3e7c3; }
.bell-ic { flex: 0 0 auto; font-size: 16px; line-height: 1.45; }
.bell-tx { font-size: 13.5px; line-height: 1.5; }
.bell-tx b { color: var(--navy-700, var(--navy-700)); }
.bell-tx em { color: var(--ink-600, var(--ink-600)); font-style: normal; }
.bell-tx .t { display: block; font-size: 11.5px; color: var(--ink-400, var(--ink-400)); margin-top: 2px; }
.bell-empty { padding: 26px 16px; text-align: center; color: var(--ink-400, var(--ink-400)); font-size: 13.5px; }
.bell-all {
  display: block; padding: 11px 16px; text-align: center; font-weight: 600; font-size: 13.5px;
  color: var(--navy-700, var(--navy-700)); border-top: 1px solid var(--bg-soft, var(--bg-soft));
  text-decoration: none !important;
}
.bell-all:hover { background: var(--blue-50, #eef4ff); }
@media (max-width: 860px) { .nav-bell { display: none; } }

/* ---------- First-visit welcome modal ---------- */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(16, 28, 51, .72);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px; overflow-y: auto;
}
.welcome-overlay[hidden] { display: none; }
.welcome-modal {
  position: relative; width: 100%; max-width: 680px;
  max-height: calc(100vh - 36px); overflow-y: auto;
  background: #fff; border-radius: 20px; padding: 30px 26px 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
  text-align: center;
  animation: welcomeIn .25s ease;
}
@keyframes welcomeIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.welcome-close {
  position: absolute; top: 12px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-soft); color: var(--ink-600); border: 0;
  font-size: 19px; line-height: 1; cursor: pointer;
}
.welcome-close:hover { background: var(--navy-800); color: #fff; }
.welcome-logo { border-radius: 14px; margin-bottom: 8px; }
.welcome-modal h2 { color: var(--navy-800); font-size: 22px; margin-bottom: 6px; }
.welcome-sub { color: var(--ink-600); font-size: 14.5px; max-width: 34em; margin: 0 auto 18px; }
.welcome-cards { display: grid; gap: 14px; grid-template-columns: 1fr; text-align: left; }
@media (min-width: 560px) { .welcome-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 720px) { .welcome-cards-3 { grid-template-columns: 1fr 1fr 1fr; } }
.welcome-card {
  display: flex; flex-direction: column;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px;
}
.welcome-card-accent {
  background: linear-gradient(180deg, #fff8ea, #fffdf7);
  border-color: var(--gold-500);
  box-shadow: 0 4px 16px rgba(196, 154, 44, .16);
}
.welcome-card .wc-icon { font-size: 30px; line-height: 1; margin-bottom: 8px; }
.welcome-card h3 { color: var(--navy-800); font-size: 16.5px; margin-bottom: 5px; }
.welcome-card p { color: var(--ink-600); font-size: 13.5px; line-height: 1.6; margin-bottom: 12px; flex: 1; }
.welcome-app-line {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 12px; padding: 11px 14px;
  background: var(--navy-800); color: #fff !important;
  border-radius: 12px; text-decoration: none !important;
  font-size: 13.5px; font-weight: 600; line-height: 1.45;
}
.welcome-app-line img { border-radius: 7px; flex-shrink: 0; }
.welcome-app-line span:first-of-type { flex: 1; }
.welcome-app-line .floater-arrow { color: var(--gold-500); font-weight: 800; }
.welcome-app-line:hover { background: var(--navy-700); }

/* ---------- Rotating promo floater ---------- */
.promo-floater {
  position: fixed; right: 18px; bottom: 20px; z-index: 140;
  display: flex; align-items: center; gap: 8px;
  max-width: 320px; padding: 11px 34px 11px 15px;
  background: var(--navy-800); color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 30px; box-shadow: 0 8px 26px rgba(16, 28, 51, .4);
  font-size: 13.5px; font-weight: 600; line-height: 1.45;
  text-decoration: none !important;
  animation: floaterIn .3s ease;
}
@keyframes floaterIn { from { opacity: 0; transform: translateY(12px); } }
.promo-floater[hidden] { display: none; }
.promo-floater:hover { background: var(--navy-700); }
.promo-floater .floater-arrow { color: var(--gold-500); font-weight: 800; }
.floater-close {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, .15); color: #dbe4f0; border: 0;
  font-size: 13px; line-height: 1; cursor: pointer;
}
.floater-close:hover { background: rgba(255, 255, 255, .3); color: #fff; }
@media (max-width: 899px) {
  /* keep clear of the bottom tab bar */
  .promo-floater { bottom: calc(76px + env(safe-area-inset-bottom)); right: 12px; max-width: calc(100vw - 90px); }
}

/* ---------- Left explore rail (wide detail pages) ---------- */
.rail-nav { list-style: none; margin: 0; padding: 0; }
.rail-nav li { border-bottom: 1px solid var(--bg-soft, var(--bg-soft)); }
.rail-nav li:last-child { border-bottom: 0; }
.rail-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 4px;
  color: var(--ink-900, #1a2233); text-decoration: none !important;
  font-size: 14.5px; font-weight: 600;
}
.rail-nav a:hover { color: var(--navy-700, var(--navy-700)); }
.rail-nav .rn-ic { font-size: 17px; width: 22px; text-align: center; }
.rail-cities { display: flex; flex-wrap: wrap; gap: 7px; }
.rail-cities a {
  font-size: 13px; padding: 5px 10px; border-radius: 20px;
  background: var(--blue-50, #eef4ff); color: var(--navy-700, var(--navy-700));
  text-decoration: none !important; font-weight: 600;
}
.rail-cities a:hover { background: var(--navy-700, var(--navy-700)); color: #fff; }
.rail-cities small { opacity: .7; font-weight: 400; }

/* ---------- App landing page (app.php) ---------- */
.app-hero {
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: var(--line); overflow: hidden;
}
.app-hero-inner {
  display: grid; gap: 30px; align-items: center;
  padding-top: 44px; padding-bottom: 0;
}
.app-hero-brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-size: 19px; font-weight: 800; color: #fff; margin-bottom: 16px;
}
.app-hero-brand img { border-radius: 11px; box-shadow: var(--shadow); }
.app-hero-brand em { font-style: normal; color: var(--gold-500); }
.app-hero-copy h1 { font-size: 30px; line-height: 1.25; color: #fff; margin-bottom: 12px; }
.app-hero-sub { font-size: 16px; color: #c3d0e4; max-width: 560px; margin-bottom: 22px; }
.store-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.store-badge {
  /* 图标在左、两行文字在右 —— 商店按钮的标准形态 */
  display: flex; flex-direction: row; align-items: center; gap: 11px;
  min-width: 148px; padding: 8px 18px; border-radius: 12px;
  background: #fff; color: var(--navy-900) !important;
  text-decoration: none !important; line-height: 1.25;
  border: 1px solid rgba(255,255,255,.2);
  transition: transform .12s ease, box-shadow .12s ease;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.store-badge .sb-text { display: flex; flex-direction: column; justify-content: center; }
.store-badge .sb-ico { flex: 0 0 auto; width: 24px; height: 24px; }
.store-badge .sb-top { font-size: 11px; font-weight: 600; color: var(--ink-600); }
.store-badge .sb-name { font-size: 16.5px; font-weight: 800; }
.store-badge-more { background: rgba(255,255,255,.1); color: #fff !important; border-color: rgba(255,255,255,.35); }
.store-badge-more .sb-top { color: #b9c7da; }
.app-hero-trust { font-size: 13.5px; color: var(--gold-500); font-weight: 600; padding-bottom: 34px; }
.app-hero-shot { text-align: center; }
.app-hero-shot img {
  width: min(320px, 78%); height: auto; display: inline-block;
  border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.4);
  vertical-align: bottom;
}
@media (min-width: 900px) {
  .app-hero-inner { grid-template-columns: 1.25fr 1fr; gap: 40px; padding-top: 56px; }
  .app-hero-copy h1 { font-size: 40px; }
  .app-hero-sub { font-size: 17.5px; }
  .app-hero-shot img { width: min(360px, 100%); }
}

.app-feature-cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .app-feature-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .app-feature-cards { grid-template-columns: repeat(4, 1fr); } }
.app-feature-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; box-shadow: var(--shadow);
}
.afc-icon { font-size: 26px; display: block; margin-bottom: 10px; }
.app-feature-card h3 { font-size: 16px; color: var(--navy-800); margin-bottom: 6px; }
.app-feature-card p { font-size: 13.8px; color: var(--ink-600); line-height: 1.55; }

.shots-scroll {
  display: flex; gap: 16px; overflow-x: auto; padding: 6px 2px 14px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.shot-card { flex: 0 0 auto; scroll-snap-align: start; text-align: center; margin: 0; }
.shot-card img {
  width: min(250px, 72vw); height: auto; border-radius: 20px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); display: block;
}
.shot-card figcaption { margin-top: 9px; font-size: 13px; font-weight: 600; color: var(--ink-600); }

/* ---------- App page polish ---------- */
/* Hero: soft gold glow behind the copy, deeper stage for the shot */
.app-hero { position: relative; }
.app-hero::before {
  content: ""; position: absolute; pointer-events: none;
  width: 560px; height: 560px; left: -160px; top: -180px;
  background: radial-gradient(circle, rgba(201,162,39,.14) 0%, transparent 65%);
}
.app-hero-inner { position: relative; }

/* What / Why / Who — three cards with a gold icon chip */
.app-about-cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .app-about-cards { grid-template-columns: repeat(3, 1fr); } }
.app-about-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow);
  border-top: 3px solid var(--gold-500);
}
.aac-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; font-size: 23px;
  background: var(--gold-100); margin-bottom: 12px;
}
.app-about-card h2 { font-size: 17.5px; color: var(--navy-800); margin-bottom: 8px; }
.app-about-card p { font-size: 14.3px; color: var(--ink-600); line-height: 1.65; }

/* Feature cards: gold icon chip + hover lift */
.app-feature-card { transition: transform .15s ease, box-shadow .15s ease; }
.app-feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.app-feature-card .afc-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; font-size: 22px;
  background: var(--blue-50); margin-bottom: 12px;
}

/* Screenshots: swipe hint + gradient edge cue on mobile */
.shots-hint { color: var(--ink-400); font-size: 18px; letter-spacing: 2px; }
.shot-card img { transition: transform .15s ease; }
.shot-card:hover img { transform: translateY(-4px); }

/* Download band — the conversion moment gets the navy stage */
.dl-band {
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-700) 100%);
  scroll-margin-top: 80px; /* land below the sticky header on #download jumps */
}
.dl-hub { display: grid; gap: 34px; align-items: center; }
@media (min-width: 900px) { .dl-hub { grid-template-columns: 1fr 250px; gap: 56px; } }
.dl-band .section-head { margin-bottom: 6px; }
.dl-band .section-head h2 { color: #fff; }
.dl-band .section-head h2::after {
  content: ""; display: block; width: 46px; height: 3px; border-radius: 2px;
  background: var(--gold-500); margin-top: 8px;
}
.dl-lede { color: var(--gold-500); font-weight: 600; font-size: 14px; margin-bottom: 22px; }

/* Primary: two big store buttons with real store icons */
.dl-primary { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.store-badge-lg {
  flex: 1 1 220px; max-width: 300px; flex-direction: row; align-items: center; gap: 13px;
  padding: 13px 20px; border-radius: 14px; box-shadow: var(--shadow-lg);
}
.store-badge-lg .sb-ico { width: 30px; height: 30px; flex: 0 0 auto; }
.store-badge-lg .sb-col { display: flex; flex-direction: column; line-height: 1.3; }
.store-badge-lg .sb-name { font-size: 16px; }

/* Secondary: quiet ghost options */
.dl-secondary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.dl-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.07); color: #dbe4f0;
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; text-decoration: none !important;
}
.dl-ghost:hover { border-color: var(--gold-500); color: var(--gold-500); }

/* Inline share row */
.dl-share-inline { display: flex; align-items: center; gap: 10px; }
.dl-share-label { color: #8fa3c2; font-size: 13.5px; font-weight: 600; margin-right: 2px; }
.dl-share-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.09); color: var(--line);
  border: 1px solid rgba(255,255,255,.22); cursor: pointer;
  font-size: 16px; text-decoration: none !important; font-family: var(--font);
}
.dl-share-ico:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-900); }

/* Compact QR card — pointless on the phone itself, so desktop only */
.dl-qr-card {
  display: none; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 22px 20px; text-align: center;
}
@media (min-width: 900px) { .dl-qr-card { display: block; } }
.dl-qr-card h3 { color: var(--navy-800); font-size: 15.5px; margin-bottom: 12px; }
.dl-qr-card img { width: 150px; height: 150px; image-rendering: pixelated; }
.dl-qr-card p { font-size: 12px; color: var(--ink-400); margin-top: 10px; line-height: 1.5; }

/* FAQ: card look with gold plus marker */
.faq-item { transition: box-shadow .15s ease; }
.faq-item[open] { box-shadow: var(--shadow); border-color: var(--gold-500); }
.faq-item summary { font-weight: 700; color: var(--navy-800); }

/* ============================================================
   Community — Facebook-style feed
   ============================================================ */
/* Full-bleed light-gray canvas behind the feed (Facebook look). */
.comm-canvas {
  background: var(--bg-soft); padding: 22px 0 40px;
  margin-top: -1px;
}
@media (prefers-color-scheme: dark) { .comm-canvas { background: var(--bg-soft); } }
.comm-wide { max-width: 1640px; }

.community-layout {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
  align-items: start;
}
@media (min-width: 1000px) {
  .community-layout { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (min-width: 1320px) {
  .community-layout {
    grid-template-columns: 300px minmax(0, 744px) 340px;
    justify-content: center;
  }
}
@media (min-width: 1600px) {
  .community-layout {
    grid-template-columns: 320px minmax(0, 880px) 360px;
    gap: 22px;
  }
}

/* Generic centered "wall" layout (prayer wall, seeker board): left rail +
   comfortable-width main feed + right rail. Mobile order: main, side, left. */
.wall-layout { display: grid; gap: 24px; align-items: start; }
.wall-layout > .p-side, .wall-layout > .p-left { display: flex; flex-direction: column; gap: 18px; }
.wall-layout > .p-side .panel.mt-3 { margin-top: 0; }
@media (min-width: 1000px) {
  .wall-layout { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "main side" "left side"; }
  .wall-layout > .p-main { grid-area: main; }
  .wall-layout > .p-side { grid-area: side; }
  .wall-layout > .p-left { grid-area: left; }
}
@media (min-width: 1320px) {
  .wall-layout { grid-template-columns: 280px minmax(0, 860px) 360px; grid-template-areas: "left main side"; justify-content: center; }
}

/* Left rail: sticky category nav */
.comm-left { position: sticky; top: 78px; display: none; }
@media (min-width: 1000px) { .comm-left { display: block; } }
.comm-cats { padding: 8px; border-radius: 14px; }
.comm-rail-h {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-400); padding: 6px 12px 4px;
}
.comm-cat {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--ink-900); font-weight: 600; font-size: 15px;
  text-decoration: none !important;
}
.comm-cat:hover { background: var(--line); }
.comm-cat.active { background: var(--gold-100); color: var(--gold-600); }
.comm-cat .cat-ic, .mobcat .cat-ic {
  /* emoji → SVG（见 CommunityPageModel.CatChip.icon 的说明）。
     ⚠️ SVG 没有内在尺寸，不写宽高会按默认 300×150 渲染，整列分类会炸开。 */
  width: 18px; height: 18px; flex: none; opacity: .8;
}
.comm-cat.active .cat-ic, .comm-cat:hover .cat-ic { opacity: 1; }

.comm-right { position: sticky; top: 78px; display: none; }
@media (min-width: 1320px) { .comm-right { display: block; } }
.comm-right .cta-block { flex-direction: column; text-align: center; }
.side-note { font-size: 13.5px; color: var(--ink-600); }

/* Center column holds composer + toolbar + feed */
.comm-feed { min-width: 0; }

/* ---- Community activity topbar (stats + active members) ---- */
.comm-topbar { padding: 14px 16px; margin-bottom: 14px; }
.comm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.comm-stat { display: flex; flex-direction: column; gap: 2px; padding: 4px 2px; }
.comm-stat + .comm-stat { border-left: 1px solid var(--line); }
.comm-stat .cs-num { font-size: 20px; font-weight: 800; color: var(--navy-800); line-height: 1.1; }
.comm-stat .cs-lbl { font-size: 12px; color: var(--ink-500); }
.comm-active { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.comm-active-lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-500); }
.comm-active-avatars { display: flex; }
.comm-active-avatars .caa { margin-left: -8px; display: inline-block; }
.comm-active-avatars .caa:first-child { margin-left: 0; }
.comm-active-avatars .caa img, .comm-active-avatars .caa-fb {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff;
  object-fit: cover; box-shadow: 0 1px 3px rgba(16,28,51,.18); display: flex;
  align-items: center; justify-content: center; background: var(--navy-600);
  color: #fff; font-size: 13px; font-weight: 700;
}
.comm-active-avatars .caa:hover img, .comm-active-avatars .caa:hover .caa-fb { transform: translateY(-2px); }

/* ---- Mobile category bar (left rail is hidden < 1000px) ---- */
.comm-mobcats {
  display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px;
  padding-bottom: 4px; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.comm-mobcats::-webkit-scrollbar { display: none; }
.comm-mobcats .mobcat {
  flex: 0 0 auto; white-space: nowrap;
  padding: 8px 14px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-700); font-size: 13.5px; font-weight: 600;
  text-decoration: none !important;
}
.comm-mobcats .mobcat.active { background: var(--gold-100); border-color: var(--gold-500); color: var(--gold-600); }
@media (min-width: 1000px) { .comm-mobcats { display: none; } }

/* ---- Posting prompt of the day ---- */
.comm-prompt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin-bottom: 14px; padding: 12px 15px; text-align: left; cursor: pointer;
  background: linear-gradient(120deg, #fff8ea, #fffdf7);
  border: 1px solid var(--gold-500); border-radius: 14px;
  font-family: var(--font); box-shadow: 0 2px 10px rgba(196,154,44,.12);
}
.comm-prompt:hover { box-shadow: 0 4px 16px rgba(196,154,44,.2); }
.comm-prompt .comm-prompt-tag { flex-shrink: 0; font-size: 12.5px; font-weight: 800; color: var(--gold-600); white-space: nowrap; }
.comm-prompt .comm-prompt-text { font-size: 14px; color: var(--ink-700); line-height: 1.45; }

/* ---- Facebook-style composer ---- */
.quickpost {
  padding: 12px 16px 8px; margin-bottom: 16px; border-radius: 14px;
}
.qp-top { display: flex; gap: 10px; align-items: flex-start; }
.qp-top .feed-avatar { margin-top: 2px; }
.qp-input {
  flex: 1; resize: none; overflow: hidden;
  border-radius: 22px; background: var(--bg-soft); border: 0;
  padding: 11px 18px; font-size: 16px; line-height: 1.5; min-height: 44px;
  font-family: var(--font); color: var(--ink-900);
}
.qp-input::placeholder { color: var(--ink-600); }
.qp-input:focus { background: var(--line); outline: none; }
.qp-divider { height: 1px; background: var(--line); margin: 10px 4px; }
.qp-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.qp-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.qp-submit { display: flex; align-items: center; gap: 8px; }
.qp-action {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 12px; border-radius: 10px; border: 0; background: none;
  font-size: 14.5px; font-weight: 600; color: var(--ink-600);
  font-family: var(--font); text-decoration: none !important; white-space: nowrap;
}
.qp-action:hover { background: var(--bg-soft); }
.qp-ic { font-size: 20px; line-height: 1; }
.qp-cat {
  max-width: 180px; min-width: 0; border-radius: 10px;
  padding: 8px 10px; font-size: 14px;
}
.qp-post { padding: 9px 22px; border-radius: 10px; white-space: nowrap; }
/* Phone: stack the tools row above a full-width category + post row */
@media (max-width: 560px) {
  .qp-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .qp-tools { justify-content: space-between; }
  .qp-action { flex: 1; justify-content: center; padding: 9px 6px; font-size: 13.5px; gap: 5px; }
  .qp-submit { gap: 10px; }
  .qp-cat { flex: 1; max-width: none; }
  .qp-post { flex: 0 0 auto; }
}
.qp-post:disabled { opacity: .5; cursor: not-allowed; }
.qp-note { font-size: 12.5px; color: var(--ink-400); margin: 8px 4px 2px; }
.qp-note.hide { display: none; }

.quickpost-login { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; }
.qp-login-hint {
  flex: 1; background: var(--bg-soft); border: 0;
  border-radius: 22px; padding: 11px 18px; color: var(--ink-600); font-size: 16px;
  text-decoration: none !important;
}
.qp-login-hint:hover { background: var(--line); }

/* Feed toolbar (search + sort) */
.feed-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.feed-search { flex: 1; }
.feed-search input { border-radius: 22px; background: #fff; }
.feed-toolbar .chip { background: #fff; }
.chip-on { border-color: var(--gold-500) !important; color: var(--gold-600) !important; background: var(--gold-100) !important; }

/* ---- Feed card ---- */
.feed-card {
  background: #fff; border: 0; border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16,28,51,.10), 0 2px 12px rgba(16,28,51,.05);
  padding: 16px 18px; margin-bottom: 16px;
}
.feed-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.feed-avatar { flex: 0 0 auto; width: 44px; height: 44px; display: block; }
.feed-avatar img, .feed-avatar-fb {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: block;
}
.feed-avatar-fb {
  background: var(--navy-600); color: #fff; font-weight: 700; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
}
.quickpost .feed-avatar, .quickpost-login .feed-avatar { width: 40px; height: 40px; }
.quickpost .feed-avatar img, .quickpost .feed-avatar-fb,
.quickpost-login .feed-avatar img, .quickpost-login .feed-avatar-fb { width: 40px; height: 40px; }
.feed-who { min-width: 0; }
.feed-name { font-weight: 700; font-size: 15.5px; color: var(--ink-900); text-decoration: none !important; }
.feed-name:hover { text-decoration: underline !important; }
.feed-meta { font-size: 13px; color: var(--ink-600); }
.feed-meta a.feed-cat { color: var(--ink-600); }
.feed-meta a.feed-cat:hover { text-decoration: underline; }
.feed-title { margin: 2px 0 6px; font-size: 18px; }
.feed-title a { color: var(--navy-800); text-decoration: none !important; }
.feed-title a:hover { text-decoration: underline !important; }
.feed-text { font-size: 15.5px; line-height: 1.65; overflow-wrap: break-word; color: var(--ink-900); }
.feed-more { font-weight: 600; }

/* Photo grids (feed + post detail) — edge-to-edge inside the card */
.feed-photos, .post-photo-grid {
  display: grid; gap: 2px; margin: 12px -18px -4px; border-radius: 0; overflow: hidden;
}
.post-photo-grid { margin: 12px 0 0; border-radius: 12px; }
.feed-photos img, .post-photo-grid img {
  width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4/3;
}
.feed-photos.n1 img, .post-photo-grid.n1 img { aspect-ratio: auto; max-height: 560px; }
.feed-photos.n2, .post-photo-grid.n2 { grid-template-columns: 1fr 1fr; }
.feed-photos.n3, .post-photo-grid.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.feed-photos.n3 a:first-child, .feed-photos.n3 img:first-child,
.post-photo-grid.n3 a:first-child { grid-row: span 2; }
.feed-photos.n4, .post-photo-grid.n4 { grid-template-columns: 1fr 1fr; }

/* Stats + action bar */
.feed-stats {
  display: flex; gap: 14px; font-size: 13.5px; color: var(--ink-600);
  padding: 10px 2px 4px;
}
.feed-actions {
  display: flex; gap: 4px; border-top: 1px solid #e4e6eb;
  margin-top: 6px; padding-top: 6px;
}
.feed-actions form { flex: 1; display: flex; }
.feed-act {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: none; border: 0; cursor: pointer;
  padding: 9px 6px; border-radius: 8px; font-size: 15px; font-weight: 600;
  color: var(--ink-600); font-family: var(--font); text-decoration: none !important;
}
.feed-act:hover { background: var(--bg-soft); }
.feed-act.on { color: var(--gold-600); }
.feed-act-pray { color: var(--gold-600); }
.feed-act-pray:hover { background: var(--gold-100); }
.feed-act-pray.on { color: var(--gold-700, #9a6f14); font-weight: 700; }

/* Empty state */
.feed-empty { text-align: center; padding: 32px 24px; border-radius: 14px; }
.feed-empty-title { font-weight: 700; font-size: 17px; color: var(--navy-800); margin-bottom: 14px; }
.feed-empty-ideas { list-style: none; margin: 0 0 18px; text-align: left; max-width: 360px; margin-inline: auto; }
.feed-empty-ideas li { padding: 8px 0; color: var(--ink-600); font-size: 15px; }

/* Image upload previews (composer + create-post) */
/* ---- 「图片」按钮 —— 统一控件 tags/imagePicker（Ray 2026-07-30）----
   原生 <input type=file> 的外观没法统一，所以全站都是「input 藏起来 + label 触发」。
   ⚠️ 这里只管长相；缩略图/压缩/✕ 由 main.js 那个通用监听器接管（认 accept=image）。 */
.img-pick { margin: 10px 0; }
.img-pick-btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: var(--t-sm); color: var(--ink-600);
}
.img-pick-btn:hover { border-color: var(--navy-800); color: var(--navy-800); }
.img-pick-btn .ui-ico { width: 17px; height: 17px; }

/* ---- 配图展示 —— 统一控件 tags/imageStrip ----
   提问 / 回答 / 评论 里已经发出去的图。点开看大图走原生 <a target="_blank">，
   不引 lightbox：没有 JS 时照样能点开（公众页禁用 JS 必须可用，本项目硬指标）。 */
.img-strip { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.img-strip img {
  width: 128px; height: 128px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); display: block;
}
@media (max-width: 480px) {
  .img-strip img { width: 96px; height: 96px; }
}

/* ---- 发帖配图的缩略图（Facebook 同款）----
   ☠️ 这套样式<b>一直存在但没有任何 JS 在用</b>（连注释都写着「composer + create-post」）——
      于是用户选完图片页面毫无反应，只能盯着不变的界面等。
      「样式写了、功能没接」是这个项目反复出现的一种形态。 */
.img-preview-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.img-preview-row[hidden] { display: none; }
.img-preview-cell { position: relative; width: 84px; height: 84px; }
.img-preview-row img {
  width: 84px; height: 84px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); display: block;
}
/* 处理中：盖一层半透明 + 文字。用户看到「在动」，就不会以为卡住了。 */
.img-preview-busy {
  position: absolute; inset: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: rgba(23, 59, 87, .62); color: #fff;
  font-size: 11px; line-height: 1.25; padding: 4px;
}
/* 右上角的 ✕ —— 发之前可以单独删掉某一张 */
.img-preview-x {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-600);
  font-size: 12px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.img-preview-x:hover { background: var(--error); border-color: var(--error); color: #fff; }

/* YouTube embeds inside post text */
.yt-embed { display: block; margin: 12px 0; }
.yt-embed iframe {
  width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; display: block;
}

/* Profile timeline (single column, centered) */
.profile-timeline { max-width: 700px; margin-inline: auto; }

/* ============================================================
   Profile header — Facebook-style with follow + stats
   ============================================================ */
.profile-header {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.profile-id { display: flex; align-items: center; gap: 18px; min-width: 0; flex: 1; }
.profile-avatar-lg { flex: 0 0 auto; width: 96px; height: 96px; display: block; }
.profile-avatar-lg img, .profile-avatar-fb {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block;
  border: 3px solid rgba(255,255,255,.85);
}
.profile-avatar-fb {
  background: var(--blue-500); color: #fff; font-weight: 700; font-size: 42px;
  display: flex; align-items: center; justify-content: center;
}
/* ☠️ 这个「没有头像时显示首字母」的圆圈原本<b>只为页头设计</b>（96px），
   但它被复用到了发帖框和时间线卡片里 —— 那两处只有 40px 的位置，
   于是一个 96px 的大圆圈直接盖在输入框上（2026-07-29 截图可见）。
   → 在小尺寸的容器里把它压回容器该有的大小。
   ⚠️ 用容器类做限定，不要去改 .profile-avatar-fb 本身 —— 页头还要用 96px。 */
.feed-avatar .profile-avatar-fb,
.tl-avatar .profile-avatar-fb,
.fb-avatar .profile-avatar-fb {
  width: 40px; height: 40px; font-size: 17px; border-width: 0; flex: none;
}
.feed-avatar { flex: none; }
.feed-avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.profile-id-text { min-width: 0; }
.profile-id-text h1 { margin: 0 0 6px; color: #fff; }
.profile-stats { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 4px; }
.profile-stats span { color: rgba(255,255,255,.82); font-size: 14.5px; }
.profile-stats strong { color: #fff; font-size: 16px; }
.profile-joined { color: rgba(255,255,255,.6); font-size: 13px; margin: 0; }
.profile-cta { flex: 0 0 auto; }
.profile-cta .btn { min-width: 120px; }
@media (max-width: 640px) {
  .profile-avatar-lg, .profile-avatar-lg img, .profile-avatar-fb { width: 72px; height: 72px; }
  .profile-avatar-fb { font-size: 30px; }
  .profile-cta { width: 100%; }
  .profile-cta .btn { width: 100%; }
}

/* ============================================================
   My profile (me.php) — Facebook-style timeline
   ============================================================ */
/* Sticky tab bar under the profile header */
.profile-tabs-wrap { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(16,28,51,.05); }
.profile-tabs { display: flex; gap: 4px; overflow-x: auto; }
.profile-tab {
  padding: 15px 16px; font-weight: 600; font-size: 15px; color: var(--ink-600);
  white-space: nowrap; border-bottom: 3px solid transparent; text-decoration: none !important;
}
.profile-tab:hover { background: var(--bg-soft); }
.profile-tab.active { color: var(--blue-500); border-bottom-color: var(--blue-500); }

/* Two-column body: left about, right timeline */
/* ══ 「我的空间」三栏 —— Facebook 式（2026-07-29 重排）══
   左：简介 · 中：时间线（主角）· 右：收藏/提问/回答/找教会/通知

   ☠️ 改之前那五块清单占着<b>主列</b>：每块只有一两行内容，却撑在最宽的位置上，
      整页看起来是空的，而真正该当主角的时间线被挤在这些清单中间。
      清单形态属于侧栏，主列只放时间线。 */
.me-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; align-items: start; }
/* 中等宽度：先给出两栏（简介 + 时间线），右栏此时排到最下面 */
@media (min-width: 980px)  { .me-layout { grid-template-columns: 320px minmax(0, 1fr); } }
/* 够宽才上三栏 —— 硬塞三栏会让时间线窄到读不下去 */
@media (min-width: 1280px) { .me-layout { grid-template-columns: 300px minmax(0, 1fr) 300px; } }
.me-side, .me-rail { position: static; }
@media (min-width: 980px) { .me-side { position: sticky; top: 78px; } }
@media (min-width: 1280px) { .me-rail { position: sticky; top: 78px; } }
/* 未到三栏断点时，右栏横跨整行排在最下面，不要挤在 320px 的第一列里 */
@media (min-width: 980px) and (max-width: 1279px) { .me-rail { grid-column: 1 / -1; } }
.me-main { min-width: 0; }

/* ---- 时间线卡片 ---- */
.me-timeline { display: flex; flex-direction: column; gap: var(--s-3); }
.tl-avatar img, .tl-avatar .profile-avatar-fb {
  width: 40px; height: 40px; border-radius: 50%; display: block; object-fit: cover;
}
.tl-meta .text-muted { font-size: var(--t-caption); }
.tl-empty { text-align: center; padding: var(--s-7) var(--s-4); }
.tl-empty svg { width: 38px; height: 38px; stroke: var(--ink-400); margin-bottom: var(--s-3); }

/* ---- 右栏的清单块（比主列的 panel 紧凑一档）---- */
.me-rail { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.me-rail .rail-block { padding: var(--s-4); margin-bottom: 0; }
.me-rail .rail-h {
  margin: 0 0 var(--s-3); font-size: var(--t-h4); color: var(--navy-800);
  display: flex; align-items: center; gap: 6px;
}
.me-rail .my-list li { font-size: var(--t-sm); }
.me-rail p { font-size: var(--t-sm); }
/* 三栏并排时右栏内容多了要能自己滚，别把整页拉得很长 */
@media (min-width: 1280px) {
  .me-rail { max-height: calc(100vh - 100px); overflow-y: auto; }
}

/* Intro / about card */
.intro-card .intro-h { margin-bottom: 10px; }
.intro-bio { white-space: pre-line; margin-bottom: 12px; overflow-wrap: break-word; }
.intro-facts { list-style: none; margin: 0 0 14px; }
.intro-facts li { padding: 5px 0; color: var(--ink-600); font-size: 14.5px; overflow-wrap: anywhere; }

/* Composer shortcut (links to full editor) */
.me-composer { display: flex; gap: 10px; align-items: center; text-decoration: none !important; margin-bottom: 16px; }
.me-composer .qp-login-hint { flex: 1; }

/* Section headings + timeline */
.me-section-h { margin: 4px 2px 12px; font-size: 19px; color: var(--navy-800); scroll-margin-top: 130px; }
.me-timeline { margin-bottom: 20px; }
.me-main .panel { scroll-margin-top: 130px; }

/* ============================================================
   Me page — left menu tabs, single-panel view, privacy box
   ============================================================ */
/* Left menu (Facebook-style section switcher) */
.me-menu { padding: 6px; }
.me-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; color: var(--ink-900);
  font-weight: 600; font-size: 15px; text-decoration: none !important;
}
.me-menu-item:hover { background: var(--line); }
.me-menu-item.active { background: var(--blue-50); color: var(--navy-700); }
.me-menu-ic { font-size: 18px; line-height: 1; flex: 0 0 auto; }
.me-menu-n { margin-left: auto; font-size: 13px; color: var(--ink-400); font-weight: 700; }

/* Only the active panel is shown (JS toggles [hidden]) */
.me-panel[hidden] { display: none; }

/* Privacy fieldset in the edit dialog */
.privacy-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.privacy-box legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.privacy-box .checkbox-inline { display: flex; gap: 8px; align-items: center; padding: 5px 0; }

/* Single-image posts show the WHOLE image (no cropping) */
.feed-photos.n1 img, .post-photo-grid.n1 img {
  aspect-ratio: auto; height: auto; width: 100%;
  max-height: 820px; object-fit: contain; background: var(--bg-soft);
}

/* ============================================================
   Feed post ⋯ menu, pinned label, shared/quoted embed
   ============================================================ */
.feed-head { position: relative; }
.feed-menu { margin-left: auto; position: relative; }
.feed-menu-btn {
  border: 0; background: none; cursor: pointer; font-size: 22px; line-height: 1;
  color: var(--ink-600); width: 34px; height: 34px; border-radius: 50%;
}
.feed-menu-btn:hover { background: var(--bg-soft); }
.feed-menu-list {
  position: absolute; right: 0; top: 38px; z-index: 60; min-width: 190px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; overflow: hidden;
}
.feed-menu-list[hidden] { display: none; }
.feed-menu-list a,
.feed-menu-list button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; background: none; border: 0; cursor: pointer;
  padding: 9px 12px; border-radius: 8px; font-size: 14.5px; font-weight: 600;
  color: var(--ink-900); font-family: var(--font); text-decoration: none !important;
}
.feed-menu-list a:hover,
.feed-menu-list button:hover { background: var(--bg-soft); }
.feed-menu-list button.danger { color: #dc2626; }
.feed-menu-list form { margin: 0; }

.feed-pinned { font-size: 12.5px; font-weight: 700; color: var(--ink-400); margin-bottom: 8px; }

/* Shared / quoted original post */
.feed-quote {
  display: block; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin-top: 10px; text-decoration: none !important; color: var(--ink-900);
}
.feed-quote:hover { background: var(--bg-soft); }
.feed-quote-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.feed-quote-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.feed-quote-date { color: var(--ink-400); font-size: 12.5px; }
.feed-quote-text { font-size: 14.5px; line-height: 1.55; color: var(--ink-600); }
.feed-quote-photos { display: grid; gap: 2px; margin-top: 8px; border-radius: 8px; overflow: hidden; }
.feed-quote-photos.n2, .feed-quote-photos.n3, .feed-quote-photos.n4 { grid-template-columns: 1fr 1fr; }
.feed-quote-photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.feed-quote-photos.n1 img { aspect-ratio: auto; max-height: 320px; }

/* Article/devotional cover fused into its content panel: full-bleed top
   image, rounded top corners only — one card instead of stacked cards. */
.panel .post-cover { margin: -24px -24px 22px; }
.panel .post-cover img { display: block; width: 100%; height: auto;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }

/* Panels that follow a .prose article share its 780px reading width so
   the column reads as one aligned stack. */
.content-w { max-width: none; width: 100%; }

/* Content-card thumbnail: og card bleeding to the card's top edges. */
.church-card .card-thumb { margin: -22px -22px 2px; display: block; }
.church-card .card-thumb img { display: block; width: 100%; height: auto;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }

/* Compact link list for sidebars (hot questions etc.). */
.side-links { list-style: none; margin: 0; padding: 0; }
.side-links li { padding: 9px 0; border-bottom: 1px solid var(--bg-soft); display: flex; gap: 8px;
  justify-content: space-between; align-items: baseline; font-size: 14.5px; line-height: 1.45; }
.side-links li:last-child { border-bottom: none; }
.side-links .n { white-space: nowrap; color: var(--ink-600); font-size: 12.5px; }

/* Crisp SVG icons in the share control and its popup menu. */
.fb-act .fb-ico svg,
.feed-act .fb-ico svg { width: 18px; height: 18px; display: block; }
.share-pop-item svg { width: 16px; height: 16px; flex: none; fill: currentColor; }
.share-pop-item { display: flex; align-items: center; gap: 9px; }

/* A panel that is nothing but a cover image. */
.panel.cover-only { padding: 0; overflow: hidden; }
.panel.cover-only .post-cover { margin: 0; }
.panel.cover-only .post-cover img { border-radius: calc(var(--radius) - 1px); }


/* ══════════════════════════════════════════════════════════════════════════
   内容详情页两侧的推荐模块 + 上一篇/下一篇
   —— 逐字节照搬现站 includes/learn-rails.php 里的内联 <style>。

   现站是「用到这一块的页面才吐一次这段样式」，这边并进主样式表：
   少一次判断、少一处可能漏，视觉完全一致。
   ══════════════════════════════════════════════════════════════════════════ */
.detail-left { display:flex; flex-direction:column; gap:22px; }
@media (min-width:900px) {
  .detail-layout.has-left { grid-template-columns:minmax(0,1fr) 340px;
    grid-template-areas:"main side" "left side"; }
  .detail-layout.has-left > .detail-main { grid-area:main; }
  .detail-layout.has-left > .detail-side { grid-area:side; }
  .detail-layout.has-left > .detail-left { grid-area:left; }
  /* Listing grids: three tighter cards per row inside the narrower main column. */
  .detail-layout.has-left .detail-main .grid-cards { grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; }
}
/* True left rail only when the .container is actually wide enough (~1150px+).
   At 1400-1599px the fixed promo side-rails always shrink the container below
   that, and at 1600-1749px only when the rails are dismissed (body.rails-off),
   so the gates mirror the container rules in style.css. */
@media (min-width:1280px) and (max-width:1399px) {
  .detail-layout.has-left { grid-template-columns:270px minmax(0,1fr) 340px;
    grid-template-areas:"left main side"; }
}
@media (min-width:1600px) {
  body.rails-off .detail-layout.has-left { grid-template-columns:270px minmax(0,1fr) 340px;
    grid-template-areas:"left main side"; }
}
@media (min-width:1750px) {
  .detail-layout.has-left { grid-template-columns:270px minmax(0,1fr) 340px;
    grid-template-areas:"left main side"; }
}
/* Wide dir-page listings (side-rails suppressed, container up to 1960px):
   the three columns always fit from 1280px up. */
@media (min-width:1280px) {
  body.dir-page .detail-layout.has-left { grid-template-columns:270px minmax(0,1fr) 340px;
    grid-template-areas:"left main side"; }
  /* Reading pages: cap the prose column at a comfortable width and center
     the whole track set instead of stretching text across huge monitors. */
  body.dir-page .detail-layout.has-left.is-read { grid-template-columns:280px minmax(0,900px) 360px;
    justify-content:center; }
}
.rail-mod-title { font-size:15px; font-weight:800; color:var(--navy-800,var(--navy-800));
  margin:0 0 6px; display:flex; align-items:center; gap:7px; }
.rail-list { list-style:none; margin:0; padding:0; }
.rail-list li + li { border-top:1px solid var(--line,#e8edf5); }
.rail-list a { display:flex; gap:9px; padding:9px 2px; text-decoration:none; align-items:flex-start; }
.rail-num { font-weight:800; color:var(--gold-500,var(--gold-500)); font-size:14.5px; line-height:1.4; min-width:17px; }
.rail-t { flex:1; font-size:13.5px; line-height:1.4; color:var(--navy-800,var(--navy-800));
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.rail-list a:hover .rail-t { color:var(--gold-600,#b8890f); }
.rail-meta { font-size:12px; color:#8a93a6; white-space:nowrap; padding-top:1px; }
.pn-nav { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.pn-card { display:flex; flex-direction:column; justify-content:flex-start; gap:6px;
  background:var(--card,#fff); border:1px solid var(--line,#dde5f0);
  border-radius:var(--radius,12px); padding:15px 18px; text-decoration:none;
  border-left:3px solid var(--gold-500,var(--gold-500));
  transition:border-color .15s, box-shadow .15s, transform .12s; }
.pn-card.pn-next { border-left:1px solid var(--line,#dde5f0); border-right:3px solid var(--gold-500,var(--gold-500)); }
.pn-card:hover { border-color:var(--gold-500,var(--gold-500)); box-shadow:var(--shadow,0 4px 14px rgba(22,38,74,.08));
  transform:translateY(-2px); }
.pn-card.pn-next { text-align:right; align-items:flex-end; }
.pn-label { font-size:12px; font-weight:800; color:var(--gold-600,#b8890f);
  letter-spacing:.05em; text-transform:uppercase; }
.pn-title { font-size:15px; font-weight:700; color:var(--navy-800,var(--navy-800)); line-height:1.45;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.pn-card:hover .pn-title { color:var(--gold-600,#b8890f); }
@media (max-width:560px) { .pn-nav { grid-template-columns:1fr; } .pn-card.pn-next { text-align:left; align-items:flex-start; } }


/* ══════════════════════════════════════════════════════════════════════════
   首页「社区正在发生」—— 逐字节照搬现站 includes/community-pulse.php 的内联 <style>。
   包括那颗心跳动画（现站原注释：这一段主张「此刻」，所以给它一个心跳）
   和 prefers-reduced-motion 的关闭规则。
   ══════════════════════════════════════════════════════════════════════════ */
.pulse-head{text-align:center;max-width:44rem;margin:0 auto 22px}
.pulse-head h2{margin:0 0 .35rem;display:flex;align-items:center;justify-content:center;gap:.5rem}
.pulse-head p{color:var(--ink-600);margin:0}
/* The one flourish: this section claims "right now", so it shows a heartbeat. */
.pulse-live{flex:none;width:9px;height:9px;border-radius:50%;background:var(--gold-500);
  box-shadow:0 0 0 0 rgba(201,162,39,.55);animation:pulse-beat 2.4s ease-out infinite}
@keyframes pulse-beat{
  0%{box-shadow:0 0 0 0 rgba(201,162,39,.5)}
  70%{box-shadow:0 0 0 10px rgba(201,162,39,0)}
  100%{box-shadow:0 0 0 0 rgba(201,162,39,0)}
}

/* Fixed columns, not auto-fill: six items resolve to a clean 3x2 instead of
   stranding two cards in a ragged last row. */
.pulse-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media (max-width:900px){.pulse-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:600px){.pulse-grid{grid-template-columns:1fr}}

.pulse-item{display:flex;gap:12px;align-items:flex-start;background:var(--bg);
  border:1px solid var(--line);border-radius:var(--radius);padding:14px;
  text-decoration:none;color:inherit;
  transition:box-shadow .18s ease,transform .18s ease,border-color .18s ease}
.pulse-item:hover{box-shadow:var(--shadow);transform:translateY(-2px)}
.pulse-item:focus-visible{outline:2px solid var(--blue-500);outline-offset:2px}

/* Kind is carried by colour, so six identical 🙏 no longer read as one block. */
.pulse-ic{flex:none;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;
  font-size:1.05rem;line-height:1}
.pulse-prayer   .pulse-ic{background:var(--gold-100)}
.pulse-testimony .pulse-ic{background:var(--blue-100)}
.pulse-seeker   .pulse-ic{background:var(--blue-50)}

.pulse-body{min-width:0;display:flex;flex-direction:column;gap:3px}
.pulse-meta{display:flex;align-items:center;gap:.35rem;font-size:.74rem;color:var(--ink-400)}
.pulse-tag{font-weight:600}
.pulse-prayer   .pulse-tag{color:var(--gold-600)}
.pulse-testimony .pulse-tag{color:var(--blue-500)}
.pulse-seeker   .pulse-tag{color:var(--navy-600)}
.pulse-title{font-weight:600;color:var(--ink-900);line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pulse-excerpt{font-size:.82rem;color:var(--ink-600);line-height:1.5;
  display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

.pulse-links{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:20px}

@media (prefers-reduced-motion:reduce){
  .pulse-live{animation:none}
  .pulse-item{transition:none}
  .pulse-item:hover{transform:none}
}


/* ══════════════════════════════════════════════════════════════════════════
   现站【各页面内联】的样式 —— 此前整批没有搬过来。

   ☠️ 这一批最难发现：标记我照搬了、类名也一样，但样式定义在现站那个 .php 文件
      自己的 <style> 里，不在 style.css 里。于是页面元素都在、位置全乱 ——
      而单看 HTML 完全正确，扫描器也报不出任何问题。
      是拿「模板用到的类名 vs 样式表里定义过的类名」对了一遍才照出来的。
   ══════════════════════════════════════════════════════════════════════════ 
/* ── 我的阅读：日历格 + 打卡统计 —— 逐字节照搬现站 my-reading.php 的内联 <style> ── */
.rd-stats{display:flex;gap:14px;margin-bottom:16px;flex-wrap:wrap}
.rd-stat{flex:1;min-width:140px;background:var(--card,#fff);border:1px solid var(--line);border-radius:var(--radius);padding:16px;text-align:center}
.rd-num{display:block;font-size:1.7rem;font-weight:800}
.rd-lab{color:var(--text-muted,#667);font-size:.9rem}
.rd-day{font-weight:700;margin:14px 0 6px;color:var(--text,#334)}
.rd-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}
.rd-list li{display:flex;align-items:center;gap:8px}
.rd-list a{text-decoration:none}
.rd-time{margin-left:auto;color:var(--text-muted,#889);font-size:.8rem}
.rd-quick{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.cal-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 14px}
.cal-head h2{margin:0;font-size:1.4rem}
.cal-nav{font-size:1.6rem;line-height:1;padding:2px 14px;text-decoration:none;color:inherit;border-radius:8px;border:1px solid var(--line)}
.cal-nav:hover{background:var(--bg-soft,#eef)}
.cal-disabled{opacity:.3;pointer-events:none}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.cal-dow{text-align:center;font-size:.82rem;color:var(--text-muted,#889);padding:4px 0;font-weight:700}
.cal-cell{position:relative;min-height:132px;border:1px solid var(--line);border-radius:10px;padding:7px 8px;overflow:hidden;transition:border-color .15s}
.cal-cell-top{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:22px}
.cal-items{display:flex;flex-direction:column;gap:3px;margin-top:4px}
.cal-item{font-size:.78rem;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-decoration:none;color:var(--success);display:block}
a.cal-item:hover{text-decoration:underline}
.cal-item-plain{color:var(--text-muted,#667)}
.cal-more{font-size:.72rem;color:var(--text-muted,#889);margin-top:1px}
.rd-checkin-bar{margin:0 0 16px;text-align:center}
.cal-blank{border:0;background:transparent}
.cal-num{font-size:1rem;color:var(--text,#334);font-weight:600}
.cal-read{background:#e6f4ea;border-color:#69b487}
.cal-read .cal-num{color:var(--success);font-weight:800}
/* Tick a day straight from the grid. Faint until hovered or checked. */
.cal-tick{width:22px;height:22px;flex:none;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--line);background:var(--card,#fff);color:#b6bcc8;border-radius:50%;
  font-size:.76rem;line-height:1;cursor:pointer;padding:0;opacity:.65;transition:all .15s}
.cal-cell:hover .cal-tick{opacity:1;border-color:#69b487;color:#69b487}
.cal-tick:hover{background:#e6f4ea;border-color:var(--success);color:var(--success);transform:scale(1.12)}
.cal-tick.is-read{background:var(--success);border-color:var(--success);color:#fff;opacity:1;font-weight:700}
.cal-tick:disabled{cursor:default}
.cal-today{outline:2px solid var(--navy-800,var(--navy-800));outline-offset:1px}
.cal-legend{display:flex;align-items:center;gap:6px;justify-content:center;margin-top:12px;color:var(--text-muted,#778);font-size:.82rem;flex-wrap:wrap}
.cal-key{width:14px;height:14px;border-radius:4px;display:inline-block;border:1px solid var(--line)}
.cal-key.cal-read{background:#e6f4ea;border-color:#69b487}
.cal-key.cal-today{background:#fff;outline:2px solid var(--navy-800,var(--navy-800));outline-offset:-1px}
@media(max-width:820px){.cal-cell{min-height:104px}.cal-item{font-size:.7rem}}
@media(max-width:520px){
  .cal-grid{gap:4px}
  .cal-cell{min-height:74px;padding:4px 4px;border-radius:8px}
  .cal-num{font-size:.82rem}
  .cal-tick{width:18px;height:18px;font-size:.66rem;opacity:1}
  .cal-item{font-size:.6rem;line-height:1.25}
  .cal-items{gap:1px;margin-top:2px}
}
/* ── 找教会：请求卡、发帖框、回应表单 —— 逐字节照搬现站 includes/seeker-style.php 的内联 <style> ── */
.seeker-composer .seeker-fields{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.seeker-composer .seeker-fields > *{flex:1 1 160px;min-width:120px;border:1px solid var(--line);border-radius:var(--radius);padding:9px 10px;font:inherit}
.seeker-composer textarea{width:100%;border:1px solid var(--line);border-radius:var(--radius);padding:10px;font:inherit;resize:vertical}
.seeker-composer .btn{margin-top:8px}
.seeker-login-cta{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.seeker-wall{display:flex;flex-direction:column;gap:14px}
.seeker-card-head{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.seeker-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;flex:none}
.seeker-avatar-fallback{display:flex;align-items:center;justify-content:center;background:var(--navy-800,var(--navy-800));color:#fff;font-weight:700}
.seeker-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.92rem}
.seeker-date{color:var(--text-muted,#667)}
.seeker-tags{display:flex;gap:6px;flex-wrap:wrap;margin:.2rem 0 .5rem}
.seeker-note{color:var(--text,#334);margin:0 0 .7rem;white-space:pre-line}
.seeker-matches{background:var(--tint,#f2f6ff);border:1px solid var(--line);border-radius:var(--radius);padding:12px 14px;margin-bottom:.7rem}
.seeker-matches-title{font-weight:700;margin-bottom:6px}
.seeker-match-list{list-style:none;padding:0;margin:0 0 8px;display:flex;flex-direction:column;gap:4px}
.seeker-match-list a{text-decoration:none}
.seeker-nomatch{color:var(--text-muted,#667);font-size:.92rem;margin-bottom:.6rem}
.seeker-card-foot{display:flex;gap:10px;flex-wrap:wrap}
.btn-sm{padding:6px 12px;font-size:.9rem}
.seeker-response{display:flex;gap:10px;margin:12px 0;align-items:flex-start}
.seeker-response p{margin:.2rem 0 0;white-space:pre-line}
.seeker-respond-form textarea{width:100%;border:1px solid var(--line);border-radius:var(--radius);padding:10px;font:inherit;resize:vertical;margin-bottom:8px}
/* ── 分享条（ss-*） —— 逐字节照搬现站 includes/social-share.php 的内联 <style> ── */
.ss-wrap { text-align:center; padding:14px 12px 18px; }
.ss-head { font-weight:700; color:var(--navy-800,var(--navy-800)); margin-bottom:12px; font-size:15.5px; }
.ss-icons { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-bottom:14px; }
.ss-btn { width:44px; height:44px; border-radius:50%; border:1px solid var(--line,#dde5f0);
  background:#fff; display:inline-flex; align-items:center; justify-content:center;
  font-size:19px; color:var(--navy-800,var(--navy-800)); cursor:pointer; text-decoration:none;
  transition:transform .12s, border-color .12s, background .12s, color .12s, box-shadow .12s; }
.ss-btn:hover, .ss-btn:focus-visible { transform:translateY(-2px); color:#fff;
  border-color:var(--gold-500,#d4a428); background:var(--gold-500,#d4a428);
  box-shadow:0 5px 14px rgba(22,38,74,.18); }
.ss-btn.ss-fb:hover, .ss-btn.ss-fb:focus-visible { background:#1877F2; border-color:#1877F2; }
.ss-btn.ss-wa:hover, .ss-btn.ss-wa:focus-visible { background:#25D366; border-color:#25D366; }
.ss-btn.ss-tg:hover, .ss-btn.ss-tg:focus-visible { background:#2AABEE; border-color:#2AABEE; }
.ss-btn.ss-x:hover, .ss-btn.ss-x:focus-visible { background:#14171a; border-color:#14171a; }
.ss-btn.ss-line:hover, .ss-btn.ss-line:focus-visible { background:#06C755; border-color:#06C755; }
.ss-btn.ss-mail:hover, .ss-btn.ss-mail:focus-visible { background:var(--navy-800,var(--navy-800)); border-color:var(--navy-800,var(--navy-800)); }
.ss-btn svg { width:20px; height:20px; fill:currentColor; }
.ss-cap { display:inline-flex; align-items:center; gap:8px; background:var(--gold-500,#d4a428);
  color:#fff; font-weight:700; border:none; border-radius:999px; padding:12px 26px;
  font-size:15px; cursor:pointer; box-shadow:0 3px 10px rgba(212,164,40,.35); transition:background .15s; }
.ss-cap:hover { background:var(--gold-600,#b8890f); }
/* ── 私信：收件箱与气泡 —— 逐字节照搬现站 includes/message-style.php 的内联 <style> ── */
.msg-thread-head{padding-bottom:10px;border-bottom:1px solid var(--line);margin-bottom:12px}
.msg-list{display:flex;flex-direction:column;gap:10px;max-height:60vh;overflow-y:auto;padding:4px 2px}
.msg-bubble{max-width:78%;padding:9px 13px;border-radius:14px;position:relative}
.msg-body{white-space:pre-line;word-break:break-word}
.msg-time{display:block;font-size:.72rem;opacity:.7;margin-top:3px}
.msg-mine{align-self:flex-end;background:var(--navy-800,var(--navy-800));color:#fff;border-bottom-right-radius:4px}
.msg-theirs{align-self:flex-start;background:var(--tint,#eef2fb);color:var(--text,#223);border-bottom-left-radius:4px}
.msg-reply{display:flex;gap:8px;margin-top:14px;align-items:flex-end}
.msg-reply textarea{flex:1;border:1px solid var(--line);border-radius:var(--radius);padding:9px 10px;font:inherit;resize:vertical}
.msg-inbox{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.msg-inbox-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;text-decoration:none;color:inherit;border-bottom:1px solid var(--line)}
.msg-inbox-item:last-child{border-bottom:0}
.msg-inbox-item:hover{background:var(--tint,#f4f7fd)}
.msg-unread{background:var(--tint,#eef4ff)}
.msg-unread .msg-inbox-who strong{font-weight:800}
.msg-inbox-main{min-width:0;display:flex;flex-direction:column;gap:2px}
.msg-inbox-preview{color:var(--text-muted,#667);font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:52ch}
.msg-inbox-side{display:flex;align-items:center;gap:8px;color:var(--text-muted,#889);font-size:.82rem;flex:none}
.msg-dot{width:9px;height:9px;border-radius:50%;background:#e0483d;display:inline-block}
/* ── 代祷墙：卡片、发帖框、计数 —— 逐字节照搬现站 prayer.php 的内联 <style> ── */
.prayer-composer textarea{width:100%;border:1px solid var(--line);border-radius:var(--radius);padding:10px;font:inherit;resize:vertical}
.prayer-composer-row{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-top:8px;flex-wrap:wrap}
.prayer-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.prayer-wall{display:flex;flex-direction:column;gap:14px}
.prayer-card-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.prayer-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;flex:none}
.prayer-avatar-fallback{display:flex;align-items:center;justify-content:center;background:var(--navy-800,var(--navy-800));color:#fff;font-weight:700}
.prayer-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:.92rem}
.prayer-date{color:var(--text-muted,#667)}
.prayer-title{margin:.2rem 0 .4rem;font-size:1.08rem}
.prayer-excerpt{color:var(--text-muted,#556);margin:0 0 .6rem}
.prayer-card-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.prayer-counts{color:var(--text-muted,#667);font-size:.92rem}
.prayer-login-cta{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
/* ── 阅读进度小组件（rd-w-*） —— 逐字节照搬现站 includes/reading-lib.php 的内联 <style> ── */
.rd-widget .rd-w-stats{display:flex;justify-content:space-between;font-size:.9rem;margin-bottom:8px}
    .rd-widget .rd-w-week{display:flex;gap:5px;margin-bottom:8px}
    .rd-widget .rd-w-dot{flex:1;text-align:center;font-size:.7rem;color:var(--text-muted,#889);padding:6px 0;border-radius:6px;background:var(--bg-soft,#eceef3)}
    .rd-widget .rd-w-dot.on{background:var(--success);color:#fff;font-weight:700}
    .rd-widget .rd-w-checkin{margin-bottom:10px}
    .rd-widget .rd-w-checkin .read-mark{width:100%;justify-content:center}
    
    .read-mark{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--card,#fff);
      color:var(--text,#334);border-radius:999px;padding:6px 13px;font:inherit;font-size:.9rem;cursor:pointer;text-decoration:none;transition:background .15s,border-color .15s,color .15s}
    .read-mark:hover{border-color:var(--navy-800,var(--navy-800))}
    .read-mark.is-read{background:var(--success);border-color:var(--success);color:#fff}
    .read-mark .read-ico{font-weight:700}
/* ── 教会目录：已选筛选条（af-*） —— 逐字节照搬现站 churches.php 的内联 <style> ── */
.active-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.af-label{color:var(--text-muted,#778);font-size:.86rem}
.af-chip{display:inline-flex;align-items:center;gap:7px;background:var(--navy-800,var(--navy-800));color:#fff;
  border-radius:999px;padding:5px 12px;font-size:.86rem;text-decoration:none;line-height:1.4}
.af-chip:hover{background:#e0483d}
.af-chip .af-x{font-weight:700;opacity:.75}
.af-chip:hover .af-x{opacity:1}
.af-clear{color:var(--text-muted,#778);font-size:.84rem;text-decoration:underline}
.af-recover{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}

/* ══════════════════════════════════════════════════════════════════════════
   缅甸文 / 泰文的排版 —— 2026-07-28 修「密密麻麻看不清」

   ☠️ 问题：四种语言【共用同一套排版参数】。实测四种语言渲染出来一模一样：
      正文 16px / 行高 1.65，标题行高 1.22。
      这套值是照着拉丁文和中文定的，对缅甸文和泰文远远不够：

      · 缅甸文和泰文的音符【叠在字母上下两侧】（元音符号、声调符号、下加辅音）。
        行高 1.65 时上下两行的符号会互相逼近甚至粘连 —— 就是「密密麻麻」的由来。
        标题的 1.22 更糟，几乎贴在一起。
      · 缅甸文和泰文【词与词之间不写空格】，整段本来就比拉丁文密实，
        行距不够时更难找到断句点。

   ★ 只调行高与字号，不动颜色、间距、布局 —— 排版之外的东西保持原样。
   ★ 用 html[lang] 限定，其它语言一个像素都不受影响。
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 缅甸文 ─────────────────────────────────────────────────────────── */
html[lang="my"] body { font-size: 16.5px; line-height: 2.0; }
html[lang="my"] p,
html[lang="my"] li,
html[lang="my"] .text-muted,
html[lang="my"] .hero-sub,
html[lang="my"] .card p,
html[lang="my"] .church-card p,
html[lang="my"] .section p { line-height: 2.0; }
/* 标题：1.22 对缅甸文太挤，符号会碰到上一行 */
html[lang="my"] h1, html[lang="my"] h2,
html[lang="my"] h3, html[lang="my"] h4 { line-height: 1.55; }
html[lang="my"] .hero h1 { line-height: 1.5; }
/* 卡片标题、按钮这类小块也要留出符号的位置 */
html[lang="my"] .btn,
html[lang="my"] .cat-card h3,
html[lang="my"] .church-card h3 { line-height: 1.7; }
/* 顶栏、页脚菜单项：行高够，但不能因此把顶栏撑高 —— 用固定行高而非倍数 */
html[lang="my"] .site-nav a,
html[lang="my"] .site-nav .nav-drop-toggle { line-height: 1.5; }

/* ── 泰文 ───────────────────────────────────────────────────────────── */
html[lang="th"] body { font-size: 16.5px; line-height: 1.9; }
html[lang="th"] p,
html[lang="th"] li,
html[lang="th"] .text-muted,
html[lang="th"] .hero-sub,
html[lang="th"] .card p,
html[lang="th"] .church-card p,
html[lang="th"] .section p { line-height: 1.9; }
html[lang="th"] h1, html[lang="th"] h2,
html[lang="th"] h3, html[lang="th"] h4 { line-height: 1.45; }
html[lang="th"] .hero h1 { line-height: 1.4; }
html[lang="th"] .btn,
html[lang="th"] .cat-card h3,
html[lang="th"] .church-card h3 { line-height: 1.65; }
html[lang="th"] .site-nav a,
html[lang="th"] .site-nav .nav-drop-toggle { line-height: 1.45; }

/* ============================================================
   教会目录：结果栏 · 排序 · 空状态   （2026-07-29 平台重构）
   ============================================================ */
.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-3);
}
.results-bar > p { margin: 0; }
.sort-picker { display: flex; align-items: center; gap: var(--s-2); }
.sort-picker label { font-size: var(--t-sm); color: var(--ink-600); white-space: nowrap; }
.sort-picker select {
  font-family: inherit; font-size: var(--t-sm); color: var(--ink-900);
  padding: 7px 30px 7px 11px; min-height: 38px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); cursor: pointer;
  /* 自绘箭头：各浏览器原生箭头长得都不一样，统一掉 */
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2365717A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 11px;
}
.sort-picker select:hover { border-color: var(--ink-400); }
/* 无 JS 兜底：下拉换成一排链接（公众页禁用 JS 也必须能用，是本项目的硬指标） */
.sort-links { display: inline-flex; flex-wrap: wrap; gap: var(--s-2); }
.sort-links a {
  font-size: var(--t-sm); padding: 5px 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line); color: var(--ink-600); text-decoration: none;
}
.sort-links a.active { border-color: var(--navy-800); color: var(--navy-800); font-weight: 700; }

/* ---- 空状态 ----
   「没有结果」只说结果没有，等于把用户扔在死路上。
   这一块的作用是给出下一步，所以四条出路都必须可点。 */
.empty-state { text-align: center; padding: var(--s-7) var(--s-4); }
.empty-ico { width: 40px; height: 40px; stroke: var(--ink-400); margin-bottom: var(--s-3); }
.empty-state h3 { font-size: var(--t-h3); color: var(--navy-800); margin-bottom: var(--s-2); }
.empty-tips {
  list-style: none; margin: var(--s-3) auto var(--s-5); padding: 0;
  max-width: 460px; text-align: left;
}
.empty-tips li {
  position: relative; padding: 5px 0 5px 22px;
  font-size: var(--t-sm); color: var(--ink-600);
}
.empty-tips li::before {
  content: ""; position: absolute; left: 4px; top: 13px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold-500);
}
.empty-state .af-recover { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; }

/* ============================================================
   教会资料可信度区块（tags/trustPanel.html）  2026-07-29
   ------------------------------------------------------------
   实测：186 万条教会里只有 1 条核实过、0 条被认领，53 万条连城市都没有。
   这一块的全部作用就是【把这件事诚实地说出来】——
   用户会照着坐标开车过去，说清楚比看起来专业重要得多。
   ============================================================ */
.trust-panel {
  margin: var(--s-6) 0;
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.trust-title {
  font-size: var(--t-h4); color: var(--navy-800); margin-bottom: var(--s-4);
}

/* ---- 四级认证 ---- */
.trust-levels { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
@media (min-width: 780px) { .trust-levels { grid-template-columns: repeat(2, 1fr); gap: var(--s-3); } }
.trust-lv {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--line-soft); border-radius: var(--r-md);
  background: var(--bg-soft);
  opacity: .55;                     /* 未达到的等级灰显 —— 但仍要读得清，不是藏起来 */
}
.trust-lv.on { opacity: 1; background: var(--surface); border-color: var(--line); }
.trust-lv-n {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 800;
  background: var(--line); color: var(--ink-600);
}
.trust-lv.on .trust-lv-n { background: var(--navy-800); color: #fff; }
.trust-lv-top.on .trust-lv-n { background: var(--gold-500); color: var(--navy-900); }
.trust-lv strong { display: block; font-size: var(--t-sm); color: var(--navy-800); }
.trust-lv span   { display: block; font-size: var(--t-caption); line-height: 1.5; color: var(--ink-600); }

/* ---- 事实表 ---- */
.trust-facts { display: grid; gap: var(--s-2); margin-bottom: var(--s-3); }
@media (min-width: 620px) { .trust-facts { grid-template-columns: repeat(2, 1fr); gap: var(--s-2) var(--s-5); } }
.trust-facts > div {
  display: flex; justify-content: space-between; gap: var(--s-3);
  padding: 7px 0; border-bottom: 1px solid var(--line-soft);
}
.trust-facts dt { font-size: var(--t-sm); color: var(--ink-600); }
.trust-facts dd { font-size: var(--t-sm); color: var(--ink-900); font-weight: 600; text-align: right; }

/* ---- 位置估算警告 ----
   这是整块里最有实际后果的一句话，所以给它独立的视觉重量。 */
.trust-warn {
  display: flex; align-items: flex-start; gap: var(--s-2);
  padding: var(--s-3); margin-bottom: var(--s-4);
  background: var(--warning-bg); border: 1px solid #E8D5AC; border-radius: var(--r-md);
  font-size: var(--t-sm); line-height: 1.55; color: #7C5A17;
}
.trust-warn svg { width: 18px; height: 18px; flex: none; margin-top: 2px; stroke: var(--warning); }

.trust-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---- 跳到主要内容（WCAG 2.4.1）----
   ☠️ 不能用 display:none / visibility:hidden —— 那样【键盘也聚焦不到】，
      等于这条链接不存在。正确做法是移出视口，聚焦时再挪回来。 */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  padding: 10px 18px; border-radius: 0 0 var(--r-sm) 0;
  background: var(--navy-800); color: #fff; font-weight: 600;
  text-decoration: none !important;
}
.skip-link:focus {
  left: 0;
  outline: 3px solid var(--gold-500); outline-offset: -3px;
}
/* 跳过去之后正文本身不该画焦点框（它只是个落点，不是可操作元素） */
main[tabindex="-1"]:focus { outline: none; }

/* 顶部公告条（后台可填，空则整条不渲染） */
.site-announcement {
  background: var(--gold-100); border-bottom: 1px solid #E8D9B8;
  color: #6E5216; font-size: var(--t-sm); line-height: 1.55;
}
.site-announcement .container { padding-top: 10px; padding-bottom: 10px; }

/* ---- 通用行内 UI 图标（替代散落全站的 emoji）----
   ☠️ 为什么不用 emoji：同一个 🕊️ 在 Windows / macOS / 安卓上是三个完全不同的样子，
      在缅甸文和泰文系统上还经常缺字形直接渲染成豆腐块 ——
      而这个站有一半流量在缅甸和泰国。
   SVG 用 currentColor 跟着文字走，四端一致，hover/active 态自动统一。 */
.ui-ico {
  width: 15px; height: 15px;
  vertical-align: -2px; margin-right: 5px;
  stroke: currentColor; flex: none;
  opacity: .8;
}
h1 .ui-ico, h2 .ui-ico { width: 20px; height: 20px; vertical-align: -3px; margin-right: 7px; opacity: .9; }
h3 .ui-ico { width: 17px; height: 17px; vertical-align: -2px; }
.btn .ui-ico { margin-right: 0; opacity: 1; }

/* ============================================================
   评论区 —— Facebook 式（2026-07-29）
   ------------------------------------------------------------
   ☠️ 改之前这一块只有「读」那一半，而且：
      · 登录用户看不到任何输入框（未登录反而有「请登录」提示）
      · 空状态用的是「还没有帖子，来分享第一篇吧！」（信息流的文案）
      · 评论列表借用了求助板的 .seeker-response 样式
   Facebook 的形态：头像 + 灰色圆角气泡（名字和正文在气泡里）+ 气泡外的时间戳。
   ============================================================ */
.cmt-panel { padding: var(--s-4) var(--s-5) var(--s-5); }
.cmt-h {
  margin: 0 0 var(--s-4); font-size: var(--t-h4); color: var(--navy-800);
  display: flex; align-items: center; gap: 6px;
}
.cmt-list { list-style: none; margin: 0 0 var(--s-4); padding: 0; }
.cmt-item { display: flex; gap: 10px; margin-bottom: var(--s-3); }
.cmt-avatar { flex: none; }
.cmt-avatar img, .cmt-avatar-fb {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block;
}
.cmt-avatar-fb {
  background: var(--blue-500); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.cmt-bubble-wrap { min-width: 0; flex: 1 1 auto; }
.cmt-bubble {
  display: inline-block; max-width: 100%;
  background: var(--bg-soft); border-radius: 16px;
  padding: 8px 13px;
}
.cmt-author { display: block; font-size: var(--t-caption); color: var(--navy-800); margin-bottom: 2px; }
.cmt-text { font-size: var(--t-sm); line-height: 1.55; color: var(--ink-900); overflow-wrap: break-word; white-space: pre-line; }
.cmt-time { display: block; font-size: var(--t-caption); color: var(--ink-400); margin: 4px 0 0 13px; }
.cmt-empty { margin-bottom: var(--s-4); }

/* 写评论 —— 头像 + 一个圆角输入框，回车即发的观感 */
.cmt-form { display: flex; gap: 10px; align-items: flex-start; }
.cmt-input-wrap {
  flex: 1 1 auto; min-width: 0;
  display: flex; gap: var(--s-2); align-items: flex-end;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 20px; padding: 6px 6px 6px 14px;
}
.cmt-input-wrap:focus-within { border-color: var(--navy-600); background: var(--surface); }
.cmt-input-wrap textarea {
  flex: 1 1 auto; min-width: 0; resize: none; border: 0; background: transparent;
  font-family: inherit; font-size: var(--t-sm); line-height: 1.5;
  padding: 5px 0; color: var(--ink-900); max-height: 160px;
}
.cmt-input-wrap textarea:focus { outline: none; }
.cmt-input-wrap .btn { flex: none; border-radius: 16px; }

/* ---- 帖子操作栏：四个按钮等宽 ----
   ☠️ 模板里原先给两个 <form> 写了 style="display:inline" ——
      行内样式压过 CSS 的 display:flex，于是表单里的按钮没被拉伸，
      四个按钮宽度各不相同（Ray 2026-07-29 截图：点赞靠左、分享靠右，中间两个挤在一起）。
      行内样式已从模板里删掉；这里再钉一次，防止有人手滑加回来。 */
/* ☠️ 用 grid 而不是 flex：flex 的 `flex:1 1 0` 在子项 white-space:nowrap 时
      仍会被 min-content 撑开 —— 实测「评论 · 1」那一格 218px，其余 150px（差 68px）。
      `grid-auto-columns: 1fr` 是<b>硬等宽</b>，跟文字长短无关，正是 Facebook 的观感。
      按钮数量会变（登录/未登录、代祷帖/普通帖），所以用 auto-flow 而不是写死列数。 */
.feed-actions {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
}
.feed-actions > form,
.feed-actions > a,
.feed-actions > .share-dropdown { display: flex; min-width: 0; }
.feed-actions .feed-act {
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmt-pending { color: var(--warning); font-weight: 600; }

/* ---- 帖子详情：评论区【贴在帖子下面】，不留缝 ----
   ☠️ 改之前帖子卡和评论区是两张独立的卡片，中间隔着 16px 的间距 + 各自一圈边框和圆角。
      Ray 2026-07-29 的原话是「有那么大的隔阂 太丑了」。
      Facebook 的做法：评论是帖子的一部分，同一张卡里用一条分隔线隔开。
   做法：外面套一层，把上下两块的相邻圆角抹平、中间只留一条线。 */
.post-detail-stack { display: flex; flex-direction: column; }
.post-detail-stack > .feed-card {
  margin-bottom: 0;
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  border-bottom: 0;
}
.post-detail-stack > .cmt-panel {
  margin-top: 0;
  border-top-left-radius: 0; border-top-right-radius: 0;
  /* 上边框就是那条分隔线 —— 用浅一档的颜色，看着是「同一张卡里的分隔」而不是「两张卡」 */
  border-top: 1px solid var(--line-soft);
}
/* 评论区标题在贴合之后不需要那么大的上留白 */
.post-detail-stack > .cmt-panel .cmt-h { margin-top: 0; }

/* ---- 举报（帖子详情页底部，默认收起）----
   关掉「先审后发」之后，举报是唯一的治理手段 —— 它必须真的存在、且找得到。 */
.report-box > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 6px;
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-600);
}
.report-box > summary::-webkit-details-marker { display: none; }
.report-box > summary:hover { color: var(--error); }
.report-form { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-3); }
.report-form label { font-size: var(--t-sm); color: var(--ink-600); }
.report-form select, .report-form textarea {
  font-family: inherit; font-size: var(--t-sm);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 11px; background: var(--surface); color: var(--ink-900);
}
.report-form button { align-self: flex-start; }

/* ---- 地图图例（§8.1）----
   ☠️ 没有图例的彩色标记等于没上色：用户看得出颜色不一样，却不知道代表什么。
   ⚠️ 无障碍：不能只靠颜色表达状态 —— 每一项都带文字，色块只是辅助。 */
.map-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4);
  margin-top: var(--s-3); padding: var(--s-3) var(--s-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: var(--t-sm); color: var(--ink-600);
}
.map-legend .ml-title { font-weight: 700; color: var(--navy-800); }
.map-legend .ml-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.map-legend .ml-dot {
  width: 13px; height: 13px; border-radius: 50%; flex: none;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line);
}
/* 估算位置：橙色描边（与地图上 m.a=1 的画法一致） */
.map-legend .ml-approx { border-color: var(--warning); box-shadow: none; }

/* ============================================================
   教会详情页 Tab（§9.3）
   ------------------------------------------------------------
   ☠️ 无 JS 时必须能看到全部内容 —— 这是本项目的硬约束（公众页禁用 JS 也要可用，
      因为一半流量靠自然搜索，而爬虫和低端机不一定跑 JS）。
   所以：
     · Tab 栏默认 display:none，只有 JS 给它加了 .on 才显示
     · 面板默认全部可见；JS 接管后才把非当前面板隐藏
   反过来做（默认只显示第一个面板）会让禁用 JS 的人永远看不到联系方式。
   ============================================================ */
.church-tabs { display: none; }
.church-tabs.on {
  display: flex; gap: 2px; flex-wrap: wrap;
  margin-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.ct-tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: var(--t-sm); font-weight: 600;
  color: var(--ink-600); padding: 11px 16px; min-height: 44px;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.ct-tab:hover { color: var(--navy-800); background: var(--bg-soft); }
.ct-tab.active { color: var(--navy-800); border-bottom-color: var(--gold-500); }
/* 面板本身不加样式 —— 隐藏由 JS 打 hidden 属性完成，这样无 JS 时天然全可见 */
.ct-panel[hidden] { display: none; }

/* ---- 评论互动：赞 / 回复（Facebook 同款）----
   ☠️ 改之前评论区只能看：点不了赞、回不了别人的评论。
      数据库早就支持（likes 多态 + comments.parent_comment_id），只是功能没接。 */
.cmt-tools {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3);
  margin: 4px 0 0 13px;
}
.cmt-act {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit; font-size: var(--t-caption); font-weight: 700;
  color: var(--ink-600); text-decoration: none !important;
}
.cmt-act:hover { color: var(--navy-800); text-decoration: underline !important; }
.cmt-act.on { color: var(--gold-600); }
.cmt-tools .cmt-time { margin: 0; }
.cmt-likes {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: var(--t-caption); color: var(--ink-600);
}
.cmt-likes[hidden] { display: none; }
.cmt-likes .ui-ico { width: 13px; height: 13px; margin: 0; stroke: var(--gold-600); opacity: 1; }

/* 回复：缩进一层。⚠️ 只做一层 —— Facebook 也是一层，无限嵌套在窄屏上会缩成一条线。 */
.cmt-replies { list-style: none; margin: var(--s-2) 0 0; padding: 0 0 0 26px; }
.cmt-replies:empty { display: none; }
.cmt-replies .cmt-item { margin-bottom: var(--s-2); }
.cmt-replies .cmt-avatar img, .cmt-replies .cmt-avatar-fb {
  width: 28px; height: 28px; font-size: 12px;
}

/* 「正在回复 XXX」提示条
   ⚠️ .cmt-form 是 flex 行（头像 | 输入框）。提示条如果不 basis:100% + order:-1，
      它会变成这一行里的<b>第三列</b>，挤在头像和输入框中间 —— 位置完全不对。 */
.cmt-form { flex-wrap: wrap; }
.cmt-replying {
  flex: 0 0 100%; order: -1;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  margin: 0 0 var(--s-2) 42px; padding: 5px 11px;
  background: var(--blue-50); border-radius: var(--r-sm);
  font-size: var(--t-caption); color: var(--navy-700);
}
.cmt-replying[hidden] { display: none; }
.cmt-replying button {
  appearance: none; background: none; border: 0; cursor: pointer;
  color: var(--ink-600); font-size: 13px; line-height: 1; padding: 2px 4px;
}
.cmt-replying button:hover { color: var(--error); }
/* 作者名现在是链接（点进个人主页）—— 别让它看起来像普通链接 */
a.cmt-author { text-decoration: none !important; }
a.cmt-author:hover { text-decoration: underline !important; }

/* ---- 认领教会的选择器（不带 ?church= 的那一屏）----
   ☠️ 这一屏原先<b>不存在</b>：导航里的「认领教会」指向 /claim-church.php，
      而那个端点没有 church 参数就 404 —— 每个登录用户点那个菜单都撞 404。 */
.claim-picker .lbl {
  display: block; font-weight: 700; font-size: var(--t-sm);
  color: var(--ink-900); margin-bottom: var(--s-2);
}
.claim-picker-row { display: flex; gap: var(--s-2); }
.claim-picker-row input {
  flex: 1 1 auto; min-width: 0;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: inherit; font-size: var(--t-base); background: var(--surface); color: var(--ink-900);
}
.claim-picker-row input:focus { outline: none; border-color: var(--navy-600); box-shadow: var(--focus-ring); }
.claim-picker-row .btn { flex: none; }

.claim-results { list-style: none; margin: var(--s-4) 0 0; padding: 0; }
.claim-results li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: var(--s-2);
}
.cr-main { min-width: 0; }
.cr-name { font-weight: 700; color: var(--navy-800); display: block; }
.cr-loc { display: block; font-size: var(--t-caption); color: var(--ink-600); margin-top: 2px; }
.cr-taken {
  flex: none; font-size: var(--t-caption); color: var(--ink-600);
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px;
}
@media (max-width: 560px) {
  .claim-picker-row { flex-wrap: wrap; }
  .claim-picker-row .btn { width: 100%; }
  .claim-results li { flex-wrap: wrap; }
}

/* ---- 分步表单（提交教会）----
   ⚠️ 无 JS 时 .wiz-step 全部展开（fieldset 默认可见）—— 这里只加视觉分组，
      隐藏是 JS 用 [hidden] 做的，CSS 不参与。 */
.wiz-steps {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  list-style: none; margin: 0 0 var(--s-5); padding: 0;
  counter-reset: none;
}
.wiz-steps li {
  display: flex; align-items: center; gap: 7px;
  font-size: var(--t-caption); font-weight: 700; color: var(--ink-400);
  padding: 6px 13px 6px 7px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 999px;
}
.wiz-steps li span {
  flex: none; width: 21px; height: 21px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-600);
}
.wiz-steps li.is-current {
  color: var(--navy-800); background: var(--blue-50); border-color: var(--navy-600);
}
.wiz-steps li.is-current span { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.wiz-steps li.is-done { color: var(--success); border-color: var(--success); background: var(--success-bg); }
.wiz-steps li.is-done span { background: var(--success); border-color: var(--success); color: #fff; }

.wiz-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.wiz-step > legend {
  padding: 0; margin-bottom: var(--s-4);
  font-size: var(--t-h4); font-weight: 800; color: var(--navy-800);
}
/* 无 JS 时四步都在页面上 —— 给它们之间加分隔，否则糊成一坨 */
.wiz-step + .wiz-step { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); }
/* JS 接管后一次只显示一步，分隔线就没意义了（第一个可见的 step 不该有上边线） */
.wiz-step[hidden] + .wiz-step { margin-top: 0; padding-top: 0; border-top: 0; }

.wiz-nav { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.wiz-warn {
  margin: var(--s-4) 0 0; padding: 9px 13px;
  background: var(--error-bg); color: var(--error);
  border: 1px solid var(--error); border-radius: var(--r-sm);
  font-size: var(--t-sm);
}
@media (max-width: 560px) {
  .wiz-nav { flex-direction: column-reverse; }
  .wiz-nav .btn { width: 100%; }
  .wiz-steps li { flex: 1 1 auto; justify-content: center; }
}

/* ---- 表单网格 ----
   ☠️ 实测发现 .form-grid 和 .full <b>从来没有任何 CSS</b>：
      提交教会那 20 个字段一直是单列堆下来的，而模板里认真地给宽字段标了 class="full" ——
      标记表达了意图，样式从没实现过。不报错，只是长得像一根面条。
   → 补上两列；.full 跨两列。窄屏退回单列。 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-4); }
.form-grid > .full, .form-grid > fieldset { grid-column: 1 / -1; }
.form-grid label {
  display: block; font-weight: 700; font-size: var(--t-sm);
  color: var(--ink-900); margin-bottom: 6px;
}
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%; padding: 10px 13px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: inherit; font-size: var(--t-base);
  background: var(--surface); color: var(--ink-900);
}
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
  outline: none; border-color: var(--navy-600); box-shadow: var(--focus-ring);
}
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* ---- 「同时也发布到…」勾选（发帖去向）----
   ☠️ 之前发帖去向是<b>写死在后端</b>的：先写死只发社区（作者在自己空间看不到自己的帖），
      再写死两边都发（私人近况被推到所有人的社区流）。两次都是把该由用户决定的事写死。 */
.also-check {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--t-sm); color: var(--ink-600); cursor: pointer;
  user-select: none;
}
.also-check input { width: 16px; height: 16px; accent-color: var(--navy-700); cursor: pointer; }
.also-check:hover { color: var(--ink-900); }

/* ---- 三点菜单里的「删除帖子」----
   ⚠️ 菜单里的表单不能带默认的块级间距，否则那一项会比别的项高出一截、看着像错位。 */
.feed-menu-list .fm-danger { margin: 0; padding: 0; }
.feed-menu-list .fm-danger button { color: var(--error); }
.feed-menu-list .fm-danger button:hover { background: var(--error-bg); color: var(--error); }

/* ---- 侧栏的 BiblePro 下载卡（tags/appRail）----
   【Ray 2026-07-30】「所有页面空荡荡的地方就要…让用户去下载」。
   ⚠️ 做成侧栏常驻卡而不是弹窗：插页式弹窗是 Google 移动端排名的负面信号，
      而这个站一半流量靠自然搜索（187 万个教会页）—— 弹窗会伤到主要流量来源。
      详见 tags/appRail.html 的说明。 */
.app-rail {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  color: #fff;
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-4);
  text-align: center;
  box-shadow: var(--shadow);
}
.app-rail-icon { border-radius: 14px; margin: 0 auto var(--s-3); display: block; }
.app-rail-h {
  font-size: var(--t-h4); font-weight: 800; color: #fff;
  margin: 0 0 var(--s-2); line-height: 1.35;
}
.app-rail-p {
  font-size: var(--t-caption); color: var(--blue-100);
  margin: 0 0 var(--s-4); line-height: 1.6;
}
.app-rail .btn-block { width: 100%; }
.app-rail-note {
  font-size: 11.5px; color: var(--ink-400); margin: var(--s-3) 0 0;
}

/* 个人主页复用 me.php 的三栏（见 profile.html 的说明），补两处这一页特有的 */
.intro-facts { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.intro-facts li {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: var(--t-sm); color: var(--ink-600); margin-bottom: 7px; line-height: 1.5;
}
.intro-facts .ui-ico { flex: none; margin-top: 2px; }
.intro-bio { font-size: var(--t-sm); color: var(--ink-900); line-height: 1.65; margin: 0; }

/* ---- 地图页的「一个框搜全部」----
   ☠️ 这一组类此前<b>一条 CSS 都没有</b>（NoUnstyledClassTest 抓到的）：
      标记写完了、JS 写完了、样式从没写过 —— 页面上是一个没有边框的裸输入框
      加一个没有定位的下拉面板（会把下面的内容顶开）。
      HTML 看着完全正确，只有真的打开页面才看得出来。 */
.map-search {
  position: relative; display: flex; align-items: center; gap: var(--s-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 6px 8px 6px 14px;
  margin-bottom: var(--s-4); box-shadow: var(--shadow);
}
.map-search:focus-within { border-color: var(--navy-600); box-shadow: var(--focus-ring); }
.ms-ico { width: 18px; height: 18px; flex: none; color: var(--ink-400); }
.ms-input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent;
  font-family: inherit; font-size: var(--t-base); color: var(--ink-900); padding: 8px 0;
}
.ms-input:focus { outline: none; }
.ms-go { flex: none; }

/* 下拉面板 —— 必须绝对定位，否则会把地图往下挤 */
.ms-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  max-height: 60vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  padding: var(--s-2) 0;
}
.ms-group {
  padding: 7px 14px 4px; font-size: var(--t-caption); font-weight: 700;
  color: var(--ink-400); text-transform: uppercase; letter-spacing: .04em;
}
.ms-opt {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 14px; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: var(--t-sm); color: var(--ink-900); text-align: left;
}
.ms-opt:hover, .ms-opt:focus-visible, .ms-opt[aria-selected="true"] { background: var(--blue-50); outline: none; }
.ms-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.ms-main { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-sub { flex: none; font-size: var(--t-caption); color: var(--ink-600); }
.ms-kind {
  flex: none; font-size: 11.5px; font-weight: 700; color: var(--navy-700);
  background: var(--blue-100); border-radius: var(--r-sm); padding: 2px 7px;
}
.ms-empty { padding: 14px; text-align: center; color: var(--ink-600); font-size: var(--t-sm); }
.ms-all {
  display: block; padding: 10px 14px; margin-top: var(--s-2);
  border-top: 1px solid var(--line-soft);
  font-size: var(--t-sm); font-weight: 700; color: var(--navy-700); text-align: center;
}
@media (max-width: 560px) {
  .map-search { flex-wrap: wrap; }
  .ms-go { width: 100%; margin-top: 6px; }
}


/* ---- 转发弹窗（Facebook 式）—— Ray 2026-07-31 ----
   ☠️ 改之前点「转发」弹的是浏览器 confirm()，没有任何地方能写自己的话，
      转发出来的卡片正文位置只有「转发」两个字。
   ⚠️ 用 <details> 而不是 <dialog>：没有 JS 时照样能展开、表单照样能提交。 */
.repost-box { position: relative; display: inline-block; }
.repost-box > summary { list-style: none; cursor: pointer; }
.repost-box > summary::-webkit-details-marker { display: none; }
.repost-form {
  position: absolute; z-index: 40; left: 0; top: calc(100% + 6px);
  width: min(420px, calc(100vw - 32px));
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: var(--s-3);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.repost-form textarea {
  width: 100%; resize: vertical; font-family: inherit; font-size: var(--t-sm);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px;
}
/* 原帖预览 —— 让人看清自己在转什么（Facebook 弹窗里也有这一块） */
.repost-preview {
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: 8px 10px; background: var(--bg-soft);
  font-size: var(--t-sm); color: var(--ink-600);
  display: flex; flex-direction: column; gap: 2px;
}
.repost-preview strong { color: var(--ink-900); }
.repost-preview-text {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.repost-form button { align-self: flex-end; }

@media (max-width: 640px) {
  /* 手机上贴着屏幕左右边，别让弹窗跑出屏幕 */
  .repost-form { position: fixed; left: 16px; right: 16px; width: auto; top: auto; bottom: 16px; }
}

/* ---- 找人 / 好友列表（Ray 2026-07-31，好友 = 互相关注）---- */
.people-list { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.person-row {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) 0; border-bottom: 1px solid var(--line-soft);
}
.person-main { display: flex; align-items: center; gap: var(--s-3); flex: 1 1 auto; min-width: 0; }
.person-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.person-av-fb {
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-800); color: #fff; font-weight: 700;
}
.person-text { display: flex; flex-direction: column; min-width: 0; }
.person-text strong { color: var(--ink-900); display: flex; align-items: center; gap: 6px; }
.person-sub {
  font-style: normal; font-size: var(--t-sm); color: var(--ink-600);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.person-act { display: flex; gap: 6px; flex: none; }

@media (max-width: 480px) {
  /* 手机上按钮换行到下面，别把名字挤没 */
  .person-row { flex-wrap: wrap; }
  .person-act { width: 100%; justify-content: flex-end; }
}

/* ---- 私信（人 ↔ 人）—— Ray 2026-07-31，Messenger 第 1 批 ----
   ⚠️ 与教会消息共用同一个收件箱页面：两个收件箱用户会找不到消息在哪。 */
.dm-panel { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.dm-head {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.dm-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.dm-av-fb {
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-800); color: #fff; font-weight: 700;
}
/* 消息区固定高度 + 自己滚动 —— 长会话不该把整页撑得很长 */
/*
   ☠️ 2026-07-31 修：原先 min-height:240px 且消息【从顶部往下排】——
      只有一两条消息时，下面空出一大片惨白，整个页面看起来像坏了。
      真实的聊天软件都是【贴着底部】排的：新消息永远在输入框正上方，
      少的时候不留空，多的时候自然往上堆。justify-content: flex-end 就是这件事。
*/
.dm-thread {
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: var(--s-2);
  padding: var(--s-4); min-height: 180px; max-height: 58vh; overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(23,59,87,.035), transparent 90px),
    var(--surface);
}
/* 消息很多时 flex-end 会把最上面的挤出可视区 —— 加这个让它正常滚动 */
.dm-thread > * { flex: none; }
.dm-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
/* 自己发的靠右（Messenger 同款） */
.dm-msg.dm-mine { align-self: flex-end; align-items: flex-end; }
.dm-bubble {
  background: var(--bg-soft); border-radius: 18px 18px 18px 6px; padding: 10px 14px;
  font-size: var(--t-sm); color: var(--ink-900); word-break: break-word;
  line-height: 1.55; box-shadow: 0 1px 2px rgba(15,39,57,.05);
}
.dm-bubble p { margin: 0; }
.dm-mine .dm-bubble {
  background: linear-gradient(160deg, var(--navy-700), var(--navy-800));
  color: #fff; border-radius: 18px 18px 6px 18px;
}
.dm-time { font-size: var(--t-caption); color: var(--ink-400); margin-top: 2px; }
.dm-form {
  display: flex; gap: 6px; align-items: flex-end;
  padding: 10px var(--s-4) 12px; border-top: 1px solid var(--line);
  background: var(--surface);
}
/* 输入框和两个附件按钮包成一个整体的「输入条」，而不是几个零散控件排一行 */
.dm-form textarea {
  flex: 1 1 auto; resize: none; font-family: inherit; font-size: var(--t-sm);
  border: 1px solid var(--line); border-radius: 20px; padding: 10px 16px;
  min-height: 42px; background: var(--bg-soft); transition: border-color .12s, background .12s;
}
.dm-form textarea:focus {
  outline: none; background: var(--surface);
  border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(36,91,130,.12);
}
.dm-form button { flex: none; border-radius: 20px; padding-left: 18px; padding-right: 18px; }

/* ── 消息请求（Ray 2026-07-31）── */
/* 我发的、对方还没接受 —— 输入框禁用，并说清楚为什么 */
.dm-pending {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0; padding: 11px var(--s-4);
  background: var(--warning-bg); border-top: 1px solid var(--line);
  color: var(--ink-900); font-size: 13.5px; line-height: 1.6;
}
.dm-pending b { color: var(--warning); }
/* 别人发来的请求 —— 顶部给两个明确的动作 */
.dm-req-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px var(--s-4); background: var(--blue-50);
  border-bottom: 1px solid var(--blue-100); font-size: 13.5px;
}
.dm-req-bar .dm-req-t { flex: 1 1 200px; color: var(--ink-600); line-height: 1.55; }
.dm-req-bar form { display: inline; }
/* 收件箱里「等待对方接受」的小标 */
.dm-tag-pending {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  background: var(--warning-bg); color: var(--warning);
  font-size: 11.5px; font-weight: 700; vertical-align: middle;
}
/* 「消息请求」分组标题 */
.dm-req-head {
  display: flex; align-items: center; gap: 8px;
  margin: 22px 0 6px; font-size: 15px; color: var(--navy-800);
}
.dm-req-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--error); color: #fff; font-size: 12px; font-weight: 700;
}

@media (max-width: 640px) {
  /* 手机上让聊天区占满可用高度，像 App 一样 */
  .dm-thread { max-height: none; height: 58vh; }
  .dm-msg { max-width: 88%; }
}

/* ---- 私信里的 emoji 与配图（Messenger 第 2 批）---- */
.dm-emoji { position: relative; flex: none; }
.dm-emoji > summary {
  list-style: none; cursor: pointer; font-size: 20px; line-height: 1;
  padding: 8px 6px; user-select: none;
}
.dm-emoji > summary::-webkit-details-marker { display: none; }
.dm-emoji-grid {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); padding: 6px; width: 240px;
}
.dm-emoji-grid button {
  border: 0; background: none; font-size: 20px; line-height: 1;
  padding: 6px; border-radius: var(--r-sm); cursor: pointer;
}
.dm-emoji-grid button:hover { background: var(--bg-soft); }
/* 聊天框里的「图片」按钮压缩成一个图标大小，别把输入框挤没 */
.dm-form .img-pick { margin: 0; flex: none; }
.dm-form .img-pick-btn { padding: 7px 9px; border-radius: 50%; }
.dm-form .img-pick-btn span, .dm-form .img-pick-btn { font-size: 0; }
.dm-form .img-pick-btn .ui-ico { width: 20px; height: 20px; }
/* 气泡里的图片小一点（聊天不是相册） */
.dm-bubble .img-strip img { width: 140px; height: 140px; }

/* 私信的静音开关（Messenger 第 3 批） */
.dm-mute {
  margin-left: auto; border: 0; background: none; cursor: pointer;
  font-size: 18px; line-height: 1; padding: 6px; border-radius: 50%;
}
.dm-mute:hover { background: var(--bg-soft); }

/* ---- 私信附件：视频与文件（Messenger 第 4 批）---- */
.dm-video { max-width: 100%; width: 280px; border-radius: 12px; margin-top: 6px; display: block; }
.dm-file-img { max-width: 200px; border-radius: 10px; margin-top: 6px; display: block; }
.dm-file {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.14); color: inherit; text-decoration: none;
}
/* 对方的气泡是浅色底，附件块要用深一点的底才看得见 */
.dm-msg:not(.dm-mine) .dm-file { background: rgba(0,0,0,.06); }
.dm-file-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-file-size { flex: none; font-size: var(--t-caption); opacity: .75; }

/* 页脚的 App 官网直达（Ray 2026-07-31）—— 站内 /app.php 是介绍页，这条去官网 */
.footer-app-site {
  display: inline-block; margin-top: 10px;
  font-size: var(--t-sm); color: var(--gold-500); text-decoration: none;
}
.footer-app-site:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   宗派百科（/denominations.php、/denomination.php）
   Ray 2026-07-31：靠「浸信会和长老会有什么区别」这类长尾词把搜索
   流量接进 186 万个教会页。所以这里的排版目标只有一个 ——
   【长文能读下去】：正文行宽收窄、行高放大、每段之间留白。
   ═══════════════════════════════════════════════════════════════ */

/* 列表页的卡片 —— 复用 .grid-cards 的栅格，只定义卡片自身 */
.denom-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 8px;
  transition: box-shadow .18s ease, transform .18s ease;
}
.denom-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.denom-card h2 { font-size: 1.15rem; margin: 0; line-height: 1.35; }
.denom-card h2 a { color: var(--navy-800); text-decoration: none; }
.denom-card h2 a:hover { text-decoration: underline; }

/* 一句话说明 —— 搜索结果里显示的就是它，所以给足对比度别当成灰噪点 */
.denom-one {
  margin: 0; color: var(--ink-600); font-size: var(--t-sm); line-height: 1.65;
  flex: 1 1 auto;
}

/* 「12.5 万间浸信会教会 →」 —— 这是把人送进教会目录的那一下点击 */
.denom-count {
  align-self: flex-start; margin-top: 2px;
  font-size: var(--t-sm); font-weight: 600;
  color: var(--blue-500); text-decoration: none;
}
.denom-count:hover { text-decoration: underline; }

/* 详情页的导语（h1 下面那句） */
.denom-lead {
  margin: 10px 0 16px; max-width: 62ch;
  font-size: 1.05rem; line-height: 1.75; color: var(--ink-600);
}

/* 信仰重点：六问的答案，逐条读 —— 用列表而不是段落，扫读更快 */
.denom-beliefs { margin: 0; padding-left: 1.2em; }
.denom-beliefs li { margin: 0 0 10px; line-height: 1.75; max-width: 62ch; }
.denom-beliefs li:last-child { margin-bottom: 0; }

/* 常见问答 —— 同时进 JSON-LD 的 FAQPage */
.denom-faq { border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 14px; }
.denom-faq:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.denom-faq h3 { font-size: 1rem; margin: 0 0 6px; color: var(--navy-800); }
.denom-faq p { margin: 0; line-height: 1.75; color: var(--ink-600); max-width: 62ch; }

/* 文章末尾的行动区 —— 读完一篇就该有地方可去 */
.denom-cta { background: var(--blue-50); border-color: var(--blue-100); }
.denom-cta p { margin: 6px 0 14px; color: var(--ink-600); }

/* 「怎么快速看懂一个宗派」的六个问题 */
.denom-six { margin: 12px 0 0; padding-left: 1.3em; }
.denom-six li { margin: 0 0 10px; line-height: 1.7; max-width: 66ch; }

/* 侧栏的宗派互链 —— 站内链接密度是这类主题页排名的关键之一 */
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-bottom: 1px solid var(--line-soft); }
.link-list li:last-child { border-bottom: 0; }
.link-list a {
  display: block; padding: 9px 2px;
  color: var(--navy-800); text-decoration: none; font-size: var(--t-sm);
}
.link-list a:hover { color: var(--blue-500); text-decoration: underline; }

/* ── 底部导航的未读红点（Ray 2026-07-31 加「私信」入口）──
   ⚠️ 只画一个点，不写数字：底部那一格只有约 60px 宽，
      塞进「99+」会把图标和文字一起挤变形。具体数字在私信页里看。 */
.tab-icon { position: relative; display: inline-flex; }
.tab-dot {
  position: absolute; top: -1px; right: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--error); box-shadow: 0 0 0 2px var(--surface);
}
/* 六格之后每格更窄了 —— 字号缩一点，别让「教会目录」这种四个字的换行 */
@media (max-width: 400px) {
  .tab-item span:last-child { font-size: 10px; }
  .tab-item { padding-left: 2px; padding-right: 2px; }
}

/* ── 教会页：「这条资料从哪里来」+「这条资料有问题？」（Ray 2026-07-31）──
   两块都是【可折叠】的：绝大多数访客只想看聚会时间和地址，
   把免责声明和举报表单摊开在页面上只会把真正有用的信息推下去。
   但也不能藏进另一个页面 —— 看到 7-Eleven 的那个人必须【就地】能反馈。 */
.data-origin {
  margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 12px;
}
.data-origin > summary {
  cursor: pointer; font-size: var(--t-sm); font-weight: 600; color: var(--ink-600);
  list-style: none;
}
.data-origin > summary::-webkit-details-marker { display: none; }
.data-origin > summary::before { content: "ⓘ "; opacity: .7; }
.data-origin > summary:hover { color: var(--navy-800); }
.data-origin p {
  margin: 10px 0 0; font-size: var(--t-sm); line-height: 1.7; color: var(--ink-600);
  max-width: 68ch;
}

.church-report {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.church-report h3 { font-size: 1rem; margin: 0 0 6px; color: var(--navy-800); }
.church-report .field-hint { margin: 0 0 10px; line-height: 1.65; }

/* 「联系方式来自公开地图资料」那条提示 —— 单独一个 class 只为让测试能精确指到它
   （原先测试拿全站通用的 .field-hint 当替身，同页新增任何提示都会让它误红）。
   视觉完全由 .field-hint 提供，这里刻意不加样式。 */
.contact-source-note { }

/* 未确认记录的提示（2026-08-11）——「可能是私人住宅」那类记录，标题下方即刻说明。
   刻意用中性的琥珀色而非红色：这不是错误，是「我们还不确定」。
   红色会让用户以为这条记录有问题，而它可能只是资料不全。

   ☠️ 选择器必须写成 `.page-head .unconfirmed-note`，不能只写 `.unconfirmed-note`：
   这个提示是 .page-head（深色 hero）里的一个 <p>，而上面 963 行有
   `.page-head p { color: var(--line) }` —— 那是给深底用的浅灰。
   只写单类名时特异性 (0,1,0) 输给 (0,1,1)，于是浅灰字落在我的米色底上，
   实测截图里几乎看不清。**这正是本文件 965 行注释里记着的同一个坑，我又踩了一次。** */
.page-head .unconfirmed-note,
.unconfirmed-note{
  margin:10px 0 0;padding:10px 12px;
  border:1px solid #e8d8a8;border-left:3px solid #c9973f;
  border-radius:var(--radius-sm,8px);
  background:#fdf8ec;color:#4a3c1c;      /* 对 #fdf8ec 的对比度 ≈ 9.7:1，远超 AA */
  font-size:.92rem;line-height:1.55;max-width:62ch;
}
.page-head .unconfirmed-note strong,
.unconfirmed-note strong{ color:#6b4f14; display:inline-block; margin-bottom:2px; }

/* 「我的」资料卡上的私信未读点（2026-08-11，私信从底部导航搬来时一并搬的信号）。
   ⚠️ 与底部导航的 .tab-dot 分开命名：那个是叠在图标右上角的绝对定位小点，
   这里是跟在按钮文字后面的行内点，两者布局语境不同，共用会错位。 */
.me-dm-dot{
  display:inline-block;width:8px;height:8px;border-radius:50%;
  background:#e05252;vertical-align:middle;margin-left:2px;
}

/* 可信度四级阶梯：默认折叠，summary 上直接写出当前等级（2026-08-11）。
   折叠的是「解释」不是「状态」—— 当前等级仍然一眼可见。 */
.trust-levels-wrap{ margin:0 0 12px; }
.trust-levels-wrap > summary{
  list-style:none; cursor:pointer; display:flex; align-items:center; gap:10px;
  padding:9px 12px; border:1px solid var(--line); border-radius:var(--radius-sm,8px);
  background:#fff;
}
.trust-levels-wrap > summary::-webkit-details-marker{ display:none }
.trust-levels-wrap > summary::after{
  content:"›"; margin-left:auto; font-size:18px; line-height:1; opacity:.55;
  transform:rotate(90deg); transition:transform .15s ease;
}
.trust-levels-wrap[open] > summary::after{ transform:rotate(-90deg) }
.trust-now strong{ font-weight:800 }
/* 「了解分级」这行说明文字要弱于当前等级本身 —— 主角是状态，不是制度 */
.trust-now-more{ font-size:.86rem; opacity:.6 }
.trust-levels-wrap[open] .trust-levels{ margin-top:10px }
/* 键盘可达性：summary 本身可聚焦，但焦点环要看得见 */
.trust-levels-wrap > summary:focus-visible{ outline:2px solid var(--navy-700,#1f3260); outline-offset:2px }

/* 粘贴地图链接后的即时反馈（2026-08-11）。
   失败用琥珀色而非红色：链接读不出来不是用户做错了什么，
   最常见的原因是手机分享短链本身就读不出坐标。红色会让人以为自己填错了。 */
.gm-hint{
  margin:6px 0 0;padding:8px 10px;border-radius:var(--radius-sm,8px);
  font-size:13px;line-height:1.55;
  background:#fdf8ec;border:1px solid #e8d8a8;color:#4a3c1c;
}
.gm-hint.ok{ background:#eef7ef;border-color:#cfe6d3;color:#26502f }

/* ══════════════════════════════════════════════════════════════════════════
   Hero 精修（2026-08-11，Ray：「实在太丑了，没有任何设计和高级感」）

   诊断的是具体问题，不是「不好看」：
   ① 主次是反的 —— 「寻找教会」深蓝压深蓝底几乎看不见，「登记你的教会」纯白最抢眼；
   ② 一屏 5 个行动点（两按钮 + 附近 + 搜索 + 下载 App），没有主角；
   ③ 搜索框才是这个产品本身，却排在按钮下面；
   ④ 背景只有一层平铺渐变，没有层次。

   克制原则（任务书 BH/BI/CM）：不加玻璃拟态、不堆渐变、不用更多卡片。
   高级感来自：克制的层次 + 呼吸感 + 一个明确的主角。
   ══════════════════════════════════════════════════════════════════════════ */

/* ① 背景：三层叠出深度，但每一层都很淡 —— 远看是一整块沉稳的深蓝，
      近看才有光。原来那道琥珀色 radial 太脏，压在标题后面像一块污渍。 */
.hero{
  position:relative; isolation:isolate;
  background:
    /* 左上主光源：标题落在光里，读起来更立体 */
    radial-gradient(120% 80% at 12% -20%, rgba(120,180,255,.16), transparent 62%),
    /* 右侧极淡的暖光，呼应品牌金，但不再是一坨 */
    radial-gradient(70% 60% at 96% 8%, rgba(201,162,39,.10), transparent 60%),
    linear-gradient(168deg, #0a1f3d 0%, var(--navy-800,#16264a) 58%, #14345e 100%);
  padding:64px 0 68px;
  overflow:hidden;
}
/* 经纬网格 —— 主题性的纹理（这是一个全球教会目录），不是装饰噪点。
   透明度压到几乎看不见：它的作用是让大块深蓝「有质地」，不是让人注意到它。 */
.hero::before{
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size:64px 64px;
  /* 向右下淡出，避免网格在文字密集处抢戏 */
  -webkit-mask-image:radial-gradient(120% 90% at 20% 0%, #000 0%, transparent 72%);
          mask-image:radial-gradient(120% 90% at 20% 0%, #000 0%, transparent 72%);
}

/* ② 标题：收紧字距与行高，给副标题限定阅读宽度（约 44 字）——
      一行超过这个长度，眼睛回扫时容易串行。 */
.hero h1{
  font-size:clamp(30px, 5.2vw, 50px);
  line-height:1.16; letter-spacing:-.4px; font-weight:800;
  max-width:16em;
}
.hero-sub{
  margin-top:14px; max-width:44ch;
  font-size:clamp(15px,1.6vw,18px); line-height:1.7;
  color:rgba(233,240,250,.86); font-weight:400;
}

/* ③ 搜索框 = 主角。抬高、加光圈、聚焦时有明确反馈。 */
.hero-search{ margin-top:30px; max-width:660px; }
.hero-search form{
  border-radius:14px;
  box-shadow:0 18px 40px -18px rgba(2,10,26,.75), 0 0 0 1px rgba(255,255,255,.10) inset;
  transition:box-shadow .18s ease, transform .18s ease;
}
.hero-search form:focus-within{
  box-shadow:0 22px 48px -18px rgba(2,10,26,.8),
             0 0 0 2px var(--gold-500,#c9a227),
             0 0 0 6px rgba(201,162,39,.18);
}
.hero-search input[type="search"]{ padding:16px 18px; font-size:16px; }
.hero-search button{ padding-inline:26px; font-weight:700; letter-spacing:.2px; }

/* ④ 按钮：把主次掰正。主行动用品牌金（在深蓝上对比最强），
      次行动用描边 —— 而不是原来「深蓝按钮压在深蓝底上」那种自我消失的写法。 */
.hero-actions{ margin-top:22px; gap:10px; }
.hero .hero-actions .btn-primary{
  background:var(--gold-500,#c9a227); color:#1a1300; border:0;
  box-shadow:0 10px 24px -12px rgba(201,162,39,.8);
}
.hero .hero-actions .btn-primary:hover{ background:var(--gold-600,#b08e1f); }
.hero .hero-actions .btn-secondary{
  background:transparent; color:#eaf1fb;
  border:1px solid rgba(255,255,255,.34);
}
.hero .hero-actions .btn-secondary:hover{
  background:rgba(255,255,255,.10); border-color:rgba(255,255,255,.52);
}

/* ⑤「附近的教会」：从 emoji 文字链改成安静的图标链接，贴着搜索框放 ——
      它属于「找教会」这件事，不该跟主行动抢位置。 */
.hero-nearby{
  display:inline-flex; align-items:center; gap:7px;
  margin-top:12px; font-size:14.5px;
  color:rgba(219,230,242,.9); text-decoration:none;
  border-bottom:1px solid rgba(219,230,242,.35); padding-bottom:1px;
}
.hero-nearby:hover{ color:#fff; border-bottom-color:rgba(255,255,255,.8) }
.hero-nearby svg{ width:15px; height:15px; flex:0 0 auto }

/* ⑥ 统计：数字放大、加细分隔线，从「三段文字」变成一组有节奏的指标。 */
.hero-stats{
  margin-top:34px; padding-top:22px;
  border-top:1px solid rgba(255,255,255,.12);
  gap:0; align-items:stretch;
}
.hero-stat{ padding-right:34px; margin-right:34px; border-right:1px solid rgba(255,255,255,.10) }
.hero-stat:last-child{ border-right:0; margin-right:0; padding-right:0 }
.hero-stat .num{
  font-size:clamp(24px,2.6vw,32px); font-weight:800; letter-spacing:-.5px;
  color:var(--gold-500,#c9a227); font-variant-numeric:tabular-nums;
}
.hero-stat .label{ font-size:13px; color:rgba(183,196,206,.92); margin-top:2px }
@media (max-width:640px){
  .hero-stat{ padding-right:18px; margin-right:18px }
  .hero-stats{ margin-top:26px; padding-top:18px }
}

/* ⑦ 右栏的 App 卡片：降权，让它「在场但不抢戏」。
      ⚠️ 不删 —— Ray 2026-07-30 明确要求这个位置。这里只是把它从
      「与主内容并列的第二主角」调成「配角」：边框更淡、阴影更收、留白更多。 */
.hero-app{
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.10);
  box-shadow:0 20px 44px -26px rgba(2,10,26,.8);
}

/* ── Hero 第二轮收敛（2026-08-11，看完桌面截图后）──────────────────────
   第一轮把主次掰正了，但整屏仍有【两个金色】：左边的主行动、右边卡片的下载按钮。
   两个同样醒目的金色 = 主角不唯一，这正是「没有高级感」的根源之一 ——
   高级感不是加东西，是敢把次要的东西压下去。

   ⚠️ 右栏卡片不删（Ray 2026-07-30 明确要求的位置），只做三件事：
     ① 金色按钮 → 描边按钮：整屏只留【一个】金色，就是「寻找教会」；
     ② 设备截图降低对比与饱和：那张图本身很跳，会把视线从左边拽走；
     ③ 卡片收窄、边框更淡：从「并列的第二主角」变成「在场的配角」。
   ────────────────────────────────────────────────────────────────── */
@media (min-width:1000px){
  .hero-app{
    max-width:330px; margin-left:auto;
    padding:22px 20px 20px;
    background:rgba(255,255,255,.038);
    border:1px solid rgba(255,255,255,.085);
    border-radius:18px;
    backdrop-filter:none;              /* 去掉玻璃拟态：任务书 CM 明确不要 */
  }
  /* 设备图降权 —— 它是「示意」，不是主视觉 */
  .hero-app-shot{
    opacity:.82; filter:saturate(.88) contrast(.96);
    transition:opacity .2s ease, filter .2s ease;
  }
  .hero-app:hover .hero-app-shot{ opacity:1; filter:none }
  /* ☠️ 下载按钮改描边：整个 hero 只允许一个实心金色（左边的主行动）。
     hover 时才变实心 —— 想点的人一样点得到，不想点的人不会被它拽走视线。 */
  .hero-app .btn-gold{
    background:transparent;
    color:var(--gold-500,#c9a227);
    border:1px solid rgba(201,162,39,.55);
    box-shadow:none;
  }
  .hero-app:hover .btn-gold,
  .hero-app .btn-gold:hover,
  .hero-app .btn-gold:focus-visible{
    background:var(--gold-500,#c9a227); color:#1a1300; border-color:transparent;
  }
  .hero-app-h{ font-size:14.5px; opacity:.92 }
  .hero-app-note{ opacity:.75 }
}

/* 左栏纵向收紧 —— 桌面上原来元素间大片空隙，读起来松散。
   收紧之后信息成组：标题+副标题一组，行动一组，数据一组。 */
@media (min-width:1000px){
  .hero{ padding:56px 0 58px }
  .hero-sub{ margin-top:12px }
  .hero-actions{ margin-top:26px }
  .hero-search{ margin-top:22px }
  .hero-nearby{ margin-top:10px }
  .hero-stats{ margin-top:30px; padding-top:20px }
  .hero-stats-note{ margin-top:12px; opacity:.72; font-size:12.5px }
}
