/* ============================================================
   LoomRoom · panels.css
   专家配置 / 资料库 / 纪要 / 长期记忆 / 新会议
   ============================================================ */

/* ══════════════ 专家 ══════════════ */
.agents-body { display: flex; flex-direction: column; gap: 12px; }

.agent-list { display: flex; flex-direction: column; gap: 8px; }
.agent-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-soft);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.agent-item:hover { border-color: var(--line); background: var(--panel-2); }
.agent-item.on { border-color: var(--lamp-line); background: var(--lamp-soft); }
.ai-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-size: var(--fs-6);
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2)); border: 2px solid var(--line);
}
.agent-item[data-provider="ark"] .ai-avatar { border-color: rgba(30,111,255,.5); }
.agent-item[data-provider="deepseek"] .ai-avatar { border-color: rgba(122,140,255,.5); }
.agent-item[data-provider="minimax"] .ai-avatar { border-color: rgba(200,68,42,.5); }
.ai-main { min-width: 0; flex: 1; }
.ai-name { font-size: var(--fs-3); font-weight: 640; display: flex; align-items: center; gap: 6px; }
.ai-role { font-size: var(--fs-1); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-meta { display: flex; gap: 6px; margin-top: 3px; font-size: var(--fs-1); color: var(--faint); }
.ai-tag { padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); }
.ai-del { flex: none; }

.agent-form {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px; border-radius: var(--r);
  background: var(--panel-2); border: 1px solid var(--line);
}
.agent-form .field:first-child { margin-top: 0; }
.form-title { font-size: var(--fs-3); font-weight: 650; color: var(--text); display: flex; align-items: center; gap: 8px; }
.form-title .id { font-family: var(--mono); font-size: var(--fs-1); color: var(--faint); font-weight: 400; }
.persona-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ex-chip {
  font-size: var(--fs-1); padding: 3px 9px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.ex-chip:hover { color: var(--lamp); border-color: var(--lamp-line); }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.avatar-opt {
  width: 30px; height: 30px; border-radius: 8px; font-size: var(--fs-5);
  display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
}
.avatar-opt:hover { border-color: var(--lamp-line); }
.form-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }

/* ══════════════ 资料库 ══════════════ */
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-soft); cursor: pointer;
}
.kb-item:hover { background: var(--panel-2); }
.kb-item.on { border-color: var(--cool); background: rgba(156, 184, 174,.07); }
.kb-icon { font-size: var(--fs-5); }
.kb-main { flex: 1; min-width: 0; }
.kb-name { font-size: var(--fs-3); font-weight: 620; }
.kb-meta { font-size: var(--fs-1); color: var(--faint); }
.kb-detail { margin-top: 14px; }
.kb-detail-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: var(--fs-2); color: var(--muted); }
.doc-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px;
  border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line-soft);
  margin-bottom: 6px; font-size: var(--fs-2);
}
.doc-main { flex: 1; min-width: 0; }
.doc-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-meta { font-size: var(--fs-1); color: var(--faint); }

/* ══════════════ 长期记忆 ══════════════ */
.memory-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mem-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: var(--fs-2);
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
}
.mem-tab.on { color: var(--lamp); border-color: var(--lamp-line); background: var(--lamp-soft); }
.memory-list { display: flex; flex-direction: column; gap: 9px; }
.mem-item {
  display: flex; gap: 10px; padding: 11px 13px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-soft);
}
.mem-type {
  flex: none; font-size: var(--fs-1); padding: 1px 7px; border-radius: 999px; height: fit-content;
  border: 1px solid var(--line); color: var(--cool); background: rgba(156, 184, 174,.06);
}
.mem-type[data-t="preference"] { color: var(--lamp); background: var(--lamp-soft); border-color: var(--lamp-line); }
.mem-type[data-t="stance"] { color: var(--danger); background: var(--danger-soft); border-color: rgba(217, 113, 107, .32); }
.mem-body { flex: 1; min-width: 0; font-size: var(--fs-3); color: var(--text-2); line-height: 1.6; }
.mem-meta { font-size: var(--fs-1); color: var(--faint); margin-top: 4px; display: flex; gap: 8px; }
.imp { letter-spacing: 1px; color: var(--lamp); }
.empty-note { font-size: var(--fs-2); color: var(--faint); padding: 14px; text-align: center; }

/* ══════════════ 新会议：专家选择 ══════════════ */
/* 专家资料卡：头像 + 真名 + Title + 一句话简介（不是只露两个字的 chip） */
.nm-agent-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.nm-agent-tools .input { margin-bottom: 0; }
.nm-agent-domain { flex: 0 0 138px; max-width: 138px; }
@media (max-width: 720px) {
  .nm-agent-tools { flex-direction: column; align-items: stretch; }
  .nm-agent-domain { flex: none; max-width: none; }
}
.nm-agents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 720px) { .nm-agents { grid-template-columns: 1fr; } }
.nm-agent {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 10px;
  padding: 10px 12px; border-radius: 12px; font-size: var(--fs-2); text-align: left;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2);
}
.nm-agent .nm-emoji {
  width: 40px; height: 40px; display: grid; place-items: center;
  font-size: 24px; border-radius: 50%; background: var(--panel);
  border: 1px solid var(--hairline-strong);
}
.nm-agent-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nm-agent .nm-agent-name { font-size: var(--fs-3); font-weight: 600; line-height: 1.2; color: var(--text); }
.nm-agent .nm-agent-title { font-size: var(--fs-1); color: var(--lamp-strong); line-height: 1.25; }
.nm-agent .nm-agent-bio {
  font-size: var(--fs-1); color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 专家头像用真实肖像（没有肖像时才退回 emoji） */
.nm-agent .nm-agent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 26%;
  border: 1px solid var(--hairline-strong);
  flex: 0 0 auto;
}
/* 议题为空的行内报错：贴着输入框，别只在屏幕底部闪一下 */
.nm-error {
  margin: 6px 0 0;
  font-size: var(--fs-2);
  line-height: 1.45;
  color: var(--danger);
}
.nm-error[hidden] { display: none !important; }
.nm-agent.on { border-color: var(--lamp-line); background: var(--lamp-soft); color: var(--lamp); }
.nm-empty { font-size: var(--fs-2); color: var(--faint); }

/* ══════════════ 纪要 ══════════════ */
.minutes-body { font-size: var(--fs-4); }
@media (max-width: 900px) {
  .drawer { width: 100vw; }
}

/* ══════════════ P9：预期结果 + 收敛提示 ══════════════
 *
 * 设计意图：用户抱怨的是"不知道什么时候算聊完、聊完了不知道拿到了什么"。
 * 所以 ① 预期结果放在纪要**最上面**且视觉上是一个独立的"结论卡"，
 *      ② 会议进行中就常驻一行"离达成目标还差什么"，把不确定变成可读的缺口清单。
 */

.outcome-block {
  border: 1px solid rgba(76, 141, 255, 0.35);
  background: rgba(76, 141, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.outcome-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.outcome-head h3 { margin: 0; font-size: var(--fs-4); }
.outcome-cov {
  margin-left: auto;
  font-size: var(--fs-1);
  color: var(--muted, var(--muted));
  font-variant-numeric: tabular-nums;
}

.outcome-gap {
  font-size: var(--fs-2);
  line-height: 1.6;
  color: var(--warn);
  margin-bottom: 8px;
}

/* ══════════════ I3 引文（内外分栏 + 逐字校验状态）══════════════
   三种状态的颜色是产品语义，不是装饰：
   ✓ 绿 = 逐字命中；✗ 红 = 校验失败（必须是刺眼的，因为它意味着"这句没依据"）；
   … 灰 = 未校验（不许用绿色或中性色，否则用户会读成"没问题"）。 */
.citations-block .outcome-head { flex-wrap: wrap; }
.cit-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.cit-chip {
  font-size: var(--fs-1); padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--line-soft); color: var(--muted, #8a97a5);
  font-variant-numeric: tabular-nums;
}
.cit-chip.ok { color: #34b27b; border-color: rgba(52, 178, 123, .45); }
.cit-chip.bad { color: #e0524a; border-color: rgba(224, 82, 74, .45); }
.cit-chip.pending { color: #b08a3c; border-color: rgba(176, 138, 60, .45); }
.cit-verify { margin-left: 8px; }
.cit-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cit-col { min-width: 0; }
.cit-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cit-col-title { font-size: var(--fs-2); font-weight: 600; }
.cit-col-hint { font-size: var(--fs-1); color: var(--muted, #8a97a5); }
.cit-list { display: flex; flex-direction: column; gap: 8px; }
.cit-item {
  border: 1px solid var(--line-soft); border-left: 2px solid var(--line);
  border-radius: 4px; padding: 7px 9px; background: var(--panel);
}
.cit-item[data-v="1"] { border-left-color: #34b27b; }
.cit-item[data-v="0"] { border-left-color: #e0524a; }
.cit-item[data-v="-1"] { border-left-color: #b08a3c; }
.cit-claim { font-size: var(--fs-2); line-height: 1.6; color: var(--text-2, #cfd8e3); word-break: break-word; }
.cit-quote {
  font-size: var(--fs-2); line-height: 1.6; margin-top: 3px; color: var(--pale, #eaf7ff);
  border-left: 2px solid var(--line-soft); padding-left: 7px; word-break: break-word;
}
.cit-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; font-size: var(--fs-1); color: var(--muted, #8a97a5); }
.cit-url { color: #6fa8ff; text-decoration: none; word-break: break-all; }
.cit-url:hover { text-decoration: underline; }
.cit-doc { color: var(--pale, #eaf7ff); }
.cit-state.ok { color: #34b27b; }
.cit-state.bad { color: #e0524a; }
.cit-state.pending { color: #b08a3c; }
.cit-note { margin-top: 4px; font-size: var(--fs-1); line-height: 1.5; color: var(--muted, #8a97a5); word-break: break-word; }
.cit-empty { margin: 0; font-size: var(--fs-1); color: var(--muted, #8a97a5); }

@media (max-width: 760px) {
  .cit-cols { grid-template-columns: 1fr; }
}

/* 会议进行中的缺口提示：不抢戏，但一直在 */
.conv-hint {
  font-size: var(--fs-2);
  line-height: 1.7;
  color: var(--muted, var(--muted));
  border-left: 2px solid var(--line, var(--line));
  padding: 4px 0 4px 10px;
  margin-bottom: 12px;
}
.conv-hint.ready {
  color: #34b27b;
  border-left-color: #34b27b;
}
.conv-missing { margin: 4px 0 0; padding-left: 18px; }
.conv-missing li { margin: 1px 0; }

/* ══════════════ 会中「共享事实」抽屉（像 Zoom 聊天框的一条时间线）══════════════
   设计约束：① 它不打断发言，所以视觉上要比发言流"轻"；② 每条都要能删（贴错会污染 prompt）；
   ③ 窄屏（抽屉宽 min(520px,94vw)）里也要能读。 */
.facts-composer {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px; margin-bottom: 12px;
  background: var(--tint);
  border: 1px solid var(--line-soft); border-radius: var(--r);
}
.facts-actions { display: flex; align-items: center; gap: 8px; }
#facts-hint[data-over="1"] { color: var(--danger); }
.facts-feed { display: flex; flex-direction: column; gap: 8px; }
.board-item { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-3); line-height: 1.65; }
.board-item-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.board-item-text { white-space: pre-wrap; word-break: break-word; }
.present-offer {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 1200; display: flex; align-items: center; gap: 10px;
  max-width: min(720px, calc(100vw - 32px)); padding: 10px 14px;
  background: var(--panel); border: 1px solid var(--lamp);
  border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.present-offer-text { flex: 1; min-width: 0; font-size: var(--fs-3); line-height: 1.5; }
.practice-rows { display: grid; gap: 5px; margin-top: 8px; }
.practice-row { display: grid; grid-template-columns: 46px 30px 38px 64px 1fr; gap: 8px; align-items: center; font-size: var(--fs-2); }
.practice-row .up { color: var(--ok); }
.practice-row .down { color: var(--danger); }
.practice-row .flat { color: var(--muted); }
.practice-topic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ══════════════ 练习自评星级（I6/C1）══════════════
   设计约束：① 星星是 36px 的可点目标，键盘/触屏都能点；② 已记录态必须和未记录态一眼可分；
   ③ 一句话点评是可选输入，不撑高卡片；窄屏（444px 抽屉）自动换行不横向滚动。 */
.practice-rating .rating-stars { display: flex; align-items: center; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.rating-star {
  width: 36px; height: 36px; padding: 0; line-height: 1;
  font-size: var(--fs-7); color: var(--faint); background: transparent;
  border: 1px solid transparent; border-radius: var(--r-sm); cursor: pointer;
  transition: color .12s ease, transform .12s ease, border-color .12s ease;
}
.rating-star:hover:not(:disabled) { color: var(--lamp); transform: translateY(-1px); }
.rating-star:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.rating-star.on { color: var(--lamp); }
.rating-star:disabled { cursor: wait; opacity: .6; }
.rating-value { margin-left: 6px; font-size: var(--fs-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.rating-note-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.rating-note-input {
  flex: 1; min-width: 180px; padding: 7px 10px;
  color: var(--text); background: var(--tint);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: var(--fs-3);
}
.rating-note-input:focus-visible { outline: none; border-color: var(--lamp); box-shadow: 0 0 0 3px rgba(200,68,42, .18); }
.rating-save, .rating-skip {
  padding: 6px 12px; font-size: var(--fs-2); cursor: pointer;
  color: var(--text-2); background: transparent;
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.rating-save:hover, .rating-skip:hover { border-color: var(--lamp); color: var(--text); }
.practice-rating.recorded { border-left: 3px solid var(--ok); }
.rating-actions { margin-top: 8px; }
@media (max-width: 520px) {
  .rating-note-input { flex-basis: 100%; }
}

/* ══════════════ 练习四维能力画像（P2-17）══════════════
   设计约束：① 未测的维度必须一眼看出来（虚线框 + 「未测」），不能画成一条 0% 的空条；
   ② 分数、置信度、依据三件事都在这张卡里，不点开也知道样本量级；
   ③ 窄屏（444px 抽屉）里依据换行，不出现横向滚动。 */
.profile-block { margin-bottom: 10px; }
.profile-dims { display: grid; gap: 6px; margin-top: 8px; }
.profile-dim {
  display: grid;
  grid-template-columns: 52px minmax(80px, 1fr) 34px 52px auto;
  gap: 8px; align-items: center; font-size: var(--fs-2);
}
.profile-name { color: var(--text-2); font-weight: 600; }
.profile-bar { position: relative; height: 8px; border-radius: 999px; background: var(--tint); overflow: hidden; }
.profile-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--lamp), var(--user));
}
.profile-bar.empty {
  display: flex; align-items: center; justify-content: center;
  height: 18px; background: transparent; border: 1px dashed var(--line);
}
.profile-untested { font-size: var(--fs-1); color: var(--lamp); letter-spacing: .04em; }
.profile-score { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.profile-conf { color: var(--muted); font-size: var(--fs-1); }
.profile-dim.untested .profile-score,
.profile-dim.untested .profile-conf { color: var(--faint); }
.profile-basis summary { cursor: pointer; color: var(--muted); font-size: var(--fs-1); }
.profile-basis p { margin: 4px 0 0; color: var(--text-2); font-size: var(--fs-1); line-height: 1.6; }
@media (max-width: 520px) {
  .profile-dim { grid-template-columns: 46px 1fr 30px; }
  .profile-conf, .profile-basis { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .present-offer { flex-wrap: wrap; bottom: 12px; } .present-offer-text { flex-basis: 100%; } }
.board-item-src { margin-top: 4px; font-size: var(--fs-2); word-break: break-all; }
.facts-empty { text-align: center; padding: 28px 12px; color: var(--muted); font-size: var(--fs-3); line-height: 1.7; }
.facts-empty-icon { font-size: var(--fs-8); margin-bottom: 6px; opacity: .8; }
.facts-empty p { margin: 4px 0; }
.fact-item {
  position: relative; padding: 9px 34px 9px 11px;
  border: 1px solid var(--line-soft); border-left: 3px solid var(--line);
  border-radius: var(--r-sm); background: var(--tint);
  font-size: var(--fs-3); line-height: 1.65;
}
.fact-item.by-user { border-left-color: var(--lamp); background: rgba(200,68,42,.05); }
.fact-item.evidence { border-left-color: var(--user); }
.fact-item.material { border-left-color: #6bd6a0; }
.fact-head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-1); color: var(--muted); margin-bottom: 3px; flex-wrap: wrap; }
.fact-by { font-weight: 600; color: var(--text-2); }
.fact-by.me { color: var(--lamp); }
.fact-verdict { font-size: var(--fs-1); padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); }
.fact-verdict.ok { color: var(--ok); border-color: rgba(70,245,170,.45); background: rgba(70,245,170,.09); }
.fact-verdict.bad { color: var(--danger); border-color: rgba(255,77,109,.45); background: rgba(255,77,109,.09); }
.fact-verdict.muted { color: var(--muted); }
.fact-kind { font-size: var(--fs-1); color: #9fdcbb; }
.fact-time { margin-left: auto; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.fact-text { color: var(--text); word-break: break-word; }
.fact-src { margin-top: 5px; font-size: var(--fs-1); }
.fact-src a { color: #9dc0ff; text-decoration: none; word-break: break-all; }
.fact-src a:hover { text-decoration: underline; }
.fact-quote { margin-top: 4px; color: var(--muted); font-size: var(--fs-1); }
.fact-warn { margin-top: 5px; font-size: var(--fs-1); color: var(--lamp); }
.fact-del {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 6px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--faint);
  font-size: var(--fs-2); line-height: 1;
}
.fact-del:hover, .fact-del:focus-visible { color: var(--danger); background: rgba(255,77,109,.12); border-color: rgba(255,77,109,.35); outline: none; }
@media (max-width: 460px) {
  .fact-time { margin-left: 0; }
}
/* 顶栏「事实」有内容时给个暖色提示（不要做成常驻红点，那会让用户学会忽略它） */
.head-actions #btn-facts.has-facts { color: var(--lamp); border-color: rgba(200,68,42,.34); }
/* 触控目标 ≥44px（新加的控件不再重复"34px 手指点不中"的老问题） */
.facts-actions .ghost-btn, .facts-actions .primary-btn { min-height: 44px; }
.facts-textarea { min-height: 74px; }

/* 专家列表的小头像：复用真实肖像（圆形、和面板行高对齐） */
.ai-avatar .ai-avatar-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 26%;
  display: block;
}

/* ══════════════ v5 新会议浮层：一句话 + 推荐专家 + 折叠 ══════════════ */
/*
 * 本浮层单独加深遮罩：首页那颗实心蓝「开始会议」在通用 --scrim（0.55）下仍很抢眼，
 * 和浮层主按钮形成两条蓝条。只作用于 #newmeeting-overlay，澄清/资料/设置不受影响。
 */
#newmeeting-overlay {
  background-color: rgba(15, 20, 26, .70);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.nm-card { width: min(640px, 100%); }
/* 滚动区底部留白：推荐理由贴近页脚时能被完整滚出来，不被卡片底边裁成半行 */
#newmeeting-overlay .nm-scroll { padding-bottom: 12px; scroll-padding-bottom: 12px; }
.nm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.nm-head-main { min-width: 0; }
/* 44×44：窄屏/触屏也能点中；视觉上比标题低半行，不把标题挤走 */
.nm-close {
  flex: 0 0 44px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  margin: -6px -6px 0 0; padding: 0;
  border: 1px solid var(--line-soft); border-radius: 50%;
  background: var(--panel-2); color: var(--muted);
  font: inherit; font-size: 20px; line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.nm-close:hover { background: var(--panel-3); border-color: var(--line-strong, var(--line)); color: var(--text); }
.nm-sub { margin: 4px 0 0; font-size: var(--fs-2); color: var(--muted); line-height: 1.6; }
/* 首屏摘要行：已配好谁 + 更多设置（把 7 组选项收进抽屉） */
.nm-quick { display: flex; align-items: center; gap: 10px; margin-top: 10px; min-height: 28px; }
.nm-quick-people { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-1); color: var(--muted); }
#nm-more { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-soft); }
.nm-topic .textarea {
  font-size: var(--fs-5); line-height: 1.6; min-height: 76px;
  padding: 12px 14px; border-radius: var(--r);
}
.nm-scenario-row { margin-top: 12px; }
.nm-seats { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.nm-seats-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.link-btn {
  border: 0; background: transparent; color: var(--lamp-text, var(--lamp-strong));
  font-size: var(--fs-2); padding: 2px 4px; border-radius: 4px; cursor: pointer;
}
.link-btn:hover { background: var(--lamp-soft); }
.nm-selected { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.nm-selected-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 4px 3px 3px; border: 1px solid var(--line-soft); border-radius: 999px;
  background: var(--panel-2); font-size: var(--fs-2); color: var(--text);
}
.nm-selected-name { max-width: 8ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 已选专家 chip：头像是 24px 徽标，不是整张肖像墙；缺这条会把原图 naturalWidth 顶满弹层 */
.nm-selected-chip .nm-agent-avatar,
.nm-selected-chip img {
  width: 24px; height: 24px; max-width: 24px; max-height: 24px;
  flex: 0 0 24px; border-radius: 50%; object-fit: cover; object-position: 50% 26%;
}
.nm-selected-chip .nm-emoji { width: 24px; height: 24px; font-size: 14px; }
.nm-selected-x {
  border: 0; background: transparent; color: var(--muted);
  font-size: var(--fs-4); line-height: 1; padding: 2px 5px; border-radius: 50%; cursor: pointer;
}
.nm-selected-x:hover { color: var(--danger); background: var(--danger-soft); }
.nm-agent-panel { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-soft); }
.nm-agent-panel .input { margin-bottom: 8px; }
.nm-card details { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.nm-card summary {
  cursor: pointer; font-size: var(--fs-2); color: var(--text-2); list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.nm-card summary::-webkit-details-marker { display: none; }
.nm-card summary::after { content: '+'; color: var(--muted); font-size: var(--fs-4); }
.nm-card details[open] summary::after { content: '−'; }
.nm-card details .field { margin-top: 12px; }
.nm-focus-warning {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 8px; padding: 8px 10px;
  border: 1px solid rgba(169,55,34, .35);
  border-radius: 7px;
  background: rgba(169,55,34, .10);
  color: #f0c395; font-size: var(--fs-1); line-height: 1.5;
}
.nm-focus-warning[hidden] { display: none; }
.nm-focus-warning button {
  margin-left: auto; padding: 3px 8px;
  border: 1px solid rgba(169,55,34, .45);
  border-radius: 5px;
  background: rgba(169,55,34, .14);
  color: #f0c395; font-size: var(--fs-1); cursor: pointer;
}
.nm-focus-warning button:hover { background: rgba(169,55,34, .22); }
.nm-foot { margin-top: 18px; gap: 8px; }
.nm-foot .primary-btn { min-width: 132px; }
@media (max-width: 560px) {
  .nm-foot { flex-wrap: wrap; }
  .nm-foot .primary-btn { flex: 1 1 100%; }
}

.nm-brief-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.nm-brief-cell { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-1); color: var(--muted); }
.nm-brief-cell .input { font-size: var(--fs-3); padding: 7px 9px; }
@media (max-width: 560px) { .nm-brief-grid { grid-template-columns: 1fr; } }

/* ══════════════ 决策卡（P0-1） ══════════════ */
.decision-cards { border: 1px solid var(--line-soft); border-radius: var(--r); padding: 12px 14px; }
.dc-card { border-top: 1px dashed var(--line-soft); padding: 10px 0; }
.dc-card:first-of-type { border-top: 0; }
.dc-q { font-size: var(--fs-4); font-weight: 600; margin-bottom: 8px; color: var(--text); }
.dc-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-opt {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2);
  border-radius: 999px; padding: 6px 14px; font-size: var(--fs-3); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.dc-opt:hover { border-color: var(--lamp-line); color: var(--text); }
.dc-opt.on { background: var(--lamp-soft); border-color: var(--lamp); color: var(--lamp); font-weight: 600; }
.dc-meta { margin-top: 8px; font-size: var(--fs-2); color: var(--muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dc-meta { margin-top: 8px; font-size: var(--fs-2); color: var(--muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dc-done { color: var(--ok); }

/* ── 决策卡 v2：12 字段编辑（I1 / P0-2） ── */
.dc-q { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dc-qtext { flex: 1 1 240px; }
.dc-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.dc-badge {
  font-size: var(--fs-1); font-weight: 500; line-height: 1.6; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--line-soft); color: var(--muted); background: var(--panel-2); white-space: nowrap;
}
.dc-badge.ok { color: var(--ok); border-color: currentColor; }
.dc-badge.warn { color: var(--warn, #c8860d); border-color: currentColor; }
.dc-badge.st { color: var(--text-2); }
.dc-flip {
  margin-top: 8px; font-size: var(--fs-2); color: var(--text-2);
  border-left: 2px solid var(--lamp-line); padding-left: 8px;
}
.dc-edit { margin-top: 10px; }
.dc-edit > summary {
  cursor: pointer; font-size: var(--fs-2); color: var(--muted); padding: 4px 0;
  list-style: none;
}
.dc-edit > summary::-webkit-details-marker { display: none; }
.dc-edit > summary::before { content: '▸ '; }
.dc-edit[open] > summary::before { content: '▾ '; }
.dc-edit > summary:hover { color: var(--text-2); }
.dc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px; margin: 10px 0;
}
.dc-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-2); color: var(--muted); }
.dc-field-k { font-weight: 500; }
.dc-field-h { font-size: var(--fs-1); color: var(--muted); opacity: .8; }
.dc-input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: var(--fs-3); padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); color: var(--text);
}
.dc-input:focus { outline: none; border-color: var(--lamp); box-shadow: 0 0 0 2px var(--lamp-soft); }
.dc-input.sm { max-width: 110px; }
.dc-input.xs { max-width: 82px; }
textarea.dc-input { resize: vertical; }
.dc-sub {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: var(--fs-2); color: var(--muted); margin: 10px 0 6px;
}
.dc-crit-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.dc-crit-row .dc-input:first-child { flex: 1 1 180px; }
.dc-empty { font-size: var(--fs-2); color: var(--muted); margin: 4px 0 8px; }
.dc-weights { font-size: var(--fs-1); color: var(--warn, #c8860d); margin: 4px 0 0; }
.dc-weights.ok { color: var(--ok); }
.dc-score { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: var(--fs-2); }
.dc-score th, .dc-score td { border: 1px solid var(--line-soft); padding: 4px 6px; text-align: center; }
.dc-score th { color: var(--muted); font-weight: 500; }
.dc-score td:first-child, .dc-score th:first-child { text-align: left; }
.dc-result { font-size: var(--fs-2); color: var(--text-2); margin: 6px 0; }
.dc-actions { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; }
.dc-mini {
  font: inherit; font-size: var(--fs-2); padding: 4px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text-2);
}
.dc-mini:hover { border-color: var(--lamp-line); color: var(--text); }
.dc-mini.danger { color: var(--danger, #c0392b); border-color: currentColor; }
.dc-save { font-size: var(--fs-1); color: var(--muted); margin-top: 6px; display: inline-block; }
.dc-save.err { color: var(--danger, #c0392b); }

/* ── 行动项 + 真 DLR（P0-3） ── */
.actions-block { border: 1px solid var(--line-soft); border-radius: var(--r); padding: 12px 14px; margin-top: 12px; }
.action-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 0; border-top: 1px dashed var(--line-soft); font-size: var(--fs-3);
}
.action-row:first-of-type { border-top: 0; }
.action-check { width: 16px; height: 16px; accent-color: var(--ok); cursor: pointer; flex: none; }
.action-text { flex: 1 1 220px; color: var(--text); }
.action-row.done .action-text { text-decoration: line-through; color: var(--muted); }
.action-row.dropped .action-text { color: var(--muted); opacity: .7; }
.action-row.overdue .action-text { color: var(--danger, #c0392b); }
.action-badge {
  font-size: var(--fs-1); padding: 0 6px; border-radius: 999px;
  border: 1px solid var(--line-soft); color: var(--muted);
}
.action-when { font-size: var(--fs-1); color: var(--muted); }
.action-add { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.action-add .dc-input { flex: 1 1 220px; }
.action-add .dc-input.sm { flex: none; max-width: 110px; }

@media (max-width: 560px) {
  .dc-grid { grid-template-columns: 1fr; }
  .action-row { gap: 6px; }
  .action-text { flex: 1 1 100%; }
}

/* ══════════════ B1：首屏结论卡（一屏式结论） ══════════════
 *
 * I0 盲评里「简洁 7.8 vs 8.2」输给一次直答：打开产出页先看到三屏 markdown，
 * 而主持人综合答案藏在抽屉最里面。这张卡把它压到 ≤200 字放在第一屏，
 * 长文原样折叠进「完整纪要」——所以它在视觉上要比 .outcome-block 更"重"
 * （实底 + 左侧灯条 + 更大的正文），因为它就是这一页的主角。 */
.provisional-page {
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--panel-2, transparent);
}
.provisional-page .conclusion-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.provisional-page .md-body { max-height: 46vh; overflow: auto; }
.actions-empty {
  padding: 10px 12px;
  border-radius: 4px;
  border-left: 2px solid var(--line);
  background: var(--tint, rgba(0, 0, 0, .03));
}
.actions-empty p { margin: 0 0 4px; font-size: var(--fs-2); }
.actions-empty .hint-line { margin: 0; font-size: var(--fs-1); }
.conclusion-card.is-empty {
  border-left-color: var(--line);
  background: var(--panel-2, transparent);
}
.conclusion-card.is-empty .conclusion-text { color: var(--muted); }
.conclusion-foot { display: flex; gap: 8px; margin-top: 10px; }
.conclusion-card {
  border: 1px solid var(--lamp-line);
  border-left: 3px solid var(--lamp);
  background: var(--lamp-soft);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.conclusion-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
/* 结论卡在 #minutes-body.md-body 里面，所以选择器要压过 .md-body h3 / .md-body p（否则标题还是灰的 14px） */
.conclusion-card .conclusion-head h3 { margin: 0; font-size: var(--fs-4); color: var(--text); }
.conclusion-src { font-size: var(--fs-1); color: var(--muted); }
.conclusion-head .ghost-btn { margin-left: auto; }
.conclusion-card .conclusion-text {
  margin: 10px 0 0;
  font-size: var(--fs-4); line-height: 1.7; color: var(--text);
  word-break: break-word;
}
/* 被摘录时必须能看见"这不是全文"，所以它是一行正文而不是脚注小灰字 */
.conclusion-card .conclusion-note {
  margin: 6px 0 0; font-size: var(--fs-2); color: var(--muted);
  border-left: 2px solid var(--line); padding-left: 8px;
}
.conclusion-k { font-size: var(--fs-1); color: var(--muted); }
.conclusion-todos,
.conclusion-numbers { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
/* 「你能立刻做的 3 件事」做成一行 chips：<3 条时就是 2 个 chip，不硬凑 */
.conclusion-todo {
  font-size: var(--fs-2); line-height: 1.5; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--lamp-line); background: var(--panel-2); color: var(--text-2);
}
.conclusion-todo.done { color: var(--muted); text-decoration: line-through; }
.conclusion-none { margin: 10px 0 0; font-size: var(--fs-2); color: var(--muted); }
.conclusion-num { display: inline-flex; align-items: baseline; gap: 4px; font-size: var(--fs-2); color: var(--text-2); }
.conclusion-num b { color: var(--lamp); font-variant-numeric: tabular-nums; }
.conclusion-num i { font-style: normal; color: var(--muted); font-size: var(--fs-1); }
.conclusion-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.conclusion-hint { font-size: var(--fs-1); color: var(--muted); }
/* 折叠区只负责分隔：结论卡与完整纪要之间不要套第二层边框 */
#minutes-full { margin-top: 4px; }
#minutes-full > .outcome-block:first-child { margin-top: 0; }

/* ══════════════ B3：决策卡引导条 / 缺什么可点 / 0 卡空态 ══════════════ */
/* 引导条只在有未及格卡片时出现：说清"还缺什么、要多久"，并给一个「去补」 */
.dc-guide {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 8px 10px; border-radius: var(--r-sm, 6px);
  border: 1px dashed var(--lamp-line); background: var(--lamp-soft);
  font-size: var(--fs-2); color: var(--text-2);
}
.dc-guide-text { flex: 1 1 240px; line-height: 1.55; }
.dc-guide-go { border-color: var(--lamp-line); color: var(--lamp); }
/* 徽标变成按钮：仍然是同一个胶囊，但可点、有悬停反馈（键盘靠全局 :focus-visible） */
.dc-badge.dc-gap-btn {
  cursor: pointer; font-family: inherit; font-weight: 500;
  background: var(--panel-2); color: var(--warn);
}
.dc-badge.dc-gap-btn:hover { border-color: currentColor; color: var(--text); }
.dc-card.unfilled .dc-qtext { color: var(--text-2); }
.dc-empty-state { margin: 6px 0 0; font-size: var(--fs-3); color: var(--text-2); }
/* 窄屏下引导条与 chips 竖排，不挤成两行半 */
@media (max-width: 560px) {
  .conclusion-head .ghost-btn { margin-left: 0; }
  .dc-guide-text { flex: 1 1 100%; }
}

/* ══════════════ B2：产出页顶部的数字溯源摘要 ══════════════ */
.number-trace {
  border: 1px solid rgba(200,68,42, .34);
  background: rgba(200,68,42, .07);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.number-trace .nt-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--fs-3);
}
.number-trace .nt-line b { font-size: var(--fs-3); }
.nt-src { color: var(--ok, var(--muted)); }
.nt-uns { color: var(--warn, var(--muted)); font-weight: 600; }
.nt-ok { color: var(--muted); }
.nt-jump {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--hairline-strong, rgba(23,20,15,.16));
  border-radius: 999px;
  color: var(--text-2, inherit);
  font-size: var(--fs-1);
  padding: 2px 10px;
  cursor: pointer;
}
.nt-jump:hover { border-color: var(--lamp, #ffd479); color: var(--lamp, #ffd479); }


/* 首屏时长：用户只需要回答“愿意花多久”，不需要懂“几轮”。 */
.nm-time-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 12px 0 2px;
}
.nm-time-label { flex: none; font-size: var(--fs-1); color: var(--muted); margin-right: 2px; }
.nm-time-chip {
  height: 30px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--text-2); font-size: var(--fs-2); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.nm-time-chip:hover { border-color: var(--line-strong); color: var(--text); }
.nm-time-chip.on {
  border-color: var(--lamp-line); background: var(--lamp-soft); color: var(--lamp-text, var(--lamp-strong));
  font-weight: 600;
}
.nm-time-hint { flex: 1 1 180px; min-width: 140px; font-size: var(--fs-1); color: var(--faint); }

/*
 * 窄屏：4 个时长 chip 必须等宽同行。
 * 之前 flex-wrap 在 390 宽下把「45 分钟」单独挤到下一行，旁边还挂着说明文字；
 * 改成 grid 后标签/说明各占整行，chip 始终 4 列。≤360 放不下 4 列就退成 2×2。
 */
@media (max-width: 640px) {
  .nm-time-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    margin-top: 10px;
  }
  .nm-time-label,
  .nm-time-hint { grid-column: 1 / -1; min-width: 0; }
  .nm-time-label { margin-right: 0; }
  .nm-time-chip {
    width: 100%; height: 42px; min-height: 42px;
    padding: 0 4px; white-space: nowrap;
    font-size: var(--fs-2);
  }
  .nm-time-hint { margin-top: 2px; line-height: 1.5; }
  /*
   * 推荐理由在 390 宽下会被拉到 5–6 行，展开「更多设置」时贴着滚动区底边只剩两行。
   * 窄屏固定最多 3 行并给省略号（完整文本仍在 DOM 里，读屏可读）；底部留白见 .nm-scroll。
   */
  #nm-rec-hint {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    line-height: 1.6;
    min-height: calc(1.6em * 3);
    max-height: calc(1.6em * 3);
  }
}
@media (max-width: 360px) {
  .nm-time-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}



/* ══════════════════════════════════════════════════════════════════════════
 * M3 · 设置 / 新会议 / 登录：一屏一目的
 * 只做视觉与信息层级；选择器全部收在 .settings-pane / #newmeeting-overlay /
 * #auth-gate 内，避免影响其它抽屉与弹层。
 * ══════════════════════════════════════════════════════════════════════════ */

/* ── 设置控制面板 ─────────────────────────────────────────────────────── */
.settings-pane {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  color: var(--text);
}

.settings-pane .set-state {
  min-height: 20px;
  margin: 0 0 4px;
  padding: 0 2px;
  font-family: var(--font-ui);
  font-size: var(--fs-1);
  line-height: 20px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-pane .set-group {
  margin: 0;
  padding: 8px 2px 2px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}
.settings-pane .set-group:first-of-type { border-top: 0; }
.settings-pane .set-group-head { margin: 0 0 2px; }

.settings-pane .set-title {
  margin: 0;
  font-size: var(--fs-3);
  font-weight: 600;
  line-height: 20px;
  color: var(--text);
}
.settings-pane .set-desc {
  margin: 2px 0 0;
  font-size: var(--fs-2);
  line-height: 18px;
  color: var(--muted);
}

.settings-pane .set-row,
.settings-pane .switch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  min-height: 52px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  font-size: var(--fs-3);
  line-height: 20px;
  color: var(--text);
}
.settings-pane .switch-row { cursor: pointer; }
.settings-pane .set-row-text {
  display: flex;
  flex: 1 1 160px;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.settings-pane .set-k {
  width: auto;
  font-size: var(--fs-3);
  font-weight: 500;
  line-height: 20px;
  color: var(--text);
}
.settings-pane .set-result {
  display: block;
  max-width: 100%;
  font-size: var(--fs-2);
  line-height: 18px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-pane .set-result-wide { padding: 0 0 4px; }
.settings-pane .set-note {
  margin: 0 0 6px;
  font-size: var(--fs-2);
  line-height: 18px;
  color: var(--muted);
}

/* 40×24 开关：直接用 checkbox 本体画，保留原生事件与可访问性 */
.settings-pane input[type="checkbox"].set-switch {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 24px;
  margin: 0 2px 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-3);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.settings-pane input[type="checkbox"].set-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.settings-pane input[type="checkbox"].set-switch:checked {
  border-color: var(--lamp);
  background: var(--lamp);
}
.settings-pane input[type="checkbox"].set-switch:checked::after {
  background: var(--lamp-ink);
  transform: translateX(16px);
}
.settings-pane input[type="checkbox"].set-switch:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 2px;
}

/* 分段控件：pill，选项 40 高；窄屏内部横向滚动，不把行撑破 */
.settings-pane .seg {
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  gap: 2px;
  max-width: 100%;
  min-width: 0;
  padding: 2px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--panel-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.settings-pane .seg::-webkit-scrollbar { display: none; }
.settings-pane .set-row .seg { flex-wrap: nowrap; padding: 2px; }
.settings-pane .seg-btn {
  flex: 0 0 auto;
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-2);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: none;
}
.settings-pane .seg-btn:hover {
  background: var(--panel-3);
  color: var(--text);
}
.settings-pane .seg-btn.active,
.settings-pane .seg-btn.on,
.settings-pane .seg-btn[aria-pressed="true"] {
  border: 0;
  background: var(--lamp-strong);
  color: var(--lamp-ink);
  font-weight: 600;
  box-shadow: none;
}

.settings-pane .set-adv {
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
}
.settings-pane .set-adv > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 2px;
  list-style: none;
  cursor: pointer;
  font-size: var(--fs-2);
  font-weight: 500;
  color: var(--text-2);
}
.settings-pane .set-adv > summary::-webkit-details-marker { display: none; }
.settings-pane .set-adv > summary::after {
  content: "+";
  color: var(--muted);
  font-size: var(--fs-4);
  line-height: 1;
}
.settings-pane .set-adv[open] > summary::after { content: "−"; }
.settings-pane .set-adv-body { padding: 0 0 2px; }
.settings-pane .set-adv-body .set-row { border-top: 1px solid var(--line-soft); }
.settings-pane .set-adv-body .set-row:first-child { border-top: 0; }

/* 面板里的高优先级覆盖：压过 shell.css 的 data-v5mode 规则 */
body[data-v5mode="2"] #v5-panel .settings-pane .set-title,
body[data-v5mode="2"] #v5-panel .settings-pane .set-desc,
body[data-v5mode="2"] #v5-panel .settings-pane .set-state {
  margin-left: 0;
  margin-right: 0;
  letter-spacing: 0;
}
body[data-v5mode="2"] #v5-panel .settings-pane .set-title {
  margin-top: 0;
  margin-bottom: 0;
  font-size: var(--fs-3);
  font-weight: 600;
  line-height: 20px;
}
body[data-v5mode="2"] #v5-panel .settings-pane .set-desc {
  margin-top: 2px;
  margin-bottom: 0;
  font-size: var(--fs-2);
  line-height: 18px;
}
body[data-v5mode="2"] #v5-panel .settings-pane .set-state {
  margin-top: 0;
  margin-bottom: 4px;
  padding: 0 2px;
  font-size: var(--fs-1);
}
body[data-v5mode="2"] #v5-panel .settings-pane .set-row,
body[data-v5mode="2"] #v5-panel .settings-pane .switch-row {
  align-items: center;
  min-height: 52px;
  margin: 0;
  padding: 4px 0;
  gap: 8px 14px;
  font-size: var(--fs-3);
  line-height: 20px;
}
body[data-v5mode="2"] #v5-panel .settings-pane .switch-row input[type="checkbox"].set-switch {
  margin: 0 2px 0 0;
}
body[data-v5mode="2"] #v5-panel .settings-pane .set-k {
  width: auto;
  font-size: var(--fs-3);
  color: var(--text);
}
body[data-v5mode="2"] #v5-panel .settings-pane .seg {
  padding: 2px;
  border-radius: 999px;
  border-color: var(--line-soft);
  background: var(--panel-2);
}
body[data-v5mode="2"] #v5-panel .settings-pane .seg-btn {
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-2);
  font-weight: 500;
  white-space: nowrap;
}
body[data-v5mode="2"] #v5-panel .settings-pane .seg-btn.active,
body[data-v5mode="2"] #v5-panel .settings-pane .seg-btn.on,
body[data-v5mode="2"] #v5-panel .settings-pane .seg-btn[aria-pressed="true"] {
  background: var(--lamp-strong);
  color: var(--lamp-ink);
}

/* 账号区由 auth-gate.js 挂到同一个设置 host，和上面的行保持同一套字号/控件高度 */
#v5-panel #set-account,
#panel-settings #set-account {
  padding: 8px 2px 2px;
  border-top: 1px solid var(--line-soft);
}
#v5-panel #set-account .set-title,
#panel-settings #set-account .set-title {
  margin: 0 0 2px;
  font-size: var(--fs-3);
  font-weight: 600;
  line-height: 20px;
}
#v5-panel #set-account .set-desc,
#panel-settings #set-account .set-desc {
  margin: 2px 0 6px;
  font-size: var(--fs-2);
  line-height: 18px;
  color: var(--muted);
}
#v5-panel #set-account .ghost-btn,
#v5-panel #set-account .primary-btn,
#panel-settings #set-account .ghost-btn,
#panel-settings #set-account .primary-btn {
  min-height: 40px;
  border-radius: 999px;
}
#v5-panel #set-account .stack-form,
#panel-settings #set-account .stack-form {
  gap: 8px;
  margin-top: 8px;
}
#v5-panel #set-account .input,
#panel-settings #set-account .input { min-height: 40px; }

@media (max-width: 640px) {
  .settings-pane .set-row,
  .settings-pane .switch-row,
  body[data-v5mode="2"] #v5-panel .settings-pane .set-row,
  body[data-v5mode="2"] #v5-panel .settings-pane .switch-row {
    align-items: flex-start;
    padding: 8px 0;
  }
  .settings-pane .set-row-text { flex-basis: 100%; }
  .settings-pane .switch-row { flex-wrap: nowrap; }
  .settings-pane .switch-row .set-row-text { flex: 1 1 auto; flex-basis: auto; }
  .settings-pane .seg { width: 100%; }
  .settings-pane .seg-btn { flex: 1 1 auto; }
}

/* ── 登录浮层 ─────────────────────────────────────────────────────────── */
#auth-gate.overlay {
  padding: 16px;
  padding-top: min(calc(var(--header-h, 72px) + 12px), 30dvh);
}
#auth-gate .modal-card.small {
  width: min(400px, 100%);
  max-width: 400px;
  max-height: calc(100dvh - 32px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
#auth-gate #auth-login-title {
  margin: 0;
  font-size: var(--fs-6);
  font-weight: 600;
  line-height: 26px;
  color: var(--text);
}
#auth-gate .hint-line {
  margin: 6px 0 0;
  font-size: var(--fs-2);
  line-height: 18px;
  color: var(--muted);
}
#auth-gate .stack-form {
  gap: 12px;
  margin-top: 18px;
}
#auth-gate .input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  font-size: var(--fs-4);
}
#auth-gate .input:focus {
  border-color: var(--lamp);
  box-shadow: 0 0 0 1px var(--lamp);
}
#auth-gate .primary-btn {
  width: 100%;
  height: 48px;
  min-height: 48px;
  border-radius: 999px;
  font-size: var(--fs-4);
  font-weight: 600;
}
#auth-gate .auth-error { font-size: var(--fs-2); }

@media (max-width: 640px) {
  #auth-gate.overlay {
    padding: 16px;
    padding-top: min(calc(var(--header-h, 72px) + 12px), 30dvh);
  }
  #auth-gate .modal-card.small {
    width: 100%;
    padding: 22px;
    border-radius: 28px;
  }
}

/* ── 新会议 ───────────────────────────────────────────────────────────── */
#newmeeting-overlay .nm-card {
  width: min(640px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
}
#newmeeting-overlay .nm-head { margin-bottom: 14px; }
#newmeeting-overlay #newmeeting-title {
  margin: 0;
  font-size: var(--fs-6);
  font-weight: 600;
  line-height: 26px;
  color: var(--text);
}
#newmeeting-overlay .nm-sub {
  margin: 2px 0 0;
  font-size: var(--fs-2);
  line-height: 18px;
  color: var(--muted);
}
#newmeeting-overlay .nm-close {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: -2px -2px 0 0;
  border-color: transparent;
  background: transparent;
  font-size: var(--fs-6);
}
#newmeeting-overlay .nm-close:hover { background: var(--panel-2); border-color: var(--line-soft); }

#newmeeting-overlay .nm-topic { display: block; margin: 0; }
#newmeeting-overlay .nm-topic .textarea {
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  font-size: var(--fs-4);
  line-height: 1.5;
}
#newmeeting-overlay .nm-topic .textarea:focus {
  border-color: var(--lamp);
  box-shadow: 0 0 0 1px var(--lamp);
}

#newmeeting-overlay .nm-quick {
  min-height: 18px;
  margin-top: 8px;
  gap: 8px;
}
#newmeeting-overlay .nm-quick-people {
  font-size: var(--fs-1);
  line-height: 18px;
  color: var(--muted);
}

#newmeeting-overlay #nm-time-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
}
#newmeeting-overlay .nm-time-label {
  flex: none;
  margin: 0 2px 0 0;
  font-size: var(--fs-2);
  line-height: 20px;
  color: var(--muted);
}
#newmeeting-overlay .nm-time-chip {
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-2);
  font-size: var(--fs-2);
  font-weight: 500;
  white-space: nowrap;
}
#newmeeting-overlay .nm-time-chip:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
}
#newmeeting-overlay .nm-time-chip.on,
#newmeeting-overlay .nm-time-chip[aria-pressed="true"] {
  border-color: var(--lamp-line);
  background: var(--lamp-soft);
  color: var(--lamp-text);
}
#newmeeting-overlay .nm-time-more {
  height: 40px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--lamp-text);
  font-size: var(--fs-2);
  font-weight: 500;
  cursor: pointer;
}
#newmeeting-overlay .nm-time-more:hover { background: var(--lamp-soft); }
#newmeeting-overlay .nm-time-extra {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
#newmeeting-overlay .nm-time-extra[hidden] { display: none; }

#newmeeting-overlay #nm-scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}
#newmeeting-overlay #nm-scenarios .seg-btn {
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-2);
  font-size: var(--fs-2);
  font-weight: 500;
}
#newmeeting-overlay #nm-scenarios .seg-btn.active,
#newmeeting-overlay #nm-scenarios .seg-btn.on,
#newmeeting-overlay #nm-scenarios .seg-btn[aria-pressed="true"] {
  border-color: var(--lamp-line);
  background: var(--lamp-soft);
  color: var(--lamp-text);
}
#newmeeting-overlay .nm-scenario-more {
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--lamp-text);
  font-size: var(--fs-2);
  font-weight: 500;
  cursor: pointer;
}
#newmeeting-overlay .nm-scenario-more:hover { background: var(--lamp-soft); }

#newmeeting-overlay .nm-card details { margin-top: 14px; }
#newmeeting-overlay .nm-card summary {
  min-height: 44px;
  font-size: var(--fs-2);
  font-weight: 500;
}
#newmeeting-overlay .nm-card details .field { margin-top: 12px; }
#newmeeting-overlay #nm-duration,
#newmeeting-overlay #nm-mode,
#newmeeting-overlay #nm-level,
#newmeeting-overlay #nm-agent-search,
#newmeeting-overlay #nm-agent-domain {
  min-height: 40px;
  font-size: var(--fs-3);
}
#newmeeting-overlay #btn-nm-agents {
  min-height: 40px;
  padding: 0 8px;
}
#newmeeting-overlay .nm-selected-x {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 50%;
}
#newmeeting-overlay .nm-selected-chip { min-height: 48px; }
#newmeeting-overlay .nm-selected-chip .nm-agent-avatar,
#newmeeting-overlay .nm-selected-chip img { width: 28px; height: 28px; flex-basis: 28px; }

#newmeeting-overlay .nm-foot {
  margin-top: 16px;
  padding-top: 16px;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
}
#newmeeting-overlay .nm-foot .ghost-btn,
#newmeeting-overlay .nm-foot .link-btn {
  min-height: 40px;
}
#newmeeting-overlay .nm-foot .ghost-btn {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
#newmeeting-overlay .nm-foot .ghost-btn:hover {
  border-color: var(--line-soft);
  background: var(--panel-2);
  color: var(--text);
}
#newmeeting-overlay .nm-foot-more { padding: 0 8px; font-size: var(--fs-2); }
#newmeeting-overlay #btn-nm-create {
  height: 48px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: var(--fs-4);
  font-weight: 600;
  letter-spacing: 0;
}

@media (max-width: 640px) {
  #newmeeting-overlay {
    padding: 16px;
    padding-top: min(calc(var(--header-h, 72px) + 12px), 30dvh);
  }
  #newmeeting-overlay .nm-card { padding: 20px; border-radius: 28px; }
  #newmeeting-overlay #nm-time-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  #newmeeting-overlay .nm-time-label { grid-column: 1 / -1; }
  #newmeeting-overlay .nm-time-chip,
  #newmeeting-overlay .nm-time-more {
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 0 4px;
  }
  #newmeeting-overlay .nm-time-extra {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
  }
  #newmeeting-overlay .nm-time-extra .nm-time-chip { flex: 1 1 0; }
  #newmeeting-overlay .nm-foot { flex-wrap: wrap; }
  #newmeeting-overlay .nm-foot .primary-btn { flex: 1 1 100%; }
  #newmeeting-overlay .nm-foot .ghost-btn,
  #newmeeting-overlay .nm-foot .link-btn { min-height: 44px; }
}
@media (max-width: 360px) {
  #newmeeting-overlay #nm-time-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 设置：顶部汇总和分组说明都是重复信息，首屏只留标题 + 当前值 + 控件 */
#panel-settings .settings-pane #set-state,
#panel-settings .settings-pane .set-desc,
#v5-panel #set-state,
#v5-panel .settings-pane .set-desc { display: none; }
#panel-settings .set-group-head,
#v5-panel .set-group-head { margin-bottom: 6px; }

/* ══════════════════════════════════════════════════════════════════════════
 * M3 · 触控尺寸补齐（2026-11-10）
 * 根字号是 14px，Tailwind 的 h-8/h-10/h-11 实际只有 28/35/38.5px；
 * 这里只改尺寸，不改字号、颜色或 DOM，主操作 36（移动端 40）。
 * ══════════════════════════════════════════════════════════════════════════ */
#v5-panel button[aria-label="关闭"]{
  min-width:36px;
  min-height:36px;
}
#v5-panel [data-testid="settings-nav"] button{
  min-height:36px;
}
#v5-panel [data-testid="about-me"] button[aria-label]{
  min-width:36px;
  min-height:36px;
}
#v5-panel [data-testid="learning-policy"] button[data-testid^="policy-memory-"]{
  min-width:36px;
  min-height:36px;
}

/* Skill / 学习策略开关：40×24 的 M3 开关，热区补到 40×40（移动端仍 ≥40） */
#v5-panel [data-testid="skills-admin"] [data-testid="skill-toggle"],
#v5-panel [data-testid="learning-policy"] button[role="switch"]{
  width:40px;
  height:24px;
  min-width:40px;
  min-height:24px;
}
#v5-panel [data-testid="skills-admin"] [data-testid="skill-toggle"]::after,
#v5-panel [data-testid="learning-policy"] button[role="switch"]::after{
  content:"";
  position:absolute;
  inset:-8px 0;
  border-radius:999px;
}
#v5-panel [data-testid="skills-admin"] [data-testid="skill-toggle"] > span,
#v5-panel [data-testid="learning-policy"] button[role="switch"] > span{
  left:2px;
  top:2px;
  width:18px;
  height:18px;
}
#v5-panel [data-testid="skills-admin"] [data-testid="skill-toggle"][aria-checked="true"] > span,
#v5-panel [data-testid="learning-policy"] button[role="switch"][aria-checked="true"] > span{
  transform:translateX(18px);
}

@media (max-width:640px){
  #v5-panel button[aria-label="关闭"]{
    min-width:40px;
    min-height:40px;
  }
  #v5-panel [data-testid="settings-nav"] button{
    min-height:40px;
  }
  #v5-panel [data-testid="about-me"] button[aria-label]{
    min-width:40px;
    min-height:40px;
  }
  #v5-panel [data-testid="about-me"] [data-testid="about-meeting"],
  #v5-panel [data-testid="about-me"] [data-testid="about-intro"]{
    min-height:40px;
  }
  #v5-panel [data-testid="learning-policy"] button[data-testid^="policy-memory-"]{
    min-width:40px;
    min-height:40px;
  }
}
