/* 师途 · 教师成长陪伴平台 · 视觉规范
   配色沿用原型：浅青底 + 深青主色 + 灰绿文字 */
:root {
  --bg: #eef6f4;
  --bg-soft: #e2f0eb;
  --panel: #ffffff;
  --brand: #2f8f83;
  --brand-deep: #1d6a61;
  --brand-soft: #d9ece7;
  --brand-pale: #f1f8f6;
  --ink: #22332f;
  --ink-2: #3d5350;
  --muted: #6d8a84;
  --line: #d6e7e2;
  --ok: #2fa36b;
  --fail: #e0653f;
  --warn: #e2a03a;
  --dark: #3b4a46;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(31, 92, 84, .08);
  --shadow-lg: 0 10px 30px rgba(31, 92, 84, .14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  /* Segoe UI 置顶：Windows 下某些环境安装的 PingFang SC 缺「·」字形映射，
     放在最前会导致间隔号渲染为方框；Segoe UI 必含该字形，中文仍由雅黑承接 */
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------------- 通用块 ---------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-deep); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.is-disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn.ghost:hover { background: var(--brand-pale); color: var(--brand-deep); }
.btn.dark { background: var(--dark); }
.btn.dark:hover { background: #2b3835; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.lg { height: 42px; padding: 0 26px; font-size: 15px; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12px;
}
.tag.ok { background: #daf1e5; color: var(--ok); }
.tag.fail { background: #fdeae3; color: var(--fail); }
.tag.warn { background: #fdf3de; color: var(--warn); }

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 143, 131, .12);
}
.textarea { min-height: 90px; resize: vertical; line-height: 1.7; }
.select { appearance: none; background-image: none; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 600;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 3px;
  background: var(--brand);
}

.muted { color: var(--muted); }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }
.hide { display: none !important; }

/* ---------------- 登录页 ---------------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: linear-gradient(135deg, #2f8f83 0%, #246d64 55%, #1d5a52 100%);
}
.login-hero {
  position: relative;
  padding: 64px 56px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.login-hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -160px auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.login-hero h1 { margin: 0 0 10px; font-size: 34px; letter-spacing: 1px; }
.login-hero p { margin: 0 0 34px; color: rgba(255, 255, 255, .82); font-size: 15px; }
.hero-list { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.hero-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .92);
}
.hero-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .16); }
.hero-list .n {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  font-size: 12px;
  display: grid;
  place-items: center;
}
.login-panel {
  background: var(--bg);
  border-radius: 26px 0 0 26px;
  padding: 56px 52px;
  display: flex;
  align-items: center;
}
.login-card { width: 100%; max-width: 380px; margin: 0 auto; }
.login-card h2 { margin: 0 0 6px; font-size: 24px; }
.login-card .sub { margin: 0 0 26px; color: var(--muted); }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ink-2); }
.tabs { display: flex; gap: 6px; margin-bottom: 24px; }
.tabs button {
  flex: 1;
  height: 38px;
  border: none;
  background: transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
}
.tabs button.on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.form-tip { margin-top: 14px; font-size: 12px; color: var(--muted); text-align: center; }
.alert {
  display: none;
  margin-bottom: 14px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fdeae3;
  color: var(--fail);
  font-size: 13px;
}
.alert.show { display: block; }

@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { border-radius: 0; padding: 40px 24px; }
}

/* ---------------- 主框架 ---------------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  padding: 0 22px;
  background: var(--brand-deep);
  color: #fff;
  box-shadow: 0 2px 12px rgba(20, 60, 55, .18);
}
.topbar .logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.topbar .logo i {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .18);
  display: grid; place-items: center;
  font-style: normal; font-size: 14px;
}
.topbar .crumbs { flex: 1; font-size: 13px; color: rgba(255, 255, 255, .72); }
.topbar .who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-deep);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600;
}
.topbar .who button {
  height: 30px; padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 8px;
  background: transparent;
  color: #fff; font-size: 13px;
}
.topbar .who button:hover { background: rgba(255, 255, 255, .14); }

.body { flex: 1; display: flex; gap: 18px; padding: 18px 22px 28px; align-items: flex-start; }

/* 树状目录 */
.sidebar {
  position: sticky;
  top: 78px;
  flex: none;
  width: 226px;
  padding: 14px 12px;
}
.tree-group { margin-bottom: 16px; }
.tree-group > .g-title {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  font-size: 13px; font-weight: 600;
  color: var(--brand-deep);
  background: var(--brand-pale);
  border-radius: 9px;
  margin-bottom: 6px;
}
.tree-group > .g-title .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}
.tree-item {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px 9px 22px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 14px;
  transition: all .16s;
}
.tree-item::before {
  content: "";
  position: absolute;
  left: 10px; top: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #bfd8d2;
  transform: translateY(-50%);
}
.tree-sep {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 10px 4px;
  font-size: 11px; color: var(--muted);
}
.tree-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.tree-item:hover { background: var(--brand-pale); color: var(--brand-deep); }
.tree-item.on { background: var(--brand); color: #fff; font-weight: 600; }
.tree-item.on::before { background: rgba(255, 255, 255, .85); }
.tree-item .soon { margin-left: auto; font-size: 11px; opacity: .7; }

/* 主区 */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 16px 20px;
}
.page-head h2 { margin: 0; font-size: 19px; }
.page-head .desc { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* 右栏（首页赛事） */
.rail { position: sticky; top: 78px; flex: none; width: 252px; }
.rail .card { padding: 16px; }
.rail h3 { margin: 0 0 12px; font-size: 15px; }
.rail-month { margin-bottom: 14px; }
.rail-month .m {
  display: inline-block;
  min-width: 40px;
  padding: 1px 8px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12px; font-weight: 600;
}
.rail-month ul { margin: 0; padding-left: 16px; color: var(--ink-2); font-size: 13px; }
.rail-month li { margin-bottom: 3px; }

/* ---------------- 首页概况 ---------------- */
.overview-top {
  display: grid;
  grid-template-columns: 268px 1fr;
  gap: 16px;
}
.level-card { padding: 20px; text-align: center; }
.level-card .avatar-lg {
  width: 88px; height: 88px; margin: 4px auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-soft), var(--bg-soft));
  color: var(--brand-deep);
  display: grid; place-items: center;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.teacher-avatar { width: 100%; height: 100%; line-height: 0; }
.teacher-avatar svg { width: 100%; height: 100%; display: block; }

/* 可点击替换的形象照 */
.avatar-editable { position: relative; cursor: pointer; }
.avatar-editable img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-mask {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(29, 106, 97, .55);
  color: #fff; font-size: 13px; letter-spacing: 1px;
}
.avatar-editable:hover .avatar-mask { display: flex; }
.avatar-reset {
  display: block; margin: -6px auto 10px;
  font-size: 12px; color: var(--muted); cursor: pointer; text-align: center;
}
.avatar-reset:hover { color: var(--brand-deep); text-decoration: underline; }
.level-card .name { font-size: 17px; font-weight: 600; }
.level-card .who-sub { color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.level-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 15px; font-weight: 600;
}
.level-step {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; color: var(--muted); font-size: 12px;
}
.level-step b { color: var(--brand-deep); }

.progress-card { padding: 20px; }
.progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bar { height: 9px; border-radius: 999px; background: var(--bg-soft); overflow: hidden; margin: 14px 0 8px; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #58b3a4); transition: width .6s ease; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.check-card { padding: 16px 18px; }
.check-card h4 {
  margin: 0 0 4px;
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
}
.check-card h4 .ico {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--brand-soft); color: var(--brand-deep);
  display: grid; place-items: center; font-size: 12px;
}
.check-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.check-row:last-child { border-bottom: none; }
.check-row .k { width: 108px; flex: none; color: var(--muted); }
.check-row .v { font-weight: 600; color: var(--ink); }
.check-row .req { margin-left: auto; font-size: 12px; color: var(--muted); }
.check-row .mark {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.mark.ok { background: var(--ok); }
.mark.fail { background: var(--fail); }
.mark.unknown { background: var(--warn); }
.check-row.gap-row { display: block; padding: 8px 0 0; border: none; }
.gap-text { font-size: 12px; color: var(--fail); }

/* 智能工具 */
.tools-wrap { padding: 16px 18px; }
.tools-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tool-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, var(--brand-pale));
  transition: transform .18s, box-shadow .18s;
  text-align: center;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tool-card .t-ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-deep);
  display: grid; place-items: center; font-size: 18px;
}
.tool-card .t-name { font-size: 14px; font-weight: 600; }
.tool-card .t-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* 建议 */
.suggest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.suggest-item {
  display: flex; gap: 12px; padding: 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--warn);
  border-radius: 12px; background: #fff;
}
.suggest-item h5 { margin: 0 0 4px; font-size: 14px; }
.suggest-item p { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; }

@media (max-width: 1280px) {
  .rail { display: none; }
  .tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .overview-top, .check-grid, .suggest-list { grid-template-columns: 1fr; }
}

/* ---------------- 表单页 ---------------- */
.form-card { padding: 20px 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-line { margin-bottom: 4px; }
.field-line label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ink-2); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.save-hint { margin-right: auto; font-size: 12.5px; color: var(--ok); opacity: 0; transition: opacity .3s; }
.save-hint.show { opacity: 1; }

.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-2); font-size: 13px;
  transition: all .16s;
}
.radio-chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-deep); font-weight: 600; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.grid th { background: var(--brand-pale); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
table.grid tbody tr:last-child td { border-bottom: none; }
table.grid tbody tr:hover { background: var(--brand-pale); }
table.grid td input {
  width: 100%; border: none; background: transparent; font: inherit; color: inherit; outline: none;
}
table.grid .op { color: var(--fail); cursor: pointer; white-space: nowrap; }

/* ---------------- 步骤条 ---------------- */
.stepper { display: flex; align-items: center; gap: 4px; padding: 16px 18px; overflow-x: auto; }
.step-node { display: flex; align-items: center; gap: 8px; }
.step-node .sn {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-soft); color: var(--muted);
  font-size: 13px; font-weight: 600;
}
.step-node .st { font-size: 13px; color: var(--muted); white-space: nowrap; }
.step-node.on .sn { background: var(--brand); color: #fff; }
.step-node.on .st { color: var(--brand-deep); font-weight: 600; }
.step-node.done .sn { background: var(--brand-soft); color: var(--brand-deep); }
.step-node.done .st { color: var(--ink-2); }
.step-line { flex: none; width: 18px; height: 2px; background: var(--line); border-radius: 2px; }

/* ---------------- 生成面板 ---------------- */
.gen-layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.gen-form { padding: 18px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 78px; }
.gen-form .hint-box {
  padding: 10px 12px; border-radius: 10px;
  background: #fdf7e8; color: #8a6314; font-size: 12px; line-height: 1.6;
}
.gen-output { display: flex; flex-direction: column; gap: 12px; }
.console {
  padding: 12px 14px; border-radius: 12px;
  background: #22332f; color: #b9e2d9;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px; line-height: 1.9;
  max-height: 132px; overflow: auto;
}
.console .row { display: flex; gap: 8px; }
.console .row::before { content: "›"; color: #58b3a4; }
.console .row.ok::before { content: "✓"; color: #6fd7a8; }

.doc {
  padding: 24px 28px; min-height: 420px;
  background: #fff;
}
.doc-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.doc-toolbar .title { font-weight: 600; flex: 1; }
.doc-body { font-size: 14px; line-height: 1.85; color: var(--ink); }
.doc-body h1 { font-size: 21px; margin: 4px 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--brand-soft); }
.doc-body h2 { font-size: 17px; margin: 22px 0 10px; padding-left: 10px; border-left: 4px solid var(--brand); }
.doc-body h3 { font-size: 15px; margin: 16px 0 8px; color: var(--brand-deep); }
.doc-body p { margin: 8px 0; }
.doc-body ul, .doc-body ol { padding-left: 22px; margin: 8px 0; }
.doc-body li { margin: 4px 0; }
.doc-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.doc-body th, .doc-body td { border: 1px solid var(--line); padding: 8px 10px; }
.doc-body th { background: var(--brand-pale); }
.doc-body blockquote {
  margin: 12px 0; padding: 10px 14px;
  border-left: 3px solid var(--brand); background: var(--brand-pale);
  color: var(--ink-2);
}
.doc-body pre {
  background: #f4f9f8; padding: 12px 14px; border-radius: 10px; overflow: auto;
  font-family: Consolas, monospace; font-size: 12.5px;
}
.doc-body code { background: #f0f6f5; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.doc-body hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.cursor {
  display: inline-block; width: 7px; height: 15px;
  background: var(--brand); vertical-align: -2px; animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------------- 模板卡片 / 占位页 ---------------- */
.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tpl-card {
  padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  transition: all .18s; cursor: pointer;
}
.tpl-card:hover { border-color: var(--brand); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.tpl-card.on { border-color: var(--brand); background: var(--brand-pale); }
.tpl-card .ic {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-deep);
  display: grid; place-items: center; font-size: 18px; margin-bottom: 10px;
}
.tpl-card h4 { margin: 0 0 6px; font-size: 15px; }
.tpl-card p { margin: 0; color: var(--muted); font-size: 12.5px; }

.flow-line { display: flex; align-items: center; gap: 10px; }
.flow-line .node {
  flex: 1; padding: 18px 12px; text-align: center;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  cursor: pointer; transition: all .18s;
}
.flow-line .node:hover, .flow-line .node.on {
  border-color: var(--brand); background: var(--brand-pale); color: var(--brand-deep);
}
.flow-line .arrow { color: var(--muted); }

.placeholder-card { padding: 56px 24px; text-align: center; }
.placeholder-card .ic {
  width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 20px;
  background: var(--brand-soft); color: var(--brand-deep);
  display: grid; place-items: center; font-size: 26px;
}
.placeholder-card h3 { margin: 0 0 8px; font-size: 18px; }
.placeholder-card p { margin: 0 auto; max-width: 460px; color: var(--muted); }

.loader {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1080px) {
  .gen-layout, .tpl-grid, .form-grid.three { grid-template-columns: 1fr; }
  .gen-form { position: static; }
}

/* ---------------- 小程序文稿（手机端同步） ---------------- */
.mini-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.mini-item:last-child { border-bottom: none; }
.mini-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.mini-meta { font-size: 12px; margin-top: 4px; }
.mini-from { font-size: 12px; color: var(--brand-deep); }

/* ---------------- 工作总结助手 ---------------- */
.sum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.sum-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sum-side { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.sum-card { padding: 18px; }
.sum-body .sum-card + .card, .sum-side .card { margin: 0; }
.sum-side .card { box-shadow: none; border: none; border-top: 1px solid var(--line); border-radius: 0; padding-top: 14px; }
.sum-side > .card:first-child { border-top: none; padding-top: 0; }

.sum-llm { display: flex; align-items: center; gap: 10px; }
.sum-llm .tag { white-space: nowrap; }

/* ---- 挑写法：骨架预览（纯配置渲染，不花生成次数） ---- */
.sum-modes { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.sum-mode-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; }
.sum-mode-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  background: var(--panel); cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.sum-mode-card:hover { border-color: var(--brand); }
.sum-mode-card.on { border-color: var(--brand-deep); box-shadow: 0 0 0 2px var(--brand-soft); }
.sum-mode-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sum-mode-name { font-weight: 600; color: var(--ink); font-size: 14px; }
.sum-mode-coll { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sum-mode-src { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.sum-mode-skel { display: flex; flex-direction: column; gap: 4px; }
.sum-mode-seg { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-2); }
.sum-mode-seg.lv1 { color: var(--brand-deep); font-weight: 600; margin-top: 6px; }
.sum-mode-seg-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-mode-seg-w { color: var(--muted); white-space: nowrap; }
.sum-mode-more { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.sum-mode-style { font-size: 12px; color: var(--ink-2); line-height: 1.6; margin: 10px 0 0; }
.sum-mode-topuse {
  display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-deep); color: #fff; font-size: 12px;
}
.sum-mode-stat { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.sum-mode-tried {
  display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep); font-size: 12px;
}

/* 降级提示：没配大模型时说清楚产出是什么 */
.sum-warn {
  padding: 10px 14px; margin: 0 0 14px; border-radius: 10px;
  background: #fff7e6; color: #a06000; font-size: 13px; line-height: 1.6;
}

/* 素材继承 */
.sum-inherit {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; margin: 0 0 14px; border-radius: 10px;
  background: var(--brand-pale);
}
.sum-inherit-t { font-size: 13px; color: var(--ink-2); line-height: 1.6; }

/* 生成页的当前写法条 */
.sum-modebar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; margin: 12px 0; border-radius: 10px; background: var(--brand-pale);
}
.sum-modebar-l { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sum-mode-now { font-weight: 600; color: var(--ink); }
.sum-mode-src2 { font-size: 12px; color: var(--muted); }

/* 写法模式里的章标题：只做结构，不生成正文 */
.sum-chapter {
  margin: 20px 0 6px; font-size: 16px; font-weight: 600; color: var(--brand-deep);
}

.sum-step-on { color: var(--brand-deep); font-weight: 600; }
.stepper .sn.done { background: var(--brand-soft); color: var(--brand-deep); }
.stepper .sn.on { background: var(--brand); color: #fff; }

/* 用途卡片：第一层分类，所以视觉权重最高 */
.sum-purposes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 6px; }
.sum-purpose {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  cursor: pointer; transition: all .18s;
}
.sum-purpose:hover { border-color: var(--brand); transform: translateY(-2px); }
.sum-purpose.on { border-color: var(--brand); background: var(--brand-pale); box-shadow: var(--shadow); }
.sum-purpose-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sum-purpose-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.sum-purpose.on .sum-purpose-name { color: var(--brand-deep); }
.sum-words { font-size: 12px; color: var(--muted); }
.sum-purpose-desc { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.sum-purpose-scene { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.sum-row { margin-bottom: 16px; }
.sum-row-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sum-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sum-hint { font-size: 12px; color: var(--muted); }
.sum-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sum-inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sum-unit { font-size: 13px; color: var(--muted); }

.sum-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sum-chip {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 20px; background: #fff;
  font-size: 13px; color: var(--ink-2); cursor: pointer; transition: all .15s;
}
.sum-chip:hover { border-color: var(--brand); }
.sum-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.sum-select, .sum-input, .sum-textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); font-size: 13.5px; font-family: inherit; outline: none;
}
.sum-input-sm { width: 120px; flex: none; }
.sum-textarea { resize: vertical; line-height: 1.7; }
.sum-textarea-lg { min-height: 220px; font-size: 14px; }
.sum-select:focus, .sum-input:focus, .sum-textarea:focus { border-color: var(--brand); }

.sum-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.sum-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 6px 0 0; }
.sum-progress { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--brand-pale); color: var(--brand-deep); font-size: 13px; }
.sum-tip { margin: 0 0 10px; padding: 9px 12px; border-radius: 9px; background: #fdf7e8; color: #8a6314; font-size: 12.5px; line-height: 1.6; }

/* 骨架预览 */
.sum-plan-item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.sum-plan-item:last-of-type { border-bottom: none; }
.sum-plan-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sum-plan-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.sum-plan-words { font-size: 12px; color: var(--muted); }
.sum-bar { height: 6px; margin: 6px 0; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.sum-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.sum-plan-reason { font-size: 12px; color: var(--muted); line-height: 1.6; }
.sum-plan-missing { font-size: 12px; color: var(--warn); margin-top: 2px; }
.sum-dropped { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* 事实卡 */
.sum-group { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.sum-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: var(--brand-pale); cursor: pointer;
}
.sum-group.open .sum-group-head { border-bottom: 1px solid var(--line); }
.sum-group-name { font-size: 14px; font-weight: 600; color: var(--brand-deep); }
.sum-group-desc { margin-left: 10px; font-size: 12px; color: var(--muted); }
.sum-group-arrow { font-size: 12px; color: var(--muted); flex: none; }
.sum-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 16px 14px; }
.sum-field label { display: block; margin-bottom: 6px; font-size: 12.5px; color: var(--ink-2); }
.sum-field-off { opacity: .55; }
.sum-field-off label::after { content: ''; }

/* 段落卡片 */
.sum-sec { padding: 16px 18px; }
.sum-sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.sum-sec-name { font-size: 15px; font-weight: 600; color: var(--brand-deep); }
.sum-sec-words { margin-left: 10px; font-size: 12px; color: var(--muted); }
.sum-sec-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.sum-style-menu { display: flex; gap: 6px; padding: 8px 10px; margin-bottom: 10px; border-radius: 10px; background: var(--bg-soft); }
.sum-empty { padding: 20px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* 体检 */
.sum-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sum-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 12px; border-radius: 20px; font-size: 12.5px; }
.sum-badge.ok { background: #e6f6ee; color: var(--ok); }
.sum-badge.warn { background: #fdf3e2; color: var(--warn); }
.sum-badge.fail { background: #fdece7; color: var(--fail); }
.sum-ph-box { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: var(--brand-pale); }
.sum-ph-box.warn { background: #fdf3e2; }
.sum-ph-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.sum-ph-item { font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }

.sum-reuse { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 10px; border-radius: 12px; background: var(--brand-pale); }

.sum-hist { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sum-hist:last-child { border-bottom: none; }
.sum-hist-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.sum-hist-meta { margin-left: 10px; font-size: 12px; color: var(--muted); }

/* 质量闸门：教师第一眼该知道的是「这篇能不能交」，而不是「多少字」 */
.sum-q-tag { margin-left: 10px; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.sum-q-tag.good { background: #e6f6ee; color: var(--ok); }
.sum-q-tag.fair { background: #fdf3e2; color: var(--warn); }
.sum-q-tag.poor { background: #fdece7; color: var(--fail); }
.sum-quality { margin: 10px 0 12px; padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.75; }
.sum-quality.good { background: #e6f6ee; color: #0d6b4f; }
.sum-quality.fair { background: #fdf3e2; color: #8a6314; }
.sum-quality.poor { background: #fdece7; color: #a5271f; }
.sum-sec-flag { margin-left: 10px; font-size: 12px; }
.sum-sec-flag.bad { color: var(--fail); }
.sum-sec-flag.wait { color: var(--muted); }
.sum-needfacts { padding: 18px 0 6px; text-align: center; }
.sum-needfacts .btn { margin-top: 10px; }

@media (max-width: 1180px) {
  .sum-layout { grid-template-columns: 1fr; }
  .sum-side { position: static; }
  .sum-purposes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sum-2col, .sum-fields { grid-template-columns: 1fr; }
}

/* ================= 工作总结助手（三档 + 十三项输入 + 方舟成稿） ================= */
.ws-head { margin-bottom: 14px; }
.ws-head h2 { font-size: 20px; margin: 0 0 6px; }
.ws-steps { display: flex; gap: 18px; margin-bottom: 14px; }
.ws-step {
  font-size: 13px; color: var(--muted); padding-bottom: 6px;
  border-bottom: 2px solid transparent;
}
.ws-step.on {
  color: var(--brand-deep); border-bottom-color: var(--brand-deep); font-weight: 600;
}
.ws-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .ws-layout { grid-template-columns: minmax(0, 1fr); } }

.ws-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 14px 0; }
.ws-tier { border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; }
.ws-tier:hover { border-color: var(--brand); }
.ws-tier.on {
  border-color: var(--brand-deep); background: var(--brand-pale);
  box-shadow: 0 0 0 2px rgba(42, 106, 233, .1);
}
.ws-tier-top { display: flex; align-items: baseline; gap: 8px; }
.ws-tier-code { font-size: 18px; font-weight: 700; color: var(--brand-deep); }
.ws-tier-name { font-size: 15px; font-weight: 600; }
.ws-tier-words { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.ws-tier-scene { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ws-tier-sec { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ws-tag { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: #f2f7ff; color: var(--brand-deep); }
.ws-tag.gray { background: #f5f5f5; color: var(--muted); }

/* ---- 第一步：选用途（用途驱动篇幅与文风，档位不再是第一选择） ---- */
.ws-purposes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 14px 0; }
.ws-purpose { border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; }
.ws-purpose:hover { border-color: var(--brand); }
.ws-purpose.on {
  border-color: var(--brand-deep); background: var(--brand-pale);
  box-shadow: 0 0 0 2px rgba(42, 106, 233, .1);
}
.ws-purpose-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ws-purpose-name { font-size: 15px; font-weight: 600; }
.ws-purpose-desc { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.ws-purpose-rec { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* 系统推荐条：把「系统替你定了什么」摊开说，别让老师自己去找 */
.ws-recbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 14px; margin: 10px 0 4px;
  border: 1px dashed var(--brand); border-radius: 10px; background: var(--brand-pale);
}
.ws-recbar-k { font-size: 12px; color: var(--brand-deep); font-weight: 600; }
.ws-recbar-v { font-size: 14px; font-weight: 600; flex: 1; }
.ws-recbar-d { font-size: 12px; color: var(--muted); }

/* 精细微调：默认折叠，档位与三个滑杆都在这里 */
.ws-group.collapsed { padding: 10px 14px; }
.ws-fold {
  margin-left: auto; font-size: 12px; color: var(--brand-deep);
  cursor: pointer; padding: 2px 8px; border: 1px solid var(--brand); border-radius: 999px;
}
.ws-tiersel { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-chip-sub { font-size: 11px; opacity: .75; margin-left: 4px; }
.toast.warn { background: #fff7e6; color: #a06000; border-color: #ffe0a3; }

.ws-autofill {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; margin: 10px 0 4px; border-radius: 10px; background: var(--brand-pale);
}
.ws-autofill-t { font-size: 13px; color: var(--ink-2); line-height: 1.6; }

.ws-group { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.ws-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.ws-group-name { font-size: 14px; font-weight: 600; }
.ws-group-desc { font-size: 12px; color: var(--muted); }
.ws-field { margin-bottom: 12px; }
.ws-field-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ws-label { font-size: 13px; color: var(--ink-2); }
.ws-src {
  font-size: 11px; color: var(--brand-deep); background: #f2f7ff;
  padding: 1px 6px; border-radius: 4px;
}
.ws-input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px;
}
.ws-area {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; line-height: 1.6;
}
.ws-inline { display: flex; align-items: center; gap: 8px; }
.ws-unit { font-size: 12px; color: var(--muted); }
.ws-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; cursor: pointer; }
.ws-chip.on { border-color: var(--brand-deep); background: var(--brand-deep); color: #fff; }
.ws-switch { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.ws-hint { font-size: 12px; color: var(--muted); margin: 5px 0 0; line-height: 1.6; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ws-error {
  padding: 10px 14px; border-radius: 10px; background: #fff2f0;
  color: #c0392b; font-size: 13px; margin-bottom: 12px; line-height: 1.6;
}
.ws-writing { padding: 30px; text-align: center; color: var(--muted); font-size: 13px; }
.ws-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ws-words { font-size: 14px; font-weight: 600; color: var(--ok); }
.ws-words.bad { color: var(--warn); }
.ws-warn-inline { font-size: 12px; color: var(--warn); }
.ws-doc {
  border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px;
  line-height: 1.9; font-size: 14px; max-height: 520px; overflow: auto;
}
.ws-doc p { margin: 0 0 10px; text-indent: 2em; }
.ws-hist-item {
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
}
.ws-hist-item:hover { background: var(--brand-pale); }
.ws-hist-item.on { background: var(--brand-pale); }
.ws-hist-title { font-size: 13px; }

/* 进度条与解锁提示（工作总结助手） */
.ws-progress { padding: 18px 0 8px; }
.ws-progress-track {
  height: 10px; border-radius: 999px; background: #edf1f7; overflow: hidden;
}
.ws-progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
  transition: width .4s ease;
}
.ws-progress-text { font-size: 12px; color: var(--muted); margin-top: 8px; }
.ws-locked {
  border: 1px dashed var(--brand); border-radius: 10px;
  background: var(--brand-pale); padding: 12px 14px; margin-bottom: 12px;
}
.ws-locked-t { font-size: 13px; color: var(--ink-2); line-height: 1.6; }

/* ---- 文风选择：五张表达侧重卡 / 三个微调滑杆 ---- */
.ws-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ws-style {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  cursor: pointer; line-height: 1.65; transition: border-color .15s, box-shadow .15s;
}
.ws-style:hover { border-color: var(--brand); }
.ws-style.on {
  border-color: var(--brand-deep); background: var(--brand-pale);
  box-shadow: 0 0 0 2px rgba(58, 110, 240, .12);
}
.ws-style.risky.on { border-color: var(--warn); background: #fff8ee; box-shadow: 0 0 0 2px rgba(230, 150, 20, .12); }
.ws-style-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.ws-style-name { font-size: 14px; font-weight: 600; }
.ws-badge {
  font-size: 11px; padding: 1px 6px; border-radius: 4px;
  background: #edf1f7; color: var(--muted);
}
.ws-badge.rec { background: var(--brand-pale); color: var(--brand-deep); }
.ws-badge.warn { background: #fff2f0; color: #c0392b; }
.ws-style-row { display: flex; gap: 6px; font-size: 12px; margin-bottom: 3px; }
.ws-style-k { flex: 0 0 auto; color: var(--muted); }
.ws-style-v { color: var(--ink-2); }
.ws-style-sample {
  font-size: 12px; color: var(--ink-2); background: #fafbfd; border-left: 2px solid var(--line);
  padding: 4px 8px; margin-top: 6px; border-radius: 0 6px 6px 0;
}
.ws-style-tip { font-size: 12px; color: var(--muted); margin-top: 5px; }
.ws-style-tip.warn { color: var(--warn); }

.ws-knob { display: flex; flex-direction: column; gap: 4px; }
.ws-knob-opts { display: flex; gap: 6px; }
.ws-knob-sides {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted);
}

/* ---- 成稿页：智能检查提醒 / 换侧重 / 快捷微调 / 双版本对比 ---- */
.ws-notice {
  padding: 8px 12px; border-radius: 8px; background: #fff8e6;
  color: #8a6100; font-size: 12px; line-height: 1.6;
}
.ws-report {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 12px;
}
.ws-report-t { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.ws-report-list { display: flex; flex-direction: column; gap: 4px; }
.ws-report-row {
  font-size: 12px; line-height: 1.6; padding: 4px 8px;
  border-radius: 6px; background: #fff8e6; color: #8a6100;
}
.ws-report-row.bad { background: #fff2f0; color: #c0392b; }
.ws-report-clean { font-size: 12px; color: var(--ok); }

.ws-tweak { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-top: 12px; }
.ws-tweak-t { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; line-height: 1.6; }
.ws-tweak-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.ws-tweak-k { flex: 0 0 auto; font-size: 12px; color: var(--muted); padding-top: 5px; }
.ws-tweak-btns { display: flex; flex-wrap: wrap; gap: 6px; }

.ws-compare { border: 1px dashed var(--brand); border-radius: 10px; padding: 10px 14px; margin-top: 12px; }
.ws-compare-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.ws-compare-col { display: flex; flex-direction: column; }
.ws-compare-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.ws-compare-name { font-size: 13px; font-weight: 600; }
.ws-doc.short { max-height: 320px; }

/* 进度条：智能体常常几十秒不给数据，条纹要一直流动，
   否则教师只看到一根不动的条，会以为页面卡死了 */
.ws-progress-fill {
  background-image: linear-gradient(90deg,
    rgba(255, 255, 255, .35) 25%, transparent 25%, transparent 50%,
    rgba(255, 255, 255, .35) 50%, rgba(255, 255, 255, .35) 75%,
    transparent 75%, transparent);
  background-size: 22px 22px;
  animation: ws-stripe 1s linear infinite;
}
@keyframes ws-stripe {
  from { background-position: 0 0; }
  to { background-position: 22px 0; }
}

/* ================= 职称成长工作台（首页） ================= */
/* ① 顶条：当前职称 → 目标职称 + 达标大数字 */
.wb-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 26px;
  margin-bottom: 16px;
  background:
    radial-gradient(1200px 300px at 0% 0%, rgba(47, 143, 131, .12), transparent 60%),
    linear-gradient(135deg, #f2faf7, #ffffff);
}
.wb-hero-title { font-size: 22px; font-weight: 700; color: var(--brand-deep); }
.wb-hero-sub { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.wb-arrow { margin: 0 10px; color: var(--muted); }
.wb-hero-right { text-align: right; }
.wb-percent { font-size: 44px; font-weight: 800; line-height: 1; color: var(--brand-deep); }
.wb-percent-meta { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ② 职称差距诊断 */
.wb-diag { padding: 20px 24px; margin-bottom: 16px; }
.wb-diag-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wb-diag-head .section-title { margin-bottom: 0; }
.wb-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.wb-dim { padding: 14px 16px; border-radius: 12px; }
.wb-dim.wb-ok { background: #f0f9f4; border: 1px solid #cdeedb; }
.wb-dim.wb-gap { background: #fdf6ee; border: 1px solid #f2e2c8; }
.wb-dim-cap { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.wb-dim-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
}
.chip.ok { color: var(--ok); border-color: #bfe6d1; background: #eefaf3; }
.chip.gap { color: #a9771f; border-color: #ecdcba; background: #fdf7ec; }
.wb-diag-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.wb-report { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.wb-report .check-grid { margin-top: 12px; }

/* ③ 素材积累 */
.wb-material { padding: 20px 24px; margin-bottom: 16px; }
.wb-cat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.wb-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  transition: all .18s ease;
}
.wb-cat:hover { border-color: var(--brand); background: var(--brand-pale); }
.wb-cat-name { font-size: 14px; color: var(--ink-2); }
.wb-cat-num {
  min-width: 24px; height: 24px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: #eef1ee; color: var(--muted); font-size: 12px;
}
.wb-cat-num.has { background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.wb-material-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 18px; flex-wrap: wrap;
}
.wb-total { font-size: 14px; color: var(--brand-deep); font-weight: 600; }

/* ④ 智能生成 */
.wb-gen { padding: 20px 24px; margin-bottom: 16px; }
.wb-gen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.wb-gen-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdfc, #ffffff);
  transition: all .18s ease;
}
.wb-gen-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.wb-gen-ico {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--brand-soft); color: var(--brand-deep);
  font-size: 20px; font-weight: 700;
}
.wb-gen-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.wb-gen-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.wb-gen-note { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

/* ⑤ 我的档案 */
.wb-archive { padding: 20px 24px; margin-bottom: 16px; }
.wb-archive-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.wb-archive-avatar { flex: 0 0 auto; }
.wb-archive-info { flex: 1 1 auto; min-width: 200px; }
.wb-archive-info .name { font-size: 20px; font-weight: 700; color: var(--ink); }
.wb-archive-info .who-sub { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.wb-archive-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ⑥ 后端检测（仅开发可见） */
.wb-devcard {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 12px;
  border-radius: 12px; background: #eef2ee; border: 1px dashed var(--line);
}
.wb-dev-label { font-size: 12px; color: var(--muted); }
.wb-dev-url { font-size: 12px; color: var(--ink-2); font-family: Consolas, monospace; }
.wb-detect-text { font-size: 12px; color: var(--muted); }
.wb-detect-text.ok { color: var(--ok); font-weight: 600; }
.wb-detect-text.fail { color: var(--fail); font-weight: 600; }

@media (max-width: 760px) {
  .wb-dims { grid-template-columns: 1fr; }
  .wb-hero-right { text-align: left; }
  .wb-archive-actions { margin-top: 8px; }
}

/* 顶条头像（职称成长工作台标题左侧；恢复默认形象在头像下方） */
.wb-hero-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.wb-hero-avatar { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.wb-avatar {
  position: relative; width: 52px; height: 52px; border-radius: 50%;
  overflow: hidden; cursor: pointer; flex: none;
  background: linear-gradient(135deg, var(--brand-soft), var(--bg-soft));
  box-shadow: 0 0 0 3px #fff, var(--shadow);
}
.wb-avatar img, .wb-avatar .teacher-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.wb-avatar .avatar-mask {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(29, 106, 97, .55); color: #fff; font-size: 11px; border-radius: 50%;
}
.wb-avatar:hover .avatar-mask { display: flex; }
.wb-hero-avatar .avatar-reset {
  font-size: 12px; color: var(--muted); cursor: pointer; display: none; white-space: nowrap;
}
.wb-hero-avatar .avatar-reset:hover { color: var(--brand-deep); text-decoration: underline; }

/* 右侧栏：职称冲刺中心 */
.sp-percent { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.sp-percent b { font-size: 20px; color: var(--brand-deep); }
.sp-progress-bar { height: 10px; border-radius: 999px; background: var(--brand-pale); border: 1px solid var(--line); overflow: hidden; }
.sp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-deep)); transition: width .4s; }
.sp-block { margin-top: 16px; }
.sp-cap { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.sp-gaps { margin: 0 0 10px; padding-left: 18px; }
.sp-gaps li { font-size: 13px; color: #a9771f; margin-bottom: 4px; }
.sp-block.ok { color: var(--ok); font-size: 13px; }
.sp-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-qlink {
  display: inline-block; padding: 6px 12px; border-radius: 8px; font-size: 13px;
  background: var(--brand-soft); color: var(--brand-deep);
}
.sp-qlink:hover { background: var(--brand); color: #fff; }
.rail ul { margin: 0; padding-left: 0; list-style: none; }
.rail .rail-month { margin-bottom: 12px; }
.rail ul li { margin: 4px 0; }
.rail ul li a { display: block; font-size: 13px; color: var(--ink-2); padding: 3px 6px; border-radius: 6px; }
.rail ul li a:hover { background: var(--brand-pale); color: var(--brand-deep); }
.rail-tip { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.rail-item a { display: flex; align-items: flex-start; gap: 6px; }
.rail-kind { flex: none; margin-top: 1px; padding: 0 7px; border-radius: 999px; font-size: 11px; line-height: 18px; }
.rail-kind.ev { background: var(--brand-soft); color: var(--brand-deep); }
.rail-kind.ap { background: #fdf3de; color: var(--warn); }
.rail-item-btn {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 6px 8px; border: none; background: transparent;
  border-radius: 8px; font-family: inherit; cursor: pointer; text-align: left;
}
.rail-item-btn:hover { background: var(--brand-pale); }
.rail-txt { flex: 1; font-size: 13px; color: var(--ink-2); }
.rail-caret { flex: none; color: var(--muted); font-size: 12px; }
.rail-detail { padding: 8px 10px 10px 30px; border-top: 1px dashed var(--line); margin-top: 4px; }
.rail-detail p { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

/* ========== 素材库五大类卡片（首页素材区 & 素材库总览） ========== */
.wb-material-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wb-material-head .section-title { margin: 0; }
.wb-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.wb-group {
  display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--brand-pale));
  text-decoration: none; transition: box-shadow .18s, transform .18s, border-color .18s;
}
.wb-group:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.wb-group-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wb-group-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.wb-group-num {
  min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line);
}
.wb-group-num.has { color: #fff; background: var(--brand); border-color: var(--brand); }
.wb-group-desc { margin: 6px 0 10px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.wb-group-subs { display: flex; flex-wrap: wrap; gap: 5px; }
.wb-sub-chip { padding: 1px 7px; border-radius: 6px; font-size: 11px; color: var(--ink-2); background: var(--brand-soft); }
.wb-sub-chip.has { color: var(--brand-deep); background: var(--brand-pale); border: 1px solid var(--brand-soft); }
.wb-group-go { margin-top: 10px; font-size: 12px; color: var(--brand-deep); }

/* ========== 素材录入页：按细分类分组 ========== */
.mat-card { margin-bottom: 14px; }
.mat-head { display: flex; align-items: center; gap: 10px; }
.mat-head h4 { margin: 0; font-size: 15px; color: var(--ink); }
.mat-count { font-size: 12px; color: var(--muted); }
.mat-head .btn { margin-left: auto; }
.mat-list { list-style: none; margin: 10px 0 0; padding: 0; }
.mat-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); }
.mat-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mat-item-title { font-size: 13.5px; color: var(--ink); }
.mat-item-meta { font-size: 12px; color: var(--muted); }
.mat-form { margin-top: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--brand-pale); }
.mat-form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mat-label { flex: none; width: 40px; font-size: 12.5px; color: var(--ink-2); }
.mat-form-row .input { flex: 1; width: auto; }
.mat-form-actions { display: flex; gap: 8px; margin-top: 4px; }
.mat-empty { margin-top: 10px; padding: 14px 0; text-align: center; font-size: 12.5px; color: var(--muted); }
