/* 考拉熊 OJ 升级版 Demo —— 视觉参考现有系统（Ant Design · 深蓝主色 #0D47A1） */
:root {
  --primary: #0d47a1;
  --primary-hover: #1565c0;
  --primary-weak: #e8eef8;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1f2329;
  --text-2: #4e5969;
  --muted: #8a919e;
  --border: #e9ecf1;
  --border-2: #f0f2f5;
  --green: #15803d;
  --green-bg: #e8f6ed;
  --blue: #1d4ed8;
  --blue-bg: #e9effd;
  --orange: #b45309;
  --orange-bg: #fdf3e3;
  --red: #b91c1c;
  --red-bg: #fdecec;
  --purple: #6d28d9;
  --purple-bg: #f1ebfd;
  --cyan: #0e7490;
  --cyan-bg: #e5f6fa;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------- 顶部导航（参考现有系统：白底 64px + 品牌深蓝） ---------- */
.hdr {
  position: sticky; top: 0; z-index: 60;
  height: 64px; background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 28px;
  padding: 0 28px;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #0d47a1, #1565c0);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 17px;
  box-shadow: 0 2px 6px rgba(13, 71, 161, .25);
}
.brand-name { font-size: 17px; font-weight: 700; color: var(--primary); letter-spacing: .3px; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.nav { display: flex; align-items: stretch; gap: 2px; height: 64px; flex: 1; overflow-x: auto; }
.nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 0 13px; color: var(--text-2); font-size: 14px;
  border-bottom: 2px solid transparent; cursor: pointer;
  white-space: nowrap; transition: color .15s, border-color .15s;
}
.nav-item:hover { color: var(--primary); }
.nav-item.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.nav-ico { width: 16px; height: 16px; opacity: .85; }
.hdr-right { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-2);
  position: relative;
}
.icon-btn:hover { background: var(--border-2); color: var(--primary); }
.dot-badge {
  position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px; background: #e5484d; color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.role-switch { display: flex; align-items: center; gap: 8px; background: var(--border-2); border-radius: 8px; padding: 3px; }
.role-switch button {
  border: 0; background: transparent; padding: 5px 10px; border-radius: 6px;
  font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.role-switch button.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--primary-weak);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px; border: 1px solid #cfdcf0; cursor: pointer;
}
.who { display: flex; flex-direction: column; line-height: 1.2; }
.who b { font-size: 13px; }
.who span { font-size: 11px; color: var(--muted); }

/* ---------- 布局 ---------- */
.wrap { max-width: 1360px; margin: 0 auto; padding: 20px 28px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -.2px; display: flex; align-items: center; gap: 10px; }
.page-desc { color: var(--muted); font-size: 13px; margin-top: 4px; }
.crumb { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.crumb b { color: var(--text-2); font-weight: 500; }
.row { display: flex; gap: 16px; }
.row.wrap-r { flex-wrap: wrap; }
.col { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.b { font-weight: 600; }
.mono { font-family: var(--mono); }
.right { text-align: right; } .center { text-align: center; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex.between { justify-content: space-between; }
.flex.wrap-f { flex-wrap: wrap; }
.gap4 { gap: 4px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.grow { flex: 1; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border-2); min-height: 50px;
}
.card-hd h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-hd .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.card-bd { padding: 16px 18px; }
.card-bd.tight { padding: 8px 12px; }
.card-bd.flush { padding: 0; }
.card-ft { padding: 10px 18px; border-top: 1px solid var(--border-2); background: #fcfcfd; font-size: 12px; color: var(--muted); }
.card.hover:hover { border-color: #cfdcf0; box-shadow: 0 6px 18px rgba(13, 71, 161, .08); }
.card.accent { border-left: 3px solid var(--primary); }
.mini-title { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .2px; margin-bottom: 8px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid #d4d9e2;
  background: #fff; color: var(--text); font-size: 13px; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--primary); padding: 0 8px; }
.btn.ghost:hover { background: var(--primary-weak); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 5px; }
.btn.danger { color: var(--red); border-color: #f0c4c4; background: #fff; }
.btn.danger:hover { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.btn.dark { background: #1f2937; border-color: #1f2937; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 6px 6px 0; }
.btn-group .btn.on { background: var(--primary); color: #fff; border-color: var(--primary); position: relative; z-index: 1; }

/* ---------- 标签 / 徽标 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 4px; font-size: 12px; background: #f2f4f7; color: var(--text-2);
  border: 1px solid transparent; white-space: nowrap; line-height: 1;
}
.tag.blue { background: var(--blue-bg); color: var(--blue); }
.tag.green { background: var(--green-bg); color: var(--green); }
.tag.orange { background: var(--orange-bg); color: var(--orange); }
.tag.red { background: var(--red-bg); color: var(--red); }
.tag.purple { background: var(--purple-bg); color: var(--purple); }
.tag.cyan { background: var(--cyan-bg); color: var(--cyan); }
.tag.line { background: #fff; border-color: var(--border); color: var(--text-2); }
.tag.sm { height: 19px; font-size: 11px; padding: 0 6px; }
.tag.solid { background: var(--primary); color: #fff; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 600;
}
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: #f2f4f7; color: var(--text-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.green { background: #22c55e; } .dot.red { background: #ef4444; } .dot.orange { background: #f59e0b; } .dot.blue { background: #3b82f6; }

/* ---------- 指标 ---------- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin-top: 4px; line-height: 1.2; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat .d { font-size: 12px; margin-top: 2px; color: var(--muted); }
.stat .d.up { color: var(--green); } .stat .d.down { color: var(--red); }
.stat.primary { background: linear-gradient(135deg, #0d47a1, #1565c0); border-color: transparent; color: #fff; }
.stat.primary .k, .stat.primary .d { color: rgba(255,255,255,.75); }
.stat.primary .d.up { color: #b9f6ca; }

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
  background: #fafbfc; padding: 10px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafcff; }
.tbl .t-right { text-align: right; }
.tbl.compact th, .tbl.compact td { padding: 8px 12px; }
.tbl .strong { font-weight: 600; }

/* ---------- 进度 / 条 ---------- */
.bar { height: 7px; border-radius: 4px; background: #eef1f5; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.bar.green > i { background: #22c55e; } .bar.orange > i { background: #f59e0b; } .bar.red > i { background: #ef4444; }
.bar.lg { height: 10px; }
.bar-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.meter { display: flex; align-items: center; gap: 10px; }
.meter .bar { flex: 1; }
.meter b { font-size: 12px; min-width: 36px; text-align: right; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; padding: 10px 14px; font-size: 14px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs button:hover { color: var(--primary); }
.tabs button.on { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.tabs .count { font-size: 11px; background: var(--red); color: #fff; border-radius: 9px; padding: 1px 6px; margin-left: 5px; }

.seg { display: inline-flex; background: #f2f4f7; border-radius: 7px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 5px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg button.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.07); }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-2); }
.list-item:last-child { border-bottom: 0; }
.list-item:first-child { padding-top: 0; }
.li-main { flex: 1; min-width: 0; }
.li-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.li-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.li-right { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- 待办 / 时间轴 ---------- */
.todo { display: flex; gap: 12px; padding: 12px 14px; border-radius: 7px; border: 1px solid var(--border-2); background: #fff; margin-bottom: 8px; }
.todo:last-child { margin-bottom: 0; }
.todo.stu { border-left: 3px solid #ef4444; background: #fffafa; }
.todo.tea { border-left: 3px solid #f59e0b; background: #fffdf6; }
.todo .td-ico { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 13px; background: #f2f4f7; flex-shrink: 0; }
.todo.stu .td-ico { background: var(--red-bg); color: var(--red); }
.todo.tea .td-ico { background: var(--orange-bg); color: var(--orange); }

.tl { position: relative; padding-left: 22px; }
.tl:before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 18px 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item:before {
  content: ""; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: #fff; border: 2px solid #c9d3e3;
}
.tl-item.done:before { background: var(--primary); border-color: var(--primary); }
.tl-item.now:before { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13,71,161,.12); }
.tl-time { font-size: 12px; color: var(--muted); }
.tl-title { font-size: 14px; font-weight: 500; margin-top: 1px; }

/* ---------- 步骤条 ---------- */
.steps { display: flex; align-items: center; gap: 0; }
.step { display: flex; align-items: center; gap: 8px; flex: 1; }
.step .s-no {
  width: 24px; height: 24px; border-radius: 50%; background: #eef1f5; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.step.done .s-no { background: var(--primary); color: #fff; }
.step.now .s-no { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.step .s-tx { font-size: 12px; color: var(--muted); white-space: nowrap; }
.step.done .s-tx, .step.now .s-tx { color: var(--text); font-weight: 500; }
.step .s-line { flex: 1; height: 2px; background: var(--border); margin: 0 10px; }
.step.done .s-line { background: var(--primary); }

/* ---------- 提示条 ---------- */
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 7px; font-size: 13px; border: 1px solid; align-items: flex-start; }
.alert .ai { font-size: 15px; line-height: 1.4; }
.alert.info { background: var(--blue-bg); border-color: #c7d7f8; color: #1e3f8f; }
.alert.warn { background: var(--orange-bg); border-color: #f2d6a8; color: #8a4b09; }
.alert.danger { background: var(--red-bg); border-color: #f3c4c4; color: #9b1c1c; }
.alert.ok { background: var(--green-bg); border-color: #b9e3c6; color: #14532d; }
.alert .ttl { font-weight: 600; margin-bottom: 2px; }
.alert a { color: inherit; text-decoration: underline; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid #d4d9e2; border-radius: 6px; height: 34px; padding: 0 11px;
  outline: none; background: #fff; color: var(--text);
}
.textarea { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,71,161,.08); }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--primary); }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid #d4d9e2; border-radius: 6px; padding: 0 10px; height: 34px; background: #fff; min-width: 220px; }
.search input { border: 0; outline: none; flex: 1; height: 30px; background: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 10px; border-radius: 999px; background: #f2f4f7; font-size: 12px; color: var(--text-2); cursor: pointer; border: 1px solid transparent; }
.chip.on { background: var(--primary-weak); color: var(--primary); border-color: #c7d7f8; font-weight: 500; }

/* ---------- 掌握度色块 ---------- */
.mast { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.mast i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.m0 i { background: #e5e7eb; } .m1 i { background: #fbbf24; } .m2 i { background: #60a5fa; } .m3 i { background: #22c55e; }
.heat { display: flex; flex-wrap: wrap; gap: 4px; }
.heat span { width: 18px; height: 18px; border-radius: 3px; display: inline-block; }
.h0 { background: #eef1f5; } .h1 { background: #fde68a; } .h2 { background: #93c5fd; } .h3 { background: #4ade80; }

/* ---------- 榜单 ---------- */
.rank { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border-2); }
.rank:last-child { border-bottom: 0; }
.rank .no { width: 24px; height: 24px; border-radius: 6px; background: #f2f4f7; color: var(--text-2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.rank .no.g1 { background: #fef3c7; color: #b45309; } .rank .no.g2 { background: #e5e7eb; color: #4b5563; } .rank .no.g3 { background: #fde8d7; color: #9a3412; }
.rank .who { flex: 1; font-size: 13px; }
.rank .sc { font-weight: 700; font-family: var(--mono); }

/* ---------- 图表 ---------- */
.chart { width: 100%; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.vbars { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 8px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.vbar .vb { width: 100%; max-width: 34px; background: linear-gradient(180deg, #3b82f6, #0d47a1); border-radius: 4px 4px 0 0; min-height: 4px; }
.vbar .vl { font-size: 11px; color: var(--muted); }
.donut { width: 130px; height: 130px; border-radius: 50%; position: relative; }
.donut:after { content: ""; position: absolute; inset: 22px; background: #fff; border-radius: 50%; }
.donut .ctr { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; }
.donut .ctr b { font-size: 20px; } .donut .ctr span { font-size: 11px; color: var(--muted); }

/* ---------- 代码块 ---------- */
.code { background: #0f172a; color: #e2e8f0; border-radius: 7px; padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; overflow-x: auto; }
.code .c { color: #64748b; } .code .k { color: #93c5fd; } .code .s { color: #86efac; } .code .n { color: #fca5a5; }
.diff { font-family: var(--mono); font-size: 12.5px; border-radius: 7px; overflow: hidden; border: 1px solid var(--border); }
.diff div { padding: 2px 12px; white-space: pre-wrap; }
.diff .add { background: #e9f9ef; color: #14532d; } .diff .del { background: #fdecec; color: #7f1d1d; } .diff .ctx { background: #fafbfc; color: var(--text-2); }

/* ---------- 弹窗 / 抽屉 ---------- */
.mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 10px; width: 640px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: pop .16s ease-out; }
@keyframes pop { from { transform: scale(.97); opacity: .6; } }
.modal.wide { width: 860px; }
.modal-hd { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-hd h3 { font-size: 16px; }
.modal-bd { padding: 18px 20px; overflow-y: auto; }
.modal-ft { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: #fcfcfd; border-radius: 0 0 10px 10px; }
.x { border: 0; background: transparent; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }

.drawer-mask { position: fixed; inset: 0; background: rgba(15,23,42,.25); z-index: 80; }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 400px; max-width: 92vw; background: #fff;
  z-index: 81; box-shadow: -8px 0 28px rgba(15,23,42,.14); display: flex; flex-direction: column;
  animation: slide .2s ease-out;
}
@keyframes slide { from { transform: translateX(30px); opacity: .6; } }
.drawer-hd { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.drawer-bd { flex: 1; overflow-y: auto; padding: 16px 18px; background: #fbfcfe; }
.drawer-ft { border-top: 1px solid var(--border); padding: 10px 14px; display: flex; gap: 8px; align-items: center; }
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg .av { width: 26px; height: 26px; border-radius: 8px; background: var(--primary-weak); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.msg .bubble { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 13px; max-width: 300px; }
.msg.user { flex-direction: row-reverse; }
.msg.user .bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.msg.user .av { background: #e5e9f0; color: var(--text-2); }
.guide-steps { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.guide-step { border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px; font-size: 12px; background: #fff; }
.guide-step b { color: var(--primary); }

/* ---------- 其他 ---------- */
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.divider { height: 1px; background: var(--border-2); margin: 12px 0; }
.empty { text-align: center; color: var(--muted); padding: 32px 0; font-size: 13px; }
.footer { text-align: center; color: #a7aebb; font-size: 12px; padding: 24px 0 8px; }
.demo-tip { font-size: 12px; color: var(--muted); background: #fbfcfe; border: 1px dashed var(--border); border-radius: 7px; padding: 8px 12px; }
.marker { outline: 2px dashed rgba(13,71,161,.25); outline-offset: 2px; border-radius: 6px; }
.hl { background: linear-gradient(transparent 62%, #ffe9a8 62%); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.link-arrow:after { content: " →"; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cover-item { border: 1px solid var(--border); border-radius: 7px; padding: 9px 11px; font-size: 12px; background: #fff; }
.cover-item b { font-family: var(--mono); font-size: 11.5px; color: var(--primary); }
.cover-item .cov { color: var(--green); }
.demo-note { position: fixed; right: 20px; bottom: 20px; z-index: 70; }
.ai-fab {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #0d47a1, #1976d2); color: #fff;
  box-shadow: 0 8px 20px rgba(13,71,161,.32); display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.ai-fab:hover { transform: translateY(-1px); }
.ai-lock { position: fixed; right: 20px; bottom: 20px; z-index: 70; background: #1f2937; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 12px; display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow-lg); }

/* 补充工具类 */
.gap8 { gap: 8px; }
.gap12 { gap: 12px; }
.mt4 { margin-top: 4px; }
.mt8 { margin-top: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 200;
  background: rgba(17,24,39,.94); color: #fff; font-size: 13px; padding: 10px 16px;
  border-radius: 8px; box-shadow: 0 10px 26px rgba(0,0,0,.22); max-width: 78vw; text-align: center;
}

@media (max-width: 1100px) {
  .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .g-1-2, .g-3-2 { grid-template-columns: 1fr; }
  .who { display: none; }
}
@media (max-width: 760px) {
  .wrap { padding: 14px; }
  .hdr { padding: 0 14px; gap: 12px; }
  .brand { min-width: auto; }
  .brand-sub { display: none; }
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; }
  .role-switch { display: none; }
  .page-title { font-size: 19px; }
}
