/* ============================================================
   七格美国仓 · 共享样式
   - 范围: 色彩 tokens / 重置 / 顶部导航 / Footer / 悬浮 CTA / 通用容器
   - 两个页面(index.html / news.html)共用,单点维护
   - 页面 <head> 中先加载本文件,再加载页面专属 <style>
   ============================================================ */

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* COLOR TOKENS */
:root {
  --gold: #B8860B;
  --gold-light: #d4a017;
  --teal: #09B8A0;
  --dark: #0D1B2A;
  --dark2: #162236;
  --dark3: #0a2030;
  --white: #fff;
  --tint: #f5fafa;
  --gray: #666;
  --border: #ddeeed;
}

/* BASE(页面专属 body 的 color/background 仍在各自 inline 样式里覆盖) */
html { scroll-behavior: smooth; font-size: 18px; }
body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  overflow-x: hidden;
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* CONTAINER */
.container { max-width: 1240px; margin: 0 auto; padding: 0 52px; }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 52px; height: 72px;
  background: rgba(13,27,42,0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184,134,11,0.22);
}
.nav-logo { display: flex; align-items: center; gap: 13px; flex-shrink: 0; min-width: 0; }
.nav-logo-mark { width: 44px; height: 44px; border-radius: 9px; overflow: hidden; flex-shrink: 0; display: block; }
.nav-logo-text-wrap { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; }
.nav-logo-sub { font-family: "Bebas Neue", sans-serif; font-size: 11px; color: rgba(255,255,255,0.35); letter-spacing: 3px; line-height: 1.4; white-space: nowrap; }
.nav-logo-name { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 2px; line-height: 1.4; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-right: 16px; }
.nav-links a {
  font-size: 16px; color: rgba(255,255,255,0.85); padding: 8px 18px;
  border-radius: 4px; letter-spacing: 0.5px; transition: color 0.2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--teal); }
.nav-links a.active { color: var(--teal); }
.nav-links a.oms { color: rgba(255,255,255,0.85); }
.nav-links a.oms:hover { color: var(--teal); }
.nav-btn { background: var(--teal) !important; color: #fff !important; padding: 7px 18px !important; border-radius: 24px !important; font-weight: 600 !important; font-size: 15px !important; margin-left: 8px; }
.nav-btn:hover { background: #07a08b !important; }
.hamburger { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* FOOTER */
.footer {
  position: relative;
  background: linear-gradient(180deg, #062030 0%, #051826 100%);
  padding: 60px 0 24px;
}
.footer::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background: rgba(9,184,160,0.35);
}
/* 6 栏:品牌块 + 关于七格 / 仓配服务 / 内容栏目 / 热门指南 / 材质与合规。
   容器内容宽 1240-104=1136px,列宽按各栏最长锚文本配比(热门指南要容下
   「为什么需要美国海外仓」,品牌块要容下 OMS 卡)。min-width:0 防栅格撑破。 */
/* 7 栏 = 品牌块 + 6 个导航栏目(2026-08-17 加「合作项目」栏时从 6 栏扩到 7 栏)。
   fr 值按各栏最长锚文本实测配:「Amazon FBA vs 美国仓」「Whatnot 直播合作」是两处宽点。
   🔴 品牌栏用 minmax(max-content, …) 兜底 —— 纯 fr 会在 7 栏挤压下把品牌名
      「美国七格饰品珠宝海外仓」断成两行(2026-08-17 实测踩过,见 CLAUDE.md
      § 跨平台 CSS 陷阱「品牌名换行」)。max-content 让它随字数自适应,改名也不会再犯。 */
.footer-grid { display: grid; grid-template-columns: minmax(max-content, 1.62fr) 0.78fr 0.9fr 0.92fr 0.62fr 1.16fr 1fr; gap: 26px 18px; margin-bottom: 36px; }
.footer-col { min-width: 0; }
.footer-brand-name { font-family: 'Noto Serif SC', serif; font-size: 18px; color: #fff; font-weight: 700; letter-spacing: 2px; margin-bottom: 4px; }
.footer-brand-en { font-family: 'Bebas Neue', sans-serif; font-size: 12px; color: rgba(9,184,160,0.55); letter-spacing: 3px; margin-bottom: 16px; }
.footer-brand-addr { font-size: 15px; color: rgba(255,255,255,0.5); line-height: 1.95; }
.footer-h {
  font-family: 'Noto Serif SC', serif; font-size: 16px; font-weight: 600;
  color: rgba(255,255,255,0.85); letter-spacing: 1px;
  padding-bottom: 10px; margin-bottom: 18px;
  position: relative;
}
.footer-ul { list-style: none; }
.footer-ul li { margin-bottom: 10px; }
.footer-ul a { font-size: 14px; color: rgba(255,255,255,0.55); transition: color 0.2s, transform 0.2s; display: inline-block; }
.footer-ul a:hover { color: var(--teal); transform: translateX(2px); }
.footer-oms-card {
  display: inline-flex; flex-direction: column; gap: 5px;
  border: 1px solid rgba(184,134,11,0.35); border-radius: 12px;
  padding: 14px 18px; background: linear-gradient(135deg, rgba(184,134,11,0.04) 0%, rgba(9,184,160,0.04) 100%);
  margin-top: 4px; transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s; color: inherit;
}
/* OMS 卡自 2026-08-05 起挂在品牌块下方(原来独占第 5 栏,一栏只放一条链太浪费),
   与地址之间要留出呼吸,不然贴着电话号码像同一段。 */
.footer-brand .footer-oms-card { margin-top: 18px; }
.footer-oms-card:hover {
  border-color: rgba(184,134,11,0.65);
  background: linear-gradient(135deg, rgba(184,134,11,0.10) 0%, rgba(9,184,160,0.06) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(184,134,11,0.12);
}
.footer-oms-card-eye {
  display: block; font-family: 'Bebas Neue', sans-serif;
  font-size: 11px; color: rgba(9,184,160,0.65); letter-spacing: 3.5px; line-height: 1;
  white-space: nowrap;
}
.footer-oms-card-text {
  display: block; font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; color: var(--gold); letter-spacing: 2px; line-height: 1.2; transition: color 0.2s;
  white-space: nowrap;
}
.footer-oms-card:hover .footer-oms-card-text { color: var(--gold-light); }
.footer-bottom {
  position: relative;
  padding-top: 26px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: rgba(255,255,255,0.35);
}
.footer-bottom::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background: rgba(255,255,255,0.10);
}
.footer-copy { min-width: 0; }   /* flex 子项允许收缩换行,避免 R1.0 溢出被裁 */
.footer-ver { white-space: nowrap; }   /* 颜色/字体继承版权行,不搞特殊 */
.footer-right { display: inline-flex; align-items: center; gap: 16px; }
.footer-slogan {
  font-family: 'Noto Serif SC', serif; letter-spacing: 2px;
  color: #d8c47a;            /* 去渐变,实色暖金 */
  white-space: nowrap;
}
/* 北斗七星:夜空闪烁 */
.beidou { height: 34px; width: auto; overflow: visible; display: block; flex-shrink: 0; }
.beidou-line {
  fill: none; stroke: rgba(216,196,122,0.22); stroke-width: 0.8;
  stroke-linejoin: round; stroke-linecap: round;
}
.beidou-star {
  fill: #f0e3ad;
  filter: drop-shadow(0 0 2.5px rgba(240,227,173,0.85));
  animation: beidou-twinkle 3.2s ease-in-out infinite;  /* 仅 opacity,免 transform-box 兼容坑(微信 webview 稳) */
}
.beidou-star.s1 { animation-delay: 0s; }
.beidou-star.s2 { animation-delay: 1.1s; }
.beidou-star.s3 { animation-delay: 0.5s; }
.beidou-star.s4 { animation-delay: 1.7s; }
.beidou-star.s5 { animation-delay: 0.2s; }
.beidou-star.s6 { animation-delay: 1.4s; }
.beidou-star.s7 { animation-delay: 0.8s; }
@keyframes beidou-twinkle {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .beidou-star { animation: none; opacity: 0.9; }
}

/* RESPONSIVE */
/* 导航横向预算(2026-08-04 实测,Playwright 量「末项右沿 vs 内容右界」):
   徽标 277px(名字 11 字 @18px)+ 10 项 1022px + 搜索框 + 左右留白 —— 满宽形态要 1560px 才装得下。
   10 项是 2026-08-04 一天之内从 8 项涨上来的(材质百科 → 美国法律 → 产业合作商,当时叫「产业合伙人」),
   原来的 1024–1500 单档收紧已经不够:实测 1024px 溢出 95px、1200px 溢出 5px、1501px 溢出 3px。
   现在分三档:≥1561 满宽 / 1240–1560 轻收 / 1024–1239 重收(搜索框缩成图标钮 + 徽标缩身)。
   ⚠️ 每加一项导航都要重新量三档的临界值,别只加链接不抬断点。1023 及以下走汉堡菜单(见下)。 */
@media (min-width: 1024px) and (max-width: 1560px) {
  .nav { padding: 0 22px; }
  .nav-links { margin-right: 6px; }
  .nav-links a { font-size: 15px; padding: 8px 9px; letter-spacing: 0; }
  /* ⚠️ 用 .nav 提一级特异性:.nav-search-trigger 的本体定义在本文件更靠后(§Nav 触发按钮),
     同特异性下后者胜出,这里不提级的话整条覆盖是死的(2026-08-04 实测踩坑)。 */
  .nav .nav-search-trigger { margin: 0 14px; flex-basis: 220px; }
  .nav-btn { padding: 7px 15px !important; font-size: 14px !important; margin-left: 4px; }
}
/* 1024–1239px:轻收后仍溢出近百像素。此段再降一档字号、搜索框只留图标、徽标缩身。
   徽标名字 11 个中文字是最大的单块开销,缩字号 + 收字距比砍导航项省得多。 */
@media (min-width: 1024px) and (max-width: 1239px) {
  .nav { padding: 0 16px; }
  .nav-links { margin-right: 4px; }
  .nav-links a { font-size: 14px; padding: 8px 6px; }
  .nav .nav-search-trigger { flex: 0 0 auto; margin: 0 8px; padding: 0 10px; }
  .nav-search-trigger-label { display: none; }
  .nav-logo { gap: 9px; }
  .nav-logo-mark { width: 36px; height: 36px; }
  .nav-logo-mark img { width: 36px !important; height: 36px !important; }
  .nav-logo-name { font-size: 15px; letter-spacing: 0.5px; }
  .nav-logo-sub { font-size: 10px; letter-spacing: 2px; }
}
/* 🔴 2026-08-17 页脚扩到 7 栏后,页脚的收栏门槛与 nav 的汉堡门槛**分了家**:
   页脚在 ≤1179px 收 3 栏(紧跟的这个断点),nav 的汉堡仍留在 ≤1023px(再下一个)。
   两者本就是两件事,此前共用 1023 只是因为 6 栏那会儿恰好也扛得住。

   ⚠️ 下面这些数是量出来的,不是估的。`.container` = max-width:1240 / padding:0 52
   (≤768px 那档才收成 padding:0 22),所以页脚内宽 = min(视口, 1240) − 104:
   视口 1440 → 1136px,视口 1180 → 1076px。7 栏在这整段(1180–∞)Chromium 实测
   零换行零溢出;跌破 1180 后 1100px 时「Whatnot 直播合作」与「Amazon FBA vs 美国仓」
   开始折行 —— 断点就定在这里。**别照抄「最窄也有 1136」这种说法**,1180–1239
   这一段实际只有 1076–1135。改栏数或加链接后要重扫一遍再定断点。

   fr 轨道的自动最小值会停在 min-content,只挤别的列、不会溢出 —— 所以「品牌列会窄过
   OMS 卡而溢出」这个理由是错的,别照抄。品牌列另用 minmax(max-content, …) 兜底,
   理由见上面 .footer-grid 处的注释。

   收成 3 栏后 6 个导航栏排 3+3,品牌块占整行、地址与 OMS 卡左右分列。 */
@media (max-width: 1179px) {
  .footer-grid { grid-template-columns: 1.35fr 1fr 1fr; }
  .footer-brand {
    grid-column: 1 / -1; margin-bottom: 4px;
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
  }
  .footer-brand .footer-oms-card { margin-top: 0; }
}
/* ≤1023px:nav 的 9 项横排在平板竖屏(820 / 834 等)必然被裁,改走汉堡菜单。
   这一档**只管 nav**,页脚的收栏在上面的 1179 档。页面其余移动端断点仍在 768。 */
@media (max-width: 1023px) {
  .nav { padding: 0 20px; height: 64px; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(13,27,42,0.99); flex-direction: column; padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.07); gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 15px 28px; border-radius: 0; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .nav-btn { display: none !important; }
  .hamburger { display: flex; }
}
@media (max-width: 768px) {
  html { font-size: 16px; }
  .container { padding: 0 22px; }
  /* 2026-08-05 页脚扩到 33 条内链后,移动端单列会堆到约 2100px(近三屏)。
     改双列:auto-fit + minmax 让窄机(≲340px)自己退回单列,不用再设断点。
     不做折叠面板 —— 链接留在明处,人和爬虫都不必展开就能拿到。 */
  .footer-grid { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 26px 18px; }
  /* 撤掉 ≤1023px 那档的左右分列,品牌块独占整行、竖排堆叠 */
  .footer-brand { display: block; grid-column: 1 / -1; }
  .footer-brand .footer-oms-card { margin-top: 18px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .footer-copy { width: 100%; }            /* 占满整行,居中 */
  .footer-ver { display: block; margin-top: 4px; }  /* 移动端版本号单独成行,必现不被裁 */
  .footer-right { justify-content: center; }
}

/* ============================================================
   滚动渐入 (Scroll Reveal) — 全站共享
   - 元素进入视口时柔和 fade-up,行为见 /assets/reveal.js
   - 初始隐藏仅在 .has-js(JS 可用)且允许动效时生效:
     无 JS / prefers-reduced-motion 时内容始终完整显示,绝不被隐藏
   - 显示态用独立 .rv-show 类(JS 添加),!important 覆盖初始隐藏态
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .has-js .tc,
  .has-js .trust-card,
  .has-js .svc-card,
  .has-js .value-card,
  .has-js .cat-tag-card,
  .has-js .featured-card,
  .has-js .plat-card,
  .has-js .contact-card,
  .has-js .news-card,
  .has-js .value-cta,
  .has-js .coverage-2col,
  .has-js .cert-logos-row,
  .has-js .jewelry-grid,
  .has-js .adv-wrap,
  .has-js .about-wrap,
  .has-js .cat-intro-wrap {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.16,0.84,0.44,1),
                transform 0.7s cubic-bezier(0.16,0.84,0.44,1);
  }
}
.has-js .rv-show { opacity: 1 !important; transform: none !important; }

/* ============================================================
   站内搜索 (Pagefind ⌘K 模态) — 全站共享
   - Nav 触发按钮 + 居中模态 + Pagefind UI 品牌化覆盖
   - JS 行为见 /assets/search.js
   ============================================================ */

/* Pagefind UI 主题变量 */
:root {
  --pagefind-ui-primary: #09B8A0;
  --pagefind-ui-text: #0D1B2A;
  --pagefind-ui-border: transparent;
  --pagefind-ui-border-radius: 12px;
  --pagefind-ui-font: "Noto Sans SC", system-ui, sans-serif;
  --pagefind-ui-scale: 1;
}

/* ---- Nav 触发按钮 (伪输入框,实际点击弹模态) ---- */
.nav-search-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  flex: 0 1 360px; min-width: 0;
  height: 40px;
  padding: 0 18px;
  margin: 0 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;       /* 纯胶囊形,不受宽高影响 */
  color: rgba(255,255,255,0.55);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 14px;
  cursor: text;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap; overflow: hidden;
}
.nav-search-trigger:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(9,184,160,0.55);
  color: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 3px rgba(9,184,160,0.10);
}
.nav-search-trigger-icon { flex-shrink: 0; opacity: 0.7; transition: color 0.2s, opacity 0.2s; }
.nav-search-trigger:hover .nav-search-trigger-icon { color: var(--teal); opacity: 1; }
.nav-search-trigger-label {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0.5px;
  font-weight: 400;
}

/* ---- 模态框 ---- */
.search-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 10vh 20px 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
}
.search-modal.is-open { opacity: 1; pointer-events: auto; }
.search-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(8,18,28,0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.search-modal-box {
  position: relative; z-index: 1;
  width: 100%; max-width: 640px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.32), 0 2px 6px rgba(0,0,0,0.08);
  overflow: hidden;
  transform: translateY(-12px) scale(0.985);
  transition: transform 0.22s cubic-bezier(0.16,0.84,0.44,1);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 14vh);
}
.search-modal.is-open .search-modal-box { transform: translateY(0) scale(1); }

/* 输入行 */
.search-modal-input-row {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #eef3f2;
  flex-shrink: 0;
}
.search-modal-input-icon { color: var(--teal); flex-shrink: 0; }
.search-modal-pagefind { flex: 1; min-width: 0; }
.search-modal-esc {
  flex-shrink: 0;
  font-family: "SF Mono", "Menlo", monospace; font-size: 11px;
  color: #888;
  background: #f3f6f6;
  border: 1px solid #e3eae9;
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.search-modal-esc:hover { background: #e8efee; color: var(--dark); border-color: #d0dcdb; }

/* Pagefind 输入框覆盖 */
.search-modal-pagefind .pagefind-ui__form { position: relative; margin: 0; }
.search-modal-pagefind .pagefind-ui__form::before { display: none; }
.search-modal-pagefind .pagefind-ui__search-input {
  width: 100%; box-sizing: border-box;
  height: 32px; padding: 0;
  background: transparent; border: 0;
  color: var(--dark);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 17px; font-weight: 500;
  letter-spacing: 0.3px;
}
.search-modal-pagefind .pagefind-ui__search-input::placeholder { color: #bbb; font-weight: 400; }
.search-modal-pagefind .pagefind-ui__search-input:focus { outline: none; }
.search-modal-pagefind .pagefind-ui__search-clear {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; color: #aaa;
  font-size: 12px; padding: 4px 8px; cursor: pointer;
  border-radius: 6px;
  transition: color 0.18s, background 0.18s;
}
.search-modal-pagefind .pagefind-ui__search-clear:hover { color: var(--dark); background: #f3f6f6; }

/* 模态体 */
.search-modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0; }
.search-modal-empty { padding: 22px 22px 24px; }
.search-empty-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 13px; font-weight: 600;
  color: #888; letter-spacing: 2px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.search-empty-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.search-chip {
  display: inline-flex; align-items: center;
  font-family: "Noto Sans SC", system-ui, sans-serif;
  font-size: 13px;
  color: #555;
  background: #f4faf9;
  border: 1px solid #d8ecea;
  border-radius: 16px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.search-chip::before { content: '#'; color: var(--teal); margin-right: 4px; font-weight: 600; }
.search-chip:hover {
  background: #e9f6f4;
  border-color: rgba(9,184,160,0.4);
  color: var(--dark);
  transform: translateY(-1px);
}
.search-empty-tip {
  font-size: 12px; color: #aaa;
  border-top: 1px dashed #eef3f2;
  padding-top: 14px;
}

/* Pagefind 结果区 */
.search-modal-pagefind .pagefind-ui__drawer {
  position: static;
  background: transparent; box-shadow: none; border: 0;
  padding: 0; margin: 0; max-height: none;
}
.search-modal-pagefind .pagefind-ui__drawer.pagefind-ui__hidden { display: none; }
.search-modal.has-query .search-modal-empty { display: none; }
.search-modal-pagefind .pagefind-ui__message {
  font-size: 12px; color: #888;
  padding: 14px 22px 8px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #f3f6f6;
  margin-bottom: 4px;
}
.search-modal-pagefind .pagefind-ui__results { list-style: none; margin: 0; padding: 6px 0; }
.search-modal-pagefind .pagefind-ui__result {
  padding: 14px 22px;
  border-bottom: 1px solid #f3f6f6;
  transition: background 0.15s;
}
.search-modal-pagefind .pagefind-ui__result:last-child { border-bottom: 0; }
.search-modal-pagefind .pagefind-ui__result:hover { background: #f9fcfb; }
.search-modal-pagefind .pagefind-ui__result-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px; font-weight: 600;
  margin-bottom: 6px; line-height: 1.45;
}
.search-modal-pagefind .pagefind-ui__result-link { color: var(--dark); text-decoration: none; transition: color 0.18s; }
.search-modal-pagefind .pagefind-ui__result:hover .pagefind-ui__result-link,
.search-modal-pagefind .pagefind-ui__result-link:hover { color: var(--teal); }
.search-modal-pagefind .pagefind-ui__result-excerpt { font-size: 13px; color: #666; line-height: 1.7; }
.search-modal-pagefind .pagefind-ui__result-excerpt mark {
  background: rgba(9,184,160,0.18);
  color: var(--dark);
  padding: 0 2px; border-radius: 2px;
  font-weight: 500;
}
.search-modal-pagefind .pagefind-ui__result-tags,
.search-modal-pagefind .pagefind-ui__result-thumb,
.search-modal-pagefind .pagefind-ui__filter-panel { display: none; }
.search-modal-pagefind .pagefind-ui__button {
  display: block; width: calc(100% - 44px);
  margin: 8px 22px 16px;
  padding: 10px 16px;
  background: #f4faf9;
  border: 1px solid #d8ecea;
  border-radius: 10px;
  color: var(--dark); font-size: 13px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.search-modal-pagefind .pagefind-ui__button:hover {
  background: #e9f6f4;
  border-color: rgba(9,184,160,0.4);
}

/* Footer 提示 */
.search-modal-footer {
  display: flex; align-items: center; gap: 18px;
  padding: 10px 18px;
  background: #fafcfc;
  border-top: 1px solid #eef3f2;
  font-size: 11px; color: #888;
  flex-shrink: 0;
}
.search-modal-hint { display: inline-flex; align-items: center; gap: 5px; }
.search-modal-hint kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  font-family: "SF Mono", "Menlo", monospace; font-size: 10px;
  color: #666;
  background: #fff;
  border: 1px solid #e3eae9;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.search-modal-brand { margin-left: auto; color: #aaa; }
.search-modal-brand a { color: #888; text-decoration: none; transition: color 0.18s; }
.search-modal-brand a:hover { color: var(--teal); }

body.search-modal-open { overflow: hidden; }

/* 响应式 */
/* ≤1100px(平板/iPad/手机): 搜索仅桌面端,移动端不渲染触发按钮 */
@media (max-width: 1100px) {
  .nav-search-trigger { display: none; }
}
/* 模态:理论上移动端用不上(按钮已隐藏),但保留响应规则以防 ⌘K 误触 */
@media (max-width: 768px) {
  .search-modal { padding: 0; }
  .search-modal-box {
    max-width: 100%;
    height: 100vh; max-height: 100vh;
    border-radius: 0;
  }
  .search-modal-input-row { padding: 14px 16px; }
  .search-modal-empty { padding: 18px 16px 20px; }
  .search-modal-pagefind .pagefind-ui__result { padding: 14px 16px; }
  .search-modal-pagefind .pagefind-ui__search-input { font-size: 16px; }
  .search-modal-footer { padding: 10px 16px; gap: 12px; }
  .search-modal-brand { display: none; }
}

/* ===== 在线咨询 QA 聊天组件（由 assets/chat.js 注入 DOM；单一来源，勿在页面内复写） ===== */
.qa-launcher {
  position: fixed; right: 28px; bottom: 28px; z-index: 98;
  display: flex; align-items: center; gap: 8px;
  padding: 11px 18px 11px 16px; border: none; cursor: pointer;
  background: var(--teal); color: #fff; border-radius: 26px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(9,184,160,0.42);
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
}
.qa-launcher:hover { background: #07a08b; transform: translateY(-2px); box-shadow: 0 8px 26px rgba(9,184,160,0.5); }
.qa-launcher svg { flex-shrink: 0; }
.qa-launcher.qa-hidden { opacity: 0; visibility: hidden; transform: scale(0.85); pointer-events: none; }

.qa-panel {
  position: fixed; right: 28px; bottom: 28px; z-index: 1500;
  width: 344px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 120px);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 18px 48px rgba(13,27,42,0.22);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.98);
  transform-origin: bottom right; pointer-events: none;
  transition: opacity 0.28s, transform 0.28s, visibility 0.28s;
}
.qa-panel.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); pointer-events: auto; }

.qa-header {
  position: relative; flex-shrink: 0;
  padding: 16px 18px; color: #fff;
  background: linear-gradient(120deg, var(--teal), #0a8f7e);
  display: flex; align-items: center; justify-content: space-between;
}
.qa-htitle { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.qa-dot { width: 8px; height: 8px; border-radius: 50%; background: #7CFFE9; box-shadow: 0 0 0 3px rgba(124,255,233,0.3); }
.qa-close { background: none; border: none; color: rgba(255,255,255,0.85); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 2px; transition: color 0.2s; }
.qa-close:hover { color: #fff; }

.qa-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; background: var(--tint); }
.qa-greeting { font-size: 13.5px; line-height: 1.7; color: #555; margin-bottom: 14px; }
.qa-greeting b { color: var(--teal); }

.qa-topics { display: flex; flex-direction: column; gap: 8px; }
.qa-topic {
  text-align: left; cursor: pointer; font-family: inherit; font-size: 14px;
  padding: 11px 14px; border-radius: 12px; color: var(--dark);
  background: #fff; border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.qa-topic:hover { border-color: rgba(9,184,160,0.45); background: #f3fcfa; transform: translateX(2px); box-shadow: 0 4px 14px rgba(9,184,160,0.1); }

.qa-back { background: none; border: none; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--gray); padding: 0 0 12px; }
.qa-back:hover { color: var(--teal); }
.qa-qtitle { font-size: 15.5px; font-weight: 600; color: var(--dark); margin-bottom: 10px; line-height: 1.5; }
.qa-answer { font-size: 14px; line-height: 1.78; color: #555; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 15px; }
.qa-answer b { color: var(--teal); font-weight: 600; }

.qa-wx-cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 14px; padding: 12px; border-radius: 12px;
  background: var(--teal); color: #fff; font-size: 14.5px; font-weight: 600;
  text-decoration: none; transition: background 0.2s, transform 0.2s;
}
.qa-wx-cta:hover { background: #07a08b; transform: translateY(-1px); }

.qa-input-row { flex-shrink: 0; display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: #fff; }
.qa-input { flex: 1; min-width: 0; font-family: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; outline: none; transition: border-color 0.2s; }
.qa-input:focus { border-color: var(--teal); }
.qa-send { flex-shrink: 0; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; padding: 9px 16px; border: none; border-radius: 10px; background: var(--teal); color: #fff; transition: background 0.2s; }
.qa-send:hover { background: #07a08b; }

@media (max-width: 768px) {
  .qa-launcher { right: 20px; bottom: 20px; padding: 10px 16px; font-size: 14px; }
  .qa-panel { right: 14px; left: 14px; bottom: 20px; width: auto; max-width: none; height: auto; max-height: 78vh; }
}
