/* 下载页：手机优先，多数访问来自微信、QQ 里点开的链接。
   色板与首页一致（清灰青柠）；标题用首页同一份自托管字体子集，不加载网络字体。 */

@font-face {
  font-family: "Shimo Serif Web";
  src: url("../assets/fonts/shimo-serif.woff2?v=20261117") format("woff2");
  font-display: swap;
}

:root {
  --bg: #f1f3f0;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-2: #555a56;
  --text-3: #868c87;
  --line: rgba(26, 34, 28, 0.1);
  --accent: #1a1a1a;
  --accent-ink: #ffffff;
  --accent-soft: #eafccb;
  --hint-bg: #1a1a1a;
  --hint-text: #ffffff;
  --serif: "Shimo Serif Web", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Helvetica Neue", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d110e;
    --surface: #1a211c;
    --text: #f3f5f2;
    --text-2: #c3c9c4;
    --text-3: #7b837c;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #bbff38;
    --accent-ink: #0d110e;
    --accent-soft: #303c1d;
    --hint-bg: #f3f5f2;
    --hint-text: #0d110e;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.page {
  max-width: 440px;
  margin: 0 auto;
  padding: calc(56px + env(safe-area-inset-top)) 20px calc(40px + env(safe-area-inset-bottom));
}

body.has-hint .page {
  padding-top: calc(132px + env(safe-area-inset-top));
}

/* ── 题头 ─────────────────────────── */

.masthead {
  text-align: center;
}

.masthead-icon {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 22px;
  box-shadow: 0 0 0 0.5px var(--line), 0 6px 20px rgba(0, 0, 0, 0.08);
}

.masthead h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
}

.masthead-tagline {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 15px;
}

/* ── 下载 ─────────────────────────── */

.get {
  margin-top: 32px;
  text-align: center;
}

.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.primary:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.primary[hidden],
.primary-note[hidden] {
  display: none;
}

.primary-note {
  margin: 12px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

.scan {
  display: none;
  margin: 0;
}

body[data-platform="desktop"] .scan {
  display: block;
}

.scan img {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 0 0 0.5px var(--line);
}

.scan figcaption {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 13px;
}

/* ── 能做什么 ─────────────────────── */

.features {
  margin-top: 44px;
  border-top: 0.5px solid var(--line);
}

.feature {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--line);
}

.feature h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}

.feature p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}

/* ── 各系统 ───────────────────────── */

.stores {
  margin-top: 36px;
}

.stores-title {
  margin: 0 0 10px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.store {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0 0 0.5px var(--line);
  text-decoration: none;
}

.store + .store {
  margin-top: 8px;
}

.store.is-current {
  background: var(--accent-soft);
  box-shadow: none;
}

.store-name {
  flex: none;
  font-size: 15px;
  font-weight: 600;
}

.store-where {
  color: var(--text-2);
  font-size: 13px;
  text-align: right;
}

a.store[href]:active {
  opacity: 0.7;
}

/* ── 页脚 ─────────────────────────── */

.colophon {
  margin-top: 40px;
  color: var(--text-3);
  font-size: 12.5px;
  text-align: center;
}

.colophon p {
  margin: 4px 0;
}

.colophon a {
  text-decoration: none;
}

/* ── 内置浏览器提示 ───────────────── */

.browser-hint {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 14px 20px;
  background: var(--hint-bg);
  color: var(--hint-text);
}

.browser-hint[hidden] {
  display: none;
}

.browser-hint p {
  flex: 1;
  margin: 18px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
}

.browser-hint b {
  letter-spacing: 0.1em;
}

.browser-hint-arrow {
  flex: none;
  width: 40px;
  height: 40px;
}

@media (prefers-reduced-motion: reduce) {
  .primary {
    transition: none;
  }
}
