/* 两个 Talk 页面共用的任务布局与语音条样式。 */
:root {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --ink: #172c3c;
  --ink-strong: #142735;
  --ink-muted: #526775;
  --ink-subtle: #627580;
  --canvas: #f1f2f4;
  --surface: #ffffff;
  --surface-soft: #eff0f2;
  --border: #e1e4e7;
  --border-strong: #a9b2b9;
  --primary-soft: #f1f2f3;
  --primary: #2b3a45;
  --primary-hover: #354754;
  --ai: #365b72;
  --ai-soft: #f3f6f8;
  --ai-border: #dce5eb;
}
body.talk-page { padding: 0; background: var(--surface); color: var(--ink); }
/* 首次可见时即为完整 Talk 布局，避免脚本加载期间闪现旧结构。 */
.talk-page:not(.talk-ready) .app-shell { visibility: hidden; }
.talk-loading { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; color: var(--ink-muted); font-size: 14px; }
.talk-ready .talk-loading { display: none; }
.talk-page .app-shell { max-width: none; margin: 0; border: 0; border-radius: 0; background: var(--surface); box-shadow: none; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.talk-page .home-nav { width: 100%; max-width: none; padding: 10px 28px; min-height: 70px; border-bottom: 0; gap: 24px; background: transparent; }
/* ChatGPT 风格布局：左侧会话侧栏，右侧对话主区。 */
/* 顶栏只留操作按钮，去掉图标+标题+状态块，降低工具感。 */
.chat-layout .practice-context { display: none; }
/* 铺满视口：不再有外圈留白与圆角卡片。 */
.talk-page .app-shell.chat-layout { display: flex; max-width: none; min-height: 100vh; height: 100dvh; padding: 0; overflow: hidden; }
.chat-layout .home-nav { background: transparent; }
.chat-sidebar { width: 262px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 16px; padding: 18px 14px; background: #f5f6f7; overflow: hidden; transition: width 240ms cubic-bezier(.4, 0, .2, 1), padding 240ms ease, opacity 180ms ease; }
/* 侧栏收起：折成一条窄边，只留箭头按钮在框内。 */
.chat-layout.sidebar-collapsed .chat-sidebar { width: 54px; padding-inline: 7px; }
.chat-layout.sidebar-collapsed .chat-sidebar > :not(.sidebar-toggle) { display: none; }
.sidebar-toggle { align-self: flex-end; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink-muted); cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
.sidebar-toggle:hover { background: var(--surface-soft); color: var(--ink); }
.sidebar-toggle svg { width: 18px; height: 18px; }
/* 初始页的动态圆形图案。 */
.chat-orb { position: relative; width: 128px; height: 128px; margin: 28px auto 30px; }
.chat-orb span { position: absolute; inset: 0; display: block; border-radius: 50%; }
/* Siri 式流光球：外轮廓缓慢形变，内部两团模糊光斑反向漂移。 */
.chat-orb { position: relative; width: 124px; height: 124px; margin: 28px auto 34px; animation: orb-morph 5200ms ease-in-out infinite; }
.chat-orb .orb-blob { position: absolute; inset: 0; display: block; border-radius: inherit; overflow: hidden; box-shadow: inset 0 0 0 1px #d5e5ef; animation: orb-turn 13000ms linear infinite; }
.chat-orb .orb-blob::before, .chat-orb .orb-blob::after { content: ''; position: absolute; width: 96%; height: 96%; border-radius: 50%; filter: blur(15px); }
.chat-orb .orb-blob::before { left: -26%; top: -22%; background: radial-gradient(circle at 35% 35%, #c4e2f3, #7fb3d5 72%); animation: orb-drift 4300ms ease-in-out infinite alternate; }
.chat-orb .orb-blob::after { right: -24%; bottom: -22%; background: radial-gradient(circle at 60% 60%, #d3caf8, #8f7fe8 74%); animation: orb-drift 5100ms ease-in-out infinite alternate-reverse; }
@keyframes orb-drift { from { transform: translate(-14%, -12%) scale(.82); } to { transform: translate(34%, 30%) scale(1.5); } }
@keyframes orb-turn { to { transform: rotate(360deg); } }
/* 只让轮廓形变，不再缩放容器，保证各界面光球大小与位置一致。 */
@keyframes orb-morph { 0%, 100% { border-radius: 38% 62% 64% 36% / 42% 38% 62% 58%; } 50% { border-radius: 60% 40% 34% 66% / 58% 64% 36% 42%; } }
.sidebar-toggle svg { transition: transform 240ms cubic-bezier(.4, 0, .2, 1); }
.chat-layout.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
/* 开场白展示态：正文居中、隐藏作者与时间；进入对话后恢复。 */
.chat-layout.is-opening .message { justify-content: center; }
/* 问题界面沿用选题界面的位置与宽度：光球之下居中对齐，不再额外留白。 */
.talk-page .chat-layout.is-opening .message-list { padding: 0; }
.talk-page .chat-layout.is-opening .message { width: min(640px, 100%); margin: 0 auto; }
.chat-layout.is-opening .message-body { max-width: 100%; }
.chat-layout.is-opening .message-body { text-align: center; }
.chat-layout.is-opening .message .message-meta { display: none; }
.talk-page .app-shell.chat-layout.is-opening .message-assistant.message-done .message-text { font-size: 22px; line-height: 1.6; letter-spacing: -.01em; color: var(--ink); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.chat-sidebar .brand-mark { width: 30px; height: 34px; font-size: 11px; border-radius: 9px; }
.sidebar-brand div { display: grid; }
.sidebar-brand strong { font-size: 14px; font-weight: 650; }
.sidebar-brand span { color: var(--ink-subtle); font-size: 12px; }
.chat-sidebar .secondary-button { width: 100%; justify-content: flex-start; gap: 10px; background: transparent; border: 1px solid var(--border); }
.chat-sidebar .sidebar-foot { margin: auto 0 0; padding: 8px 12px 2px; color: var(--ink-subtle); font-size: 12px; line-height: 1.6; }
/* 对话名称：对话区上方一行，由当前主题生成。 */
.chat-title { display: flex; align-items: baseline; gap: 10px; width: min(800px, calc(100% - 56px)); margin: 0 auto; padding: 14px 0 12px; }
/* 选题阶段不显示对话名，但保留这一行的高度，避免光球位置跳动。 */
.chat-layout.is-choosing .chat-title { visibility: hidden; }
.chat-title-kicker { color: var(--ink-subtle); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.chat-title-name { margin: 0; color: var(--ink); font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 主区用弹性列，考试页（无话题条）也能正确分配剩余高度。 */
.chat-main { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.chat-main > .conversation { flex: 1 1 auto; min-height: 0; }
/* 侧栏导航：三个入口，当前页高亮。 */
.sidebar-nav { display: grid; gap: 2px; }
.sidebar-nav a { display: flex; align-items: center; padding: 9px 12px; border-radius: 10px; color: var(--ink-muted); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
.sidebar-nav a:hover { background: var(--surface-soft); color: var(--ink); }
.sidebar-nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #274a6210; }
.talk-page .home-brand { font-weight: 600; font-size: 14px; gap: 8px; }
.talk-page .brand-mark { border: 0; background: var(--primary); color: white; border-radius: 9px; width: 32px; height: 34px; font-size: 11px; }
.talk-page .home-links { gap: 20px; margin-right: auto; }
.talk-page .home-links a { padding: 0 14px; min-height: 40px; border-radius: 10px; color: var(--ink-muted); font-size: 13px; font-weight: 500; }
.talk-page .home-links a[aria-current="page"] { background: white; color: var(--ink); box-shadow: 0 1px 4px #274a6214; }
.talk-toolbar, .talk-page .exam-controls { width: min(800px, calc(100% - 56px)); margin: 24px auto 0; border-radius: 0; background: transparent; }
.talk-page .practice-toolbar { padding: 0 0 20px; border-bottom: 0; gap: 16px; }
.talk-page .context-icon { display: grid; width: 40px; height: 40px; border-radius: 12px; background: var(--surface-soft); }
.talk-page .practice-context h1, .talk-page .practice-context h2 { margin: 0; font-size: 16px; font-weight: 600; }
.talk-page .session-status { color: var(--ink-muted); font-size: 12px; margin-top: 6px; }
.talk-page .session-actions { align-items: center; gap: 12px; }
.talk-page .secondary-button { color: var(--ink-muted); border: 1px solid var(--border); background: transparent; border-radius: 10px; font-weight: 400; min-height: 40px; }
.talk-page .secondary-button:hover:not(:disabled) { color: var(--ink); background: var(--surface-soft); }
.talk-page .part-picker { display: block; }
.talk-page .part-picker > span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.talk-page .part-picker select { min-height: 40px; background: transparent; border-color: var(--border); border-radius: 10px; }
.talk-page .exam-progress { background: transparent; border-bottom: 0; padding: 12px 0; color: var(--ink-muted); font-size: 12px; }
.talk-page:has(#exam-welcome:not([hidden])) .exam-progress { display: none; }
.talk-page .preparation-controls { flex-basis: auto; margin-left: auto; }
.talk-page .exam-controls .secondary-button { background: var(--primary); color: white; border-color: var(--primary); }
.talk-page .exam-controls .secondary-button:hover:not(:disabled) { background: var(--primary-hover); }
.talk-page .conversation { scrollbar-gutter: auto; }
.talk-page .practice-workspace { width: min(800px, calc(100% - 56px)); margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; justify-content: flex-start; border: 0; border-radius: 0; background: none; box-shadow: none; }
.talk-page .message-list { padding: 28px 0 40px; }
/* ChatGPT 风格消息：助手无气泡配方形头像，用户靠右浅色气泡。 */
.talk-page .message { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 26px; }
.talk-page .message:last-child { margin-bottom: 0; }
.talk-page .message-avatar { display: none; }
.talk-page .message-body { max-width: 720px; border: 0; padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
.talk-page .message-author { font-size: 12px; color: var(--ink-muted); font-weight: 500; }
.talk-page .message-meta { margin-bottom: 10px; }
.talk-page .message-time { font-size: 11px; }
.talk-page .message-text { font-size: 16px; line-height: 1.75; }
.talk-page .message-list:has(.message:only-child) { padding-top: 32px; }
/* 头像在这里是隐藏的，必须还原主轴方向，否则 row-reverse 会把用户气泡推到左边。 */
.talk-page .message-user { flex-direction: row; justify-content: flex-end; }
/* 用户消息：头像/昵称/时间在气泡外面（上方），气泡只包住正文。 */
.talk-page .message-user .message-body { max-width: min(620px, 78%); padding: 0; border: 0; border-radius: 0; background: transparent; display: flex; flex-direction: column; align-items: flex-end; }
.talk-page .message-user .message-text { padding: 12px 18px; border-radius: 18px 18px 4px 18px; background: var(--surface-soft); box-decoration-break: clone; }
.talk-page .message-user .message-author { color: var(--ink-muted); }
.talk-page .message-cue-card .message-body { border-left: 3px solid #7ba3be; padding-left: 22px; background: #f0f6fa; }
.talk-page .message-error .message-body { padding: 16px; background: #fcf1ef; border-radius: 10px; }
.talk-page .message-error .message-text { font-size: 15px !important; }
.talk-page .exam-welcome { margin: 24px 0; padding: 28px; max-width: 680px; border: 1px solid #dce8ef; border-radius: 4px 16px 16px; background: #f0f6fa; }
.talk-page .exam-welcome h2 { font-size: 28px; font-weight: 500; margin-bottom: 12px; }
.talk-page .exam-welcome p { color: var(--ink-muted); font-size: 15px; }
.talk-page .composer-area { background: var(--surface); }
.talk-page .composer-inner { width: min(800px, calc(100% - 56px)); padding: 12px 0 20px; }
/* 输入条：圆角胶囊容器，聚焦时轻微上浮，按钮圆形图标化。 */
.talk-page .composer { align-items: end; padding: 8px 10px; border-radius: 24px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 2px 10px #274a6208; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.talk-page .composer:focus-within { border-color: var(--border-strong); box-shadow: 0 8px 22px #274a6214; transform: translateY(-1px); }
.talk-page .composer textarea { grid-column: 1 / -1; min-height: 52px; padding: 10px 12px 14px; font-size: 16px; }
.talk-page .icon-command { justify-self: stretch; background: var(--primary); color: white; border: 0; padding: 0 16px; font-size: 13px; font-weight: 500; transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.talk-page .icon-command:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); }
.talk-page .icon-command.is-recording { color: var(--error); background: var(--recording-soft); }
.talk-page .send-button { padding: 0 14px; font-size: 13px; font-weight: 500; border-radius: 999px; background: var(--surface-soft); color: var(--primary); border-color: var(--border); transition: transform 160ms ease, background-color 160ms ease; }
.talk-page .send-button:hover:not(:disabled) { background: #eceef0; transform: translateY(-1px); }
.talk-page .composer-hint { justify-content: center; font-size: 11px; margin-top: 10px; color: var(--ink-subtle); }
.talk-page .recording-bar { min-height: 36px; padding: 8px 12px; font-size: 12px; }
/* 话题选择：工具栏下方的横向卡片轨道，替代原来的下拉列表。 */
.talk-page .topic-picker { margin-top: 16px; padding: 0; }
.talk-page .topic-picker .panel-kicker { margin: 0 0 14px; color: var(--ink-muted); font-size: 13px; font-weight: 500; }
.talk-page .topic-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(216px, 232px);
  gap: 12px;
  padding: 4px 2px 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #c8d8e2 transparent;
}
.talk-page .topic-row::-webkit-scrollbar { height: 6px; }
.talk-page .topic-row::-webkit-scrollbar-thumb { background: #cbdde8; border-radius: 999px; }
.talk-page .topic-row::-webkit-scrollbar-track { background: transparent; }
.talk-page .topic-chip { scroll-snap-align: start; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: auto; min-height: 0; text-align: left; padding: 16px 18px 18px; border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #274a6208; transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease; }
.talk-page .topic-chip:hover:not(:disabled) { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: 0 10px 24px #274a6218; }
.talk-page .topic-chip strong { font-size: 15px; font-weight: 600; }
.talk-page .topic-chip > span { color: var(--ink-muted); font-family: Georgia, Charter, "Times New Roman", serif; font-size: 12.5px; line-height: 1.5; }
.talk-page .topic-chip.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--ink); }
.talk-page .topic-chip.is-active strong { color: var(--primary); }
.talk-page .topic-chip.is-active::after { content: '当前'; position: absolute; top: 10px; right: 12px; padding: 2px 7px; border-radius: 999px; background: var(--primary); color: white; font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.talk-page .topic-chip.topic-chip-icon { align-items: center; justify-content: center; gap: 10px; border: 1px dashed #d8d0fb; background: #f0edff; color: #6d5bd0; box-shadow: none; }
.talk-page .topic-chip.topic-chip-icon:hover:not(:disabled) { border-color: #6d5bd0; transform: translateY(-2px); }
.talk-page .topic-chip.topic-chip-icon span { color: inherit; font-family: inherit; font-size: 13.5px; font-weight: 600; }
.talk-page .topic-chip svg { width: 20px; height: 20px; }
.is-shuffling .topic-chip { animation: shuffle-pick 460ms ease both; }
.is-shuffling .topic-chip:nth-child(3n) { animation-delay: 45ms; }
.is-shuffling .topic-chip:nth-child(3n + 1) { animation-delay: 90ms; }
.is-shuffling .topic-chip:nth-child(3n + 2) { animation-delay: 135ms; }
@keyframes shuffle-pick { 0%, 100% { opacity: 1; transform: none; } 35% { opacity: .3; transform: translateY(5px); } }
/* Pronunciation feedback 分析页。 */
.feedback-header { padding: 22px 28px 12px; }
.feedback-header h1 { margin: 0; font-size: 20px; font-weight: 650; }
.feedback-header p { margin: 6px 0 0; color: var(--ink-muted); font-size: 13px; }
.feedback-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 28px 32px; display: grid; gap: 22px; align-content: start; }
.feedback-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.feedback-stat { width: 100%; margin: 0; color: var(--ink-muted); font-size: 12.5px; }
.score-card { flex: 1 1 130px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.score-card-label { margin: 0; color: var(--ink-subtle); font-size: 12px; }
.score-card-value { display: block; margin-top: 4px; font-size: 22px; font-weight: 650; }
.feedback-panel { display: grid; gap: 12px; }
.feedback-panel-title { margin: 0; font-size: 14px; font-weight: 600; }
.feedback-muted, .feedback-empty { margin: 0; color: var(--ink-muted); font-size: 13px; }
.weak-word-list, .turn-list { display: grid; gap: 8px; }
.weak-word { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-soft); font-size: 13px; }
.weak-word span { color: var(--ink-subtle); font-size: 12px; }
.turn-row { padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.turn-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; color: var(--ink-muted); }
.turn-mode { padding: 3px 9px; border-radius: 999px; background: var(--surface-soft); color: var(--ink); font-weight: 500; }
.turn-time { margin-left: auto; }
.turn-text { margin: 8px 0 0; font-size: 14px; line-height: 1.6; }
.turn-scores { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.turn-score { padding: 3px 9px; border-radius: 999px; background: var(--surface-soft); color: var(--ink-muted); font-size: 11.5px; }
.feedback-body .secondary-button { justify-self: start; }
/* 对话区顶部的话题条：横向可滚动胶囊，随时换题。 */
.topic-bar { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.topic-bar .topic-picker { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; }
.topic-bar .topic-bar-new-chat { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.topic-bar .topic-bar-new-chat svg { width: 15px; height: 15px; }
.topic-bar .history-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.topic-bar .panel-kicker { display: none; }
.topic-bar .topic-row { display: flex; flex-direction: row; gap: 8px; padding: 2px; overflow-x: auto; scroll-snap-type: none; scrollbar-width: none; }
.topic-bar .topic-row::-webkit-scrollbar { display: none; }
.topic-bar .topic-chip { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); box-shadow: none; }
.topic-bar .topic-chip > span { display: none; }
.topic-bar .topic-chip strong { font-size: 13px; font-weight: 500; }
.topic-bar .topic-chip svg { width: 16px; height: 16px; }
.topic-bar .topic-chip:hover:not(:disabled) { background: #eef5f9; transform: none; box-shadow: none; }
.topic-bar .topic-chip.is-active { background: var(--surface-soft); border-color: var(--border-strong); }
.topic-bar .topic-chip.is-active strong { color: var(--ink); }
.topic-bar .topic-chip.is-active::after { content: none; }
.topic-bar .topic-chip.topic-chip-icon { color: var(--ink-muted); }
.topic-bar .topic-chip.topic-chip-icon span { display: inline; color: inherit; font-family: inherit; font-size: 13px; font-weight: 500; }
.chat-layout .home-nav { background: transparent; border-bottom: 0; }
.chat-layout .home-brand { display: none; }
/* 展示层只折叠已有消息和控件，原脚本仍管理请求、录音与考试状态。 */
.app-shell:not(.history-open) .message:not(.is-current):not(.message-pending):not(.message-error) { display: none; }
.talk-page .app-shell:not(.history-open) .message-assistant.message-done .message-body { max-width: 720px; padding: 0; }
.talk-page .app-shell:not(.history-open) .message-assistant.message-done .message-text { font-size: 18px; line-height: 1.7; }
.talk-page .app-shell:not(.history-open) .message-user .message-body { padding: 0; background: transparent; border: 0; }
.talk-page .app-shell:not(.history-open) .message-user .message-text { padding: 12px 18px; border-radius: 18px 18px 4px 18px; background: var(--surface-soft); font-size: 16px; color: var(--ink); }
/* 动效：最新一条消息滑入，等待中的占位消息带动态省略号。 */
@keyframes message-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* 开口引导已移除，保留纯输入区。 */
@keyframes thought-dots { 0% { content: '.'; } 33% { content: '..'; } 66%, 100% { content: '...'; } }
.talk-page .message.is-new { animation: message-in 320ms cubic-bezier(.22, 1.15, .36, 1) both; }
.talk-page .message-pending .message-text::after { content: '...'; animation: thought-dots 1400ms steps(1, end) infinite; }
.talk-page .message-user .message-body { transition: background-color 200ms ease; }
.talk-page .conversation { scroll-behavior: smooth; }
.talk-page .recording-dot { animation: dot-pulse 1400ms ease-in-out infinite; }
@keyframes dot-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .45; } }
.talk-page .history-open .practice-workspace { justify-content: flex-start; }
.talk-page .message-body details > summary { cursor: pointer; padding-block: 12px; color: var(--ink-muted); font-size: 13px; }
.talk-page .composer-inner { padding-bottom: 32px; }
.talk-page .composer:not(.text-mode) { display: flex; justify-content: center; border: 0; box-shadow: none; padding: 0; background: transparent; }
.talk-page .composer:not(.text-mode) textarea, .talk-page .composer:not(.text-mode) .send-button { display: none; }
.talk-page .composer:not(.text-mode) .icon-command { position: relative; min-width: 200px; min-height: 64px; border-radius: 999px; font-size: 16px; gap: 12px; box-shadow: 0 6px 18px #274a6222; }
.talk-page .composer:not(.text-mode) .icon-command svg { width: 24px; height: 24px; }
/* 闲置时的呼吸光环，暗示"点这里说话"；忙碌状态自动停止。 */
.talk-page .app-shell:not(.is-busy) .composer:not(.text-mode) .icon-command:not(:disabled)::before {
  content: ''; position: absolute; inset: -4px; border-radius: 999px; border: 2px solid #7ba9c9; pointer-events: none;
  animation: mic-halo 2600ms ease-out infinite;
}
@keyframes mic-halo { 0% { transform: scale(.97); opacity: .5; } 70%, 100% { transform: scale(1.14); opacity: 0; } }
.talk-page .composer.text-mode { grid-template-columns: minmax(0, 1fr) auto auto; }
.talk-page .composer.text-mode textarea { grid-column: auto; min-height: 44px; padding: 10px 12px; }
.talk-page .composer.text-mode .icon-command { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--surface-soft); color: var(--primary); border: 1px solid var(--border); }
.talk-page .composer.text-mode .icon-command span { display: none; }
.talk-page .composer.text-mode .icon-command svg { width: 20px; height: 20px; }
.talk-page .composer.text-mode .send-button { display: inline-flex; align-items: center; justify-content: center; grid-column: auto; width: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--primary); color: white; border: 0; }
.talk-page .composer.text-mode .send-button span { display: none; }
.talk-page .composer.text-mode .send-button:hover:not(:disabled) { background: var(--primary-hover); }
.answer-options { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; }
.voice-guidance { margin: 0; color: var(--ink-muted); font-size: 13px; text-align: center; }
.text-toggle, .history-toggle { min-height: 40px; padding: 8px 12px; color: var(--ink-muted); background: transparent; border: 0; border-radius: 10px; font-size: 13px; cursor: pointer; }
.text-toggle:hover:not(:disabled), .history-toggle:hover { background: var(--surface-soft); color: var(--ink); }
.talk-page .composer-hint { display: none; }
.talk-page .recording-bar { width: min(520px, 100%); min-height: 76px; margin: 0 auto 12px; padding: 14px 16px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 44px; gap: 14px; border: 1px solid #dbe8f2; border-radius: 24px; background: white; color: #337eaf; box-shadow: 0 4px 18px #34678912; }
.talk-page .recording-dot { background: #479fdb; }
.talk-page .recording-bar time { margin: 0; min-width: 5ch; color: #526f86; font-variant-numeric: tabular-nums; }
.speech-wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 38px; overflow: hidden; }
.speech-wave i { flex: 1; max-width: 5px; height: 34px; border-radius: 4px; background: #56a5dc; transform: scaleY(.12); }
.wave-stop { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #3589c4; color: white; }
.wave-stop:hover:not(:disabled) { background: #2274ac; }
.wave-stop svg { width: 18px; height: 18px; }
.talk-page .is-recording #composer-form, .talk-page .is-transcribing #composer-form { display: none; }
.is-transcribing .speech-wave i { animation: processing-wave 1100ms ease-in-out infinite; animation-delay: calc(var(--bar-index) * -55ms); }
.is-transcribing .wave-stop svg { display: none; }
.is-transcribing .wave-stop::after { content: ''; width: 16px; height: 16px; border: 2px solid #ffffff70; border-top-color: white; border-radius: 50%; animation: processing-spin 900ms linear infinite; }
@keyframes processing-wave { 0%, 100% { transform: scaleY(.18); } 50% { transform: scaleY(.7); } }
@keyframes processing-spin { to { transform: rotate(360deg); } }
.talk-page .preparation-controls { justify-content: center; padding: 12px; margin: 0; gap: 24px; background: var(--surface-soft); border-radius: 12px; }
.talk-page .preparation-controls .secondary-button { background: var(--primary); color: white; }
.talk-page .exam-shell:not(.has-session) #composer-form,
.talk-page .exam-shell:not(.has-session) .answer-options,
.talk-page .is-preparing #composer-form, .talk-page .is-preparing .answer-options,
.talk-page .is-complete #composer-form, .talk-page .is-complete .answer-options,
.talk-page .has-retry #composer-form, .talk-page .has-retry .answer-options { display: none; }
.talk-page .is-busy:not(.is-recording) #record-button { min-width: 220px; }
.session-menu { position: relative; }
.session-menu > summary { padding: 10px 12px; cursor: pointer; color: var(--ink-muted); font-size: 13px; }
.session-menu-panel { display: flex; align-items: center; gap: 8px; }
.has-session .session-menu-panel { position: absolute; right: 0; top: 44px; z-index: 6; padding: 16px; width: 250px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 12px; background: white; box-shadow: 0 8px 24px #274a6214; }
.session-menu-panel > p { display: none; }
.has-session .session-menu-panel > p { display: block; margin: 0 0 6px; color: var(--ink-muted); font-size: 12px; line-height: 1.5; }
.exam-shell:not(.has-session) .session-menu > summary { display: none; }
.exam-shell:not(.has-session) .session-menu:not([open]) > .session-menu-panel { display: flex; }
.talk-page button:active:not(:disabled) { transform: scale(.97); }
/* 点击涟漪：按钮内以点击点为圆心扩散一圈，外层负责裁剪形状。 */
.talk-page button, .talk-page .topic-chip, .home-links a { position: relative; }
.click-ripple { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.click-ripple i { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: currentColor; opacity: .3; animation: click-ripple 560ms cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes click-ripple { from { transform: scale(1); opacity: .3; } to { transform: scale(9); opacity: 0; } }
/* 页面与内容的浮现动效。 */
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.talk-page.talk-ready .app-shell { animation: rise-in 520ms cubic-bezier(.22, 1, .36, 1) both; }
.talk-page .recording-bar { animation: rise-in 320ms cubic-bezier(.22, 1.15, .36, 1) both; }
.talk-page .message-list.is-emerging { animation: rise-in 440ms cubic-bezier(.22, 1, .36, 1) both; }
/* 窄屏把侧栏折叠成顶部的横向话题条。 */
@media (max-width: 900px) {
  .talk-page .app-shell.chat-layout { flex-direction: column; }
  .chat-sidebar { width: auto; flex: 0 0 auto; gap: 12px; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar-brand { display: none; }
  .chat-sidebar .sidebar-foot { display: none; }
  .chat-sidebar .topic-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 66%); gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
  .chat-sidebar .topic-chip { scroll-snap-align: start; }
  .chat-layout.sidebar-collapsed .chat-sidebar { width: auto; max-height: 46px; padding: 5px 10px; }
}
@media (max-width: 680px) {
  body.talk-page { padding: 0; }
  .talk-page .app-shell { border: 0; border-radius: 0; }
  .talk-page .home-nav { flex-direction: row; flex-wrap: wrap; padding: 10px 16px; gap: 8px 18px; min-height: 56px; }
  .talk-page .home-brand { font-size: 12px; }
  .talk-page .home-brand .brand-mark { display: none; }
  .talk-page .home-links { width: auto; gap: 4px; margin-left: auto; margin-right: 0; }
  .talk-page .home-links a { flex: none; padding: 0 8px; font-size: 12px; min-height: 36px; }
  .talk-toolbar, .talk-page .exam-controls { width: calc(100% - 36px); margin-top: 18px; }
  .talk-page .practice-toolbar { padding: 0 0 16px; }
  .talk-page .practice-context h1, .talk-page .practice-context h2 { font-size: 15px; }
  .talk-page .context-icon { display: none; }
  .talk-page .session-actions { gap: 2px; }
  .talk-page .secondary-button { font-size: 12px; padding: 0 9px; }
  .talk-page .practice-workspace, .talk-page .composer-inner { width: calc(100% - 36px); }
  .talk-page .composer-inner { padding-bottom: 25px; }
  .talk-page .message-list:has(.message:only-child) { padding-top: 24px; }
  .talk-page .message-body { max-width: 100%; padding: 16px 18px; }
  .talk-page .app-shell:not(.history-open) .message-assistant.message-done .message-body { padding: 22px; }
  .talk-page .composer-inner { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .talk-page .session-actions { flex-wrap: nowrap; }
  .history-toggle { font-size: 12px; padding-inline: 4px; }
  .talk-page .exam-controls .practice-context, .talk-page .exam-controls .session-actions { width: auto; }
  .talk-page .exam-controls .practice-toolbar { gap: 12px; }
  .talk-page .exam-welcome { margin-top: 24px; padding: 20px; }
  .talk-page .topic-row { grid-auto-columns: minmax(190px, 74%); }
  .talk-page .topic-chip { padding: 14px 16px 16px; }
  .talk-page .composer-hint { visibility: hidden; height: 0; margin: 0; }
}
@media (max-height: 540px) and (min-width: 681px) {
  body.talk-page { padding: 0; }
  .talk-page .app-shell { border: 0; border-radius: 0; }
  .talk-page .home-nav { min-height: 48px; padding-block: 4px; }
  .talk-toolbar, .talk-page .exam-controls { margin-top: 10px; }
  .talk-page .practice-toolbar { padding-bottom: 10px; }
  .talk-page .composer-inner { padding-block: 8px; }
  .talk-page .composer { grid-template-columns: minmax(0, 1fr) auto auto; padding: 8px; }
  .talk-page .composer textarea { grid-column: auto; min-height: 44px; padding: 10px; }
  .talk-page .composer-hint { display: none; }
  .talk-page .message-list:has(.message:only-child) { padding-top: 16px; }
  .talk-page .composer:not(.text-mode) .icon-command { min-height: 44px; border-radius: 999px; }
  .answer-options { flex-direction: row; justify-content: center; margin-top: 0; }
  .talk-page .app-shell:not(.history-open) .message-assistant.message-done .message-body { padding: 16px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .talk-page button:active:not(:disabled) { transform: none; }
  .is-transcribing .speech-wave i, .is-transcribing .wave-stop::after { animation: none; }
  .speech-wave i { transform: scaleY(.3); }
  .is-shuffling .topic-chip { animation: none; }
  .talk-page .topic-chip:hover:not(:disabled) { transform: none; }
  .talk-page .message.is-new, .talk-page .recording-dot, .chat-sidebar .topic-chip.is-active::before { animation: none; }
  .chat-orb { animation: none; border-radius: 50%; }
  .click-ripple { display: none; }
  .talk-page.talk-ready .app-shell, .talk-page .recording-bar, .talk-page .message-list.is-emerging { animation: none; }
  .chat-orb .orb-blob, .chat-orb .orb-blob::before, .chat-orb .orb-blob::after { animation: none; }
  .talk-page .message-pending .message-text::after { animation: none; }
  .talk-page .app-shell:not(.is-busy) .composer:not(.text-mode) .icon-command:not(:disabled)::before { animation: none; opacity: .35; }
  .talk-page .icon-command:hover:not(:disabled), .talk-page .send-button:hover:not(:disabled), .talk-page .composer:focus-within { transform: none; }
}

/* ===== 图标栏：首页左上、功能居中、头像左下 ===== */
.app-rail { flex: 0 0 auto; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0; background: #e9eaec; border-right: 1px solid var(--border); }
.rail-nav { display: grid; gap: 6px; }
.rail-btn { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 10px; color: var(--ink-muted); transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease; }
.rail-btn:hover { background: var(--surface-soft); color: var(--ink); }
/* 设置入口固定在头像上方，两者一起贴底。 */
/* 预留入口的轻提示。 */
.stub-toast { position: fixed; z-index: 90; left: 50%; bottom: 34px; padding: 10px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; box-shadow: 0 10px 26px #274a621c; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; }
.stub-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.rail-btn[aria-current="page"] { background: var(--surface); color: var(--primary); border-color: var(--border); box-shadow: 0 1px 3px #274a6214; }
.rail-btn svg { width: 20px; height: 20px; }
/* 头像：与按钮同尺寸，但保留圆形，与其他方形按钮区分。 */
.rail-avatar { display: grid; place-items: center; width: 40px; height: 40px; margin-top: auto; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-soft); color: var(--ink); font: inherit; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; user-select: none; overflow: hidden; }

/* 账户菜单：沿用现有浅色表面、细边框和紧凑层级。 */
.account-menu { position: fixed; z-index: 120; left: 72px; bottom: 14px; width: min(292px, calc(100vw - 92px)); padding: 10px; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb, var(--surface) 96%, transparent); color: var(--ink); box-shadow: 0 18px 44px #172c3c26; backdrop-filter: blur(14px); }
.account-menu[hidden] { display: none; }
.account-menu-profile { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 8px 11px; }
.account-menu-profile > span:last-child { min-width: 0; display: grid; gap: 2px; }
.account-menu-profile strong, .account-menu-profile small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu-profile strong { font-size: 14px; font-weight: 650; }
.account-menu-profile small { color: var(--ink-subtle); font-size: 12px; }
.account-menu-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #dce9f1; color: #27495f; font-size: 12px; font-weight: 700; }
.account-menu-list { display: grid; gap: 2px; padding-top: 7px; border-top: 1px solid var(--border); }
.account-menu-list-separated { margin-top: 7px; }
.account-menu-item { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; text-decoration: none; cursor: pointer; }
.account-menu-item:hover, .account-menu-item:focus-visible { background: var(--surface-soft); outline: none; }
.account-menu-item svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--ink-muted); }
.account-menu-logout { color: #9d3e32; }
.mobile-account-trigger { display: none; }

/* ===== 第二栏：新聊天置顶 + 功能区 + 历史对话 ===== */
.chat-sidebar { width: 264px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 14px; padding: 16px 12px 12px; background: #f5f6f7; border-right: 1px solid var(--border); overflow: hidden; }
.sidebar-top { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sidebar-new-chat { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 550; cursor: pointer; box-shadow: 0 1px 3px #274a620a; transition: background-color 160ms ease, border-color 160ms ease; }
.sidebar-new-chat:hover:not(:disabled) { background: var(--primary-soft); border-color: var(--border-strong); }
.sidebar-new-chat:disabled { opacity: .55; cursor: default; }
.sidebar-new-chat svg { width: 16px; height: 16px; color: var(--primary); }
.sidebar-section { display: grid; gap: 2px; align-content: start; min-height: 0; }
.sidebar-heading { margin: 0 0 6px; padding: 0 4px; color: var(--ink-subtle); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; }
.sidebar-nav a, .sidebar-nav button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-muted); font-size: 13.5px; font-weight: 500; text-decoration: none; text-align: left; cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
.sidebar-nav a:hover, .sidebar-nav button:hover { background: var(--surface-soft); color: var(--ink); }
.sidebar-nav a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px #274a6210; }
.sidebar-nav a svg, .sidebar-nav button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.sidebar-history { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.sidebar-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.sidebar-heading-row .sidebar-heading { margin: 0; }
.sidebar-mini { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-subtle); font-size: 12px; cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
.sidebar-mini:hover { background: var(--surface-soft); color: var(--ink); }
.history-panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; gap: 12px; align-content: start; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #c8d8e2 transparent; }
.history-empty { margin: 0; padding: 4px; color: var(--ink-subtle); font-size: 12.5px; }
.history-group-block { display: grid; gap: 2px; }
.history-group { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 4px; color: var(--ink-subtle); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.history-item { display: flex; align-items: center; gap: 2px; border-radius: 10px; }
.history-item:hover { background: var(--surface-soft); }
.history-open-btn { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.history-open-btn strong { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.history-open-btn time { color: var(--ink-subtle); font-size: 11px; }
.history-del { flex: 0 0 auto; }
/* 拖拽归类：拖动中的条目半透明，目标目录整块高亮。 */
.history-item[draggable="true"] { cursor: grab; }
.history-item.is-dragging { opacity: .45; }
.history-group-block { border-radius: 10px; transition: background-color 140ms ease, box-shadow 140ms ease; }
.history-group-block.is-drop-target { background: #e9eaec; box-shadow: inset 0 0 0 1px var(--border-strong); }
.history-group-block.is-empty-group .history-group { opacity: .7; }
/* 层次：目录行为小字标题，对话条目缩进并带图标。 */
.history-group { display: flex; align-items: center; gap: 6px; padding: 4px 8px; color: var(--ink-subtle); font-size: 12px; font-weight: 600; }
.history-group-toggle { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 2px 0; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: color 140ms ease; }
.history-group-toggle:hover { color: var(--ink); }
.history-group-toggle:focus-visible { outline: 2px solid var(--border-strong); outline-offset: 2px; }
.history-group-disclosure { width: 6px; height: 6px; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-1px, -1px); transition: transform 140ms ease; }
.history-group-block.is-collapsed .history-group-disclosure { transform: rotate(-45deg) translate(-1px, -1px); }
.history-group-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-group-items { display: grid; gap: 2px; }
.history-group-items[hidden] { display: none; }
.history-empty-folder-hint { margin: 0; padding: 3px 8px 5px 39px; color: var(--ink-subtle); font-size: 11px; }
.history-folder-icon { display: grid; place-items: center; width: 15px; height: 15px; color: var(--ink-subtle); }
.history-folder-icon svg { width: 15px; height: 15px; }
.history-count { margin-left: auto; color: var(--ink-subtle); font-size: 11px; font-weight: 500; }
.history-item { padding-left: 12px; }
.history-item-icon { display: grid; place-items: center; width: 16px; height: 16px; flex: 0 0 auto; color: var(--ink-subtle); }
.history-item-icon svg { width: 15px; height: 15px; }
.history-open-btn { grid-template-columns: 16px minmax(0, 1fr); align-items: center; column-gap: 8px; }
.history-open-btn time { grid-column: 2; }
/* 新建目录弹窗 */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: #172c3c38; animation: fade-in 160ms ease both; }
.modal-card { width: min(340px, calc(100vw - 48px)); padding: 20px; border-radius: 12px; background: var(--surface); box-shadow: 0 24px 60px #172c3c33; animation: rise-in 200ms cubic-bezier(.22, 1, .36, 1) both; }
.modal-title { margin: 0 0 14px; color: var(--ink); font-size: 15px; font-weight: 600; }
.modal-input { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px; outline: none; transition: border-color 160ms ease; }
.modal-input:focus { border-color: var(--border-strong); }
.modal-error { margin: 8px 0 0; color: var(--error); font-size: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.modal-btn { min-height: 34px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; transition: background-color 160ms ease; }
.modal-btn:hover { background: var(--surface-soft); }
.modal-btn.is-primary { border-color: transparent; background: var(--primary); color: white; }
.modal-btn.is-primary:hover { background: var(--primary-hover); }
/* 确认弹窗：说明文字与危险操作按钮，配色对齐右键菜单的删除项。 */
.modal-text { margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.6; }
.modal-title + .modal-text { margin-top: -6px; }
.modal-btn.is-danger { border-color: transparent; background: #b4442f; color: white; }
.modal-btn.is-danger:hover { background: #a23a26; }
.modal-btn:focus-visible { outline: 2px solid var(--border-strong); outline-offset: 1px; }
@keyframes fade-in { from { opacity: 0; } }
.history-panel { cursor: default; }
/* 右键菜单：目录新建、归类、删除的统一入口。 */
.history-menu { position: fixed; z-index: 80; min-width: 168px; display: grid; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 30px #274a6226; animation: rise-in 160ms cubic-bezier(.22, 1, .36, 1) both; }
.history-more { display: none; }
.history-menu hr { margin: 4px 2px; border: 0; border-top: 1px solid var(--border); }
.history-menu-item { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 5px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 13px; text-align: left; cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.history-menu-item:hover { background: var(--surface-soft); }
.history-menu-item.is-danger { color: #b4442f; }
.history-menu-item.is-danger:hover { background: #fbeeea; }

/* ===== 话题选择：内嵌在对话区浮现，选定后收起并显示题目 ===== */
.talk-page .topic-inline { width: min(640px, 100%); margin: 0 auto 16px; animation: rise-in 380ms cubic-bezier(.22, 1, .36, 1) both; }
.topic-inline[hidden] { display: none; }
.talk-page .topic-inline-title { margin: 0 0 10px; color: var(--ink-subtle); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.topic-inline-sub { display: none; }
/* 选题期间只保留光球与话题列表：隐藏消息列表，光球继续显示但收小，保证一屏放下。 */
.chat-layout.is-choosing #message-list { display: none; }
/* 选题期间内容整体垂直居中，光球稍大、列表紧随其下。 */
/* 选题与开场两种状态：内容统一垂直居中，光球大小与间距一致。 */
.chat-layout.is-opening .practice-workspace,
.chat-layout.is-choosing .practice-workspace { justify-content: center; }
.chat-layout.is-choosing .chat-orb,
.chat-layout.is-opening .chat-orb { width: 140px; height: 140px; margin: 0 auto 32px; }
.talk-page .topic-inline .topic-picker { margin: 0; padding: 0; }
.talk-page .topic-inline .topic-picker .panel-kicker { display: none; }
/* 话题改为居中自动换行的小胶囊：不滚动、不翻页。 */
.talk-page .topic-inline .topic-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; overflow: visible; scroll-snap-type: none; }
.talk-page .topic-inline .topic-chip { flex: 0 1 auto; flex-direction: row; align-items: center; gap: 7px; width: auto; min-height: 0; padding: 6px 13px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; scroll-snap-align: none; }
.talk-page .topic-inline .topic-chip > span { display: none; }
.talk-page .topic-inline .topic-chip strong { font-size: 13.5px; font-weight: 500; }
.talk-page .topic-inline .topic-chip svg { width: 14px; height: 14px; }
.talk-page .topic-inline .topic-chip:hover:not(:disabled) { background: var(--surface-soft); border-color: transparent; transform: none; box-shadow: none; }
/* 选中项与其它话题完全一致：同底色、同样无边框。 */
.talk-page .topic-inline .topic-chip.is-active { background: transparent; border: 0; color: var(--ink); }
.talk-page .topic-inline .topic-chip.is-active::after { content: none; }
.talk-page .topic-inline .topic-chip.topic-chip-icon { justify-content: center; border: 0; background: transparent; color: var(--ink-muted); }
.talk-page .topic-inline .topic-chip.topic-chip-icon:hover:not(:disabled) { border-color: transparent; background: var(--surface-soft); }
.talk-page .topic-inline .topic-chip.topic-chip-icon span { display: inline; color: inherit; font-family: inherit; font-size: 13.5px; font-weight: 500; }
/* /assets/styles.a22cf3a4a431f23a.css 给所有 button/a 加了 3px 焦点描边，点击后残留的描边看起来就是“边框”，
   这里改成不描边，键盘聚焦时用浅底提示。 */
.talk-page button:focus-visible,
.talk-page a:focus-visible,
.talk-page .topic-chip:focus,
.talk-page .topic-chip:focus-visible {
  outline: none;
}
.talk-page .topic-chip:focus-visible,
.talk-page .rail-btn:focus-visible,
.talk-page .sidebar-nav a:focus-visible,
.talk-page .sidebar-nav button:focus-visible,
.talk-page .history-open-btn:focus-visible { background: var(--surface-soft); }
/* 所有话题胶囊彻底去掉边框与底色：统一为纯文字，悬停才有浅灰底。 */
.talk-page .topic-chip,
.talk-page .topic-chip.topic-chip-icon {
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-weight: 500;
}
.talk-page .topic-chip:hover:not(:disabled),
.talk-page .topic-chip.topic-chip-icon:hover:not(:disabled) {
  background: var(--surface-soft);
  border-color: transparent;
  color: var(--ink);
}
.talk-page .topic-chip.is-active,
.talk-page .topic-chip.is-active:hover:not(:disabled),
.talk-page .topic-chip.is-active strong,
.talk-page .topic-chip.is-active svg {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-weight: 500;
}

/* ===== 统一按钮/框面风格：同一套底色、边框、圆角、悬停与选中态 ===== */
.talk-page .rail-btn,
.talk-page .rail-avatar,
.talk-page .sidebar-new-chat,
.talk-page .sidebar-mini,
.talk-page .sidebar-nav a,
.talk-page .sidebar-nav button,
.talk-page .sidebar-toggle,
.talk-page .history-open-btn,
.talk-page .topic-inline .topic-chip,
.talk-page .send-button,
.talk-page .text-toggle,
.talk-page .history-toggle,
.talk-page .secondary-button,
.talk-page .home-links a {
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-muted);
  box-shadow: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
/* 侧栏与图标栏：无边框，靠底色区分悬停与选中。 */
.talk-page .rail-btn,
.talk-page .sidebar-new-chat,
.talk-page .sidebar-mini,
.talk-page .sidebar-nav a,
.talk-page .sidebar-nav button,
.talk-page .sidebar-toggle,
.talk-page .history-open-btn {
  border: 1px solid transparent;
  background: transparent;
}
/* 头像保持圆形：与方形按钮区分，位于设置入口下方。 */
.talk-page .rail-avatar {
  width: 40px;
  height: 40px;
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink);
  overflow: hidden;
}
.talk-page .rail-btn:hover,
.talk-page .sidebar-new-chat:hover:not(:disabled),
.talk-page .sidebar-mini:hover,
.talk-page .sidebar-nav a:hover,
.talk-page .sidebar-nav button:hover,
.talk-page .sidebar-toggle:hover,
.talk-page .history-open-btn:hover,
.talk-page .topic-inline .topic-chip:hover:not(:disabled),
.talk-page .send-button:hover:not(:disabled),
.talk-page .text-toggle:hover,
.talk-page .history-toggle:hover,
.talk-page .secondary-button:hover,
.talk-page .home-links a:hover {
  background: var(--surface-soft);
  border-color: transparent;
  color: var(--ink);
}
.talk-page .rail-btn[aria-current="page"],
.talk-page .sidebar-nav a[aria-current="page"],
.talk-page .topic-inline .topic-chip.is-active {
  background: var(--surface);
  border-color: #d6dade;
  color: var(--ink);
}
/* 图标栏底色更深：悬停与选中用更亮的白，形成层次。 */
.talk-page .rail-btn:hover { background: #f5f6f7; }
.talk-page .rail-btn[aria-current="page"] { background: var(--surface); }
/* 唯一的主色实心按钮：录音 / 发送。 */
.talk-page .icon-command,
.talk-page .composer.text-mode .send-button {
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: white;
}
.talk-page .icon-command:hover:not(:disabled),
.talk-page .composer.text-mode .send-button:hover:not(:disabled) { background: var(--primary-hover); color: white; }
.talk-page .composer.text-mode .icon-command {
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
}
.talk-page .composer.text-mode .icon-command:hover:not(:disabled) { background: var(--surface-soft); border-color: var(--border-strong); color: var(--ink); }
/* 大录音按钮保持胶囊形，与外圈呼吸光环一致。 */
.talk-page .composer:not(.text-mode) .icon-command { border-radius: 999px; }

/* ===== 窄屏：图标栏隐藏，侧栏折叠为顶部横条 ===== */
@media (max-width: 900px) {
  .app-rail { display: none; }
  .chat-sidebar { position: relative; width: auto; flex: 0 0 auto; max-height: 42vh; padding: 12px 66px 12px 14px; border-right: 0; border-bottom: 1px solid var(--border); }
  .talk-page .mobile-account-trigger { position: absolute; z-index: 70; top: 12px; right: 14px; display: grid; margin: 0; background: var(--surface); box-shadow: 0 3px 12px #172c3c1a; }
  .chat-layout.sidebar-collapsed .chat-sidebar { padding-right: 62px; }
  .chat-layout.sidebar-collapsed .chat-sidebar > .mobile-account-trigger { display: grid; }
  .account-menu { left: auto; right: 12px; top: 62px; bottom: auto; width: min(292px, calc(100vw - 24px)); }
}
@media (max-width: 680px) {
  .topic-inline { margin-bottom: 12px; }
  .topic-inline .topic-row { grid-template-columns: 1fr; }
}

/* ===== 最后兜底：话题胶囊一律无边框、无底色（覆盖 /assets/styles.a22cf3a4a431f23a.css 的默认描边） ===== */
.talk-page .topic-chip,
.talk-page .topic-chip.is-active,
.talk-page .topic-chip.topic-chip-icon,
.talk-page .topic-chip.is-active:hover:not(:disabled) {
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: var(--ink);
  font-weight: 500;
  box-shadow: none;
}
.talk-page .topic-chip:hover:not(:disabled) { background: var(--surface-soft) !important; }
/* 字体颜色/字重完全一致：所有话题（含选中项）都是同一正文色、同一字重。 */
.talk-page .topic-chip,
.talk-page .topic-chip strong,
.talk-page .topic-chip svg,
.talk-page .topic-chip.is-active,
.talk-page .topic-chip.is-active strong,
.talk-page .topic-chip.is-active svg,
.talk-page .topic-inline .topic-chip,
.talk-page .topic-inline .topic-chip strong {
  color: var(--ink) !important;
  font-weight: 500;
}
/* Surprise me 用虚线方框凸显，与其它纯文字话题区分。 */
.talk-page .topic-chip.topic-chip-icon {
  border: 1px dashed var(--border-strong) !important;
  background: var(--surface) !important;
  color: var(--ink-muted) !important;
}
.talk-page .topic-chip.topic-chip-icon:hover:not(:disabled) {
  border-color: var(--primary) !important;
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
}

/* ===== 深色主题：与设置页同一套 zinc 中性色，图标栏/侧栏最深、主区浮起一层 ===== */
html.dark .chat-sidebar { background: #0d0d0f; }
html.dark .app-rail { background: #09090b; }
html.dark .talk-page .rail-btn:hover { background: #18181b; }
html.dark .talk-page .rail-btn[aria-current="page"],
html.dark .talk-page .sidebar-nav a[aria-current="page"] { border-color: #2f2f35; }
html.dark .talk-page .home-links a[aria-current="page"] { background: var(--surface); }
html.dark .talk-page .topic-row { scrollbar-color: #2f2f35 transparent; }
html.dark .talk-page .topic-row::-webkit-scrollbar-thumb { background: #2f2f35; }
html.dark .talk-page .message-cue-card .message-body { border-left-color: #5f83a3; background: #18181b; }
html.dark .talk-page .exam-welcome { border-color: #26262a; background: #18181b; }
html.dark .talk-page .message-error .message-body { background: #1f1516; }
html.dark .talk-page .send-button:hover:not(:disabled) { background: #27272a; }
html.dark .talk-page .topic-bar .topic-chip:hover:not(:disabled) { background: #18181b; }
html.dark .talk-page .topic-chip.topic-chip-icon { border-color: var(--border-strong) !important; background: var(--surface) !important; color: var(--ink-muted) !important; }
html.dark .talk-page .topic-chip.topic-chip-icon:hover:not(:disabled) { color: var(--ink) !important; }
html.dark .talk-page .recording-bar { border-color: #26262a; background: #18181b; color: #7fb0d0; box-shadow: 0 4px 18px rgb(0 0 0 / 32%); }
html.dark .talk-page .recording-bar time { color: #a1a1aa; }
html.dark .has-session .session-menu-panel { background: var(--surface); }
html.dark .modal-overlay { background: rgb(0 0 0 / 65%); }
html.dark .history-group-block.is-drop-target { background: #18181b; }
html.dark .history-menu-item.is-danger { color: #d0705d; }
html.dark .history-menu-item.is-danger:hover { background: #2b1d1d; }
html.dark .account-menu-logout { color: #d0705d; }
html.dark .account-menu-avatar { background: #27272a; color: #d4d4d8; }
html.dark .talk-page .mobile-account-trigger { background: var(--surface); }
html.dark .chat-orb .orb-blob { box-shadow: inset 0 0 0 1px #2a2a2f; }
html.dark .stub-toast { box-shadow: 0 10px 26px rgb(0 0 0 / 50%); }

/* 手机端：侧栏变为抽屉，聊天内容与现有网页消息、输入框共用同一套样式。 */
.mobile-chat-header,
.mobile-nav-backdrop,
.mobile-drawer-close { display: none; }
@media (max-width: 900px) {
  .talk-page .app-shell.chat-layout { position: relative; flex-direction: row; min-height: 100dvh; height: 100dvh; }
  .talk-page .chat-main { width: 100%; height: 100%; min-height: 0; }
  .mobile-chat-header { position: relative; z-index: 20; display: flex; flex: 0 0 auto; align-items: center; gap: 12px; height: calc(56px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 14px 0; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--ink); }
  .mobile-chat-header strong { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-nav-open { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink); cursor: pointer; }
  .mobile-nav-open:hover, .mobile-nav-open:focus-visible { background: var(--surface-soft); outline: none; }
  .mobile-nav-open svg { width: 22px; height: 22px; }
  .mobile-nav-backdrop { position: fixed; z-index: 60; inset: 0; display: none; width: 100%; height: 100%; padding: 0; border: 0; background: rgb(17 24 31 / 42%); opacity: 0; transition: opacity 180ms ease; }
  .mobile-nav-backdrop.is-visible { display: block; opacity: 1; }
  .talk-page .chat-layout .chat-sidebar { position: fixed; z-index: 70; inset: 0 auto 0 0; width: min(320px, calc(100vw - 52px)); height: 100dvh; max-height: none; gap: 14px; padding: max(14px, env(safe-area-inset-top, 0px)) 12px max(14px, env(safe-area-inset-bottom, 0px)); border: 0; border-right: 1px solid var(--border); background: var(--surface); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; box-shadow: 16px 0 44px rgb(17 24 31 / 16%); transform: translateX(-105%); visibility: hidden; transition: transform 220ms cubic-bezier(.2, .8, .2, 1), visibility 220ms; }
  .talk-page .chat-layout.mobile-nav-is-open .chat-sidebar,
  .talk-page .chat-layout.sidebar-collapsed.mobile-nav-is-open .chat-sidebar {
    width: min(320px, calc(100vw - 52px));
    min-width: min(320px, calc(100vw - 52px));
    max-height: none;
    padding: max(14px, env(safe-area-inset-top, 0px)) 12px max(14px, env(safe-area-inset-bottom, 0px));
    transform: translateX(0);
    visibility: visible;
  }
  .talk-page .chat-layout.sidebar-collapsed.mobile-nav-is-open .chat-sidebar > :not(.sidebar-toggle) { display: revert; }
  .mobile-drawer-close { display: flex; flex: 0 0 44px; align-items: center; justify-content: flex-end; gap: 8px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-muted); font: inherit; font-size: 13px; cursor: pointer; }
  .mobile-drawer-close:hover, .mobile-drawer-close:focus-visible { background: var(--surface-soft); color: var(--ink); outline: none; }
  .mobile-drawer-close svg { width: 18px; height: 18px; }
  .chat-sidebar .sidebar-toggle { display: none; }
  .talk-page .chat-sidebar .sidebar-brand { display: flex; }
  .talk-page .chat-sidebar .mobile-account-trigger { position: static; display: grid; width: 44px; height: 44px; margin: auto 0 0; box-shadow: none; }
  .chat-sidebar .sidebar-new-chat,
  .chat-sidebar .sidebar-nav a,
  .chat-sidebar .sidebar-mini { min-height: 44px; }
  .chat-sidebar .sidebar-mini { min-width: 44px; height: 44px; }
  .chat-sidebar .history-open-btn { min-height: 52px; }
  .history-more { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink-muted); font: inherit; font-size: 19px; cursor: pointer; }
  .history-more:hover, .history-more:focus-visible { background: var(--surface-soft); color: var(--ink); outline: none; }
  .history-del { display: none; }
  .history-menu { z-index: 80; min-width: 196px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; }
  .history-menu-item { min-height: 44px; }
  .talk-page .chat-title { width: calc(100% - 36px); padding: 12px 0 8px; }
  .talk-page .practice-workspace { width: calc(100% - 36px); }
  .talk-page .talk-toolbar,
  .talk-page .exam-controls { width: calc(100% - 32px); margin: 10px auto 0; }
  .talk-page .exam-controls .practice-toolbar { gap: 10px; padding: 8px 0; }
  .talk-page .exam-controls .session-actions { width: auto; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
  .talk-page .exam-progress { padding: 8px 0; font-size: 11px; }
  .talk-page .exam-welcome { margin: 16px 0; padding: 18px; }
  .talk-page .composer-inner { width: calc(100% - 24px); padding: 10px 0 max(12px, env(safe-area-inset-bottom, 0px)); }
  .talk-page .composer textarea { font-size: 16px; }
  .talk-page .composer-hint { display: none; }
  .talk-page .history-toggle { min-height: 44px; }
  .feedback-page .feedback-header { padding: 14px 18px 8px; }
  .feedback-page .feedback-header h1 { display: none; }
  .feedback-page .feedback-body { padding: 0 18px max(24px, env(safe-area-inset-bottom, 0px)); }
  .account-menu { z-index: 120; left: 12px; right: auto; top: auto; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); width: min(292px, calc(100vw - 24px)); }
}
@media (max-width: 680px) {
  .talk-page .chat-title { gap: 8px; }
  .talk-page .chat-title-kicker { font-size: 10px; }
  .talk-page .chat-title-name { font-size: 14px; }
  .talk-page .message-list { padding: 18px 0 24px; }
  .talk-page .message { gap: 10px; margin-bottom: 22px; }
  .talk-page .message-body { max-width: 100%; padding: 12px 0; }
  .talk-page .message-user .message-body { max-width: min(620px, 84%); padding: 0; }
  .talk-page .message-text { font-size: 15px; line-height: 1.7; }
  .talk-page .app-shell:not(.history-open) .message-user .message-text { padding: 11px 15px; }
  .talk-page .app-shell:not(.history-open) .message-assistant.message-done .message-body { padding: 16px 0; }
  .talk-page .chat-layout.is-opening .message-assistant.message-done .message-text { font-size: 20px; }
  .talk-page .chat-layout.is-choosing .chat-orb,
  .talk-page .chat-layout.is-opening .chat-orb { width: 88px; height: 88px; margin: 0 auto 20px; }
  .talk-page .topic-inline { margin-bottom: 8px; }
  .talk-page .topic-inline .topic-inline-title { margin-bottom: 6px; }
  .talk-page .topic-inline .topic-row { gap: 4px; }
  .talk-page .topic-inline .topic-chip { min-height: 44px; padding-inline: 11px; }
  .talk-page .composer-inner { width: calc(100% - 20px); }
  .talk-page .composer { border-radius: 20px; }
  .talk-page .composer:not(.text-mode) .icon-command { min-height: 48px; }
  .talk-page .text-toggle { min-height: 44px; }
  .feedback-page .feedback-summary { gap: 8px; }
  .feedback-page .score-card { flex-basis: calc(50% - 8px); }
}
@media (prefers-reduced-motion: reduce) {
  .talk-page .chat-sidebar,
  .mobile-nav-backdrop { transition: none; }
}

/* 发音反馈页浅色主题与首页、设置页统一为柔和蓝灰色。 */
html:not(.dark) body.feedback-page {
  --ink: #172c3c;
  --ink-strong: #142735;
  --ink-muted: #526775;
  --ink-subtle: #627580;
  --canvas: #f0f6f9;
  --surface: #ffffff;
  --surface-soft: #eaf2f7;
  --border: #dce6ec;
  --border-strong: #9db2c0;
  --primary: #386582;
  --primary-hover: #29495f;
  --primary-soft: #e1edf5;
  --ai: #386582;
  --ai-soft: #edf5fa;
  --ai-border: #cbdfe9;
  background: var(--canvas);
  color: var(--ink);
}

html:not(.dark) body.feedback-page .app-shell.chat-layout,
html:not(.dark) body.feedback-page .chat-main { background: var(--canvas); }

html:not(.dark) body.feedback-page .app-rail {
  background: #e6f0f5;
  border-color: var(--border);
}

html:not(.dark) body.feedback-page .chat-sidebar {
  background: #edf4f7;
  border-color: var(--border);
}

html:not(.dark) body.feedback-page .talk-page .rail-btn:hover {
  background: #dceaf1;
}

html:not(.dark) body.feedback-page .feedback-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(115deg, rgb(225 237 245 / 72%), rgb(255 255 255 / 0%) 68%);
}

html:not(.dark) body.feedback-page .score-card,
html:not(.dark) body.feedback-page .turn-row {
  border-color: var(--border);
  background: var(--surface);
}

/* 发音反馈页深色主题改为深海军蓝层次，保留清晰的蓝色强调。 */
html.dark body.feedback-page {
  --ink: #e4f0f7;
  --ink-strong: #f5fbff;
  --ink-muted: #a6bece;
  --ink-subtle: #819eaf;
  --canvas: #0d1b26;
  --surface: #122635;
  --surface-soft: #183448;
  --border: #254355;
  --border-strong: #3d6075;
  --primary: #7cb8d8;
  --primary-hover: #91c6e2;
  --primary-soft: #1b3b50;
  --ai: #8cc4e5;
  --ai-soft: #163044;
  --ai-border: #2c5167;
  background: var(--canvas);
  color: var(--ink);
}

html.dark body.feedback-page .app-shell.chat-layout,
html.dark body.feedback-page .chat-main { background: var(--canvas); }

html.dark body.feedback-page .app-rail {
  background: #0b1721;
  border-color: var(--border);
}

html.dark body.feedback-page .chat-sidebar {
  background: #102331;
  border-color: var(--border);
}

html.dark body.feedback-page .talk-page .rail-btn:hover {
  background: #1a394e;
}

html.dark body.feedback-page .talk-page .rail-btn[aria-current="page"],
html.dark body.feedback-page .talk-page .sidebar-nav a[aria-current="page"] {
  border-color: var(--border-strong);
}

html.dark body.feedback-page .feedback-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(115deg, rgb(57 113 148 / 22%), rgb(18 38 53 / 0%) 68%);
}

html.dark body.feedback-page .score-card,
html.dark body.feedback-page .turn-row {
  border-color: var(--border);
  background: var(--surface);
}

/* 发音反馈：以阅读路径呈现结论、重点练习和记录，减少重复卡片。 */
body.feedback-page .feedback-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px 18px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
body.feedback-page .feedback-header h1 { font-size: 28px; letter-spacing: -.035em; }
body.feedback-page .feedback-header p { margin-top: 7px; font-size: 13px; }
body.feedback-page .feedback-filters { display: flex; align-items: center; gap: 22px; padding-bottom: 3px; }
body.feedback-page .feedback-filters button {
  position: relative;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
body.feedback-page .feedback-filters button.is-active { color: var(--ink); font-weight: 650; }
body.feedback-page .feedback-filters button.is-active::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 2px;
  background: var(--primary);
  content: "";
}
body.feedback-page .feedback-body { gap: 0; padding: 0 32px 36px; }
body.feedback-page .feedback-overview { padding: 23px 0 25px; border-bottom: 1px solid var(--border); }
body.feedback-page .feedback-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
body.feedback-page .feedback-panel-title { font-size: 16px; letter-spacing: -.015em; }
body.feedback-page .feedback-stat { width: auto; font-size: 12px; }
body.feedback-page .feedback-overview-content {
  display: grid;
  grid-template-columns: minmax(160px, .72fr) minmax(280px, 1.5fr);
  gap: 30px;
  align-items: center;
  max-width: 790px;
  padding: 18px 0 22px;
}
body.feedback-page .feedback-overall-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; }
body.feedback-page .feedback-overall-score .score-card-value { margin: 0; font-size: clamp(54px, 7vw, 76px); line-height: .95; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
body.feedback-page .feedback-score-caption { color: var(--ink-muted); font-size: 12px; }
body.feedback-page .feedback-trend { flex-basis: 100%; color: var(--primary); font-size: 12px; }
body.feedback-page .feedback-metric-list { display: grid; gap: 10px; padding-left: 26px; border-left: 1px solid var(--border); }
body.feedback-page .feedback-metric { display: grid; grid-template-columns: 72px 30px minmax(90px, 1fr); align-items: center; gap: 10px; font-size: 12px; }
body.feedback-page .feedback-metric-label { color: var(--ink-muted); }
body.feedback-page .feedback-metric-value { font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
body.feedback-page .feedback-metric-track { height: 5px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
body.feedback-page .feedback-metric-track i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
body.feedback-page .feedback-focus { max-width: 790px; padding: 18px 20px; border-left: 2px solid var(--primary); background: var(--surface-soft); }
body.feedback-page .feedback-focus-title { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.025em; }
body.feedback-page .feedback-word-emphasis { text-decoration: underline; text-decoration-color: #d9c4d1; text-decoration-thickness: 4px; text-underline-offset: 4px; }
body.feedback-page .feedback-focus-meta { margin: 5px 0 10px; color: var(--ink-muted); font-size: 12px; }
body.feedback-page .feedback-evidence { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.7; }
body.feedback-page .feedback-highlight { padding: 0 2px; border-radius: 2px; background: rgb(217 196 209 / 35%); color: inherit; }
body.feedback-page .feedback-focus-actions { display: flex; align-items: center; gap: 20px; margin-top: 11px; }
.feedback-page .feedback-replay-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 5px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}
.feedback-page .feedback-replay-button svg { width: 14px; height: 14px; }
body.feedback-page .feedback-text-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--primary); font-size: 12px; font-weight: 600; text-decoration: none; }
body.feedback-page .feedback-text-link:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
body.feedback-page .feedback-weak-section { padding: 17px 0 20px; border-bottom: 1px solid var(--border); }
body.feedback-page .weak-word-list { display: flex; flex-wrap: wrap; gap: 12px 30px; margin-top: 11px; }
body.feedback-page .weak-word {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
}
body.feedback-page .weak-word strong { text-decoration: underline; text-decoration-color: #d9c4d1; text-decoration-thickness: 2px; text-underline-offset: 4px; }
body.feedback-page .weak-word span { color: var(--ink-muted); font-size: 11px; }
body.feedback-page .feedback-turn-section { padding-top: 18px; }
body.feedback-page .turn-list { gap: 0; margin-top: 8px; }
body.feedback-page .turn-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
body.feedback-page .turn-row .message-audio-button { width: 44px; height: 44px; margin-top: 1px; }
body.feedback-page .turn-main { min-width: 0; }
body.feedback-page .turn-head { gap: 10px; color: var(--ink-muted); font-size: 12px; }
body.feedback-page .turn-title { color: var(--ink); font-size: 13px; font-weight: 600; }
body.feedback-page .turn-time { margin-left: 0; }
body.feedback-page .turn-text { display: -webkit-box; overflow: hidden; margin: 5px 0 0; color: var(--ink-muted); font-size: 12px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
body.feedback-page .turn-focus-word { align-self: center; color: var(--ink-muted); font-size: 11px; text-decoration: underline; text-decoration-color: #d9c4d1; text-underline-offset: 3px; }
body.feedback-page .turn-overall { min-width: 28px; align-self: center; font-size: 20px; font-variant-numeric: tabular-nums; text-align: right; }
body.feedback-page .turn-score-side { display: flex; align-items: center; gap: 18px; }
body.feedback-page .turn-details { margin-top: 6px; }
body.feedback-page .turn-details-toggle { display: flex; width: fit-content; min-height: 44px; align-items: center; color: var(--primary); font-size: 11px; cursor: pointer; }
body.feedback-page .turn-detail-content { padding-top: 7px; }
body.feedback-page .turn-score-list { display: flex; flex-wrap: wrap; gap: 6px 14px; }
body.feedback-page .turn-score { padding: 0; border-radius: 0; background: transparent; color: var(--ink-muted); font-size: 11px; }
body.feedback-page .feedback-load-more,
body.feedback-page .feedback-clear {
  display: block;
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
body.feedback-page .feedback-load-more { margin: 8px auto 0; }
body.feedback-page .feedback-clear { margin-top: 22px; color: var(--ink-subtle); font-size: 11px; }
body.feedback-page .feedback-status { padding: 16px 0; }
body.feedback-page .feedback-error { display: inline; margin: 0 12px 0 0; color: var(--error); font-size: 13px; }
body.feedback-page .feedback-empty-state { padding: 42px 0; border-bottom: 1px solid var(--border); }
body.feedback-page .feedback-empty-state h2 { margin: 0 0 8px; font-size: 20px; }
body.feedback-page .feedback-empty-state p { max-width: 52ch; }
body.feedback-page .feedback-empty-actions { display: flex; gap: 20px; margin-top: 18px; }

html:not(.dark) body.feedback-page .feedback-focus { background: #f4f7fa; }
html:not(.dark) body.feedback-page .feedback-overview,
html:not(.dark) body.feedback-page .feedback-weak-section { border-color: #d5dfe9; }
html:not(.dark) body.feedback-page .feedback-metric-track { background: #e3e9f2; }
html:not(.dark) body.feedback-page .feedback-metric-track i { background: #6290b1; }
html:not(.dark) body.feedback-page .feedback-focus { border-left-color: #6290b1; }
html:not(.dark) body.feedback-page .feedback-replay-button { border-color: #b8cbd8; }
html:not(.dark) body.feedback-page .turn-row { border-color: #d5dfe9; }

@media (max-width: 900px) {
  body.feedback-page .feedback-header { align-items: flex-start; flex-direction: column; gap: 10px; padding: 18px 20px 14px; }
  body.feedback-page .feedback-header h1 { display: block; font-size: 24px; }
  body.feedback-page .feedback-filters { gap: 18px; }
  body.feedback-page .feedback-body { padding: 0 20px 28px; }
}
@media (max-width: 600px) {
  body.feedback-page .feedback-overview-content { grid-template-columns: 1fr; gap: 18px; padding: 14px 0 18px; }
  body.feedback-page .feedback-overall-score { align-items: baseline; }
  body.feedback-page .feedback-overall-score .score-card-value { font-size: 58px; }
  body.feedback-page .feedback-metric-list { gap: 8px; padding: 0; border-left: 0; }
  body.feedback-page .feedback-focus { padding: 14px; }
  body.feedback-page .feedback-focus-title { font-size: 18px; }
  body.feedback-page .feedback-evidence { font-size: 13px; }
  body.feedback-page .weak-word-list { gap: 9px 18px; }
  body.feedback-page .turn-row { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }
  body.feedback-page .turn-score-side { grid-column: 2; justify-content: space-between; }
  body.feedback-page .turn-focus-word { margin-right: auto; }
}
