/* ===================== 版本角标（右下角常显，前后端版本比对） ===================== */
.app-version {
  position: fixed;
  right: 8px;
  bottom: 8px;
  z-index: 9999;
  font-size: 11px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  opacity: 0.5;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}
.app-version--warn {
  background: #e23b3b;
  opacity: 1;
  font-weight: 600;
  pointer-events: auto;
}
/* 语音输入不可用（非 localhost/https 等）：按钮半透明但仍可点，点击弹出原因提示 */
.composer__mic--off { opacity: 0.5; }

/* ===================== 基础与变量 ===================== */
:root {
  --accent: #15c2b1;            /* 品牌青绿（Soul 风格）；全局统一，不再随克隆体变色 */
  --accent-soft: #d7f6f2;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1f2330;
  --text-dim: #8a8f9c;
  --line: #ececf0;
  --ai-bubble: #ebecef;         /* 克隆体灰气泡（仿参考图） */
  --user-bubble: var(--accent); /* 用户青绿气泡，白字 */
  --radius: 18px;
  /* 安全区 */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior: none;
}

body { overflow: hidden; }

/* ===================== 页面切换 ===================== */
.page {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.page--active { display: flex; }

/* 入口闸 / 加载态（仅对接模式：无 code 不可浏览） */
.gate {
  position: fixed; inset: 0; z-index: 400;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px; text-align: center; background: var(--bg);
}
.gate:not([hidden]) { display: flex; }
.gate__icon { font-size: 44px; }
.gate__msg { color: var(--text-dim); font-size: 15px; line-height: 1.6; max-width: 280px; }

/* ===================== 双 Tab 视图 ===================== */
/* Tab 视图占满主壳，给底部 Tab Bar 让出空间 */
.tabview {
  position: absolute;
  inset: 0;
  bottom: calc(58px + var(--safe-bottom)); /* 让出 Tab Bar 高度 */
  display: none;
  flex-direction: column;
}
.tabview--active { display: flex; }

/* ===================== 底部 Tab Bar ===================== */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 12px rgba(31, 35, 48, .05);
}
.tabbar__item {
  flex: 1 1 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  height: 58px;
  border: none; background: transparent; cursor: pointer;
  color: var(--text-dim);
}
.tabbar__icon { font-size: 22px; line-height: 1; filter: grayscale(1) opacity(.7); }
.tabbar__label { font-size: 11px; font-weight: 600; }
.tabbar__item--active { color: var(--accent); }
.tabbar__item--active .tabbar__icon { filter: none; }

/* ---- demo 精简：店员 Tab 隐藏（body.clerks-hidden，由 app.js 按 SHOW_CLERKS_TAB 加） ---- */
/* P0-2：底栏保留「消息 / 动态 / 我的」三 Tab；只把「店员」入口与视图藏掉。 */
/* 恢复店员：把 config.js 的 SHOW_CLERKS_TAB 改回 true，此类不再挂载即自动失效。 */
body.clerks-hidden .tabbar__item--clerks { display: none; }
body.clerks-hidden #tab-clerks { display: none; }

/* ---- 纯聊天模式（config.CHAT_ONLY）：只留「消息」列表 + 聊天 ---- */
/* 隐藏整条底部 Tab 栏（动态/我的），列表视图回收其占位、铺满到底。 */
body.chat-only .tabbar { display: none; }
body.chat-only .tabview { bottom: var(--safe-bottom); }
/* 点头像不再开详情，去掉可点提示 */
body.chat-only .topbar--chat .topbar__avatar { cursor: default; }
body.chat-only .topbar--chat .topbar__avatar:active { transform: none; }

/* ===================== 顶栏 ===================== */
.topbar {
  flex: 0 0 auto;
  padding-top: var(--safe-top);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar--home {
  padding: calc(var(--safe-top) + 22px) 20px 18px;
  background: linear-gradient(160deg, var(--accent-soft), var(--surface));
  border-bottom: none;
}
.topbar__title { font-size: 22px; font-weight: 700; }
.topbar__sub { margin-top: 4px; font-size: 13px; color: var(--text-dim); }

.topbar--chat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-top) + 8px) 12px 8px;
}
.iconbtn {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border: none; background: transparent;
  font-size: 30px; line-height: 1;
  color: var(--accent);
  cursor: pointer;
  border-radius: 50%;
}
.iconbtn:active { background: var(--accent-soft); }
.topbar__avatar {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 17px;
  background: var(--accent);
}
.topbar__namebox { flex: 1 1 auto; min-width: 0; }
.topbar__name { font-size: 17px; font-weight: 600; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__novoice { font-size: 11px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__sub { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
/* 「虚拟店员」淡紫徽标 + 「在线」状态（仿参考图） */
.chip-soft {
  font-size: 11px; font-weight: 600; color: #8a7be0;
  background: #efeaff; border-radius: 8px; padding: 1px 8px; line-height: 1.6;
}
.online { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent); font-weight: 600; }
.online i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.topbar__voiceswitch {
  border: 1px solid #ddd; background: #f5f5f8; color: var(--text);
  font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 11px;
  cursor: pointer; white-space: nowrap;
}
.topbar__voiceswitch:active { transform: scale(.96); }
.topbar__voiceswitch[disabled] { cursor: default; }
.topbar__voiceswitch--volc { border-color: #d3e2ff; background: #e6efff; color: #2563eb; }
.topbar__voiceswitch--minimax { border-color: #ebd9ff; background: #f3e8ff; color: #9333ea; }
.topbar__avatar--img { background-size: cover; background-position: center; color: transparent; }
/* 聊天页头像可点开「个人主页」，给个可点提示 */
.topbar--chat .topbar__avatar { cursor: pointer; }
.topbar--chat .topbar__avatar:active { transform: scale(.94); }
.iconbtn--clear { font-size: 0; }
.iconbtn--clear svg { display: block; margin: auto; }

/* ===================== 列表页 ===================== */
.list-wrap {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(16px + var(--safe-bottom));
}
.cards { display: flex; flex-direction: column; gap: 12px; }

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(31, 35, 48, .05);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:active { transform: scale(.985); box-shadow: 0 1px 6px rgba(31,35,48,.08); }
.card__avatar {
  flex: 0 0 auto;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 24px;
}
.card__main { min-width: 0; flex: 1 1 auto; }
.card__name { font-size: 17px; font-weight: 600; }
.card__line {
  margin-top: 2px;
  font-size: 13px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__owner {
  margin-top: 3px;
  font-size: 12px; color: var(--text-dim); opacity: .8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__chevron { flex: 0 0 auto; color: var(--text-dim); font-size: 22px; }
.card__del {
  flex: 0 0 auto; border: none; background: transparent; cursor: pointer;
  font-size: 17px; padding: 6px 8px; border-radius: 10px; opacity: .55;
}
.card__del:hover, .card__del:active { opacity: 1; background: #ffe9ec; }

/* 克隆体卡片上的真人头像 / 小动作 */
.card__avatar-img { object-fit: cover; }
.card__badges { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.minivoice {
  display: inline-flex; align-items: center; gap: 5px;
  border: none; cursor: pointer;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 12px;
}
.minivoice:active { transform: scale(.95); }
.minivoice--loading, .minivoice--playing { opacity: .9; }
.tag-voice {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 10px; padding: 3px 9px;
}
.tag-novoice {
  display: inline-flex; align-items: center;
  font-size: 11px; color: var(--text-dim);
  background: #f0f0f3; border-radius: 10px; padding: 3px 9px;
}

/* 音色来源标签（火山 / MiniMax / 未训练）——便于对比不同克隆方式 */
.vp {
  display: inline-flex; align-items: center;
  margin-left: 8px; vertical-align: middle;
  font-size: 11px; font-weight: 600;
  border-radius: 10px; padding: 2px 8px;
  line-height: 1.6;
}
/* 中性「真人音色」标签（不暴露 TTS 平台品牌） */
.vp--voice { color: var(--accent); background: var(--accent-soft); }
.vp--none { color: var(--text-dim); background: #f0f0f3; }

/* ===================== 选择克隆方式弹窗 ===================== */
.picker {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px;
}
.picker__card {
  width: 100%; max-width: 420px;
  background: #fff; border-radius: 18px;
  padding: 18px 16px calc(14px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.2);
  animation: picker-in 0.18s ease-out;
}
@keyframes picker-in { from { transform: translateY(20px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.picker__title { font-size: 16px; font-weight: 700; text-align: center; }
.picker__sub { margin: 6px 0 12px; font-size: 12px; color: var(--text-dim); text-align: center; }
.picker__btn {
  display: block; width: 100%; margin-top: 10px;
  border: 1px solid #eee; border-radius: 12px;
  padding: 13px; font-size: 15px; font-weight: 600;
  background: #f7f7fa; color: var(--text); cursor: pointer;
}
.picker__btn--volc { background: #e6efff; color: #2563eb; border-color: #d3e2ff; }
.picker__btn--minimax { background: #f3e8ff; color: #9333ea; border-color: #ebd9ff; }
.picker__btn:disabled { opacity: 0.45; cursor: not-allowed; }
.picker__cancel {
  display: block; width: 100%; margin-top: 12px;
  border: none; background: transparent; cursor: pointer;
  padding: 10px; font-size: 14px; color: var(--text-dim);
}

/* ===================== 店员网格（Tab 店员） ===================== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.clerk {
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(31, 35, 48, .05);
  overflow: hidden;
  padding: 14px 12px 12px;
}
.clerk__top { display: flex; align-items: center; gap: 10px; }
.clerk__avatar {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  cursor: pointer;
}
.clerk__avatar--placeholder {
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 22px;
  background: var(--accent);
}
.clerk__id { min-width: 0; flex: 1 1 auto; }
.clerk__name {
  font-size: 16px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clerk__meta {
  margin-top: 2px;
  font-size: 12px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clerk__grade {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px; font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 8px; padding: 0 6px;
  vertical-align: middle;
}
.clerk__region {
  margin-top: 4px;
  font-size: 12px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clerk__tags {
  margin-top: 8px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.clerk__tag {
  font-size: 11px; color: var(--accent);
  background: var(--accent-soft);
  border-radius: 10px; padding: 3px 9px;
}
.clerk__sign {
  margin-top: 8px;
  font-size: 12.5px; color: var(--text); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.clerk__actions {
  margin-top: 10px;
  display: flex; gap: 8px;
}
.clerk__actions .btn--sm { flex: 1 1 0; padding: 8px 6px; }
.btn--cloned {
  background: #e8f3ed; color: #3f9e72;
}
/* 已克隆的店员：可点的「AI」按钮，点击跳到对应克隆体对话 */
.btn--ai {
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.btn--ai::before { content: "💬"; font-size: 13px; }
.btn--ai:active { transform: scale(.96); }

/* ===================== 店员网格骨架 ===================== */
.grid-skel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.gskel {
  height: 158px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #ececf0 25%, #f6f5f8 37%, #ececf0 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

/* ===================== 分页 ===================== */
.pager {
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  padding: 18px 4px 4px;
}
.pager__info { font-size: 13px; color: var(--text-dim); }

/* 下拉加载更多 状态条 */
.clerk-more {
  text-align: center; color: var(--text-dim);
  font-size: 13px; padding: 16px 4px 8px; cursor: default;
}
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn[disabled] { opacity: .4; cursor: default; }

/* ===================== 图片查看器 ===================== */
.viewer {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .92);
  display: flex; align-items: center; justify-content: center;
  animation: toast-in .18s ease;
}
.viewer__img {
  max-width: 92vw; max-height: 80vh;
  border-radius: 10px;
  object-fit: contain;
}
.viewer__close {
  position: absolute;
  top: calc(var(--safe-top) + 14px); right: 16px;
  width: 40px; height: 40px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .15); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer;
}
.viewer__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 60px;
  border: none; background: transparent; color: #fff;
  font-size: 44px; line-height: 1; cursor: pointer;
  opacity: .8;
}
.viewer__nav--prev { left: 4px; }
.viewer__nav--next { right: 4px; }
.viewer__count {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 22px); left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .9); font-size: 14px;
}

/* ===================== 状态态（加载/错误/空） ===================== */
.state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  padding: 60px 24px;
  text-align: center;
  color: var(--text-dim);
}
.state__icon { font-size: 40px; }
.state__hint { font-size: 12px; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner--sm { width: 18px; height: 18px; border-width: 2px; }

/* ===================== 列表骨架屏 ===================== */
.skeletons { display: flex; flex-direction: column; gap: 12px; }
.skel-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(31, 35, 48, .05);
}
.skel-avatar { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%; }
.skel-lines { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; }
.skel-line { height: 12px; border-radius: 6px; }
.skel-line--w60 { width: 60%; } .skel-line--w50 { width: 50%; }
.skel-line--w55 { width: 55%; } .skel-line--w45 { width: 45%; }
.skel-line--w40 { width: 40%; } .skel-line--w35 { width: 35%; }
.skel-avatar, .skel-line {
  background: linear-gradient(90deg, #ececf0 25%, #f6f5f8 37%, #ececf0 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* 历史加载中（对话页顶部） */
.history-loading {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; color: var(--text-dim); font-size: 13px;
}

/* ===================== 聊天区 ===================== */
.chat-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg { display: flex; align-items: flex-start; gap: 8px; max-width: 100%; }
.msg--user { justify-content: flex-end; }
.msg--ai { justify-content: flex-start; }

/* 每条消息的头像（克隆体在左、用户在右）——仿参考图 */
.msg__avatar {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 1px 5px rgba(31, 35, 48, .1);
}
.msg__avatar--user {
  background: linear-gradient(135deg, #7fe0d6, var(--accent)); color: #fff;
}
.msg__avatar--user svg { width: 22px; height: 22px; fill: currentColor; }

.bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15.5px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}
.msg--user .bubble {
  background: var(--user-bubble);
  color: #fff;
  border-top-right-radius: 7px;
}
.msg--ai .bubble {
  background: var(--ai-bubble);
  color: var(--text);
  border-top-left-radius: 7px;
}

/* AI 气泡内的播放按钮 */
.bubble__row { display: flex; align-items: flex-end; gap: 8px; }
.bubble__row .bubble { flex: 0 1 auto; }
.playbtn {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  align-self: flex-end;
  transition: transform .1s ease;
}
.playbtn:active { transform: scale(.9); }
/* 加载态：转圈 */
.playbtn--loading { color: var(--accent); }
.playbtn--loading::after {
  content: ""; position: absolute;
  width: 18px; height: 18px;
  border: 2px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.playbtn--loading { position: relative; color: transparent; }
/* 播放中：脉冲波纹 */
.playbtn--playing { animation: pulse 1s ease infinite; }
@keyframes pulse { 50% { background: var(--accent); color: #fff; } }
.playbtn[disabled] { opacity: .5; cursor: default; }

/* 克隆体主动发的「语音条」（仿微信语音消息）。
   左对齐、随 AI 气泡风格；点条播放，下方「查看文字」可展开看内容。 */
.voicemsg { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 72%; }
.voicemsg__bar {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 120px; max-width: 100%;
  padding: 10px 14px;
  border: none; cursor: pointer;
  border-radius: 18px; border-top-left-radius: 7px;
  background: var(--ai-bubble); color: var(--text);
  font-size: 15px;
  transition: transform .1s ease;
}
.voicemsg__bar:active { transform: scale(.97); }
.voicemsg__icon { font-size: 16px; line-height: 1; color: var(--accent); }
.voicemsg__len { font-size: 12px; color: var(--text-soft, #8a8f9c); }
/* 静态声波三两竖条，呼应语音的意象 */
.voicemsg__wave { display: inline-flex; align-items: center; gap: 3px; height: 16px; }
.voicemsg__wave i {
  width: 3px; border-radius: 2px; background: var(--accent); opacity: .55;
}
.voicemsg__wave i:nth-child(1) { height: 7px; }
.voicemsg__wave i:nth-child(2) { height: 13px; }
.voicemsg__wave i:nth-child(3) { height: 9px; }
.voicemsg__wave i:nth-child(4) { height: 5px; }
/* 播放中：声波轻轻起伏 */
.voicemsg__wave--on i { animation: voicewave .9s ease infinite; }
.voicemsg__wave--on i:nth-child(2) { animation-delay: .15s; }
.voicemsg__wave--on i:nth-child(3) { animation-delay: .3s; }
.voicemsg__wave--on i:nth-child(4) { animation-delay: .45s; }
@keyframes voicewave { 50% { transform: scaleY(1.6); opacity: 1; } }
.voicemsg__toggle {
  border: none; background: none; cursor: pointer;
  padding: 0 4px; font-size: 12px; color: var(--accent);
}
.voicemsg__caption {
  align-self: stretch;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 14px; line-height: 1.5;
  word-break: break-word; white-space: pre-wrap;
}

/* 正在输入指示 */
.typing .bubble { display: inline-flex; gap: 4px; padding: 14px; }
.typing .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-dim);
  animation: blink 1.2s infinite both;
}
.typing .dot:nth-child(2) { animation-delay: .2s; }
.typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ===================== 输入栏 ===================== */
.composer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.composer__input {
  flex: 1 1 auto;
  resize: none;
  max-height: 120px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font: inherit;
  font-size: 15.5px;
  background: var(--bg);
  outline: none;
}
.composer__input:focus { border-color: var(--accent); background: #fff; }
.composer__send {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s ease, opacity .2s ease;
}
.composer__send:active { transform: scale(.92); }
.composer__send[disabled] { opacity: .45; cursor: default; }
/* 发送中：把发送图标换成转圈 */
.composer__send--busy svg { display: none; }
.composer__send--busy::after {
  content: ""; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* 按住说话：与发送按钮同尺寸圆钮，长按录音 */
.composer__mic {
  flex: 0 0 auto;
  order: -1;                      /* 语音键移到输入框左侧（仿参考图） */
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s ease, background .2s ease, color .2s ease, opacity .2s ease;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;            /* 防止长按触发系统手势/选择 */
}
.composer__mic:active { transform: scale(.92); }
.composer__mic[disabled] { opacity: .45; cursor: default; }
/* 录音中：变色 + 呼吸波纹 */
.composer__mic--rec {
  background: var(--accent);
  color: #fff;
  animation: micPulse 1.1s ease-in-out infinite;
}
@keyframes micPulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-soft); }
  70%  { box-shadow: 0 0 0 10px rgba(21,194,177,0); }
  100% { box-shadow: 0 0 0 0 rgba(21,194,177,0); }
}
/* 识别中：转圈替换图标 */
.composer__mic--busy svg { display: none; }
.composer__mic--busy::after {
  content: ""; width: 18px; height: 18px;
  border: 2px solid rgba(21,194,177,.4);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ===================== 通用按钮 ===================== */
.btn {
  border: none; cursor: pointer;
  padding: 10px 22px; border-radius: 20px;
  font-size: 15px; font-weight: 600;
}
.btn--ghost {
  background: var(--accent-soft); color: var(--accent);
}
.btn--ghost:active { transform: scale(.96); }

/* ===================== 全局 toast 提示条 ===================== */
.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-top) + 14px);
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px 11px 16px;
  background: #2b2f3a;
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 22px rgba(31, 35, 48, .25);
  font-size: 14px;
  animation: toast-in .22s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.toast--error { background: #d9534f; }
.toast--warn  { background: #e08a2b; }
.toast--ok    { background: #3f9e72; }
.toast__msg { flex: 1 1 auto; line-height: 1.4; }
.toast__action {
  flex: 0 0 auto;
  border: none; cursor: pointer;
  background: rgba(255, 255, 255, .22);
  color: #fff; font-weight: 600;
  padding: 5px 12px; border-radius: 12px; font-size: 13px;
}
.toast__action:active { background: rgba(255, 255, 255, .34); }
.toast__close {
  flex: 0 0 auto;
  border: none; background: transparent; cursor: pointer;
  color: rgba(255, 255, 255, .8);
  font-size: 20px; line-height: 1; padding: 0 2px;
}

/* ===================== 对话顶栏工具按钮（动态/人设） ===================== */
.iconbtn--tool { width: 34px; height: 34px; font-size: 0; }
.iconbtn--tool svg { display: block; margin: auto; }

/* ===================== 抽屉（动态 / 人设，自底部滑出） ===================== */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; }
.sheet__mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .42); }
.sheet__panel {
  position: relative; margin-top: auto;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  max-height: 82vh;
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .2);
  animation: picker-in .2s ease-out;
}
.sheet__head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.sheet__title { font-size: 17px; font-weight: 700; }
.sheet__close {
  border: none; background: transparent; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--text-dim); padding: 0 4px;
}
.sheet__bar {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.sheet__bar .btn--sm { width: 100%; }
.sheet__bar--split { display: flex; gap: 10px; }
.sheet__bar--split .btn--sm { flex: 1 1 0; width: auto; }
.sheet__body {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 18px calc(18px + var(--safe-bottom));
}
.sheet .btn--sm {
  background: var(--accent); color: #fff;
}
.sheet .btn--sm:active { transform: scale(.97); }
.sheet .btn--sm[disabled] { opacity: .5; }

/* 抽屉内的加载/空态 */
.sheet-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 48px 16px; color: var(--text-dim); text-align: center;
}
.sheet-state--empty p { margin: 0; font-size: 14px; }

/* ===================== 动态条目 ===================== */
.feed-item {
  background: var(--bg);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.feed-item__content {
  font-size: 15px; line-height: 1.55; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.feed-item__voice { margin-top: 10px; }
.feed-item__voice .minivoice {
  background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: 13px; padding: 6px 14px; border-radius: 14px;
}
.feed-item__voice .minivoice--playing { background: var(--accent); color: #fff; }
.feed-item__meta { margin-top: 8px; font-size: 12px; color: var(--text-dim); }
/* 动态来源徽章：auto=自动发布（强调色）/ manual=手动发布（中性灰） */
.feed-reason {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 1px 8px; border-radius: 10px; vertical-align: middle;
}
.feed-reason--auto { color: var(--accent); background: var(--accent-soft); }
.feed-reason--manual { color: var(--text-dim); background: #f0f0f3; }
.feed-item--new { animation: feed-pop .35s ease; }
@keyframes feed-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ===================== 人设调整 ===================== */
/* 逐字段编辑表单 */
.persona-edit { display: flex; flex-direction: column; gap: 14px; }
.persona-edit__field { display: flex; flex-direction: column; gap: 6px; }
.persona-edit__label { font-size: 13px; font-weight: 700; color: var(--text-dim); }
.persona-edit__hint { font-size: 12px; color: var(--text-dim); opacity: .8; margin-top: -2px; }
.persona-edit__textarea { resize: vertical; min-height: 56px; line-height: 1.5; }
.persona-edit__actions {
  display: flex; gap: 10px; margin-top: 4px;
}
.persona-edit__actions .btn--sm { flex: 1 1 0; }
.persona-edit__actions #persona-reset { flex: 0 0 auto; }

/* 自然语言快捷区（折叠） */
.persona-quick {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.persona-quick__summary {
  list-style: none; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--accent);
  padding: 4px 0;
}
.persona-quick__summary::-webkit-details-marker { display: none; }
.persona-quick__summary::after { content: " ▾"; color: var(--text-dim); font-weight: 400; }
.persona-quick[open] .persona-quick__summary::after { content: " ▴"; }
.persona-quick .persona__hint { margin-top: 10px; }

.persona__hint { margin: 0 0 12px; font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.persona__form { display: flex; flex-direction: column; gap: 10px; }
.persona__input {
  width: 100%; resize: none;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 15px; background: var(--bg); outline: none;
}
.persona__input:focus { border-color: var(--accent); background: #fff; }
.persona__revert {
  margin-top: 12px;
  border: 1px solid var(--line); background: transparent;
  color: var(--text-dim); cursor: pointer;
  font-size: 13px; padding: 8px 14px; border-radius: 14px;
}
.persona__revert:active { transform: scale(.97); }
.persona__revert[disabled] { opacity: .5; }
.persona__result { margin-top: 16px; }
.persona__msg {
  font-size: 14px; font-weight: 600;
  padding: 10px 12px; border-radius: 12px;
}
.persona__msg--ok { color: #3f9e72; background: #e8f3ed; }
.persona__msg--warn { color: #b9722a; background: #fbf0e2; }

/* before -> after diff */
.persona__diff { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.diff-row {
  background: var(--bg); border-radius: 12px; padding: 10px 12px;
}
.diff-row__field { font-size: 12px; font-weight: 700; color: var(--text-dim); margin-bottom: 6px; }
.diff-line {
  font-size: 14px; line-height: 1.5; word-break: break-word;
  padding: 3px 8px; border-radius: 8px; margin: 2px 0;
}
.diff-line--del { color: #b04a47; background: #fbe9e8; text-decoration: line-through; }
.diff-line--add { color: #2e7d54; background: #e6f4ec; }
.diff-arrow { text-align: center; color: var(--text-dim); font-size: 13px; margin: 1px 0; }

/* ===================== 平台切换（对话源 / 语音源） ===================== */
.provider-group { margin-top: 14px; }
.provider-group:first-of-type { margin-top: 4px; }
.provider-group__title {
  font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px;
}
.provider-opts { display: flex; flex-direction: column; gap: 8px; }
.provider-opt {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); color: var(--text);
  font: inherit; font-size: 15px; cursor: pointer;
}
.provider-opt:active { transform: scale(.98); }
.provider-opt--active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.provider-opt__dot { font-size: 14px; line-height: 1; color: var(--accent); }
/* 切换提交中：禁止再点，给出忙态反馈 */
.provider-body--busy .provider-opt { pointer-events: none; opacity: .6; }

/* ===================== 用户画像（TA 记住的你） ===================== */
.sheet__bar--split .profile__subtitle {
  flex: 1 1 auto; min-width: 0;
  font-size: 13px; color: var(--text-dim); line-height: 1.4;
  display: flex; align-items: center;
}
.sheet__bar--split #profile-refresh { flex: 0 0 auto; width: auto; }

.profile-guide {
  font-size: 13px; line-height: 1.6; color: var(--text-dim);
  background: var(--accent-soft); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 16px;
}
.profile-guide b { color: var(--accent); font-weight: 700; }

.profile-sec { margin-bottom: 16px; }
.profile-sec__title {
  font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px;
}
.profile-sec__empty {
  font-size: 14px; color: var(--text-dim);
  background: var(--bg); border-radius: 12px; padding: 12px 14px;
}
.profile-name {
  display: inline-block;
  font-size: 18px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border-radius: 12px; padding: 8px 16px;
}
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-tag { font-size: 14px; padding: 6px 14px; border-radius: 14px; }
.profile-tag--like { color: #2e7d54; background: #e6f4ec; }
.profile-tag--dislike { color: #b04a47; background: #fbe9e8; }
.profile-notes { display: flex; flex-direction: column; gap: 8px; }
.profile-note {
  font-size: 14px; line-height: 1.55; color: var(--text);
  background: var(--bg); border-radius: 12px; padding: 10px 14px;
  word-break: break-word;
}

/* ===================== 个人主页（点头像进入：介绍 + ta 的动态流） ===================== */
.sheet__panel--home { max-height: 88vh; }

/* 头部：大头像 + 名字 + 一句话简介 */
/* 顶部背景图（主播配置）：铺在头部背后，渐变遮罩保证名字/头像可读 */
.home-banner {
  height: 160px; margin: -14px -18px 0;
  background-size: cover; background-position: center;
  border-radius: 0; cursor: pointer;
}
.home-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 16px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
/* 头部叠在背景图下沿：上提一截、加底色卡片感 */
.home-head--on-banner {
  margin-top: -34px; position: relative; z-index: 1;
  padding: 0 12px 16px;
}
.home-head--on-banner .home-avatar {
  border: 3px solid var(--surface);
}
.home-head--on-banner .home-name { text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }

/* 相册：详情图缩略图网格 */
.home-album {
  padding-top: 16px; margin-top: 4px;
  border-top: 1px solid var(--line);
}
.home-album__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px;
}
.home-album__cell {
  aspect-ratio: 1 / 1; border-radius: 10px; cursor: pointer;
  background-size: cover; background-position: center; background-color: var(--accent-soft);
}
.home-album__cell:active { transform: scale(.97); }
.home-avatar {
  flex: 0 0 auto;
  width: 68px; height: 68px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 30px;
  background: var(--accent);
  background-size: cover; background-position: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.home-avatar--img { color: transparent; }
.home-avatar--tap { cursor: pointer; }
.home-avatar--tap:active { transform: scale(.96); }
.home-id { flex: 1 1 auto; min-width: 0; }
.home-name {
  font-size: 20px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.home-oneliner {
  margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--text-dim);
  word-break: break-word;
}
.home-owner {
  margin-top: 6px; font-size: 13px; color: var(--text-dim); opacity: .85;
}

/* 介绍区 */
.home-intro { padding: 16px 0 4px; }
.home-sec { margin-bottom: 16px; }
.home-sec__title {
  font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px;
}
.home-sec__text {
  font-size: 15px; line-height: 1.6; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.home-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.home-tag {
  font-size: 14px; padding: 6px 14px; border-radius: 14px;
  color: var(--accent); background: var(--accent-soft);
}

/* 动态流 */
.home-feed {
  padding-top: 16px; margin-top: 4px;
  border-top: 1px solid var(--line);
}
.home-feed__title { margin-bottom: 12px; }
.home-feed__list { display: block; }
.home-feed__list .sheet-state { padding: 32px 16px; }

/* ===================== 设置 / 我的：行项目 ===================== */
.setgroup {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(31, 35, 48, .05);
  overflow: hidden;
  margin-bottom: 16px;
}
.setrow {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  border: none; background: transparent;
  text-align: left; cursor: pointer;
  font: inherit; color: var(--text);
}
.setrow + .setrow { border-top: 1px solid var(--line); }
.setrow:active { background: var(--accent-soft); }
.setrow--soon { cursor: default; }
.setrow--soon:active { background: transparent; }
.setrow__icon {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; border-radius: 10px;
  background: var(--accent-soft);
}
.setrow__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setrow__title { font-size: 15px; font-weight: 600; }
.setrow__sub { font-size: 12px; color: var(--text-dim); }
.setrow__right {
  flex: 0 0 auto; color: var(--text-dim);
  font-size: 18px; line-height: 1;
}
.setrow__badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 10px;
  background: #f0f0f4; color: var(--text-dim);
}
.setrow--soon .setrow__title { color: var(--text-dim); }

/* ===================== 动态 Tab：聚合时间线 ===================== */
.agg-timeline { display: flex; flex-direction: column; gap: 12px; }
/* 一条时间线卡：来源形象头部 + 复用的动态条 */
.agg-card {
  background: var(--card, #fff);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}
.agg-card__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.agg-card__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px; cursor: pointer;
  background-size: cover; background-position: center;
}
.agg-card__avatar--img { background-color: var(--accent-soft); }
.agg-card__name {
  font-size: 15px; font-weight: 700; color: var(--text); cursor: pointer;
}
.agg-card__name:active { opacity: .6; }
.agg-card__namecol { min-width: 0; flex: 1 1 auto; cursor: pointer; }
.agg-card__owner {
  margin-top: 2px; font-size: 12px; color: var(--text-dim); opacity: .8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 「来自 X 主播」可点链接态：点开主播资料页 */
.card__owner--link, .agg-card__owner--link, .home-owner--link {
  cursor: pointer; color: var(--accent); opacity: 1;
}
.card__owner--link:active, .agg-card__owner--link:active,
.home-owner--link:active { opacity: .6; }

/* 主播资料页（creator-sheet）：主播名 + 旗下公开形象列表 */
.creator-head { padding: 4px 0 14px; }
.creator-name { font-size: 20px; font-weight: 700; color: var(--text); }
.creator-sub { margin-top: 4px; font-size: 13px; color: var(--text-dim); }
.creator-clones { display: flex; flex-direction: column; gap: 10px; }
.creator-clone {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border: 1px solid var(--line, #eee); border-radius: 14px;
  background: var(--card-bg, #fff); cursor: pointer; text-align: left;
}
.creator-clone:active { opacity: .7; }
.creator-clone__avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 17px;
  background-size: cover; background-position: center;
}
.creator-clone__avatar--img { background-color: var(--accent-soft); }
.creator-clone__main { min-width: 0; flex: 1 1 auto; }
.creator-clone__name { font-size: 16px; font-weight: 600; color: var(--text); }
.creator-clone__line {
  margin-top: 2px; font-size: 13px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.creator-clone__chevron { flex: 0 0 auto; color: var(--text-dim); font-size: 22px; }
/* 卡内的动态条去掉自身底色/外边距，让来源卡作为容器统一视觉 */
.agg-card .feed-item {
  background: transparent; padding: 0; margin-bottom: 0;
}

/* ===================== 关于页 ===================== */
.about-hero {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 24px 0 12px;
}
.about-logo {
  width: 72px; height: 72px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; background: var(--accent-soft);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}
.about-title { font-size: 20px; font-weight: 700; }
.about-ver {
  font-size: 13px; color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.about-desc {
  font-size: 14px; line-height: 1.6; color: var(--text-dim);
  text-align: center; margin: 8px 16px 0;
}

/* ===================== 自动发动态（二级抽屉） ===================== */
.feedauto-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(31, 35, 48, .05);
  padding: 15px 16px; margin-bottom: 16px;
}
.feedauto-row__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.feedauto-row__title { font-size: 15px; font-weight: 600; }
.feedauto-row__sub { font-size: 12px; color: var(--text-dim); }

/* 开关 switch */
.switch {
  flex: 0 0 auto;
  width: 48px; height: 28px; border-radius: 999px;
  border: none; padding: 0; cursor: pointer;
  background: #d8d8e0; position: relative;
  transition: background .2s ease;
}
.switch--on { background: var(--accent); }
.switch__knob {
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.switch--on .switch__knob { transform: translateX(20px); }

.feedauto-grouptitle {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  margin: 4px 2px 10px;
}
.feedauto-cadence { display: flex; gap: 10px; margin-bottom: 12px; }
.cadence-opt {
  flex: 1 1 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 6px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; font: inherit; color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.cadence-opt:disabled { opacity: .5; cursor: default; }
.cadence-opt--on { border-color: var(--accent); background: var(--accent-soft); }
.cadence-opt__label { font-size: 15px; font-weight: 600; }
.cadence-opt__sub { font-size: 11px; color: var(--text-dim); text-align: center; }
.feedauto-tick { width: 100%; margin-top: 6px; }
.feedauto-note {
  font-size: 12px; line-height: 1.5; color: var(--text-dim);
  margin: 10px 2px 0;
}
.feedauto-disabled {
  font-size: 13px; line-height: 1.6; color: var(--text-dim);
  background: var(--accent-soft); border-radius: 14px;
  padding: 14px 16px;
}

/* ===================== 数据看板（二级抽屉） ===================== */
.dash-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 18px;
}
.dash-stat {
  background: var(--surface); border-radius: 16px;
  box-shadow: 0 2px 10px rgba(31, 35, 48, .05);
  padding: 16px 14px; text-align: center;
}
.dash-stat__num {
  font-size: 26px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.dash-stat__label { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.dash-sec { margin-bottom: 18px; }
.dash-sec__title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }

.dash-bar { margin-bottom: 12px; }
.dash-bar__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.dash-bar__label { font-size: 13px; font-weight: 600; }
.dash-bar__val { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.dash-bar__track {
  height: 10px; border-radius: 999px; background: #ececf0; overflow: hidden;
}
.dash-bar__fill {
  height: 100%; border-radius: 999px; background: var(--accent);
  min-width: 2px; transition: width .3s ease;
}
.dash-bar__fill--voice { background: #9333ea; }
.dash-bar__fill--text { background: #2563eb; }

.dash-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-count {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 12px;
  background: var(--surface); box-shadow: 0 1px 6px rgba(31, 35, 48, .05);
  font-size: 13px;
}
.dash-count__name { color: var(--text); }
.dash-count__n {
  font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.dash-empty { font-size: 13px; color: var(--text-dim); padding: 4px 2px; }

.dash-clones {
  background: var(--surface); border-radius: 16px;
  box-shadow: 0 2px 10px rgba(31, 35, 48, .05); overflow: hidden;
}
.dash-clone {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 16px;
}
.dash-clone + .dash-clone { border-top: 1px solid var(--line); }
.dash-clone__name { font-size: 14px; font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-clone__meta { font-size: 12px; color: var(--text-dim); flex: 0 0 auto;
  font-variant-numeric: tabular-nums; }

/* ===================== 个人主页：一键沉淀语料 ===================== */
.home-corpus { width: 100%; margin: 14px 0 4px; }

[hidden] { display: none !important; }
