/* Health Mix 官网样式：设计 token、换肤/换外观、产品页与隐私政策页。
   产品页与隐私政策页共用本文件，改动配色或排版只改这里。

   两套可切换维度，与应用内「设置 → 外观 / 换肤」一一对应：
     data-theme  light | dark      由 site-theme.js 按偏好或系统解析后写入
     data-skin   blue | teal | wechat | violet
   默认主题色是海蓝绿（应用图标与分享卡片用的就是这一档），另外三档与应用完全同名。
   注意：正文色用 --accent-strong，填充色用 --accent——系统色直接当正文会偏亮。 */

:root {
  color-scheme: light;
  --bg: #f3f8f6;
  --paper: #fff;
  --ink: #10201d;
  --muted: #5c6e69;
  --line: #dde8e4;
  --card: #e9f2ee;
  --soft: #e0f3ed;
  --band: #10201d;
  --band-ink: #eef6f3;
  --band-muted: #a9bdb7;
  --band-line: #2c3f39;
  --radius: 24px;
  --shadow: 0 24px 65px #0e2b2422;
}

/* 主题色：与应用 app_skin 的四档同名同色系。 */
[data-skin="blue"]   { --accent: #0a72d8; --accent-strong: #0859a8; --accent-soft: #e4effb; }
[data-skin="teal"]   { --accent: #0d8f78; --accent-strong: #0a6f5d; --accent-soft: #dff2ee; }
[data-skin="wechat"] { --accent: #07a355; --accent-strong: #068245; --accent-soft: #e1f4e9; }
[data-skin="violet"] { --accent: #8a4fd0; --accent-strong: #6d3cad; --accent-soft: #f0e8fb; }

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1413;
  --paper: #16201e;
  --ink: #eaf3f0;
  --muted: #9cb0aa;
  --line: #26332f;
  --card: #18241f;
  --soft: #15261f;
  --band: #0a100f;
  --band-ink: #eaf3f0;
  --band-muted: #93a7a1;
  --band-line: #24322e;
  --shadow: 0 24px 65px #00000055;
}
[data-theme="dark"][data-skin="blue"]   { --accent: #4c9dfb; --accent-strong: #7cb8ff; --accent-soft: #14263c; }
[data-theme="dark"][data-skin="teal"]   { --accent: #2bbfa2; --accent-strong: #56d6ba; --accent-soft: #122c27; }
[data-theme="dark"][data-skin="wechat"] { --accent: #26c06f; --accent-strong: #5bd695; --accent-soft: #12291d; }
[data-theme="dark"][data-skin="violet"] { --accent: #b183ea; --accent-strong: #c9a6f5; --accent-soft: #241a35; }

* { 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;
  transition: background-color .18s ease, color .18s ease;
}

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

a:focus-visible,
summary:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.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-strong);
  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: 26px; font-size: 14px; color: var(--muted); }
.nav a { text-decoration: none; }
.nav a:hover,
.footer a:hover { color: var(--accent-strong); }

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

.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; flex-wrap: wrap; align-items: center; gap: 20px; }

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

.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;
}
[data-theme="dark"] .primary { color: #08110f; }
.primary:hover { background: var(--accent-strong); }

.ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.text-link { font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }
.text-link:hover { color: var(--accent-strong); }

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

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

.product section { padding: 84px 0; }

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

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

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

h3 { letter-spacing: -0.025em; }

.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: 340px; }

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

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

.hero {
  position: relative;
  overflow-x: clip;
  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-strong);
  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: 500px; 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, var(--accent-soft), transparent 70%);
  z-index: 0;
}

.pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(340px, 88%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) translateX(-3%);
  pointer-events: none;
}
.pulse i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: pulse 4.4s cubic-bezier(.22, .61, .36, 1) infinite;
}
.pulse i:nth-child(2) { animation-delay: 1.1s; }
.pulse i:nth-child(3) { animation-delay: 2.2s; }
.pulse i:nth-child(4) { animation-delay: 3.3s; }

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

.hero-phone {
  position: relative;
  width: 258px;
  margin: 0 74px 0 0;
  box-shadow: var(--shadow);
  border-radius: 32px;
  overflow: hidden;
  border: 5px solid #222;
  z-index: 1;
}
.hero-watch {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: 170px;
  margin: 0;
  filter: drop-shadow(0 14px 20px #10201d26);
  z-index: 2;
}
.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; }

/* ---------- 指标清单 ---------- */

.metric-groups { display: grid; gap: 26px; }
.metric-group { border-top: 1px solid var(--line); padding-top: 22px; }
.metric-group h3 { font-size: 17px; margin: 0 0 14px; display: flex; align-items: baseline; gap: 10px; }
.metric-group h3 small { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.metric-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 9px 14px; margin: 0; padding: 0; }
.metric-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font-size: 13px;
}
.metric-list li:before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.metric-list li.computed:before { background: transparent; border: 2px solid var(--accent); }
.metric-note { font-size: 12px; color: var(--muted); margin: 22px 0 0; }

/* ---------- 截图 ---------- */

.screens--widgets { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.screens--widgets .screen-card { padding: 22px 16px 18px; }
.screens--widgets .screen-card figcaption { padding-top: 18px; }
.screens--widgets .screen-card h3 { font-size: 16px; }
.screens--widgets .screen-card p { font-size: 13px; }

.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
/* 四张一行的界面预览：卡片收窄一档，图与文案都还能读。 */
.screens--four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.screens--four .screen-card { padding: 22px 18px 18px; }
.screens--four .screen-card figcaption { padding-top: 18px; }
.screens--four .screen-card h3 { font-size: 16px; }
.screens--four .screen-card p { font-size: 13px; }

.screen-card {
  margin: 0;
  padding: 29px 24px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.screen-card > a,
.screen-card > img {
  display: block;
  max-width: 236px;
  margin: auto;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 12px 25px #10201d14;
}
.screen-card > a { cursor: zoom-in; }
.screen-card > img { width: 100%; }
.screen-card figcaption { padding-top: 24px; }
.screen-card h3 { font-size: 18px; margin: 0 0 5px; }
.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(--accent-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; }

/* ---------- 算法卡片 ---------- */

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

.algorithm {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}
.algorithm h3 { font-size: 19px; margin: 0 0 4px; }
.algorithm .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 12px;
}
.algorithm p { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.algorithm p:last-child { margin-bottom: 0; }
.algorithm ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.algorithm li { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: 7px; }
.algorithm li:last-child { border-bottom: 0; padding-bottom: 0; }
.algorithm li b { color: var(--ink); font-weight: 650; }

.algorithm-note {
  margin: 22px 0 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 14px 14px 0;
  font-size: 13px;
  color: var(--ink);
}

/* ---------- 换肤 ---------- */

.skins { margin-top: 20px; }
/* 选择器与四张对照图分两行：四张图并排才读得出「同一界面换配色」，
   两列布局会把第 4 张挤到第二行并放大，看着像漏排了一张。 */
.skin-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; margin-bottom: 28px; }

.skin-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding: 0; border: 0; }
.skin-picker legend { padding: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); margin-right: 6px; }
.skin-intro p { margin: 0; max-width: 620px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.skin-choice {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.skin-choice:hover { border-color: var(--accent); }
.skin-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.skin-choice i { width: 15px; height: 15px; border-radius: 50%; flex: none; }
.skin-choice[data-skin-choice="blue"] i   { background: #0a72d8; }
.skin-choice[data-skin-choice="teal"] i   { background: #0d8f78; }
.skin-choice[data-skin-choice="wechat"] i { background: #07a355; }
.skin-choice[data-skin-choice="violet"] i { background: #8a4fd0; }

.skin-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.skin-figure { margin: 0; text-align: center; }
.skin-figure img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.skin-figure figcaption { font-size: 12px; color: var(--muted); margin-top: 10px; }
.skin-figure[hidden] { display: none !important; }

/* ---------- 数据留在设备（深色带） ---------- */

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

.checklist { list-style: none; display: grid; gap: 12px; margin: 25px 0 0; padding: 0; }
.checklist li { display: flex; gap: 13px; color: var(--band-muted); font-size: 14px; }
.checklist strong { min-width: 118px; color: var(--band-ink); font-weight: 600; }

.band-status {
  font-size: 12px;
  color: var(--band-muted);
  border-top: 1px solid var(--band-line);
  padding-top: 20px;
  margin-top: 26px;
}
.band a { color: var(--accent); text-underline-offset: 4px; }

/* 深色带里的截图：应用是深色界面时用整机图，浅色界面用圆角卡片。
   两张图的原始比例不同（手机 560×667、手表 368×405），底部对齐才能让图注落在同一行。 */
.band-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; align-items: end; }
.band-figures figure { margin: 0; }
.band-figures img { width: 100%; border-radius: 20px; }
.band-figures figcaption { text-align: center; color: var(--band-muted); font-size: 12px; margin-top: 13px; }
.band-figures figcaption b { display: block; color: var(--band-ink); font-weight: 600; }

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

.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-strong); 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; margin: 0 0 11px; }
.download > p { font-size: 14px; color: var(--muted); margin: 0 0 24px; }
.download-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(292px, 1fr)); gap: 34px; align-items: start; }
.download-group { min-width: 0; }
.download-platform { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; 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-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: 24px 0 0; text-align: left; }
.download-group .download-qr img { margin: 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: 640px; }

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

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

.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: 820px; }
.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; }
.faq a { color: var(--accent-strong); text-underline-offset: 4px; }

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

.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-strong); 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: #06100dcc; }
.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: #10201d;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

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

.legal { width: min(800px, 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 h3 { font-size: 16px; margin: 22px 0 6px; 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-strong); text-underline-offset: 3px; }
.legal .meta { font-size: 13px; margin: 0; color: var(--muted); }
.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-footer { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 70px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }

/* ---------- 外观 / 语言切换 ---------- */

/* 首帧门控：目标语言与内联中文不一致时先隐藏正文，避免中文一闪再被替换。
   由 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;
}

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

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

/* 用原生 select：键盘、读屏与移动端选择器都不必自己实现。 */
.langswitch-select,
.themeswitch-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,
.themeswitch-select:hover { border-color: var(--accent); color: var(--accent-strong); }

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

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

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

@media (max-width: 980px) {
  .requirements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skin-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screens--four, .screens--widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

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

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

  .hero { grid-template-columns: 1fr; padding: 46px 0 38px; gap: 30px; }
  h1 { font-size: 46px; 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: 60px 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, .screen-card > img { max-width: 220px; }

  .metric-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
  .metric-list li { padding: 8px 11px; font-size: 12px; }

  .algorithms { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }

  .skin-figures { gap: 10px; }

  .band-inner { grid-template-columns: 1fr; gap: 32px; }
  .band-figures { 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; gap: 14px; }

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

@media (max-width: 430px) {
  .nav { gap: 13px; font-size: 13px; }
}

@media (max-width: 360px) {
  .nav { gap: 11px; 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; }
  .pulse i { animation: none; transform: scale(1); opacity: .28; }
  .pulse i:nth-child(2) { transform: scale(.82); opacity: .18; }
  .pulse i:nth-child(3) { transform: scale(.64); opacity: .1; }
  .pulse i:nth-child(4) { display: none; }
}
