/*
 * TimeMind 網站共用樣式
 * 色彩對齊 App 的 constants/theme.ts:黑白為主,青綠色 (--ai) 只用在 AI 產生的內容上。
 * 主題由 <head> 內聯腳本寫入 data-theme;沒有 JS 時退回系統深淺色。
 */

:root {
  --paper: #fafafa;
  --card: #ffffff;
  --ink: #262626;
  --muted: #6b7280;
  --line: #e5e5e8;
  --line-strong: #d1d1d6;
  --fill: #f1f1f3;
  --ai: #0f766e;
  --ai-soft: #d5f7ee;
  --high: #dc2626;
  --mid: #d97706;
  --low: #059669;
  --on-ink: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 16px 40px rgba(0, 0, 0, .07);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "PingFang TC", "Hiragino Sans CNS", "Microsoft JhengHei", "Noto Sans TC", "Segoe UI", sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --wrap: 1120px;
  --gutter: 24px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #000000;
  --card: #121212;
  --ink: #fafafa;
  --muted: #a3a3a3;
  --line: #242426;
  --line-strong: #38383a;
  --fill: #1c1c1e;
  --ai: #5eead4;
  --ai-soft: #0f302c;
  --high: #f87171;
  --mid: #fbbf24;
  --low: #34d399;
  --on-ink: #000000;
  --shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 16px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #000000;
    --card: #121212;
    --ink: #fafafa;
    --muted: #a3a3a3;
    --line: #242426;
    --line-strong: #38383a;
    --fill: #1c1c1e;
    --ai: #5eead4;
    --ai-soft: #0f302c;
    --high: #f87171;
    --mid: #fbbf24;
    --low: #34d399;
    --on-ink: #000000;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .04), 0 16px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ───────── Base ───────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--ai-soft); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.num { font-family: var(--font-round); font-variant-numeric: tabular-nums; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--on-ink); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ───────── Buttons ───────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 14px;
  font-size: 16px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
.btn-quiet { background: var(--card); border-color: var(--line-strong); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-sm { min-height: 38px; padding: 0 16px; border-radius: 11px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; flex: none; }

.text-link {
  color: var(--ink); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.text-link:hover { text-decoration-color: currentColor; }

/* ───────── Header ───────── */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; letter-spacing: -.01em; text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.primary-nav ul { display: flex; gap: 4px; list-style: none; }
.primary-nav a {
  display: block; padding: 8px 12px; border-radius: 10px;
  color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none;
}
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--ink); background: var(--fill); }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-link {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 10px; border-radius: 10px;
  color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none;
}
.lang-link:hover { color: var(--ink); background: var(--fill); }
.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); background: var(--fill); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ───────── Home: hero ───────── */

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  align-items: center; gap: 64px; padding: 72px 0 96px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 68px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em;
  text-wrap: pretty;
}
html[lang="en"] .hero h1 { letter-spacing: -.035em; line-height: 1.04; text-wrap: balance; }
.hero-lead { max-width: 30em; margin-top: 24px; color: var(--muted); font-size: 19px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* 語音 → 任務 示範 */
.capture {
  position: relative; padding: 20px; border-radius: 28px;
  background: var(--card); box-shadow: var(--shadow);
}
.capture-langs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--fill); }
.capture-langs button {
  flex: 1; min-height: 34px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer;
}
.capture-langs button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.said { margin-top: 18px; padding: 16px 16px 18px; border-radius: 18px; background: var(--fill); }
.said-head { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.mic {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--on-ink);
}
.mic svg { width: 15px; height: 15px; }
.wave { display: flex; align-items: center; gap: 3px; height: 20px; margin-left: auto; }
.wave i { display: block; width: 3px; height: 6px; border-radius: 2px; background: var(--line-strong); transform-origin: center; }
.capture.is-listening .wave i { background: var(--ink); animation: wave .9s ease-in-out infinite; }
.capture.is-listening .wave i:nth-child(2n) { animation-delay: -.3s; }
.capture.is-listening .wave i:nth-child(3n) { animation-delay: -.6s; }
@keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(3.2); } }
.said-text { text-wrap: pretty; min-height: 3.4em; margin-top: 12px; font-size: 18px; line-height: 1.7; font-weight: 500; }
.said-text::before { content: "「"; }
.said-text::after { content: "」"; }
html[lang="en"] .said-text::before, .said-text[lang="en"]::before { content: "\201C"; }
html[lang="en"] .said-text::after, .said-text[lang="en"]::after { content: "\201D"; }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.made { margin-top: 12px; padding: 6px 16px 10px; border: 1px solid var(--line); border-radius: 18px; }
.made-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 6px; }
.made-head strong { font-size: 15px; }
.ai-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--ai-soft); color: var(--ai); font-size: 12px; font-weight: 700;
}
.ai-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.made .ai-tag { transition: opacity .3s ease; }
.capture.is-working .made .ai-tag { opacity: 0; }
.fields > div {
  display: grid; grid-template-columns: 4.5em 1fr; gap: 12px; align-items: baseline;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.fields > div:first-child { border-top: 0; }
.fields dt { color: var(--muted); font-size: 14px; }
.fields dd { font-size: 16px; font-weight: 600; transition: opacity .35s ease, color .6s ease; }
.fields dd.is-pending { opacity: 0; }
.fields dd.is-fresh { color: var(--ai); }
.capture figcaption { margin-top: 14px; padding: 0 4px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ───────── Sections ───────── */

.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 48px; }
.section-head .section-lead { max-width: 36em; }
.h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.18; font-weight: 700; letter-spacing: -.015em; text-wrap: pretty; }
html[lang="en"] .h2 { letter-spacing: -.03em; text-wrap: balance; }
.section-lead { margin-top: 16px; color: var(--muted); font-size: 18px; }

/* 產品截圖 */
.tour { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; list-style: none; }
.tour img {
  width: 100%; max-width: 300px; aspect-ratio: 600 / 1301; margin-bottom: 28px;
  border-radius: 28px; box-shadow: var(--shadow);
}
.tour h3 { font-size: 21px; line-height: 1.35; }
.tour p { margin-top: 8px; color: var(--muted); max-width: 22em; }
:root[data-theme="dark"] .tour img { filter: brightness(.9); }

/* 更多細節 */
.details { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 64px; }
.details > div { display: grid; grid-template-columns: 40px 1fr; align-content: start; gap: 4px 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.details svg { grid-row: span 2; width: 28px; height: 28px; margin-top: 2px; color: var(--ink); }
.details dt { font-size: 18px; font-weight: 700; }
.details dd { color: var(--muted); }

/* 小時 對話 */
.companion { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 72px; align-items: center; }
.companion .section-head { margin-bottom: 0; }
.companion-notes { margin-top: 28px; list-style: none; display: grid; gap: 12px; }
.companion-notes li { position: relative; padding-left: 22px; color: var(--muted); }
.companion-notes li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 8px; height: 2px; background: var(--ink); }
.chat { display: grid; gap: 10px; padding: 22px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
.chat-who { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-weight: 700; }
.chat-who img { width: 30px; height: 30px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.chat-who .ai-tag { margin-left: auto; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.55; }
.bubble.me { justify-self: end; background: var(--ink); color: var(--on-ink); border-bottom-right-radius: 6px; }
.bubble.ai { justify-self: start; background: var(--fill); border-bottom-left-radius: 6px; }

/* 隱私:資料去向 */
.data-flow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.flow { padding: 28px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.flow h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.flow h3 svg { width: 24px; height: 24px; }
.flow p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.flow ul { margin-top: 18px; list-style: none; }
.flow li { padding: 12px 0; border-top: 1px solid var(--line); }
.flow li strong { display: block; font-weight: 600; }
.flow li span { color: var(--muted); font-size: 15px; }
.flow-cloud h3 svg { color: var(--ai); }
.privacy-promises { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 32px; color: var(--muted); font-size: 15px; list-style: none; }
.privacy-promises li { display: flex; align-items: center; gap: 8px; }
.privacy-promises svg { width: 18px; height: 18px; color: var(--ink); }
.section-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 28px; }

/* 方案 */
.plans { width: 100%; max-width: 760px; border-collapse: collapse; font-size: 16px; }
.plans th, .plans td { padding: 16px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.plans thead th { padding-top: 0; font-size: 20px; }
.plans thead th small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; font-weight: 500; }
.plans tbody th { font-weight: 500; }
.plans td { width: 28%; font-weight: 600; }
.plans td.is-none { color: var(--muted); font-weight: 500; }
.plans-note { max-width: 760px; margin-top: 20px; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { max-width: 820px; }
.faq-group + .faq-group { margin-top: 48px; }
.faq-group h3 { margin-bottom: 8px; color: var(--muted); font-size: 15px; font-weight: 600; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; font-size: 18px; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq details > div { padding: 0 0 22px; color: var(--muted); max-width: 44em; }
.faq details > div p + p { margin-top: 10px; }
.faq details > div ol { margin-top: 8px; padding-left: 1.4em; }
.faq details > div ol li + li { margin-top: 4px; }
.faq details > div ol + p { margin-top: 10px; }

/* 新版搶先看(介紹影片) */
.preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 72px; align-items: center; }
.preview .section-head { margin-bottom: 0; }
.soon-tag { display: inline-block; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px; background: var(--fill); color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.6; }
.preview-note { margin-top: 20px; color: var(--muted); font-size: 14px; }
.promo { position: relative; justify-self: center; width: min(100%, 340px); aspect-ratio: 9 / 16; border-radius: 34px; overflow: hidden; background: #fafafa; box-shadow: var(--shadow); }
.promo-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.promo-controls { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; }
.promo-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(38, 38, 38, .72); color: #fff; cursor: pointer;
}
.promo-btn:hover { background: rgba(38, 38, 38, .9); }
.promo-btn svg { width: 20px; height: 20px; }
.promo-btn .i-pause, .promo-btn .i-sound { display: none; }
.promo.is-playing [data-promo-play] .i-play { display: none; }
.promo.is-playing [data-promo-play] .i-pause { display: block; }
.promo.has-sound [data-promo-sound] .i-muted { display: none; }
.promo.has-sound [data-promo-sound] .i-sound { display: block; }

/* 結尾 */
.closing { padding: 112px 0; border-top: 1px solid var(--line); text-align: center; }
.closing img { width: 72px; height: 72px; margin: 0 auto 28px; border-radius: 18px; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.closing .hero-actions { justify-content: center; }
.closing .hero-note { margin-top: 16px; }

/* ───────── Footer ───────── */

.site-footer { padding: 56px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid .brand { color: var(--ink); }
.footer-grid p { margin-top: 12px; max-width: 22em; }
.footer-grid h2 { margin-bottom: 12px; color: var(--ink); font-size: 14px; font-weight: 700; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-base a { text-decoration: none; }
.footer-base a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ───────── 支援頁 ───────── */

.page-head { padding: 64px 0 40px; }
.page-head h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
html[lang="en"] .page-head h1 { letter-spacing: -.035em; }
.page-head p { max-width: 36em; margin-top: 16px; color: var(--muted); font-size: 18px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; }
.quick a {
  display: grid; gap: 4px; height: 100%; padding: 20px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); text-decoration: none;
  transition: border-color .15s ease;
}
.quick a:hover { border-color: var(--ink); }
.quick svg { width: 24px; height: 24px; margin-bottom: 10px; }
.quick strong { font-size: 17px; }
.quick span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; padding: 64px 0 96px; }
.contact-card { position: sticky; top: 96px; padding: 24px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.contact-card h2 { font-size: 20px; }
.contact-card p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.contact-card .btn { width: 100%; margin-top: 20px; }
.contact-card .btn + .btn { margin-top: 10px; }
.contact-card .handles { margin-top: 12px; font-size: 13px; text-align: center; }
.contact-card ul { margin-top: 18px; padding-left: 1.2em; color: var(--muted); font-size: 14px; }
.contact-card li + li { margin-top: 4px; }
.contact-card .email { display: block; margin-top: 12px; font-size: 14px; text-align: center; word-break: break-all; }

/* ───────── 法律文件 ───────── */

.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 40px 72px; padding: 56px 0 96px; }
.doc-head { grid-column: 2; }
.doc-head h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.doc-meta { margin-top: 12px; color: var(--muted); font-size: 15px; }
.doc-summary { margin-top: 28px; padding: 20px 22px; border-radius: 18px; background: var(--fill); }
.doc-summary h2 { font-size: 17px; }
.doc-summary p { margin-top: 6px; color: var(--muted); }
.toc { grid-column: 1; grid-row: 1 / span 2; }
.toc nav { position: sticky; top: 96px; }
.toc h2 { margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.toc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a {
  display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 2px solid transparent;
  color: var(--muted); font-size: 14px; line-height: 1.5; text-decoration: none;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--ink); font-weight: 600; }
.doc { grid-column: 2; counter-reset: none; }
.doc section { padding: 32px 0; border-top: 1px solid var(--line); }
.doc section:first-child { border-top: 0; padding-top: 8px; }
.doc h2 { display: flex; gap: 14px; font-size: 22px; line-height: 1.4; }
.doc h2 .sec-num { flex: none; min-width: 1.4em; color: var(--muted); font-family: var(--font-round); font-variant-numeric: tabular-nums; }
.doc h3 { margin-top: 20px; font-size: 17px; }
.doc p, .doc ul, .doc ol { margin-top: 12px; font-size: 16px; line-height: 1.85; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: 6px; }
.doc a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.doc a:hover { text-decoration-color: currentColor; }
.doc .callout { margin-top: 16px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.doc .callout strong { display: block; margin-bottom: 4px; }
.steps { list-style: none; padding-left: 0 !important; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 52px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.steps li + li { margin-top: 8px !important; }
.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 12px;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: var(--on-ink); font: 700 13px/1 var(--font-round);
}
.doc-footer { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.doc-footer p { margin-top: 4px; font-size: 14px; }

/* ───────── 單張卡片頁(邀請 / 好友 / 登入 / 404) ───────── */

.solo { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.solo main { display: grid; place-items: center; padding: 32px 0 64px; }
.solo-card {
  width: min(440px, 100% - 40px); padding: 36px 28px 28px; border-radius: 28px;
  background: var(--card); box-shadow: var(--shadow); text-align: center;
}
.solo-card > img { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.solo-card h1 { font-size: 26px; line-height: 1.3; letter-spacing: -.01em; }
.solo-card > p { margin-top: 10px; color: var(--muted); }
.solo-actions { display: grid; gap: 10px; margin-top: 28px; }
.solo-actions .btn { width: 100%; }
.solo-hint { margin-top: 16px; color: var(--muted); font-size: 14px; }
.solo-card .invite-code + h1 { margin-top: 20px; }
.invite-code {
  display: inline-block; margin-top: 20px; padding: 10px 18px; border-radius: 12px;
  background: var(--fill); font: 700 22px/1.2 var(--font-round); letter-spacing: .14em;
}
.disclosure { margin-top: 24px; padding: 18px; border-radius: 16px; background: var(--fill); text-align: left; font-size: 14px; }
.disclosure h2 { font-size: 15px; }
.disclosure ul { margin-top: 8px; padding-left: 1.2em; color: var(--muted); }
.disclosure li + li { margin-top: 4px; }
.disclosure p { margin-top: 8px; color: var(--muted); }
.solo-footer { padding: 24px 0 32px; color: var(--muted); font-size: 14px; text-align: center; }
.solo-footer a { margin: 0 10px; text-decoration: none; }
.solo-footer a:hover { color: var(--ink); text-decoration: underline; }
[hidden] { display: none !important; }

/* ───────── Responsive ───────── */

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 48px 0 72px; }
  .capture { max-width: 520px; }
  .companion { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .chat { max-width: 520px; }
  .preview { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .promo { width: min(100%, 320px); }
  .support-layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .contact-card { position: static; }
  .quick { grid-template-columns: repeat(2, 1fr); }
  .doc-layout { grid-template-columns: 1fr; gap: 0; padding-top: 40px; }
  .doc-head, .doc, .toc { grid-column: 1; grid-row: auto; }
  .toc { margin: 32px 0 8px; }
  .toc nav { position: static; padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line); }
  .toc ol { border-left: 0; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
  .toc a { margin-left: 0; padding-left: 0; border-left: 0; }
  .toc a.is-active { font-weight: 500; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
  .primary-nav { display: none; }
}

@media (max-width: 760px) {
  .section { padding: 72px 0; }
  .tour {
    grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: min(78%, 300px);
    gap: 20px; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; scroll-padding-inline: var(--gutter);
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .tour::-webkit-scrollbar { display: none; }
  .tour li { scroll-snap-align: start; }
  .details { grid-template-columns: 1fr; }
  .data-flow { grid-template-columns: 1fr; }
  .plans td { width: 30%; }
}

@media (max-width: 560px) {
  :root { --gutter: 20px; }
  .header-row { gap: 12px; min-height: 60px; }
  .brand span { display: none; }
  .hero-lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .btn { white-space: normal; text-align: center; line-height: 1.3; padding-block: 12px; }
  .capture { padding: 14px; border-radius: 24px; }
  .said-text { font-size: 17px; }
  .quick { grid-template-columns: 1fr; }
  .plans th, .plans td { padding: 14px 8px; font-size: 15px; }
  .plans thead th { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .toc ol { grid-template-columns: 1fr; }
  .doc h2 { font-size: 20px; }
  .solo-card { padding: 32px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .capture.is-listening .wave i { transform: none; }
}

@media print {
  .site-header, .site-footer, .toc, .theme-toggle, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .doc-layout { display: block; padding: 0; }
}
