/* ============================================================
   慢富 · 全站唯一样式表
   设计哲学:安静、有温度、有呼吸感的投资书房。
   绝不出现:纯黑、刺眼纯白底、红绿涨跌色、进度条、红点、徽章。
   ============================================================ */

/* ---------- 自托管字体:霞鹜文楷(LXGW WenKai, OFL 开源可商用),教练的手写信声部 ---------- */
@font-face {
  font-family: 'LXGW WenKai';
  src: url('/static/fonts/lxgw-subset.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;   /* 先用系统字渲染,字体到位后无缝替换,不阻塞首屏 */
}

/* 自托管字体:思源宋体 SemiBold(Noto Serif SC, OFL 开源可商用),标题的衬线声部。
   一个 SemiBold 文件映射到 400-700 全字重区间 → 任何标题都用真·SemiBold 字形,永不假粗发虚。 */
@font-face {
  font-family: 'Noto Serif SC';
  src: url('/static/fonts/noto-serif-sc-subset.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- 设计 tokens(全站唯一定义处) ---------- */
:root {
  --bg: #FBF7F2;          /* 暖纸色背景 */
  --card: #FFFFFF;
  --ink: #3A342E;         /* 主文字(暖墨,on #FBF7F2 对比度 ≥ 正文 4.5:1) */
  --ink-2: #6B6259;       /* 辅助(on #FBF7F2 ≥ 4.5:1) */
  --ink-3: #79706A;       /* 淡色(承载文字须 ≥ 4.5:1,无障碍硬指标) */
  --accent: #8B7355;      /* 暖棕强调 */
  --accent-hover: #6B5B45;
  --bubble-user: #F0EBE3;
  --tag-bg: #EDE8E0;
  /* 标题字体:优先自托管/已装的漂亮衬线;关键是备胎跳过丑陋的 SimSun——
     Windows 落到干净的微软雅黑,Mac 落到宋体/苹方,谁都不会看到 1990 年代的 SimSun */
  --serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --hand: 'LXGW WenKai', 'Kaiti SC', 'KaiTi', 'STKaiti', var(--serif);  /* 霞鹜文楷优先,楷体系兜底 */
  --seal: #A65B4B;        /* 朱砂印章色:品牌点缀专用,禁作任何涨跌/状态色 */

  /* 派生 tokens(仅此处定义,组件引用) */
  /* 阴影哲学:「晨光下的纸」——扩散大、透明度低,不是深色投影 */
  --line-soft: #E4DCD0;                    /* 柔和分隔线/描边 */
  --shadow-card: 0 1px 2px rgba(26, 26, 26, .03),
                 0 6px 20px rgba(26, 26, 26, .04);
  --shadow-float: 0 1px 2px rgba(26, 26, 26, .03),
                  0 8px 24px rgba(26, 26, 26, .04),
                  0 18px 48px rgba(139, 115, 85, .06);
  --shadow-hover: 0 2px 4px rgba(26, 26, 26, .04),
                  0 10px 28px rgba(26, 26, 26, .05),
                  0 22px 56px rgba(139, 115, 85, .07);
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

html, body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }

body {
  /* 清晨光线:顶部 400px 内极淡暖光过渡;fixed 让光始终留在视口上方,滚动不突兀 */
  background-color: var(--bg);
  background-image: linear-gradient(180deg, #FDFAF6 0%, var(--bg) 400px);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.5;
}

a { color: var(--accent-hover); }  /* 承载文字须 ≥4.5:1:--accent 仅 4.21:1,--accent-hover 6.14:1(R12) */

button {
  font: inherit;
  color: inherit;
}

::placeholder { color: var(--ink-3); opacity: 1; }

::selection { background: #E8DFD0; }

:focus-visible {
  outline: 2.5px solid #6B5B45;   /* 不透明,≥3:1,WCAG 2.2(R12) */
  outline-offset: 2px;
}

/* 所有可点组件:轻微缩放反馈,无弹跳 */
.btn:active,
.btn-ghost:active,
.pill-choice:active,
.option-card:active,
.term-chip:active,
.mic-btn:active { transform: scale(.97); }

/* 无障碍:尊重系统「减少动态效果」偏好,动画/过渡退化为瞬间(R12) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 顶部导航 ---------- */
/* 外层横贯屏幕,底部一条细线把导航和内容分开(不加重底色,保持书房的轻) */
.top-nav-wrap {
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 20px;
}
.top-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  /* 导航比正文栏宽:字标靠左、标签靠右,页面有骨架感,不再挤在中间 */
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);   /* 字标与登录页统一为无衬线,不再宋体 */
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark { display: block; flex: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

/* 导航项:标签式下划线(hover/选中亮起),让人一眼看出可点 */
.nav-link {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  padding: 2px 1px;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.nav-link:hover { color: var(--accent-hover); border-bottom-color: var(--line-soft); }

.nav-link.active { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }  /* 正文级链接文字 ≥4.5:1(R12) */

/* 离线不可用的导航项(如群贤):灰显、禁点、悬停/聚焦浮出说明 */
.nav-disabled {
  color: var(--ink-3);
  cursor: not-allowed;
  opacity: .6;
  position: relative;
  border-bottom-color: transparent !important;
}
.nav-disabled:hover { color: var(--ink-3); border-bottom-color: transparent; }
.nav-disabled::after {
  content: attr(title);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: max-content;
  max-width: 220px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  line-height: 1.6;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.nav-disabled:hover::after,
.nav-disabled:focus-visible::after { opacity: 1; transform: translateY(0); }

/* ---------- 回到顶部:右下角悬浮,滚过第一屏才浮现 ---------- */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: var(--card);
  color: var(--ink-2);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, color .2s ease, border-color .2s ease;
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover { color: var(--accent-hover); border-color: var(--accent); }
.back-top:active { transform: scale(.94); }
@media (max-width: 640px) {
  .back-top { right: 16px; bottom: 16px; }
}

/* 品牌印章:「慢」字小方印,朱砂色,唯一的一处点缀色(非状态色) */
.brand-seal {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  border: 1.5px solid var(--seal);
  border-radius: 2px;
  color: var(--seal);
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 400;
  line-height: 12px;
  letter-spacing: 0;
  text-align: center;
  vertical-align: .45em;   /* 上标位置 */
}

/* ---------- 页面容器 ---------- */
.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 36px 24px 88px;
}

.page-wide {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 24px 88px;
}

/* 垂直居中舞台(onboarding / intake / 兜底页) */
.center-stage {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 56px;
  text-align: center;
}

/* ---------- 教练引导语(手写信声部) ---------- */
.coach-lead {
  font-family: var(--hand);
  font-size: 19px;          /* 楷体视觉密度低,+1px 补偿 */
  line-height: 1.9;
  color: var(--ink);
}

/* 手写信声部 · 页面私有类的字体统一在此声明(免各页重复);
   带元素选择器提高特异性,盖过页内旧的 var(--serif) 声明 */
p.daily-quote,
p.wait-quote,
p.next-wrap-line,
.daily-quote,
.wait-quote,
.next-wrap-line {
  font-family: var(--hand);
}

p.daily-quote,
p.wait-quote {
  font-size: 15px;          /* 名言小字 +1px */
  line-height: 2;
}

p.next-wrap-line {
  font-size: 17px;
  line-height: 1.9;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: 8px;
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.focus-card {
  width: 520px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--card);
  border-radius: 8px;
  padding: 36px;
  box-shadow: var(--shadow-float);
}

/* 可点场景的 .card(链接/按钮形态):hover 轻浮起 */
a.card,
button.card {
  cursor: pointer;
  transition: box-shadow .2s ease, transform .2s ease;
}

a.card:hover,
button.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 30px;
  border: none;
  border-radius: 23px;
  background: #6B5B45;      /* 白字对比 6.14:1,过 WCAG AA(R12) */
  color: #FBF7F2;
  font-size: 16px;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn:hover {
  background: #57472F;      /* hover 更深(R12) */
  box-shadow: 0 4px 14px rgba(87, 71, 47, .22);
}

.btn:disabled { box-shadow: none; }

.btn:disabled { opacity: .55; cursor: default; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 26px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: transparent;
  color: var(--accent-hover);  /* ghost 按钮文字 ≥4.5:1:--accent 仅 4.21:1(R12) */
  font-size: 15px;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent-hover); }

.btn-ghost:disabled { opacity: .55; cursor: default; }

/* ---------- 胶囊选项组(归来仪式等) ---------- */
.pill-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 26px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 15px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease, transform .2s ease;
}

.pill-choice:hover {
  border-color: var(--accent);
  color: var(--accent-hover);  /* hover 文字 ≥4.5:1:--accent 仅 4.21:1(R12) */
}

.pill-choice:disabled { opacity: .55; cursor: default; }

/* ---------- 选择卡(onboarding / 选择题) ---------- */
.option-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid #EFE9E0;
  border-left: 3px solid var(--tag-bg);
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, background-color .2s ease,
              color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.option-card:not(:disabled):hover {
  border-left-color: var(--accent);
  background: #FDFBF7;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* 选中态减重(全站唯一方案):浅底 + accent 加粗 + 左 3px accent 线 */
.option-card.selected {
  background: var(--tag-bg);
  border-color: var(--tag-bg);
  border-left-color: var(--accent);
  color: var(--accent-hover);  /* 选中文字压在 tag-bg 上须 ≥4.5:1:--accent 仅 3.68:1,--accent-hover 5.37:1(R12) */
  font-weight: 600;
}

/* ---------- 输入 ---------- */
.input-line,
.textarea-line {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  padding: 10px 2px;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* 聚焦:底线过渡为 accent,并以 1px box-shadow 模拟底线加粗生长
   (input 元素不支持伪元素,不改模板结构的前提下的简洁等效) */
.input-line:focus,
.textarea-line:focus {
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent);
}

/* 全站 textarea:自动随内容长高(common.js 全局接管),横线永远紧贴文字(#4 全局根治) */
.textarea-line {
  resize: none;
  overflow: hidden;
  min-height: 40px;
  line-height: 1.7;
  padding-bottom: 6px;
}

/* ---------- 标签与术语 ---------- */
.tag-pill {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 13px;
  line-height: 1.6;
}

.term-chip {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--accent-hover);  /* chip 文字压在 tag-bg 上须 ≥4.5:1:--accent 仅 3.68:1,--accent-hover 5.37:1(R12) */
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 14px;
  line-height: 1.7;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.term-chip:hover {
  border-color: var(--accent);
  background: #E8E0D3;
  transform: translateY(-1px);
}

/* ---------- 教练反馈块 ---------- */
.feedback-block {
  border-left: 3px solid var(--accent);
  background: #F7F1E8;
  border-radius: 0 8px 8px 0;
  padding: 18px 22px;
  margin-top: 20px;
  color: var(--ink);
  line-height: 1.85;
}
/* 反馈分多段时,段落之间留呼吸空隙 */
.feedback-block p { margin: 0 0 10px; }
.feedback-block p:last-child { margin-bottom: 0; }

/* ---------- 对话气泡(工作台自由对话区) ---------- */
.bubble-user {
  background: var(--bubble-user);
  border-radius: 12px 12px 2px 12px;
  padding: 12px 16px;
  max-width: 85%;
  margin-left: auto;
  width: fit-content;
}

/* 教练气泡类为 today.html 私有 .coach-msg(唯一定义,--hand 声部);此处不再重复定义 */

/* ---------- 日志卡 ---------- */
.journal-card {
  display: block;
  background: var(--card);
  border-left: 2px solid var(--tag-bg);
  border-radius: 6px;
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.journal-card:hover {
  border-left-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.mood-emoji {
  font-size: 22px;
  line-height: 1;
}

/* ---------- 低调链接 ---------- */
.link-quiet {
  display: inline-block;
  background: none;
  border: none;
  border-bottom: 1px dotted #C9C0B5;
  padding: 0 0 1px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-3);
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.link-quiet:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- 辅助 ---------- */
.muted { color: var(--ink-2); }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--ink-3);
  line-height: 2;
}
.empty-state .btn { margin-top: 14px; }
.journal-empty-alt { margin-top: 12px; font-size: 14px; }

/* ---------- 语音按钮 ---------- */
.mic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-2);
  font-size: 17px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.mic-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mic-btn.recording {
  border-color: var(--accent);
  color: var(--accent);
  animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 115, 85, .28); }
  50%      { box-shadow: 0 0 0 10px rgba(139, 115, 85, 0); }
}

/* ---------- 入场动效:渐显 + 轻微上移,无弹跳 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeUp .45s ease-out both; }

/* ---------- 模态弹层(术语卡等) ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(26, 26, 26, .35);
  animation: maskIn .2s ease-out both;
}

@keyframes maskIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 440px;
  max-height: 82vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 8px;
  padding: 28px;
  text-align: left;
  box-shadow: var(--shadow-float);
  animation: fadeUp .3s ease-out both;
}

/* 术语卡内部(common.js 渲染) */
.term-title {
  font-family: var(--serif);   /* 已自托管思源宋体 SemiBold,标题用衬线更雅致 */
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .01em;
}

.term-en {
  font-size: 14px;
  margin-top: 2px;
}

.term-section {
  margin-top: 18px;
  line-height: 1.8;
}

.term-label {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: .05em;
  margin-bottom: 4px;
}

.term-mini {
  margin-top: 18px;
  font-size: 15px;
}

.term-actions {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ---------- 轻提示 toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  z-index: 300;
  transform: translateX(-50%) translateY(8px);
  max-width: calc(100vw - 48px);
  background: #FFFDFA;
  color: var(--ink-2);
  border: 1px solid #EDE6DB;
  border-radius: 22px;
  padding: 10px 24px;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- onboarding(首次测评)页面私有 ---------- */
.onboarding-box {
  width: 520px;
  max-width: 100%;
}

/* 总结页加宽:用上网页的横向空间,阶段卡铺成两列,不再细长竖列(#7) */
.onboarding-box.box-wide { width: 760px; }
/* 寄语短句居中显得温暖;真超一行时中文按 anywhere 换行,不留丑参差(product) */
.onboarding-box.box-wide .ob-greeting {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.9;
  text-wrap: pretty;   /* 支持的浏览器会让末行更均衡,不支持也无害 */
}
.onboarding-box.box-wide .ob-sub { text-align: center; }

.ob-step {
  transition: opacity .25s ease, transform .25s ease;
}

.ob-step.leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.ob-question {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.ob-sub {
  color: var(--ink-3);
  font-size: 14px;
  margin-bottom: 28px;
}

.ob-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

/* 「继续」与「回到上一题」各占一行、居中,拉开呼吸感(与预览稿一致) */
.ob-next {
  display: flex;
  width: fit-content;
  margin: 28px auto 0;
}

.ob-back {
  display: block;
  width: fit-content;
  margin: 30px auto 0;
}

.ob-greeting {
  font-family: var(--hand);
  font-size: 20px;
  line-height: 1.95;
  max-width: 460px;
  margin: 0 auto;
  text-align: left;   /* 长寄语左对齐更好读,不再居中挤成一坨 */
}
/* 寄语分段:每段之间留呼吸空隙(#7) */
.ob-greeting-p { margin: 0 0 14px; }
.ob-greeting-p:last-child { margin-bottom: 0; }

.ob-stage { margin-top: 18px; }

/* ---------- 归来仪式(intake)页面私有 ---------- */
.intake-box {
  width: 520px;
  max-width: 100%;
}

.intake-greeting { margin-bottom: 26px; }

.intake-hint {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.hiatus-row { margin-top: 40px; }

.hiatus-form {
  margin-top: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
}

.hiatus-form .input-line { width: 180px; }

.intake-message {
  font-family: var(--hand);
  font-size: 21px;
  max-width: 480px;
}

/* ---------- 兜底页私有 ---------- */
.index-hero .brand-word {
  font-family: var(--serif);
  font-size: 34px;
  letter-spacing: .18em;
  margin-bottom: 14px;
}

.index-hero .coach-lead { margin-bottom: 34px; }

/* ---------- 移动端 ≤640px:单栏、收紧 ---------- */
@media (max-width: 640px) {
  .top-nav { padding: 16px 16px 6px; }

  .nav-links { gap: 16px; }

  .page,
  .page-wide { padding: 24px 16px 72px; }

  .center-stage {
    min-height: calc(100vh - 110px);
    padding: 24px 16px 48px;
  }

  .card { padding: 22px 18px; }

  .focus-card {
    width: calc(100vw - 32px);
    padding: 24px 18px;
  }

  .journal-card { padding: 20px 18px; }

  .modal-card {
    max-width: none;
    width: calc(100vw - 32px);
    padding: 24px 20px;
  }

  .coach-lead { font-size: 18px; }

  .ob-question { font-size: 20px; }

  .pill-row { gap: 10px; }

  .pill-choice { padding: 0 20px; }

  .hiatus-form {
    flex-direction: column;
    align-items: center;
  }
}

/* ---------- 进门 / 建房(login · register) ---------- */
.auth-card {
  width: 400px;
  max-width: 100%;
  padding: 36px 32px 32px;
  text-align: left;
}

.auth-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 26px;
  text-align: center;
}

.auth-card .input-line { margin-bottom: 18px; }

.auth-btn {
  width: 100%;
  margin-top: 10px;
}

.auth-alt { margin-top: 22px; }

/* 安静的表单提示:深棕,不刺眼但达标 */
.form-error {
  color: var(--accent-hover);  /* 提示文字 ≥4.5:1:--accent 仅 4.21:1,--accent-hover 6.14:1(R12) */
  font-size: 14px;
  line-height: 1.7;
  margin: 2px 0 6px;
}

/* ---------- 导航右侧:个人中心与退出 ----------
   个人中心不再单独缩小变淡:与其他导航项同字号同颜色(用户反馈 2026-07-07) */

.nav-logout { display: inline; }

.nav-logout-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 15px;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .2s ease;
}

.nav-logout-btn:hover { color: var(--accent); }

@media (max-width: 640px) {
  .nav-user { display: none; }

  .auth-card {
    width: calc(100vw - 32px);
    padding: 28px 20px 26px;
  }
}
