/* 官网首页样式。legal.html / privacy.html 仍用 custom.css + Tailwind，不走这里 */

:root {
  --bg: #FAF9F5;
  --bg-tinted: #F2F0E8;
  --surface: #FFFFFF;
  --text: #1F1E1D;
  --muted: #65625C;
  --faint: #8C8880;
  --border: rgba(31, 30, 29, 0.10);
  --accent: #C4623F;
  --accent-hover: #AE5434;
  --accent-soft: rgba(196, 98, 63, 0.10);
  --menubar: #ECECEC;
  --shadow: 0 1px 2px rgba(31, 30, 29, 0.04), 0 8px 24px rgba(31, 30, 29, 0.06);

  --green: #34C759;
  --purple: #B450F0;
  --warn-tint: rgba(255, 149, 0, 0.08);
  --plot-line: rgba(31, 30, 29, 0.08);
  --plot-frame: rgba(31, 30, 29, 0.16);
  --plot-diagonal: rgba(31, 30, 29, 0.45);

  --radius: 14px;
  --wrap: 1080px;
  --gutter: 24px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1918;
    --bg-tinted: #211F1D;
    --surface: #262422;
    --text: #F1EFE8;
    --muted: #A8A49B;
    --faint: #85817A;
    --border: rgba(255, 255, 255, 0.09);
    --accent: #DB7A57;
    --accent-hover: #E68D6C;
    --accent-soft: rgba(219, 122, 87, 0.14);
    --menubar: #D9D9D9;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);

    --green: #30D158;
    --purple: #BF5AF2;
    --warn-tint: rgba(255, 159, 10, 0.10);
    --plot-line: rgba(255, 255, 255, 0.07);
    --plot-frame: rgba(255, 255, 255, 0.16);
    --plot-diagonal: rgba(255, 255, 255, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif; }
body:lang(ko) { font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; }
body:lang(zh-CN) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
body:lang(zh-TW) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }

h1, h2, .lead, .section-head p { text-wrap: balance; }
/* 日文按词组断行，避免把一个词拆到两行（Chromium 支持，其他浏览器照常断行） */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .lead, :lang(ja) .section-head p { word-break: auto-phrase; }
/* 中文标题、副标题优先在空格和标点处断行，不把「用量」这样的词拆开；窄屏放不下时 break-word 兜底，避免横向溢出 */
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) .lead, :lang(zh) .meta { word-break: keep-all; overflow-wrap: break-word; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 650; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* 导航 */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 17px; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 6px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }

.lang-menu { position: relative; font-size: 15px; }
.lang-menu summary {
  display: flex; align-items: center; gap: 6px;
  list-style: none; cursor: pointer; color: var(--muted);
  padding: 6px 10px; border-radius: 8px;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--text); background: var(--accent-soft); }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 160px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow);
}
.lang-menu li a { display: block; padding: 7px 12px; border-radius: 7px; color: var(--text); }
.lang-menu li a:hover { background: var(--accent-soft); }
.lang-menu li a[aria-current] { color: var(--accent); font-weight: 600; }

/* 首屏 */
.hero { padding: 88px 0 72px; text-align: center; }
.badge {
  display: inline-block; margin-bottom: 28px; padding: 5px 14px;
  font-size: 14px; font-weight: 550; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px;
}
.hero h1 {
  max-width: 820px; margin: 0 auto;
  font-size: clamp(38px, 6vw, 64px); letter-spacing: -0.025em; font-weight: 700;
}
.lead { max-width: 620px; margin: 22px auto 0; font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.meta { margin-top: 18px; font-size: 14px; color: var(--faint); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: 12px;
  font-size: 16px; font-weight: 600; transition: background-color .15s, border-color .15s, transform .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn-secondary { color: var(--text); border: 1px solid var(--border); background: var(--surface); }
.btn-secondary:hover { color: var(--text); border-color: var(--faint); }

.hero-shot { margin-top: 64px; }
.hero-shot img { margin: 0 auto; width: 100%; max-width: 950px; }

/* 通用版块 */
.section { padding: 96px 0; }
.section-tinted { background: var(--bg-tinted); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 18px; }

/* 亮点 */
.spotlight {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.spotlight + .spotlight { margin-top: 88px; }
.spotlight-reverse .spotlight-text { order: 2; }
.spotlight-text h3 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.015em; }
.spotlight-text p { margin-top: 16px; color: var(--muted); }
.spotlight-visual {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
}

.pace svg { width: 100%; height: auto; display: block; font-family: inherit; }
.pace-ahead { fill: var(--warn-tint); }
.pace-grid line { stroke: var(--plot-line); stroke-width: 1; }
.pace-frame { fill: none; stroke: var(--plot-frame); stroke-width: 1; }
.pace-diagonal { stroke: var(--plot-diagonal); stroke-width: 1.5; stroke-dasharray: 1.5 4; stroke-linecap: round; }
.pace-region { fill: var(--faint); font-size: 12px; font-weight: 550; }
.pace-axis { fill: var(--muted); font-size: 12px; }
.dot-5h { fill: var(--green); }
.dot-7d { fill: var(--purple); }
.dot-label { fill: var(--text); font-size: 13px; font-weight: 600; }

/* 菜单栏图标取自浅色菜单栏截图，数字是深色的，所以底板在深色模式下也保持浅色 */
.bar-strip {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 14px 16px 10px; background: var(--menubar); border-radius: 10px;
}
.bar-strip figure { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.bar-strip figcaption { font-size: 12px; color: #55524D; text-align: center; line-height: 1.3; }
.bar-mono { display: flex; gap: 12px; margin-top: 16px; }
.bar-mono img { flex: 1; min-width: 0; width: 50%; border-radius: 8px; }
.bar-caption { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* 功能列表 */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 48px; }
.features svg {
  width: 26px; height: 26px; margin-bottom: 14px;
  fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.features h3, .privacy h3, .steps h3 { font-size: 18px; }
.features p, .privacy p, .steps p { margin-top: 8px; color: var(--muted); font-size: 16px; }

/* 隐私 */
.privacy { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 880px; margin: 0 auto; }
.privacy li {
  padding: 26px 28px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.more { margin-top: 32px; text-align: center; font-size: 16px; font-weight: 550; }

/* 下载 */
.actions-center { margin-top: 0; }
.steps {
  counter-reset: step;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px;
}
.steps li {
  counter-increment: step; padding: 26px 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-bottom: 14px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 15px;
}
.note { max-width: 680px; margin: 36px auto 0; text-align: center; color: var(--muted); font-size: 15px; }

/* 页脚 */
.footer { padding: 64px 0 40px; border-top: 1px solid var(--border); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { margin-top: 12px; color: var(--muted); max-width: 280px; }
.footer h4 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer li + li { margin-top: 8px; }
.footer li a { color: var(--muted); }
.footer li a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--faint); font-size: 13px;
}

/* 窄屏 */
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; }
  .footer li, .footer h4 { overflow-wrap: break-word; hyphens: auto; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .nav-links { display: none; }
  .lang-menu { margin-left: auto; }
  .hero { padding: 56px 0 48px; }
  .hero-shot { margin-top: 44px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
  .spotlight { grid-template-columns: 1fr; gap: 28px; }
  .spotlight-reverse .spotlight-text { order: 0; }
  .spotlight + .spotlight { margin-top: 64px; }
  .spotlight-visual { padding: 18px; }
  .features { grid-template-columns: 1fr; gap: 32px; }
  .privacy { grid-template-columns: 1fr; }
  .bar-strip { padding: 12px 8px 8px; gap: 4px; }
  .bar-strip figcaption { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
