:root {
  /* Header 与 Footer 共用的内容宽度：footer 跟随 header */
  --site-width: 1180px;

  /* 设计 token（与 Guidelines.md 一致） */
  --ink: #141424;
  --ink-strong: #171633;
  --blue: #8b7aff;
  --purple: #8b7aff;
  --violet: #4f409b;
  --purple-deep: #4f409b;
  --sky: #f5f5f7;
  --surface-soft: #f5f5f7;
  --lav: #efedf9;
  --surface-purple: #efedf9;
  --muted: #77778d;
  --subtle: #77778d;
  --line: #ececef;
  --divider: #ececef;
  --yellow: #ffd267;
  --gold: #ffd267;
  --white-70: rgba(255, 255, 255, 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f5f5f7 0%, #f1f1f3 100%);
  color: var(--ink);
  font-family: "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}
a { color: inherit; }

/* ---------- Header（全站共用组件） ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  height: 82px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}
.nav-inner {
  max-width: var(--site-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-nav.is-scrolled {
  background: var(--white-70);
  border-bottom: 1px solid rgba(236, 236, 239, 0.72);
  box-shadow: none;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 21px; font-weight: 600; }
.brand img { display: block; height: 36px; width: auto; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, #8075ff, #4f409b); color: #fff; font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 31px; font-size: 13px; font-weight: 500; color: #4f4f60; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  padding: 12px 22px;
  background: var(--ink-strong);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.menu { display: none; border: 0; background: var(--ink-strong); border-radius: 10px; color: #fff; font-size: 14px; font-weight: 600; padding: 10px 14px; cursor: pointer; }

/* ---------- 文档页紧凑 Header（隐私政策 / 服务条款 / 帮助） ---------- */
.site-nav--doc {
  height: 52px;
  background: var(--white-70);
  border-bottom: 1px solid rgba(236, 236, 239, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.site-nav--doc .brand img { height: 28px; }
.site-nav--doc .nav-links,
.site-nav--doc .menu { display: none !important; }

/* App WebView 嵌入：Flutter 已有返回栏，隐藏 H5 顶栏与页脚 */
body.is-embed .site-nav,
body.is-embed .footer { display: none; }
body.is-embed .page { padding-top: 20px !important; }

/* ---------- Footer（全站共用组件，宽度跟随 header） ---------- */
.footer {
  max-width: var(--site-width);
  margin: auto;
  padding: 25px 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  color: #8d8d9c;
  font-size: 11px;
}
.footer .brand { color: var(--ink); font-size: 16px; }
.footer .brand img { display: block; height: 30px; width: auto; }
.footer .brand-mark { width: 25px; height: 25px; font-size: 13px; border-radius: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer-group { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.footer-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-weight: 600; }

/* ---------- Legal documents (privacy / terms) ---------- */
.legal-doc.page {
  max-width: 780px;
  margin: auto;
  padding: 32px 28px 90px;
}
.legal-body {
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: 24px;
  box-shadow: 0 14px 30px rgba(31, 31, 70, 0.08);
  padding: 32px 34px 38px;
  font-size: 14px;
  color: #4f4f60;
}
.legal-body h1 {
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 16px;
  color: var(--ink);
}
.legal-body h2 {
  font-size: 19px;
  line-height: 1.35;
  margin: 28px 0 12px;
  color: var(--ink);
}
.legal-body h3 {
  font-size: 16px;
  line-height: 1.4;
  margin: 20px 0 10px;
  color: var(--ink-strong);
}
.legal-body p {
  margin: 0 0 12px;
}
.legal-body p:last-child { margin-bottom: 0; }
.legal-meta {
  color: var(--subtle);
  font-size: 13px;
  margin: 0 0 18px !important;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--divider);
}
.legal-meta a {
  color: var(--purple-deep);
  font-weight: 600;
  text-decoration: none;
}
.legal-list {
  margin: 0 0 14px;
  padding-left: 1.25rem;
}
.legal-list li { margin: 0 0 8px; }
.legal-table-wrap {
  overflow-x: auto;
  margin: 14px 0 18px;
  -webkit-overflow-scrolling: touch;
}
.legal-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.55;
}
.legal-table th,
.legal-table td {
  border: 1px solid var(--divider);
  padding: 10px 12px;
  vertical-align: top;
  text-align: left;
}
.legal-table th {
  background: var(--lav);
  color: var(--ink-strong);
  font-weight: 600;
}
.legal-body a {
  color: var(--purple-deep);
  font-weight: 600;
  text-decoration: none;
}
.legal-body a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .legal-doc.page { padding: 24px 20px 60px; }
  .legal-body { padding: 22px 18px 26px; border-radius: 18px; }
  .legal-body h1 { font-size: 24px; }
  .site-nav { height: 70px; }
  .site-nav--doc { height: 48px; }
  .nav-inner { padding: 0 20px; }
  .nav-links {
    display: none;
    position: absolute;
    z-index: 10;
    top: 64px;
    left: 20px;
    right: 20px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--divider);
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(20, 25, 60, 0.12);
    flex-direction: column;
    align-items: stretch;
    gap: 17px;
  }
  .nav-links.open { display: flex; }
  .nav-cta { text-align: center; }
  .menu { display: block; }
  .footer { padding: 22px 20px; display: grid; gap: 11px; justify-items: start; text-align: left; }
  .footer-group { gap: 11px; justify-content: flex-start; }
}
