:root {
  --serif: 'Songti SC', 'STSong', 'Noto Serif CJK SC', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Segoe UI', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px;
}
/* 三套主题的色板取自 App 的 tokens.css */
[data-motif='sandglass'] { --bg: #ebe3d3; --surface: #fffcf6; --ink: #2a2219; --muted: #605241; --line: rgba(42,34,25,.14); --accent: #b0602a; --on-accent: #fffaf2; --display: var(--serif); }
[data-motif='tide'] { --bg: #e4eeed; --surface: #ffffff; --ink: #0e2a2e; --muted: #44605f; --line: rgba(14,42,46,.14); --accent: #13807d; --on-accent: #ffffff; --display: var(--sans); }
[data-motif='meridian'] { --bg: #0a0c19; --surface: #12162c; --ink: #e7e9f6; --muted: #9aa0c6; --line: rgba(231,233,246,.14); --accent: #aab6ff; --on-accent: #0a0c19; --display: var(--mono); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.7; transition: background .5s ease, color .5s ease; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

header { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
nav { margin-left: auto; display: flex; gap: 22px; font-size: 14px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--ink); }

.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1fr; gap: 40px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .18em; color: var(--accent); text-transform: uppercase; }
h1 { font-family: var(--display); font-size: clamp(56px, 9vw, 104px); line-height: 1; margin: 14px 0 18px; letter-spacing: -.01em; }
h1 small { font-family: var(--sans); font-weight: 300; font-size: .42em; color: var(--muted); margin-left: .25em; letter-spacing: 0; }
.lead { font-size: clamp(18px, 2.2vw, 22px); max-width: 34em; margin: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 15px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border: 1px solid var(--line); }
.note { font-size: 13px; color: var(--muted); }

.stage { position: relative; }
.switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 18px; }
.switch button { all: unset; cursor: pointer; padding: 6px 16px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.switch button[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); }
.switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.screen { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0,0,0,.35); aspect-ratio: 16 / 10; background: var(--surface); }
.screen img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.theme-caption { margin-top: 12px; font-size: 14px; color: var(--muted); }

section { padding: 72px 0; border-top: 1px solid var(--line); }
h2 { font-family: var(--display); font-size: clamp(28px, 4vw, 40px); line-height: 1.2; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 32px; max-width: 40em; }

.concept { display: grid; grid-template-columns: max-content 1fr; gap: 6px 28px; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.concept .k { font-weight: 600; white-space: nowrap; }
.concept .k.l1 { padding-left: 1em; color: var(--accent); }
.concept .k.l2 { padding-left: 2.6em; color: var(--accent); }
.concept span:not(.k) { color: var(--muted); }
.concept .gap { grid-column: 1 / -1; height: 1px; background: var(--line); margin: 8px 0; }

.feature { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; margin-bottom: 64px; }
.feature:last-child { margin-bottom: 0; }
.feature h3 { font-size: 22px; margin: 0 0 8px; }
.feature p, .feature li { color: var(--muted); }
.feature ul { padding-left: 1.1em; margin: 0; }
.feature img { border-radius: var(--radius); border: 1px solid var(--line); }
@media (min-width: 900px) {
  .feature { grid-template-columns: 5fr 7fr; gap: 48px; }
  .feature.flip { grid-template-columns: 7fr 5fr; }
  .feature.flip > :first-child { order: 2; }
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

ol.steps { padding-left: 1.2em; }
ol.steps li { margin-bottom: 12px; }
code, pre { font-family: var(--mono); }
pre { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; overflow-x: auto; font-size: 14px; }

.log h3 { margin: 0 0 4px; font-size: 18px; }
.log ul { color: var(--muted); }

footer { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 640px) { nav a:not(.gh) { display: none; } .hero { padding-top: 48px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- v2.1：主题开关、节奏、短片、主题对比、清单、下载、指南 ---------- */
header .switch-sm { margin: 0 0 0 8px; padding: 3px; }
header .switch-sm button { padding: 3px 10px; font-size: 13px; }
.theme-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.theme-caption .hint { font-size: 13px; opacity: .8; }
img[data-shot], #shot { transition: opacity .3s ease; }

.rhythm { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; counter-reset: r; }
.rhythm li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 20px; position: relative; }
.rhythm li::before { counter-increment: r; content: '0' counter(r); font-family: var(--mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 6px; letter-spacing: .1em; }
.rhythm b { display: block; font-size: 17px; margin-bottom: 4px; font-family: var(--display); }
.rhythm span { color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--accent); margin-bottom: 6px; }
.feature b { color: var(--ink); }

.clip { margin: -24px 0 64px; }
.clip video { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: 0 24px 48px -32px rgba(0,0,0,.35); }
.clip figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.clip-row { display: grid; grid-template-columns: 1fr; gap: 24px; margin: -24px 0 64px; align-items: start; }
.clip-row .clip { margin: 0; }
section .wrap > .clip-row:first-of-type:not(:first-child) { margin-top: 0; }
@media (min-width: 900px) { .clip-row { grid-template-columns: 1fr 1fr; } }
#themes .clip, section:not(#features) .clip-row { margin-top: 0; margin-bottom: 32px; }

.theme-table { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
.tt-row { display: grid; grid-template-columns: 110px repeat(3, minmax(180px, 1fr)); gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 15px; align-items: center; min-width: 680px; }
.tt-row:first-child { border-top: 0; }
.tt-head { font-weight: 600; }
.tt-row [role='rowheader'] { color: var(--muted); font-size: 14px; }
.sw { display: inline-block; width: 16px; height: 16px; border-radius: 5px; background: var(--c); border: 1px solid var(--line); margin-right: 4px; vertical-align: -3px; }

.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.checklist > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.checklist h3 { margin: 0 0 8px; font-size: 17px; font-family: var(--display); }
.checklist ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: 14.5px; }
.checklist li { margin: 3px 0; }

.install { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 900px) { .install { grid-template-columns: 7fr 4fr; align-items: start; } }
.req ul { padding-left: 1.1em; color: var(--muted); margin: 0 0 12px; }
.req .btn { margin-top: 4px; }

/* 指南页 */
.guide { display: grid; grid-template-columns: 1fr; gap: 32px; padding: 48px 0 72px; }
@media (min-width: 900px) { .guide { grid-template-columns: 220px 1fr; gap: 56px; } }
.g-toc { position: sticky; top: 84px; align-self: start; }
.g-toc ol { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 2px; }
.g-toc a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 14.5px; }
.g-toc a:hover { background: var(--surface); color: var(--ink); }
@media (max-width: 899px) { .g-toc { position: static; } .g-toc ol { flex-direction: row; flex-wrap: wrap; } }
.g-title { font-size: clamp(40px, 6vw, 64px); margin: 0 0 8px; }
.g-sec { padding: 32px 0; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.g-sec h2 { font-size: 28px; }
.g-sec p, .g-sec li { color: var(--muted); }
.g-sec strong { color: var(--ink); }
.g-sec ul, .g-sec ol { padding-left: 1.2em; }
.g-sec li { margin: 6px 0; }
.g-sec table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 15px; }
.g-sec th, .g-sec td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); }
.g-sec th { border-top: 0; }
.g-sec code { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: .9em; }
.g-sec pre code { border: 0; padding: 0; background: none; }
nav a[aria-current='page'] { color: var(--ink); }
.install > *, .feature > *, .clip-row > * { min-width: 0; }
.brand { white-space: nowrap; }
@media (max-width: 640px) { .brand { font-size: 15px; } header .wrap { gap: 10px; } code { word-break: break-all; } }

/* 更新日志页：沿用指南页的两栏，左侧版本目录带日期，正文每个版本一节 */
.cl-toc ol { max-height: calc(100vh - 140px); overflow-y: auto; }
.cl-toc a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cl-toc time { font-variant-numeric: tabular-nums; font-size: 12.5px; opacity: .75; }
.cl-sec h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.cl-sec h2 a { color: inherit; text-decoration: none; }
.cl-sec h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cl-latest { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); letter-spacing: .04em; }
.cl-meta { display: flex; gap: 12px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.cl-sec h3 { font-size: 17px; margin: 20px 0 6px; }
@media (max-width: 899px) { .cl-toc ol { max-height: none; } .cl-toc time { display: none; } }
