:root {
  color-scheme: light;
  --surface: oklch(0.985 0.004 255);
  --surface-raised: oklch(1 0 0);
  --surface-sunken: oklch(0.955 0.008 255);
  --text: oklch(0.22 0.02 255);
  --text-muted: oklch(0.46 0.02 255);
  --border: oklch(0.88 0.01 255);
  --border-strong: oklch(0.76 0.015 255);
  --accent: oklch(0.53 0.2 260);
  --accent-hover: oklch(0.47 0.2 260);
  --on-accent: oklch(0.99 0.005 255);
  --accent-soft: oklch(0.94 0.035 260);
  --signal: oklch(0.72 0.16 65);
  --focus: oklch(0.55 0.2 260);

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "MiSans", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, "PingFang SC",
    "Noto Sans SC", system-ui, sans-serif;

  --radius-control: 8px;
  --radius-card: 12px;
  --radius-device: 28px;
  --page: min(1080px, 100% - 2 * max(20px, env(safe-area-inset-left)));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: oklch(0.17 0.012 255);
    --surface-raised: oklch(0.215 0.014 255);
    --surface-sunken: oklch(0.14 0.01 255);
    --text: oklch(0.94 0.006 255);
    --text-muted: oklch(0.72 0.015 255);
    --border: oklch(0.31 0.015 255);
    --border-strong: oklch(0.43 0.02 255);
    --accent: oklch(0.72 0.14 255);
    --accent-hover: oklch(0.78 0.12 255);
    --on-accent: oklch(0.18 0.03 260);
    --accent-soft: oklch(0.27 0.05 260);
    --signal: oklch(0.78 0.14 70);
    --focus: oklch(0.75 0.13 255);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: oklch(0.17 0.012 255);
  --surface-raised: oklch(0.215 0.014 255);
  --surface-sunken: oklch(0.14 0.01 255);
  --text: oklch(0.94 0.006 255);
  --text-muted: oklch(0.72 0.015 255);
  --border: oklch(0.31 0.015 255);
  --border-strong: oklch(0.43 0.02 255);
  --accent: oklch(0.72 0.14 255);
  --accent-hover: oklch(0.78 0.12 255);
  --on-accent: oklch(0.18 0.03 260);
  --accent-soft: oklch(0.27 0.05 260);
  --signal: oklch(0.78 0.14 70);
  --focus: oklch(0.75 0.13 255);
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  overflow-wrap: anywhere;
}

h1, h2, h3 { font-weight: 500; line-height: 1.3; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

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

.skip {
  position: absolute; left: 16px; top: -48px;
  background: var(--surface-raised); padding: 8px 12px; border-radius: var(--radius-control);
  border: 1px solid var(--border-strong); z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { width: var(--page); margin-inline: auto; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 17px;
  min-height: 44px;
}
.brand:hover { color: var(--text); }
.brand, .nowrap { white-space: nowrap; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand span { color: var(--text-muted); font-weight: 400; font-size: 14px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-muted); text-decoration: none; font-size: 15px;
  padding: 10px 12px; border-radius: var(--radius-control); min-height: 44px;
  display: inline-flex; align-items: center;
}
.site-nav a:hover { color: var(--text); background: var(--surface-sunken); }
.site-nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { padding-block: 72px 88px; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 0.87fr) minmax(0, 1.13fr);
  grid-template-areas: "title film" "features film" "status film";
  gap: 0 clamp(28px, 4vw, 56px); align-content: center;
}
.hero h1 { grid-area: title; align-self: end; }
.hero .status-row { grid-area: status; align-self: start; }
.hero h1 { font-size: clamp(34px, 4.2vw, 52px); letter-spacing: -0.01em; line-height: 1.2; }
.hero .lede { margin-top: 20px; font-size: 18px; color: var(--text-muted); max-width: 32em; }
.status-row { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border-strong);
  font-size: 15px; min-height: 44px;
}
.status-pill svg { width: 18px; height: 18px; color: var(--accent); }
.status-row a { font-size: 15px; }

.hero-film {
  grid-area: film; align-self: center; min-width: 0; margin: 0; overflow: hidden;
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: 20px;
}
.hero-film video { display: block; width: 100%; height: auto; aspect-ratio: 6 / 5; background: #cfdae3; }
.film-details { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 14px; padding: 15px 18px; }
.film-chapter { font-weight: 550; }
.film-note, .film-time { font-size: 13px; color: var(--text-muted); }
.film-controls:not([hidden]) { display: flex; align-items: center; gap: 10px; padding: 0 18px 10px 10px; }
.film-toggle {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer;
  border: 0; border-radius: 50%; background: transparent; color: var(--text);
}
.film-toggle:hover { background: var(--surface-sunken); }
.film-toggle svg { width: 17px; height: 17px; fill: currentColor; }
.film-toggle .pause-icon, .film-toggle[data-playing] .play-icon { display: none; }
.film-toggle[data-playing] .pause-icon { display: block; }
.film-controls input { flex: 1; width: 0; min-width: 0; height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.film-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-features { grid-area: features; align-self: center; margin-top: 28px; display: grid; gap: 4px; max-width: 30em; }
.hero-feature {
  font: inherit; color: inherit; text-align: left; background: transparent; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-card);
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 2px 14px; padding: 14px 16px;
}
.hero-feature svg { width: 22px; height: 22px; color: var(--text-muted); grid-row: span 2; margin-top: 2px; }
.hero-feature .hf-title { font-size: 17px; font-weight: 500; }
.hero-feature .hf-desc { font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.hero-feature:hover { background: var(--surface-sunken); }
.hero-feature[aria-current="true"] { background: var(--surface-raised); border-color: var(--border); }
.hero-feature[aria-current="true"] svg { color: var(--accent); }
.hero-feature:disabled { cursor: default; }

/* Sections */
.section { padding-block: 72px; border-top: 1px solid var(--border); }
.section-head { max-width: 36em; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(24px, 3vw, 30px); }
.section-head p { margin-top: 10px; color: var(--text-muted); }

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  counter-reset: step;
}
.steps li { display: grid; gap: 8px; align-content: start; min-width: 0; }
.steps .num {
  font-family: var(--font-display); font-size: 15px; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 18px; }
.steps p { color: var(--text-muted); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 40px 32px; }
.feature { display: grid; gap: 8px; align-content: start; min-width: 0; }
.feature h3 { font-size: 17px; margin-top: 8px; }
.feature p { color: var(--text-muted); font-size: 15px; line-height: 1.65; }
.demo {
  margin: 0 0 8px; border-radius: var(--radius-card); overflow: hidden;
  border: 1px solid var(--border); aspect-ratio: 320 / 200; background: var(--surface-sunken);
}
.demo svg { display: block; width: 100%; height: 100%; font-family: var(--font-sans); }
.tag {
  display: inline-block; font-size: 12px; line-height: 1; padding: 4px 6px; margin-left: 6px;
  border-radius: 4px; border: 1px solid var(--border-strong); color: var(--text-muted);
  vertical-align: 2px; font-weight: 400;
}

.privacy-summary {
  display: grid; gap: 48px; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start;
}
.privacy-summary dl { margin: 0; display: grid; gap: 0; }
.privacy-summary dl > div {
  display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr); gap: 16px;
  padding-block: 16px; border-top: 1px solid var(--border);
}
.privacy-summary dl > div:last-child { border-bottom: 1px solid var(--border); }
.privacy-summary dt { font-weight: 500; }
.privacy-summary dd { margin: 0; color: var(--text-muted); font-size: 15px; }
.privacy-summary .actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 32px 48px; color: var(--text-muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { color: var(--text-muted); min-height: 44px; display: inline-flex; align-items: center; }
.site-footer a:hover { color: var(--text); }

/* Legal documents */
.doc { padding-block: 56px 88px; }
.doc .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.doc-head { grid-column: 1 / -1; max-width: 40em; }
.doc-head h1 { font-size: clamp(28px, 4vw, 36px); }
.doc-head .dates { margin-top: 12px; color: var(--text-muted); font-size: 15px; }
.doc-head .intro { margin-top: 20px; }
.toc { position: sticky; top: 24px; font-size: 14px; }
.toc p { font-weight: 500; margin-bottom: 8px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.toc a { color: var(--text-muted); text-decoration: none; display: block; padding: 4px 0; }
.toc a:hover { color: var(--text); }
.doc-body { max-width: 40em; min-width: 0; }
.doc-body section { scroll-margin-top: 24px; }
.doc-body section + section { margin-top: 48px; }
.doc-body h2 { font-size: 20px; margin-bottom: 14px; }
.doc-body h3 { font-size: 16px; margin: 24px 0 8px; }
.doc-body p + p, .doc-body p + ul, .doc-body ul + p, .doc-body .table-scroll + p, .doc-body p + .table-scroll { margin-top: 12px; }
.doc-body ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.doc-body strong { font-weight: 500; }
.doc-body code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em;
  background: var(--surface-sunken); padding: 1px 5px; border-radius: 4px;
}
.callout {
  margin-top: 16px; padding: 14px 18px; border-radius: var(--radius-card);
  background: var(--accent-soft); font-size: 15px;
}
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); }
table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.55; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 500; background: var(--surface-sunken); }
td:first-child { white-space: nowrap; }
.placeholder {
  background: var(--accent-soft); border-radius: 4px; padding: 0 4px; font-style: normal;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-areas: "title" "film" "features" "status"; }
  .hero { padding-block: 48px 64px; }
  .hero .wrap, .privacy-summary { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero .wrap { gap: 24px; }
  .hero-features, .hero .status-row { margin-top: 0; }
  .hero-film { width: 100%; max-width: 600px; }
  .doc .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .toc { position: static; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px 20px; }
}

@media (max-width: 480px) {
  .site-nav a[href^="#"] { display: none; }
  .privacy-summary dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .brand span { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .site-nav a, .site-footer a { transition: color 0.15s, background-color 0.15s; }
}

/* AI 与空间：刻意固定为深色舞台，两种主题下一致 */
.stage {
  --stage-bg: oklch(0.16 0.015 250);
  --stage-panel: oklch(0.205 0.017 250);
  --stage-border: oklch(0.32 0.02 250);
  --stage-text: oklch(0.96 0.005 250);
  --stage-muted: oklch(0.76 0.02 250);
  --stage-accent: oklch(0.82 0.11 225);
  background: var(--stage-bg);
  color: var(--stage-text);
  padding-block: 88px;
  color-scheme: dark;
}
.stage-head { max-width: 44em; margin-bottom: 40px; }
.stage-head h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.25; }
.stage-head p { margin-top: 12px; color: var(--stage-muted); font-size: 17px; }
.stage .tag { border-color: var(--stage-border); color: var(--stage-muted); margin: 0; }
.stage .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stage h3 { font-size: 18px; }

.cloud-panel {
  margin: 0; border: 1px solid var(--stage-border); border-radius: 16px;
  background: var(--stage-panel); overflow: hidden;
}
.cloud-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start;
  gap: 16px; padding: 20px 24px 0;
}
.cloud-bar .tags { margin-top: 6px; }
.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px;
  border: 1px solid var(--stage-border); background: var(--stage-bg);
}
.seg button {
  font: inherit; font-size: 14px; color: var(--stage-muted); background: transparent;
  border: 0; border-radius: 7px; padding: 0 14px; min-height: 36px; min-width: 52px; cursor: pointer;
}
.seg button:hover { color: var(--stage-text); }
.seg button[aria-pressed="true"] { background: var(--stage-accent); color: oklch(0.2 0.03 240); }
.seg button:focus-visible { outline-color: var(--stage-accent); }
.cloud-panel canvas {
  display: block; width: 100%; aspect-ratio: 16 / 8; min-height: 300px;
  cursor: grab; touch-action: pan-y; font-family: var(--font-sans);
}
.cloud-panel canvas:active { cursor: grabbing; }
.cloud-panel canvas:focus-visible { outline: 2px solid var(--stage-accent); outline-offset: -4px; border-radius: 0; }
.cloud-panel figcaption {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 32px; align-items: end;
  padding: 0 24px 22px; color: var(--stage-muted); font-size: 15px; line-height: 1.65;
}
.cloud-panel figcaption p:first-child { max-width: 44em; }
.cloud-panel .hint { font-size: 13px; white-space: nowrap; }

.ar-panel {
  margin-bottom: 24px; border: 1px solid var(--stage-border); border-radius: 16px; background: var(--stage-panel);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); overflow: hidden;
}
.ar-text { padding: 32px 32px 28px; display: grid; gap: 12px; align-content: start; }
.ar-text h3 { font-size: 22px; }
.ar-text .lead { color: var(--stage-text); font-size: 16px; }
.ar-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.ar-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; color: var(--stage-muted); font-size: 15px; line-height: 1.65; }
.ar-steps .n {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--stage-border);
  display: grid; place-items: center; font-size: 13px; color: var(--stage-accent); font-variant-numeric: tabular-nums;
}
.ar-text .note { font-size: 13px; color: var(--stage-muted); }
.ar-visual { margin: 0; border-left: 1px solid var(--stage-border); display: grid; align-items: center; background: #1b2027; }
.ar-visual svg { display: block; width: 100%; height: 100%; }
.cloud-panel canvas { aspect-ratio: 16 / 7; }

@media (max-width: 640px) {
  .stage { padding-block: 64px; }
  .cloud-bar { padding: 16px 16px 0; }
  .cloud-panel figcaption { grid-template-columns: minmax(0, 1fr); padding: 0 16px 18px; }
  .cloud-panel canvas { aspect-ratio: 4 / 3.4; }
  .ar-panel { grid-template-columns: minmax(0, 1fr); }
  .ar-text { padding: 20px 16px; }
  .ar-visual { border-left: 0; border-top: 1px solid var(--stage-border); }
}
