/* ============================================================
   WinKey 商城样式表
   目标浏览器：Chrome 78+（2019-10）
   兼容策略（只使用 Chrome 78 原生支持的特性）：
   - 布局：CSS Grid（grid 中可安全使用 gap，Chrome 66+）
     Flexbox 仅用于单行内联排布，且【不使用 flex gap】（Chrome 84 才支持），
     间距一律用 margin 实现。
   - 不使用：clamp()/min()/max()（79+）、aspect-ratio（88+）、
     inset 简写（87+）、:is()/:where()/:has()（88+/105+）、
     :focus-visible（86+）、::marker（80+）、accent-color（93+）、
     flex gap（84+）。
   - 需要内核前缀：-webkit-appearance、-webkit-backdrop-filter（双写）、
     ::-webkit-input-placeholder（与 ::placeholder 双写）、
     -webkit-background-clip: text。
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #f2f4f9;
  --bg-alt: #e9edf5;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --line: #dfe4ee;
  --text: #1b2233;
  --text-2: #5a6478;
  --primary: #0067c0;
  --primary-strong: #005a9e;
  --primary-soft: #e3f0fc;
  --accent: #4cc2ff;
  --danger: #d13438;
  --ok: #0f7b3f;
  --warn-bg: #fff4ce;
  --shadow-1: 0 2px 8px rgba(23, 32, 54, .08);
  --shadow-2: 0 10px 32px rgba(23, 32, 54, .14);
  --shadow-3: 0 18px 56px rgba(23, 32, 54, .22);
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --radius-xl: 22px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 64px;
}

/* 本站固定浅色主题，不提供深色模式 */

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

/* [hidden] 必须彻底隐藏：作者样式的 display 会覆盖 UA 对 [hidden] 的默认值，
   该规则保证 JS 用 hidden 属性控制显隐的浮层（遮罩/抽屉/徽章）可靠生效 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 1160px;   /* 与主容器同宽：窗口 >= 1160 时无横滚、各区块精确居中 */
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
code, kbd {
  font-family: Consolas, "Courier New", monospace;
  font-size: .92em;
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-radius: 4px;
  padding: 1px 6px;
}
kbd { border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface); }

:focus { outline: none; }   /* 去掉焦点包围框（输入框保留自身边框变色反馈） */

::selection { background: rgba(0, 103, 192, .25); }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; }

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  /* Chrome 78 无 flex gap：.btn 内间距由 .btn .icon { margin-left } 控制 */
  border: 1px solid transparent;
  border-radius: var(--radius-m);
  padding: 10px 20px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  -webkit-user-select: none; user-select: none;
}
.btn .icon { margin-left: 8px; width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover { box-shadow: 0 4px 14px rgba(0, 103, 192, .35); }
.btn-primary[disabled] {
  cursor: not-allowed;
  background: var(--line);
  color: var(--text-2);
  box-shadow: none;
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-1);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-strong); }

.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: var(--radius-m); }
.btn-block { width: 100%; }

.icon-btn {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--text);
  transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease);
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary-strong); }

/* ---------- 促销条 ---------- */
.promo-bar {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  padding: 8px 16px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(90deg, #005a9e, #0067c0 45%, #106ebe);
}
.promo-badge {
  margin-right: 10px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #005a9e;
  background: #fff;
  border-radius: 999px;
}

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);   /* 分割线常显 */
  transition: background-color .25s var(--ease);
}

.header-inner {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  height: var(--header-h);
}

.brand { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin-right: 40px; }
.brand-logo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 30px; height: 30px;
  margin-right: 12px;
  transform: rotate(-4deg);
}
.brand-logo .cell { border-radius: 3px; }
.brand-logo .c1 { background: #f25022; }
.brand-logo .c2 { background: #7fba00; }
.brand-logo .c3 { background: #00a4ef; }
.brand-logo .c4 { background: #ffb900; }

.brand-name { font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.brand-name em { font-style: normal; color: var(--primary); }

.main-nav { display: -webkit-flex; display: flex; -webkit-flex: 1; flex: 1; }
.main-nav a {
  position: relative;
  margin-right: 28px;
  padding: 6px 2px;
  font-size: 15px;
  color: var(--text-2);
  transition: color .2s var(--ease);
}
.main-nav a:hover, .main-nav a.is-active { color: var(--primary-strong); }
.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;         /* 不使用 inset 简写（87+） */
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 96px; }

.hero-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; } /* 不用 inset */
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.blob.b1 { width: 420px; height: 420px; left: -120px; top: -120px; background: #9fd6ff; animation: drift 14s ease-in-out infinite alternate; }
.blob.b2 { width: 360px; height: 360px; right: -80px; top: 30px; background: #c7b9ff; animation: drift 18s ease-in-out infinite alternate-reverse; }
.blob.b3 { width: 280px; height: 280px; left: 42%; bottom: 88px; background: #a8f0d8; opacity: .45; animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, 26px, 0) scale(1.12); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
}
.hero-text { -webkit-flex: 1.15; flex: 1.15; padding-right: 48px; }
.hero-visual { -webkit-flex: .85; flex: .85; position: relative; }

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 1px solid rgba(0, 103, 192, .22);
  border-radius: 999px;
}

.hero-title { font-size: 46px; line-height: 1.22; font-weight: 800; letter-spacing: -.01em; }
.grad-text {
  background: linear-gradient(92deg, #0067c0, #4cc2ff 60%, #37d0b6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary); /* 降级色 */
}
/* 服务保障标签组 + 正版声明警示 */
/* 固定两行、每行 4 个：4 列 grid（列宽取各列最宽标签） */
.hero-tags {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: start;
  gap: 10px 12px;                    /* grid gap：Chrome 66+ */
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}
.hero-tags li {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  padding: 7px 15px 7px 12px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.hero-tags svg { width: 16px; height: 16px; margin-right: 7px; color: var(--primary); }

.hero-notice {
  display: -webkit-flex; display: flex;
  -webkit-align-items: flex-start; align-items: flex-start;
  max-width: 620px;
  margin: 12px 0 0;
  padding: 12px 16px;
  background: #fff6d9;
  border: 1px solid #f2d98a;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #6f5310;
}
.hero-notice svg {
  width: 19px; height: 19px;
  margin-right: 10px;
  margin-top: 2px;
  -webkit-flex: none; flex: none;
  color: #c07a10;
}
.hero-notice b { font-weight: 700; color: #8a6714; }

.hero-cta { display: -webkit-flex; display: flex; margin-top: 32px; }
.hero-cta .btn { margin-right: 16px; }

.hero-stats {
  display: -webkit-flex; display: flex;
  list-style: none;
  padding: 0;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.hero-stats li { margin-right: 48px; }
.hero-stats li:last-child { margin-right: 0; }
.hero-stats strong { display: block; font-size: 24px; font-weight: 800; color: var(--primary-strong); }
.hero-stats span { font-size: 13px; color: var(--text-2); }

/* Hero 视觉区：大号 Win11 logo（直角四格，无透视） */
.logo-hero {
  width: 330px;
  height: 330px;
  margin: 0 auto;
  animation: floaty 7s ease-in-out infinite alternate;
  -webkit-filter: drop-shadow(0 26px 42px rgba(0, 103, 192, .38));
  filter: drop-shadow(0 26px 42px rgba(0, 103, 192, .38));
}
.logo-hero svg { width: 100%; height: 100%; display: block; }

@keyframes floaty {
  from { transform: translateY(0); }
  to { transform: translateY(-14px); }
}

.float-card {
  position: absolute;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  padding: 12px 18px 12px 14px;
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  color: var(--primary-strong);
}
.float-card strong { display: block; font-size: 14px; color: var(--text); line-height: 1.3; }
.float-card span { font-size: 12px; color: var(--text-2); }
.float-card .icon { width: 26px; height: 26px; margin-right: 10px; }
.mini-float {
  position: absolute;
  display: block;
  -webkit-filter: drop-shadow(0 8px 16px rgba(0, 60, 120, .18));
  filter: drop-shadow(0 8px 16px rgba(0, 60, 120, .18));
}
.mini-float svg { width: 100%; height: 100%; display: block; }
/* 三个历史版本 logo 环绕大 logo 错落漂浮 */
.mf-win10 { width: 62px; height: 62px; right: -20px; top: -46px; animation: float-sm 6s .3s ease-in-out infinite alternate; }
.mf-win81 { width: 60px; height: 60px; left: -58px; top: 24px; animation: float-sm 7.5s .7s ease-in-out infinite alternate; }
.mf-win7 { width: 72px; height: 64px; left: -50px; bottom: -34px; animation: float-sm 6.8s 1s ease-in-out infinite alternate; }
@keyframes float-sm {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

.float-card.fc1 { left: -2px; top: -86px; animation: floaty 6s .8s ease-in-out infinite alternate; }
.float-card.fc2 { right: -4px; bottom: -88px; animation: floaty 6s .3s ease-in-out infinite alternate-reverse; }

/* ---------- 区块通用 ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); transition: background-color .25s var(--ease); }

.section-head { text-align: center; margin-bottom: 44px; }
.section-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.section-title { font-size: 32px; font-weight: 800; letter-spacing: -.01em; }
.section-desc { margin-top: 12px; color: var(--text-2); font-size: 15px; }

/* ---------- 商品工具栏：分段控件（浅灰轨道 + 选中白色浮起） ---------- */
#products .section-head { margin-bottom: 18px; }   /* 收紧与上方描述的间距 */

.shop-toolbar {
  display: -webkit-flex; display: flex;
  -webkit-justify-content: center; justify-content: center;
  margin: 0 0 26px;
}

.filter-tabs {
  display: -webkit-inline-flex; display: inline-flex;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.filter-tab {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  margin-left: 2px;
  padding: 7px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  border: none;
  border-radius: 9px;
  background: transparent;
  transition: color .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}

/* 迷你官方版本 logo（内联 SVG，形状/配色对照微软官方徽标） */
.mini-logo {
  width: 14px;
  height: 14px;
  margin-right: 7px;
  -webkit-flex: none; flex: none;
}

.filter-tab:first-child { margin-left: 0; }
.filter-tab:hover { color: var(--primary-strong); }
.filter-tab.is-active {
  color: var(--primary-strong);
  background: #fff;
  box-shadow: 0 1px 4px rgba(23, 32, 54, .14), 0 0 0 1px rgba(0, 103, 192, .2);
}

/* ---------- 商品卡片 ---------- */
/* ---------- 商品卡片 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 24px; /* grid gap：Chrome 66+ 原生支持 */
}

.product-card {
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2);
  border-color: rgba(0, 103, 192, .4);
}

/* 封面"图片"块：蓝色底正方形。
   正方形比例用 padding-top hack 实现（aspect-ratio 需 Chrome 88，禁用）。 */
.pc-cover {
  position: relative;
  width: 100%;
  margin: 0 0 16px;
  padding-top: 100%; /* 高度 = 宽度 → 1:1 */
  border-radius: var(--radius-l);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 6%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 48%),
    linear-gradient(155deg, #0a3d7c 0%, #0f5cb8 46%, #1c7ed6 100%);
}

/* 版本笔记本展示图（透明素材），悬浮于底部信息块上方 */
.pc-cover-img {
  position: absolute;
  left: 50%;
  bottom: 31%;
  width: 80%;
  transform: translateX(-50%);
  transition: transform .3s var(--ease);
}
.product-card:hover .pc-cover-img { transform: translateX(-50%) scale(1.045); }

/* 封面左上角：微软官方 logo（白字标深底变体） */
.pc-ms {
  position: absolute;
  top: 12px;
  left: 12px;
  height: 21px;
}

/* 封面底部信息块：特性标签行 + 版名，整体渐变压暗 */
.pc-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 10px 14px;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(5, 28, 62, 0) 0%, rgba(5, 28, 62, .66) 60%);
}

/* 特性标签行：4 等分 + 细分隔线 */
.pc-ftags {
  display: -webkit-flex; display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 9px;
}
.pc-ftags li {
  -webkit-flex: 1; flex: 1;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .96);
  white-space: nowrap;
}
.pc-ftags li + li { border-left: 1px solid rgba(255, 255, 255, .3); }

/* 版名两行：版本名（大）+ 规格（小） */
.pc-osname b { display: block; font-size: 23px; font-weight: 600; letter-spacing: .4px; line-height: 1.25; }
.pc-osname i { display: block; margin-top: 2px; font-style: normal; font-size: 14px; font-weight: 500; line-height: 1.3; color: rgba(255, 255, 255, .88); }

/* 热卖等角标：封面右上角，扁平纯色块（无渐变、无阴影） */
.pc-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #d9484b;
  border-radius: 6px;
}

.pc-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
}

/* 限时特惠标签（左），价格靠右 */
.pc-promo {
  -webkit-flex: none; flex: none;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #b45309;
  background: var(--warn-bg);
  border-radius: var(--radius-s);
}
.pc-price { display: -webkit-flex; display: flex; -webkit-align-items: baseline; align-items: baseline; }
.pc-price .cur { font-size: 15px; font-weight: 700; color: var(--danger); }
.pc-price .num { font-size: 28px; font-weight: 800; color: var(--danger); line-height: 1; margin-left: 2px; }
.pc-price .dec { font-size: 16px; font-weight: 800; color: var(--danger); }  /* 小数位缩小（基线对齐） */
.pc-origin { margin-right: 8px; font-size: 12px; color: var(--text-2); text-decoration: line-through; }

.pc-actions { display: -webkit-flex; display: flex; margin-top: 16px; }
.pc-actions .btn { -webkit-flex: 1; flex: 1; padding: 10px 12px; font-size: 14px; }

.empty-hint { padding: 48px 0; text-align: center; color: var(--text-2); }

/* 通用加载旋转环（API 等待态） */
.spinner {
  display: inline-block;
  width: 22px; height: 22px;
  border: 3px solid rgba(0, 103, 192, .18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 商品加载占位 / 加载失败（正式站：不回退演示数据） */
.load-hint {
  grid-column: 1 / -1;
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  -webkit-align-items: center; align-items: center;
  padding: 64px 0 56px;
  text-align: center;
  color: var(--text-2);
  font-size: 14.5px;
}
.load-hint .spinner { margin-bottom: 16px; }
.load-hint .btn { margin-top: 18px; }

/* ---------- 步骤 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px; /* grid gap */
  list-style: none;
  counter-reset: none;
  padding: 0;
}
.step-card {
  position: relative;
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
}
.step-no {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.step-card h3 { font-size: 17px; margin-bottom: 8px; }
.step-card p { font-size: 13.5px; color: var(--text-2); }

/* ---------- 保障 ---------- */
.guarantee-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.g-card {
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.g-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.g-icon {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: var(--radius-m);
  margin-bottom: 14px;
}
.g-icon .icon { width: 24px; height: 24px; }
.g-blue { background: #e3f0fc; color: #0067c0; }
.g-green { background: #dff7ea; color: #0f7b3f; }
.g-orange { background: #fdeede; color: #b45309; }
.g-purple { background: #efe7fb; color: #6b3fa0; }
.g-card h3 { font-size: 16px; margin-bottom: 6px; }
.g-card p { font-size: 13.5px; color: var(--text-2); }

/* ---------- FAQ（第一版：整体大卡 + 悬停行 + Q 序号徽章） ---------- */
.faq-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  padding: 10px;
  counter-reset: faqq;          /* 计数器自动生成 Q1、Q2… */
}
.faq-item {
  position: relative;
  counter-increment: faqq;
  border-radius: var(--radius-m);
  transition: background-color .2s var(--ease);
}
.faq-item + .faq-item { margin-top: 2px; }
.faq-item[open] { background: var(--surface-2); }
.faq-item summary {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  padding: 13px 14px;
  border-radius: var(--radius-m);
  cursor: pointer;
  list-style: none;
  /* Chrome 78 无 :focus-visible，鼠标点击后全局 :focus 的 outline
     会在展开内容上方残留一条蓝线；这里改为柔和的底色焦点反馈 */
  outline: none;
  transition: background-color .18s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; } /* 隐藏原生三角 */
.faq-item summary:hover,
.faq-item summary:focus { background: var(--primary-soft); }
.faq-q {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 32px; height: 32px;
  margin-right: 14px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1;   /* 行高 1：避免继承 1.6 行高导致文字在徽章内视觉偏上 */
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--primary-strong);
  background: var(--primary-soft);
  -webkit-flex: none; flex: none;
  transition: background-color .22s var(--ease), color .22s var(--ease);
}
/* 字形垂直补偿：Segoe UI 下 Q1 墨迹中心比徽章中心低 0.5px（实测 canvas TextMetrics），
   上移 0.5px 使字形视觉中心回到徽章中央 */
.faq-q::before {
  content: 'Q' counter(faqq);
  display: block;
  transform: translateY(-0.5px);
}
.faq-item[open] .faq-q { background: var(--primary); color: #fff; }

.faq-t {
  -webkit-flex: 1; flex: 1;
  font-size: 15px;
  font-weight: 600;
  padding-right: 12px;
  line-height: 1.45;
}
.faq-chevron {
  width: 9px; height: 9px;
  -webkit-flex: none; flex: none;
  margin-right: 6px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg);
  transition: transform .22s var(--ease);
}
.faq-item[open] .faq-chevron { transform: rotate(225deg); border-color: var(--primary-strong); }
.faq-body {
  padding: 12px 16px 12px 60px;   /* 与标题文字左对齐：14 + 32 + 14；上下留白相等 */
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}
.faq-body p + p { margin-top: 6px; }

/* Win 键提示组件：kbd 内嵌 Win11 风格纯色徽标 */
.kbd-win {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  vertical-align: middle;                 /* 与行内文字基线对齐 */
  white-space: nowrap;
}
.kw-logo {
  display: block;
  width: 12px; height: 12px;
  margin-right: 5px;
  -webkit-flex: none; flex: none;
  background: var(--primary);             /* Win11 纯色四格，深浅主题自适应 */
  border-radius: 2.5px;
  /* 四格镂空：用径向渐变打孔会引入前缀问题，这里改为实心圆角块 + 内部分割线 */
  background-image:
    linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, .95) 45%, rgba(255, 255, 255, .95) 55%, transparent 55%),
    linear-gradient(0deg, transparent 45%, rgba(255, 255, 255, .95) 45%, rgba(255, 255, 255, .95) 55%, transparent 55%);
  background-size: 100% 100%;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
}

/* ---------- 页脚 ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 40px 0 28px; transition: background-color .25s var(--ease); }
.footer-inner {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.footer-brand { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }
.footer-brand .brand-logo { margin-right: 12px; }
.footer-brand p { font-size: 14px; color: var(--text-2); }
.footer-links { display: -webkit-flex; display: flex; }
.footer-links a { margin-left: 26px; font-size: 14px; color: var(--text-2); transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--primary-strong); }
.footer-bottom {
  display: -webkit-flex; display: flex;
  -webkit-justify-content: center; justify-content: center;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
  padding-top: 18px;
  text-align: center;
}
.footer-bottom p { font-size: 12.5px; color: var(--text-2); margin: 4px 12px 0 0; }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;   /* 不使用 inset 简写 */
  z-index: 220;
  background: rgba(15, 20, 32, .5);
  opacity: 0;
  transition: opacity .25s var(--ease);
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.modal-mask.is-open { opacity: 1; }

.modal {
  position: relative;
  width: 560px;
  max-width: 100%;
  max-height: calc(100vh - 48px); /* calc()：Chrome 26+ */
  overflow-y: auto;
  padding: 30px 32px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-3);
  transform: translateY(18px) scale(.97);
  opacity: 0;
  transition: transform .28s var(--ease), opacity .22s var(--ease);
}
.modal-mask.is-open .modal { transform: translateY(0) scale(1); opacity: 1; }

.modal-close { position: absolute; top: 16px; right: 16px; }
.modal-title { font-size: 21px; font-weight: 800; margin-bottom: 18px; padding-right: 40px; }

/* ---------- 确认订单（单件直购） ---------- */
/* 流程指示：1 确认订单 → 2 支付 → 3 获取激活码 */
.cf-steps {
  display: -webkit-flex; display: flex;
  -webkit-justify-content: center; justify-content: center;
  list-style: none;
  padding: 0;
  margin: -4px 0 18px;
}
.cf-steps li {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  font-size: 12.5px;
  color: var(--text-2);
}
.cf-steps li + li::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--line);
  margin: 0 10px;
}
.cf-steps li i {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 18px; height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
}
.cf-steps li.is-active { color: var(--primary-strong); font-weight: 700; }
.cf-steps li.is-active i { color: #fff; background: var(--primary); border-color: var(--primary); }

/* 商品块：封面缩略图 + 信息 + 价格 */
.cf-prod {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}
.cf-thumb {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  -webkit-flex: none; flex: none;
  width: 64px; height: 64px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.cf-thumb-logo { display: -webkit-flex; display: flex; }
.cf-thumb-logo svg { width: 40px; height: 40px; }
.cf-info { -webkit-flex: 1; flex: 1; min-width: 0; padding: 0 14px; }
.cf-info h3 { font-size: 16px; font-weight: 700; }
.cf-tags { display: -webkit-flex; display: flex; list-style: none; padding: 0; margin: 10px 0 0; }
.cf-tags li {
  margin-right: 5px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: var(--radius-s);
  white-space: nowrap;
}
.cf-tags li:last-child { margin-right: 0; }
.cf-price { -webkit-flex: none; flex: none; text-align: right; }
.cf-price strong { display: block; font-size: 20px; font-weight: 800; color: var(--danger); line-height: 1.2; }
.cf-price span { display: block; margin-top: 3px; font-size: 12px; color: var(--text-2); text-decoration: line-through; }

/* 明细：授权 / 发货 / 售后 */
.cf-rows {
  list-style: none;
  padding: 10px 16px;
  background: var(--surface-2);
  border-radius: var(--radius-m);
  margin-bottom: 18px;
}
.cf-rows li {
  display: -webkit-flex; display: flex;
  -webkit-justify-content: space-between; justify-content: space-between;
  font-size: 13.5px;
  padding: 4px 0;
  color: var(--text-2);
}
.cf-rows li strong { color: var(--text); font-weight: 600; }

/* ---------- 收银台（左：商品+订单信息+应付 / 右：品牌色切换+二维码） ---------- */
.modal-cashier { width: 640px; }
.cashier {
  display: -webkit-flex; display: flex;
  margin-bottom: 16px;
}
.cashier-left {
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  -webkit-flex: 1; flex: 1;
  min-width: 0;
}

/* 商品行：logo 磁贴 + 名称 + 价格 */
.cs-prod {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  padding-bottom: 13px;
  border-bottom: 1px dashed var(--line);
}
.cs-prod-thumb { width: 44px; height: 44px; border-radius: 10px; }
.cs-prod-thumb svg { width: 28px; height: 28px; }
.cs-prod strong { font-size: 15.5px; font-weight: 700; padding-left: 12px; }
.cs-prod-price {
  margin-left: auto;
  -webkit-flex: none; flex: none;
  font-size: 19px;
  font-weight: 800;
  color: var(--danger);
}

.cs-rows { list-style: none; padding: 12px 0 0; margin: 0 0 14px; }
.cs-rows li {
  display: -webkit-flex; display: flex;
  -webkit-justify-content: space-between; justify-content: space-between;
  font-size: 13.5px;
  padding: 4.5px 0;
  color: var(--text-2);
}
.cs-rows li strong { color: var(--text); font-weight: 600; }

.cashier-left .cashier-notice { margin: 0; }

/* 支付遇到问题 → 联系客服：在左栏底部空白区（与右侧扫码提示等高的区域）内居中 */
.cs-help {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-align-self: center; align-self: center;
  -webkit-flex: none; flex: none;
  margin: auto 0;   /* 在剩余空间中垂直居中；水平由 align-self 居中（图标已计入链接宽度） */
  font-size: 12.5px;
  color: var(--primary-strong);
  text-decoration: none;
  cursor: pointer;
}
.cs-help .icon { width: 14px; height: 14px; margin-right: 5px; }
.cs-help:hover { text-decoration: underline; }

.cashier-right {
  -webkit-flex: none; flex: none;
  width: 236px;   /* 212 内容 + 24 栏间距 */
  padding-left: 24px;
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  -webkit-align-items: center; align-items: center;
}

/* 支付方式胶囊：品牌色圆点，选中带品牌色描边与浅底 */
.qr-methods {
  display: -webkit-flex; display: flex;
  width: 100%;
}
.qm {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  -webkit-flex: 1; flex: 1;
  padding: 7px 0;
  font: inherit;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}
.qm + .qm { margin-left: 8px; }
.qm svg { width: 14px; height: 14px; margin-right: 6px; -webkit-flex: none; flex: none; }
.qm.is-active { font-weight: 600; }
.qm.is-active[data-pay="wechat"] { color: #06ad56; border-color: rgba(7, 193, 96, .45); background: rgba(7, 193, 96, .07); }
.qm.is-active[data-pay="alipay"] { color: #1677ff; border-color: rgba(22, 119, 255, .45); background: rgba(22, 119, 255, .07); }

.qr-box {
  position: relative;
  margin-top: 14px;
  padding: 13px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(10, 40, 80, .12);
}
.qr-box canvas { display: block; }
.qr-tip { margin-top: 12px; font-size: 12px; color: var(--text-2); text-align: center; line-height: 1.7; }
.qr-tip b { color: var(--text); }

.cashier-notice {
  display: -webkit-flex; display: flex;
  -webkit-align-items: flex-start; align-items: flex-start;
  padding: 13px 16px;
  margin: 4px 0 6px;
  background: var(--primary-soft);
  border: 1px solid rgba(0, 103, 192, .25);
  border-radius: var(--radius-m);
  color: var(--primary-strong);
}
.cashier-notice .icon { width: 20px; height: 20px; margin-right: 10px; -webkit-flex: none; flex: none; }
.cashier-notice p { font-size: 13.5px; line-height: 1.55; }
.cashier-notice b { font-weight: 700; }

.field { margin-bottom: 16px; }
.field label, .field legend { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field label em { color: var(--danger); font-style: normal; }
.field label small { color: var(--text-2); font-weight: 400; }
.field input[type="email"], .field input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 103, 192, .15); outline: none; }
.field input.is-invalid { border-color: var(--danger); }
.field-error { margin-top: 6px; font-size: 12.5px; color: var(--danger); }

fieldset.field { border: none; padding: 0; margin: 0 0 16px; }

.pay-bar {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
/* 独按钮底栏：无金额，按钮占满整行 */
.pay-bar.is-solo .btn { -webkit-flex: 1; flex: 1; }
.pay-total { font-size: 14px; color: var(--text-2); }
.pay-total strong { font-size: 24px; font-weight: 800; color: var(--danger); margin-left: 6px; }
.pay-btn.is-loading { opacity: .7; pointer-events: none; }

/* 按钮 loading 态：文字后追加小旋转点 */
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  margin-left: 9px;
  vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* 二维码加载覆盖层（支付单创建期间遮住画布，避免空白/旧码） */
.qr-loading {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  background: #fff;
  color: var(--text-2);
  font-size: 12.5px;
}
.qr-loading .spinner { margin-bottom: 12px; }

/* 订单成功 */
.order-ok { text-align: center; padding: 6px 0 4px; }
.ok-badge {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 62px; height: 62px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  animation: pop-in .45s var(--ease);
}
.ok-badge .icon { width: 32px; height: 32px; }
@keyframes pop-in {
  0% { transform: scale(.3); opacity: 0; }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}
.order-ok .modal-title { padding-right: 0; margin-bottom: 8px; }
.order-no { font-size: 14px; color: var(--text-2); }
.order-no code { font-size: 15px; }
.order-tip { margin-top: 10px; font-size: 13px; color: var(--text-2); }

.key-list { margin: 18px 0 4px; }
.key-item {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  padding: 13px 16px;
  margin-bottom: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-m);
}
.key-item .ki-name { -webkit-flex: 1; flex: 1; padding-right: 10px; }
.ki-name strong { display: block; font-size: 13.5px; }
.ki-name span { font-size: 12px; color: var(--text-2); }
.ki-key {
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--primary-strong);
}
.copy-key {
  margin-left: 12px;
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--text-2);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.copy-key:hover { color: var(--primary-strong); border-color: var(--primary); }
.copy-key .icon { width: 14px; height: 14px; margin-right: 5px; }

/* 收银台底部：等待付款动画条（无按钮） */
.await-pay {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 100%;
  font-size: 14px;
  color: var(--text-2);
}
.await-pay .spinner { width: 18px; height: 18px; border-width: 2.5px; margin-right: 10px; -webkit-flex: none; flex: none; }

/* 激活方法说明 */
.order-steps {
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--primary-soft);
  border: 1px solid rgba(0, 103, 192, .22);
  border-radius: var(--radius-m);
  text-align: left;
}
.order-steps h3 { font-size: 13.5px; font-weight: 700; color: var(--primary-strong); margin-bottom: 8px; }
.order-steps p { font-size: 13px; line-height: 1.7; color: var(--text); }
.order-steps p + p { margin-top: 6px; }
.order-steps b { font-weight: 700; }
.order-steps code {
  padding: 1px 7px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
  color: var(--primary-strong);
  background: var(--surface);
  border: 1px solid rgba(0, 103, 192, .25);
  border-radius: var(--radius-s);
}

/* 激活帮助：激活方法下方的联系客服入口 */
.order-help { margin: 14px 0 0; text-align: center; }

/* ---------- 客服聊天窗口（参考 Photoshop 安装器设计稿，可拖动） ---------- */
.chat-window {
  position: fixed;
  z-index: 250;
  width: 700px;
  height: 600px;
  -webkit-transform-origin: 100% 100%;
  transform-origin: 100% 100%;
  transition: -webkit-transform .22s var(--ease), transform .22s var(--ease), opacity .22s var(--ease);
  animation: chat-in .2s var(--ease);
  right: 36px;
  bottom: 36px;
  display: grid;
  grid-template-rows: 42px 58px 1fr auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 22px 70px rgba(18, 47, 83, .3), 0 3px 12px rgba(18, 47, 83, .12), inset 0 0 0 1px #e0e8f3;
  overflow: hidden;
  animation: chat-in .22s var(--ease);
}
/* 拖拽文件悬停高亮 */
.chat-window.is-file-over {
  outline: 2px dashed var(--primary);
  outline-offset: -6px;
}

.chat-window.is-minimizing {
  -webkit-transform: scale(.6) translateY(26px);
  transform: scale(.6) translateY(26px);
  opacity: 0;
  pointer-events: none;
}

@keyframes chat-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 窗口标题栏（拖动手柄） */
.chat-titlebar {
  position: relative;
  border-bottom: 1px solid #e9eef4;
  cursor: move;
  -webkit-user-select: none; user-select: none;
}
.chat-brand {
  position: absolute;
  left: 14px; top: 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 24px; height: 24px;
}
.chat-brand .cell { border-radius: 2px; }
.chat-brand .c1 { background: #f25022; }
.chat-brand .c2 { background: #7fba00; }
.chat-brand .c3 { background: #00a4ef; }
.chat-brand .c4 { background: #ffb900; }
.chat-window-name {
  position: absolute;
  left: 46px; top: 11px;
  font-size: 12px;
  font-weight: 700;
  color: #314259;
}
.chat-window-tag {
  position: absolute;
  left: 168px; top: 15px;
  padding-left: 10px;
  border-left: 1px solid #dfe6ef;
  font-size: 8px;
  letter-spacing: 1.6px;
  color: #8b9ab0;
}
.chat-controls {
  position: absolute;
  right: 0; top: 0;
  display: -webkit-flex; display: flex;
  height: 42px;
}
.chat-ctrl {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 44px; height: 42px;
  border: none;
  background: transparent;
  color: #8b9ab0;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.chat-ctrl svg { width: 16px; height: 16px; }
.chat-min:hover { background: #eaf2fd; color: #0067c0; }
.chat-close:hover { background: #d93025; color: #fff; }

/* 客服信息头部 */
.chat-header {
  position: relative;
  border-bottom: 1px solid #e5eaf1;
}
.chat-agent-avatar {
  position: absolute;
  left: 16px; top: 13px;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}
.chat-agent-avatar svg { width: 20px; height: 20px; }
.chat-agent-avatar img { width: 100%; height: 100%; border-radius: 7px; object-fit: cover; }
.chat-agent-info h2 {
  position: absolute;
  left: 58px; top: 9px;
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #263b55;
}
/* 标题右侧在线时间标注 */
.chat-hours {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 400;
  color: #98a0ac;
  letter-spacing: .02em;
}

.chat-online {
  position: absolute;
  left: 58px; top: 30px;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  margin: 0;
  color: #22a06b;
  font-size: 11px;
}
.chat-online i {
  width: 6px; height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* 消息时间线 */
.chat-timeline {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px 12px;
  background: #f7f9fc;
}
.chat-date {
  margin: 2px 0 12px;
  font-size: 11px;
  color: #a0a4ab;
  text-align: center;
}
.chat-msg {
  display: -webkit-flex; display: flex;
  -webkit-align-items: flex-start; align-items: flex-start;
  margin-bottom: 12px;
}
.chat-bubble {
  position: relative;
  max-width: 76%;
  padding: 9px 13px;
  border: 1px solid #e4e6e9;
  border-radius: 10px;
  background: #fff;
  color: #3f4a5a;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}
.chat-bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; }
/* 气泡尾巴：内联 SVG（JS 注入 .chat-tail）。
   tail-fill 只填充，tail-line 只描两条曲线（右边不描，
   与气泡描边自然延续，接缝处无分割线） */
.chat-tail {
  position: absolute;
  top: 12px; left: -12px;
  display: block;
  line-height: 0;
}
.chat-tail svg { display: block; }
.chat-tail .tail-fill { fill: #fff; stroke: none; }
.chat-tail .tail-line { fill: none; stroke: #e4e6e9; stroke-width: 1; }
/* 访客消息：右侧蓝底 + 右箭头 */
.chat-msg.visitor { -webkit-flex-direction: row-reverse; flex-direction: row-reverse; }
.chat-msg.visitor .chat-bubble {
  background: #e3f0fc;
  border-color: #cfe5f9;
  color: #2c5a86;
}
.chat-msg.visitor .chat-tail {
  left: auto; right: -12px;
  -webkit-transform: scaleX(-1);
  transform: scaleX(-1);
}
.chat-msg.visitor .chat-tail .tail-fill { fill: #e3f0fc; }
.chat-msg.visitor .chat-tail .tail-line { stroke: #cfe5f9; }
/* 打字中状态 */
.chat-msg.typing .chat-bubble { color: #8b95a3; font-style: normal; }
.chat-typing-dots { display: inline-block; }
.chat-typing-dots i {
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 3px;
  border-radius: 50%;
  background: currentColor;
  animation: chat-dot 1s infinite ease-in-out;
}
.chat-typing-dots i:nth-child(2) { animation-delay: .18s; }
.chat-typing-dots i:nth-child(3) { animation-delay: .36s; margin-right: 0; }
@keyframes chat-dot {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* 快捷提问 */
/* 快捷提问：固定在消息区与输入框之间（不随消息滚动） */
.chat-quick {
  display: -webkit-flex; display: flex;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
  margin: 0 12px;
  padding-top: 6px;
  border-top: 1px dashed #e4e6e9;
}
.chat-quick button {
  margin: 0 5px 4px 0;
  padding: 3px 9px;
  font-size: 11px;
  color: var(--primary-strong);
  background: #fff;
  border: 1px solid #cfe5f9;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.chat-quick button:hover { background: #e3f0fc; border-color: var(--primary); }

/* 输入区：一体式外框包裹输入框与发送按钮（对齐设计稿） */
.chat-composer {
  display: block;
  margin: 4px 12px 12px;
  padding: 0;
  background: #fff;
  border: 1px solid #dde0e5;
  border-radius: 12px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.chat-composer:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0, 103, 192, .14); }
.chat-composer textarea {
  display: block;
  width: 100%;
  height: 62px;
  padding: 10px 12px 4px;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  color: #344960;
  background: transparent;
  border: none;
  border-radius: 12px 12px 0 0;
  resize: none;
  outline: none;
}
.chat-composer-bar {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  padding: 4px 10px 10px;
}
.chat-tools { display: -webkit-flex; display: flex; -webkit-flex: none; flex: none; }
.chat-tool {
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 30px; height: 30px;
  margin-right: 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #7c8694;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.chat-tool:hover { background: var(--primary-soft); color: var(--primary-strong); }
.chat-tool .icon { width: 16px; height: 16px; }
.chat-hint { font-size: 11px; color: #a2a6ad; }
.chat-send {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .18s var(--ease);
}
.chat-send:hover:not(:disabled) { background: var(--primary-strong); }
.chat-send:disabled { background: #e3e5e8; color: #aeb2b9; cursor: default; }

/* 待发送图片预览（选择/粘贴/拖拽进来的截图） */
.chat-attach-preview {
  display: -webkit-flex; display: flex;
  -webkit-flex-wrap: wrap; flex-wrap: wrap;
  padding: 8px 10px 0;
}
.chat-attach-preview[hidden] { display: none; }
.cap-item {
  position: relative;
  -webkit-flex: none; flex: none;
  width: 54px; height: 54px;
  margin: 0 8px 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}
.cap-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cap-item button {
  position: absolute;
  right: 0; top: 0;
  width: 16px; height: 16px;
  padding: 0;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: rgba(23, 32, 46, .62);
  border: none;
  border-radius: 0 0 0 6px;
  cursor: pointer;
}
.cap-item button:hover { background: rgba(23, 32, 46, .85); }

/* 聊天中的图片消息 */
.chat-img {
  display: block;
  max-width: 200px;
  max-height: 150px;
  margin-top: 6px;
  border-radius: 8px;
  cursor: zoom-in;
}

/* 系统状态行（接入中 / 断线提示） */
.chat-sys {
  margin: 4px 0 12px;
  font-size: 11.5px;
  color: #98a0ac;
  text-align: center;
}

/* 悬浮头像涟漪：吸引注意的双环扩散（纯 CSS 动画） */
.cs-side-avatar::before,
.cs-side-avatar::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 100%; height: 100%;
  border: 2px solid rgba(30, 136, 227, .55);
  border-radius: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  -webkit-animation: cs-ripple 2.4s ease-out infinite;
  animation: cs-ripple 2.4s ease-out infinite;
  pointer-events: none;
}
.cs-side-avatar::after { -webkit-animation-delay: 1.2s; animation-delay: 1.2s; }
@-webkit-keyframes cs-ripple {
  0% { -webkit-transform: translate(-50%, -50%) scale(1); opacity: .75; }
  100% { -webkit-transform: translate(-50%, -50%) scale(2); opacity: 0; }
}
@keyframes cs-ripple {
  0% { transform: translate(-50%, -50%) scale(1); opacity: .75; }
  100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* ---------- 聊天图片预览层 ---------- */
.img-viewer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;   /* 不使用 inset 简写 */
  z-index: 400;                            /* 高于聊天窗(250) */
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  background: rgba(9, 15, 26, .84);
  cursor: zoom-out;
  animation: img-viewer-in .18s var(--ease);
}
.img-viewer img {
  max-width: 90vw;
  max-height: 86vh;
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
  cursor: zoom-in;
  -webkit-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
  will-change: transform;
}
.img-viewer img.is-pannable { cursor: grab; }
.img-viewer img.is-dragging { cursor: grabbing; }

/* 缩放控制条 */
.img-viewer-ctrl {
  position: absolute;
  left: 50%; bottom: 26px;
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  padding: 4px;
  background: rgba(16, 24, 38, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
}
.img-viewer-ctrl button {
  min-width: 28px; height: 28px;
  padding: 0 8px;
  font: inherit;
  font-size: 14px;
  color: #fff;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}
.img-viewer-ctrl button:hover { background: rgba(255, 255, 255, .16); }
.img-viewer-ctrl .iv-reset { font-size: 12px; }
.img-viewer-ctrl span {
  min-width: 48px;
  font-size: 12px;
  color: rgba(255, 255, 255, .85);
  text-align: center;
}
.img-viewer-close {
  position: absolute;
  top: 20px; right: 24px;
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 40px; height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
  transition: background-color .18s var(--ease);
}
.img-viewer-close:hover { background: rgba(255, 255, 255, .28); }
.img-viewer-close .icon { width: 20px; height: 20px; }
@keyframes img-viewer-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 右侧中部悬浮：真人客服头像（白色描边圆框 + 在线绿点）+ 联系客服胶囊 */
.cs-side {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 160;                        /* 高于页头(100)，低于弹窗遮罩(220) */
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  -webkit-align-items: center; align-items: center;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: transform .2s var(--ease);
}
.cs-side-avatar {
  position: relative;
  display: block;
  width: 58px; height: 58px;
  padding: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 90, 158, .35);
}
.cs-side-avatar img {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;   /* Chrome 31+ */
}
.cs-side-avatar i {
  position: absolute;
  right: 0; bottom: 1px;
  width: 13px; height: 13px;
  border: 2.5px solid #fff;
  border-radius: 50%;
  background: #22c55e;
}
.cs-side-label {
  margin-top: 8px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: #fff;
  background: linear-gradient(180deg, #1e88e3, #005a9e);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 90, 158, .3);
}
.cs-side:hover { transform: translateY(-50%) scale(1.07); }

/* 最小化后的悬浮按钮：渐变圆钮 + 对话气泡 + 在线绿点 + 呼吸光晕 */
.chat-fab {
  position: fixed;
  right: 28px; bottom: 28px;
  z-index: 240;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 58px; height: 58px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e88e3, #005a9e);
  color: #fff;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  animation: chat-in .2s var(--ease), fab-pulse 2.6s 1.2s ease-in-out infinite;
}
.chat-fab svg { width: 27px; height: 27px; }
.chat-fab::after {
  /* 在线状态绿点 */
  content: "";
  position: absolute;
  right: 2px; top: 3px;
  width: 13px; height: 13px;
  border: 2.5px solid #fff;
  border-radius: 50%;
  background: #22c55e;
}
.chat-fab:hover { transform: translateY(-3px) scale(1.07); }
@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(0, 103, 192, .4), 0 0 0 0 rgba(30, 136, 227, .45); }
  50% { box-shadow: 0 12px 30px rgba(0, 103, 192, .5), 0 0 0 12px rgba(30, 136, 227, 0); }
}

/* ---------- 购买动态气泡（常驻 2 条，左上角导航下方） ---------- */
.social-proof-stack {
  position: fixed;
  left: 20px;
  top: 116px;                          /* 促销条+页头(约98px)下方，避开顶部导航 */
  z-index: 150;                        /* 低于模态遮罩(220)，高于页头(100) */
  display: grid;
  gap: 10px;                           /* grid gap：Chrome 66+ 原生支持 */
  pointer-events: none;
}

.social-proof {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  max-width: 380px;
  padding: 8px 20px 8px 8px;
  /* 半透明毛玻璃底：backdrop-filter 需双前缀（Chrome 76+ 原生支持） */
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(223, 228, 238, .85);
  border-radius: 999px;
  box-shadow: var(--shadow-2);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  opacity: 0;
  transform: translateY(18px) scale(.96);
  transform-origin: left bottom;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.social-proof.is-show { opacity: 1; transform: translateY(0) scale(1); }

.sp-avatar {
  position: relative;
  display: -webkit-inline-flex; display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  width: 40px; height: 40px;
  margin-right: 12px;
  border-radius: 50%;
  background: #0067c0;
  color: rgba(255, 255, 255, .95);
  -webkit-flex: none; flex: none;
}
.sp-avatar svg { width: 24px; height: 24px; }
.sp-dot {
  position: absolute;
  right: 0; bottom: 1px;
  width: 11px; height: 11px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #0f7b3f;
}
.sp-text { min-width: 0; }
.sp-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
.sp-text span { display: block; font-size: 12.5px; color: var(--text-2); line-height: 1.4; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  left: 50%; bottom: 34px;
  z-index: 300;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  margin-top: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: rgba(24, 30, 46, .92);
  border-radius: 999px;
  box-shadow: var(--shadow-2);
  animation: toast-in .3s var(--ease);
}
.toast.is-out { animation: toast-out .25s var(--ease) forwards; }
.toast-ico { width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; background: var(--accent); }
.toast.ok .toast-ico { background: #6ccb8f; }
.toast.err .toast-ico { background: #ff6b6e; }
@keyframes toast-in {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes toast-out {
  to { transform: translateY(8px); opacity: 0; }
}

/* ---------- 滚动显现（JS 存在时才启用初始隐藏） ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in:nth-child(2) { transition-delay: .08s; }
.reveal.is-in:nth-child(3) { transition-delay: .16s; }
.reveal.is-in:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) { /* Chrome 74+ */
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* 打印时隐藏交互组件 */
@media print {
  .promo-bar, .site-header, .hero-visual, .shop-toolbar, .toast-wrap,
  .social-proof, .modal-mask { display: none; }
}
