/* AI Link 官网共用样式：设计 token、页面外壳与产品页区块。
   产品页、隐私政策页与 API Key 帮助页共用本文件，帮助页再叠加 ai-link-help.css。
   改动配色或排版时只改这里，不要在各页面内联重复。 */

:root {
  color-scheme: light;
  --bg: #f5f8f6;
  --paper: #fff;
  --ink: #182a24;
  --muted: #5f7068;
  --line: #dce5df;
  --accent: #087b4b;
  --accent-strong: #05633c;
  --soft: #e5f1e9;
  --card: #eaf0ec;
  --dark: #252522;
  --dark-line: #424640;
  --dark-ink: #f6f8f5;
  --dark-muted: #c0c9c1;
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", sans-serif;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 3px solid #399ccb;
  outline-offset: 5px;
}

.wrap { width: min(1140px, calc(100% - 64px)); margin: auto; }

/* 键盘用户跳过导航直达正文。 */
.skip {
  position: absolute;
  top: -70px;
  left: 20px;
  z-index: 5;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  background: var(--paper);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 0; }

/* ---------- 页面外壳 ---------- */

.topbar {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.brand img { width: 42px; height: 42px; border-radius: 12px; }

.nav { display: flex; gap: 30px; font-size: 14px; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover,
.footer a:hover { color: var(--accent); }

.footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 29px 0 38px;
  color: var(--muted);
  font-size: 12px;
}
.footer a { text-decoration: none; }
.footer-links { display: flex; gap: 24px; }

/* ---------- 按钮 ---------- */

.primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 650;
  font-size: 15px;
}
.primary:hover { background: var(--accent-strong); }

.text-link { font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 17px 24px; }

/* ---------- 通用排版 ---------- */

/* 区块间距只作用于产品页；帮助页的 <section> 自带排版，不能套用。 */
.product section { padding: 88px 0; }

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--accent);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(42px, 5.4vw, 66px);
  line-height: 1.17;
  letter-spacing: -0.055em;
  margin: 22px 0 25px;
  font-weight: 750;
  text-wrap: balance;
}
h1 span { color: var(--accent); }

h2 {
  font-size: clamp(30px, 3.5vw, 43px);
  line-height: 1.3;
  letter-spacing: -0.045em;
  margin: 0;
  font-weight: 710;
  text-wrap: balance;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 36px;
  margin-bottom: 36px;
}
.section-head p { color: var(--muted); font-size: 14px; margin: 0; max-width: 330px; }

.number {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  display: block;
  margin-bottom: 12px;
}

/* ---------- 限免活动 ---------- */

.campaign {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  margin-top: 20px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--soft);
}
.campaign .kicker { margin: 0; }
.campaign h2 { font-size: clamp(16px, 2vw, 20px); line-height: 1.35; flex: 1 1 16em; }
.campaign-dates { margin: 0; font-size: 14px; font-weight: 650; }
.campaign-detail { display: none; }
.campaign .text-link { white-space: nowrap; }

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  /* 波纹环放大后会超出首屏盒，横向裁掉以免产生横向滚动；纵向保持可见。 */
  overflow-x: clip;
  overflow-y: visible;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 5vw;
  padding: 36px 0 48px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.hero-copy > p { max-width: 480px; font-size: 18px; color: var(--muted); margin: 0 0 28px; text-wrap: balance; }
.platforms { font-size: 14px; color: var(--ink); margin-top: 14px; font-weight: 600; }

.hero-art {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art:before {
  content: "";
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #d4eadb, transparent 70%);
  z-index: 0;
}

/* 语音波纹：从手机背后向外扩散的同心环，呼应「按住说话」。
   尺寸用 min() 跟随容器，窄屏收缩而不是溢出成横向滚动。 */
.ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(340px, 88%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) translateX(-3%);
  pointer-events: none;
}
.ripple i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: ripple 4.4s cubic-bezier(.22, .61, .36, 1) infinite;
}
.ripple i:nth-child(2) { animation-delay: 1.1s; }
.ripple i:nth-child(3) { animation-delay: 2.2s; }
.ripple i:nth-child(4) { animation-delay: 3.3s; }

@keyframes ripple {
  0%   { transform: scale(.6);  opacity: 0; }
  10%  { opacity: .45; }
  55%  { opacity: .16; }
  100% { transform: scale(1.34); opacity: 0; }
}

/* 声波带：首屏底边的一条语音电平，横向铺满内容区，不参与文字排版。
   每根条的高度(--h)、周期(--t)、相位(--ph)都不同，由
   scripts/build_ai_link_waveform.py 确定性生成，避免整齐划一的行波。
   只动 transform 与 opacity，全部落在合成层，不触发重排。 */
.waveform {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 50px;
  display: flex;
  align-items: flex-end;
  gap: clamp(2px, .42vw, 5px);
  overflow: hidden;
  pointer-events: none;
}
.waveform i {
  /* 条宽自适应：条数固定的情况下靠 flex 撑满，不写死宽度。 */
  flex: 1 1 0;
  min-width: 1px;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  /* 仅作若隐若现的背景纹理，不抢正文与设备截图。 */
  opacity: .12;
  transform-origin: 50% 100%;
  transform: scaleY(.14);
  animation: wave var(--t, 2s) ease-in-out infinite;
  animation-delay: calc(var(--t, 2s) * var(--ph, 0) * -1);
}

@keyframes wave {
  0%, 100% { transform: scaleY(.14); }
  50%      { transform: scaleY(var(--h, .8)); }
}

/* 窄屏保留全部条数会细到看不见，按档位裁掉尾部的条；剩下的靠 flex 重新铺满。
   档位按「条宽大致落在 3–5px」选取，缩窗时不会忽然变粗或变糊。 */
@media (max-width: 1000px) { .waveform i:nth-child(n+113) { display: none; } }
@media (max-width: 760px)  { .waveform i:nth-child(n+97)  { display: none; } }
@media (max-width: 560px)  { .waveform i:nth-child(n+77)  { display: none; } }
@media (max-width: 400px)  { .waveform i:nth-child(n+65)  { display: none; } }

.hero-phone {
  position: relative;
  width: 258px;
  margin: 0 74px 0 0;
  box-shadow: 0 24px 65px #1c3f2922;
  border-radius: 32px;
  overflow: hidden;
  border: 5px solid #222;
}
.hero-watch {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: 170px;
  margin: 0;
  filter: drop-shadow(0 14px 20px #18362920);
}
.hero-watch img { border-radius: 24px; }

.art-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 要点条 ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 27px 0;
  color: var(--muted);
  font-size: 13px;
}
.facts strong { display: block; color: var(--ink); font-size: 16px; font-weight: 650; margin-bottom: 3px; }

.reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.reason {
  margin: 0;
  padding: 22px 22px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.reason h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.02em; }
.reason p { margin: 0; color: var(--muted); font-size: 14.5px; }

.support-scroll {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.support-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}
.support-table th,
.support-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.support-table thead th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.support-table tbody th {
  font-weight: 650;
  color: var(--ink);
}
.support-table th:first-child,
.support-table td:first-child { width: 8.5em; }
.support-table tbody td { color: var(--muted); }

/* ---------- 手机截图 ---------- */

.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

.screen-card {
  margin: 0;
  padding: 29px 24px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.screen-card > a {
  display: block;
  max-width: 236px;
  margin: auto;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 12px 25px #172a2414;
  cursor: zoom-in;
}
.screen-card figcaption { padding-top: 24px; }
.screen-card h3 { font-size: 18px; margin: 0 0 5px; letter-spacing: -0.02em; }
.screen-card p { font-size: 14px; color: var(--muted); margin: 0; }

.screenshot-note { font-size: 12px; color: var(--muted); margin: 19px 0 0; }

/* 截图切换是渐进增强：无脚本时原图全部显示；只有初始化成功才显示按钮。 */
.screenshot-switch[hidden], .screenshot-view[hidden] { display: none !important; }
.screenshot-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 4px;
  margin: 0 auto 16px;
  width: fit-content;
  max-width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.screenshot-switch button {
  min-height: 44px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.screenshot-switch button[aria-pressed="true"] { background: var(--soft); color: var(--accent-strong); }
.screenshot-switch button:hover { color: var(--accent-strong); }
/* 桌面三列顶端对齐：聊天卡没有切换按钮，留出同样的操作条高度。 */
@media (min-width: 651px) {
  .screens:has(.screenshot-switch:not([hidden])) .screen-card:not([data-screenshot-gallery])::before {
    content: "";
    display: block;
    height: 70px;
  }
}
.screen-card .screenshot-view + .screenshot-view { margin-top: 16px; }
.screen-card [hidden] + .screenshot-view { margin-top: 0; }
.watch .screenshot-switch { background: transparent; border-color: var(--dark-line); }
.watch .screenshot-switch button { color: var(--dark-muted); }
.watch .screenshot-switch button[aria-pressed="true"] { background: #394b40; color: var(--dark-ink); }
.watch .screenshot-switch button:hover { color: var(--dark-ink); }
.watch-pictures .screenshot-view { display: flex; min-height: 245px; align-items: center; justify-content: center; }
.watch-pictures .screenshot-view img { max-height: 245px; width: auto; max-width: 100%; border-radius: 16px; }
.watch-pictures [data-screenshot-gallery] { display: flex; flex-direction: column; }
.watch-pictures [data-screenshot-gallery] .screenshot-view { flex: 1; }
.watch-pictures [data-screenshot-gallery] figcaption { margin-top: auto; padding-top: 13px; }

/* ---------- 支持的模型服务 ---------- */

.providers {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
  margin-top: 43px;
}
.providers-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 22px;
}
.providers-head h3 { font-size: 17px; margin: 0; letter-spacing: -0.02em; }
.providers-head p { font-size: 13px; color: var(--muted); margin: 0; }
.providers-head a { color: var(--accent); text-underline-offset: 4px; }

.provider-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px 14px;
  margin: 0;
  padding: 0;
}
.provider-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 13px;
  color: var(--ink);
}
/* 图标自带品牌色（含渐变与白色镂空），这里只控制尺寸。 */
.provider-list svg { width: 18px; height: 18px; flex: none; }
.provider-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 功能列表 ---------- */

.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 50px; margin-top: 43px; }
.feature { padding: 26px 0; border-top: 1px solid var(--line); }
.feature h3 { font-size: 20px; margin: 0 0 9px; letter-spacing: -0.025em; }
.feature p { font-size: 15px; color: var(--muted); margin: 0; max-width: 470px; }

/* ---------- 价格与试用 ---------- */

.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 37px; }

.price-card {
  display: flex;
  flex-direction: column;
  padding: 27px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}
.price-card.highlight { border-color: #b9dcc8; background: var(--soft); }
.price-card .platform { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; }
.price-card .amount { font-size: 25px; font-weight: 710; letter-spacing: -0.03em; margin: 0 0 10px; line-height: 1.35; }
.price-card .amount small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 6px; }
.price-card p.detail { font-size: 14px; color: var(--muted); margin: 0; }

.pricing-note { font-size: 12px; color: var(--muted); margin: 19px 0 0; }

/* ---------- 手表区块 ---------- */

.watch { background: var(--dark); color: var(--dark-ink); }
.watch-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px; }
.watch .kicker { color: #a4d3b9; }
.watch-copy > p { color: var(--dark-muted); font-size: 16px; margin: 23px 0; }

.gesture-list { display: grid; gap: 12px; margin: 25px 0; }
.gesture { display: flex; gap: 16px; color: var(--dark-muted); font-size: 14px; }
.gesture strong { min-width: 86px; color: var(--dark-ink); font-weight: 600; }

.watch-pictures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.watch-pictures figure { margin: 0; }
.watch-pictures img { width: 100%; }
.watch-pictures figcaption { text-align: center; color: var(--dark-muted); font-size: 12px; margin-top: 13px; }
.watch-pictures figcaption b { display: block; color: var(--dark-ink); font-weight: 600; }

.watch-status {
  font-size: 12px !important;
  color: #a9b4aa !important;
  border-top: 1px solid var(--dark-line);
  padding-top: 20px;
}

/* ---------- 开始使用 ---------- */

.start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; margin-top: 37px; }
.step { border-top: 1px solid var(--line); padding-top: 23px; }
.step h3 { font-size: 19px; margin: 0 0 8px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }
.step a { color: var(--accent); text-underline-offset: 4px; }

.download { padding: 42px; border-radius: var(--radius); background: var(--soft); margin-top: 0; }
.download h3 { font-size: 25px; line-height: 1.4; letter-spacing: -0.025em; margin: 0 0 11px; }
.download > p { font-size: 14px; color: var(--muted); margin: 0 0 24px; }
.download > .download-desktop-note { margin: 20px 0 0; }
.download-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; align-items: stretch; }
.download-group { display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.download-platform { font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--muted); margin: 0 0 16px; }
.download-group .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.download-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 20px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
.download-meta li { display: flex; gap: 7px; }
.download-meta b { font-weight: 600; color: var(--ink); }

.download-hash { margin-top: 14px; font-size: 12px; color: var(--muted); max-width: 520px; }
.download-hash summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.download-hash p { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 10px 0 0; }
.download-hash b { color: var(--ink); font-weight: 600; }
.download-hash code { font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.download-desktop-note { margin: 14px 0 0; max-width: 42em; font-size: 12px; line-height: 1.5; color: var(--muted); }

.download-qr { margin: 0; text-align: center; }
.download-qr img { width: 132px; height: 132px; margin: auto; padding: 10px; border-radius: 14px; background: #fff; }
.download-qr figcaption { font-size: 12px; color: var(--muted); margin-top: 9px; }

/* 下载卡片内二维码与说明并排，兼顾扫码尺寸与阅读宽度。 */
.download-group .download-qr { display: flex; align-items: center; gap: 14px; margin: auto 0 0; padding-top: 24px; text-align: left; }
.download-group .download-qr img { margin: 0; flex-shrink: 0; }
.download-group .download-qr figcaption { margin: 0; max-width: 180px; }

.release-note { display: block; color: var(--muted); font-size: 12px; margin-top: 19px; max-width: 620px; }

/* ---------- 系统要求 ---------- */

.requirements { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 30px 0 0; padding: 0; }
.requirements li { border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; color: var(--muted); }
.requirements strong { display: block; color: var(--ink); font-size: 15px; font-weight: 650; margin-bottom: 4px; }

/* ---------- 常见问题 ---------- */

.faq { margin-top: 36px; max-width: 800px; }
.faq details { border-bottom: 1px solid var(--line); padding: 19px 0; }
.faq summary { cursor: pointer; font-size: 16px; font-weight: 600; }
.faq p { font-size: 14px; color: var(--muted); margin: 13px 0 3px; }

/* ---------- 隐私小结 ---------- */

.privacy { padding-top: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.privacy p { font-size: 15px; color: var(--muted); margin: 0 0 20px; }
.privacy a { color: var(--accent); text-underline-offset: 5px; }

/* ---------- 截图灯箱 ---------- */

.lightbox {
  width: min(420px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
}
.lightbox::backdrop { background: #101d18cc; }
.lightbox img { border-radius: 14px; }
.lightbox p { font-size: 13px; color: var(--muted); margin: 12px 2px 2px; }
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #ffffffeb;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- 法务页（隐私政策） ---------- */

.legal { width: min(780px, calc(100% - 48px)); margin: 84px auto 70px; }
.legal h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.22; letter-spacing: -0.05em; margin: 0 0 8px; }
.legal h2 { font-size: 21px; line-height: 1.45; margin: 36px 0 9px; font-weight: 650; }
.legal p, .legal li { color: var(--muted); }
.legal p { margin: 9px 0; }
.legal ul { padding-left: 22px; }
.legal li { margin: 8px 0; }
.legal a { color: var(--accent); text-underline-offset: 3px; }
.legal .meta { font-size: 13px; margin: 0; color: #75818a; }
.legal .summary { border-left: 3px solid var(--accent); padding: 12px 0 12px 22px; margin: 36px 0 44px; }
.legal .summary p { margin: 0; color: var(--ink); }
.legal .divider { margin: 90px 0 78px; border: 0; border-top: 1px solid var(--line); }
.legal-footer { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 70px; font-size: 13px; color: var(--muted); }

/* ---------- 界面语言切换 ---------- */

/* 首帧门控：目标语言与内联中文不一致时先隐藏正文，避免中文一闪再被替换。
   由 i18n.js 在 <head> 同步加类，应用译文后移除，另有超时兜底。 */
html.i18n-pending body { visibility: hidden; }

/* 视觉隐藏但仍可被读屏与键盘访问（切换器的可见文字是语言自名）。 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.topbar-end { display: flex; align-items: center; gap: 22px; }

/* 脚本不可用时容器为空，不留占位。 */
[data-lang-switch]:empty { display: none; }

.langswitch-field {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
}

/* 用原生 select：键盘、读屏与移动端选择器都不必自己实现。 */
.langswitch-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  padding: 7px 30px 7px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.langswitch-select:hover { border-color: var(--accent); color: var(--accent-strong); }

.lang-chevron {
  position: absolute;
  right: 10px;
  width: 12px;
  height: 12px;
  pointer-events: none;
}

/* 窄屏顶栏同时放导航与切换器会溢出，切换器改由页脚提供。 */
.langswitch--footer { display: none; }

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .requirements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing { grid-template-columns: 1fr; }
}

@media (max-width: 850px) {
  .wrap { width: calc(100% - 40px); }
  .nav { gap: 20px; }
  .hero { gap: 20px; }
  .hero-art { min-height: 540px; }
  .hero-phone { width: 220px; margin-right: 40px; }
  .hero-watch { width: 135px; bottom: 48px; }
  .watch-inner { gap: 30px; }
  .screen-card { padding: 20px 16px; }
  .privacy { gap: 40px; }
}

@media (max-width: 650px) {
  .topbar { min-height: 75px; }
  .brand { font-size: 21px; }
  .brand img { width: 35px; height: 35px; }
  .nav { gap: 17px; font-size: 13px; }
  .nav .optional, .nav .nav-later { display: none; }
  .langswitch--topbar { display: none; }
  .langswitch--footer { display: inline-flex; }
  .download-group .download-qr img { width: 104px; height: 104px; flex-shrink: 0; }

  .hero { grid-template-columns: 1fr; padding: 48px 0 40px; gap: 30px; }
  h1 { font-size: 48px; margin: 18px 0 22px; }
  .hero-copy > p { font-size: 16px; }
  .hero-art { min-height: 565px; max-width: 350px; width: 100%; margin: auto; }
  .hero-phone { width: 235px; margin-right: 58px; }
  .hero-watch { width: 138px; bottom: 49px; right: 0; }

  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; padding: 24px 0; }
  .section-head { display: block; margin-bottom: 27px; }
  .section-head p { margin-top: 16px; }
  .product section { padding: 62px 0; }

  .screens {
    grid-auto-flow: column;
    grid-auto-columns: 83%;
    grid-template-columns: none;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 16px;
  }
  .screen-card { scroll-snap-align: start; padding: 25px 24px; }
  .screen-card > a { max-width: 220px; }

  .provider-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
  .provider-list li { padding: 8px 10px; font-size: 12px; gap: 8px; }
  .provider-list svg { width: 16px; height: 16px; }
  /* 窄屏放不下长服务名，允许折行而不是截断成「腾讯混元 Toke…」。 */
  .provider-list span { white-space: normal; overflow: visible; }

  .reasons { grid-template-columns: 1fr; }
  .support-table { font-size: 13px; }
  .support-table th,
  .support-table td { padding: 10px 8px; }
  .feature-list { grid-template-columns: 1fr; gap: 0; margin-top: 31px; }
  .feature { padding: 23px 0; }

  .watch-inner { grid-template-columns: 1fr; gap: 32px; }
  .watch-pictures { max-width: 460px; margin: auto; }

  .start { grid-template-columns: 1fr; gap: 25px; margin-top: 28px; }
  .download { padding: 28px 24px; margin-top: 0; }
  .download-body { grid-template-columns: minmax(0, 1fr); gap: 24px; }

  .privacy { grid-template-columns: 1fr; gap: 23px; }
  .footer { display: block; }
  .footer-links { margin-top: 12px; }

  .legal { width: calc(100% - 36px); margin: 56px auto 40px; }
  .legal .divider { margin: 68px 0; }
  .legal .summary { margin: 28px 0 38px; }
}

@media (max-width: 430px) {
  /* 常见手机宽度（390/375）仍要露出「价格」，靠收紧间距而不是隐藏入口。 */
  .nav { gap: 14px; font-size: 13px; }
}

@media (max-width: 360px) {
  .nav { gap: 12px; font-size: 12px; }
  .nav .optional-sm { display: none; }
}

@media (max-width: 400px) {
  .requirements { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* 动效降级：波纹与声波停在静态形态，保留视觉元素但不持续运动。 */
  .ripple i { animation: none; transform: scale(1); opacity: .28; }
  .ripple i:nth-child(2) { transform: scale(.82); opacity: .18; }
  .ripple i:nth-child(3) { transform: scale(.64); opacity: .1; }
  .ripple i:nth-child(4) { display: none; }
  .waveform i { animation: none; transform: scaleY(calc(var(--h, .8) * .55)); }
}
