/* One Layer Down
   视觉：一次下潜。整页背景随对话深度在粉彩色调间轻微变化（body[data-depth]），文字始终是深色。
   暖色只给“用户自己的东西”：划线、轨迹、下一步。 */

:root {
  /* 明亮、温和，参考心理健康类网站：大面积暖白，深色文字，柔和的粉彩点缀。
     “深度”用色调表现而不是变暗：桃色/奶油的浅滩 → 薄荷 → 天蓝 → 长春花蓝 → 淡紫（最深处）。 */
  --sea-0: #fffaf4; --sea-1: #fff6ec; --sea-2: #f4faf4; --sea-3: #eff7fb; --sea-4: #f1f2fd; --sea-5: #f6f0fd;
  --band-0: #ffe9d9; --band-1: #fdf1d3; --band-2: #e0f3e6; --band-3: #d9eef6; --band-4: #e1e5fa; --band-5: #ebe1f8;
  --deep-a: #eef5fb; --deep-b: #f2edfb;

  --ink: #2b3044; --ink-2: #565d73; --ink-3: #8a90a3; --on-ink: #ffffff;
  --line: rgba(43, 48, 68, .11);
  --card: rgba(255, 255, 255, .78);
  --sheet: #ffffff;
  --accent: #e8684a; --accent-ink: #fff; --accent-soft: rgba(232, 104, 74, .12);
  --bl: #565d73; --bl-deep: #565d73;
  --title-a: #4aa39a; --title-b: #6c63c9;
  --glow: rgba(255, 205, 170, .55);
  --hl: rgba(240, 120, 95, .18); --hl-on: rgba(240, 120, 95, .3);
  --glow-2: rgba(200, 190, 255, .35);
  --shadow: rgba(80, 70, 120, .16);

  --f-display: "Instrument Serif", Georgia, serif;
  --f-read: "Newsreader", Georgia, serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --top-h: 64px;
  --gutter: clamp(16px, 5vw, 64px);
  color-scheme: light; /* 只做浅色：系统是深色模式时也保持明亮（2026-10-30 决定） */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--f-read);
  color: var(--ink);
  background: var(--sea-0);
  --bg: var(--sea-0);
  --light: 1;
  -webkit-font-smoothing: antialiased;
  transition: color .8s ease;
}
body[data-depth="1"] { --bg: var(--sea-1); --light: .8; }
body[data-depth="2"] { --bg: var(--sea-2); --light: .6; }
body[data-depth="3"] { --bg: var(--sea-3); --light: .7; }
body[data-depth="4"] { --bg: var(--sea-4); --light: .6; }
body[data-depth="5"] { --bg: var(--sea-5); --light: .55; }

/* 背景层：颜色随深度过渡；上方一束透进水里的光，越深越暗；一层细颗粒 */
.sea { position: fixed; inset: 0; z-index: -1; background-color: var(--bg); transition: background-color 1.8s ease; }
.sea::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(90% 60% at 15% -10%, var(--glow), transparent 62%), radial-gradient(70% 60% at 100% 100%, var(--glow-2), transparent 65%);
  opacity: var(--light); transition: opacity 1.8s ease;
}
.sea::after {
  content: ""; position: absolute; inset: 0; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.kicker, .label {
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0;
}
.kicker { color: var(--accent); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .25s, opacity .25s;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--ink); color: var(--on-ink); border-color: transparent; }
.btn.primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { color: var(--ink); border-color: var(--line); }
.btn.small { padding: 8px 14px; font-size: 11px; }
.btn:disabled, .btn.loading { opacity: .55; pointer-events: none; }
.btn .arrow { display: inline-block; transition: transform .35s cubic-bezier(.3, .7, .3, 1.4); }
.btn:hover .arrow { transform: translateY(4px); }
.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--f-mono); font-size: 12px; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line);
}
.link:hover { color: var(--ink); text-decoration-color: currentColor; }
.form-error { margin: 8px 0 0; min-height: 1em; font-size: 15px; color: var(--accent); }
.form-error:empty { display: none; }

/* ---------- 顶栏 ---------- */
.top {
  position: relative; z-index: 20; height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
}
.wordmark { font-family: var(--f-display); font-size: 22px; text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.wordmark em { color: var(--ink-2); }
.top nav { display: flex; align-items: center; gap: 8px; }
.top nav > * { white-space: nowrap; }
#newBtn .short { display: none; }
.lang { font-family: var(--f-mono); font-size: 12px; text-decoration: none; color: var(--ink-2); padding: 8px 4px; }
.lang:hover { color: var(--ink); }
.app-only { display: none; }
body.in-app .app-only { display: inline-flex; }

/* ---------- 首页：水面 ---------- */
.landing {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.08fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start;
  padding: clamp(28px, 7vh, 88px) var(--gutter) clamp(28px, 4vh, 44px);
}
.hero h1 {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(60px, 9.4vw, 136px); line-height: .9; letter-spacing: -.025em;
  margin: 22px 0 28px;
}
.hero h1 em {
  font-style: italic; padding-right: .08em;
  background: linear-gradient(180deg, var(--title-a) 10%, var(--title-b) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { font-size: clamp(19px, 1.55vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 30em; margin: 0 0 26px; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 0; }
.trust li { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.trust li + li::before { content: "·"; margin: 0 12px; }

.start { padding-top: clamp(0px, 4vh, 48px); }
.compose-card {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 20px 22px 18px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 40px 80px -44px var(--shadow), 0 1px 0 rgba(255, 255, 255, .7) inset;
  transition: border-color .3s, box-shadow .3s;
}
.compose-card:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.compose-card textarea {
  display: block; width: 100%; margin: 12px 0 14px; padding: 0;
  min-height: 132px; resize: none; border: 0; outline: 0; background: transparent;
  font-family: var(--f-read); font-size: 20px; line-height: 1.5; color: var(--ink);
}
.compose-card textarea::placeholder { color: var(--ink-3); opacity: .8; }
.compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hint { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); line-height: 1.5; max-width: 28em; }
#tsWidget:empty { display: none; }
#tsWidget { margin-top: 12px; }
.trial-used .tu-title { font-family: var(--f-display); font-size: 28px; margin: 0 0 8px; }
.trial-used p { font-size: 17px; line-height: 1.5; color: var(--ink-2); margin: 0 0 14px; }
.waitlist-form { display: flex; gap: 8px; flex-wrap: wrap; }
.waitlist-form input {
  flex: 1 1 200px; min-width: 0; padding: 12px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink); font: 16px var(--f-read);
}
.form-msg { font-size: 16px; color: var(--ink-2); margin: 10px 0 0; }
.form-msg:empty { display: none; }

.resume { display: inline-block; margin-top: 16px; font-family: var(--f-mono); font-size: 12.5px; color: var(--accent); text-underline-offset: 4px; }
.examples { margin-top: 30px; }
.examples .label { margin-bottom: 6px; }
.chip {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 13px 28px 13px 0; position: relative;
  font-family: var(--f-read); font-size: 17px; line-height: 1.4; color: var(--ink-2);
  transition: color .2s, padding-left .3s;
}
.chip::after { content: "↙"; position: absolute; right: 4px; top: 13px; opacity: 0; transition: opacity .2s, transform .3s; }
.chip:hover { color: var(--ink); padding-left: 8px; }
.chip:hover::after { opacity: .7; }
.crisis-link { display: inline-block; margin-top: 22px; font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); text-underline-offset: 3px; }

/* 首页入场：错落浮现 */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.hero > *, .start > * { animation: rise 1s cubic-bezier(.2, .7, .2, 1) both; }
.hero .kicker { animation-delay: .05s; } .hero h1 { animation-delay: .15s; } .hero .sub { animation-delay: .3s; }
.hero .trust { animation-delay: .42s; } .start > :nth-child(1) { animation-delay: .5s; } .start > :nth-child(n+2) { animation-delay: .65s; }

/* ---------- 首页：水线与深海段 ---------- */
/* 示例图横幅：骑在两屏交界的水线上，下半截沉进深海段。进入视野时画出轨迹（.play），点依次弹出，回到水面后终点一圈圈扩散；
   画过之后因宽度变化重画时（.done）直接显示画好的样子 */
.demo-band { position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.demo-map {
  margin: 0; padding: 18px 20px 14px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--sheet);
  box-shadow: 0 40px 80px -48px var(--shadow);
  animation: rise 1s cubic-bezier(.2, .7, .2, 1) .75s both;
}
.demo-map .dive-svg { overflow: visible; }
.demo-map .bl { font-size: 11.5px; }
.demo-map .trail { stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; }
.demo-map.play .trail { animation: draw 3s linear .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.demo-map .dot:not(.start) { opacity: 0; transform: scale(0); transform-box: fill-box; transform-origin: center; }
.demo-map.play .dot:not(.start) { animation: pop .5s cubic-bezier(.3, 1.8, .5, 1) calc(.3s + var(--t) * 3s) forwards; }
@keyframes pop { to { opacity: 1; transform: none; } }
.demo-map .ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.demo-map.play .ring { animation: pulse 2.4s ease-out 3.4s infinite; }
.demo-map.done .trail { animation: none; stroke-dashoffset: 0; }
.demo-map.done .dot:not(.start) { animation: none; opacity: 1; transform: none; }
.demo-map.done .ring { animation-delay: 0s; }
.waterline-art { line-height: 0; margin-top: -120px; }
.waterline-art svg { width: 100%; height: 70px; display: block; }
.waterline-art path { fill: var(--deep-a); }
.how {
  position: relative; overflow: hidden; color: var(--ink);
  background: linear-gradient(180deg, var(--deep-a) 0%, var(--deep-b) 100%);
  padding: clamp(56px, 6vw, 88px) var(--gutter) clamp(64px, 8vw, 120px);
}
.how-inner { position: relative; max-width: 1120px; margin: 0 auto; }
.how h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -.015em; margin: 16px 0 0; max-width: 16em; }
.how h3 { font-family: var(--f-display); font-weight: 400; font-style: italic; font-size: 30px; margin: 10px 0 8px; }
.how p { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.how p.kicker { font-size: 11.5px; line-height: 1.4; color: var(--accent); }
.how .n { font-family: var(--f-mono); font-size: 12px; color: var(--accent); }
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { border-top: 1px solid var(--line); padding-top: 18px; }
.steps li:nth-child(2) { margin-top: 28px; } .steps li:nth-child(3) { margin-top: 56px; }

.levels-block { max-width: 640px; margin-top: clamp(64px, 9vw, 120px); }
.level-list { list-style: none; padding: 0; margin: 26px 0 0; }
.level-list li {
  display: flex; gap: 14px; align-items: baseline; padding: 9px 0 9px 14px; font-size: 19px;
  border-left: 3px solid var(--b); border-bottom: 1px solid var(--line);
}
.level-list li:nth-child(1) { --b: var(--band-0); } .level-list li:nth-child(2) { --b: var(--band-1); } .level-list li:nth-child(3) { --b: var(--band-2); }
.level-list li:nth-child(4) { --b: var(--band-3); margin-top: 10px; } .level-list li:nth-child(5) { --b: var(--band-4); } .level-list li:nth-child(6) { --b: var(--band-5); }
.filters-block { margin-top: clamp(64px, 9vw, 120px); }
.filters-block > p { max-width: 40em; margin-top: 8px; }
.filters { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.filters li { border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: var(--card); }
.filters .tag { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.filters .ex { font-family: var(--f-display); font-style: italic; font-size: 26px; line-height: 1.2; color: var(--ink); margin: 14px 0 10px; }
.filters .ex { display: inline; padding: 0 4px; background: var(--hl); border-radius: 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.filters .q { margin-top: 12px; }

.faq { margin-top: clamp(64px, 9vw, 120px); max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; position: relative; font-family: var(--f-display); font-size: 26px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-family: var(--f-mono); font-size: 18px; color: var(--ink-3); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; }
.help { margin-top: 72px; padding: 28px; border: 1px solid var(--line); border-radius: 22px; max-width: 760px; }
.help h2 { font-size: 30px; margin: 0 0 10px; }
.help ul, .crisis ul { padding-left: 18px; margin: 14px 0 0; font-size: 18px; line-height: 1.8; color: var(--ink-2); }
.help strong, .crisis strong { color: var(--ink); font-weight: 500; }

/* 深海段里缓缓上升的气泡 */
.bubbles i {
  position: absolute; bottom: -20px; width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid rgba(108, 99, 201, .22); background: rgba(255, 255, 255, .4); animation: bubble 16s linear infinite;
}
.bubbles i:nth-child(1) { left: 6%; animation-delay: -2s; }
.bubbles i:nth-child(2) { left: 14%; width: 5px; height: 5px; animation-duration: 12s; animation-delay: -7s; }
.bubbles i:nth-child(3) { left: 27%; width: 11px; height: 11px; animation-duration: 19s; animation-delay: -11s; }
.bubbles i:nth-child(4) { left: 41%; width: 4px; height: 4px; animation-duration: 11s; animation-delay: -4s; }
.bubbles i:nth-child(5) { left: 56%; animation-duration: 17s; animation-delay: -9s; }
.bubbles i:nth-child(6) { left: 68%; width: 6px; height: 6px; animation-duration: 13s; animation-delay: -1s; }
.bubbles i:nth-child(7) { left: 79%; width: 12px; height: 12px; animation-duration: 21s; animation-delay: -14s; }
.bubbles i:nth-child(8) { left: 88%; width: 5px; height: 5px; animation-duration: 14s; animation-delay: -6s; }
.bubbles i:nth-child(9) { left: 95%; width: 7px; height: 7px; animation-duration: 18s; animation-delay: -12s; }
@keyframes bubble {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate(10px, -50vh); }
  100% { transform: translate(-6px, -120vh); opacity: 0; }
}

/* ---------- 页脚 ---------- */
.foot { padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom)); font-family: var(--f-mono); font-size: 11.5px; line-height: 1.8; color: var(--ink-3); text-align: center; }
.foot p { margin: 0; }
.foot a { text-underline-offset: 3px; }
body:not(.doc) .foot { background: var(--deep-b); }

/* ---------- 对话 ---------- */
body.in-app .landing, body.in-app .demo-band, body.in-app .waterline-art, body.in-app .how, body.in-app .foot { display: none; }
body.in-app .top { position: fixed; left: 0; right: 0; }
.app {
  /* 潜水图在左，对话在右；左右边缘与顶栏内容对齐（同样留 --gutter） */
  display: grid; grid-template-columns: clamp(380px, 34vw, 500px) minmax(0, 1fr);
  height: 100dvh; padding-top: var(--top-h); padding-left: var(--gutter);
}
.app-main { display: flex; flex-direction: column; min-height: 0; grid-column: 2; grid-row: 1; }
.stream { flex: 1; overflow-y: auto; padding: 20px var(--gutter) 40px; overscroll-behavior: contain; }
.stream > * { max-width: 680px; margin-left: auto; margin-right: auto; }

.first { padding-top: 8px; }
.first blockquote {
  margin: 10px 0 0; padding: 2px 0 2px 18px; border-left: 2px solid var(--line);
  font-size: 20px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap;
}
.msg.partner { margin-top: 38px; }
.msg.partner .meta {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.depth-dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(calc(20 + var(--d, 0) * 46) 70% 72%); box-shadow: 0 0 0 3px var(--line); }
.msg.partner .text { margin: 0; font-size: clamp(21px, 2.1vw, 25px); line-height: 1.45; letter-spacing: -.003em; color: var(--ink); text-wrap: pretty; }
.msg.partner.enter { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.msg.user { margin-top: 24px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; animation: rise .35s ease both; }
.msg.user p {
  margin: 0; max-width: 82%; padding: 11px 16px; border-radius: 18px 18px 5px 18px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 18px; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere;
}
.divider {
  display: flex; align-items: center; gap: 14px; margin-top: 40px; margin-bottom: 0;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); text-align: center;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.thinking { display: flex; align-items: center; gap: 14px; margin-top: 34px; font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.bubbles-inline, .thinking .bubbles { display: inline-flex; gap: 5px; height: 22px; align-items: flex-end; }
.thinking .bubbles i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink-3); animation: float 1.6s ease-in-out infinite; }
.thinking .bubbles i:nth-child(2) { animation-delay: .25s; width: 5px; height: 5px; }
.thinking .bubbles i:nth-child(3) { animation-delay: .5s; }
@keyframes float { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-12px); opacity: 1; } }

.composer { padding: 10px var(--gutter) calc(14px + env(safe-area-inset-bottom)); }
.composer-box {
  max-width: 680px; margin: 0 auto; display: flex; align-items: flex-end; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 8px 8px 8px 18px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: border-color .3s;
}
.composer-box:focus-within { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.composer textarea {
  flex: 1; min-width: 0; max-height: 200px; resize: none; border: 0; outline: 0; background: transparent; padding: 9px 0;
  font-family: var(--f-read); font-size: 18px; line-height: 1.45; color: var(--ink);
}
.composer textarea::placeholder { color: var(--ink-3); }
.composer.waiting textarea { opacity: .5; }
.send {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--ink); color: var(--on-ink); display: grid; place-items: center; transition: background .25s, transform .25s;
}
.send:hover { background: var(--accent); color: var(--accent-ink); }
.send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.composer.waiting .send { opacity: .4; pointer-events: none; }
.composer-actions { max-width: 680px; margin: 8px auto 0; display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-height: 0; }
.composer-actions .form-error { flex: 1; margin: 0; }
/* “我不太理解这个问题”快捷按钮 */
.quick {
  margin-right: auto; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px dashed color-mix(in srgb, var(--ink-3) 60%, transparent); background: transparent;
  font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-2); transition: color .2s, border-color .2s, background .2s;
}
.quick:hover { color: var(--ink); border-color: var(--ink-2); background: var(--card); }
.composer.waiting .quick { opacity: .4; pointer-events: none; }
/* 已收尾：只留“查看卡片” */
.composer.closed .composer-box, .composer.closed .quick, .composer.closed #endEarlyBtn { display: none; }
.composer.closed .composer-actions { justify-content: center; }

/* ---------- 批注：话里的过滤说法 ---------- */
.annotated { position: relative; counter-reset: mk; }
.mk {
  /* 直接用底色高亮（像 Word 批注），不加下划线 */
  color: var(--ink); background: var(--hl); border-radius: 2px; padding: 1px 2px; margin: 0 -1px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  counter-increment: mk; transition: background .2s, box-shadow .2s;
}
.mk.on { background: var(--hl-on); box-shadow: 0 0 0 1px var(--accent); }
.mk::after { content: counter(mk); font-family: var(--f-mono); font-size: .62em; vertical-align: super; color: var(--accent); margin-left: 2px; }
.notes { display: grid; gap: 8px; margin-top: 12px; counter-reset: nt; }
.msg.user .notes { width: min(82%, 520px); }
.note {
  counter-increment: nt; padding: 10px 14px; border-radius: 12px; text-align: left;
  background: var(--sheet); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  font-size: 17px; line-height: 1.5; color: var(--ink-2); animation: rise .5s ease both;
  transition: box-shadow .2s, border-color .2s;
}
.note.on { border-color: var(--accent); background: var(--hl); box-shadow: 0 12px 30px -18px var(--shadow); }
.note strong { display: block; margin-bottom: 4px; font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.note strong::before { content: counter(nt) " · "; }
/* 批注连到下一问：回复里引用的原话同样高亮（不编号），批注底部一行“下一问从这里接着问” */
.mk.echo { counter-increment: none; }
/* 每条回答最多一处批注，不用编号（第一句话可能有几处，仍编号） */
.msg.user .mk::after, .msg.user .note strong::before { content: none; }
.mk.echo::after { content: none; }
.note-next { display: block; margin-top: 6px; font-style: normal; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-3); }
.note.on .note-next { color: var(--accent); }
.links { display: none; }
@media (min-width: 1200px) {
  /* 宽屏：右侧留出批注栏（像 Word，卡片 260 + 间距 32），批注用虚线连到原话；
     批注卡片右边缘对齐顶栏右边缘（位置由 app.js 计算） */
  .app { grid-template-columns: clamp(340px, 30vw, 480px) minmax(0, 1fr); }
  .stream, .composer { padding-left: 36px; padding-right: calc(var(--gutter) + 292px); }
  .notes { position: absolute; left: calc(100% + 32px); top: 0; width: 260px; margin: 0; display: block; }
  .msg.user .notes { width: 260px; }
  .note { position: absolute; left: 0; width: 260px; font-size: 16px; }
  .links { display: block; position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
  .links path { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 3; opacity: .8; }
  .links .tick { stroke-dasharray: none; stroke-width: 1.5; opacity: 1; }
  .mk::after, .note strong::before { content: none; }
}

/* ---------- 左侧潜水图 ---------- */
.dive {
  grid-column: 1; grid-row: 1;
  margin: 8px 0 16px; padding: 22px 26px 28px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 26px; background: var(--card);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 30px 70px -40px var(--shadow);
  display: flex; flex-direction: column; gap: 16px;
}
.dive > * { flex-shrink: 0; }
.dive-head { display: flex; justify-content: space-between; align-items: center; }
.dive-close { display: none; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stages li {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
  padding-top: 10px; position: relative; line-height: 1.35;
}
.stages li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px; background: var(--line); transition: background .6s; }
.stages li.done::before { background: var(--ink-3); }
.stages li.now { color: var(--ink); }
.stages li.now::before { background: var(--accent); }
.readout { display: flex; align-items: baseline; gap: 10px; min-height: 52px; margin-top: 6px; font-size: 20px; font-style: italic; color: var(--ink-2); }
.readout { font-size: 24px; }
.depth-num { font-family: var(--f-display); font-style: normal; font-size: 60px; line-height: 1; color: var(--ink); }
.depth-num small { font-size: 18px; color: var(--ink-3); }
.map { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--sheet); }
.insights { list-style: none; margin: 0; padding: 0; }
.insights li { position: relative; padding: 10px 0 10px 18px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.45; color: var(--ink); animation: rise .5s ease both; }
.insights li::before { content: ""; position: absolute; left: 2px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.insights li.empty { color: var(--ink-3); font-style: italic; }
.insights li.empty::before { background: var(--line); }
.dive-bar { display: none; }

/* SVG 潜水图 */
.dive-svg { display: block; width: 100%; height: auto; }
.dive-svg .band { transition: opacity .6s; }
.dive-svg .b0 { fill: var(--band-0); } .dive-svg .b1 { fill: var(--band-1); } .dive-svg .b2 { fill: var(--band-2); }
.dive-svg .b3 { fill: var(--band-3); } .dive-svg .b4 { fill: var(--band-4); } .dive-svg .b5 { fill: var(--band-5); }
.dive-svg .bl { font: 500 10.5px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; fill: var(--bl); }
.dive-svg .bl.deep { fill: var(--bl-deep); opacity: .85; }
.dive-svg .bl.on { fill: var(--accent); opacity: 1; }
.dive-svg .surf { font: 500 9.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; fill: var(--ink-3); }
.dive-svg .wl { font: 500 8.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; fill: var(--bl-deep); opacity: .65; }
.dive-svg .wave { fill: none; stroke: var(--ink-3); stroke-width: 1.2; opacity: .6; }
.dive-svg .waterline { stroke: var(--bl-deep); stroke-width: 1; stroke-dasharray: 3 5; opacity: .55; }
.dive-svg .trail { fill: none; stroke: var(--accent); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.dive-svg .dot { fill: var(--accent); }
.dive-svg .dot.start { fill: var(--ink-3); }
.dive-svg .dot.now, .dive-svg .dot.home { stroke: #fff; stroke-width: 2; }
.dive-svg .pulse { fill: none; stroke: var(--accent); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(2.8); opacity: 0; } }

/* ---------- 清晰卡片 ---------- */
.card-wrap { margin-top: 44px; padding-bottom: 24px; animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.ccard {
  position: relative; overflow: hidden; color: var(--ink);
  background: linear-gradient(160deg, #fff1e6 0%, #f3f9f4 38%, #edf5fb 68%, #f1ecfc 100%); border: 1px solid var(--line);
  border-radius: 26px; padding: clamp(24px, 5vw, 44px);
  box-shadow: 0 50px 90px -50px var(--shadow);
}
.ccard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 40% at 10% 0%, rgba(255, 200, 160, .35), transparent 70%); pointer-events: none; }
.ccard > * { position: relative; }
.cc-kicker { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0; }
.cc-title { font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: clamp(38px, 5vw, 56px); line-height: 1; margin: 14px 0 26px; }
.cc-row { margin-top: 20px; }
.cc-row .lab { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.cc-row p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.cc-row .before { color: var(--ink-3); }
.cc-row .now { font-size: clamp(21px, 2.3vw, 26px); line-height: 1.45; color: var(--ink); }
.cc-row.next p:not(.lab) { font-size: 22px; color: var(--accent); }
.cc-map { margin-top: 24px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.values { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.values li { padding: 5px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 16px; }
.cc-health { margin: 24px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.cc-foot { margin: 28px 0 0; font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.card-wrap .waitlist { margin-top: 20px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
.card-wrap .waitlist .tu-title { font-family: var(--f-display); font-size: 26px; margin: 0 0 8px; }
.card-wrap .waitlist p { margin: 0 0 12px; color: var(--ink-2); }

/* 安全模式 */
.crisis { margin-top: 32px; padding: 26px; border: 1px solid var(--accent); border-radius: 22px; background: var(--card); }
.crisis h2 { font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 0 0 10px; }
.crisis p { font-size: 18px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.crisis .btn { margin-top: 18px; }

/* ---------- 隐私 / 条款 ---------- */
.doc-main { max-width: 720px; margin: 0 auto; padding: 32px var(--gutter) 80px; }
.doc-main h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(44px, 6vw, 68px); line-height: 1; margin: 20px 0 10px; }
/* 文档页的排版不作用于卡片（“我的卡片”页里的清晰卡片有自己的样式） */
.doc-main h2:not(.ccard *) { font-family: var(--f-display); font-weight: 400; font-size: 28px; margin: 40px 0 8px; }
.doc-main :is(p, li):not(.ccard *, .card-list *) { font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.doc-main .updated { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }

/* ---------- 登录 ---------- */
.nav-link { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 8px 4px; }
.signin {
  width: min(440px, calc(100vw - 32px)); padding: 34px 32px 26px; border: 1px solid var(--line); border-radius: 26px;
  background: var(--sheet); color: var(--ink); box-shadow: 0 40px 90px -40px var(--shadow);
}
.signin::backdrop { background: rgba(43, 48, 68, .28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.signin h2 { font-family: var(--f-display); font-weight: 400; font-size: 34px; line-height: 1.05; margin: 0 0 10px; }
.signin-sub { margin: 0 0 24px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.signin-close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; cursor: pointer; font-size: 24px; line-height: 1; color: var(--ink-3); }
.signin-close:hover { background: var(--accent-soft); color: var(--ink); }
.btn.google { width: 100%; justify-content: center; gap: 10px; background: var(--sheet); }
.btn.google svg { width: 18px; height: 18px; flex: none; }
.signin-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.signin-or::before, .signin-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.signin-or[hidden] { display: none; }
#signinForm { display: grid; gap: 10px; }
#signinForm input {
  width: 100%; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  font: 18px var(--f-read); color: var(--ink); outline: 0;
}
#signinForm input:focus { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
#signinForm .btn { justify-content: center; }
.signin-sent { display: grid; gap: 12px; justify-items: start; }
.signin-sent .sent-text { margin: 0; font-size: 18px; line-height: 1.5; }
.signin-note { margin: 22px 0 0; font-family: var(--f-mono); font-size: 11px; line-height: 1.6; color: var(--ink-3); }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  margin: 0; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--on-ink);
  font-size: 16px; box-shadow: 0 20px 40px -20px var(--shadow); transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--accent); color: var(--accent-ink); }
/* 卡片下方：登录保存 */
.keep { margin-top: 22px; }
.keep-box { padding: 18px 22px; border: 1px dashed color-mix(in srgb, var(--ink-3) 55%, transparent); border-radius: 18px; text-align: center; }
.keep-box p { margin: 0 0 12px; font-size: 16px; color: var(--ink-2); }
.keep-box .keep-title { margin-bottom: 4px; font-size: 19px; color: var(--ink); }
.keep-done { margin: 0; text-align: center; font-size: 16px; color: var(--ink-2); }
/* 我的卡片 */
.cards-main h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 6vw, 60px); line-height: 1; margin: 16px 0 10px; }
.cards-intro { margin: 0 0 32px; color: var(--ink-2); }
.cards-empty { padding: 28px; border: 1px dashed var(--line); border-radius: 22px; text-align: center; }
.cards-empty p { margin: 0 0 16px; }
.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.card-sum {
  display: grid; gap: 6px; width: 100%; padding: 18px 22px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--ink); font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.card-sum:hover, .card-sum[aria-expanded="true"] { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 20px 40px -30px var(--shadow); }
.cs-date { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.cs-before { font-size: 18px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cs-next { font-size: 17px; line-height: 1.45; color: var(--accent); }
.card-full { margin-top: 14px; }

/* ---------- 窄屏 ---------- */
@media (max-width: 960px) {
  .landing { grid-template-columns: 1fr; }
  .start { padding-top: 0; }
  .steps, .filters { grid-template-columns: 1fr; }
  .steps li:nth-child(n) { margin-top: 0; }
  .demo-map { padding: 14px 14px 10px; border-radius: 18px; }

  .app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); padding-left: 0; }
  .app-main { grid-column: 1; grid-row: 2; }
  .dive { margin: 0; border-radius: 22px 22px 0 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .dive-bar {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 10px var(--gutter); background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer;
    font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  }
  .bar-gauge { flex: 1; height: 4px; border-radius: 4px; background: var(--line); position: relative; overflow: hidden; }
  .bar-gauge i { position: absolute; inset: 0 auto 0 0; width: calc((var(--d, 0) + 1) / 6 * 100%); background: var(--accent); border-radius: 4px; transition: width .8s ease; }
  .bar-level { color: var(--ink); }
  .dive {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 82dvh;
    background: var(--sheet); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0;
    box-shadow: 0 -30px 60px -20px var(--shadow);
    transform: translateY(105%); transition: transform .45s cubic-bezier(.2, .8, .2, 1);
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .dive.open { transform: none; }
  .dive-close { display: inline; }
  .stream { padding-top: 12px; }
}
@media (max-width: 560px) {
  .wordmark { font-size: 19px; }
  .hero h1 { margin: 14px 0 20px; }
  .compose-card { padding: 16px 16px 14px; border-radius: 18px; }
  .compose-card textarea { font-size: 18px; min-height: 110px; }
  .btn.small { padding: 7px 10px; }
  .top nav { gap: 2px; }
  .top nav .btn.small, .top nav .nav-link { padding: 7px 6px; letter-spacing: .04em; }
  /* 对话中顶栏放不下：“New conversation”缩成“New”，价格 / 剩余次数只在首页、页脚显示 */
  #newBtn .long { display: none; }
  #newBtn .short { display: inline; }
  body.in-app :is(#pricingLink, #creditsLink) { display: none; }
  .msg.user p { max-width: 90%; }
  .cc-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .demo-map .trail { stroke-dashoffset: 0; }
  .demo-map .dot:not(.start) { opacity: 1; transform: none; }
}

/* ---------- 次数包（首页“免费那次用完了”、价格页；web/assets/pay.js） ---------- */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 4px 0 14px; }
.pack {
  position: relative; display: grid; gap: 4px; justify-items: start; text-align: left;
  padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--sheet);
  font: inherit; color: var(--ink); cursor: pointer; transition: border-color .25s, transform .25s, box-shadow .25s;
}
.pack:hover:not(:disabled) { border-color: var(--ink-2); transform: translateY(-2px); box-shadow: 0 20px 40px -28px var(--shadow); }
.pack:disabled { cursor: default; }
.pack.featured { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.pack-badge {
  position: absolute; top: -10px; right: 14px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
}
.pack-n { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.pack-price { font-family: var(--f-display); font-size: 38px; line-height: 1.05; }
.pack-each { font-size: 15px; color: var(--ink-3); }
.pack-note { font-family: var(--f-mono); font-size: 11.5px; line-height: 1.6; color: var(--ink-3); }
.trial-used p.pack-note, .card-wrap .waitlist p.pack-note { font-size: 11.5px; color: var(--ink-3); margin: 0; }
.doc-main .packs { margin-top: 28px; }
.doc-main p.pack-note:not(.ccard *) { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.credits-link { color: var(--accent); }
/* 窄的地方（首页卡片里、手机）一包一行：左边次数和单价，右边总价 */
.trial-used .packs, .card-wrap .waitlist .packs { grid-template-columns: 1fr; gap: 10px; }
.trial-used .pack, .card-wrap .waitlist .pack { grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; padding: 14px 18px; }
.trial-used .pack-price, .card-wrap .waitlist .pack-price { grid-column: 2; grid-row: 1 / span 2; font-size: 32px; }
@media (max-width: 560px) {
  .packs { grid-template-columns: 1fr; gap: 10px; }
  .pack { grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; padding: 14px 18px; }
  .pack-price { grid-column: 2; grid-row: 1 / span 2; font-size: 32px; }
}
