/* vibe-interview · 默认浅色，可切深色（系统字体栈，不引用外部字体）
   颜色一律走下面的 token；页面里不要再写死颜色。
   主题：<html data-theme="light|dark">，由 /static/theme.js 按 localStorage("vi-theme") 设置。
   深色 token 只在 @media screen 下生效 → 打印 / 存为 PDF 始终是浅色。 */
:root {
  /* 底色 / 面板 / 线条 */
  --bg: #f5f7fa; --bg-2: #eef2f6;
  --panel: #ffffff; --panel-solid: #ffffff; --panel-2: #f3f6f9;
  --line: #e2e7ee; --line-2: #cbd3de;
  /* 文字：正文 / 次要 / 弱化（--faint 只给装饰性元素用） */
  --ink: #0f1b2d; --ink-2: #334155; --muted: #5b6878; --faint: #7b8696;
  /* 强调色：青色系，压暗到白底 ≥ 4.5:1 */
  --accent: #0e7490; --accent-2: #2563eb; --accent-3: #7c3aed; --accent-ink: #ffffff;
  --accent-bg: rgba(14, 116, 144, .07); --accent-bg-2: rgba(14, 116, 144, .16); --accent-line: rgba(14, 116, 144, .38);
  --grad: linear-gradient(90deg, #0891b2 0%, #2563eb 55%, #7c3aed 100%);
  --score-grad: linear-gradient(90deg, #0e7490 0%, #1d4ed8 60%, #6d28d9 100%);
  --btn-primary-bg: linear-gradient(90deg, #0e7490 0%, #1d4ed8 100%); --btn-primary-ink: #ffffff;
  /* 状态色 */
  --ok: #047857; --warn: #b45309; --bad: #b91c1c;
  --ok-bg: #ecfdf5; --warn-bg: #fffbeb; --bad-bg: #fef2f2;
  --ok-line: rgba(4, 120, 87, .38); --warn-line: rgba(180, 83, 9, .38); --bad-line: rgba(185, 28, 28, .38);
  --warn-bg-2: #fef3c7; --warn-bg-3: #fde68a;
  --ok-glow: rgba(4, 120, 87, .35); --bad-glow: rgba(185, 28, 28, .35);
  --pm-ink: #92400e; --pm-ink-2: #78350f; --bad-ink-2: #b91c1c;
  --alarm-bg: #fef2f2; --alarm-ink: #991b1b; --alarm-strong: #7f1d1d;
  --net-bg: #b45309; --net-ink: #ffffff; --banner-bg: #fef3c7; --banner-ink: #78350f;
  /* 代码 / diff */
  --code-bg: #f6f8fa; --code-ink: #1f2937; --icode-bg: #eef2f6; --icode-ink: #0f1b2d;
  --diff-add-bg: #e6f7ed; --diff-add-ink: #065f46; --diff-del-bg: #fdecec; --diff-del-ink: #991b1b;
  /* 叠加 / 轨道 / 对话气泡 */
  --tint-1: rgba(15, 40, 80, .03); --tint-2: rgba(15, 40, 80, .06); --track: #e5e9f0;
  --user-bg: rgba(37, 99, 235, .07); --user-line: rgba(37, 99, 235, .28); --user-ink: #1d4ed8;
  --flash: rgba(245, 158, 11, .3);
  /* 外壳 */
  --topbar-bg: rgba(255, 255, 255, .9); --tabs-bg: #f8fafc;
  --topline-1: rgba(14, 116, 144, .35); --topline-2: rgba(124, 58, 237, .22); --brand-glow: transparent;
  --brand-1: #0891b2; --brand-2: #2563eb; --brand-3: #7c3aed;
  --glow-1: rgba(14, 116, 144, .06); --glow-2: rgba(124, 58, 237, .035); --grid: transparent;
  --overlay: rgba(15, 23, 42, .45); --overlay-2: rgba(15, 23, 42, .25); --shadow: rgba(15, 23, 42, .12);
  --ide-bg: #ffffff; --input-bg: #ffffff; --card-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  --serif: "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
/* 深色：原来那套配色 */
@media screen {
  :root[data-theme="dark"] {
    --bg: #070b14; --bg-2: #0a1020;
    --panel: rgba(14, 21, 38, .82); --panel-solid: #0d1424; --panel-2: #111a2e;
    --line: rgba(130, 170, 230, .14); --line-2: rgba(130, 170, 230, .26);
    --ink: #e6edf7; --ink-2: #c5d1e3; --muted: #8a9ab3; --faint: #5b6b86;
    --accent: #22d3ee; --accent-2: #3b82f6; --accent-3: #8b5cf6; --accent-ink: #031018;
    --accent-bg: rgba(34, 211, 238, .07); --accent-bg-2: rgba(34, 211, 238, .2); --accent-line: rgba(34, 211, 238, .45);
    --grad: linear-gradient(90deg, #22d3ee 0%, #3b82f6 55%, #8b5cf6 100%);
    --score-grad: var(--grad);
    --btn-primary-bg: var(--grad); --btn-primary-ink: #04121c;
    --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
    --ok-bg: rgba(52, 211, 153, .10); --warn-bg: rgba(251, 191, 36, .10); --bad-bg: rgba(248, 113, 113, .11);
    --ok-line: rgba(52, 211, 153, .45); --warn-line: rgba(251, 191, 36, .45); --bad-line: rgba(248, 113, 113, .5);
    --warn-bg-2: rgba(251, 191, 36, .15); --warn-bg-3: rgba(251, 191, 36, .28);
    --ok-glow: rgba(52, 211, 153, .8); --bad-glow: rgba(248, 113, 113, .8);
    --pm-ink: #fcd877; --pm-ink-2: #fde9b5; --bad-ink-2: #fca5a5;
    --alarm-bg: linear-gradient(90deg, rgba(248, 113, 113, .2), rgba(248, 113, 113, .08)); --alarm-ink: #fecaca; --alarm-strong: #fff;
    --net-bg: #78350f; --net-ink: #fff; --banner-bg: #713f12; --banner-ink: #fde68a;
    --code-bg: #0a1120; --code-ink: #d6e2f2; --icode-bg: rgba(130, 170, 230, .12); --icode-ink: #e3ecf8;
    --diff-add-bg: rgba(52, 211, 153, .12); --diff-add-ink: #a7f3d0; --diff-del-bg: rgba(248, 113, 113, .12); --diff-del-ink: #fecaca;
    --tint-1: rgba(130, 170, 230, .05); --tint-2: rgba(130, 170, 230, .08); --track: rgba(130, 170, 230, .12);
    --user-bg: rgba(59, 130, 246, .18); --user-line: rgba(59, 130, 246, .35); --user-ink: #93c5fd;
    --flash: rgba(251, 191, 36, .35);
    --topbar-bg: rgba(7, 11, 20, .9); --tabs-bg: rgba(7, 11, 20, .6);
    --topline-1: rgba(34, 211, 238, .55); --topline-2: rgba(139, 92, 246, .4); --brand-glow: rgba(34, 211, 238, .45);
    --brand-1: #22d3ee; --brand-2: #3b82f6; --brand-3: #8b5cf6;
    --glow-1: rgba(34, 211, 238, .10); --glow-2: rgba(139, 92, 246, .07); --grid: rgba(130, 170, 230, .045);
    --overlay: rgba(2, 5, 11, .82); --overlay-2: rgba(2, 5, 11, .45); --shadow: rgba(0, 0, 0, .45);
    --ide-bg: #1e1e1e; --input-bg: #0a1120; --card-shadow: none;
    color-scheme: dark;
  }
}
@media print {
  html, body { background: #fff !important; }
  .theme-seg { display: none !important; }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  min-height: 100vh; color: var(--ink); font: 15px/1.65 var(--sans);
  background:
    radial-gradient(1200px 520px at 50% -180px, var(--glow-1), transparent 70%),
    radial-gradient(900px 500px at 100% 0, var(--glow-2), transparent 70%),
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre, textarea.code { font-family: var(--mono); font-size: 13px; }
pre { background: var(--code-bg); border: 1px solid var(--line); padding: 10px 12px; border-radius: 8px; overflow: auto; color: var(--code-ink); margin: 8px 0; }
:not(pre) > code { background: var(--icode-bg); color: var(--icode-ink); padding: 1px 6px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.3; font-weight: 600; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 17px; margin: 24px 0 10px; }
h3 { font-size: 15px; margin: 16px 0 6px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.eyebrow { display: block; font: 600 13px/1.4 var(--sans); color: var(--ink-2); margin-bottom: 6px; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 16px; border-bottom: 1px solid var(--line); background: var(--topbar-bg); backdrop-filter: blur(12px); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--topline-1), var(--topline-2), transparent); opacity: .7; pointer-events: none; }
.topbar .title { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 12px/1 var(--mono); letter-spacing: .14em; color: var(--ink-2); white-space: nowrap; }
.brand svg { flex: none; filter: drop-shadow(0 0 6px var(--brand-glow)); }

.badge { display: inline-flex; align-items: center; gap: 6px; font: 12px/1.6 var(--mono); padding: 1px 9px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; background: var(--tint-1); }
.badge.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.badge.warn { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }
.badge.bad { color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); }
.badge.accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-bg); }

button, .btn { font: 600 14px/1 var(--sans); padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, opacity .15s; display: inline-flex; align-items: center; gap: 6px; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, .btn.primary { background: var(--btn-primary-bg); color: var(--btn-primary-ink); border: 0; }
button.danger { color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); }
button.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
button.sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
input, select, textarea { font: 14px/1.5 var(--sans); color: var(--ink); background: var(--input-bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
/* 下拉框：自绘箭头，右侧留足间距（原生箭头贴边） */
select:not([multiple]):not([size]) { -webkit-appearance: none; appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b8696' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 28px 20px 60px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 14px 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 14px; }
.kv > :nth-child(odd) { color: var(--muted); }

/* markdown */
.md h1 { font-family: var(--serif); font-size: 24px; }
.md h2, .md h3 { margin-top: 18px; }
.md p, .md li { color: var(--ink-2); }

/* diff */
.diff { font: 12px/1.5 var(--mono); background: var(--code-bg); border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: 420px; white-space: pre; padding: 6px 0; }
.diff div { padding: 0 10px; min-height: 1.5em; }
.diff .add { background: var(--diff-add-bg); color: var(--diff-add-ink); }
.diff .del { background: var(--diff-del-bg); color: var(--diff-del-ink); }
.diff .hunk { color: var(--accent); opacity: .8; }
.diff .meta { color: var(--faint); }

/* ===== 候选人：入场 ===== */
.stage { max-width: 860px; margin: 0 auto; padding: 30px 20px 60px; }

/* ===== 候选人：工作区 ===== */
body.ws { overflow: hidden; height: 100vh; display: flex; flex-direction: column; }
.ws-top { flex: none; }
.timer { font: 600 15px/1 var(--mono); letter-spacing: .05em; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-2); }
.timer.warn { color: var(--warn); border-color: var(--warn-line); }
.timer.bad { color: var(--bad); border-color: var(--bad-line); }
.ws-main { flex: 1; display: flex; min-height: 0; }
.ide-box { flex: 1; min-width: 0; position: relative; background: var(--ide-bg); }
.ide-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.ide-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font: 13px var(--mono); background: var(--bg); }
.side { flex: none; width: 400px; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--bg-2); min-height: 0; }
@media (max-width: 1100px) { .side { width: 340px; } }

/* AI 面板 */
.ai-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font: 600 12px/1.4 var(--mono); letter-spacing: .08em; color: var(--ink-2); }
.ai-head .badge { font-size: 11px; }
.ai-log { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.ai-log > * { flex-shrink: 0; }
.msg { font-size: 13.5px; line-height: 1.6; word-wrap: break-word; }
.msg.user { align-self: flex-end; max-width: 88%; background: var(--user-bg); border: 1px solid var(--user-line); padding: 7px 11px; border-radius: 10px 10px 2px 10px; white-space: pre-wrap; }
.msg.ai { color: var(--ink-2); }
.msg.ai p { margin: 4px 0; }
.msg.err { color: var(--bad); font-size: 12.5px; }
.tool { font: 11.5px/1.5 var(--mono); color: var(--muted); border-left: 2px solid var(--line-2); padding: 2px 8px; cursor: pointer; }
.tool b { color: var(--accent); font-weight: 600; }
.tool.err b { color: var(--bad); }
.tool pre { display: none; max-height: 220px; font-size: 11px; margin: 4px 0; white-space: pre-wrap; }
.tool.open pre { display: block; }
.dcard { border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-solid); overflow: hidden; }
.dcard-h { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.dcard-h .path { font-family: var(--mono); color: var(--ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard-h .n-add { color: var(--ok); font-family: var(--mono); } .dcard-h .n-del { color: var(--bad); font-family: var(--mono); }
.dcard .sum { padding: 6px 10px 0; font-size: 12.5px; color: var(--ink-2); }
.dcard .diff { border: 0; border-radius: 0; max-height: 280px; margin: 6px 0 0; }
.dcard-a { display: flex; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); align-items: center; }
.dcard[data-status="accepted"] { border-color: var(--ok-line); }
.dcard[data-status="rejected"], .dcard[data-status="superseded"], .dcard[data-status="conflict"] { opacity: .65; }
.ai-input { flex: none; border-top: 1px solid var(--line); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-input textarea { width: 100%; resize: none; height: 74px; font-size: 13.5px; }
.ai-input .row { display: flex; align-items: center; gap: 8px; }
.typing::after { content: "▍"; color: var(--accent); animation: blink 1s steps(1) infinite; }

.overlay { position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 20px; }
.overlay .card { max-width: 520px; width: 100%; }

/* 报告 */
.score { font: 700 44px/1 var(--mono); background: var(--score-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.timeline td:first-child { white-space: nowrap; font-family: var(--mono); color: var(--muted); font-size: 12px; }
.chatlog > .u { color: var(--user-ink); background: var(--user-bg); border-left: 3px solid var(--user-ink); padding-top: 8px; padding-bottom: 8px; border-radius: 4px; margin: 4px 0; border-bottom-color: transparent; } .chatlog .a { color: var(--ink-2); }
.chatlog > div { padding: 6px 10px 6px 10px; border-left: 3px solid transparent; border-bottom: 1px dashed var(--line); font-size: 13.5px; white-space: pre-wrap; }

/* AI 面板标签页：AI 助手 / 问产品（明确区分） */
.tabs { flex: none; display: flex; border-bottom: 1px solid var(--line); background: var(--tabs-bg); }
.tab { flex: 1; border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 9px 10px; font-size: 13px; border-bottom: 2px solid transparent; justify-content: center; }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-bg); }
.tab.pm-tab.on { color: var(--warn); border-bottom-color: var(--warn); background: var(--warn-bg); }
.pane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pane.pm { background: linear-gradient(180deg, var(--warn-bg), transparent 120px); }
.pm-note { flex: none; font-size: 12px; line-height: 1.6; color: var(--pm-ink); padding: 8px 12px; border-bottom: 1px solid var(--warn-line); background: var(--warn-bg); }
.msg.pmsg { align-self: flex-start; max-width: 88%; background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 7px 11px; border-radius: 10px 10px 10px 2px; white-space: pre-wrap; color: var(--pm-ink-2); }
.msg.pmsg.err { color: var(--bad); }
button.pm-send { background: var(--warn-bg-2); border-color: var(--warn-line); color: var(--pm-ink); }

.net-banner { display: none; flex: none; padding: 7px 16px; background: var(--net-bg); color: var(--net-ink); font-weight: 600; text-align: center; font-size: 13.5px; }
body.net-down .net-banner { display: block; }

/* 任务说明抽屉（盖在编辑器上，不遮 AI 面板） */
.brief-btn { background: var(--warn-bg-2); border-color: var(--warn-line); color: var(--pm-ink); }
.brief-btn.on { background: var(--warn-bg-3); }
.brief-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 92%); z-index: 5; display: flex; flex-direction: column; background: var(--panel-solid); border-left: 1px solid var(--warn-line); box-shadow: -12px 0 30px var(--shadow); }
.brief-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.brief-body { flex: 1; overflow-y: auto; padding: 4px 18px 24px; font-size: 14px; }

/* 报告 / 实时页：对话流、证据引用 */
.fu-flow { display: flex; flex-direction: column; gap: 10px; }
.fu-flow .q, .fu-flow .a { max-width: 80%; padding: 9px 13px; border-radius: 12px; font-size: 14px; line-height: 1.6; }
.pm-flow .q { align-self: flex-end; background: var(--user-bg); border: 1px solid var(--user-line); }
.pm-flow .a { align-self: flex-start; background: var(--warn-bg); border: 1px solid var(--warn-line); }
.ref { display: inline-block; font: 11.5px/1.6 var(--mono); padding: 0 7px; margin: 1px 3px 1px 0; border-radius: 5px; border: 1px solid var(--accent-line); color: var(--accent); background: var(--accent-bg); cursor: pointer; text-decoration: none; }
.ref:hover { background: var(--accent-bg-2); text-decoration: none; }
.ref.missing { border-color: var(--line-2); color: var(--muted); cursor: default; }
.flash-target { animation: flashT 1.6s ease-out; }
@keyframes flashT { 0% { background: var(--flash); } 100% { background: transparent; } }
.finding { display: grid; grid-template-columns: 22px 1fr; gap: 4px 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.finding .pol { font-weight: 700; } .finding .pol.positive { color: var(--ok); } .finding .pol.negative { color: var(--bad); } .finding .pol.neutral { color: var(--muted); }
.finding .impact { color: var(--ink-2); } .finding .impact::before { content: "→ "; color: var(--faint); }
.iq { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.iq .qq { font-size: 15px; font-weight: 600; }
.iq .why, .iq .good { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.iq .why b, .iq .good b { color: var(--muted); font-weight: 500; }
.iq .ref { font-size: 10.5px; line-height: 1.5; padding: 0 5px; opacity: .65; }
.iq .ref:hover { opacity: 1; }
.live-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
@media (max-width: 1000px) { .live-grid { grid-template-columns: 1fr; } }
.live-scroll { max-height: 72vh; overflow-y: auto; padding-right: 6px; }
.live-grid > div:last-child { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 80px); overflow-y: auto; }
.brief-note { margin: 0 0 10px; }
.warn-banner { flex: none; padding: 6px 16px; background: var(--banner-bg); color: var(--banner-ink); font-size: 13px; text-align: center; }
.review-alert { margin: 8px 0 12px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--bad-line); background: var(--bad-bg); color: var(--alarm-ink); font-weight: 600; }

/* 任务说明兜底弹窗（插件没加载出来时）：居中，内容可滚动，代码块横向滚动不截断 */
.brief-modal .card { max-width: 900px; width: 100%; max-height: 86vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.brief-modal .brief-body { overflow-y: auto; }
.brief-modal pre { overflow-x: auto; white-space: pre; }

/* ============ 面试官端改版：通用组件 ============ */
.spacer { flex: 1; }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes blink { 50% { opacity: 0; } }
.btn { text-decoration: none !important; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
button.ghost, .btn.ghost { background: transparent; }
.overlay .card.wide { max-width: 600px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: 12px; color: var(--muted); }
.field select, .field input { width: 100%; min-width: 0; }

/* 标签页（页面级） */
.ptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 14px; overflow-x: auto; scrollbar-width: none; }
.ptabs::-webkit-scrollbar { display: none; }
.ptab { position: relative; flex: none; border: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted); padding: 10px 14px; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ptab:hover:not(:disabled) { color: var(--ink); border-color: transparent; border-bottom-color: var(--line-2); }
.ptab.on { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-bg); font-weight: 600; }
.ptab .n { font: 600 11px/1.5 var(--mono); color: var(--faint); margin-left: 2px; }
.ptab.on .n { color: var(--accent); }
.ptab[aria-selected="true"]:hover:not(:disabled) { color: var(--accent); border-bottom-color: var(--accent); }
.ptab.dot::after { content: ""; position: absolute; top: 8px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg), 0 0 8px var(--bad-glow); }

/* 提示条 */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--panel-solid); border: 1px solid var(--line-2); color: var(--ink); padding: 8px 16px; border-radius: 8px; font-size: 13.5px; box-shadow: 0 8px 24px var(--shadow); transition: opacity .3s, transform .3s; }
.toast.ok { border-color: var(--ok-line); color: var(--ok); }
.toast.out { opacity: 0; transform: translateY(6px); }

/* 右侧证据面板 */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); z-index: 60; display: flex; flex-direction: column; background: var(--panel-solid); border-left: 1px solid var(--line-2); box-shadow: -16px 0 40px var(--shadow); transform: translateX(102%); transition: transform .22s ease; }
.drawer-mask { position: fixed; inset: 0; z-index: 59; background: var(--overlay-2); opacity: 0; pointer-events: none; transition: opacity .2s; }
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-mask { opacity: 1; pointer-events: auto; }
.drawer-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawer-title { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px 30px; font-size: 14px; }
.drawer-body .chatlog > div { font-size: 13.5px; }
.ref.cur { background: var(--accent-bg-2); }

/* ============ 后台首页 ============ */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 6px 0 4px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: default; }
.stat[data-go] { cursor: pointer; }
.stat[data-go]:hover { border-color: var(--line-2); }
.stat .v { font: 700 26px/1.1 var(--mono); color: var(--ink); }
.stat .k { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat.hot .v { color: var(--accent); }
.stat.warn .v { color: var(--warn); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(3, 1fr); } .stat .v { font-size: 22px; } }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 20px; }
.slist { display: flex; flex-direction: column; gap: 8px; }
.srow { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.srow:hover { border-color: var(--line-2); }
.srow.is-active { border-color: var(--accent-line); box-shadow: inset 3px 0 0 var(--accent); }
.srow .who { font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.srow .who .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.srow .sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow .facts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.srow .facts b { font: 600 15px/1 var(--mono); color: var(--ink); }
.srow .facts .lbl { color: var(--muted); font-size: 12px; margin-right: 4px; }
.srow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 12px; }
@media (max-width: 760px) {
  .srow { grid-template-columns: minmax(0, 1fr); }
  .srow .acts { justify-content: flex-start; }
}
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--code-bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; }
.linkbox .mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.topbar .hide-sm { }
@media (max-width: 760px) { .topbar .hide-sm, .topbar .brand > span { display: none; } .topbar { gap: 8px; padding: 6px 12px; } .wrap { padding: 18px 16px 50px; } }

/* ============ 报告页 ============ */
.alarm { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--bad-line); background: var(--alarm-bg); color: var(--alarm-ink); }
.alarm .ic { font-size: 22px; line-height: 1; }
.alarm b { color: var(--alarm-strong); font-size: 15px; }
.alarm .small { color: var(--alarm-ink); opacity: .9; }
.metaline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.metaline b { color: var(--ink-2); font-weight: 500; }
.verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 24px; align-items: start; }
.verdict .score { font-size: 56px; }
.verdict .score small { font-size: 18px; }
.verdict .line { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.5; margin: 2px 0 6px; }
.verdict .more { font-size: 13.5px; color: var(--ink-2); }
.vgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 28px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .vgrid { grid-template-columns: minmax(0, 1fr); } .verdict { grid-template-columns: minmax(0, 1fr); } .verdict .score { font-size: 46px; } }
.vgrid h4 { margin: 0 0 8px; font: 600 11px/1.4 var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.lights { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.light { display: flex; gap: 10px; align-items: center; font-size: 13.5px; min-width: 0; }
.light .bulb { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--faint); }
.light.avoided .bulb { background: var(--ok); box-shadow: 0 0 8px var(--ok-glow); }
.light.hit .bulb { background: var(--bad); box-shadow: 0 0 8px var(--bad-glow); }
.light .tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.light .oc { flex: none; font: 12px var(--mono); color: var(--muted); margin-left: auto; }
.light.hit .oc { color: var(--bad); } .light.avoided .oc { color: var(--ok); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 2px 10px; align-items: center; font-size: 13px; }
.bar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bar .sc { font: 600 13px var(--mono); text-align: right; grid-row: span 2; align-self: end; }
.bar .track { height: 6px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 4px; background: var(--grad); }
.bar.lo .fill { background: var(--bad); } .bar.mid .fill { background: var(--warn); }
.bar.na .track { background: repeating-linear-gradient(45deg, var(--track) 0 6px, transparent 6px 12px); }
.bar.na .sc { color: var(--muted); font-size: 11px; font-weight: 500; }
.risks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.risks li { font-size: 13.5px; padding-left: 16px; position: relative; color: var(--ink-2); }
.risks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.risks li.bad::before { background: var(--bad); }
.topq { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.topq li { font-size: 14px; color: var(--ink); }
.grp { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin: 0 0 10px; }
.grp > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 12px 16px; font-weight: 600; font-size: 14.5px; }
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary::before { content: "▸"; color: var(--faint); transition: transform .15s; font-size: 12px; }
.grp[open] > summary::before { transform: rotate(90deg); }
.grp > summary .meta { margin-left: auto; font: 12px var(--mono); color: var(--muted); font-weight: 400; text-align: right; }
.grp > .body { padding: 0 16px 14px; border-top: 1px solid var(--line); }
.grp > summary .s { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp.sm > summary { font-size: 13.5px; font-weight: 500; padding: 9px 14px; }
.chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tl { position: relative; margin: 6px 0 0 6px; padding-left: 18px; border-left: 1px solid var(--line-2); }
.tl > div { position: relative; padding: 5px 0; font-size: 13.5px; }
.tl > div::before { content: ""; position: absolute; left: -23px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--panel-solid); border: 2px solid var(--faint); }
.tl > div.warn::before { border-color: var(--warn); } .tl > div.bad::before { border-color: var(--bad); } .tl > div.ok::before { border-color: var(--ok); } .tl > div.accent::before { border-color: var(--accent); }
.tl .tm { font: 12px var(--mono); color: var(--muted); margin-right: 8px; }
.fail-list .mono { font-size: 12.5px; word-break: break-all; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ============ 实时页 ============ */
.livebar { position: sticky; top: 50px; z-index: 7; background: var(--topbar-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.livebar-in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.livebar .who { font-weight: 600; font-size: 15px; min-width: 0; }
.livebar .who .sub { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.lv { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lv .k { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.lv .v { font: 600 14px/1.3 var(--mono); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.lv .v.ok { color: var(--ok); } .lv .v.bad { color: var(--bad); } .lv .v.warn { color: var(--warn); }
.tokbar { width: 110px; height: 4px; border-radius: 3px; background: var(--track); overflow: hidden; margin-top: 3px; }
.tokbar i { display: block; height: 100%; background: var(--grad); }
.aistate { display: inline-flex; align-items: center; gap: 7px; }
.aistate .dotx { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.aistate.on .dotx { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.aistate.on { color: var(--accent); }
.stream { max-height: calc(100vh - 250px); min-height: 320px; overflow-y: auto; padding-right: 6px; }
.jump { position: sticky; bottom: 6px; margin-left: auto; display: block; }
.live-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .live-cols { grid-template-columns: minmax(0, 1fr); } .livebar { top: 50px; } .livebar-in { padding: 8px 16px; gap: 6px 16px; } .lv .v { max-width: 200px; } }
.dstat { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chatlog .md { white-space: normal; }
.wrap pre, .drawer pre { max-width: 100%; }
.diff { max-width: 100%; }
/* 候选人顶栏：窄窗口下按钮和"剩余"不折成两行 */
.topbar button, #topRight .muted { white-space: nowrap; }

/* 面试官记录（报告页的旧记录）：撤销 */
.note-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 3px 0; }
.note-row .nt { min-width: 0; overflow-wrap: anywhere; }
.note-row button.ghost { padding: 1px 8px; font-size: 11.5px; color: var(--muted); }
.revoked .nt, .chatlog .revoked { text-decoration: line-through; opacity: .55; }
.toast.bad { border-color: var(--bad-line); color: var(--bad); }
/* 长证据标签（TEST:很长的测试名）在窄屏下可以断行，不撑出横向滚动 */
.ref { max-width: 100%; overflow-wrap: anywhere; word-break: break-all; vertical-align: top; }
/* 对话流里工具调用的 JSON / 长路径不带空格：允许任意处断行；命令输出、代码块在自己的框里横向滚动 */
.chatlog > div { overflow-wrap: anywhere; min-width: 0; }
.chatlog pre, .chatlog .diff { max-width: 100%; overflow-x: auto; }
.drawer-head .eyebrow, .drawer-head button { flex: none; white-space: nowrap; }

/* ============ 后台导航 / 试题管理 / 职位管理 ============ */
.anav { display: flex; gap: 2px; margin-left: 6px; }
.anav a { padding: 6px 12px; border-radius: 7px; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.anav a:hover { color: var(--ink); background: var(--tint-2); text-decoration: none; }
.anav a.on { color: var(--accent); background: var(--accent-bg); font-weight: 600; }
@media (max-width: 760px) { .anav a { padding: 6px 8px; font-size: 13px; } }
.filterbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
.filterbar select { padding: 5px 30px 5px 10px; font-size: 13px; background-position: right 10px center; }
.drop { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 26px 16px; text-align: center; color: var(--muted); transition: border-color .15s, background .15s; cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-bg); color: var(--ink-2); }
.drop b { color: var(--ink); }
.opt-cards { display: grid; gap: 10px; margin-top: 14px; }
.opt-card { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card, transparent); color: var(--ink); cursor: pointer; font: inherit; }
.opt-card:hover, .opt-card:focus-visible { border-color: var(--accent); background: var(--accent-bg); }
.opt-ic { flex: none; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent-bg); color: var(--accent); }
.opt-tx { display: flex; flex-wrap: wrap; align-items: center; min-width: 0; }
.opt-tx b { font-size: 16px; }
.opt-d { flex-basis: 100%; margin-top: 4px; }
.pbar { height: 6px; border-radius: 4px; background: var(--track); overflow: hidden; margin: 8px 0; }
.pbar > i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }
.chk-group { margin: 12px 0 4px; font: 600 11px/1.4 var(--mono); letter-spacing: .12em; color: var(--muted); }
.chk { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.chk:last-child { border-bottom: 0; }
.chk .ic { font: 700 13px/1.5 var(--mono); text-align: center; }
.chk .lb { color: var(--ink); }
.chk .chk-reused { font-size: 11px; margin-left: 6px; vertical-align: 1px; }
.chk .dt { grid-column: 2; color: var(--muted); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
.chk.pass .ic { color: var(--ok); } .chk.warn .ic { color: var(--warn); } .chk.fail .ic { color: var(--bad); }
.chk.fail .dt { color: var(--bad-ink-2); } .chk.warn .dt { color: var(--pm-ink); }
.chk.running .ic { color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.chk.pending .ic, .chk.skip .ic { color: var(--faint); } .chk.skip .lb { color: var(--muted); }
.chk details { grid-column: 2; } .chk details pre { max-height: 260px; font-size: 12px; }
/* 启动进度条（common.js 的 buildProgressHtml：出题草稿页、候选人简报页） */
.bprog { margin: 10px auto; max-width: 560px; text-align: left; }
.bprog-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bprog-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .6s ease; }
.bprog-t { margin-top: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bprog.err .bprog-bar > span { background: var(--bad); }
.bprog.err .bprog-t { color: var(--bad); }
#ideState .bprog { margin: 6px 0 2px; max-width: 360px; }
@media (prefers-reduced-motion: reduce) { .bprog-bar > span { transition: none; } }
pre.buildlog { max-height: 300px; font-size: 11.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-all; }
.overlay .card.xl { max-width: 920px; max-height: 88vh; overflow-y: auto; }
.vtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.vtable th, .vtable td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.vtable th { color: var(--muted); font-weight: 500; font-size: 12px; }
.doc-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.docbox { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; max-height: 50vh; overflow-y: auto; }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; }
.prow .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow input { width: 100%; }
@media (max-width: 760px) { .prow { grid-template-columns: minmax(0, 1fr); } }

/* ============ 账号 / 候选人 / 人工评价 ============ */
body:not([data-role="super"]) .super-only { display: none !important; }
.umenu { position: relative; flex: none; }
.umenu-btn { gap: 8px; max-width: 280px; }
.umenu-btn .um-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
.umenu-btn .badge { font-size: 11px; padding: 0 7px; }
.umenu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; box-shadow: 0 12px 30px var(--shadow); display: flex; flex-direction: column; z-index: 20; }
.umenu-pop .um-head { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-wrap: anywhere; }
.umenu-pop a, .umenu-pop button { display: block; text-align: left; padding: 8px 10px; border-radius: 6px; font: 500 13.5px/1.3 var(--sans); color: var(--ink-2); background: none; border: 0; width: 100%; }
.umenu-pop a:hover, .umenu-pop button:hover { background: var(--tint-2); text-decoration: none; color: var(--ink); }
@media (max-width: 760px) { .umenu-btn .um-name { max-width: 70px; } .umenu-btn .um-role { display: none; } }
.review { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 8px 0; background: var(--tint-1); }
.review .rv-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.review .rv-head .spacer { flex: 1; }
.review .rv-body { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.review.retracted { opacity: .5; }
.review.retracted .rv-body { text-decoration: line-through; }
.review .rv-retract { margin-top: 6px; color: var(--warn); }
.review button.ghost { padding: 2px 9px; font-size: 11.5px; color: var(--muted); }
.badge.lvl { color: var(--ink-2); }
.rv-form { border-top: 1px dashed var(--line-2); margin-top: 12px; padding-top: 12px; }
.rv-form textarea { width: 100%; resize: vertical; }
/* 评价：编辑中 / 已编辑 */
.review.editing { border-color: var(--warn-line); background: var(--warn-bg); }
.review.editing .rv-form { border-top: 0; margin-top: 8px; padding-top: 0; }
.review .rv-edited { font-style: italic; }
/* 候选人链接：场次卡片里整行显示，点链接文字整段选中 */
.linkbox .link-text { user-select: all; -webkit-user-select: all; cursor: text; color: var(--ink-2); }
button.copied { background: var(--ok-bg) !important; color: var(--ok) !important; border-color: var(--ok-line) !important; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg .opt { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; font-size: 14px; }
.seg .opt:has(input:checked).ok { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.seg .opt:has(input:checked).warn { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.seg .opt:has(input:checked).bad { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); }
.levels { display: flex; flex-direction: column; gap: 4px; }
.levels .lvl-opt { display: flex; align-items: baseline; gap: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.levels .lvl-opt b { font-family: var(--mono); }
.levels .lvl-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.crow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.crow:hover { border-color: var(--line-2); }
.crow .nm { font-weight: 600; font-size: 15px; }
.crow .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* 候选人列表：有进行中场次的行（答题中的高亮），状态标记 + 剩余时间 */
.crow.is-active { border-color: var(--accent-line); box-shadow: inset 3px 0 0 var(--accent); }
.og-list { display: flex; flex-direction: column; gap: 3px; margin-bottom: 2px; }
.og-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.og-row .badge { flex: none; }
.og-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.og-filter { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--ink-2); }
.og-filter input { margin: 0; }
@media (max-width: 760px) { .crow { grid-template-columns: minmax(0, 1fr); } .crow .acts { justify-content: flex-start; } }
.pii { font-family: var(--mono); font-size: 13px; }
.pii button { margin-left: 4px; padding: 1px 7px; font-size: 11px; }
.cpick { border: 1px solid var(--line-2); border-radius: 8px; max-height: 220px; overflow-y: auto; margin-top: 6px; }
.cpick .it { display: flex; gap: 8px; align-items: center; padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.cpick .it:last-child { border-bottom: 0; }
.cpick .it:hover, .cpick .it.on { background: var(--accent-bg); }
.cpick .empty2 { padding: 10px; color: var(--muted); font-size: 13px; }
.chosen { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent-bg); }
.utable td, .utable th { white-space: nowrap; }
.utable td.wrap2 { white-space: normal; overflow-wrap: anywhere; }
.tbl-scroll { overflow-x: auto; }
.disabled-row { opacity: .55; }
body[data-role="super"] .interviewer-only, body:not([data-role]) .interviewer-only { display: none !important; }
/* 评价表单里的单选框不吃 .field input 的 100% 宽度 */
.field .seg input[type=radio], .field .levels input[type=radio] { width: auto; min-width: 0; flex: none; margin: 0; padding: 0; }
.levels .lvl-opt { flex-wrap: wrap; }
/* 窄屏：后台导航链接多了，导航条自己横向滚动，右上角的账号菜单始终可见 */
@media (max-width: 760px) {
  .topbar .anav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .topbar .anav::-webkit-scrollbar { display: none; }
  .topbar .anav + .spacer { display: none; }
  .topbar > button.primary.sm { flex: none; }
}

/* ---------- Google 登录 / 邀请 / 发信邮箱 ---------- */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px 16px; border-radius: 8px; background: #fff; color: #1f2937; font: 600 15px/1 var(--sans); border: 1px solid #dadce0; }
.btn-google:hover { text-decoration: none; box-shadow: 0 0 0 3px var(--accent-line); }
.btn-google .g-mark { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 13px/1 var(--sans); color: #fff; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.or-line { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--faint); font-size: 12px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.invite-out { width: 100%; min-height: 96px; font: 13px/1.6 var(--mono); resize: vertical; }
.mailer-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.mailer-card .grow { flex: 1; min-width: 220px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 8px 0; cursor: pointer; }
.check-row input { width: auto; margin: 0; }
.acts-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.hint-box { border: 1px solid var(--accent-line); background: var(--accent-bg); color: var(--ink); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; line-height: 1.6; }
.hint-box.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--ink-2); }

/* ---------- 主题切换（浅色 / 深色 / 跟随系统），由 theme.js 插进顶栏 ---------- */
.card, .stat, .srow, .crow, .prow, .grp { box-shadow: var(--card-shadow); }
.theme-seg { flex: none; display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; background: var(--panel-2); }
.theme-seg button { padding: 4px 7px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font: 13px/1 var(--sans); }
.theme-seg button + button { border-left: 1px solid var(--line); }
.theme-seg button:hover:not(:disabled) { color: var(--ink); background: var(--tint-2); }
.theme-seg button.on { color: var(--accent); background: var(--accent-bg-2); }
/* 窄屏：只留当前主题一个按钮，点它轮换（theme.js），不挤占顶栏 */
@media (max-width: 760px) {
  .theme-seg button:not(.on) { display: none; }
  .theme-seg button.on { background: transparent; }
  .theme-seg button { padding: 4px 6px; }
}

/* ---------- 图标（common.js 的 icon()：CSS mask + currentColor，颜色跟着文字走）---------- */
.ic { display: inline-block; flex: none; width: 16px; height: 16px; background-color: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; vertical-align: -3px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ic-20 { width: 20px; height: 20px; vertical-align: -5px; }
.ic-loader { animation: icspin .8s linear infinite; }
@keyframes icspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ic-loader { animation-duration: 2.4s; } }
/* 纯图标按钮：点击区域 32×32（窄屏 / 触屏 36×36），平时只有图标，悬停出底色；名字在 aria-label，提示用原生 title */
button.ib, .btn.ib { vertical-align: middle; flex: none; width: 32px; height: 32px; padding: 0; gap: 0; justify-content: center; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); }
button.ib:hover:not(:disabled), .btn.ib:hover { color: var(--ink); background: var(--tint-2); border-color: var(--line-2); text-decoration: none; }
/* 跟在文字后面的图标按钮（如联系方式后的眼睛）：和文字居中对齐，不撑高行 */
.pii ~ button.ib, .pii + button.ib { margin: -8px 0 -8px 2px; }
button.ib:focus-visible, .btn.ib:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button.ib.accent, .btn.ib.accent { color: var(--accent); }
button.ib.accent:hover:not(:disabled), .btn.ib.accent:hover { color: var(--accent); background: var(--accent-bg); border-color: var(--accent-line); }
button.ib.danger { color: var(--bad); background: transparent; border-color: transparent; }
button.ib.danger:hover:not(:disabled) { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
button.ib.ok { color: var(--ok); background: transparent; border-color: transparent; }
button.ib.ok:hover:not(:disabled) { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
@media (max-width: 760px), (pointer: coarse) { button.ib, .btn.ib { width: 36px; height: 36px; } }
/* 带文字的按钮里的图标 */
button > .ic, .btn > .ic { margin-left: -2px; }
button.sm > .ic, .btn.sm > .ic { width: 14px; height: 14px; }
button.ib > .ic, .btn.ib > .ic { margin: 0; width: 16px; height: 16px; }
button.ib > .ic-20, .btn.ib > .ic-20 { width: 20px; height: 20px; }
/* 行内操作区：图标按钮挨得近一点 */
.srow .acts, .crow .acts, .acts-wrap { gap: 2px; align-items: center; }
.review .rv-head .ib { margin: -4px 0; }
.note-row .ib { margin: -6px 0; }
.linkbox .ib { margin: -6px -4px -6px 0; }
/* 账号菜单 */
.umenu-btn.ib { color: var(--ink-2); }
.umenu-pop .um-head .badge { font-size: 11px; padding: 0 7px; }
.umenu-pop a, .umenu-pop button { display: flex; align-items: center; gap: 8px; }
.umenu-pop a .ic, .umenu-pop button .ic { color: var(--muted); }
/* 主题切换（后台）：三个图标的分段按钮 */
.theme-seg.ics button { width: 32px; height: 30px; padding: 0; justify-content: center; }
@media (max-width: 760px), (pointer: coarse) { .theme-seg.ics button { width: 36px; height: 34px; padding: 0; } }
/* 展开 / 收起用的 summary 图标 */
summary.sum-ic { list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); }
summary.sum-ic::-webkit-details-marker { display: none; }
summary.sum-ic:hover { background: var(--tint-2); color: var(--ink); }
details[open] > summary.sum-ic .ic { transform: rotate(180deg); }
.note-row:has(> .ib) { flex-wrap: nowrap; }
.note-row:has(> .ib) > .nt { flex: 0 1 auto; }
.note-row:has(> .ib) > :not(.nt) { flex: none; }
/* 顶栏的主按钮（新建面试 / 新建候选人 / 邀请…）：窄屏只留图标，不把导航挤掉；名字在 aria-label / title */
@media (max-width: 760px) {
  .topbar .tb-ic { flex: none; width: 36px; height: 36px; padding: 0; gap: 0; justify-content: center; }
  .topbar .tb-ic .tb-t { display: none; }
  .topbar .tb-ic > .ic { margin: 0; width: 16px; height: 16px; }
}
/* 列表的操作区：固定最小宽度、右对齐，按钮多少不同的行中间几列也对齐（窄屏单列时取消） */
.crow .acts { min-width: 180px; flex-wrap: nowrap; justify-content: flex-end; }
.srow .acts { min-width: 104px; flex-wrap: nowrap; justify-content: flex-end; }
.prow .acts-wrap { min-width: 66px; justify-content: flex-end; }
.utable .acts-wrap { flex-wrap: nowrap; justify-content: flex-end; }
@media (max-width: 760px) { .crow .acts, .srow .acts { min-width: 0; justify-content: flex-start; } }
/* 试题页：面试官看不到上传框；检测进度没打开时整张卡片不显示（免得留一张空卡片） */
body:not([data-role="super"]) #upCard:has(#prog.hidden) { display: none; }
/* 账号页"邀请 ▾"菜单：图标 + 文字，左对齐 */
.inv-btn > .ic-chevron-down { width: 12px; height: 12px; margin: 0 -2px 0 0; }
.inv-menu { min-width: 240px; }
.inv-menu button { justify-content: flex-start; gap: 10px; font-weight: 500; line-height: 1.4; }
.inv-menu .cm-t { gap: 1px; }
.inv-menu .cm-t .small { font-weight: 400; }
.inv-menu button > .ic { color: var(--muted); }
.inv-menu button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
/* 人工评价：最终结论 / 场次卡片里的面试官评分 / 备注 */
.final-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.sess-score .lbl { color: var(--muted); font-size: 12px; }
.badge.final.lg { font-size: 14px; font-weight: 600; padding: 3px 14px; }
.srow .sess-score { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 8px; }
.sess-score .spacer, .review .spacer { flex: 1; }
.score-inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.score-inline .ib, .review .rv-head .ib { margin: -4px 0; }
.review.note { background: transparent; }
.ev-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ev-head .eyebrow { margin: 0; }
.ev-head .spacer { flex: 1; }
.fb-body .levels { margin-bottom: 4px; }
.fb-body textarea { width: 100%; resize: vertical; }

/* 详情页面包屑（报告页）：在内容顶部，表明位置、可逐级返回 */
.crumb-wrap { padding-top: 16px; padding-bottom: 0; }
.crumb-wrap + .wrap { padding-top: 10px; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 13.5px; color: var(--muted); min-width: 0; }
.crumb a { color: var(--muted); } .crumb a:hover { color: var(--accent); }
.crumb .sep { margin: 0 8px; opacity: .6; }
.crumb .cur { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

/* 候选人详情页：层次（结论 + 待办在上，场次紧凑一行，结果右对齐成列） */
.cd-head { display: flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; }
.cd-id { flex: 1 1 0; min-width: 0; display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.cd-head h1 { margin: 0; font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
.cd-head .pos { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.cd-acts { display: flex; gap: 4px; align-items: center; flex: none; }
.cd-head .final-row { margin: 0; position: relative; flex: none; }
.final-unset { font-size: 13px; color: var(--muted); }
.fd-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.fd-btn:hover { background: var(--bg-2); }
.fd-btn.set { padding: 2px 6px; border-color: transparent; }
.fd-btn.static { cursor: default; border-color: transparent; }
.fd-btn.static:hover { background: transparent; }
.fd-btn .ic { width: 12px; height: 12px; color: var(--muted); }
.fd-btn[aria-expanded="true"] .ic { transform: rotate(180deg); }
.fmenu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 150px; padding: 4px; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.14); display: flex; flex-direction: column; }
.fmenu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: 13.5px; text-align: left; cursor: pointer; }
.fmenu button:hover, .fmenu button:focus-visible { background: var(--bg-2); outline: none; }
.fmenu button .ic { width: 14px; height: 14px; margin-left: auto; color: var(--muted); }
.fmenu button[data-fv-hist] .ic { margin: 0; }
.fmenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.fmenu .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.fmenu .dot.ok { background: var(--ok); } .fmenu .dot.bad { background: var(--bad); } .fmenu .dot.warn { background: var(--warn); }
.cd-meta { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; display: flex; align-items: center; min-width: 0; }
.cd-meta .sep { margin: 0 8px; color: var(--faint); flex: none; }
.cd-meta .cd-c { flex: none; white-space: nowrap; }
.cd-meta .pii { color: var(--ink-2); }
.cd-meta .cd-note { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .cd-id { flex-basis: calc(100% - 90px); }
  .cd-head .final-row { order: 3; }
  .fmenu { right: auto; left: 0; }
  .cd-meta { flex-wrap: nowrap; }
}
.cd-sec { display: flex; align-items: center; gap: 10px; margin: 28px 0 10px; }
.cd-sec h2 { margin: 0; font-size: 16px; font-weight: 600; }
.cd-sec .spacer { flex: 1; }
/* 候选人详情页的场次行：题目 + 状态 | 开始 | AI 参考 | 面试官评分 | 操作，固定列轨道，各行对齐；表头一行 muted 小字，行内的 .lbl 只在窄屏显示 */
.srow.cd { grid-template-columns: minmax(0, 1fr) 84px 64px 196px 136px; gap: 6px 14px; padding: 10px 14px; border-radius: 10px; }
.srow.cd.srow-h { background: none; border-color: transparent; box-shadow: none; padding-top: 0; padding-bottom: 0; font-size: 12px; color: var(--muted); }
.srow.cd.srow-h:hover { border-color: transparent; }
.srow.cd .tm { color: var(--ink-2); white-space: nowrap; }
.srow.cd .tm .lbl, .srow.cd .num .lbl, .srow.cd .scol .lbl { display: none; }
.srow.cd .lv-num { font: 600 15px/1.3 var(--mono); color: var(--ink); }
.srow.cd.is-active { border-color: var(--ok-line); box-shadow: inset 3px 0 0 var(--ok); }
.srow.cd .acts { min-width: 0; width: 136px; }
.srow.cd .scol { min-width: 0; }
.srow.cd .scol .score-inline { flex-wrap: wrap; row-gap: 4px; min-width: 0; }
.srow.cd .scol .score-inline .ib { max-width: 0; width: 0; min-width: 0; overflow: hidden; border-width: 0; margin: 0; opacity: 0; transition: opacity .12s; }
.srow.cd:hover .scol .score-inline .ib, .srow.cd:focus-within .scol .score-inline .ib, .srow.cd .scol .score-inline .ib:focus-visible { width: 32px; max-width: 32px; border-width: 1px; opacity: 1; }
@media (hover: none) { .srow.cd .scol .score-inline .ib { width: 32px; max-width: 32px; border-width: 1px; opacity: 1; } }
.srow.cd .who { font-size: 15px; font-weight: 600; }
.srow.cd .sub { font-size: 12px; margin-top: 2px; white-space: normal; overflow: visible; }
.srow.cd .num { text-align: right; line-height: 1.3; }
.srow.cd .num b { font: 600 15px/1.3 var(--mono); color: var(--ink); }
.srow.cd .num .none, .srow.cd .scol .none { color: var(--faint); font: 600 15px/1.3 var(--mono); }
.srow.cd .scol { display: flex; justify-content: flex-start; min-width: 0; }
.srow.cd .scol .score-inline { justify-content: flex-start; gap: 6px; }
.srow.cd .scol .score-inline > * { flex: none; white-space: nowrap; }
.srow.cd .go { border-color: var(--accent-line); color: var(--accent); }
@media (max-width: 760px) {
  .srow.cd { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .srow.cd.srow-h { display: none; }
  .srow.cd .tm .lbl, .srow.cd .num .lbl, .srow.cd .scol .lbl { display: block; font-size: 11.5px; color: var(--muted); margin-right: 8px; }
  .srow.cd .scol { flex-direction: column; align-items: flex-start; }
  .srow.cd .scol .score-inline { flex-wrap: wrap; }
  .srow.cd .scol .score-inline .ib { width: 32px; max-width: 32px; border-width: 1px; opacity: 1; }
  .srow.cd .acts { width: auto; }
  .srow.cd > :first-child, .srow.cd .acts { grid-column: 1 / -1; }
  .srow.cd .num { text-align: left; }
  .srow.cd .scol { justify-content: flex-start; }
}
.cd-meta button.ib { width: 24px; height: 24px; min-width: 24px; }
@media (max-width: 760px) {
  .srow.cd .scol .score-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .srow.cd .scol .score-inline .ib { width: 28px; max-width: 28px; height: 28px; }
}
.srow.cd .who { flex-wrap: wrap; }
.srow.cd .who .nm { white-space: normal; overflow: visible; overflow-wrap: anywhere; }

/* 嵌入式 Markdown（实时页参考答案、报告里的口径和 AI 回复）：标题压回正文层级，不用衬线大字；独立文档页不受影响 */
#refMd h1, #refMd h2, #refMd h3, #refMd h4, [data-pane] .md h1, [data-pane] .md h2, [data-pane] .md h3, [data-pane] .md h4, .grp .md h1, .grp .md h2, .grp .md h3, .grp .md h4, .chatlog .md h1, .chatlog .md h2, .chatlog .md h3, .chatlog .md h4 { font-family: var(--sans); font-weight: 600; margin: 14px 0 6px; line-height: 1.4; }
#refMd h1, [data-pane] .md h1, .grp .md h1, .chatlog .md h1 { font-size: 15px; }
#refMd h2, [data-pane] .md h2, .grp .md h2, .chatlog .md h2 { font-size: 14px; }
#refMd h3, #refMd h4, [data-pane] .md h3, [data-pane] .md h4, .grp .md h3, .grp .md h4, .chatlog .md h3, .chatlog .md h4 { font-size: 13px; }
#refMd > :first-child { margin-top: 0; }

/* 证据折叠：测试名标签默认收起，只显示一个小的"证据 N" */
.evd { display: inline-block; vertical-align: top; margin: 1px 0 1px 2px; }
.evd > summary { list-style: none; cursor: pointer; font: 11.5px/1.6 var(--mono); color: var(--muted); padding: 0 7px; border-radius: 5px; border: 1px dashed var(--line-2); display: inline-block; }
.evd > summary::-webkit-details-marker { display: none; }
.evd > summary:hover, .evd[open] > summary { color: var(--accent); border-color: var(--accent-line); }
.evd-body { margin-top: 4px; }

/* 报告页：结论区 */
.metaline2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.metaline2 .sep { margin: 0 8px; color: var(--faint); }
.metaline2 .more-info { display: inline-block; margin-left: 12px; }
.metaline2 .more-info > summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.metaline2 .more-info[open] { display: block; flex-basis: 100%; margin: 6px 0 0; }
.metaline2 .more-info .kv { margin-top: 6px; color: var(--ink-2); }
.concl { padding: 18px 22px; }
.concl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 330px); gap: 18px 28px; align-items: start; }
.concl-tag { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.aiscore { font: 600 18px/1 var(--mono); color: var(--ink); }
.aiscore small { font-size: 11px; font-weight: 400; }
.concl .line { font-size: 15.5px; font-weight: 500; line-height: 1.75; color: var(--ink); margin: 4px 0 0; }
.concl .more { font-size: 13.5px; color: var(--ink-2); margin-bottom: 4px; }
.tchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.6; padding: 1px 9px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); background: var(--tint-1); max-width: 100%; }
.tchip i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.tchip b { font-weight: 600; }
.tchip.avoided i { background: var(--ok); } .tchip.avoided b { color: var(--ok); }
.tchip.hit { color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); } .tchip.hit i { background: var(--bad); }
.concl-me, .card.concl-me { border: 1px solid var(--accent-line); background: var(--accent-bg); border-radius: 10px; padding: 12px 14px; }
.card.concl-me.solo { margin: 14px 0; }
.concl-me .review { background: transparent; border: 0; padding: 0; margin: 6px 0 0; }
.concl-me .ev-head { margin-bottom: 8px; }
.lbl { font-weight: 700; font-size: 14px; color: var(--ink); }
.concl-sub { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 28px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sublbl { font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.plain-list li.bad { color: var(--bad); }
.cd-notes-card .ev-head { margin-bottom: 8px; }
@media (max-width: 760px) { .concl-grid, .concl-sub { grid-template-columns: minmax(0, 1fr); } .concl { padding: 16px; } .concl .line { font-size: 15px; } }


/* ---------- 面试官工作台（/admin/workbench/<sid>）：没有顶栏，整页是只读 IDE；IDE 打不开 / 窄屏时是本页里的七个面板 ---------- */
#stat .kv .ok, #sess .kv .ok { color: var(--ok); } #stat .kv .bad, #sess .kv .bad { color: var(--bad); } #stat .kv .warn, #sess .kv .warn { color: var(--warn); }
/* 「状态」面板顶部的「场次」区块（工作台没有顶栏，原来顶栏上的都在这里；面板页和工作台兜底共用） */
.sess-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sess-who { font-weight: 600; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
a.sess-who[href] { color: var(--accent); }
.sess-task { margin: 2px 0 8px; overflow-wrap: anywhere; }
.sess-tokbar { display: inline-block; vertical-align: middle; width: 64px; margin-left: 8px; }
.sess-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sess-acts .btn.sm { display: inline-flex; align-items: center; gap: 5px; }
.wb-main { display: flex; flex-direction: column; min-height: 0; }
.wb-ide { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--ide-bg); }
.wb-idebox { position: relative; flex: 1; min-height: 0; }
.wb-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--ide-bg); }
.wb-idemsg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.wb-idemsg-in { max-width: 420px; text-align: center; }
.wb-msg-t { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.wb-msg-t:empty { display: none; }
/* 面板模式（兜底）：标签页 + 内容，内容区限宽居中 */
.wb-fb { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.wb-banner { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 20px; background: var(--accent-bg); border-bottom: 1px solid var(--line); }
.wb-banner .spacer { flex: 1; }
.wb-banner-t { min-width: 0; }
.wb-fb .ptabs { flex: none; margin: 0; padding: 0 20px; background: var(--bg-2); }
.wb-fb .ptab { padding: 10px 14px; font-size: 14px; transition: none; background: transparent; }
.wb-fb .ptab[aria-selected="true"] { color: var(--accent); background: var(--accent-bg); border-bottom-color: var(--accent); font-weight: 600; }
.wb-panes { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 20px 20px; }
.wb-panes > [data-pane] { max-width: 1180px; margin: 0 auto; }
.wb-panes .card { margin: 0 0 14px; }
.wb-ph { display: none; }
.wb-sec { padding: 2px 0 14px; margin-bottom: 12px; border-bottom: 1px dashed var(--line); }
.wb-sec:last-child { border-bottom: 0; margin-bottom: 0; }
.wb-big { font: 700 22px/1.2 var(--mono); color: var(--ink); }
.wb-big small { font-size: 13px; font-weight: 500; color: var(--muted); }
.wb-big.warn { color: var(--warn); } .wb-big.bad { color: var(--bad); }
.wb-tokbar { width: 100%; margin: 6px 0 4px; }
.wb-subs { display: flex; flex-direction: column; gap: 8px; }
.wb-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.wb-subtask { flex-basis: 100%; color: var(--ink-2); overflow-wrap: anywhere; }
#stat .kv, #sess .kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; }
#stat .kv > :nth-child(even), #sess .kv > :nth-child(even) { overflow-wrap: anywhere; }
@media (min-width: 901px) {
  body.wb { height: 100vh; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
  body.wb .wb-main { flex: 1; }
  /* AI 协作动态 / 面试参谋：撑满，只有列表滚 */
  .wb-panes:has([data-pane="ai"]:not(.hidden)), .wb-panes:has([data-pane="copilot"]:not(.hidden)) { overflow: hidden; display: flex; flex-direction: column; }
  .wb-fb [data-pane="ai"]:not(.hidden), .wb-fb [data-pane="copilot"]:not(.hidden) { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; }
  .wb-fb [data-pane="ai"] > .card, .wb-fb [data-pane="copilot"] > .card { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-bottom: 0; position: relative; }
  .wb-fb #chat { flex: 1; min-height: 0; max-height: none; }
  .wb-fb #jump { position: absolute; right: 26px; bottom: 22px; margin: 0 !important; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); background: var(--panel, #fff); }
  .wb-fb [data-pane="copilot"] #copilot, .wb-fb [data-pane="copilot"] .cop { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .wb-fb [data-pane="copilot"] .cop-log { flex: 1; max-height: none; }
}
/* 窄屏（手机）：不显示 IDE，七个面板依次纵向排列，页面整体滚动 */
@media (max-width: 900px) {
  .wb-fb .ptabs { display: none; }
  .wb-panes { overflow: visible; padding: 10px 12px 20px; }
  .wb-fb [data-pane].hidden { display: block !important; }
  .wb-ph { display: block; font-size: 16px; margin: 18px 0 8px; }
  .wb-fb [data-pane]:first-child .wb-ph { margin-top: 4px; }
  .wb-fb .stream { max-height: 70vh; min-height: 200px; }
}

/* ---------- 面板页（/admin/panel/<场次>/<面板>：嵌在只读旁观 IDE 的编辑器标签页里，一页一个面板）---------- */
body.panel { background: var(--bg); }
.pn-sec { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pn-sec:last-child { border-bottom: 0; }
body.panel .live-cols { grid-template-columns: minmax(0, 1fr); }
body.panel[data-panel="ai"], body.panel[data-panel="copilot"] { height: 100vh; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
body.panel[data-panel="ai"] #root, body.panel[data-panel="copilot"] #root { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pn-fill { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; border-bottom: 0; }
body.panel #chat { flex: 1; min-height: 0; max-height: none; }
body.panel #jump { position: absolute; right: 20px; bottom: 16px; margin: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); background: var(--panel, #fff); }
body.panel #copilot, body.panel .cop { flex: 1; min-height: 0; display: flex; flex-direction: column; }
body.panel .cop-log { flex: 1; max-height: none; }

/* ---------- 面试参谋（copilot.js：工作台 / 报告页的「面试参谋」标签） ---------- */
.cop { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.cop-head { display: flex; align-items: center; gap: 8px; }
.cop-head .eyebrow { white-space: nowrap; flex: none; }
.cop-meta { min-width: 0; }
.cop-note { margin: 0; }
.cop-log { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 120px; max-height: 62vh; padding: 4px 2px; }
.cop-q { max-width: 92%; }
.cop-a { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--panel-solid); overflow-wrap: anywhere; }
.cop-a .md p, .cop-a .md li { color: var(--ink-2); margin: 4px 0; }
.cop-a .md pre { max-width: 100%; overflow-x: auto; }
.cop-a .ref { margin: 0 1px; }
.cop-tools { margin-top: 6px; color: var(--muted); }
.cop-tools summary { cursor: pointer; }
.cop-tools .mono { margin-top: 4px; font-size: 12px; overflow-wrap: anywhere; }
.cop-sugs { display: flex; flex-wrap: wrap; gap: 6px; }
.cop-sugs:empty { display: none; }
.cop-sug { font-weight: 500; text-align: left; white-space: normal; line-height: 1.4; }
.cop-input textarea { width: 100%; resize: vertical; min-height: 64px; font: 14px/1.5 var(--sans); }
.cop-bar { margin-top: 6px; }
.cop-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cop-live .md p.muted::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--accent); animation: cop-pulse 1s infinite alternate; }
@keyframes cop-pulse { from { opacity: .25; } to { opacity: 1; } }
/* Markdown 表格（AI 回答等）：紧凑、可横向滚动，不撑破气泡 */
.md .md-tbl { max-width: 100%; overflow-x: auto; margin: 6px 0; }
.md .md-tbl table { width: auto; min-width: 0; border-collapse: collapse; font-size: 12.5px; }
.md .md-tbl th, .md .md-tbl td { padding: 3px 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: normal; }
.md .md-tbl th { color: var(--ink); font-weight: 600; font-size: 12.5px; background: var(--tint-2, transparent); white-space: nowrap; }
.md .md-tbl .tc { text-align: center; } .md .md-tbl .tr { text-align: right; }
.md blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid var(--line-2, var(--line)); color: var(--ink-2); background: var(--tint-2, transparent); border-radius: 0 6px 6px 0; }

/* 执行中 / 思考中（工作台「AI 协作动态」、面试参谋）：克制的转圈 + 已用时间；完成 ✓ + 耗时，失败标红 */
.wb-run { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; color: var(--accent); font-variant-numeric: tabular-nums; }
.wb-think { display: flex; align-items: center; gap: 6px; padding: 2px 0; font-variant-numeric: tabular-nums; }
.wb-run i, .wb-think i, .cop-step.run .ti, .cop-think .ti { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--line-2); border-top-color: var(--accent); animation: wb-spin 1s linear infinite; }
@keyframes wb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wb-run i, .wb-think i, .cop-step.run .ti, .cop-think .ti { animation-duration: 3s; } }
.cop-live .md:empty { display: none; }
.cop-steps { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.cop-steps:empty { display: none; }
.cop-step, .cop-think { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.cop-step .cop-step-l { flex: 1 1 auto; min-width: 0; font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cop-step .cop-step-st { flex: none; font-size: 12px; }
.cop-step .ti { width: 11px; text-align: center; font-size: 11px; line-height: 1; }
.cop-step.ok .ti::before { content: "✓"; color: var(--ok); }
.cop-step.err .ti::before { content: "✕"; color: var(--bad); }
.cop-step.err .cop-step-st { color: var(--bad); }
.cop-step.cut .ti::before { content: "–"; }
.cop-think .cop-step-st { display: none; }
/* 长命令折叠（cmdHtml）：一行摘要 +「（共 N 行，展开）」，展开后是等宽 pre 里的完整命令 */
details.cmdf { display: inline; }
details.cmdf[open] { display: block; }
details.cmdf > summary { display: inline; cursor: pointer; list-style: none; }
details.cmdf > summary::-webkit-details-marker { display: none; }
.cmdf-more { color: var(--accent); white-space: nowrap; }
.cmdf-more:hover { text-decoration: underline; }
.cmdf-close, details.cmdf[open] .cmdf-open { display: none; }
details.cmdf[open] .cmdf-close { display: inline; }
pre.cmdf-full { white-space: pre; max-height: 360px; overflow: auto; margin: 6px 0; font-size: 12px; }
.shlog { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--code-bg); border: 1px solid var(--line); padding: 10px 12px; border-radius: 8px; color: var(--code-ink); margin: 8px 0; }
.shlog > div { padding: 1px 0; }

/* 面试参谋：输入框下方的状态行（模型 · 额度的灰色标签；子任务在跑时绿点）、子任务过程行、新话题分隔线、「/」「@」菜单 */
.cop-input { position: relative; }
.cop-srow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; } /* 和发送按钮同一行（2026-11-07 用户要求） */
.cop-meta { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cop-meta.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.cop-model { font-size: 11.5px; padding: 0 4px; height: 20px; max-width: 220px; width: auto; border-radius: 9px; color: var(--muted); } /* 面试参谋的模型切换（输入框下方） */
.cop-subtag { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; }
.cop-subtag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: cop-pulse 1s infinite alternate; }
/* 「面试官当前在看」标签：📄 文件:行 / 文件:起-止 · 已选 N 行（旁观 IDE 里的编辑器状态），× 只让下一个问题不附带 */
.cop-ctx { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 9px; padding: 0 2px 0 8px; max-width: 100%; min-width: 0; }
.cop-ctx-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-size: 11.5px; }
.cop-ctx-x { background: transparent; border: 0; color: inherit; opacity: .6; padding: 0 5px; font-size: 13px; line-height: 16px; min-height: 0; cursor: pointer; }
.cop-ctx-x:hover { opacity: 1; }
.cop-q-ctx { margin-top: 2px; font-size: 11px; overflow-wrap: anywhere; }
.cop-step.sub .cop-step-l { color: var(--ink-2); }
.cop-sep { text-align: center; margin: 2px 0; }
.chat-divider { text-align: center; }
.cop-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); z-index: 20; max-height: 240px; overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--line-2, var(--line)); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.18); padding: 4px 0; }
.cop-mi { display: flex; align-items: baseline; gap: 10px; padding: 4px 10px; cursor: pointer; min-width: 0; }
.cop-mi .mono { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: none; max-width: 60%; }
.cop-mi .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cop-mi.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cop-mi.dis { opacity: .55; cursor: default; }
/* 账号菜单里的界面语言快速切换（自动 / 中文 / English） */
/* 我的账号：界面语言单选 */
.lang-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.lang-seg label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; }
.lang-seg label:has(input:checked) { border-color: var(--accent, #3b82f6); background: var(--tint-2); }
/* 登录页：界面语言手动切换（自动 / 中文 / English） */
.lang-pick { display: inline-flex; gap: 4px; }
.lang-pick button { padding: 3px 9px; font-size: 12.5px; border: 1px solid var(--line-2); border-radius: 6px; background: none; color: var(--ink-2); }
.lang-pick button.on { border-color: var(--accent, #3b82f6); color: var(--ink); background: var(--tint-2); }
/* 设置页：弹窗窄一些；信息行垂直居中对齐（带按钮的昵称 / 密码行不再错位） */
.overlay .card.narrow { max-width: 400px; }
#info .kv { align-items: center; row-gap: 8px; }
#info .dn-row { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; }
.final-why { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--muted); background: var(--bg-2); border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.final-why.ok { border-left-color: var(--ok); } .final-why.bad { border-left-color: var(--bad); } .final-why.warn { border-left-color: var(--warn); }
.final-why .fw-text { flex: 1 1 260px; white-space: pre-wrap; overflow-wrap: anywhere; }
.final-why .fw-by { font-size: 12px; color: var(--muted); white-space: nowrap; }
/* 试题列表：去掉了中间的数字列（2026-11-07），只剩标题区 + 文字操作按钮 */
.srow.task-row { grid-template-columns: minmax(0, 1fr) auto; }
.srow.task-row .acts { gap: 10px; }
/* 试题标题可点（打开详情），代替原来的「详情」按钮 */
.srow .nm-link { all: unset; cursor: pointer; font: inherit; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.srow .nm-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.srow .nm-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
