/* ============================================
   巴消消防 · 全站基础层（Tokens + Base + Shared UI）
   ------------------------------------------------------------
   2026-10-13 苹果化第一版
   2026-10-18 苹果化 v2 · 全量改造
   ------------------------------------------------------------
   分层约定：
     themes.css      → 四季颜色（唯一颜色来源）
     style.css       → 结构令牌 + 基础排版 + 全站共享组件（本文件）
     components.css  → 可复用组件规格（表单/表格/弹层/时间线…）
     pages.css       → 各页面专属组件
     admin.css       → 管理后台（内部工具，独立暗色）
   铁律：
     1. 颜色禁止硬编码，一律 var(--token)；
     2. 间距只取 4px 刻度，圆角只取 --r-*；
     3. 大标题 600 字重（苹果 Semibold），正文 400；
     4. 触控目标 ≥44px，正文对比度 ≥4.5:1。
   ============================================ */

/* ============================================
   1 · 设计令牌
   ============================================ */
:root {
  /* 间距（4px 基数，8pt 网格兼容） */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 28px;
  --sp-8: 32px;
  --sp-9: 36px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-14: 56px;
  --sp-16: 64px;
  --sp-18: 72px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-28: 112px;
  --sp-30: 120px;

  /* 区块纵向留白（响应式在断点内覆盖） */
  --sec-y: 120px;
  --sec-y-md: 80px;
  --sec-y-sm: 56px;

  /* 容器 */
  --container: 1240px;
  --gutter: 24px;
  --gutter-sm: 16px;

  /* 圆角 */
  --r-xs: 10px;    /* 输入框 / 小控件 */
  --r-sm: 12px;    /* 芯片 / 次级块 */
  --r-md: 18px;    /* 卡片 */
  --r-lg: 24px;    /* 大图 / 大面板 */
  --r-full: 980px; /* 药丸 */

  /* 阴影（颜色别名继承 themes.css，四季自适应） */
  --shadow-sm: var(--shadow-card);
  --shadow-md: var(--shadow-float);
  --shadow-lg: var(--shadow-dropdown);

  /* 动效 */
  --dur-fast: 200ms;
  --dur-base: 350ms;
  --dur-slow: 500ms;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* 字阶（桌面） */
  --fs-mega: 56px;     --lh-mega: 1.08;
  --fs-display: 48px;  --lh-display: 1.18;
  --fs-h1: 40px;       --lh-h1: 1.24;
  --fs-h2: 34px;       --lh-h2: 1.3;
  --fs-h3: 22px;       --lh-h3: 1.4;
  --fs-body-lg: 17px;  --lh-body-lg: 1.7;
  --fs-body: 16px;     --lh-body: 1.65;
  --fs-small: 14px;    --lh-small: 1.6;
  --fs-caption: 12px;  --lh-caption: 1.5;

  /* 状态色（四季通用，均通过 AA） */
  --success: #15803D;
  --warning: #B45309;
  --danger: #B91C1C;
  --info: #1D4ED8;

  /* 字体族 */
  --font-display: "SF Pro Display", "SF Pro SC", -apple-system,
                  BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans",
                  "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-sans: "SF Pro Text", -apple-system, BlinkMacSystemFont, "SF Pro SC",
               "PingFang SC", "HarmonyOS Sans SC", "MiSans",
               "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "SF Mono", ui-monospace, Consolas,
               "Liberation Mono", monospace;
}

/* 字阶响应式 · 平板 */
@media (max-width: 1024px) {
  :root {
    --sec-y: 96px;
    --fs-mega: 48px;
    --fs-display: 42px;
    --fs-h1: 36px;
    --fs-h2: 30px;
    --fs-h3: 21px;
  }
}

@media (max-width: 768px) {
  :root {
    --sec-y: var(--sec-y-md);
    --container: 100%;
    --gutter: var(--gutter-sm);
    --fs-mega: 42px;
    --fs-display: 36px;
    --fs-h1: 32px;
    --fs-h2: 28px;
    --fs-h3: 20px;
    --fs-body-lg: 16px;
    --fs-body: 15px;
    --fs-small: 13px;
    --fs-caption: 11.5px;
  }
}

@media (max-width: 480px) {
  :root {
    --sec-y: var(--sec-y-sm);
    --fs-mega: 34px;
    --fs-display: 30px;
    --fs-h1: 27px;
    --fs-h2: 25px;
    --fs-h3: 19px;
    --fs-body-lg: 15px;
    --fs-body: 14px;
  }
}

/* ============================================
   2 · 基础重置与排版
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 锚点跳转时为吸顶导航预留高度 */
:target { scroll-margin-top: 88px; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  background: var(--bg-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main { flex: 1 0 auto; }

::selection {
  background: var(--selection-bg, var(--accent-soft));
  color: var(--text-primary);
}

a { color: inherit; text-decoration: none; }

img, svg, video {
  display: block;
  max-width: 100%;
}

img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.01em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--ring, var(--accent));
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* 容器 */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 长文排版（隐私政策 / 服务条款 / 资讯正文） */
.prose {
  max-width: 780px;
  color: var(--text-secondary);
}
.prose h2 {
  font-size: 26px;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 44px 0 14px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 28px 0 10px;
}
.prose p {
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 14px;
}
.prose b, .prose strong { color: var(--text-primary); font-weight: 600; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { font-size: 16px; line-height: 1.85; margin-bottom: 6px; }

/* ============================================
   3 · 顶栏
   ============================================ */
.topbar {
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-base);
  font-size: var(--fs-caption);
  color: var(--text-tertiary);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-block: 9px;
}

.topbar .right {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.topbar .right span { color: var(--text-tertiary); }

.topbar .phone {
  color: var(--accent-text);
  font-weight: 600;
  letter-spacing: .01em;
}

/* ============================================
   4 · 导航
   ============================================ */
header {
  position: sticky;
  top: 0;
  z-index: 210;
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-base);
  transition: background-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header {
    background: color-mix(in srgb, var(--bg-body) 76%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}

header.is-scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 1px 0 var(--border-base), var(--shadow-card);
}

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
  padding-block: 12px;
  min-height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 52px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.logo-en {
  font-size: 7.5px;
  color: var(--text-muted);
  letter-spacing: .18em;
  margin-top: 2px;
}

header nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 24px);
  font-size: 14px;
  margin-left: auto;
}

header nav > a,
header nav .nav-drop > a {
  position: relative;
  color: var(--text-secondary);
  padding: 8px 0;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}

header nav > a:hover,
header nav .nav-drop > a:hover { color: var(--text-primary); }

header nav > a.active,
header nav .nav-drop > a.active {
  color: var(--text-primary);
  font-weight: 600;
}

header nav > a.active::after,
header nav .nav-drop > a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* 下拉 */
.nav-drop { position: relative; display: flex; align-items: center; }

.nav-drop .drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  padding-top: 14px;
  z-index: 220;
}

.nav-drop:hover .drop-menu,
.nav-drop:focus-within .drop-menu { display: block; }

.drop-menu .drop-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-md);
  padding: 6px;
  min-width: 184px;
  box-shadow: var(--shadow-dropdown);
  display: flex;
  flex-direction: column;
  animation: drop-in var(--dur-fast) var(--ease-out);
}

@keyframes drop-in {
  from { opacity: 0; translate: 0 -4px; }
  to { opacity: 1; translate: 0 0; }
}

.drop-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--r-xs);
  font-size: 13.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.drop-menu a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ============================================
   5 · 按钮
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: filter var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.975); filter: brightness(.97); }

.btn-lg {
  min-height: 52px;
  padding: 0 30px;
  font-size: 17px;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-ghost:hover {
  filter: none;
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.btn-white {
  background: var(--btn-white-bg);
  color: var(--btn-white-color);
  min-height: 52px;
  padding: 0 30px;
  font-size: 17px;
  border-color: transparent;
}

.btn-outline-w {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .38);
  color: var(--cta-text);
  min-height: 52px;
  padding: 0 30px;
  font-size: 17px;
}

.btn-outline-w:hover {
  filter: none;
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .64);
}

/* ============================================
   6 · 首屏
   ============================================ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(150deg, var(--hero-start) 0%, var(--hero-end) 100%);
  border-bottom: 1px solid var(--border-base);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 62%;
  height: 120%;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .10), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.hero-left { min-width: 0; }

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
  padding-block: 92px 88px;
}

.badge.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border: 1px solid var(--border-base);
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--bg-card) 55%, transparent);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .01em;
}

.badge.hero-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.hero h1 {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: 600;
  letter-spacing: -.015em;
  margin: 26px 0 22px;
  max-width: 13.5em;
}

.hero .sub {
  color: var(--text-tertiary);
  font-size: var(--fs-body-lg);
  line-height: 1.72;
  margin-bottom: 36px;
  max-width: 33em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-img {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 552px;
  aspect-ratio: 4 / 3.45;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-base);
  box-shadow: var(--shadow-float);
  background: var(--bg-alt);
}

.hero-img::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
  pointer-events: none;
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   7 · 数据条
   ============================================ */
.stats {
  background: var(--bg-stats);
  border-bottom: 1px solid var(--border-base);
}

.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 26px 24px;
  border-left: 1px solid var(--border-base);
}

.stat:first-child { border-left: none; padding-left: 0; }

.stat .num {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.stat .num.red { color: var(--accent-text); }

.stat .label {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-tertiary);
}

/* ============================================
   8 · 区块与标题
   ============================================ */
section { padding: var(--sec-y) 0; }

.alt { background: var(--bg-alt); }

.sec-hl {
  background: linear-gradient(rgba(var(--accent-rgb), .055), rgba(var(--accent-rgb), .055)), var(--bg-body);
}

.sec-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-text);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sec-label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent-border);
  flex-shrink: 0;
}

.sec-title {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 600;
  letter-spacing: -.015em;
  margin: 16px 0 12px;
}

.sec-desc {
  color: var(--text-tertiary);
  font-size: var(--fs-body-lg);
  line-height: 1.72;
  margin-bottom: 56px;
  max-width: 44em;
}

.sub-title {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
  margin-bottom: 24px;
}

/* ============================================
   9 · 栅格与卡片
   ============================================ */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }

.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-md);
  padding: var(--sp-8);
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.card h3 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  margin: 20px 0 10px;
}

.card p {
  color: var(--text-tertiary);
  font-size: var(--fs-small);
  line-height: 1.75;
}

.card .more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  color: var(--accent-text);
  font-size: var(--fs-small);
  font-weight: 600;
}

.card .more::after {
  content: "›";
  font-size: 16px;
  line-height: 1;
  transition: transform var(--dur-fast) var(--ease);
}

.card:hover .more::after { transform: translateX(3px); }

/* 图标：苹果式「色块 + 线性图标」 */
.icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon svg { width: 24px; height: 24px; }
.icon svg [stroke] { stroke: var(--accent); }

/* 商城入口卡 */
.entry-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--sp-8);
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-md);
  transition: transform var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.entry-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-hover);
}

.entry-tag {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
}

.entry-card h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  margin: 0;
  font-weight: 600;
}

.entry-sub {
  color: var(--accent-text);
  font-size: var(--fs-small);
  font-weight: 600;
}

/* ============================================
   10 · 新闻列表
   ============================================ */
.news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  transition: background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.news-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.news-item h3 {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}

.news-item .meta {
  color: var(--text-tertiary);
  font-size: 12.5px;
  white-space: nowrap;
}

/* ============================================
   11 · CTA
   ============================================ */
.cta {
  padding: 96px 0;
  background: linear-gradient(135deg, var(--cta-start) 0%, var(--cta-end) 100%);
  text-align: center;
}

.cta .sec-label {
  justify-content: center;
  color: var(--cta-text);
  opacity: .9;
}

.cta .sec-label::before { background: rgba(255, 255, 255, .45); }

.cta h2 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 600;
  letter-spacing: -.015em;
  margin: 18px 0 14px;
  color: var(--on-accent);
}

.cta .big-phone {
  font-size: var(--fs-mega);
  line-height: var(--lh-mega);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--on-accent);
  font-variant-numeric: tabular-nums;
}

.cta .cta-sub {
  color: var(--cta-text);
  font-size: var(--fs-small);
  opacity: .9;
  margin: 16px 0 32px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================
   12 · 案例
   ============================================ */
.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
}

.case-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

.case-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
}

.case-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.case-card:hover .case-img img { transform: scale(1.03); }

.case-body { padding: var(--sp-6); }

.case-tag {
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
}

.case-body h3 {
  font-size: 18px;
  line-height: 1.45;
  margin: 10px 0 8px;
}

.case-body p {
  color: var(--text-tertiary);
  font-size: var(--fs-small);
  line-height: 1.7;
}

/* ============================================
   13 · 商城页：横幅 / 分段控件 / 商品卡
   ============================================ */
.mall-banner {
  padding: 72px 0 64px;
  background: linear-gradient(150deg, var(--hero-start) 0%, var(--hero-end) 100%);
  border-bottom: 1px solid var(--border-base);
}

.mall-banner h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 600;
  letter-spacing: -.015em;
  margin: 16px 0 12px;
}

.mall-banner .sub {
  color: var(--text-tertiary);
  font-size: var(--fs-body-lg);
  line-height: 1.72;
  max-width: 46em;
}

.mall-body { padding: 56px 0 96px; }

/* 分段控件（Segmented Control） */
.tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  margin-bottom: 36px;
  background: var(--bg-alt);
  border: 1px solid var(--border-base);
  border-radius: var(--r-full);
  max-width: 100%;
}

.tabs a {
  padding: 8px 18px;
  border-radius: var(--r-full);
  color: var(--text-secondary);
  font-size: var(--fs-small);
  transition: background-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
  white-space: nowrap;
}

.tabs a:hover { color: var(--text-primary); }

.tabs a.active {
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  padding: 7px 17px;
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

/* 商品卡 */
.pd-card {
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
}

.pd-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

.pd-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-alt);
}

.pd-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.pd-card:hover .pd-img img { transform: scale(1.03); }

.pd-img-ph {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  background:
    radial-gradient(circle at 30% 20%, rgba(var(--accent-rgb), .06), transparent 60%),
    var(--bg-alt);
}

.pd-info { padding: 18px 20px 20px; }

.pd-name {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
}

.pd-spec {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-top: 6px;
}

.pd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.pd-price {
  color: var(--accent-text);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 18px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 600;
  transition: filter var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}

.pd-btn:hover { filter: brightness(1.08); }
.pd-btn:active { transform: scale(.97); }

.assure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  margin-top: 48px;
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
}

/* ============================================
   14 · DIY 配单
   ============================================ */
.diy {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 48px;
}

.diy-left { flex: 1; padding: var(--sp-10); }

.diy-left h3 { font-size: 21px; }

.diy-left > p {
  color: var(--text-tertiary);
  font-size: var(--fs-small);
  line-height: 1.7;
  margin: 12px 0 20px;
}

.diy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  margin-bottom: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border-base);
  border-radius: var(--r-sm);
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.stepper { display: flex; align-items: center; gap: 8px; }

.stepper .minus,
.stepper .plus {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.stepper .minus:hover,
.stepper .plus:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

.stepper input.val {
  width: 60px;
  height: 30px;
  padding: 0 4px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-xs);
}

.stepper input.val:focus {
  outline: none;
  border-color: var(--accent);
}

.diy-quote {
  width: 360px;
  flex-shrink: 0;
  padding: var(--sp-9, 36px);
  background: var(--bg-alt);
  border-left: 1px solid var(--border-base);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.diy-quote .label { color: var(--text-muted); font-size: 13px; }

.diy-quote .total {
  color: var(--accent-text);
  font-size: 40px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.diy-quote .note {
  color: var(--text-tertiary);
  font-size: 12.5px;
  line-height: 1.65;
}

/* ============================================
   15 · 机型匹配
   ============================================ */
.match {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-8);
  margin-bottom: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-lg);
}

.match-title { width: 280px; flex-shrink: 0; }
.match-title h3 { font-size: 18px; line-height: 1.45; }
.match-title p { color: var(--text-tertiary); font-size: 13px; margin-top: 8px; }

.match-sel {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border-base);
  border-radius: var(--r-sm);
  transition: border-color var(--dur-fast) var(--ease);
}

.match-sel:hover { border-color: var(--border-light); }

.match-sel .k { font-size: 11.5px; color: var(--text-muted); letter-spacing: .04em; }
.match-sel .v { font-size: 15px; font-weight: 600; margin-top: 6px; }

.match-sel.hot { border-color: var(--accent-border); background: var(--accent-soft); }
.match-sel.hot .v { color: var(--accent-text); }

/* ============================================
   16 · 页脚
   ============================================ */
footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--border-base);
  padding: 72px 0 0;
}

.foot-grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr 1fr 1.35fr;
  gap: 48px;
  padding-bottom: 52px;
}

.foot-grid h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.foot-grid a,
.foot-grid p {
  display: block;
  color: var(--text-tertiary);
  font-size: 13.5px;
  line-height: 1.7;
  margin-bottom: 10px;
}

.foot-grid a:hover { color: var(--accent-text); }

.foot-brand {
  color: var(--text-tertiary) !important;
  font-size: 13px !important;
  line-height: 1.8 !important;
  margin-top: 16px;
  max-width: 30em;
}

.foot-phone {
  color: var(--accent-text) !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.friend-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 18px 0;
  border-top: 1px solid var(--border-base);
}

.friend-links .fl-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  margin-right: 6px;
}

.friend-links a {
  color: var(--text-tertiary);
  font-size: 12px;
  transition: color var(--dur-fast) var(--ease);
}

.friend-links a:hover { color: var(--text-primary); }

.copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border-base);
  color: var(--text-tertiary);
  font-size: 12px;
}

.copy a { color: var(--text-tertiary); }
.copy a:hover { color: var(--text-primary); }

/* 桌面上给右下角 AI 浮窗留出避让区，避免遮住备案号 */
@media (min-width: 1025px) {
  .copy { padding-right: 150px; }
}

/* ============================================
   17 · AI 客服浮窗
   ============================================ */
.ai-float {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-full);
  background: var(--ai-float-bg);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--ai-float-shadow);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.ai-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(var(--accent-rgb), .38);
}

.ai-float:active { transform: translateY(0) scale(.98); }

/* ============================================
   18 · 移动端菜单（全屏 Sheet）
   ============================================ */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
  z-index: 230;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.8px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: transform var(--dur-base) var(--ease),
              opacity var(--dur-fast) var(--ease);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.8px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 205;
  width: 100%;
  height: 100%;
  padding: 88px 24px 40px;
  background: color-mix(in srgb, var(--bg-body) 94%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--dur-base) var(--ease);
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav a {
  display: block;
  padding: 17px 0;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-base);
  transition: color var(--dur-fast) var(--ease);
}

.mobile-nav a:hover,
.mobile-nav a.active { color: var(--text-primary); font-weight: 600; }

.mobile-nav .mobile-sub a,
.mobile-nav a.mobile-sub {
  padding: 12px 0 12px 18px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-tertiary);
  border-bottom-color: var(--border-base);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .25);
}

.nav-overlay.show { display: block; }

body.has-drawer { overflow: hidden; }

/* ============================================
   19 · 滚动入场（渐进增强，零 JS）
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .grid4 > .card,
    .grid4 > .pd-card,
    .grid3 > .case-card,
    .grid3 > .entry-card,
    .repair-grid > *,
    .loop-steps > *,
    .private-grid > *,
    .scene-grid > *,
    .flow > *,
    .flow4 > *,
    .ch-grid > *,
    .qr-grid > *,
    .fb-grid > *,
    .news-item,
    .svc-block,
    .h5,
    .fb-card {
      animation: rise-in both linear;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

@keyframes rise-in {
  from { translate: 0 14px; }
  to { translate: 0 0; }
}

/* ============================================
   19.5 · 首页运营板块
   （扫码报修 / 六步闭环 / 宣发矩阵 / 私域沉淀）
   ============================================ */
.repair-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.25fr;
  align-items: stretch;
  gap: var(--sp-4);
}

.repair-step {
  padding: var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-md);
}

.repair-step .no {
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

.repair-step h4 { font-size: 16.5px; line-height: 1.45; margin: 12px 0 8px; }
.repair-step p { color: var(--text-tertiary); font-size: 13px; line-height: 1.7; }

.device-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: var(--r-md);
}

.device-card .dev-tag { color: var(--accent-text); font-size: 11.5px; font-weight: 500; line-height: 1.6; }
.device-card .dev-name { font-size: 16px; font-weight: 600; line-height: 1.45; }
.device-card .dev-meta { color: var(--text-tertiary); font-size: 12.5px; line-height: 1.75; }

.device-card .dev-qr {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.device-card .dev-qr img {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
  padding: 5px;
  background: var(--qr-paper);
  border: 1px solid var(--border-base);
  border-radius: var(--r-sm);
  object-fit: contain;
}

.repair-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.repair-note { color: var(--text-muted); font-size: 13px; line-height: 1.7; margin-top: 16px; }

/* 服务闭环 6 步 */
.loop-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-3);
}

.loop-step {
  padding: 20px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-sm);
}

.loop-step .t {
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.loop-step h4 { font-size: 14px; line-height: 1.4; margin: 8px 0 6px; }
.loop-step p { color: var(--text-tertiary); font-size: 12px; line-height: 1.6; }
.loop-note { color: var(--text-muted); font-size: 13px; line-height: 1.7; margin-top: 20px; }

/* 私域沉淀 */
.private-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

.private-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-md);
}

.private-card img {
  width: 84px;
  height: 84px;
  padding: 6px;
  background: var(--qr-paper);
  border: 1px solid var(--border-base);
  border-radius: var(--r-sm);
  object-fit: contain;
}

.private-card .icon { width: 42px; height: 42px; border-radius: 12px; }
.private-card h4 { font-size: 16px; line-height: 1.45; }
.private-card p { flex: 1; color: var(--text-tertiary); font-size: 13px; line-height: 1.7; }
.private-card .act { color: var(--accent-text); font-size: 13px; font-weight: 600; }
.private-note { color: var(--text-muted); font-size: 13px; line-height: 1.7; margin-top: 20px; }

@media (max-width: 1024px) {
  .repair-grid { grid-template-columns: repeat(2, 1fr); }
  .loop-steps { grid-template-columns: repeat(3, 1fr); }
  .private-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .repair-grid { grid-template-columns: 1fr; }
  .loop-steps { grid-template-columns: repeat(2, 1fr); }
  .private-grid { grid-template-columns: repeat(2, 1fr); }
  .repair-actions .btn { flex: 1; }
}

@media (max-width: 480px) {
  .loop-steps,
  .private-grid { grid-template-columns: 1fr; }
  .repair-actions .btn { width: 100%; }
}

/* ============================================
   20 · 响应式
   ============================================ */
@media (max-width: 1080px) {
  /* 中文导航项较多，1080px 以下改为汉堡菜单，
     避免 769–1024px 区间横排挤出横向滚动条 */
  header nav { display: none; }
  .nav-toggle { display: flex; }
  header > .wrap > .btn { margin-left: auto; }
  .mobile-nav {
    display: block;
    visibility: hidden;
    transition: transform var(--dur-base) var(--ease),
                visibility 0s linear var(--dur-base);
  }
  .mobile-nav.open {
    visibility: visible;
    transform: translateX(0);
    transition: transform var(--dur-base) var(--ease), visibility 0s;
  }
}

/* 平板段：菜单用右侧抽屉而非全屏 Sheet，避免大面积空白 */
@media (min-width: 769px) and (max-width: 1080px) {
  .mobile-nav {
    left: auto;
    right: 0;
    width: 380px;
    border-left: 1px solid var(--border-base);
    box-shadow: var(--shadow-dropdown);
  }
}

@media (max-width: 1024px) {
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { grid-template-columns: 1.15fr .85fr; gap: 40px; padding-block: 72px; }
  .hero-img { max-width: 440px; }
  .foot-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
  .foot-grid > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 var(--gutter-sm); }

  /* 顶栏 */
  .topbar .wrap { justify-content: center; padding-block: 7px; }
  .topbar .wrap > span:first-child { display: none; }
  .topbar .right span:not(.phone) { display: none; }

  /* 导航 */
  header nav { display: none; }
  .nav-toggle { display: flex; }
  header > .wrap > .btn { margin-left: auto; }

  /* 全屏抽屉：仅在移动端参与布局，避免桌面端占位 */
  .mobile-nav {
    display: block;
    visibility: hidden;
    transition: transform var(--dur-base) var(--ease),
                visibility 0s linear var(--dur-base);
  }
  .mobile-nav.open {
    visibility: visible;
    transform: translateX(0);
    transition: transform var(--dur-base) var(--ease), visibility 0s;
  }
  header .wrap { min-height: 56px; padding-block: 10px; gap: 12px; }
  .logo { gap: 8px; }
  .logo-name { font-size: 15px; }
  .logo-en { font-size: 6.5px; }
  .logo-mark { width: 44px; height: 27px; }
  header > .wrap > .btn { min-height: 38px; padding: 0 16px; font-size: 13px; }

  /* 首屏 */
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 44px 40px;
  }
  .hero h1 { margin: 20px 0 16px; max-width: none; }
  .hero .sub { margin-bottom: 26px; font-size: 15px; }
  .hero-img { justify-self: stretch; max-width: none; aspect-ratio: 16 / 11; border-radius: var(--r-md); }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { min-height: 46px; font-size: 15px; padding: 0 20px; }

  /* 数据条 */
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 20px 18px; }
  .stat:nth-child(odd) { border-left: none; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border-base); }
  .stat .num { font-size: 25px; }
  .stat .label { font-size: 11.5px; }

  /* 区块 */
  .sec-title { margin: 12px 0 10px; }
  .sec-desc { margin-bottom: 32px; font-size: 15px; }

  /* 栅格 */
  .grid4, .grid3 { grid-template-columns: 1fr; gap: 14px; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 22px; }
  .card h3 { font-size: 17px; margin-top: 16px; }
  .card .more { margin-top: 14px; }
  .icon { width: 42px; height: 42px; border-radius: 12px; }
  .icon svg { width: 21px; height: 21px; }

  /* 商城 */
  .mall-banner { padding: 44px 0 40px; }
  .mall-banner .sub { font-size: 15px; }
  .mall-body { padding: 36px 0 64px; }
  .tabs { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 24px; }
  .tabs a { flex-shrink: 0; }
  .pd-info { padding: 14px 16px 18px; }
  .pd-name { font-size: 14px; }
  .pd-price { font-size: 17px; }
  .pd-img { aspect-ratio: 16 / 11; }

  /* DIY */
  .diy { flex-direction: column; border-radius: var(--r-md); }
  .diy-left { padding: 22px; }
  .diy-row { flex-direction: column; align-items: flex-start; gap: 10px; padding: 13px; }
  .diy-quote { width: 100%; border-left: none; border-top: 1px solid var(--border-base); padding: 22px; }
  .diy-quote .total { font-size: 32px; }

  /* 机型 */
  .match { flex-direction: column; align-items: stretch; gap: 14px; padding: 22px; border-radius: var(--r-md); }
  .match-title { width: 100%; }

  /* 新闻 */
  .news-item { flex-direction: column; align-items: flex-start; gap: 6px; padding: 15px 16px; }
  .news-item h3 { font-size: 15px; }

  /* CTA */
  .cta { padding: 64px 0; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn-white,
  .cta-actions .btn-outline-w { width: 100%; }

  /* 页脚 */
  footer { padding: 48px 0 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-bottom: 32px; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .foot-grid > div:last-child { grid-column: 1 / -1; }
  .copy { flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; }

  /* 浮窗：手机端收为圆形图标，减少对内容的遮挡 */
  .ai-float {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    font-size: 0;
  }
  .ai-float svg { width: 20px; height: 20px; }
  .season-switcher { left: 16px; bottom: 16px; }
  .season-switcher .ss-toggle { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .grid4 { grid-template-columns: 1fr; }
  header > .wrap > .btn { display: none; }
  .hero-actions .btn { width: 100%; }
  .hero-img { aspect-ratio: 16 / 12; }
  .stat { padding: 16px 14px; }
  .stat .num { font-size: 22px; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-grid > div:first-child,
  .foot-grid > div:last-child { grid-column: auto; }
  .friend-links { gap: 6px 14px; }
  .friend-links a { font-size: 11px; }
}

/* ============================================
   21 · 减少动态效果
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .card:hover,
  .case-card:hover,
  .pd-card:hover,
  .entry-card:hover { transform: none; }
}
