/* 信奥教师工作台 —— 样式
   断点：900px。桌面 = 左侧导航 + 内容区；手机 = 顶栏 + 内容 + 底部标签栏。 */

:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #fafbfc;
  --ink: #171a21;
  --ink-2: #414855;
  --muted: #737b8a;
  --line: #e3e6ec;
  --line-2: #eef0f4;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: #eef0fe;
  --ok: #15a34a;
  --ok-soft: #e7f7ed;
  --warn: #c2740a;
  --warn-soft: #fdf3e3;
  --bad: #d92d20;
  --bad-soft: #fdeceb;
  --info: #0b7285;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .14);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 232px;
  --tabbar-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --panel: #171b21;
    --panel-2: #1c2128;
    --ink: #e9edf3;
    --ink-2: #c2c9d4;
    --muted: #8b95a5;
    --line: #262c35;
    --line-2: #1f242b;
    --accent: #7d78f0;
    --accent-ink: #ffffff;
    --accent-soft: #23243a;
    --ok: #3ecf7a;
    --ok-soft: #16281e;
    --warn: #e3a53f;
    --warn-soft: #2a2115;
    --bad: #f2705f;
    --bad-soft: #2c1a18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ 口令门 */

.gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(1100px 600px at 50% -10%, var(--accent-soft), var(--bg));
  z-index: 100;
}

.gate-card {
  width: 100%;
  max-width: 340px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  text-align: center;
}

.gate-logo {
  width: 52px; height: 52px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
}

.gate-card h1 { font-size: 19px; margin: 0 0 6px; }
.gate-card p { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.gate-card input { text-align: center; letter-spacing: 3px; }
.gate-err { color: var(--bad) !important; font-size: 13px; min-height: 20px; margin: 10px 0 0 !important; }

/* -------------------------------------------------------------- 布局 */

.app { display: flex; min-height: 100%; }

.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 16px;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  flex: 0 0 auto;
}
.brand-text { line-height: 1.2; }
.brand-text b { display: block; font-size: 14px; }
.brand-text span { font-size: 11px; color: var(--muted); }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 14px;
  border: none; background: none; width: 100%; text-align: left;
  font-family: inherit;
}
.nav-item:hover { background: var(--panel-2); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; flex: 0 0 auto; font-size: 15px; }
.nav-item .count {
  margin-left: auto; font-size: 11px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.nav-sep { height: 1px; background: var(--line-2); margin: 8px 4px; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px 22px;
  display: flex; align-items: center; gap: 16px;
}
.topbar h1 { font-size: 17px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sub { font-size: 12px; color: var(--muted); font-weight: 400; }

.content { padding: 22px; max-width: 1180px; width: 100%; }

/* ---------------------------------------------------------- 底部标签栏 */

.tabbar { display: none; }

/* --------------------------------------------------------------- 通用 */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h2 { font-size: 14px; margin: 0; font-weight: 600; }
.card-head .spacer { flex: 1; }
.card-body { padding: 14px 16px; }
.card-body.tight { padding: 6px 0; }
.card-body.flush { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 16px; }
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.stat-num { font-size: 25px; font-weight: 650; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.accent .stat-num { color: var(--accent); }

.section-title {
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
  margin: 22px 0 10px;
}

.empty {
  padding: 34px 16px; text-align: center; color: var(--muted); font-size: 14px;
}
.empty b { display: block; color: var(--ink-2); margin-bottom: 4px; font-size: 15px; }

/* ---------------------------------------------------------------- 列表 */

.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left; font-family: inherit; font-size: 15px; color: inherit;
}
.row:last-child { border-bottom: none; }
.row:hover { background: var(--panel-2); }
.row-main { flex: 1 1 auto; min-width: 0; }
.row-title {
  font-weight: 550; font-size: 14.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-sub {
  font-size: 12.5px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-side { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.row-actions { flex: 0 0 auto; display: flex; gap: 6px; opacity: .55; }
.row:hover .row-actions { opacity: 1; }

.avatar {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 650; font-size: 15px;
}
.date-chip {
  flex: 0 0 auto; width: 44px; text-align: center;
  font-family: var(--mono); font-size: 11px; line-height: 1.25; color: var(--muted);
}
.date-chip b { display: block; font-size: 16px; color: var(--ink); font-weight: 650; }

/* ---------------------------------------------------------------- 徽标 */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--line-2); color: var(--ink-2);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.muted { background: var(--line-2); color: var(--muted); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.chip {
  font-size: 11.5px; padding: 1px 7px; border-radius: 6px;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.chip.ghost { background: none; border: 1px solid var(--line); color: var(--muted); }
.chip.diff { color: #fff; font-weight: 600; }

.diff-1 { background: #fe4c61; }
.diff-2 { background: #f39c11; }
.diff-3 { background: #ffc116; color: #4a3600 !important; }
.diff-4 { background: #52c41a; }
.diff-5 { background: #3498db; }
.diff-6 { background: #9d3dcf; }
.diff-7 { background: #0e1d69; }

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 13.5px; font-weight: 550; font-family: inherit;
  cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: var(--line); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn.icon { padding: 6px 8px; }

/* -------------------------------------------------------------- 表单 */

.field { margin-bottom: 13px; }
.field > label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 5px;
}
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.input, .select, .textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  font-size: 16px; /* 阻止 iOS 聚焦缩放 */
  font-family: inherit;
}

/* ============================== 每日一言 ============================== */

.quote-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 132px; justify-content: center;
  padding: 20px 20px 16px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel-2), var(--panel-2)) padding-box,
    linear-gradient(135deg, var(--accent), var(--info) 70%, var(--ok)) border-box;
  overflow: hidden;
}
/* 左侧一道竖向渐变色条，作为「这是一句引言」的视觉暗示 */
.quote-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--info));
}
/* 右上角淡淡的大引号 */
.quote-mark {
  position: absolute; right: 12px; top: -12px;
  font-size: 82px; line-height: 1; font-weight: 700;
  color: var(--accent); opacity: .09;
  pointer-events: none; user-select: none;
  font-family: Georgia, "Songti SC", serif;
}
.quote-text {
  position: relative;
  font-size: 17px; line-height: 1.8; color: var(--ink);
  font-weight: 500; letter-spacing: .3px;
  text-wrap: pretty;
  transition: opacity .38s ease, transform .38s ease;
}
/* 换句时的一次淡入 */
.quote-text.quote-swap { animation: quote-fade .42s ease; }
@keyframes quote-fade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.quote-meta { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quote-author {
  font-size: 12.5px; color: var(--muted);
  font-style: normal;
}
.quote-author:empty { display: none; }
.quote-tag {
  font-size: 11.5px; color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px; border-radius: 999px;
  letter-spacing: .3px;
}
.quote-timer {
  font-size: 11.5px; color: var(--muted); opacity: .7;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}

/* ============================== 汇报 ============================== */

.report-toolbar { align-items: center; }
.report-hint { font-size: 12.5px; margin-left: 4px; }

.report-card { display: flex; flex-direction: column; gap: 14px; }
.report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-q {
  font-size: 14.5px; font-weight: 650; color: var(--ink);
  letter-spacing: .2px;
}
.report-q::before {
  content: '问'; display: inline-block;
  font-size: 10.5px; font-weight: 600; color: var(--accent-ink);
  background: var(--accent); border-radius: 4px;
  padding: 1px 4px; margin-right: 7px; vertical-align: 2px;
}

/* 大数字：老板当面问时，这些是你能直接念出来的 */
.report-big { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; }
.report-stat { min-width: 62px; }
.report-stat-num {
  font-size: 30px; font-weight: 680; line-height: 1.1;
  letter-spacing: -1px; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.report-stat-label { font-size: 12px; color: var(--muted); margin-top: 3px; }
.report-stat.accent .report-stat-num { color: var(--accent); }
.report-stat.ok .report-stat-num { color: var(--ok); }
.report-stat.warn .report-stat-num { color: var(--warn); }
.report-stat.muted .report-stat-num { color: var(--muted); font-size: 22px; }

.report-body { display: flex; flex-direction: column; gap: 10px; }
.report-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.report-sub.warn { color: var(--warn); }
.report-note {
  font-size: 12.5px; color: var(--muted);
  border-top: 1px dashed var(--line); padding-top: 9px;
}

.report-classes { display: flex; flex-direction: column; gap: 10px; }
.report-class-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
.report-class-head b { color: var(--accent); font-variant-numeric: tabular-nums; }
.report-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* 名字做成可点的胶囊：被追问「他是谁」时能立刻点开 */
.name-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font: inherit; font-size: 12.5px; cursor: pointer;
  background: var(--panel-2); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 10px; line-height: 1.35;
  transition: background .12s, border-color .12s, color .12s;
}
.name-chip:hover { border-color: var(--accent); color: var(--accent); }
.name-chip em { font-style: normal; font-size: 11px; color: var(--muted); }
.name-chip.plain { cursor: default; }
.name-chip.plain:hover { border-color: var(--line); color: var(--ink-2); }
.name-chip.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.name-chip.ok em { color: var(--ok); opacity: .8; }
.name-chip.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.name-chip.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.name-chip.warn em { color: var(--warn); opacity: .8; }
/* 状态文字：不能只靠颜色 —— 打印成黑白时要还分得清「缺考 / 没过 / 过」 */
.name-chip-note {
  font-weight: 600; font-size: 11px; letter-spacing: .2px;
  padding-left: 5px; border-left: 1px solid currentColor;
  opacity: .85;
}

.report-picker { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.report-picker-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.report-select { max-width: 340px; flex: 1 1 200px; font-size: 13px; }

/* GESP 级别分布 */
.report-bars { display: flex; flex-direction: column; gap: 7px; }
.report-bar-row { display: flex; align-items: center; gap: 9px; }
.report-bar-label { font-size: 12.5px; color: var(--ink-2); width: 42px; flex: none; }
.report-bar { flex: 1; height: 9px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.report-bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.report-bar-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; width: 44px; text-align: right; flex: none; }

/* 好消息 */
.report-good {
  background: var(--ok-soft); border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.report-good .report-sub { color: var(--ok); margin-bottom: 6px; }
.report-good-row { font-size: 13px; color: var(--ok); line-height: 1.7; }

.report-brief { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.report-brief-text {
  font-size: 14px; line-height: 1.85; color: var(--ink);
  background: var(--panel-2); border-radius: var(--radius-sm);
  padding: 13px 15px; width: 100%;
  border-left: 3px solid var(--accent);
}

/* 手动复制弹窗里的文本框 */
.copy-area {
  width: 100%; font-family: var(--mono); font-size: 12.5px; line-height: 1.65;
  padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); color: var(--ink); resize: vertical;
}

/* ============================== 洞察 ============================== */

.insight-body { padding: 12px 14px; }
.insight-cardhead { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.insight-cardhead > span:first-child { font-size: 14px; font-weight: 650; }
.insight-count { color: var(--accent); font-variant-numeric: tabular-nums; }
.insight-delta { font-size: 11.5px; color: var(--muted); }
.insight-list { display: flex; flex-direction: column; }

.insight {
  display: flex; gap: 0;
  padding: 12px 0 12px 0;
  border-bottom: 1px solid var(--line-2);
}
.insight:last-child { border-bottom: none; }
.insight-bar { width: 3px; border-radius: 999px; flex: none; margin-right: 11px; background: var(--muted); }
.insight.warn .insight-bar { background: var(--warn); }
.insight.info .insight-bar { background: var(--info); }
.insight.good .insight-bar { background: var(--ok); }
.insight.acked { opacity: .55; }
.insight-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.insight-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.insight-flag {
  font-size: 10.5px; font-weight: 600; letter-spacing: .3px;
  padding: 1px 6px; border-radius: 4px; flex: none;
  background: var(--line-2); color: var(--muted);
}
.insight.warn .insight-flag { background: var(--warn-soft); color: var(--warn); }
.insight.info .insight-flag { background: var(--accent-soft); color: var(--info); }
.insight.good .insight-flag { background: var(--ok-soft); color: var(--ok); }
.insight-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.insight-detail { font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.insight-suggest { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.insight-suggest::before { content: '→ '; color: var(--accent); }
.insight-age {
  font-size: 11.5px; color: var(--muted);
  background: var(--line-2); border-radius: 999px; padding: 2px 8px; flex: none;
}
.insight-evidence { font-size: 12.5px; }
.insight-evidence summary {
  cursor: pointer; color: var(--muted); font-size: 12px;
  list-style: none; display: inline-block; padding: 2px 0;
}
.insight-evidence summary::-webkit-details-marker { display: none; }
.insight-evidence summary::before { content: '▸ '; }
.insight-evidence[open] summary::before { content: '▾ '; }
.insight-evidence summary:hover { color: var(--accent); }
.insight-evidence-body {
  margin-top: 5px; padding: 8px 10px;
  background: var(--panel-2); border-radius: var(--radius-sm);
  color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.insight-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }

.insight-clear { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.insight-clear-icon {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
}
.insight-history { display: flex; flex-direction: column; }
.insight-hist-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13px;
}
.insight-hist-row:last-child { border-bottom: none; }
.insight-hist-date { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.insight-hist-title { color: var(--ink-2); }

/* 学生详情页顶部的「教练速览」 */
.brief-card { display: flex; flex-direction: column; gap: 12px; }
.brief-text { font-size: 14.5px; line-height: 1.9; color: var(--ink); }
.brief-facts { display: flex; gap: 18px; flex-wrap: wrap; }
.brief-fact { min-width: 66px; }
.brief-fact-num {
  font-size: 21px; font-weight: 660; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.4px;
}
.brief-fact-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ============================== 备忘录 ============================== */

.memo-list { display: flex; flex-direction: column; gap: 2px; }
.memo {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 4px; border-bottom: 1px solid var(--line-2);
}
.memo:last-child { border-bottom: none; }
.memo > input[type="checkbox"] {
  width: 17px; height: 17px; margin-top: 2px; flex: 0 0 auto;
  accent-color: var(--accent); cursor: pointer;
}
.memo-main { flex: 1 1 auto; min-width: 0; }
.memo-text { font-size: 14px; line-height: 1.5; word-break: break-word; }
.memo.done .memo-text { text-decoration: line-through; color: var(--muted); }
.memo-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.memo-actions { flex: 0 0 auto; display: flex; gap: 2px; opacity: .5; }
.memo:hover .memo-actions { opacity: 1; }

/* ========================= 竞赛进度总览 ========================= */

.tally-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.tally {
  padding: 10px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); cursor: pointer; transition: border-color .15s, transform .15s;
}
.tally:hover { border-color: var(--accent); transform: translateY(-1px); }
.tally-name { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tally-num { font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; margin: 3px 0 1px; }
.tally-num .muted { font-size: 13px; font-weight: 400; }
.tally-sub { font-size: 11.5px; color: var(--muted); }

/* ============================ 里程碑 ============================ */

.ms-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.ms-cell {
  padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); border-left: 3px solid var(--line);
}
.ms-cell.ok { border-left-color: var(--ok); }
.ms-cell.bad { border-left-color: var(--bad); }
.ms-cell.muted { border-left-color: var(--line); }
.ms-name { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.ms-detail { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ms-extra { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* =========================== 考试履历时间轴 =========================== */

.timeline { display: flex; flex-direction: column; gap: 16px; }
.tl-year-label {
  font-size: 13px; font-weight: 650; color: var(--ink-2);
  padding-bottom: 7px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
}
.tl-items { display: flex; flex-direction: column; gap: 2px; }
.tl-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 4px; border-bottom: 1px solid var(--line-2);
}
.tl-item:last-child { border-bottom: none; }
.tl-date {
  flex: 0 0 46px; font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tl-main { flex: 1 1 auto; min-width: 0; }
.tl-title { font-size: 14px; font-weight: 550; display: flex; align-items: center; flex-wrap: wrap; }
.tl-side { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }

/* =========================== 筛选工作台 =========================== */

.preset-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.preset {
  display: block; text-align: left; padding: 11px 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--ink); font-family: inherit;
  transition: border-color .15s, background .15s;
}
.preset:hover { border-color: var(--accent); background: var(--panel-2); }
.preset.active { border-color: var(--accent); background: var(--accent-soft); }
.preset.active .preset-name { color: var(--accent); }
.preset-name { font-size: 14px; font-weight: 600; }
.preset-count { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; margin: 3px 0 1px; }
.preset-hint { font-size: 11.5px; color: var(--muted); line-height: 1.4; }

.filter-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.filter-grid .field { margin-bottom: 0; }

.board-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 18px 0 12px; padding: 0 2px;
}
.board-head .spacer { flex: 1 1 auto; }
.board-group { margin-bottom: 16px; }
.board-group-title {
  font-size: 13px; font-weight: 650; color: var(--ink-2);
  padding: 0 2px 7px;
}

/* ============================ 考试录入 ============================ */

.exam-kind {
  flex: 0 0 auto; min-width: 46px; padding: 3px 7px; text-align: center;
  font-size: 12px; font-weight: 650; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
}
.exam-entry { gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.exam-entry .preview { min-width: 46px; text-align: center; }
.exam-entry .input.sm {
  padding: 5px 8px; font-size: 13.5px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.select.select-sm { padding: 5px 24px 5px 8px; font-size: 13px; width: auto; min-width: 74px; }
.absent-label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.absent-label input { width: 15px; height: 15px; accent-color: var(--bad); cursor: pointer; }

/* ========================== GESP 期次矩阵 ========================== */

.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.matrix { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.matrix th, table.matrix td {
  padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
table.matrix thead th {
  font-size: 12px; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel);
}
table.matrix .th-sub { font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 1px; }
table.matrix .sticky-col {
  position: sticky; left: 0; background: var(--panel); z-index: 1;
  box-shadow: 1px 0 0 var(--line-2);
}
table.matrix tbody tr:hover .sticky-col { background: var(--panel-2); }
table.matrix td.matrix-cell { cursor: pointer; transition: background .12s; }
table.matrix td.matrix-cell:hover { background: var(--accent-soft); }
.link {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--accent); font-family: inherit; font-size: 13.5px; font-weight: 550;
}
.link:hover { text-decoration: underline; }

/* =========================== 其他小件 =========================== */

.notes-box {
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.badge.clickable { cursor: pointer; }
.badge.clickable:hover { filter: brightness(.95); }
.check-inline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; cursor: pointer; margin-bottom: 10px;
}
.check-inline input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.input-like { min-height: 40px; display: flex; align-items: center; }
.cal-list { display: flex; flex-direction: column; gap: 2px; }
.cal-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 6px; font-size: 13.5px;
}
.cal-item.now { background: var(--accent-soft); font-weight: 600; }
.cal-month {
  flex: 0 0 48px; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cal-item.now .cal-month { color: var(--accent); }

/* ------------------------------------------------- 名单的批量管理 */
.pick-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px;
  border: 1px solid var(--accent); border-radius: 10px;
  background: var(--accent-soft);
  position: sticky; top: 0; z-index: 6;
}
.pick-bar b { font-size: 13.5px; }
.pick-bar .spacer { flex: 1 1 auto; }
.btn.tiny { padding: 4px 9px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.row.pickable { cursor: pointer; }
.row.pickable:hover { background: var(--line-2); }
.row.pickable.picked { background: var(--accent-soft); }
.row.pickable.picked .avatar { outline: 2px solid var(--accent); }

.pick-box {
  flex: 0 0 auto; width: 19px; height: 19px; margin: 0 2px 0 0;
  accent-color: var(--accent); cursor: pointer;
}

@media (max-width: 899px) {
  .quote-card { min-height: 116px; padding: 17px 16px 14px 18px; }
  .quote-text { font-size: 15.5px; line-height: 1.75; }
  .quote-mark { font-size: 64px; top: -8px; right: 8px; }
  .exam-entry { justify-content: flex-start; width: 100%; }
  .row { flex-wrap: wrap; }
  table.matrix th, table.matrix td { padding: 8px; }

  /* 管理操作条在手机上要够宽、按钮够大好点 */
  .pick-bar { padding: 9px 11px; gap: 6px; }
  .pick-bar .btn { flex: 1 1 auto; }
  .pick-box { width: 22px; height: 22px; }
  .row.pickable { padding-top: 11px; padding-bottom: 11px; }
  /* 行内的小按钮也要够大，手指才点得准 */
  .btn.tiny { padding: 8px 11px; font-size: 13px; min-height: 32px; }
  .btn.sm { padding: 7px 11px; font-size: 13px; min-height: 32px; }

  /* 汇报页：手机是主战场，大数字要够大、按钮要够好点 */
  .report-big { gap: 16px; }
  .report-stat-num { font-size: 26px; }
  .report-q { font-size: 14px; }
  .report-head .btn { min-height: 34px; padding: 7px 12px; font-size: 13px; }
  .report-select { max-width: none; width: 100%; flex: 1 1 100%; }
  .report-picker { align-items: flex-start; }
  .name-chip { min-height: 32px; padding: 6px 11px; }
  .insight-actions .btn { min-height: 32px; }
  .report-brief-text { font-size: 14px; padding: 12px 13px; }
  .insight-evidence summary { padding: 6px 0; }
}

@media (min-width: 900px) {
  .input, .select, .textarea { font-size: 14px; }
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { min-height: 82px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }

.inline-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }
.inline-form .grow { flex: 1 1 200px; min-width: 0; }

.check-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; }
.check-group-title { font-size: 12px; font-weight: 650; color: var(--muted); padding: 7px 8px 3px; }
.check-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.check-item:hover { background: var(--panel-2); }
.check-item input { width: 16px; height: 16px; accent-color: var(--accent); flex: 0 0 auto; }

/* -------------------------------------------------------------- 工具栏 */

.toolbar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.toolbar .grow { flex: 1 1 180px; min-width: 0; }
.toolbar .select { width: auto; min-width: 120px; }

.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.segmented button {
  padding: 6px 11px; border: none; background: var(--panel); color: var(--ink-2);
  font-size: 13px; font-family: inherit; cursor: pointer; border-right: 1px solid var(--line);
}
.segmented button:last-child { border-right: none; }
.segmented button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ---------------------------------------------------------------- 图表 */

/* -------------------------------------------------------------- 搜索 */

.search-wrap { position: relative; flex: 1 1 auto; max-width: 340px; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 60vh; overflow-y: auto; z-index: 40; padding: 6px;
}
.search-group-title { font-size: 11px; font-weight: 650; color: var(--muted); padding: 7px 10px 3px; }
.search-item { padding: 7px 10px; border-radius: 7px; cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.search-item:hover, .search-item.sel { background: var(--accent-soft); }
.search-item .t { font-size: 13.5px; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item .s { font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }

/* ---------------------------------------------------------------- 弹层 */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(12, 16, 24, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 60; overflow-y: auto;
}
.modal {
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px; max-height: 90vh;
  display: flex; flex-direction: column; margin: auto;
}
.modal.wide { max-width: 820px; }
.modal-head {
  padding: 15px 18px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 10px;
}
.modal-head h2 { font-size: 15.5px; margin: 0; flex: 1 1 auto; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot {
  padding: 13px 18px; border-top: 1px solid var(--line-2);
  display: flex; gap: 9px; justify-content: flex-end; align-items: center;
}
.modal-foot .spacer { flex: 1 1 auto; }

/* ---------------------------------------------------------------- 提示 */

.toast-root { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #1f242c; color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); max-width: 88vw;
}
.toast.ok { background: #15703a; }
.toast.err { background: #a8241b; }

.banner {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 16px; line-height: 1.55;
}
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.info { background: var(--accent-soft); color: var(--accent); }
.banner b { font-weight: 650; }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }

.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.qr-box { background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); display: inline-block; }
.qr-box img { display: block; width: 168px; height: 168px; }

/* ============================================================ 手机端 */

@media (max-width: 899px) {
  .sidebar { display: none; }
  .app { flex-direction: column; }
  .content { padding: 14px 14px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }
  .topbar { padding: 10px 14px; flex-direction: column; align-items: stretch; gap: 9px; }
  .topbar .head-row { display: flex; align-items: center; gap: 10px; }
  .topbar h1 { font-size: 16px; }
  .search-wrap { max-width: none; }

  .tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    backdrop-filter: saturate(160%) blur(10px);
    border-top: 1px solid var(--line);
    z-index: 30;
  }
  .tabbar button {
    flex: 1 1 0; border: none; background: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 10.5px; color: var(--muted); font-family: inherit;
    padding: 6px 2px; min-width: 0;
  }
  .tabbar button .ico { font-size: 18px; line-height: 1; }
  .tabbar button.active { color: var(--accent); font-weight: 600; }

  .stat-num { font-size: 22px; }
  .stat { padding: 12px 13px; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 9px; }
  .card { border-radius: 10px; }
  .row { padding: 11px 13px; }
  .row-actions { opacity: 1; }
  .modal { max-height: 96vh; border-radius: 14px 14px 0 0; margin: auto auto 0; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-head, .modal-body, .modal-foot { padding-left: 15px; padding-right: 15px; }
  .modal-foot { padding-bottom: calc(13px + env(safe-area-inset-bottom)); }
  .btn { padding: 8px 13px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 78px 1fr; }
  .toast-root { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); }
  .sheet-backdrop { position: fixed; inset: 0; background: rgba(12,16,24,.45); z-index: 50; display: flex; align-items: flex-end; }
  .sheet {
    background: var(--panel); width: 100%; border-radius: 16px 16px 0 0;
    padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
  }
  .sheet .nav-item { padding: 13px 14px; font-size: 15px; }
}

@media (min-width: 900px) {
  .topbar .head-row { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
  .search-wrap { margin-left: auto; }
  .sheet-backdrop { display: none; }
}

@media print {
  .sidebar, .tabbar, .topbar, .row-actions, .btn { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  /* 汇报页交材料用：去掉彩色底，让黑白打印也读得清 */
  .report-card { gap: 8px; }
  .report-stat-num { font-size: 24px; }
  .name-chip { background: none !important; border-color: #bbb; color: #000; }
  .report-good { background: none; border-left: 3px solid #999; }
  .report-bar { border: 1px solid #bbb; }
  .report-bar-fill { background: #666 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-hint { display: none; }
}

/* ------------------------------------------------- 教学资料：导入与预览 */

/* 知识点标签做成了按钮（点一下筛出同知识点的全部资料），
   要把浏览器给 button 的默认边框和字体清掉，否则和普通 chip 长得不一样。 */
.chips button.chip {
  border: none; cursor: pointer; font: inherit; font-size: 11.5px;
  padding: 1px 7px; border-radius: 6px;
}
.chips button.chip:hover { filter: brightness(.95); }
.chip.active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chips button.chip.active:hover { filter: brightness(1.05); }

.muted-sm { font-size: 12px; color: var(--muted); }

/* HTML 讲解：沙箱 iframe。给足高度，不然讲解里的图示全挤在一条缝里。 */
.mat-frame-wrap { display: flex; }
.mat-frame {
  width: 100%; height: 68vh; min-height: 380px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}

/* 导入面板 */
.imp-wrap { display: flex; flex-direction: column; gap: 10px; }
.imp-hint {
  font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 9px 11px;
}
.imp-bar { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.imp-bar-inner {
  height: 100%; width: 0; border-radius: 4px; background: var(--accent);
  transition: width .25s ease;
}
.imp-stat { font-size: 12.5px; color: var(--ink-2); min-height: 18px; }
.imp-list {
  max-height: 42vh; overflow-y: auto;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--panel-2);
}
.imp-empty { padding: 18px 12px; text-align: center; font-size: 12.5px; color: var(--muted); }
.imp-row {
  display: flex; gap: 10px; align-items: baseline;
  padding: 5px 10px; border-bottom: 1px solid var(--line-2); font-size: 12.5px;
}
.imp-row:last-child { border-bottom: none; }
.imp-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.imp-size { flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.imp-more { padding: 7px 10px; font-size: 12px; color: var(--muted); }
.imp-log { max-height: 130px; overflow-y: auto; }
.imp-fail { font-size: 12px; color: var(--bad); padding: 2px 0; word-break: break-all; }

/* 导入前的「会归到哪些分类」预览：用来在传之前发现「选的范围太大了」 */
.imp-sum-wrap:empty { display: none; }
.imp-sum-wrap {
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--panel-2); padding: 9px 11px;
}
.imp-sum { font-size: 12.5px; color: var(--muted); }
.imp-sum-title { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.imp-sum-row { display: flex; gap: 8px; align-items: baseline; margin-top: 4px; }
.imp-sum-k { flex: 0 0 30px; font-size: 12px; color: var(--muted); }
.imp-sum-row .chips { margin-top: 0; }
.imp-sum-warn {
  margin-top: 7px; font-size: 12px; line-height: 1.55;
  color: var(--warn); background: var(--warn-soft);
  border-radius: 6px; padding: 6px 8px;
}

/* 「已隐藏 N 个页面碎片」的提示条：必须让老师知道东西被藏起来了，
   否则他会以为资料导入丢了。默认隐藏，一键可看，不做任何破坏性操作。 */
.mat-frag-note {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px; padding: 7px 11px;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); font-size: 12.5px; color: var(--muted);
}
.mat-frag-note > span { flex: 1 1 260px; line-height: 1.5; }

/* 「可能相关」的知识点：浅色 + 虚线边，和确定的知识点一眼分得开。
   两个小按钮（✓ 确认 / ✕ 忽略）直接跟在标签里，老师不用点开资料就能定。
   这是「不要加新的输入字段」的落点：确认动作是点一下，不是填表。 */
.chip-guess {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: 1px dashed var(--line-2);
  color: var(--muted); opacity: .95;
}
.chip-guess .chip-act {
  border: 0; background: transparent; cursor: pointer;
  color: inherit; font-size: 12px; line-height: 1; padding: 0 1px;
  opacity: .7; border-radius: 3px;
}
.chip-guess .chip-act:hover { opacity: 1; background: var(--panel-2); }
.chip-guess:hover { border-style: solid; color: var(--fg); }

/* 「可能相关」提示条 + 全文搜索说明条：解释「为什么列表里没有」，
   否则老师会以为资料没导进来（其实命中的是他选择隐藏的碎片）。 */
.mat-guess-note, .mat-search-note {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px; padding: 8px 11px;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); font-size: 12.5px; color: var(--muted);
}
.mat-guess-note > span, .mat-search-note > span { flex: 1 1 300px; line-height: 1.55; }

/* 「扫描电脑里的资料」面板：只出报告，不上传。 */
.scan-tip {
  margin-bottom: 12px; padding: 10px 13px; line-height: 1.65;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); font-size: 12.5px; color: var(--muted);
}
.scan-head { font-weight: 600; margin: 12px 0 8px; }
.scan-list-title { font-size: 12.5px; color: var(--muted); margin: 10px 0 6px; }
.scan-list { max-height: 42vh; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.scan-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 9px; font-size: 12.5px; border-bottom: 1px solid var(--line-2);
}
.scan-row:last-child { border-bottom: 0; }
.scan-row .imp-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-cat { flex: 0 0 auto; color: var(--muted); }
.scan-tag { flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 999px; }
.scan-tag.frag { background: var(--panel-2); color: var(--muted); }
.scan-tag.bad { background: #fdeaea; color: #a33; }
.scan-dup-note {
  margin-top: 10px; padding: 8px 11px; font-size: 12.5px; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
}
.scan-result { margin-top: 4px; }

@media (max-width: 899px) {
  .mat-frame { height: 62vh; min-height: 300px; }
  .imp-list { max-height: 36vh; }
}
