/* ─── 变量 ────────────────────────────────────────────── */
:root {
  --font-title: "STKaiti", "Kaiti SC", "LXGW WenKai", "Times New Roman", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --bg-start: #d8f3ea;
  --bg-mid: #f3f8ea;
  --bg-end: #ffe9dc;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(237, 247, 242, 0.7);
  --text-main: #16352b;
  --text-muted: #4d675d;
  --accent: #1d8f6a;
  --accent-soft: #dcfff2;
  --user-bubble: #2f7f67;
  --user-text: #f4fff8;
  --system-bubble: #eef7ff;
  --error: #b13a3a;
  --error-bg: #ffe9e9;
  --shadow-lg: 0 24px 60px rgba(26, 53, 43, 0.16);
  --shadow-sm: 0 6px 18px rgba(20, 43, 35, 0.12);
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --duration-fast: 0.2s;
  --duration-med: 0.36s;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: linear-gradient(to right, #b8e6d8, #f5d4b3);
  overflow: hidden;
}

/* ─── 主容器（已砍侧栏：单列布局，只剩 chat 面板）────────── */
.shell {
  position: relative;
  z-index: 1;
  width: min(960px, 94vw);
  height: min(90vh, 900px);
  margin: 4vh auto;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: var(--radius-xl);
  animation: shellEnter var(--duration-med) ease-out both;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow-sm);
}

@keyframes shellEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── 连接状态点（mobile-topbar 仍用到） ──────────────────── */
.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(29, 143, 106, 0.14);
}
.dot-connecting    { background: #e7a544; }
.dot-connected     { background: #2cb575; }
.dot-disconnected  { background: #ca5656; }

/* ─── 主聊天面板 ──────────────────────────────────────────── */
.panel-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 18px 18px 14px;
  position: relative;
  overflow: hidden;
  flex: 1;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.chat-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.chat-header h2 {
  margin: 6px 0 0;
  font-size: 28px;
  font-family: var(--font-title);
}
/* 品牌字标（替换原「对话空间」标题）。素材 2130x542，宽高比约 3.93:1，
   故只限定高度、宽度自适应，避免拉伸变形。 */
.chat-logo {
  display: block;
  height: 34px;
  width: auto;
  margin: 6px 0 0;
}

/* ─── 错误栏 ──────────────────────────────────────────────── */
.error-bar {
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--error-bg);
  border: 1px solid rgba(177, 58, 58, 0.3);
  color: var(--error);
  font-size: 13px;
}

/* ─── 消息区域 + 气泡 ────────────────────────────────────── */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.messages .msg {
  max-width: 88%;
  background: var(--surface-strong);
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(20, 43, 35, 0.06);
  font-size: 14.5px;
  line-height: 1.55;
  word-wrap: break-word;
}

.msg-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-muted);
  /* 作者名与时间戳分别放在两端，避免内联粘连成 "MoodBuddy1:38"。
     与 xiaocheng/web/styles.css 的 .msg-title 保持一致。 */
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.msg-body { font-size: 14.5px; line-height: 1.7; color: var(--text-main); }
.msg-body ul, .msg-body ol { padding-left: 22px; margin: 6px 0; }
.msg-body li { margin: 4px 0; }
.msg-body p  { margin: 6px 0; }
.msg-body code {
  background: rgba(29, 143, 106, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #0d5a40;
}
.msg-body pre {
  background: rgba(13, 90, 64, 0.05);
  padding: 10px 12px;
  border-radius: 8px;
  overflow-x: auto;
}
.msg-body pre code { background: transparent; padding: 0; }
.msg-body blockquote {
  margin: 6px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(29, 143, 106, 0.06);
  color: var(--text-muted);
  border-radius: 0 6px 6px 0;
}
.msg-body h1, .msg-body h2, .msg-body h3,
.msg-body h4, .msg-body h5, .msg-body h6 {
  margin: 8px 0 6px;
  font-family: var(--font-title);
}
.msg-body hr { border: 0; border-top: 1px solid rgba(0,0,0,0.08); margin: 10px 0; }
.msg-body strong { color: var(--text-main); }
.msg-body em { color: var(--text-muted); }
.msg-body a { color: var(--accent); text-decoration: underline; }

/* ⚠️ 注意：base 气泡选择器是 `.messages .msg`（权重 0,2,0），
   因此用户气泡也必须用 `.messages .msg-user`（同为 0,2,0 且后写）才能覆盖背景色。
   历史 bug：原写作 `.msg-user`（0,1,0）权重不足，被 base 的白色背景压掉，
   导致「近白文字 + 白底」→ 用户消息看不见。修复：提升到 `.messages .msg-user`。 */
.messages .msg-user {
  align-self: flex-end;
  background: var(--user-bubble);
  color: var(--user-text);
}
.messages .msg-user .msg-title { color: rgba(255,255,255,0.7); }
.messages .msg-user .msg-body { color: var(--user-text); }

.msg-system {
  align-self: center;
  background: var(--system-bubble);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* ─── 欢迎页 ──────────────────────────────────────────────── */
.welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  margin-top: 20vh;
  overflow-x: hidden;
}
.welcome-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  opacity: 1;
  width: 44px;
  height: 44px;
}
.welcome-icon svg { display: block; }
.welcome-text {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-main);
}
.welcome-sub {
  margin: 6px 0 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: center;
  max-width: 100%;
}
.welcome-sub .ws-no-break {
  display: inline-block;
  white-space: nowrap;
  max-width: 100%;
}

/* ─── 打字指示器 ─────────────────────────────────────────── */
.typing {
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.6;
  animation: typing-bounce 1.4s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
.typing em { font-style: normal; color: var(--text-muted); font-size: 13px; margin-left: 6px; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: scale(0.7); opacity: 0.55; }
  30%           { transform: scale(1.0); opacity: 1;    }
}

/* ─── 输入栏 ─────────────────────────────────────────────── */
.composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0,0,0,0.05);
  flex-shrink: 0;
}
.composer textarea {
  width: 100%;
  min-height: 44px;
  max-height: 140px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  background: transparent;
  border: 0;
  outline: none;
  resize: vertical;
  color: var(--text-main);
}
.composer textarea:focus { background: rgba(255,255,255,0.5); }

.composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

/* ─── 按钮 ───────────────────────────────────────────────── */
.btn-send {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.btn-send:hover { background: #157554; }
.btn-send:active { transform: scale(0.97); }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-voice {
  background: rgba(29, 143, 106, 0.08);
  color: var(--accent);
  border: 0;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-voice:hover { background: rgba(29, 143, 106, 0.15); }
.btn-voice.is-recording {
  background: #e74c3c;
  color: #fff;
}
.btn-voice.is-continuous {
  background: linear-gradient(135deg, #b6d7c1, #d8f3ea);
  color: #2e7d32;
  cursor: not-allowed;
  opacity: 0.85;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.btn-ghost:hover { background: rgba(0,0,0,0.04); }

/* ─── voice-mode chip ────────────────────────────────────── */
.voice-call-bar { display: flex; align-items: center; }
.voice-call-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(29, 143, 106, 0.22);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  user-select: none;
  cursor: default;
  white-space: nowrap;
}
.voice-call-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.voice-call-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: voice-bounce 1.2s infinite ease-in-out;
}
.voice-call-dots span:nth-child(2) { animation-delay: 0.15s; }
.voice-call-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes voice-bounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.55; }
  40%           { transform: scale(1.0); opacity: 1;    }
}
.composer.voice-mode .btn-voice { display: none; }
.composer.voice-mode { padding: 10px; }
.composer.voice-mode textarea { min-height: 50px; }

/* ─── 触摸设备后备 ─────────────────────────────────────────── */
@media (pointer: coarse) {
  .btn, button {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  textarea, input { font-size: 16px; }
}

/* ─── 窄屏响应式 ─────────────────────────────────────────── */
@media (max-width: 980px) {
  body { overflow: auto; }
  .shell {
    margin: 0;
    width: 100vw;
    min-height: 100vh;
    height: auto;
    border-radius: 0;
    padding: 10px;
  }
  .panel-chat { min-height: 68vh; }
  .composer   { position: sticky; bottom: 0; }
  .messages .msg { max-width: 92%; }
}

/* ─── sr-only（无障碍） ──────────────────────────────────── */
.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;
}

/* ─── 内联 SVG icon 容器 ─────────────────────────────────── */
.ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  line-height: 0;
}
.ic svg { width: 100%; height: 100%; display: block; }

/* ─── production 环境视觉策略 ────────────────────────────── */
body.env-prod .msg-tags { display: none !important; }
body.env-prod .dev-only { display: none !important; }

/* =================================================================
   TestXC 新增样式（2026-09-24）
   桌面端：stage 容器 / 协议 / 问卷 / 标注 / 结束按钮
   ================================================================= */

/* ── stage-root：非聊天 stage 的容器 ───────────────────────────── */
.stage-root {
  max-width: 760px;
  margin: 32px auto;
  padding: 0 20px;
  font-family: var(--font-body, "PingFang SC", "Microsoft YaHei", sans-serif);
  color: var(--text-main, #16352b);
}
.stage-root .stage-loading {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted, #4d675d);
  font-size: 14px;
}
.stage-root .stage-error,
.stage-root .stage-err {
  background: var(--error-bg, #ffe9e9);
  color: var(--error, #b13a3a);
  border-radius: var(--radius-md, 12px);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 14px;
}
.stage-root .stage-missing {
  background: #fff3cd;
  color: #856404;
  border-radius: var(--radius-md, 12px);
  padding: 16px;
  font-size: 14px;
}

/* ── stage-card：每个 stage 的内容卡片 ────────────────────────── */
.stage-root .stage-card {
  background: var(--surface-strong, rgba(255,255,255,0.96));
  border-radius: var(--radius-xl, 26px);
  padding: 36px 40px;
  box-shadow: var(--shadow-lg, 0 24px 60px rgba(26,53,43,0.16));
}
.stage-root .stage-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main, #16352b);
  font-family: var(--font-title, "STKaiti", "Kaiti SC", serif);
}
.stage-root .stage-intro {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--text-muted, #4d675d);
  line-height: 1.7;
}
/* 无标题时的 intro：加粗 + 放大 + 主文字色，承担原标题的视觉职责
   （用于 stage2「对话前基线评定」，其标题已按要求删除） */
.stage-root .stage-intro-emph {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main, #16352b);
}
.stage-root .stage-req {
  margin: 0 0 20px;
  padding: 10px 14px;
  background: var(--accent-soft, #dcfff2);
  color: var(--accent, #1d8f6a);
  border-radius: var(--radius-md, 12px);
  font-size: 13px;
}

/* ── 协议页（stage 1） ───────────────────────────────────────── */
.stage-root .consent-body { margin: 18px 0 28px; }
.stage-root .consent-body .consent-p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-main, #16352b);
}
.stage-root .consent-body .consent-h {
  margin: 16px 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main, #16352b);
}

/* ── 问卷（stage 2 / 4 / 5） ──────────────────────────────── */
.stage-root .survey-form .survey-q { margin-bottom: 24px; }
.stage-root .survey-q-label {
  display: block;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main, #16352b);
}
.stage-root .survey-required {
  color: var(--error, #b13a3a);
  margin-left: 4px;
}
.stage-root .survey-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.stage-root .survey-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface-soft, #edf7f2);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--duration-fast, 0.2s);
}
.stage-root .survey-option:hover { background: var(--accent-soft, #dcfff2); }
.stage-root .survey-radio { accent-color: var(--accent, #1d8f6a); }
.stage-root .survey-text {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid #d8e7df;
  border-radius: var(--radius-md, 12px);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}
.stage-root .survey-text-long { min-height: 140px; }
.stage-root .survey-text:focus {
  outline: none;
  border-color: var(--accent, #1d8f6a);
  box-shadow: 0 0 0 3px var(--accent-soft, #dcfff2);
}
.stage-root .survey-unsupported {
  color: var(--text-muted, #999);
  font-size: 13px;
  font-style: italic;
}

/* ── 按钮 ────────────────────────────────────────────────── */
.stage-root .btn-primary,
.stage-root .btn-ghost {
  display: inline-block;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast, 0.2s);
  font-family: inherit;
}
.stage-root .btn-primary {
  background: var(--accent, #1d8f6a);
  color: #fff;
  box-shadow: 0 6px 18px rgba(29, 143, 106, 0.25);
}
.stage-root .btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(29, 143, 106, 0.35);
}
.stage-root .btn-primary:disabled {
  background: #b9c7c1;
  cursor: not-allowed;
  box-shadow: none;
}
.stage-root .btn-ghost {
  background: transparent;
  color: var(--text-main, #16352b);
  border: 1px solid #d8e7df;
}
.stage-root .btn-ghost:hover { background: var(--surface-soft, #edf7f2); }
.stage-root .btn-agree,
.stage-root .btn-submit,
.stage-root .btn-next {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px 0;
  font-size: 16px;
}

/* ── 重要时刻标注（stage 6） ────────────────────────────── */
.stage-root .marks-counter {
  margin: 12px 0 18px;
  padding: 10px 14px;
  background: var(--accent-soft, #dcfff2);
  color: var(--accent, #1d8f6a);
  border-radius: var(--radius-md, 12px);
  font-size: 14px;
  font-weight: 500;
}
.stage-root .marks-count-num {
  display: inline-block;
  min-width: 1.5em;
  text-align: center;
  font-weight: 700;
}
.stage-root .marks-bubbles { display: flex; flex-direction: column; gap: 12px; }
/* 对话记录窗口：限高 + 内部滚动，对齐「对话时那个消息窗口」的体感。
   此前气泡随文档流整页拉长，几十条要一路滚页面才能看完。 */
.stage-root .marks-scroll {
  max-height: 46vh;
  min-height: 180px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  background: var(--surface-soft, #f3f8f5);
  border: 1px solid #e2ede7;
  border-radius: var(--radius-md, 12px);
  scrollbar-width: thin;
}
.stage-root .marks-scroll::-webkit-scrollbar { width: 8px; }
.stage-root .marks-scroll::-webkit-scrollbar-track { background: transparent; }
.stage-root .marks-scroll::-webkit-scrollbar-thumb {
  background: rgba(29, 143, 106, 0.28);
  border-radius: 4px;
}
.stage-root .marks-scroll::-webkit-scrollbar-thumb:hover { background: rgba(29, 143, 106, 0.45); }

.stage-root .marks-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted, #999);
  background: var(--surface-soft, #edf7f2);
  border-radius: var(--radius-md, 12px);
  font-size: 14px;
}
.stage-root .bubble {
  padding: 12px 16px;
  border-radius: 16px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--duration-fast, 0.2s);
  font-size: 14px;
  line-height: 1.6;
}
.stage-root .bubble-user {
  background: var(--user-bubble, #2f7f67);
  color: var(--user-text, #f4fff8);
  align-self: flex-end;
  max-width: 75%;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.stage-root .bubble-ai {
  background: var(--system-bubble, #eef7ff);
  color: var(--text-main, #16352b);
  align-self: flex-start;
  max-width: 75%;
  border-bottom-left-radius: 4px;
}
.stage-root .bubble:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm, 0 6px 18px rgba(20,43,35,0.12)); }
.stage-root .bubble.marked { border-color: var(--accent, #1d8f6a); }

/* 不可标注的气泡（用户自己的发言）：保留展示以提供上下文，
   但去掉点击态 / hover 位移 / 手型光标，避免误导用户去点。 */
.stage-root .bubble.not-markable {
  cursor: default;
  opacity: 0.62;
}
.stage-root .bubble.not-markable:hover {
  transform: none;
  box-shadow: none;
}
/* 可标注提示：仅 AI 气泡在 hover 时给出轻微描边，明示「这里可以点」 */
.stage-root .bubble:not(.not-markable):hover {
  border-color: rgba(29, 143, 106, 0.35);
}
.stage-root .bubble-role {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stage-root .bubble-content { white-space: pre-wrap; word-break: break-word; }
.stage-root .bubble-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(127,127,127,0.3);
  font-size: 13px;
  font-style: italic;
  opacity: 0.9;
}

/* ── Modal ──────────────────────────────────────────────── */
.mark-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 30, 28, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.mark-modal {
  background: #fff;
  border-radius: var(--radius-xl, 26px);
  padding: 28px 30px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg, 0 24px 60px rgba(26,53,43,0.32));
  max-height: 90vh;
  overflow-y: auto;
}
.mark-modal-title { margin: 0 0 14px; font-size: 18px; font-weight: 600; color: var(--text-main, #16352b); }
.mark-modal-prompt { margin: 0 0 12px; font-size: 14px; color: var(--text-main, #16352b); line-height: 1.6; }
.mark-modal-quote {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: var(--surface-soft, #edf7f2);
  border-left: 3px solid var(--accent, #1d8f6a);
  border-radius: 0 12px 12px 0;
  font-size: 13px;
  color: var(--text-muted, #4d675d);
  font-style: italic;
}
.mark-modal-text {
  width: 100%;
  min-height: 110px;
  padding: 10px 12px;
  border: 1px solid #d8e7df;
  border-radius: var(--radius-md, 12px);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}
.mark-modal-text:focus { outline: none; border-color: var(--accent, #1d8f6a); }
.mark-modal-err { margin-top: 8px; color: var(--error, #b13a3a); font-size: 13px; min-height: 18px; }
.mark-modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.mark-modal-actions-split { justify-content: space-between; }
.mark-modal-remind .mark-modal-actions-split .btn-ghost { margin-right: auto; }

/* ── finish 页 ──────────────────────────────────────────── */
.stage-root .finish-title {
  text-align: center;
  font-size: 26px;
  margin-bottom: 18px;
}
.stage-root .finish-desc {
  text-align: center;
  font-size: 15px;
  color: var(--text-muted, #4d675d);
  line-height: 1.8;
}

/* ── composer 下方结束对话按钮（聊天阶段） ─────────────────── */
.composer-footer {
  padding: 8px 12px 4px;
  display: flex;
  justify-content: center;
}
.btn-end-session {
  padding: 8px 22px;
  border: 1px solid #d8e7df;
  background: var(--surface-soft, #edf7f2);
  color: var(--text-muted, #4d675d);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--duration-fast, 0.2s);
  font-family: inherit;
}
.btn-end-session:hover:not(:disabled) { background: var(--accent-soft, #dcfff2); color: var(--accent, #1d8f6a); }
.btn-end-session:disabled { cursor: not-allowed; opacity: 0.7; }
.btn-end-session.btn-end-session-ready {
  background: var(--accent, #1d8f6a);
  color: #fff;
  border-color: var(--accent, #1d8f6a);
}
.btn-end-session.btn-end-session-ready:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(29,143,106,0.3); }

/* === TestXC 加固：保证 hidden 属性优先于 .shell/.mobile-shell 的 display === */
[hidden] { display: none !important; }
