: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;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1200px, 94vw);
  height: min(90vh, 900px);
  margin: 4vh auto;
  display: grid;
  grid-template-columns: 340px 1fr;   /* 320 → 340，避免内容挤到滚动条 */
  gap: 16px;
  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);
}

.panel-side {
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  min-height: 0;
}

.brand h1 {
  margin: 8px 0 0;
  font-family: var(--font-title);
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: 0.06em;
}

.brand-kicker {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-subtitle {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.status-card {
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 0px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
}

.status-line {
  margin: 8px 0 0;
  color: var(--text-muted);
  word-break: break-all;
  font-size: 12px;  /* "会话 ID:" 标签缩小到跟 code 一致，整体更紧凑 */
}

.status-line code {
  color: var(--text-main);
  font-size: 12px;
}

.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;
}

.side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.agent-mode-panel {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.agent-mode-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #666);
  margin-bottom: 6px;
}

.agent-mode-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  outline: none;
}

.agent-mode-select:focus {
  border-color: #3b82f6;
}

.agent-mode-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-muted, #888);
  line-height: 1.4;
}

.tips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0px;
  color: var(--text-muted);
  font-size: 13px;
}

.tips li {
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.session-list-container {
  margin-top: 12px;
  padding-top: 0;
  /* 关键修复：限制高度让 ul 接管滚动——否则 ul 直接撑大，把下面 footer 盖住 */
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.session-list-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 8px 0;
  padding: 0 4px;
  letter-spacing: 0.3px;
}

.session-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.session-item {
  padding: 8px 10px;
  margin-bottom: 2px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  font-size: 12.5px;
  color: var(--text-main);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-item:hover {
  background: rgba(255, 255, 255, 0.8);
}

.session-item.active {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  font-weight: 500;
}

.session-item-delete {
  float: right;
  opacity: 0;
  transition: opacity 0.15s;
  color: var(--error);
  font-size: 12px;
}

.session-item:hover .session-item-delete {
  opacity: 1;
}

.panel-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 18px 18px 14px;
  position: relative;     /* 让 #feedbackRoot 用 absolute inset:0 占满整个"对话空间" */
  overflow: hidden;        /* 反馈界面填满 panel-chat，避免溢出 */
}

.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);
}

.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: 14px;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 6px 16px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.msg {
  max-width: min(86%, 720px);
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid rgba(23, 58, 46, 0.08);
  animation: bubbleEnter var(--duration-med) ease both;
}

.msg-title {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.msg-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.52;
  color: var(--text-main);
}

/* ─── Markdown rendered elements inside agent bubbles ─── */

.msg-body ul,
.msg-body ol {
  padding-left: 1.2em;
  margin: 0.4em 0;
}

.msg-body li {
  margin-bottom: 0.2em;
}

.msg-body p {
  margin: 0.3em 0;
}

.msg-body code {
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1em 0.3em;
  border-radius: 4px;
}

.msg-body pre {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  padding: 0.6em 0.8em;
  overflow-x: auto;
  margin: 0.4em 0;
  white-space: pre;
}

.msg-body pre code {
  background: none;
  padding: 0;
  font-size: 0.85em;
}

.msg-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 0.4em 0;
  padding-left: 0.8em;
  color: var(--text-muted);
}

.msg-body h1,
.msg-body h2,
.msg-body h3,
.msg-body h4,
.msg-body h5,
.msg-body h6 {
  margin: 0.5em 0 0.2em;
  font-size: 1.05em;
  font-weight: 600;
}

.msg-body hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 0.6em 0;
}

.msg-body strong {
  font-weight: 600;
}

.msg-body em {
  font-style: italic;
}

.msg-body a {
  color: var(--accent);
  text-decoration: underline;
}

.msg-user {
  margin-left: auto;
  background: var(--user-bubble);
  border-color: rgba(22, 75, 58, 0.4);
}

.msg-user .msg-title,
.msg-user .msg-body {
  color: var(--user-text);
}

.msg-system {
  background: var(--system-bubble);
  border-style: dashed;
}

/* ─── Welcome state ─────────────────────────────────── */

.welcome-state {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  justify-self: center;
  margin-top: 22vh;
  color: var(--text-muted);
  user-select: none;
}

.welcome-icon {
  font-size: 38px;
  line-height: 1;
  opacity: 0.75;
}

.welcome-text {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ─── Typing indicator ──────────────────────────────── */

.typing {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  animation: bounce 1.1s infinite ease-in-out;
}

.typing span:nth-child(2) {
  animation-delay: 0.12s;
}

.typing span:nth-child(3) {
  animation-delay: 0.24s;
}

.typing em {
  font-style: normal;
}

.composer {
  display: grid;
  grid-template-rows: auto auto;
  gap: 10px;
  background: var(--surface-strong);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid rgba(23, 58, 46, 0.12);
}

.composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 62px;
  max-height: 200px;
  border: 1px solid rgba(32, 78, 62, 0.24);
  border-radius: 10px;
  font: inherit;
  color: var(--text-main);
  padding: 10px 12px;
  background: white;
}

.composer textarea:focus {
  outline: 2px solid rgba(29, 143, 106, 0.26);
  border-color: rgba(29, 143, 106, 0.5);
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: transform var(--duration-fast) ease, opacity var(--duration-fast) ease,
    background var(--duration-fast) ease;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-send {
  color: white;
  background: linear-gradient(115deg, #167d5e, #2da67f);
}

.btn-voice {
  color: var(--text-main);
  background: #d9f6eb;
  position: relative;
  border: 1px solid #2f7f67;
}

.btn-voice.is-recording {
  color: white;
  background: linear-gradient(115deg, #de4a4a, #d06666);
  animation: pulse 1.45s infinite ease-out;
}

.btn-ghost {
  background: rgba(244, 252, 249, 0.92);
  border: 1px solid rgba(34, 84, 67, 0.24);
  color: var(--text-main);
}

.btn-danger {
  border-color: rgba(177, 58, 58, 0.28);
  color: #8f2f2f;
}

.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;
}

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

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

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(222, 74, 74, 0.34);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(222, 74, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(222, 74, 74, 0);
  }
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* ─── Vision / Stress dashboard ─────────────────────────────────── */

.vision-panel {
  margin-top: -20px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(29, 143, 106, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.vision-panel.level-warn {
  border-color: rgba(255, 182, 92, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 182, 92, 0.2) inset;
}

.vision-panel.level-alarm {
  border-color: rgba(255, 107, 107, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.3) inset, 0 0 16px rgba(255, 107, 107, 0.18);
  animation: pulseAlarm 2.4s ease-in-out infinite;
}

@keyframes pulseAlarm {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.3) inset, 0 0 12px rgba(255, 107, 107, 0.15); }
  50%      { box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.45) inset, 0 0 22px rgba(255, 107, 107, 0.28); }
}

.vision-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vision-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.btn-camera {
  font-size: 12px;
  padding: 4px 10px;
}

.btn-camera.is-on {
  background: rgba(143, 216, 177, 0.2);
  color: #8fd8b1;
}

.camera-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* mirror like a selfie */
}

.camera-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff6b6b;
  box-shadow: 0 0 6px rgba(255, 107, 107, 0.8);
  animation: recordBlink 1.2s ease-in-out infinite;
}

@keyframes recordBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.stress-readout {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stress-score-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.stress-label {
  font-size: 12px;
  opacity: 0.7;
}

.stress-score {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stress-trend {
  font-size: 16px;
  opacity: 0.85;
}

#stressChart {
  width: 100%;
  max-width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

.stress-signals {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
}

.stress-line {
  margin: 0;
  opacity: 0.85;
}

.stress-summary {
  margin: 2px 0 0 0;
  font-size: 12px;
  opacity: 0.7;
  font-style: italic;
}

.burst-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  cursor: help;
}

.burst-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #ff8c42;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
}

.burst-compound {
  font-size: 11.5px;
  color: #c8421a;
  font-weight: 600;
}

.burst-pulse {
  animation: burst-pulse-anim 600ms ease-out;
}

.btn-voice.is-continuous {
  background: linear-gradient(135deg, #b6d7c1, #d8f3ea);
  color: #2e7d32;
  cursor: not-allowed;
  opacity: 0.85;
}

.stress-expression-line {
  font-weight: 600;
  font-size: 13px;
}
.expr-pos { color: #2e7d32; }
.expr-neg { color: #c8421a; }
.expr-neu { color: #5e6f6a; }

@keyframes burst-pulse-anim {
  0%   { transform: scale(1);   opacity: 0.6; }
  40%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .shell {
    margin: 0;
    width: 100vw;
    min-height: 100vh;
    height: auto;
    border-radius: 0;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .panel-side {
    gap: 14px;
  }

  .panel-chat {
    min-height: 68vh;
  }

  .composer {
    position: sticky;
    bottom: 0;
  }

  .msg {
    max-width: 92%;
  }
}

.panel-side::-webkit-scrollbar {
  width: 6px;
}

.panel-side::-webkit-scrollbar-thumb {
  background: rgba(221, 221, 221, 0.9);
  border-radius: 3px;
}

#wechat-login-overlay #wechat-qr-container iframe {
  border: none;
}

#wechat-login-overlay #wechat-qr-container iframe body {
  font-size: 24px !important;
  font-weight: 700 !important;
}

/* ── 触摸设备后备（UA 检测漏检时的兜底） ──────────────────────── */
@media (pointer: coarse) {
  .btn, button {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }

  textarea, input {
    font-size: 16px;
  }
}

/* ── 对话反馈模块（FeedbackModule，老桌面端）─────────────────────
   跟手机端同一套 .fb-* 命名 + 调色板，桌面比例略大（屏大、字略大、间距略宽）。
   反馈页 #feedbackRoot 是 fixed 全屏接管，layout 用单列 flex。
*/

:root {
  --fb-fs-title: 18px;
  --fb-fs-h2: 15px;
  --fb-fs-body: 13px;
  --fb-fs-btn: 14px;
  --fb-fs-pill: 13px;
  --fb-fs-input: 14px;
  --fb-fs-counter: 11px;
  --fb-fs-dialog-title: 14px;
  --fb-fs-quote: 12px;
  --fb-fs-toast: 12px;
  --fb-fs-topbar: 13px;

  --fb-up: #1d8f6a;
  --fb-up-soft: #e6f6f0;
  --fb-up-strong: #0d5a40;
  --fb-down: #ff8c42;
  --fb-down-soft: #fff1e5;
  --fb-down-strong: #c75a14;
  --fb-card: rgba(255, 255, 255, 0.92);
  --fb-card-border: rgba(13, 90, 64, 0.10);
  --fb-text: #16352b;
  --fb-text-muted: #4d675d;
  --fb-toast-bg: #0e1a2b;
}

/* 反馈页：嵌在 .panel-chat 内部，absolute 占满整个"对话空间"（替代原 chat-header/messages/typing/composer）。
   lockChat 隐藏 #messages + #typing + #composer、显示本元素。 */
#feedbackRoot {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #d8f3ea 0%, #f3f8ea 50%, #ffe9dc 100%);
  overflow: hidden;
  animation: fbFadeIn 0.2s ease-out;
  border-radius: inherit;  /* 继承 .panel 的圆角 */
}
#feedbackRoot[hidden] { display: none; }
@keyframes fbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 顶栏：X 关闭 / 标题 / 步骤指示 */
.fb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid var(--fb-card-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* "本次对话反馈" 标题已移除，只剩 X 关闭按钮 + 步骤指示器两端分布 */
.fb-topbar-step {
  font-size: 11px;
  color: var(--fb-text-muted);
  min-width: 24px;
  text-align: right;
  font-weight: 500;
}
#fbCloseBtn {
  padding: 4px 10px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fb-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
#fbCloseBtn:hover {
  background: var(--fb-up-soft);
  color: var(--fb-up-strong);
  border-color: var(--fb-up);
}

/* 内容区：步骤 1 / 2 / 致谢页都渲染到这里 */
.fb-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  /* 不要让 shell 自身滚，让内部的 .fb-msg-list 滚；summary + 提交键始终钉在底部 */
  overflow: hidden;
  padding: 22px 26px 24px;
  max-width: 640px;
  width: calc(100% - 32px);
  margin: 16px auto 24px;
  box-sizing: border-box;
  background: #fefdf8;       /* 极淡米白，几乎接近纯白，仍带一丝暖意 */
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(13, 90, 64, 0.12);
  border: 1px solid var(--fb-card-border);
}

/* ── 步骤 1 / 步骤 2 共用 ─────────────────────── */

.fb-page-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fb-fs-title);
  font-weight: 700;
  color: var(--fb-text);
  margin: 4px 0 18px;
}
.fb-page-title .heart {
  color: var(--fb-up);
  font-size: calc(var(--fb-fs-title) + 2px);
  line-height: 1;
}

.fb-section {
  background: var(--fb-card);
  border: 1px solid var(--fb-card-border);
  border-radius: 14px;
  padding: 14px 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(13, 90, 64, 0.06);
}

.fb-q-label {
  font-size: var(--fb-fs-h2);
  font-weight: 600;
  color: var(--fb-text);
  margin: 0 0 10px;
  line-height: 1.5;
}
.fb-required {
  color: #e74c3c;
  font-weight: 700;
  margin-left: 2px;
}

.fb-pill-row {
  display: flex;
  gap: 8px;
}
.fb-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 12px;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  font-size: var(--fb-fs-pill);
  font-weight: 500;
  color: var(--fb-text);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.fb-pill[data-selected="true"][data-vote="up"] {
  background: var(--fb-up-soft);
  border-color: var(--fb-up);
  color: var(--fb-up-strong);
  box-shadow: 0 2px 6px rgba(29, 143, 106, 0.18);
}
.fb-pill[data-selected="true"][data-vote="down"] {
  background: var(--fb-down-soft);
  border-color: var(--fb-down);
  color: var(--fb-down-strong);
  box-shadow: 0 2px 6px rgba(255, 140, 66, 0.18);
}
.fb-pill .ic { font-size: 14px; line-height: 1; }
.fb-pill:hover:not([data-selected="true"]) {
  border-color: var(--fb-up);
  color: var(--fb-up-strong);
}

.fb-textarea-wrap {
  position: relative;
}
.fb-textarea {
  width: 100%;
  min-height: 90px;
  max-height: 180px;
  padding: 10px 12px;
  padding-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  font-size: var(--fb-fs-input);
  font-family: inherit;
  color: var(--fb-text);
  line-height: 1.5;
  outline: none;
  resize: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fb-textarea:focus {
  border-color: var(--fb-up);
  box-shadow: 0 0 0 3px var(--fb-up-soft);
}
.fb-textarea::placeholder { color: #9aaba3; }
/* 步骤 1 整体反馈用的大号 textarea：min/max 高度 2.5 倍。弹窗原因框保持原样。 */
.fb-textarea--lg {
  min-height: 225px;
  max-height: 450px;
}
.fb-counter {
  position: absolute;
  right: 12px;
  bottom: 6px;
  font-size: var(--fb-fs-counter);
  color: var(--fb-text-muted);
  pointer-events: none;
}

.fb-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  flex-shrink: 0;            /* 提交按钮也始终在底部 */
}
.fb-btn-primary {
  flex: 1;
  padding: 12px 18px;
  background: var(--fb-up);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: var(--fb-fs-btn);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  font-family: inherit;
}
.fb-btn-primary[disabled] { opacity: 0.45; cursor: not-allowed; }
/* "提交反馈" 按钮：在未选够触动/欠缺点时变灰，但仍可点击触发 onSubmit 的 toast 警告。
   用 .is-disabled 而不是 [disabled]，因为 [disabled] 会阻止 click 事件触发。 */
.fb-btn-primary.is-disabled {
  background: #c8e6d8;
  color: #ffffff;
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: auto;  /* 允许点击触发 onSubmit 弹警告 */
}
.fb-btn-primary.is-disabled:hover { background: #c8e6d8; }
.fb-btn-primary.is-disabled:active { transform: none; }
.fb-btn-primary:hover:not([disabled]) {
  background: var(--fb-up-strong);
}
.fb-btn-secondary {
  flex: 1;
  padding: 12px 18px;
  background: #f1f1f1;
  color: var(--fb-text);
  border: none;
  border-radius: 999px;
  font-size: var(--fb-fs-btn);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.fb-btn-secondary:hover { background: #e6e6e6; }
.fb-btn-orange {
  flex: 1;
  padding: 12px 18px;
  background: var(--fb-down);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: var(--fb-fs-btn);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.fb-btn-orange:hover { background: var(--fb-down-strong); }

/* ── 步骤 2：对话列表 ─────────────────────── */

.fb-step2-hint {
  font-size: var(--fb-fs-h2);
  font-weight: 600;
  color: var(--fb-text);
  margin: 0 0 12px;
  line-height: 1.55;
  padding: 10px 14px;
  background: var(--fb-up-soft);
  border-left: 3px solid var(--fb-up);
  border-radius: 0 10px 10px 0;
}

.fb-msg-list {
  flex: 1;
  min-height: 0;            /* flex 子项需要这个才能真正收缩并内部滚动 */
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px 6px 4px 0;   /* 留点内边距给滚动条 */
  overflow-y: auto;
}
.fb-msg {
  position: relative;
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: var(--fb-fs-body);
  line-height: 1.6;
  color: var(--fb-text);
  word-break: break-word;
}
.fb-msg.bot {
  background: #fff;
  border: 1px solid var(--fb-card-border);
  align-self: flex-start;
  border-left: 3px solid var(--fb-up);
  box-shadow: 0 2px 10px rgba(13, 90, 64, 0.10);
  padding-right: 64px;
}
.fb-msg.user-msg {
  background: var(--fb-up);
  color: #f4fff8;
  align-self: flex-end;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.fb-msg.user-msg .label { color: rgba(255, 255, 255, 0.85); }
.fb-msg .label {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 3px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.fb-rate-bar {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fb-rate-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #b7c2bd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 8px;
  padding: 0;
  transition: color 0.12s, background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.fb-rate-btn svg { display: block; }
.fb-rate-btn:hover {
  border-color: var(--fb-up);
  color: var(--fb-up);
}
.fb-rate-btn[data-vote="up"][data-selected="true"] {
  color: var(--fb-up);
  background: var(--fb-up-soft);
  border-color: var(--fb-up);
  box-shadow: 0 1px 3px rgba(29, 143, 106, 0.20);
}
.fb-rate-btn[data-vote="down"][data-selected="true"] {
  color: var(--fb-down);
  background: var(--fb-down-soft);
  border-color: var(--fb-down);
  box-shadow: 0 1px 3px rgba(255, 140, 66, 0.20);
}

.fb-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;            /* 永远在底部，不被挤压 */
  background: #f8fbf9;        /* 微微提亮，提示这是"钉住"区域 */
  border: 1px solid var(--fb-card-border);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: var(--fb-fs-body);
  margin: 8px 0 12px;
}
.fb-summary .up { color: var(--fb-up); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.fb-summary .down { color: var(--fb-down); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.fb-summary .up .ic, .fb-summary .down .ic { font-size: 13px; }  /* 与正文略小，更精致 */

/* ── 原因弹窗 ─────────────────────── */

.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 8100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 30, 25, 0.50);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 16px;
  box-sizing: border-box;
  animation: fbFadeIn 0.15s ease-out;
}
.fb-modal-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(13, 30, 25, 0.30);
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}
.fb-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.fb-modal-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fb-fs-dialog-title);
  font-weight: 700;
  color: var(--fb-text);
}
.fb-modal-title .ic { font-size: 16px; line-height: 1; }
.fb-modal-title[data-vote="up"] .ic { color: var(--fb-up); }
.fb-modal-title[data-vote="down"] .ic { color: var(--fb-down); }
.fb-modal-close {
  background: transparent;
  border: none;
  color: var(--fb-text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
}
.fb-modal-close:hover { color: var(--fb-up-strong); }

.fb-quote {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: var(--fb-fs-quote);
  line-height: 1.55;
  color: var(--fb-text);
  margin-bottom: 12px;
  max-height: 110px;
  overflow-y: auto;
  word-wrap: break-word;
}
.fb-quote[data-vote="up"] { background: var(--fb-up-soft); border: 1px solid var(--fb-up); }
.fb-quote[data-vote="down"] { background: var(--fb-down-soft); border: 1px solid var(--fb-down); }
.fb-quote .who {
  font-weight: 600;
  margin-right: 4px;
  opacity: 0.85;
}

.fb-modal-body { flex: 1; }
.fb-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* ── Toast ─────────────────────── */

.fb-toast {
  position: fixed;
  left: 50%;
  top: 28px;
  transform: translateX(-50%);
  z-index: 8200;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--fb-toast-bg);
  color: #fff;
  border-radius: 999px;
  font-size: var(--fb-fs-toast);
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(13, 30, 25, 0.30);
  max-width: calc(100vw - 32px);
  cursor: pointer;
  animation: fb-toast-in 0.18s ease-out;
}
.fb-toast .ic {
  color: var(--fb-down);
  font-size: 13px;
  line-height: 1;
}
@keyframes fb-toast-in {
  from { opacity: 0; transform: translate(-50%, -4px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ── 致谢页 ─────────────────────── */

.fb-thanks {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  text-align: center;
}
.fb-thanks .emoji {
  font-size: 56px;
  margin-bottom: 16px;
  animation: fbHeartBeat 1.4s ease-in-out infinite;
}
@keyframes fbHeartBeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}
.fb-thanks h2 {
  font-size: var(--fb-fs-title);
  font-weight: 700;
  color: var(--fb-text);
  margin: 0 0 8px;
}
.fb-thanks p {
  font-size: var(--fb-fs-body);
  color: var(--fb-text-muted);
  margin: 0 0 22px;
  line-height: 1.55;
}
/* 致谢页提示卡片：把 h2+p 包成一个白色卡片，跟渐变背景拉开 */
.fb-thanks-message {
  background: var(--fb-card);
  border: 1px solid var(--fb-card-border);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 0 0 22px;
  box-shadow: 0 2px 10px rgba(13, 90, 64, 0.10);
  max-width: 360px;
  text-align: center;
}
.fb-thanks-message h2 { margin: 0 0 8px; }
.fb-thanks-message p   { margin: 0; }
.fb-thanks-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 360px;
}

/* ═══════════════════════════════════════════════════════════════
   移动端风格搬运：主色 CTA、用户信息、voice-mode、vision grid、
   welcome 两行、drawer footer 吸底、feedback modal、toast 等。
   与 mobile 端视觉风格保持一致，名字沿用 mobile 端类名便于对照。
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* 桌面端主色 — 跟 mobile 端一致（沿用根的 --accent） */
  --mb-accent: #1d8f6a;
  --mb-accent-hover: #157554;
  --mb-accent-soft: #dcfff2;
  --mb-avatar-bg: linear-gradient(135deg, #7ecba1 0%, #4fa97b 100%);
}

/* ── 侧栏三段式布局：固定顶部 + 仅列表滚动 + 吸底 footer ────────── */
.panel-side {
  /* 整个侧栏统一滚动，不再分段控制 */
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

/* 固定顶部：现在参与整体滚动 */
.side-fixed-top {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 10px 16px 0;
}

/* 中段：不再独立滚动，跟随整体滚动 */
.side-scroll-middle {
  flex-shrink: 0;
  overflow: visible;
  padding: 0 10px 0 0;
}

.side-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 4px 8px 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

/* 滚动条样式 - 统一在 .panel-side 上 */
.panel-side {
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 90, 64, 0.18) transparent;
}
.panel-side::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}
.panel-side::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}
.panel-side::-webkit-scrollbar-thumb {
  background: rgba(13, 90, 64, 0.20);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
  min-height: 30px;
}
.panel-side:hover::-webkit-scrollbar-thumb {
  background: rgba(13, 90, 64, 0.32);
  background-clip: padding-box;
}

/* ── 侧栏底部：意见反馈按钮 ────────────────────────────────────── */
.drawer-feedback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 12px;
  background: transparent;
  border: 0;
  color: #9aaba3;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.drawer-feedback-btn .ic {
  font-size: 13px;
  line-height: 1;
}
.drawer-feedback-btn:hover {
  background: rgba(29, 143, 106, 0.06);
  color: var(--mb-accent);
}
.drawer-feedback-btn:active {
  background: rgba(29, 143, 106, 0.12);
}

/* ── 用户头像 + 昵称 ──────────────────────────────────────────── */
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: default;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--mb-avatar-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(29, 143, 106, 0.18);
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
}
.user-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
/* 抽屉底部 compact 变体：稍小更克制 */
.user-profile--compact .user-avatar {
  width: 30px;
  height: 30px;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(29, 143, 106, 0.18);
}
.user-profile--compact .user-name {
  font-size: 13px;
  color: #5e6f6a;
  font-weight: 500;
}

/* ── 会话列表顶部"开启新会话"主色 CTA ──────────────────────────── */
.session-list .session-item--new {
  /* li 水平 padding 16px——按钮 width:100% 不变，但视觉宽度比下面"列表项"内容
     各窄 16px（小巧、不喧宾夺主，保留撑满父容器的主色 CTA 风格） */
  padding: 0 16px;
  margin: 0 0 10px 0;
  background: transparent;
  cursor: default;
  list-style: none;
  opacity: 1; /* 覆盖 .session-item 的 0.85 */
  white-space: normal; /* 覆盖 nowrap */
}
.session-list .session-item--new:hover,
.session-list .session-item--new:active {
  background: transparent;
}
.session-new-btn {
  /* 回到 width:100% 撑满父容器（.session-list 内容区）——保留之前缩小后的
     padding/font-size/shadow 等小巧参数，不变回"大按钮" */
  width: 100%;
  padding: 8px 18px;
  border: 0;
  background: var(--mb-accent, #1d8f6a);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  touch-action: manipulation;
  text-align: center;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow:
    0 2px 6px rgba(29, 143, 106, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.session-new-btn:hover {
  background: var(--mb-accent-hover, #157554);
}
.session-new-btn:active {
  transform: scale(0.98);
  box-shadow:
    0 1px 3px rgba(29, 143, 106, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.session-new-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

/* ── voice-mode：voiceBtn 隐藏，voiceCallBar 占据按钮原位置 ─────── */
.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(--mb-accent-soft, #dcfff2);
  color: var(--mb-accent, #1d8f6a);
  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(--mb-accent, #1d8f6a);
  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;    }
}
/* 持续倾听中：隐藏原 voiceBtn，voice-mode 用 .composer.voice-mode 控制 */
.composer.voice-mode .btn-voice {
  display: none;
}
.composer.voice-mode {
  /* input 视觉略微给语音一点空间，缩小 padding 避免和 chip 抢位 */
  padding: 10px;
}
.composer.voice-mode textarea {
  min-height: 50px;
}

/* ── 语音已连接 toast（顶部居中，3 秒自动消失） ────────────────── */
.voice-connected-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  z-index: 7500;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--mb-accent, #1d8f6a);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  box-shadow: 0 10px 28px rgba(29, 143, 106, 0.32);
  animation: voice-toast-in 0.22s ease-out;
  cursor: default;
  user-select: none;
}
.voice-connected-icon {
  font-size: 14px;
  line-height: 1;
}
@keyframes voice-toast-in {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ── 全局 app toast（提交成功 / 错误） ────────────────────────── */
.app-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  z-index: 7600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--fb-toast-bg, #0e1a2b);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  box-shadow: 0 8px 24px rgba(13, 30, 25, 0.30);
  max-width: calc(100vw - 32px);
  animation: voice-toast-in 0.18s ease-out;
  pointer-events: none;
}
.app-toast[data-level="success"] {
  background: var(--mb-accent, #1d8f6a);
}
.app-toast[data-level="error"] {
  background: #c8421a;
}

/* ── 摄像头提示：开启前后都保留 ──────────────────────────────── */
.vision-hint {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  line-height: 1.5;
}

/* ── vision-detail：2×2 grid，摄像头小画面+信号行，readout 跨两列 ─ */
.vision-detail {
  display: grid;
  grid-template-columns: 112px 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
  align-items: start;
}
/* 让摄像头紧凑：固定 112×84，cover 自适配 */
.vision-detail .camera-preview-wrap {
  grid-column: 1;
  grid-row: 1;
  width: 112px;
  height: 84px;
  aspect-ratio: auto;          /* 覆盖 mobile/desktop 默认 4/3 */
  border-radius: 10px;
  border: 1px solid rgba(23, 58, 46, 0.25);
}
.vision-detail .camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vision-detail .stress-signals {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  align-self: start;
}
/* 右列各行固定单行高度：超长省略号截断，避免换行数变化导致布局抖动 */
.vision-detail .stress-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 摘要固定占 2 行：超出截断，不足也保留高度 */
.vision-detail .stress-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  min-height: 3em;
}
/* 微表情行用 visibility 隐藏以保留占位 */
.burst-line.is-empty {
  visibility: hidden;
}
.vision-detail .stress-readout {
  grid-column: 1 / span 2;
  grid-row: 2;
  width: 100%;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  padding: 8px 10px;
}
.vision-detail #stressChart {
  width: 100%;
  height: 50px;
}

/* ── welcome：内联 SVG 叶子 + 副标题（句内不换行） ───────────── */
.welcome-state {
  flex-direction: column;       /* 覆盖原 row 排版 */
  gap: 4px;
  margin-top: 20vh;             /* 整体下移一点 */
}
.welcome-icon {
  /* 原 .welcome-icon 是 emoji，重定义为 SVG 容器 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;                 /* emoji 兜底空白 */
  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);      /* 比 muted 略重 */
}
.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%;
}
/* 防止窄屏横向滚动 */
.welcome-state {
  overflow-x: hidden;
}

/* ── 意见反馈 modal（#feedbackModal，区别于 FeedbackModule 的 #feedbackRoot）── */
#feedbackModal .fb-modal-card {
  max-width: 480px;
}
.fb-helper {
  margin: 0 0 10px 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}
.fb-modal-attachments {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.fb-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--mb-accent-soft, #dcfff2);
  color: var(--mb-accent, #1d8f6a);
  border: 1px solid rgba(29, 143, 106, 0.22);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.fb-attach-btn:hover {
  background: rgba(29, 143, 106, 0.12);
  border-color: var(--mb-accent);
}
.fb-attach-btn .ic {
  font-size: 13px;
  line-height: 1;
}
.fb-attach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fb-attach-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-main);
}
.fb-attach-item .name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-attach-item .size {
  color: var(--text-muted);
  font-size: 11px;
  flex-shrink: 0;
}
.fb-attach-item .remove {
  cursor: pointer;
  color: #c8421a;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  padding: 2px 4px;
}

/* ── 全局 [hidden] !important 修复：JS 设 hidden 后 CSS 还在显示 ── */
/* 仅作用于新增的"display: flex"等会覆盖 [hidden]{display:none} 的元素 */
.voice-connected-toast[hidden],
.app-toast[hidden],
.voice-call-bar[hidden],
.voice-call-chip[hidden],
.vision-detail[hidden],
.vision-panel[hidden],
.camera-preview-wrap[hidden],
#feedbackModal[hidden] {
  display: none !important;
}

/* ── 内联 SVG icon 统一容器 ──────────────────────────────────── */
/* .ic 包裹 SVG，宽度默认 1em 跟字对齐；可被更具体选择器覆盖（如 14px / 16px） */
.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;
}

/* ── 上传附件按钮的图标（融合外层 pill 软绿底，无边框）────────── */
.fb-attach-btn {
  /* 在原样式基础上：留出图标方块的内边距 */
  padding-left: 5px;
  gap: 8px;
}
.fb-attach-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: transparent;
  /* 去掉"凹槽"边框，跟 pill 底色完全融合 */
  color: var(--mb-accent, #1d8f6a);
  flex-shrink: 0;
  transition: background 0.15s;
}
.fb-attach-icon svg {
  width: 15px;
  height: 15px;
}
.fb-attach-btn:hover .fb-attach-icon {
  background: rgba(29, 143, 106, 0.10);
}

/* voice connected toast 里麦克风图标尺寸 */
.voice-connected-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  line-height: 0;
}
.voice-connected-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
