:root {
  color-scheme: light;
  --paper: #fff5e0;
  --surface: #ffffff;
  --ink: #1d2a33;
  --muted: #68766f;
  --line: #f0d9be;
  --accent: #2a4055;
  --accent-dark: #1d3042;
  --accent-soft: #eaf3fb;
  --warm: #d95f4b;
  --warm-soft: #fff0e7;
  --shadow: 0 24px 70px rgba(29, 42, 51, 0.08);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { max-width: 100%; overflow-x: hidden; }

/* 顶部导航高度集中定义，桌面端算会话区高度要用到。 */
:root { --header-h: clamp(64px, 9vh, 96px); }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  /* 必须是确定高度：用 min-height 时 flex 子项拿不到高度，
     对话一多整页会被撑长，滚到底再点输入框就会跳回顶部。 */
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 128, 92, 0.30), transparent 30rem),
    radial-gradient(circle at 100% 0%, rgba(255, 208, 64, 0.40), transparent 30rem),
    radial-gradient(circle at 55% 108%, rgba(255, 194, 84, 0.20), transparent 34rem),
    var(--paper);
  transition: background-color 240ms ease;
}

body.high-temperature { background-color: #ffe8db; }
button, input, select, textarea { font: inherit; }
button, select, input[type="range"] { cursor: pointer; }
button:disabled, input:disabled, textarea:disabled { cursor: not-allowed; opacity: 0.6; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(37, 95, 85, 0.24);
  outline-offset: 3px;
}

.site-header {
  width: min(1120px, calc(100% - 48px));
  height: clamp(64px, 9vh, 96px);
  flex: none;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: 0.12em; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: block;
  flex: 0 0 auto;
  border-radius: 9px;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; display: block; }
/* 品牌与定位短语放左边一组；右边只留操作入口，避免"一句话挨着一个按钮"。 */
.brand-block { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-tagline { padding-left: 0; border-left: 0; color: #b45f43; font-weight: 500; font-size: inherit; letter-spacing: 0.04em; white-space: nowrap; }
.brand-dot { color: #d79a5f; font-size: 16px; font-weight: 400; letter-spacing: 0; line-height: 1; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.history-entry { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid #e0c4ae; border-radius: 999px; background: #fffaf3; color: var(--accent); font-size: 12.5px; font-weight: 650; line-height: 1.3; letter-spacing: .01em; box-shadow: 0 1px 0 rgba(170, 113, 76, .08); }
.history-entry::after { content: '›'; font-size: 14px; line-height: 1; color: currentColor; opacity: .55; transform: translateY(-1px); }
.history-entry:hover { border-color: #cfa98c; background: #fdf1e5; color: var(--accent-dark); }
.history-entry:focus-visible { outline: 2px solid rgba(185, 118, 62, .35); outline-offset: 2px; }
.ghost-link { padding: 6px 2px; border: 0; border-bottom: 1px solid transparent; color: var(--muted); background: transparent; font-size: 13px; cursor: pointer; transition: color 160ms ease, border-color 160ms ease; }
.ghost-link:hover { color: var(--accent); border-bottom-color: currentColor; }
/* 记录入口要像按钮，不是一段可点文字 */
.ghost-link.history-entry { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid #e0c4ae; border-radius: 999px; background: #fffaf3; color: var(--accent); font-size: 12.5px; font-weight: 650; line-height: 1.3; letter-spacing: .01em; box-shadow: 0 1px 0 rgba(170, 113, 76, .08); }
.ghost-link.history-entry::after { content: '›'; font-size: 14px; line-height: 1; color: currentColor; opacity: .55; transform: translateY(-1px); }
.ghost-link.history-entry:hover { border-color: #cfa98c; background: #fdf1e5; color: var(--accent-dark); }

.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; }

.app-shell {
  width: min(1120px, calc(100% - 48px));
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding: clamp(12px, 2.4vh, 36px) 0 clamp(16px, 3.4vh, 72px);
  /* 桌面端整页不再滚动：起始页内容多时在这里滚，会话页则锁在一屏内。 */
  overflow-y: auto;
  overscroll-behavior: contain;
}
.view { flex: 1; min-height: 0; animation: arrive 420ms ease both; }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.eyebrow { margin: 0 0 clamp(10px, 2vh, 18px); color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: clamp(12px, 2.6vh, 24px); font-family: "Songti SC", "Noto Serif CJK SC", serif; font-size: clamp(32px, min(5vw, 6vh), 62px); font-weight: 500; line-height: 1.28; letter-spacing: -0.03em; }
h2 { font-family: "Songti SC", "Noto Serif CJK SC", serif; font-weight: 600; }

.consent-view { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; }
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 5vh, 64px) 0;
  text-align: center;
}
.welcome-eyebrow { margin: 0 0 clamp(16px, 3.2vh, 32px); color: var(--accent); font-size: 12px; letter-spacing: 0.22em; }
.welcome h1 {
  margin-bottom: clamp(14px, 2.8vh, 26px);
  font-size: clamp(38px, min(6vw, 7vh), 64px);
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: 0.02em;
}
.welcome-subtitle {
  max-width: 24em;
  margin: 0 0 clamp(28px, 5.6vh, 58px);
  color: var(--muted);
  font-size: clamp(14px, 1.7vh, 16px);
  line-height: 1.9;
}
.welcome-button {
  min-width: 150px;
  padding: 13px 36px;
  border: 0;
  border-radius: 999px;
  color: var(--accent);
  background: #fffdf7;
  box-shadow:
    0 0 0 2px #f4b860,
    0 0 0 5px #fff6df,
    0 0 0 7px #62a9d8,
    0 0 0 10px #fff6df,
    0 0 0 12px #f08fa8,
    0 0 0 15px #fff6df,
    0 0 0 17px #ef7b63;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
}
.welcome-button:hover {
  color: #fff;
  background: var(--accent);
  transform: translateY(-1px);
}
.welcome-note { margin: clamp(20px, 4vh, 42px) 0 0; color: #97a39d; font-size: 12px; }
.welcome-consent-link {
  margin-top: 10px;
  padding: 2px;
  border: 0;
  color: #97a39d;
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 160ms ease;
}
.welcome-consent-link:hover { color: var(--accent); }

/* 欢迎页第二个入口：第一次来的人先看“这里是什么”。 */
.welcome-intro-link { margin-top: 8px; }

.welcome-foot {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap; margin-top: clamp(18px, 3vh, 30px);
  font-size: 12px; color: #97a39d; padding: 0 18px;
  width: 100%;
  max-width: 560px;
}
.welcome-foot-link { color: var(--accent); text-decoration: none; }
.welcome-foot-link:hover { text-decoration: underline; }
.welcome-foot-sep { opacity: .5; }

.intro-dialog .consent-panel { width: min(480px, calc(100vw - 36px)); }
.intro-dialog .consent-list p { line-height: 1.8; }
.intro-dialog .sheet-actions { flex-direction: column; }
.intro-dialog .sheet-actions .primary-button { flex: none; }
.intro-dialog-lead {
  margin: 0 0 4px; font-size: 14px; line-height: 1.8; color: #4e5f58;
}
.intro-dialog-note {
  margin: 16px 0 18px; font-size: 12.5px; line-height: 1.7; color: #6b7780;
}

/* 起始页只保留标题与主按钮，进入梳理后再显示顶部入口。 */
body.is-welcome .header-actions { display: none; }

.consent-dialog {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.consent-dialog[open] { display: flex; align-items: flex-end; justify-content: center; }
.consent-dialog::backdrop { background: rgba(35, 45, 41, 0.34); backdrop-filter: blur(2px); }
.consent-panel {
  width: min(620px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: clamp(24px, 4vh, 44px) clamp(22px, 4vw, 46px) clamp(18px, 3vh, 30px);
  border-radius: 24px 24px 0 0;
  background: #fffdf8;
  box-shadow: 0 -18px 60px rgba(31, 45, 40, 0.18);
  animation: sheet-rise 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sheet-rise {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.consent-panel h2 { margin-bottom: clamp(12px, 2vh, 20px); font-size: clamp(20px, 2.4vh, 25px); }
.consent-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: clamp(12px, 2vh, 18px) 0 clamp(16px, 2.6vh, 22px);
  color: #52635d;
  font-size: 13px;
  cursor: pointer;
}
.consent-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.sheet-actions { display: flex; gap: 12px; }
.sheet-actions .primary-button { flex: 1; justify-content: center; }
.ghost-button {
  min-height: clamp(46px, 6vh, 52px);
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 3px 14px 3px 14px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}
.ghost-button:hover { color: var(--accent); border-color: rgba(37, 95, 85, 0.4); }

.setup-card {
  padding: clamp(22px, 3.6vh, 44px) clamp(24px, 3vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 4px 36px 4px 36px;
  background: rgba(255, 254, 250, 0.9);
  box-shadow: var(--shadow);
}
.card-kicker { margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.consent-list { list-style: none; padding: 0; margin: 0; }
.consent-list li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: clamp(9px, 1.7vh, 15px) 0; border-top: 1px solid var(--line); }
.consent-list li > span { padding-top: 3px; color: #8b9c94; font-size: 11px; font-variant-numeric: tabular-nums; }
.consent-list p { margin: 0; color: #52635d; font-size: 14px; line-height: 1.7; }
.consent-list strong { color: var(--ink); font-weight: 650; }
.safety-note { margin: clamp(12px, 2.2vh, 20px) 0 clamp(16px, 2.6vh, 26px); padding: clamp(10px, 1.8vh, 14px) 16px; border-left: 2px solid #c4876f; color: #815647; background: #f9f0e9; font-size: 12px; line-height: 1.7; }

.primary-button {
  width: 100%;
  min-height: clamp(46px, 6vh, 52px);
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 3px 14px 3px 14px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 24px rgba(37, 95, 85, 0.16);
  font-weight: 600;
  transition: background 160ms ease, transform 160ms ease;
}
.primary-button:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button.compact { width: auto; min-width: 112px; min-height: 44px; gap: 20px; padding: 10px 18px; }

.recommend-panel textarea { min-height: 92px; margin-top: 4px; }
.recommend-panel .sheet-actions { margin-top: 18px; }

.setup-view { max-width: 700px; width: 100%; margin: 0 auto; display: block; min-height: 0; }
.setup-view .section-heading { margin: 0 auto clamp(14px, 2.6vh, 24px); text-align: center; }
/* 起手问题放在表单首行，跟卡片内文一起从左边起（选择器压过 .setup-view h1） */
.setup-card .setup-kicker { margin: 0 0 3px; font-family: var(--serif); font-size: clamp(17px, 4.4vw, 21px); font-weight: 650; line-height: 1.45; letter-spacing: 0.01em; color: var(--ink); text-align: left; }
.setup-sub { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: left; }
.setup-view .section-heading h1 { font-size: clamp(26px, min(4vw, 3.6vh), 34px); }
.setup-view .section-heading > p:last-child { max-width: 34em; margin: 0 auto; color: var(--muted); font-size: 13px; line-height: 1.8; }
.section-heading > p:last-child { max-width: 380px; color: var(--muted); line-height: 1.8; }
.setup-card { display: grid; gap: clamp(12px, 2vh, 22px); }
.template-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 2px;
  border: 0;
  transition: color 180ms ease;
}
.template-summary { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.template-summary.is-recommended { color: var(--accent-dark); }
.template-bar.is-recommended { border-color: var(--accent); background: var(--accent-soft); }
.template-switch { flex: none; font-size: 12px; }
.companion-tools { display: grid; gap: 12px; }
.recommend-box { padding: 16px; border-radius: 12px; background: var(--accent-soft); }
.recommend-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.recommend-inline { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.recommend-inline input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid rgba(37, 95, 85, 0.22); border-radius: 8px; color: var(--ink); background: #fff; font-size: 12px; }
.recommend-inline input::placeholder { color: #9aa59f; }
.recommend-inline .secondary-button { flex: none; padding: 9px 13px; background: #fff; font-size: 12px; }
.recommend-heading strong { font-size: 13px; }
.recommend-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; white-space: nowrap; }
.secondary-button { flex: none; padding: 9px 13px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent); background: rgba(255, 255, 255, 0.65); font-size: 12px; }
.secondary-button:hover:not(:disabled) { color: #fff; background: var(--accent); }
.recommend-reason { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(37, 95, 85, 0.16); color: var(--accent-dark); font-size: 12px; line-height: 1.75; }
.field-group label, .temperature-heading label { font-size: 14px; font-weight: 650; }
.template-fields { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; }
.select-wrap { position: relative; margin-top: 12px; }
.select-wrap::after { content: "⌄"; position: absolute; right: 16px; top: 11px; color: var(--muted); pointer-events: none; }
select { width: 100%; padding: 14px 42px 14px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; appearance: none; }
.field-hint { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.personalized { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.personalized-label { flex: none; color: var(--muted); font-size: 11px; letter-spacing: 0.14em; }
.personalized-list { display: flex; flex-wrap: wrap; gap: 8px; }
.template-chip { display: inline-flex; align-items: baseline; gap: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); background: #fff; font-size: 12px; transition: border-color 160ms ease, color 160ms ease; }
.template-chip:hover { border-color: var(--accent); color: var(--accent-dark); }
.template-chip span { color: var(--muted); font-size: 10px; }
.discovery { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: transparent; font-size: 11px; }
.tag-chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }

.template-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 99px;
  background: #ecefe9;
}
.tab-button {
  padding: 7px 16px;
  border: 0;
  border-radius: 99px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  transition: color 160ms ease, background 160ms ease;
}
.tab-button[aria-selected="true"] { color: #fff; background: var(--accent); }
.mine-panel { display: grid; gap: 8px; }
.mine-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.mine-empty {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.my-companion-list {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
}
.my-companion-card {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.my-companion-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.my-companion-name { font-size: 13px; font-weight: 650; }
.status-badge {
  flex: none;
  padding: 3px 9px;
  border-radius: 99px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.status-badge[data-status="reviewing"] { color: #7a5a1f; background: #f7edd5; }
.status-badge[data-status="rejected"] { color: #8a4a37; background: #f9ece6; }
.status-badge[data-status="published"] { color: #1f5b4f; background: #e2f0e9; }
.my-companion-meta { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.my-companion-reason {
  margin: 7px 0 0;
  padding: 7px 9px;
  border-radius: 8px;
  color: #8a4a37;
  background: #f9ece6;
  font-size: 11px;
  line-height: 1.6;
}
.my-companion-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.my-companion-actions .text-button { padding: 2px 0; font-size: 12px; }
.my-companion-actions .secondary-button { margin-left: auto; }
.temperature-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.temperature-heading output { min-width: 48px; color: var(--accent); font-family: Georgia, serif; font-size: 38px; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }

input[type="range"] {
  --value: 50%;
  width: 100%;
  height: 24px;
  margin: 16px 0 4px;
  padding: 0;
  background: transparent;
  appearance: none;
}
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--accent) 0 var(--value), #dfe5df var(--value) 100%); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: linear-gradient(to right, var(--accent) 0 var(--value), #dfe5df var(--value) 100%); }
input[type="range"]::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -8px; border: 5px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 1px 5px rgba(27, 61, 52, 0.28); appearance: none; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 5px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 1px 5px rgba(27, 61, 52, 0.28); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }

.session-view { width: 100%; max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; min-height: 0; padding: clamp(8px, 2vh, 28px); border-radius: 4px 30px 4px 30px; transition: background 240ms ease; }
.session-topline { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: clamp(12px, 2.2vh, 26px); }
.session-topline .eyebrow { margin-bottom: 10px; }
.session-topline h1 { margin: 0; font-size: clamp(26px, min(4vw, 4.6vh), 42px); }
.text-button { padding: 8px 0; border: 0; border-bottom: 1px solid #9aaba3; color: var(--muted); background: transparent; font-size: 13px; }
.text-button:hover { color: var(--ink); }
.de-escalation-banner { margin-bottom: 18px; padding: 15px 18px; display: flex; align-items: center; gap: 14px; border: 1px solid #e3b6a5; border-radius: 10px; color: #803e2e; background: var(--warm-soft); font-size: 13px; }
.de-escalation-banner strong { flex: none; padding: 4px 9px; border-radius: 99px; color: #fff; background: var(--warm); font-size: 12px; letter-spacing: 0.08em; }
.session-view.is-de-escalated { background: rgba(255, 235, 225, 0.72); }
.session-view.is-de-escalated .session-shell { border-color: #dfb6a6; }
.session-shell { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(215, 223, 216, 0.9); border-radius: 4px 24px 4px 24px; background: var(--surface); box-shadow: var(--shadow); }
.chat-log { flex: 1; min-height: 0; padding: clamp(18px, 3.2vh, 32px); overflow-y: auto; scroll-behavior: smooth; }
.message { max-width: 82%; margin-bottom: clamp(12px, 2.2vh, 22px); animation: arrive 260ms ease both; }
.message-bubble { padding: 16px 19px; border-radius: 3px 16px 16px 16px; background: #edf2ed; font-size: 15px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user { margin-left: auto; }
.message.user .message-bubble { border-radius: 16px 3px 16px 16px; color: #fff; background: var(--accent); }
.message.typing .message-bubble { width: fit-content; display: flex; align-items: center; gap: 5px; padding: 14px 19px; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: #8ca096; animation: pulse 1s infinite alternate; }
.typing-dot:nth-child(3) { animation-delay: 180ms; }
.typing-dot:nth-child(4) { animation-delay: 360ms; }
@keyframes pulse { to { opacity: 0.25; transform: translateY(-2px); } }

.reply-panel { flex: none; display: flex; align-items: flex-end; gap: 10px; padding: clamp(14px, 2.4vh, 24px) clamp(18px, 3vw, 30px) clamp(16px, 2.8vh, 28px); border-top: 1px solid var(--line); background: #fafaf6; }
.reply-panel textarea { flex: 1; min-width: 0; margin-top: 0; }
.send-button { width: 46px; height: 46px; flex: none; border: 1px solid var(--accent); border-radius: 50%; color: #fff; background: var(--accent); font-size: 19px; line-height: 1; transition: transform 160ms ease, opacity 160ms ease; }
.send-button:hover:not(:disabled) { transform: translateY(-1px); }
.send-button:disabled { opacity: 0.45; cursor: default; }
/* 结束评价：三道题、每题三档，点一下选中，省掉 0-10 滑杆的理解成本 */
.pick-fields { border: none; margin: 0 0 clamp(14px, 2.2vh, 28px); padding: 0; display: grid; gap: 14px; }
.pick-fields legend { padding: 0; margin-bottom: clamp(6px, 1.4vh, 12px); font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.pick-item { display: grid; gap: 7px; }
.pick-q { margin: 0; font-size: 14.5px; color: var(--ink); font-weight: 600; }
.pick-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.end-state { display: grid; gap: 8px; margin: 0 0 18px; }
.end-state-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.end-state-option { position: relative; display: block; }
.end-state-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.end-state-option span { display: block; padding: 9px 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); font-size: 12.5px; text-align: center; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, color 160ms ease; }
.end-state-option input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.end-state-option input:focus-visible + span { outline: 3px solid rgba(37, 95, 85, .24); outline-offset: 2px; }
@media (max-width: 420px) { .end-state-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pick-chip { padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); font-family: inherit; font-size: 13.5px; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, color 160ms ease; }
.pick-chip:hover { border-color: #b7c7bf; }
.pick-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pick-chip:focus-visible { outline: 3px solid rgba(37, 95, 85, .24); outline-offset: 2px; }
.reason-options { display: flex; flex-wrap: wrap; gap: 7px; }
.reason-chip { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-family: inherit; font-size: 12.5px; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, color 160ms ease; }
.reason-chip:hover { border-color: #b7c7bf; }
.reason-chip[aria-pressed="true"] { border-color: #c08a5a; background: #fbf1e6; color: #8a5a2e; font-weight: 600; }
.reason-chip:focus-visible { outline: 3px solid rgba(192, 138, 90, .26); outline-offset: 2px; }
@media (max-width: 380px) { .pick-chip { font-size: 12.5px; padding: 9px 4px; } }
@media (max-height: 760px) { .pick-fields { margin-bottom: 10px; } .pick-fields legend { margin-bottom: 4px; } }
.state-field { display: grid; gap: 4px; }
/* 状态 + 词库合成一块：暖色底，和上面的青色理性区隔开 */
.state-panel {
  padding: 14px 10px 12px;
  border: 1px solid #f0dfd1;
  border-radius: 16px;
  background: #fcf0e7;
}
@media (max-width: 600px) {
  .state-panel .state-option { gap: 10px; padding: 10px 12px; }
  .state-panel .state-option-text { gap: 8px; }
  .state-panel .state-option-text small { font-size: 11px; }
}
.state-panel .state-question { margin-bottom: 8px; }
.state-panel .state-option { padding: 14px 14px 14px 46px; border-color: #f0e3d9; }
.state-panel .state-option-dot { display: none; }
.state-option-icon { left: 14px; right: auto; }
.state-panel .state-option:hover { border-color: #e0c7b4; }
.state-panel .state-option:has(input:checked) { border-color: #c98f63; background: #f6dbc2; }
.state-panel .state-option:has(input:checked) .state-option-dot { border-color: #b9762e; }
.state-panel .mood-row-setup { margin: 10px 0 0; }
.state-panel .mood-chip { border-color: #eeddd0; background: #fffdfb; }
.mood-chip[data-mood="焦躁"] { border-color: #e3b99c; background: #fbeee4; color: #8a5330; }
.mood-chip[data-mood="无力"] { border-color: #cfd6d2; background: #f1f3f2; color: #5f6d68; }
.mood-chip[data-mood="委屈"] { border-color: #bfcfe0; background: #eef3f9; color: #41597a; }
.mood-chip[data-mood="迷茫"] { border-color: #cfc4dc; background: #f3eff8; color: #5f5079; }
.mood-chip[data-mood="自责"] { border-color: #ddc1b3; background: #f7ebe4; color: #7c5343; }
.mood-chip[data-mood="失控"] { border-color: #e0aaa4; background: #fbe7e5; color: #8b4038; }
.mood-chip[data-mood][aria-pressed="true"] { box-shadow: 0 0 0 2px currentColor inset; }
.state-panel .mood-chip:hover { border-color: #dcbfa8; }

/* 情绪象限：先选一大类，愿意的话再选具体词；只选类别也能成立。 */
.mood-chips.mood-quad-row { display: block; }
.mood-quad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 9px; }
.mood-quad {
  --q-bg: #f7e6dc;
  --q-line: #e9cdbf;
  --q-ink: #774536;
  --q-strong: #8e4f3d;
  padding: 8px;
  border: 1px solid var(--q-line);
  border-radius: 12px;
  background: var(--q-bg);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.mood-quad[data-group="red"] { --q-bg: #f8ded4; --q-line: #e9c4b5; --q-ink: #7b3f31; --q-strong: #9a4d38; }
.mood-quad[data-group="yellow"] { --q-bg: #faedca; --q-line: #e8d4a7; --q-ink: #785a28; --q-strong: #9a7130; }
.mood-quad[data-group="blue"] { --q-bg: #dce7f1; --q-line: #c5d6e5; --q-ink: #3f5a74; --q-strong: #486a8d; }
.mood-quad[data-group="green"] { --q-bg: #e2eee1; --q-line: #cbdcc9; --q-ink: #42604d; --q-strong: #496f56; }
.mood-quad.is-active { border-color: var(--q-strong); box-shadow: 0 0 0 2px var(--q-strong); }
.mood-quad-head {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  row-gap: 2px;
  column-gap: 7px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--q-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.mood-quad-head:focus-visible { outline: 3px solid rgba(37, 95, 85, .24); outline-offset: 3px; border-radius: 5px; }
.mood-quad-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--q-strong); opacity: .8; }
.mood-quad-title { grid-column: 2; font-size: 12.5px; font-weight: 650; line-height: 1.35; }
/* 三套词表的说明行数不同；锁两行高度，切换目标时下方词块和整页不跳动。 */
.mood-quad-note { grid-column: 2; min-height: 3em; color: var(--q-ink); opacity: .72; font-size: 10.5px; line-height: 1.5; }
.mood-quad-words { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 7px; }
.mood-word {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 2.6em;
  padding: 4px 2px;
  border: 1px solid var(--q-line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .62);
  color: var(--q-ink);
  font-family: inherit;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}
.mood-word:hover { border-color: var(--q-strong); background: rgba(255, 255, 255, .86); }
.mood-word.is-active { border-color: var(--q-strong); background: var(--q-strong); color: #fff; font-weight: 650; }
.mood-word:focus-visible { outline: 3px solid rgba(37, 95, 85, .24); outline-offset: 2px; }
.mood-chips.mood-group-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mood-group-chip.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
@media (max-width: 380px) {
  .mood-quad-grid { gap: 6px; }
  .mood-quad { padding: 7px; }
  .mood-quad-title { font-size: 11.5px; }
  .mood-quad-note { font-size: 10px; }
  .mood-word { font-size: 10.5px; }
}

.state-question { margin: 0; text-align: center; font-size: clamp(17px, min(2.4vw, 2.4vh), 22px); font-weight: 650; }
.state-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.state-option { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 40px 14px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color 160ms ease, background 160ms ease; }
.state-option-icon { position: absolute; right: 13px; top: 50%; width: 24px; height: 24px; transform: translateY(-50%); color: #b08a6a; opacity: .62; }
.state-panel .state-option:has(input:checked) .state-option-icon { color: #b9762e; opacity: .9; }
.state-option:hover { border-color: #b7c7bf; }
.state-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.state-option-dot { width: 18px; height: 18px; flex: none; border: 1px solid #b9c8c1; border-radius: 50%; background: #fff; transition: border 160ms ease; }
.state-option-text { display: grid; gap: 3px; }
.state-option-text strong { color: var(--ink); font-size: 14px; font-weight: 650; }
.state-option-text small { color: var(--muted); font-size: 12px; }
.state-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.state-option:has(input:checked) .state-option-dot { border: 5px solid var(--accent); }
.state-option:has(input:focus-visible) { outline: 3px solid rgba(37, 95, 85, 0.24); outline-offset: 3px; }
textarea { width: 100%; min-height: clamp(66px, 10vh, 96px); margin-top: clamp(12px, 1.8vh, 20px); padding: 13px 17px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; line-height: 1.7; cursor: text; }
textarea::placeholder { color: #9aa59f; }
.completion-dialog { width: min(620px, calc(100vw - 28px)); max-width: calc(100vw - 28px); max-height: calc(100dvh - 32px); padding: clamp(20px, 3vh, 34px); overflow-y: auto; border: 0; border-radius: 4px 28px 4px 28px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 100px rgba(18, 39, 32, 0.25); }
.completion-dialog::backdrop { background: rgba(23, 40, 35, 0.52); backdrop-filter: blur(5px); }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; }
.dialog-heading .eyebrow { margin-bottom: 8px; }
.dialog-heading h2 { margin-bottom: 8px; font-size: clamp(24px, 3vh, 30px); }
.close-button { width: 36px; height: 36px; flex: none; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: transparent; font-size: 24px; line-height: 1; }
.dialog-intro { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.end-temperature { margin: clamp(12px, 2vh, 26px) 0; padding: clamp(12px, 2vh, 20px); border-radius: 12px; background: #f0f3ee; }
.srs-fields { padding: 0; margin: 0 0 clamp(14px, 2.2vh, 28px); border: 0; }
.srs-fields legend { width: 100%; margin-bottom: clamp(6px, 1.4vh, 12px); font-size: 14px; font-weight: 650; }
.srs-fields legend span { float: right; color: var(--muted); font-size: 11px; font-weight: 400; }
.srs-item { padding: clamp(6px, 1.3vh, 12px) 0; border-top: 1px solid var(--line); }
.srs-item > div { display: flex; justify-content: space-between; align-items: center; }
.srs-item label { font-size: 13px; }
.srs-item output { color: var(--accent); font-family: Georgia, serif; font-size: 22px; }
.srs-item input { margin-top: 6px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; display: inline-flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 40px); padding: 13px 20px; transform: translateX(-50%); border-radius: 99px; color: #fff; background: #263d36; box-shadow: 0 10px 30px rgba(20, 42, 35, 0.22); font-size: 13px; text-align: center; }
.toast-action { flex: none; padding: 5px 13px; border: 0; border-radius: 99px; color: #263d36; background: #dfeae4; font-size: 12px; font-weight: 600; }
/* 版本更新提示固定在顶部，避免被底部输入区遮挡。 */
.toast.is-top { top: 20px; bottom: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-height: 760px) {
  :root { --header-h: 60px; }
  .site-header { height: 60px; }
  .app-shell { padding-bottom: 4px; }
  .setup-view h1 { margin-bottom: 10px; font-size: clamp(28px, min(5vw, 5.4vh), 62px); line-height: 1.2; }
  .setup-card { gap: clamp(10px, 2vh, 36px); }
  .recommend-box { padding: 12px 14px; }
  .state-options { gap: 7px; }
  .state-option { padding: 7px 16px; }
  .personalized, .discovery { margin-bottom: 8px; }
  .template-tabs { margin-bottom: 8px; padding: 3px; }
  .tab-button { padding: 5px 13px; }
  .my-companion-list { max-height: 132px; }
  .mine-hint { display: none; }
  .field-hint { display: none; }
  .completion-dialog { padding: 16px 18px; }
  .dialog-heading .eyebrow { margin-bottom: 4px; }
  .dialog-heading h2 { margin-bottom: 6px; font-size: 22px; }
  .dialog-intro { font-size: 12px; line-height: 1.5; }
  .end-temperature { margin: 8px 0; padding: 10px 12px; }
  .end-temperature .temperature-heading output { font-size: 28px; }
  .end-temperature input { height: 18px; margin: 8px 0 0; }
  .srs-fields { margin-bottom: 10px; }
  .srs-fields legend { margin-bottom: 4px; }
  .srs-item { padding: 3px 0; }
  .srs-item output { font-size: 18px; }
  .srs-item input { height: 18px; margin-top: 2px; }
  .completion-dialog .primary-button { min-height: 42px; padding: 10px 18px; }
}

.meta-dialog { max-height: calc(100dvh - 32px); }
.meta-dialog .dialog-intro { margin-bottom: 0; }
.meta-dialog .meta-field { display: grid; gap: 8px; margin-top: 14px; }
.meta-dialog .meta-field label { font-size: 13px; font-weight: 650; }
.meta-dialog textarea { min-height: 132px; margin-top: 0; font-family: inherit; }
.meta-dialog input[type="text"] { padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; font-size: 14px; }
.meta-dialog input[type="text"]:focus-visible, .meta-dialog textarea:focus-visible { outline: 2px solid rgba(37, 95, 85, 0.3); outline-offset: 2px; }
.meta-dialog .recommend-reason { margin-top: 14px; }
.meta-dialog .primary-button { margin-top: 16px; }
.meta-private { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 13px; cursor: pointer; }
.meta-private input { width: 16px; height: 16px; accent-color: var(--accent); }

.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.field-label-row label { font-size: 13px; color: var(--muted); }
.card-link { flex: none; padding: 2px 0; font-size: 12px; }

.card-dialog { width: min(520px, calc(100vw - 28px)); max-width: calc(100vw - 28px); }
.card-meta { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.card-highlights { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.card-highlights[hidden] { display: none; }
.card-highlights span { padding: 5px 12px; border-radius: 99px; color: var(--accent-dark); background: var(--accent-soft); font-size: 12px; }
.card-introduction { margin: 0 0 18px; color: #52635d; font-size: 14px; line-height: 1.8; }
.card-qr { display: grid; justify-items: center; gap: 8px; margin-bottom: 16px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.card-qr[hidden] { display: none; }
.card-qr canvas { width: 168px; height: 168px; border-radius: 6px; background: #fff; }
.card-qr-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; word-break: break-all; }
.card-actions { display: flex; align-items: center; gap: 12px; }
.card-actions .primary-button { flex: 1; margin: 0; }
.share-dialog { width: min(420px, calc(100vw - 28px)); max-width: calc(100vw - 28px); }
.share-brand { display: flex; align-items: center; gap: 12px; }
.share-icon { width: 36px; height: 36px; border-radius: 10px; }
.share-intro { margin: 0 0 16px; color: #52635d; font-size: 14px; line-height: 1.8; }
.summary-dialog { width: min(460px, calc(100vw - 28px)); max-width: calc(100vw - 28px); }
.report-body { display: flex; flex-direction: column; gap: 12px; margin: 0 0 20px; }
.report-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.report-coach { flex: 0 0 auto; font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.report-temp { font-size: 12px; color: var(--muted); white-space: nowrap; }
.report-outcome-warn { margin: 8px 0 4px; padding: 10px 13px; border: 1px solid #e8c9bf; border-radius: 12px; background: #fdf3f0; color: #7c4638; font-size: 13px; line-height: 1.75; }
@media (max-width: 480px) { .report-top { flex-direction: column; align-items: flex-start; gap: 4px; } .report-temp { white-space: normal; line-height: 1.6; } }
.report-hint { margin: -6px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.message-mode { display: inline-flex; align-items: center; margin-top: 6px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 11px; letter-spacing: .01em; }
.report-modes { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.report-modes-label { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.report-mode-row { margin: 2px 0 0; font-size: 13px; line-height: 1.7; }
.report-mode-name { font-weight: 600; color: var(--ink); }
.report-mode-desc { margin-left: 6px; color: var(--muted); }
.report-scaffold { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; color: var(--ink); font-size: 13px; line-height: 1.7; }
.report-frame { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.report-quote {
  margin: 0;
  padding: 12px 14px;
  border-left: 2px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.85;
}
.report-key { margin: 0; color: var(--ink); font-size: 13.5px; line-height: 1.85; }
.report-key span { display: block; margin-bottom: 2px; color: var(--muted); font-size: 11.5px; letter-spacing: 0.02em; }
.summary-text {
  margin: 0 0 20px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
}
.history-dialog { width: min(520px, calc(100vw - 28px)); max-width: calc(100vw - 28px); }
.history-body {
  max-height: min(60vh, 460px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-empty { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.history-timeline { position: relative; padding-left: 24px; }
.history-timeline::before { content: ''; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: #e6dfd2; }
.history-item { position: relative; }
.history-item::before { content: ''; position: absolute; left: -23px; top: 18px; width: 8px; height: 8px; border: 1px solid #b9c9c1; border-radius: 50%; background: #fff; }
.history-item.is-done::before { border-color: var(--accent); background: var(--accent); }
.history-item.is-open::before { border-color: #c9a24a; background: #fffaf0; }
.history-rail { position: absolute; left: -30px; top: 32px; width: 20px; font-size: 9px; line-height: 1.2; color: var(--muted); text-align: center; }
.history-seal { flex: 0 0 auto; min-width: 20px; width: auto; height: 20px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #c9a24a; border-radius: 999px; color: #a9762b; font-family: var(--serif); font-size: 9.5px; line-height: 1; letter-spacing: .02em; transform: rotate(-3deg); }
.history-item.is-open .history-seal { border-color: #c9bda9; color: #9a8f7d; }
.history-item {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}
.history-item:hover { border-color: var(--accent); }
.history-item-top { display: flex; justify-content: space-between; gap: 12px; }
.history-item-name { font-weight: 600; font-size: 14px; }
.history-item-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.history-item-summary { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.history-back {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
}
.history-detail-title { margin: 0 0 4px; font-size: 16px; }
.history-detail-meta { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.history-message {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
}
.history-message.assistant { background: #e9f3ee; border: 1px solid #d7e7df; }
.history-message.user { background: #fdeee2; border: 1px solid #f0dcc8; align-self: flex-end; max-width: 88%; }
.history-message.assistant { max-width: 92%; }
.feedback-dialog { width: min(440px, calc(100vw - 28px)); max-width: calc(100vw - 28px); }
.feedback-dialog textarea { min-height: 108px; }
.feedback-meta {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 780px) {
  body { display: block; height: auto; min-height: 100vh; min-height: 100dvh; overflow-y: auto; }
  .site-header, .app-shell { width: min(100% - 28px, 620px); }
  /* 手机顶部只有两行固定内容，压到 54px：
     品牌不折行、导航不折行、字号收小，把高度留给对话区。 */
  .site-header { height: 48px; }
  .brand { gap: 7px; font-size: 15px; letter-spacing: 0.02em; white-space: nowrap; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-tagline { display: inline; font-size: inherit; letter-spacing: 0.01em; }
  .brand-dot { font-size: 14px; }
  .header-actions { gap: 9px; }
  .ghost-link { padding: 2px 0; font-size: 13px; letter-spacing: 0.02em; white-space: nowrap; }
  .icon-link { width: 20px; height: 20px; }
  .icon-link svg { width: 13px; height: 13px; }
  .app-shell { display: block; min-height: auto; padding-top: 4px; padding-bottom: 6px; overflow: visible; }
  .view { display: block; }
  .consent-view { min-height: 62vh; }
  .setup-view { display: block; min-height: 0; }
  .setup-view .section-heading { margin-bottom: 12px; }
  .setup-view h1 { font-size: 40px; }
  /* 键盘弹起时用视觉视口高度兜住，输入框就不会把最后一条回复顶出屏幕。 */
  .session-view { display: flex; flex-direction: column; height: calc(var(--app-height, 100dvh) - 76px); padding: 0 0 6px; }
  .session-shell { flex: 1; min-height: 0; }
  .session-topline { padding: 0 2px; margin-bottom: 7px; align-items: center; }
  .session-topline h1 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: 0.01em; }
  .session-topline .text-button { padding: 0; font-size: 11px; }
  .session-topline .eyebrow { display: none; }
  .chat-log { flex: 1; min-height: 0; max-height: none; padding: 14px 12px; }
  .reply-panel { padding: 10px 12px 12px; }
  .reply-panel textarea { min-height: 46px; max-height: 104px; padding: 10px 13px; line-height: 1.6; }
  .send-button { width: 42px; height: 42px; }
  .message { max-width: 92%; margin-bottom: 10px; }
  .message-bubble { padding: 12px 14px; font-size: 14px; line-height: 1.7; }
}

@media (max-width: 780px) and (max-height: 560px) {
  .session-topline { display: none; }
}

@media (max-width: 600px) {
  /* 三个状态放一行：图标 + 名字，一行读完；解释性小字在窄屏收起 */
  .state-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .state-option { flex-direction: row; align-items: center; gap: 5px; padding: 11px 6px; }
  .state-panel .state-option { padding: 11px 6px; }
  .state-option-icon { position: static; right: auto; top: auto; width: 15px; height: 15px; transform: none; flex: none; }
  .state-option-text { flex: 1; min-width: 0; display: block; }
  .state-option-text strong { white-space: nowrap; font-size: 12px; line-height: 1.25; }
  .state-option-text small { display: none; }
  .setup-view .section-heading > p:last-child { display: none; }
  .setup-sub { display: none; }
}

@media (max-width: 480px) {
  .template-fields { grid-template-columns: 1fr; }
  .setup-card { padding: 26px 22px; }
  .welcome h1 { font-size: 34px; }
  .consent-panel { border-radius: 20px 20px 0 0; }
  .sheet-actions { flex-direction: column-reverse; }
  .de-escalation-banner { align-items: flex-start; flex-direction: column; gap: 8px; }
  .completion-dialog { padding: 26px 20px; }
  .dialog-heading h2 { font-size: 25px; }
}

/* 起手页三个状态卡：压掉上下空白，只留一行主句 + 一行小注。 */
@media (max-width: 600px) {
  .state-panel .state-option { padding: 9px 14px 9px 42px; align-items: center; }
  .state-panel .state-option-text { gap: 10px; }
  .state-panel .state-option-text strong { line-height: 1.4; }
  .state-panel .state-option-text small { line-height: 1.35; }
  .state-panel .state-option-icon { width: 20px; height: 20px; left: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.session-actions { display: flex; align-items: center; gap: 10px; }
.prefs-group { border: 0; margin: 14px 0 0; padding: 0; }
.prefs-group legend { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.prefs-group label { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; font-size: 14px; color: var(--ink); background: #fff; }
.prefs-group input[type="radio"] { accent-color: var(--accent); }

/* 分享入口挪到启动页最后一行右侧，顶部导航不再放它。 */
.setup-foot { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; padding: 0 clamp(4px, 1.4vw, 10px); }
.setup-foot-share { white-space: nowrap; flex: none; }
.setup-foot-share-line { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; }
.setup-foot-share-prompt { color: var(--muted); font-size: 12px; font-weight: 400; }
.setup-foot-share-text { color: var(--accent); border-bottom: 1px solid rgba(180, 95, 67, .3); line-height: 1.25; }
.setup-foot-share-line:hover .setup-foot-share-text { border-bottom-color: currentColor; }

@media (max-width: 780px) {
  .setup-foot { margin-top: 10px; }
  .setup-foot-share { font-size: 12px; padding: 4px 0; }
  .setup-foot-share-prompt { font-size: 11px; }
}

.skip-review { display: block; width: 100%; margin-top: 10px; font-size: 13px; }
.skip-review-note { margin: 6px 0 0; text-align: center; font-size: 11px; color: var(--muted); }

/* 品牌区变成可点回首页的按钮，外观保持原样。 */
.brand { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; text-align: left; }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }

/* 启动页的“继续上次练习”浮条 */
.resume-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent-soft); }
.resume-bar-text strong { display: block; font-size: 13px; color: var(--ink); }
.resume-bar-text p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.resume-bar-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.resume-bar-actions .secondary-button { padding: 6px 14px; font-size: 13px; }

@media (max-width: 780px) {
  .resume-bar { padding: 10px 12px; gap: 8px; }
  .resume-bar-text strong { font-size: 12px; }
  .resume-bar-text p { font-size: 11px; }
  .resume-bar-actions .secondary-button { padding: 5px 12px; font-size: 12px; }
  .resume-bar-actions .text-button { font-size: 12px; }
}

.history-resume { display: block; width: 100%; margin-top: 14px; }

.history-delete { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.history-delete-trigger { padding: 4px 8px; border: 0; color: #9a6b5f; background: transparent; font-size: 12px; text-decoration: underline; text-decoration-color: rgba(154, 107, 95, .45); text-underline-offset: 3px; cursor: pointer; }
.history-delete-trigger:hover { color: #7f4d42; }
.history-delete-confirm { padding: 11px 12px; border: 1px solid #edd5c9; border-radius: 11px; background: #fff6f0; }
.history-delete-note { margin: 0 0 9px; color: #75574d; font-size: 12px; line-height: 1.7; text-align: left; }
.history-delete-actions { display: flex; justify-content: flex-end; gap: 8px; }
.history-delete-cancel, .history-delete-confirm-button { padding: 6px 10px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.history-delete-cancel { border: 1px solid #d8cbbf; color: #6f6257; background: #fffdf8; }
.history-delete-confirm-button { border: 1px solid #c47c67; color: #fff; background: #b96351; }
.history-delete-confirm-button:disabled, .history-delete-cancel:disabled { opacity: .6; cursor: default; }

/* 桌面端：会话区不用单独算高——body 已定高、app-shell flex 撑满，
   会话区跟着拉伸，聊天记录在 chat-log 内部滚动。 */

/* —— 启动页：先说困扰 → 露出教练 → 需要时才自己挑 —— */
.radar-box {
  padding: 18px 18px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(37, 95, 85, 0.16);
}
.radar-box .recommend-heading strong { font-size: 16px; }
.radar-box .recommend-inline { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 12px; }
.radar-box .recommend-inline input { flex: none; width: 100%; }
.recommend-actions { display: flex; gap: 8px; width: 100%; }
.recommend-actions .primary-button { flex: 1; }
.recommend-actions .secondary-button { flex: 0 0 auto; padding: 9px 13px; font-size: 12px; }
.radar-box .recommend-inline input { flex: 1; min-width: 0; }
.radar-box .primary-button { flex: none; white-space: nowrap; }

.coach-spotlight {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 10px;
}
/* 并入推荐框：不再单独成卡，用一条细线与上面的输入区隔开 */
.recommend-box .coach-spotlight {
  margin-top: 2px;
  padding: 12px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 8px;
}
.recommend-box .spotlight-eyebrow { color: #5c7a70; }
.recommend-box .spotlight-name { font-size: 21px; letter-spacing: 0.01em; }
.recommend-box .spotlight-intro { font-size: 12.5px; color: #3f5c53; }
.recommend-box .spotlight-chip { background: rgba(255, 255, 255, 0.72); border-color: rgba(37, 95, 85, 0.16); }
.spotlight-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.spotlight-eyebrow { margin: 0; font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.spotlight-name { margin: 2px 0 0; font-size: 22px; font-weight: 700; color: var(--ink); }
.spotlight-name-wrap { margin: 0; display: inline-block; vertical-align: baseline; }
/* 教练名当按钮用：外形不变，点一下看他的画像和手法。 */
.spotlight-name-btn { display: inline-block; padding: 0; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; }
.spotlight-name-btn::after { content: ''; display: block; width: 100%; height: 1px; background: currentColor; opacity: .22; transform: scaleY(.6); transition: opacity 160ms ease; }
.spotlight-name-btn:hover::after, .spotlight-name-btn:focus-visible::after { opacity: .6; }
.spotlight-name-btn:focus-visible { outline: 2px solid rgba(37, 95, 85, .24); outline-offset: 3px; }
.spotlight-tag { font-size: 11px; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-dark); border: 1px solid rgba(37, 95, 85, 0.2); flex: none; }
.spotlight-intro { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.spotlight-blurb { margin: 4px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--ink); }
.spotlight-highlights { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
/* 外层 li 只做排布，圈和底色都交给里面的按钮，避免套两层圈。 */
.spotlight-highlights li { display: flex; }
.spotlight-chip { font-size: 11px; padding: 4px 10px; border-radius: 99px; background: #f3f6f4; color: var(--muted); border: 1px solid var(--line); }
/* 模式名做成按钮：可点开看这个模式长什么样，视觉上仍保持小标签的轻。 */
.spotlight-chip { cursor: pointer; font-family: inherit; transition: border-color 160ms ease, background 160ms ease, color 160ms ease; }
.spotlight-chip:hover, .spotlight-chip:focus-visible { border-color: rgba(37, 95, 85, 0.42); background: #fff; color: var(--accent-dark); }
.spotlight-chip:focus-visible { outline: 2px solid rgba(37, 95, 85, 0.24); outline-offset: 2px; }

.coach-picker { display: grid; gap: 8px; margin: 10px 0 4px; }
.coach-card {
  text-align: left;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.coach-card:hover { border-color: #b7c7bf; }
.coach-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.coach-card-blurb { display: block; margin: 2px 0 3px; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.coach-card strong, .coach-card-name { font-size: 14px; color: var(--ink); font-weight: 650; }
.coach-card-name { padding: 0; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; }
.coach-card-name::after { content: ' ▸'; color: var(--muted); opacity: .55; font-weight: 400; }
.coach-card-name:hover { color: var(--accent-dark); }
.coach-card-name:focus-visible { outline: 2px solid rgba(37, 95, 85, .24); outline-offset: 2px; }
.coach-card small { font-size: 12px; color: var(--muted); line-height: 1.6; }
.picker-title { margin: 0; font-size: 12px; color: var(--muted); }
.picker-subtitle { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

@media (max-width: 640px) {
  .radar-box .recommend-inline { flex-direction: column; }
  .radar-box .primary-button { width: 100%; }
  .spotlight-name { font-size: 20px; }
}

.spotlight-head-actions { display: flex; align-items: center; gap: 10px; flex: none; }
/* 只留按钮自己的那条底线，不再叠文字下划线（否则会看见两条横线）。 */
.spotlight-switch { font-size: 12px; color: var(--muted); text-decoration: none; }
.spotlight-switch:hover { color: var(--accent-dark); }
/* 会话页已取消大标题，eyebrow 不再需要下间距（2026-11-16） */
.session-topline .eyebrow{margin-bottom:0}

/* 行动回访卡：嵌在对话里，像教练顺手提了一句，不像系统弹窗 */
.followup-card {
  border: 1px solid rgba(31, 77, 69, 0.18);
  background: rgba(31, 77, 69, 0.05);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
.followup-line {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.75;
}
.followup-line b { font-weight: 600; }
.followup-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.followup-btn {
  border: 1px solid rgba(31, 77, 69, 0.28);
  background: #fff;
  color: inherit;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.followup-btn:hover { background: rgba(31, 77, 69, 0.08); }
.followup-btn:disabled { opacity: 0.5; cursor: default; }
.followup-reply { margin: 12px 0 0; font-size: 14px; line-height: 1.75; }

/* 教练列表卡里的心智模式标签 */
.coach-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.coach-card-tags span {
  font-size: 12px;
  line-height: 1.6;
  padding: 1px 8px;
  border-radius: 7px;
  background: #eaeee7;
  color: #4a5850;
}

/* ---------- 情绪胶囊 ---------- */
.mood-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 14px 0 0; }
.mood-row-label { font-size: 12.5px; color: var(--muted); letter-spacing: .03em; }
.mood-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; min-width: 0; }
.mood-chip { min-height: 26px; padding: 2px 2px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-family: inherit; font-size: 13px; line-height: 1.5; text-align: center; white-space: nowrap; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, color 160ms ease; }
.mood-chip:hover { border-color: #b7c7bf; color: var(--ink); }
.mood-chip.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.mood-chip:focus-visible { outline: 3px solid rgba(37, 95, 85, .24); outline-offset: 2px; }

/* 起手页：词库放在「开始练习」前，一行排开，跟着这一场一起提交 */
.mood-row-setup { display: block; margin: 6px 0 14px; }
.mood-row-setup .mood-row-label { display: block; margin: 0 0 9px; font-size: 13px; color: var(--muted); }
.mood-row-setup .mood-chips { gap: 6px; }

/* 对话页：胶囊贴在输入框上方，不占会话区高度 */
.mood-row-session { margin: 0; padding: 10px clamp(18px, 3vw, 30px) 0; background: #fafaf6; }
.mood-row-session .mood-chips { flex: 1 1 auto; }
.mood-row-session + .reply-panel { border-top: 0; }
@media (max-width: 780px) {
  .mood-row-session { padding: 8px 12px 0; }
  .mood-row-session .mood-row-label { display: none; }
  .mood-chip { padding: 4px 11px; font-size: 12.5px; }
}

/* 用户消息上的情绪小标签 */
.message-mood { width: fit-content; margin: 0 0 6px auto; padding: 3px 10px; border: 1px solid var(--accent); border-radius: 999px; background: #fff; color: var(--accent-dark); font-size: 11.5px; letter-spacing: .01em; }

/* ---------- 专属心锚 ---------- */
.report-anchor { position: relative; margin: 2px 0 4px; padding: 16px 18px 18px; border: 1px solid #e7d7b7; border-radius: 14px; background: linear-gradient(180deg, #fdf6e8, #fffdf7); overflow: hidden; }
.report-anchor::before { content: ''; position: absolute; inset: 0; background-image: var(--anchor-art, none); background-size: cover; background-position: center; opacity: .13; mix-blend-mode: multiply; pointer-events: none; }
.report-anchor::after { content: '密钥'; position: absolute; right: 12px; bottom: 12px; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; border: 1.5px solid rgba(169, 118, 43, .42); border-radius: 50%; color: rgba(169, 118, 43, .62); font-family: var(--serif); font-size: 15px; letter-spacing: 2px; transform: rotate(-11deg); background: rgba(255, 253, 246, .35); }
.report-anchor-label, .report-anchor-text { position: relative; z-index: 1; padding-right: 60px; }
.report-anchor-label { margin: 0 0 7px; font-size: 11px; letter-spacing: .14em; color: #8a6a33; }
.report-anchor-text { margin: 0; font-size: clamp(18px, 2.6vh, 21px); line-height: 1.7; color: #5a4423; font-weight: 600; }
.report-route { margin: 12px 0 4px; padding: 14px 16px 10px; border: 1px dashed #ddd3c2; border-radius: 14px; background: #fbfaF5; }
.report-route-title { margin: 0 0 8px; font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.route-list { display: grid; gap: 0; }
.route-node { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 0; }
.route-node::before { content: ''; position: absolute; left: 10px; top: 26px; bottom: -2px; width: 1px; background: #e6dfd2; }
.route-node:last-child::before { display: none; }
.route-dot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1px solid #d8d2c4; border-radius: 50%; background: #fff; font-size: 10px; color: var(--muted); }
.route-node.is-done .route-dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.route-node.is-current .route-dot { border-color: #c9a24a; background: #fffaf0; color: #a9762b; box-shadow: 0 0 0 3px rgba(201, 162, 74, .18); }
.route-label { font-size: 13px; color: var(--ink); }
.route-node.is-pending .route-label { color: var(--muted); }
.route-note { font-size: 10.5px; color: var(--muted); }
.route-node.is-current .route-note { color: #a9762b; }

.report-modes-label { margin: 14px 0 6px; font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.report-mode-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.report-mode-chip { padding: 4px 10px; border: 1px solid #eadfce; border-radius: 999px; background: #fdf8f0; color: #6b5a44; font-size: 12px; }

.report-shift { display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); gap: 8px; align-items: stretch; margin: 10px 0 4px; }
.shift-card { padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.shift-old { border-color: #ecdbc8; background: #fdf6ee; }
.shift-new { border-color: #cfe1d8; background: #eef6f1; }
.shift-label { margin: 0 0 5px; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.shift-body { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--ink); }
.shift-arrow { display: flex; align-items: center; justify-content: center; color: #b7a184; font-size: 15px; }
@media (max-width: 420px) { .report-shift { grid-template-columns: 1fr; } .shift-arrow { transform: rotate(90deg); } }
.history-summary { margin: 2px 0 12px; padding: 12px 14px 11px; border: 1px solid #eadcc4; border-radius: 13px; background: #fbf3e2; }
.history-summary-label { margin: 0 0 5px; color: #9a7240; font-size: 10.5px; letter-spacing: .12em; }
.history-summary .summary-text { margin: 0; padding: 0; border-radius: 0; background: transparent; color: #4d4032; font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.history-outcome-note { margin: 0; color: #8a7767; font-size: 12px; line-height: 1.7; }
.history-outcome { margin: 2px 0 12px; padding: 12px 13px 11px; border: 1px solid #e7d5b7; border-radius: 13px; background: linear-gradient(135deg, #fffaf0, #fff2dc); }
.history-outcome-title { margin: 0 0 8px; color: #9a6a32; font-size: 10.5px; letter-spacing: .12em; }
.history-outcome-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; align-items: start; margin-top: 6px; }
.history-outcome-label { color: #a27b4e; font-size: 10.5px; line-height: 1.7; }
.history-outcome-text { margin: 0; color: #4f4030; font-size: 12.5px; line-height: 1.72; }
.history-outcome-changes { display: grid; gap: 5px; margin-top: 6px; }
.history-outcome-change { display: grid; grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr); gap: 7px; align-items: start; padding-left: 56px; font-size: 12px; line-height: 1.65; }
.history-outcome-before { color: #8a7767; }
.history-outcome-after { color: #35564a; }
.history-outcome-arrow { color: #b7a184; text-align: center; }

.history-anchor { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid #d8b26a; border-radius: 0 8px 8px 0; background: #fdf6e8; color: #6b5129; font-size: 13px; line-height: 1.7; }

/* 对话里的教练头像：只露一个字，承担“有人在”的感觉 */
.message.assistant { position: relative; margin-left: 34px; max-width: calc(82% - 6px); }
.message-avatar { position: absolute; left: -34px; top: 2px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-family: var(--serif); font-size: 13px; }

/* ---------- 心智图鉴 ---------- */
.mindset-dialog { width: min(680px, calc(100vw - 24px)); max-width: calc(100vw - 24px); background-image: radial-gradient(rgba(120, 105, 80, .07) 1px, transparent 1px); background-size: 14px 14px; }
.mindset-card { animation: mindsetIn .34s both; }
@keyframes mindsetIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mindset-card { animation: none; } }
.mindset-intro { margin: 4px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.mindset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mindset-head { display: flex; align-items: flex-start; gap: 4px; min-width: 0; }
.mindset-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.mindset-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 0; padding: 10px 10px 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; text-align: left; color: inherit; cursor: pointer; overflow: hidden; transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease; }
.mindset-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: transparent; }
.mindset-emoji { flex: none; margin-top: 1px; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 19px; line-height: 1; }
.level-seen::before { background: #cfded6; }
.level-seen .mindset-emoji { background: #f0f6f3; }
.level-known::before { background: #a8c4b7; }
.level-known .mindset-emoji { background: #eaf3ee; }
.level-broken::before, .is-broken::before { background: #d8b26a; }
.level-broken .mindset-emoji, .is-broken .mindset-emoji { background: #fbf0da; }
.level-steady::before { background: #74a190; }
.level-steady .mindset-emoji { background: #dfeee6; }
.level-internalized::before { background: #3d7566; }
.level-internalized .mindset-emoji { background: #cfe6da; box-shadow: 0 0 0 1px #a9cabb; }
.level-mastered::before { background: linear-gradient(90deg, #2f6558 40%, #c9a24a); }
.level-mastered .mindset-emoji { background: #d3e8dc; box-shadow: 0 0 0 1px #9dbfae, 0 0 12px rgba(201, 162, 74, .35); }
.level-broken::after, .is-broken::after, .level-steady::after, .level-internalized::after, .level-mastered::after { position: absolute; top: 9px; right: 9px; width: 19px; height: 19px; display: flex; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 50%; font-family: var(--serif); font-size: 9px; line-height: 1; opacity: .85; }
.level-broken::after, .is-broken::after { content: '破'; color: #a9762b; background: rgba(255, 250, 240, .72); }
.level-steady::after { content: '稳'; color: #3d7a68; background: rgba(243, 249, 245, .8); }
.level-internalized::after { content: '化'; color: #245347; background: rgba(235, 244, 239, .85); }
.level-mastered::after { content: '如'; color: #fffdf6; background: #2f6558; border-color: #c9a24a; box-shadow: 0 0 0 1px #c9a24a inset; }
.mindset-card:hover { border-color: #b7c7bf; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(31, 77, 69, .08); }
.mindset-card:focus-visible { outline: 3px solid rgba(37, 95, 85, .24); outline-offset: 2px; }
.mindset-card.is-locked { border-style: dashed; background: #f7f7f3; }
.mindset-card.is-locked .mindset-emoji { filter: grayscale(1); opacity: .42; background: transparent; }
.mindset-name { flex: 1; min-width: 0; font-size: 12px; line-height: 1.3; white-space: nowrap; color: var(--ink); }
.mindset-card.is-locked .mindset-name { color: #9aa59f; }
.mindset-repeat { margin-top: 1px; color: #a27a50; font-size: 8.6px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-subtitle { margin: -2px 0 12px; color: #9a7355; font-size: 11.5px; line-height: 1.6; }
.mindset-desc { margin: 0; font-size: 10.8px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mindset-badge { padding: 1px 4px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 8.5px; line-height: 1.5; letter-spacing: 0; }
.mindset-card.is-locked .mindset-badge { background: #eceeeb; color: #98a39d; }
.mindset-card.is-broken { border-color: #d8b26a; background: linear-gradient(180deg, #fffaf0, #fff); box-shadow: 0 8px 24px rgba(160, 120, 50, .12); }
.mindset-card.is-broken .mindset-badge { background: #f6e6c4; color: #8a6224; }
.mindset-card.level-steady { border-color: #a9c0b5; background: #f3f9f5; box-shadow: 0 8px 24px rgba(45, 92, 80, .10); }
.mindset-card.level-steady .mindset-badge { background: #dcebe2; color: #2f6355; }
.mindset-card.level-internalized { border-color: #7fa697; background: #ebf4ef; box-shadow: 0 8px 26px rgba(45, 92, 80, .14); }
.mindset-card.level-internalized .mindset-badge { background: #cfe4da; color: #245347; }
.mindset-card.level-mastered { border-color: var(--accent); background: #e3f0e9; box-shadow: 0 10px 28px rgba(31, 77, 69, .18); }
.mindset-card.level-mastered .mindset-badge { background: var(--accent); color: #fff; }
@media (max-width: 560px) {
  .mindset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .mindset-card { min-height: 0; }
}

/* 教练详情：画像 + 手法 + 走法 */
.coach-hero-tag { background: rgba(255, 255, 255, .82); color: var(--accent-dark, #1e3140); }
.coach-flow-list { margin: 4px 0 0; padding-left: 1.15em; font-size: 13.5px; line-height: 1.85; color: var(--ink); }
.coach-flow-list li { margin: 2px 0; }

/* 图鉴详情卡：象征图 + 解读 */
.mindset-detail { width: min(520px, calc(100vw - 24px)); max-width: calc(100vw - 24px); padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: #fffdf8; }
.md-hero { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: #f4eee2; }
.md-hero img { width: 100%; height: 100%; object-fit: cover; }
.md-hero.is-locked img { filter: grayscale(1) opacity(.34); }
.md-state { position: absolute; left: 14px; bottom: 12px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .86); color: var(--accent-dark); font-size: 11px; }
.md-hero.is-locked .md-state { background: rgba(255, 255, 255, .8); color: #7f8b85; }
.md-close { position: absolute; right: 8px; top: 8px; background: rgba(255, 255, 255, .82); }
.md-body { display: grid; gap: 9px; padding: 16px 20px 20px; max-height: 54vh; overflow-y: auto; }
.md-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.md-emoji { flex: none; margin: 0; font-size: 22px; line-height: 1.1; }
.md-name { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 650; color: var(--ink); }
.md-desc { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.md-block { padding-top: 10px; border-top: 1px solid var(--line); }
.md-block h3 { margin: 0 0 4px; font-size: 11px; letter-spacing: .1em; color: var(--amber); font-weight: 600; }
.md-block p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink); }
.md-note { margin: 2px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--muted); }

/* ---------- 教练：工具图标 + 一句性格 ---------- */
.coach-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.coach-icon { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-dark); }
.coach-card-head strong { font-size: 14.5px; }
.coach-kind { margin-left: 5px; align-self: center; padding: 0; border: 0; border-radius: 0; color: #93a29a; font-size: 10px; letter-spacing: .14em; font-weight: 400; }
.coach-kind::before { content: '·'; margin-right: 3px; color: #bcc9c0; letter-spacing: 0; }

/* ---------- 对话页顶部：走到第几轮 ---------- */
.chat-ritual { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(18px, 3.2vw, 30px) 0; color: var(--muted); }
.chat-ritual-text { font-size: 11.5px; letter-spacing: .08em; }
.chat-ritual-dots { display: flex; gap: 5px; }
.chat-ritual-dots span { width: 6px; height: 6px; border-radius: 50%; background: #dfe5df; transition: background 220ms ease, transform 220ms ease; }
.chat-ritual-dots span.is-lit { background: var(--accent); }
.chat-ritual-dots span.is-lit:last-of-type { transform: scale(1.25); }

/* ---------- 图鉴：收集进度 ---------- */
.mindset-progress { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 14px; margin: 10px 0 14px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(120deg, #fbfaf4, #f3f8f4); }
.mp-grid {
  width: 64px; height: 78px; padding: 5px; box-sizing: border-box;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 4px;
  border: 1px solid rgba(37, 95, 85, .22); border-radius: 10px; background: rgba(255,255,255,.64);
}
.mp-cell { border-radius: 2px; background: #dfe7df; transition: background 160ms ease; }
.mp-cell.is-lit { background: var(--accent); }
.mp-cell.is-broken { background: #b08a44; }
.mp-cell.is-empty { background: #e6ece6; }
.mp-ring { --pct: 0%; position: relative; width: 62px; height: 62px; display: flex; align-items: baseline; justify-content: center; gap: 1px; padding-top: 20px; box-sizing: border-box; border-radius: 50%; background: conic-gradient(var(--accent) var(--pct), #e2eae3 var(--pct)); }
.mp-ring::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #fdfcf8; }
.mp-ring b, .mp-ring small { position: relative; z-index: 1; }
.mp-ring b { font-family: var(--serif); font-size: 22px; color: var(--ink); line-height: 1; }
.mp-ring small { font-size: 10px; color: var(--muted); margin-left: 1px; }
.mp-words { min-width: 0; }
.mp-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.mp-sub { margin: 4px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.mp-legend { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
/* 档位阶梯独立成一行，放在引导句下面、进度之前 */
.mindset-tiers { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.mp-legend-item { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: #f0f4ef; color: #5d7269; font-size: 10.5px; }
.mp-legend-item b { font-size: 10.5px; color: var(--accent-dark); font-weight: 700; }

/* ---------- 报告：密钥卡导出 ---------- */
.key-card-save { align-self: flex-start; margin: 2px 0 6px; padding: 7px 14px; border: 1px solid #dfd2b8; border-radius: 999px; background: #fffdf7; color: #8a6a33; font: inherit; font-size: 12px; cursor: pointer; transition: background 150ms ease, border-color 150ms ease; }
.key-card-save:hover { background: #fdf6e8; border-color: #cbb488; }

/* ---------- 空态 ---------- */
.history-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 10px 20px; text-align: center; color: var(--muted); }
.history-empty-art { color: #b9c9bf; margin-bottom: 2px; }
.history-empty-title { margin: 0; font-family: var(--serif); font-size: 17px; color: var(--ink); }
.history-empty-note { margin: 0; font-size: 12.5px; line-height: 1.7; }

/* ---------- 起手页：一句副题与前方的淡纹 ---------- */
.setup-note { margin: -6px 0 10px; font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.setup-view { position: relative; }
.setup-view::before { content: ''; position: absolute; right: 6px; top: 26px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(37, 95, 85, .08), rgba(37, 95, 85, 0) 68%); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .chat-ritual-dots span { transition: none; }
}

/* ---------- 情绪氛围：选了词，页面也换一口气 ---------- */
body { --mood-glow: transparent; }
body[data-mood="焦躁"] { --mood-glow: rgba(198, 116, 58, .2); }
body[data-mood="无力"] { --mood-glow: rgba(120, 137, 130, .2); }
body[data-mood="委屈"] { --mood-glow: rgba(96, 122, 158, .2); }
body[data-mood="迷茫"] { --mood-glow: rgba(128, 112, 158, .2); }
body[data-mood="自责"] { --mood-glow: rgba(140, 108, 86, .2); }
body[data-mood="失控"] { --mood-glow: rgba(176, 82, 72, .2); }
body[data-mood="red"] { --mood-glow: rgba(198, 116, 58, .2); }
body[data-mood="yellow"] { --mood-glow: rgba(190, 150, 62, .2); }
body[data-mood="blue"] { --mood-glow: rgba(96, 122, 158, .2); }
body[data-mood="green"] { --mood-glow: rgba(92, 132, 100, .2); }
.app-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(130% 62% at 50% -8%, var(--mood-glow), transparent 70%); transition: background 600ms ease; }
.mood-echo { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: #6f7f76; animation: echoIn 260ms ease both; }
@keyframes echoIn { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }

/* ---------- 结束：落章 ---------- */
.closing-ritual { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: rgba(248, 246, 239, .94); backdrop-filter: blur(4px); animation: ritualIn 220ms ease both; }
.closing-ritual.is-leaving { animation: ritualOut 260ms ease both; }
@keyframes ritualIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ritualOut { to { opacity: 0; } }
.closing-stage { position: relative; width: 150px; height: 150px; display: grid; place-items: center; }
.closing-stage::before { content: ''; position: absolute; inset: 16px; border: 1px dashed rgba(138, 106, 51, .35); border-radius: 50%; animation: ritualIn 300ms ease both; }
.closing-dots span { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #8ca096; animation: converge 900ms cubic-bezier(.5, 0, .3, 1) both; }
@keyframes converge {
  0% { transform: translate(var(--x), var(--y)); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translate(0, 0) scale(.6); opacity: 0; }
}
.closing-seal { position: relative; width: 94px; height: 94px; display: grid; place-items: center; border: 2px solid rgba(169, 118, 43, .55); border-radius: 50%; color: #8a6a33; font-family: var(--serif); font-size: 38px; background: rgba(255, 253, 246, .6); opacity: 0; transform: scale(1.35) rotate(-8deg); animation: sealDrop 380ms ease-out 620ms both; }
@keyframes sealDrop { 0% { opacity: 0; transform: scale(1.35) rotate(-8deg); } 60% { opacity: 1; transform: scale(.94) rotate(-8deg); } 100% { opacity: 1; transform: scale(1) rotate(-8deg); } }
.closing-line { margin: 0; font-family: var(--serif); font-size: 15px; letter-spacing: .12em; color: #7c7466; }

/* ---------- 图鉴：翻牌 ---------- */
.mindset-card.is-flipping { transform: perspective(600px) rotateY(76deg); opacity: .45; }
@media (prefers-reduced-motion: reduce) { .mindset-card.is-flipping { transform: none; opacity: 1; } .closing-ritual, .closing-seal, .closing-dots span { animation: none; } .closing-seal { opacity: 1; transform: rotate(-8deg); } }

/* ---------- 练习记录：月份路标 ---------- */
.history-month { margin: 12px 0 2px; padding-left: 22px; font-family: var(--serif); font-size: 12.5px; letter-spacing: .1em; color: #8a8172; }
.history-month-filter {
  padding: 0; border: 0; color: inherit; background: transparent;
  font: inherit; letter-spacing: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px;
}
.history-month-filter.is-on { color: #8a5c2e; text-decoration-color: #d8b26a; text-decoration-style: solid; }
.history-month-filter.is-off { opacity: .55; }
.history-month-filter:hover { color: #754b24; opacity: 1; }
.history-month:first-child { margin-top: 0; }

/* ---------- 首页回望：昨天留下的那句话 ---------- */
.afterglow { position: relative; margin: 0 0 14px; padding: 16px 18px 14px 22px; border: 1px solid #e7dcc8; border-left: 3px solid #c8a468; border-radius: 4px 14px 14px 4px; background: linear-gradient(180deg, #fffdf6, #fdf9ef); box-shadow: 0 10px 26px rgba(120, 96, 56, .08); transform: rotate(-.3deg); }
.afterglow-label { margin: 0 0 6px; font-size: 11px; letter-spacing: .1em; color: #9a835c; }
.afterglow-line { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.75; color: #4f4230; }
.afterglow-meta { margin: 8px 0 0; font-size: 11.5px; color: #9a9184; }
.afterglow-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.afterglow-again { padding: 6px 14px; border: 1px solid #cbb488; border-radius: 999px; background: #fffdf6; color: #7b5f31; font: inherit; font-size: 12px; cursor: pointer; }
.afterglow-again:hover { background: #fbf2df; }
.afterglow-dismiss { padding: 4px 2px; border: 0; background: none; color: #a39a8a; font: inherit; font-size: 11.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.afterglow-seal { position: absolute; right: 14px; top: 12px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border: 1.5px solid rgba(169, 118, 43, .4); border-radius: 50%; color: rgba(169, 118, 43, .6); font-family: var(--serif); font-size: 17px; transform: rotate(-10deg); }

/* ---------- 11-17 七项感性件 ---------- */
/* 1. 每位教练的纸色 */
.message[data-coach="修表匠"] .message-bubble { background: #edf2ed; }
.message[data-coach="解绳人"] .message-bubble { background: #edf2ea; }
.message[data-coach="校秤人"] .message-bubble { background: #f0f1e9; }
.message[data-coach="磨刀人"] .message-bubble { background: #f2efe8; }
.message[data-coach="开锁人"] .message-bubble { background: #edf1f1; }
.message[data-coach="收线人"] .message-bubble { background: #edf0eb; }
.message[data-coach="织补匠"] .message-bubble { background: #f3efe9; }
.message[data-coach="打桩人"] .message-bubble { background: #f1eee6; }
.message[data-coach="守夜人"] .message-bubble { background: #eceff4; }
.message[data-coach="摆渡人"] .message-bubble { background: #eef1ee; }

/* 2. 练习记录：情绪天气点 */
.history-weather { flex: 0 0 auto; width: 7px; height: 7px; margin-right: -4px; border-radius: 50%; background: #c9d2cc; }
.history-weather[data-temp="6"] { background: #c9783a; }
.history-weather[data-temp="5"] { background: #b98a4a; }
.history-weather[data-temp="3"] { background: #5f8a7d; }

/* 3. 时段天光 */
body { --day-glow: transparent; }
body[data-daypart="dawn"] { --day-glow: rgba(147, 170, 162, .16); }
body[data-daypart="noon"] { --day-glow: rgba(206, 176, 122, .14); }
body[data-daypart="dusk"] { --day-glow: rgba(198, 142, 92, .17); }
body[data-daypart="night"] { --day-glow: rgba(58, 90, 104, .16); }
.app-glow { background: radial-gradient(130% 62% at 50% -8%, var(--mood-glow), transparent 70%), radial-gradient(120% 46% at 82% 104%, var(--day-glow), transparent 72%); }
/* 4. 图鉴：四个系 */
#mindsetGrid.mindset-sections { display: block; }
.mindset-series { margin-bottom: 14px; }
.mindset-series-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 7px; padding-bottom: 5px; border-bottom: 1px solid #ece6da; }
.mindset-series-head h3 { margin: 0; font-family: var(--serif); font-size: 15px; letter-spacing: .06em; color: var(--ink); font-weight: 600; }
.mindset-series-head p { margin: 0; font-size: 11px; color: var(--muted); }
.mindset-no { font-size: 9px; letter-spacing: .06em; color: #b3aea2; }
.mindset-card.is-locked::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(120, 130, 120, .16) 1px, transparent 1px); background-size: 7px 7px; opacity: .55; pointer-events: none; }
.mindset-card.is-locked .mindset-no { color: #b8b6ac; }

/* 5. 报告路线：你在这里 */
.route-here { display: inline-flex; align-items: center; gap: 3px; color: #b07a2e; font-size: 11px; }
.route-here svg { display: block; }

/* 6. 用户气泡带情绪色 */
.message.user[data-mood="焦躁"] .message-bubble { background: #7c5a3f; }
.message.user[data-mood="无力"] .message-bubble { background: #5d6b66; }
.message.user[data-mood="委屈"] .message-bubble { background: #4f6380; }
.message.user[data-mood="迷茫"] .message-bubble { background: #665a80; }
.message.user[data-mood="自责"] .message-bubble { background: #6d5747; }
.message.user[data-mood="失控"] .message-bubble { background: #7a4a46; }
.message.user[data-mood="red"] .message-bubble { background: #7c5a3f; }
.message.user[data-mood="yellow"] .message-bubble { background: #8a7136; }
.message.user[data-mood="blue"] .message-bubble { background: #4f6380; }
.message.user[data-mood="green"] .message-bubble { background: #496b56; }

/* 手机端图鉴：弹窗贴住视口，横向不留任何溢出 */
@media (max-width: 430px) {
  .mindset-dialog { padding: 18px 14px 20px; border-radius: 4px 20px 4px 20px; }
  .mindset-dialog .dialog-heading h2 { font-size: 21px; letter-spacing: .02em; }
  .mindset-dialog .dialog-heading { gap: 10px; }
  .mindset-intro { margin: 2px 0 12px; font-size: 12px; line-height: 1.65; }
  .mindset-progress { grid-template-columns: 56px minmax(0, 1fr); padding: 10px 12px; }
  .mp-grid { width: 56px; height: 68px; padding: 4px; gap: 3px; }
  .mindset-series { margin-bottom: 12px; }
  .mindset-series-head { flex-wrap: wrap; gap: 4px 8px; }
  .mindset-series-head h3 { font-size: 14px; }
  .mindset-grid { gap: 6px; }
  .mindset-card { min-height: 0; padding: 9px 9px 8px; }
  .mindset-name { font-size: 12.5px; }
  .mindset-desc { font-size: 10.2px; }
  .mindset-head { gap: 5px; }
}
@media (max-width: 360px) {
  .mindset-grid { grid-template-columns: 1fr; }
}

/* ---------- 这一轮继续补的感性件 ---------- */

/* 1. 报告开头的一条心情线 */
.report-curve { margin: 4px 0 0; }
.report-curve svg { display: block; width: 100%; height: auto; }
.report-curve-labels { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: -4px; }
.rc-label { display: flex; flex-direction: column; gap: 1px; font-size: 10.5px; letter-spacing: .08em; color: #9aa59f; }
.rc-label b { font-family: var(--serif); font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--ink); }
.rc-label-end { align-items: flex-end; }
.rc-delta { align-self: center; padding: 2px 9px; border-radius: 999px; background: #f2efe4; color: #87795c; font-size: 10.5px; letter-spacing: .02em; }

/* 2. 下一步是一张便签：贴着胶带，能从报告上撕下来 */
.next-note { position: relative; margin: 20px 1px 8px; padding: 17px 16px 15px; border-radius: 3px; background-color: #fdf8ea; background-image: repeating-linear-gradient(180deg, transparent 0 26px, rgba(160, 140, 90, .10) 26px 27px); box-shadow: 0 8px 20px rgba(70, 58, 24, .10), 0 1px 0 rgba(255, 255, 255, .8) inset; transform: rotate(-.55deg); }
.next-note-tape { position: absolute; top: -8px; left: 50%; width: 62px; height: 17px; margin-left: -31px; background: rgba(206, 190, 152, .5); box-shadow: 0 1px 3px rgba(90, 74, 30, .12); transform: rotate(-2.5deg); }
.next-note-label { margin: 0 0 6px; padding-bottom: 4px; font-family: var(--serif); font-size: 10.5px; letter-spacing: .16em; color: #a08256; border-bottom: 1px solid rgba(160, 140, 90, .18); }
.next-note-text { margin: 0; font-family: var(--serif); font-size: 14px; line-height: 1.93; letter-spacing: .01em; color: #40382a; }

/* 3. 情绪胶囊：点下去先荡开一圈 */
.mood-chip { position: relative; }
.mood-chip.is-tapping { animation: moodTap 420ms ease-out; }
@keyframes moodTap {
  0% { box-shadow: 0 0 0 0 rgba(37, 95, 85, .28); }
  100% { box-shadow: 0 0 0 10px rgba(37, 95, 85, 0); }
}
@media (prefers-reduced-motion: reduce) { .mood-chip.is-tapping { animation: none; } }

/* 4. 教练正在想：头像跟着一起呼吸，气泡是他自己的纸色 */
.message.typing { position: relative; margin-left: 34px; max-width: calc(82% - 6px); }
.message-avatar.is-thinking { animation: coachBreathe 1.7s ease-in-out infinite; }
@keyframes coachBreathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 95, 85, .16); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 5px rgba(37, 95, 85, .05); }
}
@media (prefers-reduced-motion: reduce) { .message-avatar.is-thinking { animation: none; } }

/* 5. 输入框聚焦：墨在纸上洇开一圈 */
.reply-panel textarea:focus, #recommendQuery:focus, .meta-dialog textarea:focus {
  box-shadow: 0 0 0 6px rgba(37, 95, 85, .045), 0 0 0 1px rgba(37, 95, 85, .18) inset;
  transition: box-shadow 220ms ease;
}

/* ---------- 这一轮补的四处“物件感” ---------- */

/* 6. 教练不是列表，是一张一张摆到桌上的牌 */
.coach-card { animation: coachDeal 420ms cubic-bezier(.22, .8, .3, 1) both; animation-delay: calc(var(--deal, 0) * 42ms); }
@keyframes coachDeal {
  from { opacity: 0; transform: translateY(12px) rotate(-2.6deg) scale(.97); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .coach-card { animation: none; } }

/* 7. 已点亮的图鉴卡，打开时扫过一道光 */
.mindset-card.is-lit::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(112deg, transparent 34%, rgba(255, 241, 212, .8) 50%, transparent 66%);
  background-size: 230% 100%;
  background-position: 130% 0;
  animation: litSweep 900ms ease-out both;
  animation-delay: var(--litDelay, 420ms);
}
@keyframes litSweep {
  0% { opacity: 0; background-position: 130% 0; }
  22% { opacity: .85; }
  100% { opacity: 0; background-position: -50% 0; }
}
@media (prefers-reduced-motion: reduce) { .mindset-card.is-lit::after { animation: none; } }

/* 8. 练习记录顶部的一条天气带 */
/* 练习记录筛选：已完成 / 待续直接放在标题下的统计行里，不再另起按钮行。 */
.history-filter-link {
  padding: 0; border: 0; color: #9a7355; background: transparent;
  font: inherit; line-height: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px;
}
.history-filter-link.is-on { color: #8a5c2e; text-decoration-style: solid; text-decoration-color: #d8b26a; }
.history-filter-link:not(.is-on) { opacity: .55; }
.history-filter-link:hover { color: #754b24; opacity: 1; }
.history-filter-comma { color: #b9a58f; }
.history-filter-empty { padding: 24px 8px 8px; text-align: center; color: var(--muted); font-size: 12.5px; }
.history-filter-empty p { margin: 0 0 10px; }
.history-filter-empty button { padding: 4px 8px; border: 0; color: var(--accent); background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.history-sky { margin: 0 0 20px; padding: 4px 2px 10px; border-bottom: 1px dashed rgba(160, 178, 168, .5); }
.history-sky-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sky-dot { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #cbd4ce; box-shadow: 0 1px 3px rgba(30, 50, 44, .12); }
.sky-dot[data-temp="6"] { background: #c9783a; }
.sky-dot[data-temp="5"] { background: #b98a4a; }
.sky-dot[data-temp="3"] { background: #5f8a7d; }
.sky-dot i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #f8f5ec; }
.sky-dot i[data-temp="6"] { background: #f0d3bb; }
.sky-dot i[data-temp="5"] { background: #ecd6b9; }
.sky-dot i[data-temp="3"] { background: #cfe2d9; }
.history-sky-label { display: block; margin: 8px 0 0; font-family: var(--serif); font-size: 10.5px; letter-spacing: .1em; color: #9aa59f; }

/* 9. 弹窗不是浮上来，是纸页翻开展平 */
dialog[open] { animation: paperOpen 280ms ease-out both; transform-origin: 50% 0; }
@keyframes paperOpen {
  from { opacity: 0; transform: perspective(1100px) rotateX(-7deg) translateY(-10px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }

/* 六档图例在窄屏要排成一行，不折行 */
@media (max-width: 430px) {
  .mp-legend { gap: 5px; }
  .mp-legend-item { padding: 2px 6px; gap: 2px; font-size: 10px; }
  .mp-legend-item b { font-size: 10px; }
}

/* ---------- 这一批：日期刻度、注脚、存卡按钮 ---------- */
.history-sky-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; }

.history-sky-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.history-sky-label { margin: 0; }
.history-sky-hint { margin: 0; color: #a3aca4; font-size: 10px; line-height: 1.5; letter-spacing: .02em; }
.history-sky-range { font-size: 11px; letter-spacing: .06em; color: #a3aca4; }
.spotlight-name { display: inline-block; }
.md-save { margin-top: 10px; }

@media (prefers-reduced-motion: no-preference) {
  .md-save { transition: border-color 160ms ease, color 160ms ease; }
}

/* 识别证据：把用户自己的那句话摆在标签旁边，能核对才可信 */
.md-evidence p, .report-evidence-text { font-size: 13px; line-height: 1.75; color: var(--ink); }
.report-evidence { margin: 8px 0 0; padding: 0; list-style: none; }
.report-evidence li { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; }
.report-evidence-text { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); }
.retract-button {
  flex: none; padding: 2px 8px; border: 1px solid var(--line); border-radius: 99px;
  background: transparent; color: var(--muted); font-family: inherit; font-size: 11px;
  line-height: 1.6; cursor: pointer; transition: border-color 160ms ease, color 160ms ease;
}
.retract-button:hover, .retract-button:focus-visible { border-color: rgba(37, 95, 85, .42); color: var(--accent-dark); }
.retract-button:disabled { opacity: .55; cursor: default; }

/* 进站复盘卡：一张纸，三个答案，答完就收 */
.followup-dialog { padding: 20px 20px 16px; }
.followup-kicker { margin: 0; font-size: 11.5px; letter-spacing: .06em; color: var(--muted); }
.followup-title { margin: 6px 0 10px; font-family: var(--serif); font-size: 21px; font-weight: 650; color: var(--ink); }
.followup-action { margin: 0 0 16px; padding: 12px 14px; border-left: 2px solid var(--accent); background: var(--accent-soft); font-size: 14px; line-height: 1.75; color: var(--ink); }
.followup-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.followup-btn { flex: 1; min-width: 92px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; transition: border-color 160ms ease, background 160ms ease; }
.followup-btn:hover, .followup-btn:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.followup-btn:disabled { opacity: .55; cursor: default; }
.followup-reasons { margin-top: 12px; }
.followup-reasons-label { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.followup-reason-row { display: flex; gap: 8px; }
.followup-reason { padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: transparent; font-family: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.followup-reason:hover, .followup-reason:focus-visible { border-color: rgba(37, 95, 85, .42); color: var(--accent-dark); }
.followup-reply { margin: 14px 0 0; font-size: 13px; line-height: 1.7; color: var(--accent-dark); }
.followup-later { margin-top: 14px; padding: 4px 0; border: 0; background: none; font-family: inherit; font-size: 12px; color: var(--muted); text-decoration: underline; cursor: pointer; }

/* 上一场那件事：一条细横条，不挡人，也不催人 */
.followup-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-bottom: 14px; border-radius: 12px; border: 1px dashed rgba(37, 95, 85, .34); background: rgba(37, 95, 85, .05); }
.followup-bar-text { min-width: 0; }
.followup-bar-text strong { display: block; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.followup-bar-text p { margin: 3px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink); }
.followup-bar .secondary-button { flex: none; padding: 6px 14px; font-size: 12.5px; }

@media (max-width: 780px) {
  .followup-bar { padding: 9px 12px; gap: 8px; }
  .followup-bar-text p { font-size: 12.5px; }
  .followup-bar .secondary-button { padding: 5px 12px; font-size: 12px; }
}

/* 说不清场景时，给几个可点的词：点一下就把话起个头 */
.recommend-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.recommend-chip { padding: 5px 11px; border: 1px solid rgba(37, 95, 85, .22); border-radius: 99px; background: rgba(255, 255, 255, .62); font-family: inherit; font-size: 12px; color: var(--muted); cursor: pointer; transition: border-color 160ms ease, color 160ms ease; }
.recommend-chip:hover, .recommend-chip:focus-visible { border-color: var(--accent); color: var(--accent-dark); }

@media (max-width: 780px) {
  .recommend-chip { font-size: 11.5px; padding: 4px 10px; }
}

/* 轻入口的结果区：和主入口共用同一个输入框 */
.light-result { margin-top: 12px; padding: 12px 14px; border-left: 2px solid var(--accent); background: rgba(255, 255, 255, .78); }
.light-mode { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
.light-action { margin: 6px 0 0; font-size: 13px; line-height: 1.75; color: var(--accent-dark); }
.light-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.light-actions .primary-button { padding: 7px 15px; font-size: 12.5px; }
.light-actions .text-button { font-size: 12px; }

@media (max-width: 780px) {
  .light-mode { font-size: 13.5px; }
  .light-action { font-size: 12.5px; }
}

/* 输入框下面两个按钮：主按钮占满剩余，次按钮按内容宽度，窄屏也不挤出卡片 */
@media (max-width: 780px) {
  .recommend-actions { display: flex; width: 100%; }
  .recommend-actions .primary-button { width: auto; flex: 1 1 auto; min-width: 0; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
  .recommend-actions .secondary-button { flex: 0 0 auto; padding: 9px 10px; }
}

/* 报告开头：开场 / 收尾 两个词并排，不画高低，不暗示涨跌 */
.report-state-flow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 6px 0 4px; }
.rsf-end { display: flex; flex-direction: column; gap: 2px; }
.rsf-end span { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }
.rsf-end b { font-size: 17px; font-weight: 600; color: var(--ink); }
.rsf-end-right { text-align: right; }
.rsf-mid { flex: 0 0 auto; padding-bottom: 2px; font-size: 15px; color: var(--muted); }
.rsf-note { flex: 1 0 100%; margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
@media (max-width: 480px) {
  .rsf-end b { font-size: 16px; }
}

/* 主按钮文字居中，和右侧按钮对齐 */
.recommend-actions .primary-button { text-align: center; padding-left: 12px; padding-right: 12px; }

.recommend-actions .primary-button { display: inline-flex; align-items: center; justify-content: center; }

/* 按钮主次：「现在开始」实心占宽，「先选个教练」是次级文字按钮 */
.recommend-actions { align-items: center; }
.recommend-actions #recommendButton {
  flex: 0 0 auto;
  padding: 12px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(37, 95, 85, .35);
}
.recommend-actions #recommendButton:hover { background: transparent; text-decoration-color: var(--accent); }
.recommend-actions #lightButton {
  flex: 1 1 auto;
  min-width: 0;
  min-height: clamp(46px, 6vh, 52px);
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 3px 14px 3px 14px;
  background: var(--accent);
  box-shadow: 0 8px 24px rgba(37, 95, 85, .16);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.recommend-actions #lightButton:hover { background: #1f4c44; }

@media (max-width: 360px) {
  .state-option { padding: 10px 5px; }
  .state-option-text strong { font-size: 11px; }
  .state-option-icon { width: 13px; height: 13px; }
}

/* 窄屏用三字短名，避免长句在窄格里溢出 */
.s-short { display: none; }
@media (max-width: 600px) {
  .s-full { display: none; }
  .s-short { display: inline; }
  .state-option-text { overflow: hidden; }
}

/* 窄屏状态卡压缩：覆盖旧的 40px 左内距，图标行内显示 */
@media (max-width: 600px) {
  .state-panel .state-options .state-option { padding: 10px 8px; gap: 4px; }
  .state-panel .state-option-icon { width: 14px; height: 14px; }
  .state-panel .state-option-text { overflow: visible; }
}
@media (max-width: 360px) {
  .state-panel .state-options .state-option { padding: 9px 6px; gap: 3px; }
  .state-option-text strong { font-size: 10.5px; }
}

/* 写事输入框加高：像可以写一句话的地方，不是搜索条 */
#recommendQuery {
  min-height: 56px;
  padding: 17px 14px;
  font-size: 16px;
  line-height: 1.45;
}

/* 三张状态卡：无图标、默认不选，名字 + 一句说明都露出来 */
@media (max-width: 600px) {
  .state-panel .state-options .state-option { flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 9px; }
  .state-option-text strong { font-size: 12px; white-space: normal; }
  .state-option-text small { display: block; font-size: 10px; line-height: 1.35; margin-top: 1px; }
}

/* 写事是这页的重点：框要够高、够显眼 */
.recommend-inline #recommendQuery {
  min-height: 112px;
  padding: 8px 14px 26px;
  border: 1.5px solid rgba(37, 95, 85, .38);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  resize: none;
  box-shadow: 0 1px 0 rgba(37, 95, 85, .08) inset;
}
.recommend-inline #recommendQuery::placeholder { color: #9aa59f; font-size: 14px; }
.recommend-inline #recommendQuery:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 95, 85, .14); outline: none; }

/* 情绪行：作为六个词的上位说明，左对齐与词头对齐，字号收一档 */
.state-panel .mood-row-setup .mood-row-label {
  display: block;
  margin: 12px 0 7px;
  font-size: 12.5px;
  letter-spacing: .02em;
  color: #8a9691;
}

/* ===== 三张状态卡：每种卡点有自己的手感色 ===== */
.state-option { transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.state-option:has(input[value="6"]) { background: #eef2f4; border-color: #d6e0e4; }
.state-option:has(input[value="6"]) .state-option-icon { color: #7d939d; }
.state-option:has(input[value="6"]) .state-option-text small { color: #78909a; }

.state-option:has(input[value="5"]) { background: #f9f0e2; border-color: #ecd9bf; }
.state-option:has(input[value="5"]) .state-option-icon { color: #b2865a; }
.state-option:has(input[value="5"]) .state-option-text small { color: #a3815c; }

.state-option:has(input[value="3"]) { background: #f4eef6; border-color: #ded2e3; }
.state-option:has(input[value="3"]) .state-option-icon { color: #8b7c9b; }
.state-option:has(input[value="3"]) .state-option-text small { color: #857793; }

/* 选中：同色系加深一圈，不用绿色抢戏 */
.state-option:has(input[value="6"]:checked) { background: #e2eaee; border-color: #8ba4ae; box-shadow: 0 0 0 1px rgba(125,147,157,.35); }
.state-option:has(input[value="5"]:checked) { background: #f5e5cd; border-color: #c69a68; box-shadow: 0 0 0 1px rgba(178,134,90,.35); }
.state-option:has(input[value="3"]:checked) { background: #ebe2ef; border-color: #a996b6; box-shadow: 0 0 0 1px rgba(139,124,155,.35); }
.state-option:has(input:checked) .state-option-text strong { color: #22302c; }

/* 图标放在卡内右上角，像一枚小印，不挤文字 */
@media (max-width: 600px) {
  .state-panel .state-options .state-option { position: relative; padding: 12px 10px 11px; }
  .state-panel .state-option-icon {
    position: absolute; top: 9px; right: 9px;
    width: 16px; height: 16px; transform: none;
  }
  .state-option-text { padding-right: 18px; }
  .state-panel .state-option:has(input[value="6"]) .state-option-icon { color: #6d8892; }
  .state-panel .state-option:has(input[value="5"]) .state-option-icon { color: #a97c4c; }
  .state-panel .state-option:has(input[value="3"]) .state-option-icon { color: #7f6d92; }
}

/* 320 宽：三列已经很窄，只留名字，说明文字收起，避免一字一行 */
@media (max-width: 360px) {
  .state-panel .state-options .state-option { padding: 10px 8px; }
  .state-panel .state-option-text { padding-right: 14px; }
  .state-panel .state-option-text small { display: none; }
  .state-panel .state-option-icon { width: 14px; height: 14px; top: 8px; right: 7px; }
  .state-panel .state-option-text strong { font-size: 12px; }
}

/* 390 宽：说明文字吃满整宽，别被图标挤成一字一行 */
@media (max-width: 600px) and (min-width: 361px) {
  .state-panel .state-option-text { padding-right: 0; }
  .state-panel .state-option-text strong { padding-right: 20px; }
  .state-panel .state-option-text small { font-size: 9.5px; line-height: 1.4; }
}

/* 写事框：内部留白恢复均衡，改的是它与上下控件的间距 */
#recommendQuery {
  padding: 14px 14px;
  margin-top: 4px;
  margin-bottom: 16px;
}

/* 高优先级覆盖：框内四周等距；框上方贴近说明，下方留出更明显的空档 */
.recommend-inline #recommendQuery {
  padding: 14px;
  margin-top: 0;
  margin-bottom: 8px;
}

/* 图标回到第一行文字左侧，与名字同一行，不压在卡角 */
.state-panel .state-options .state-option { padding-left: 12px; }
.state-panel .state-option .state-option-icon {
  position: static; top: auto; right: auto; left: auto;
  width: 15px; height: 15px; transform: none; flex: none;
  margin: 0; display: inline-block; vertical-align: -2px;
}
.state-panel .state-option-text strong { display: inline-flex; align-items: center; gap: 5px; }

/* 名字一行读完，图标已同行，不再为图标预留右内距 */
.state-panel .state-option-text strong { padding-right: 0; white-space: nowrap; }

/* 选中态加强：更粗的外环 + 更深底色 + 右上角对勾 */
.state-panel .state-option:has(input[value="6"]:checked) { background: #d9e4ea; border-color: #63808d; box-shadow: 0 0 0 2px rgba(99,128,141,.55); }
.state-panel .state-option:has(input[value="5"]:checked) { background: #f2ddc0; border-color: #b07f48; box-shadow: 0 0 0 2px rgba(176,127,72,.55); }
.state-panel .state-option:has(input[value="3"]:checked) { background: #e7dcee; border-color: #8a73a3; box-shadow: 0 0 0 2px rgba(138,115,163,.55); }
.state-panel .state-option:has(input:checked) { position: relative; }
.state-panel .state-option:has(input:checked) .state-option-text strong { color: #1b2622; font-weight: 700; }
.state-panel .state-option:has(input:checked)::after {
  content: "✓"; position: absolute; top: 5px; right: 7px;
  font-size: 12px; line-height: 1; font-weight: 700; opacity: .9;
}
.state-panel .state-option:has(input[value="6"]:checked)::after { color: #5b7a87; }
.state-panel .state-option:has(input[value="5"]:checked)::after { color: #a3743c; }
.state-panel .state-option:has(input[value="3"]:checked)::after { color: #7e679a; }


/* 目标卡说明里的重点词：只加粗，不改字号和颜色层级。 */
.state-option-text small .state-em { font-weight: 1000; color: inherit; }

/* ===== 2026-11-18 · 合规与 AI 标识 ===== */
.session-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.session-title .eyebrow { margin-bottom: 0; }
.ai-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(37, 95, 85, 0.22);
  border-radius: 999px;
  color: var(--accent);
  background: #eaf3ed;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.session-ai-note {
  margin: -8px 0 12px;
  color: #6b7780;
  font-size: 11.5px;
  line-height: 1.6;
}
.chat-ai-disclosure {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  padding: 7px 10px;
  border: 1px dashed #d9e2da;
  border-radius: 9px;
  color: #6b7780;
  background: rgba(255, 254, 250, 0.72);
  font-size: 11px;
  line-height: 1.5;
}
.ai-dot {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 18px;
  border-radius: 5px;
  color: #fff;
  background: var(--accent);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.safety-help-button { color: #8a573f; border-bottom-color: rgba(138, 87, 63, 0.45); }
.consent-doc-links {
  margin: 12px 0 4px;
  color: #6b7780;
  font-size: 11.5px;
  line-height: 1.8;
}
.consent-doc-links a { color: var(--accent); text-underline-offset: 2px; }
.consent-micro { margin: 0 0 14px; color: #97a39d; font-size: 11px; }
.consent-check { align-items: flex-start; line-height: 1.65; }
.consent-check + .consent-check { margin-top: -4px; }

.safety-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: 88vh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  overflow: visible;
}
.safety-dialog::backdrop { background: rgba(35, 45, 41, 0.42); backdrop-filter: blur(2px); }
.safety-panel {
  max-height: 88vh;
  overflow-y: auto;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 20px;
  background: #fffdf8;
  box-shadow: 0 24px 70px rgba(29, 42, 51, 0.18);
}
.safety-panel h2 {
  margin: 0 0 14px;
  font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
  font-size: clamp(21px, 3.2vw, 27px);
  font-weight: 600;
  line-height: 1.35;
}
.safety-panel > p { margin: 0 0 12px; color: #52635d; font-size: 13.5px; line-height: 1.75; }
.safety-list {
  margin: 8px 0 14px;
  padding-left: 20px;
  color: #3f524c;
  font-size: 13.5px;
  line-height: 1.8;
}
.safety-list li { margin-bottom: 7px; }
.safety-panel .safety-note {
  margin: 14px 0 18px;
  padding: 10px 12px;
  border-left: 2px solid #c4876f;
  color: #815647;
  background: #f9f0e9;
  font-size: 12px;
  line-height: 1.7;
}
.safety-panel .sheet-actions { margin-top: 16px; }

@media (max-width: 780px) {
  .session-topline { gap: 8px; }
  .session-topline .eyebrow { display: inline-block; font-size: 12px; letter-spacing: 0.04em; }
  .session-title { gap: 6px; overflow: hidden; }
  .session-title .eyebrow { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ai-badge { min-height: 19px; padding: 1px 6px; font-size: 9.5px; }
  .session-actions { gap: 7px; flex: none; }
  .session-actions .text-button { font-size: 10.5px; white-space: nowrap; }
  .session-ai-note { margin: -2px 0 8px; font-size: 10.5px; }
  .chat-ai-disclosure { padding: 6px 8px; font-size: 10px; }
  .ai-dot { width: 21px; height: 16px; font-size: 9px; }
}
.report-ai-note { margin: -6px 0 14px; color: #8a9590; font-size: 11.5px; line-height: 1.6; }
.setup-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 4px;
  color: #97a39d;
  font-size: 11.5px;
  line-height: 1.8;
}
.setup-legal a { color: #7f8f88; text-decoration: none; }
.setup-legal a:hover { color: var(--accent); text-decoration: underline; }
.setup-legal-link { padding: 0; border: 0; background: none; color: #7f8f88; font: inherit; line-height: inherit; cursor: pointer; }
.setup-legal-link:hover { color: var(--accent); text-decoration: underline; }


/* ---------- 这一圈：把一次练习放回跑道 ---------- */
.report-loop { margin: 2px 0 8px; padding: 13px 14px 12px; border: 1px solid #ecd7b9; border-radius: 14px; background: linear-gradient(135deg, #fffaf0, #fff1d6); }
.report-loop-head { display: flex; align-items: center; gap: 9px; }
.report-loop-kicker { flex: none; padding: 3px 8px; border: 1px solid #ddbb7f; border-radius: 999px; color: #966328; background: rgba(255,255,255,.55); font-size: 10px; line-height: 1.3; letter-spacing: .04em; }
.report-loop-title { margin: 0; color: #4f3a26; font-size: 16px; font-weight: 650; }
.report-loop-list { display: grid; gap: 7px; margin-top: 10px; }
.report-loop-item { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 9px; align-items: start; }
.report-loop-label { color: #a27b4e; font-size: 10.5px; line-height: 1.7; }
.report-loop-text { margin: 0; color: #4d4032; font-size: 12.5px; line-height: 1.72; }
.report-loop-foot { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid rgba(200,160,100,.22); color: #967552; font-size: 10.5px; line-height: 1.6; }

/* ---------- 详实练习报告：进步证据、原理、帮助、成就 ---------- */
.report-progress { margin: 2px 0 4px; padding: 14px 15px 10px; border: 1px solid #e7dfd0; border-radius: 14px; background: #fffdf8; }
.report-progress-title { margin: 0 0 10px; font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.progress-item { padding: 9px 0; border-top: 1px solid #f0e9dc; }
.progress-item:first-of-type { border-top: 0; padding-top: 0; }
.progress-item:last-of-type { padding-bottom: 0; }
.progress-item { display: grid; grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr); gap: 8px; align-items: start; }
.progress-side { min-width: 0; }
.progress-before { color: #8a7767; }
.progress-after { color: #35564a; }
.progress-tag { display: block; margin-bottom: 3px; font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.progress-text { margin: 0; font-size: 12.5px; line-height: 1.65; }
.progress-arrow { display: flex; align-items: center; justify-content: center; padding-top: 14px; color: #b7a184; font-size: 14px; }
.progress-evidence { grid-column: 1 / -1; margin: 3px 0 0; font-size: 11px; line-height: 1.6; color: #9a846f; }
@media (max-width: 420px) {
  .report-progress { padding: 13px 13px 10px; }
  .progress-item { grid-template-columns: 1fr; gap: 4px; }
  .progress-arrow { padding: 0; transform: rotate(90deg); justify-content: flex-start; }
}
/* 心智拆解：三层像剥洋葱一样往里收，最后落在能带走的装备。 */
.report-onion { margin: 2px 0 4px; padding: 14px 14px 12px; border: 1px solid #e3ddd2; border-radius: 14px; background: linear-gradient(180deg, #fffdf8, #fbf7ef); overflow: hidden; }
.report-onion-title { margin: 0 0 4px; font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.report-onion-hint { margin: 0 0 10px; font-size: 11px; line-height: 1.65; color: #9a8d7d; }
.report-onion-stack { display: flex; flex-direction: column; gap: 6px; }
.report-onion-layer { position: relative; padding: 10px 13px 11px 34px; border: 1px solid #e8dfd2; border-radius: 12px; background: #fffdf8; box-shadow: 0 1px 0 rgba(122, 94, 62, .04); }
.report-onion-layer:nth-child(2) { margin-left: 12px; margin-right: 4px; background: #fbf4e8; }
.report-onion-layer:nth-child(3) { margin-left: 24px; margin-right: 8px; background: #f4f8f3; border-color: #d7e3d8; }
.report-onion-number { position: absolute; left: 12px; top: 11px; font-family: var(--serif); font-size: 12px; color: #b09a7e; letter-spacing: .06em; }
.report-onion-label { margin: 0 0 3px; font-size: 10px; letter-spacing: .1em; color: #8e7a61; }
.report-onion-text { margin: 0; font-size: 12.5px; line-height: 1.75; color: #4f4234; }
@media (max-width: 420px) {
  .report-onion { padding: 12px 11px 10px; }
  .report-onion-layer { padding-left: 29px; }
  .report-onion-layer:nth-child(2) { margin-left: 7px; margin-right: 2px; }
  .report-onion-layer:nth-child(3) { margin-left: 14px; margin-right: 4px; }
  .report-onion-number { left: 9px; font-size: 11px; }
}
.report-achievement { margin: 0 0 4px; padding: 12px 14px; border: 1px solid #e6d5b7; border-radius: 12px; background: #fdf7ea; }
.report-achievement-label { margin: 0 0 4px; font-size: 10px; letter-spacing: .12em; color: #a08256; }
.report-achievement-text { margin: 0; font-family: var(--serif); font-size: 14px; line-height: 1.8; color: #5a4423; }
.report-why { margin: 2px 0 4px; padding: 12px 14px; border-left: 3px solid #a9c3b5; border-radius: 0 10px 10px 0; background: #f2f8f4; }
.report-why-label { margin: 0 0 5px; font-size: 10px; letter-spacing: .12em; color: #6d8b7c; }
.report-why-text { margin: 0; font-size: 12.5px; line-height: 1.8; color: #35564a; }
.report-help { margin: 2px 0 4px; padding: 12px 14px; border: 1px dashed #ddd3c2; border-radius: 12px; background: #fbfaf5; }
.report-help-label { margin: 0 0 5px; font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.report-help-list { margin: 0; padding-left: 17px; color: var(--ink); font-size: 12.5px; line-height: 1.8; }
.report-help-list li { margin: 2px 0; }

/* ---------- 2026-11-19 心智图鉴：从抽屉走到首页与结算 ---------- */
.mindset-entry { display: inline-flex; align-items: center; gap: 6px; }
.mindset-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 10px; line-height: 18px;
  text-align: center; letter-spacing: 0;
}
.mindset-home-bar {
  width: 100%; display: flex; align-items: center; gap: 12px;
  margin: 0 0 14px; padding: 11px 13px; border: 1px solid rgba(201, 157, 49, .38);
  border-radius: 13px; background: linear-gradient(120deg, #fffdf2, #fff0bd);
  color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}
.mindset-home-bar:hover, .mindset-home-bar:focus-visible { border-color: #c99d31; background: linear-gradient(120deg, #fffef7, #ffe89d); transform: translateY(-1px); }
.mindset-home-grid {
  flex: 0 0 auto; width: 46px; height: 56px; padding: 5px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px;
  border: 1px solid rgba(201, 157, 49, .38); border-radius: 11px;
  background: rgba(255,255,255,.82);
}
.mindset-home-cell {
  border-radius: 2px; background: rgba(201, 157, 49, .18);
  transition: background 160ms ease;
}
.mindset-home-cell.is-lit { background: var(--accent); }
.mindset-home-cell.is-broken { background: #b08a44; }
.mindset-home-words { min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.mindset-home-words strong { font-family: var(--serif); font-size: 14px; font-weight: 650; letter-spacing: .03em; }
.mindset-home-words em { font-style: normal; color: var(--muted); font-size: 11.5px; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mindset-home-arrow { flex: 0 0 auto; color: var(--accent-dark); font-size: 11.5px; letter-spacing: .03em; }
.mindset-series-count { margin-left: auto; color: var(--accent-dark); font-size: 11px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.mindset-weekly {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 0 0 10px; padding: 8px 11px; border-radius: 10px;
  background: rgba(37, 95, 85, .06); border: 1px solid rgba(37, 95, 85, .12);
}
.mw-label { color: var(--accent-dark); font-size: 12px; letter-spacing: .02em; }
.mw-hint { color: var(--muted); font-size: 10px; white-space: nowrap; }
.message-mode {
  border: 1px solid rgba(37, 95, 85, .16); border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark); cursor: pointer;
  font-family: inherit; text-align: left;
}
.message-mode:hover, .message-mode:focus-visible { border-color: var(--accent); background: #d7e8df; }

.report-mindset-slot { margin: 10px 0 2px; }
.report-mindset {
  padding: 13px 14px 12px; border: 1px solid #d9e4db; border-radius: 15px;
  background: linear-gradient(135deg, #fbfaf4 0%, #f0f6f0 100%);
  box-shadow: 0 10px 24px rgba(35, 73, 59, .06);
}
.rm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.rm-kicker { color: #8a6a33; font-size: 10.5px; letter-spacing: .13em; }
.rm-total { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.rm-main { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; }
.rm-art {
  width: 72px; height: 88px; border-radius: 10px; border: 1px solid rgba(37,95,85,.2);
  background-image: var(--rm-art, none); background-size: cover; background-position: center;
  background-color: #e7eee8;
}
.rm-copy { min-width: 0; }
.rm-name { margin: 0 0 3px; font-family: var(--serif); font-size: 17px; font-weight: 650; color: var(--ink); }
.rm-delta { margin: 0 0 2px; color: var(--accent-dark); font-size: 12.5px; font-weight: 600; }
.rm-level { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.rm-evidence { margin: 4px 0 0; color: #7e7462; font-size: 10.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rm-other { margin: 7px 0 0; color: var(--muted); font-size: 10.5px; }
.rm-actions { display: flex; gap: 8px; margin-top: 10px; }
.rm-button {
  flex: 1; min-height: 32px; padding: 6px 10px; border: 1px solid rgba(37,95,85,.3);
  border-radius: 9px; background: rgba(255,255,255,.7); color: var(--accent-dark);
  font-family: inherit; font-size: 12px; cursor: pointer;
}
.rm-button:hover, .rm-button:focus-visible { background: #fff; border-color: var(--accent); }
.rm-button-quiet { color: var(--muted); border-color: var(--line); }
.followup-mindset-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

@media (max-width: 430px) {
  .mindset-home-bar { gap: 9px; padding: 10px 11px; }
  .mindset-home-grid { width: 42px; height: 52px; padding: 4px; gap: 2.5px; }
  .mindset-home-words em { font-size: 10.5px; }
  .rm-main { grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
  .rm-art { width: 62px; height: 78px; }
  .rm-name { font-size: 15.5px; }
  .rm-actions { gap: 6px; }
}
