:root {
  /* 康礼品牌：金 × 苹果灰（金 #CAA47B 取自导师制 PPT）—— 高级感演绎 */
  --purple-950: #1B2A44;
  --purple-900: #2c2c2e;
  --purple-800: #A97F50;
  --purple-700: #8A6A43;
  --purple-500: #CAA47B;
  --purple-300: #D9C4A6;
  --purple-100: #F5EFE4;
  --gold: #CAA47B;
  --gold-600: #A97F50;
  --gold-300: #D9C4A6;
  --gold-100: #F5EFE4;
  --cream: #FBF8F3;
  --ink: #1B2A44;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --card: #ffffff;
  --red: #5A4A34;
  --amber: #5A4A34;
  --green: #5A4A34;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 28px rgba(0,0,0,.10);
  --radius: 18px;
  --serif: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", serif;
}
* { box-sizing: border-box; }
/* 关键：让 hidden 属性真正生效（.modal-overlay 等用 display:flex，会覆盖 UA 的 [hidden]{display:none}） */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 26px;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: #fff; color: var(--purple-700); border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.brand-text h1 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.2px; color: var(--ink); font-family: inherit; }
.brand-text p { margin: 0; font-size: 11px; color: var(--muted); letter-spacing: .3px; }
.topbar-right { display: flex; gap: 16px; align-items: flex-end; }
.field-inline { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.field-inline span { color: var(--muted); letter-spacing: .2px; }
.field-inline select, .field-inline input {
  min-width: 150px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; background: #fff; color: var(--ink);
}
.field-inline select option { color: var(--ink); }

/* ---------- 标签页 ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 26px 0; background: rgba(255,255,255,.6); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: none; padding: 11px 15px; font-size: 14px; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; letter-spacing: -.1px;
  transition: color .18s, border-color .18s;
  flex: 0 0 auto; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--purple-800); border-bottom-color: var(--purple-800); }
.tab .ic { opacity: .85; }

main { padding: 24px 26px 48px; max-width: 1320px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 面板 ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; position: relative;
}
.panel h2 { margin: 0 0 8px; font-size: 17px; font-weight: 650; color: var(--ink); letter-spacing: -.2px; }
.panel h3 { margin: 14px 0 6px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- 表单 ---------- */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row.inline { align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 160px; margin-bottom: 12px; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: .2px; }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--ink); width: 100%; transition: border .15s, box-shadow .15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--purple-500); box-shadow: 0 0 0 3px rgba(196,173,121,.22);
}

.star-detail { margin: 6px 0 4px; }
.star-detail summary { cursor: pointer; color: var(--purple-700); font-size: 13px; font-weight: 600; }
.star-detail .field { margin-top: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); transition: all .15s;
}
.btn:hover { border-color: var(--purple-300); background: var(--purple-100); }
.btn.primary {
  background: linear-gradient(180deg, #B08A5A 0%, #A97F50 55%, #8A6A43 100%);
  color: #fff; border-color: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), inset 0 -1px 0 rgba(0,0,0,.12), 0 2px 7px rgba(80,60,20,.22);
  text-shadow: 0 1px 1px rgba(0,0,0,.12);
}
.btn.primary:hover { background: linear-gradient(180deg, #bda273 0%, #a88a55 55%, #95793f 100%); }
.btn.gold {
  background: linear-gradient(180deg, #f3ead2 0%, #D9C4A6 55%, #CAA47B 100%);
  color: #1B2A44; border-color: rgba(140,111,62,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 7px rgba(80,60,20,.16);
}
.btn.gold:hover { background: linear-gradient(180deg, #f7f0dd 0%, #e0d0a4 55%, #c9b283 100%); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 10px; }
.btn.danger { color: var(--red); border-color: #E6DCCD; }
.btn.danger:hover { background: #F5EFE4; }


/* ---------- 上传 ---------- */
.upload-zone { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.upload-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1.5px dashed var(--purple-300);
  border-radius: 10px; cursor: pointer; color: var(--purple-700); font-weight: 600; font-size: 13px; background: var(--purple-100);
  transition: all .15s;
}
.upload-btn:hover { border-color: var(--purple-500); background: #F5EFE4; }
.media-preview { display: flex; gap: 10px; flex-wrap: wrap; }
.media-item { position: relative; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #FBF8F3; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item .rm {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; border: none; cursor: pointer; font-size: 12px; line-height: 20px; padding: 0;
}

/* ---------- 分类结果 ---------- */
.classify-result { padding: 4px 0; }
.classify-result.empty { color: var(--muted); font-size: 13px; }
.engine-tag { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.engine-tag.llm { background: var(--gold-100); color: var(--gold-600); }
.engine-tag.heuristic { background: #F1F0EC; color: #6b6b78; }
.clz-dim { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.clz-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  border: 1.5px solid var(--line); cursor: pointer; background: #fff; font-size: 13px; font-weight: 600; transition: all .12s;
  color: var(--dim, var(--ink));
}
.clz-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim, var(--purple-500)); flex-shrink: 0; }
.clz-chip:hover { border-color: var(--dim, var(--purple-300)); }
.clz-chip.selected { border-color: var(--dim, var(--purple-700)); background: color-mix(in srgb, var(--dim, var(--purple-700)) 16%, #fff); color: var(--dim, var(--purple-800)); }
.clz-chip .pct { font-size: 11px; color: var(--muted); font-weight: 500; }
.clz-chip.selected .pct { color: var(--dim, var(--purple-500)); }

.lv-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }

/* IB 学习者特质标签（小学部特色） */
.lp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lp-chip {
  position: relative;
  display: inline-flex; align-items: center; padding: 6px 13px; border-radius: 999px;
  border: 1.5px solid var(--line); cursor: pointer; background: #fff; font-size: 13px; font-weight: 600; transition: all .12s;
  color: var(--ink);
}
.lp-chip::after {
  content: 'IB';
  position: absolute; top: -6px; right: -3px;
  font-size: 9px; font-weight: 800; line-height: 1; letter-spacing: .02em;
  padding: 2px 4px; border-radius: 5px;
  background: #CAA47B; color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.lp-chip:hover { border-color: var(--gold-400, #CAA47B); transform: translateY(-1px); }
.lp-chip.selected { background: linear-gradient(120deg, #1B2A44, #2E4A6E); color: #fff; border-color: transparent; }

.lv-btn { padding: 7px 13px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; font-weight: 700; transition: all .12s; }
.lv-btn:hover { border-color: var(--purple-300); }
.lv-btn.selected { background: linear-gradient(120deg, var(--purple-800), var(--purple-700)); color: #fff; border-color: transparent; }
.lv-btn .tag { display: block; font-size: 10.5px; font-weight: 500; opacity: .82; }

.evidence { margin: 8px 0; font-size: 12px; color: var(--muted); }
.evidence b { color: var(--ink); }
.tag-kw { display: inline-block; padding: 1px 8px; margin: 2px; background: var(--purple-100); color: var(--purple-700); border-radius: 6px; font-size: 11.5px; }

.alert { padding: 11px 13px; border-radius: 11px; font-size: 13px; margin: 8px 0; }
.alert.red { background: #F5EFE4; color: var(--red); border: 1px solid #E6DCCD; }
.alert.amber { background: #F5EFE4; color: var(--amber); border: 1px solid #E6DCCD; }
.alert.green { background: #F5EFE4; color: var(--green); border: 1px solid #E6DCCD; }

/* ---------- 信息流 ---------- */
.feed { display: flex; flex-direction: column; gap: 12px; }
.feed-item { border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.03); }
.feed-item:hover { box-shadow: var(--shadow); }
.feed-item .meta { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.feed-item .meta b { color: var(--purple-800); font-size: 13px; }
.feed-item .txt { font-size: 13.5px; white-space: pre-wrap; }
.feed-item .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.feed-media { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.feed-media img, .feed-media video { height: 72px; border-radius: 9px; border: 1px solid var(--line); object-fit: cover; max-width: 130px; background: var(--cream); }
/* 长列表顺滑渲染：跳过屏外卡片的排版与绘制（不支持的浏览器自动忽略） */
.feed-item { content-visibility: auto; contain-intrinsic-size: 240px; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.pill.dim { background: var(--purple-100); color: var(--purple-700); }
.pill.lp { position: relative; background: #E8EDF4; color: #1B2A44; }
.pill.lp::after {
  content: 'IB';
  position: absolute; top: -5px; right: -2px;
  font-size: 8px; font-weight: 800; line-height: 1; letter-spacing: .02em;
  padding: 1.5px 3px; border-radius: 4px;
  background: #CAA47B; color: #fff;
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, .16);
}
.pill.lv { background: var(--gold-100); color: var(--gold-600); }
.pill.green { background: #F5EFE4; color: #5A4A34; }
.pill.amber { background: #F5EFE4; color: #A97F50; }
.pill.red { background: #F5EFE4; color: #5A4A34; }
.pill.redline { background: #F5EFE4; color: #5A4A34; }

/* 批量记录折叠展示（一次性评价多位学生） */
.batch-badge {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; background: #F0E7D9; color: #8A6A43;
}
.batch-toggle {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--purple-700);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.batch-toggle:hover { border-color: var(--purple-300); }
.batch-detail { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
.batch-student { padding: 8px 0; border-bottom: 1px solid var(--line); }
.batch-student:last-child { border-bottom: none; padding-bottom: 0; }
.bs-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bs-head b { font-size: 13px; color: var(--purple-800); }

/* ---------- 子标签 ---------- */
.sub-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.sub-tab { border: none; background: none; padding: 9px 18px; cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 600; border-bottom: 2px solid transparent; transition: all .15s; }
.sub-tab:hover { color: var(--purple-700); }
.sub-tab.active { color: var(--purple-800); border-bottom-color: var(--gold); }
.stab { display: none; }
.stab.active { display: block; animation: fade .22s ease; }

/* ---------- 表格 ---------- */
.table-wrap { overflow: auto; max-height: 470px; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { position: sticky; top: 0; background: var(--purple-100); font-size: 12px; color: var(--purple-800); }
tr:hover td { background: #FBF8F3; }
.cohort-badge { font-size: 10.5px; background: var(--gold); color: var(--purple-900); border-radius: 999px; padding: 1px 7px; font-weight: 700; margin-left: 6px; }

.badge { background: var(--purple-100); color: var(--purple-700); border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; }

/* ---------- 报告 ---------- */
.report-body { margin-top: 10px; }
.report-body.empty { color: var(--muted); padding: 34px; text-align: center; }

.rpt-cover {
  border-radius: 20px; overflow: hidden; color: #fff; margin-bottom: 20px; position: relative;
  border: 1px solid rgba(196,173,121,.22);
  background:
    radial-gradient(130% 140% at 100% 0%, rgba(196,173,121,.22) 0%, transparent 52%),
    radial-gradient(120% 120% at 0% 100%, rgba(196,173,121,.10) 0%, transparent 48%),
    linear-gradient(135deg, #1B2A44 0%, #242427 38%, #3a3322 72%, #5A4A34 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--shadow-lg);
}
.rpt-cover .inner { padding: 30px 32px 26px; position: relative; z-index: 1; }
.rpt-cover .school { font-size: 13px; letter-spacing: 3px; color: var(--gold-300); text-transform: uppercase; }
.rpt-cover h1 { margin: 10px 0 2px; font-size: 30px; font-family: var(--serif); font-weight: 700; letter-spacing: 1px; }
.rpt-cover h1 .zh-name { color: var(--gold); }
.rpt-cover .sub { font-size: 13px; opacity: .85; letter-spacing: 1px; }
.rpt-cover .rule { height: 2px; background: linear-gradient(90deg, var(--gold), transparent); margin: 16px 0 14px; }
.rpt-meta { display: flex; gap: 26px; flex-wrap: wrap; font-size: 13px; }
.rpt-meta .k { color: var(--gold-300); margin-right: 5px; }

.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
@media (max-width: 720px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-align: center; box-shadow: var(--shadow);
}
.stat-card .num { font-size: 26px; font-weight: 800; font-family: var(--serif); color: var(--purple-800); }
.stat-card .num.gold { color: var(--gold-600); }
.stat-card .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

.rpt-section { margin: 22px 0; }
.rpt-section > h3 { font-size: 16px; font-family: var(--serif); color: var(--purple-900); margin: 0 0 12px; padding-bottom: 7px; border-bottom: 2px solid var(--gold-300); display: flex; align-items: center; gap: 8px; }
.rpt-section > h3::before { content: "❖"; color: var(--gold); }

.dim-grid { display: grid; grid-template-columns: 1.05fr 1.4fr; gap: 18px; align-items: center; }
@media (max-width: 820px) { .dim-grid { grid-template-columns: 1fr; } }
.radar-box { background: #fafafa; border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.radar-box svg { max-width: 100%; height: auto; }
.dim-list { display: flex; flex-direction: column; }
.dim-bar { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.dim-bar:last-child { border-bottom: none; }
.dim-bar .dname { width: 120px; font-weight: 700; font-size: 13px; flex-shrink: 0; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.dim-bar .dname small { display: block; font-weight: 400; color: var(--muted); font-size: 10.5px; }
.d-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim, var(--purple-500)); flex-shrink: 0; }
.lv-scale { display: flex; gap: 3px; flex: 1; }
.lv-cell { flex: 1; text-align: center; padding: 4px 0; border-radius: 6px; font-size: 10.5px; background: #F1F0EC; color: #8e8e93; }
.lv-cell.on { color: #fff; font-weight: 700; }
.lv-cell.on.L1 { background: #e7dcc0; color: #3F2F10; }
.lv-cell.on.L2 { background: #D9C4A6; color: #3F2F10; }
.lv-cell.on.L3 { background: #CAA47B; color: #3f2f10; }
.lv-cell.on.L4 { background: #B08A5A; color: #fff; }
.lv-cell.on.L5 { background: #5A4A34; color: #fff; }
.dim-bar .cnt { width: 44px; text-align: right; color: var(--muted); font-size: 12px; }

.rpt-note { background: var(--gold-100); border: 1px solid var(--gold-300); border-radius: 11px; padding: 11px 14px; font-size: 12.5px; color: #5A4A34; margin: 8px 0; }

.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.hl-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.03);
  position: relative; overflow: hidden;
}
.hl-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--purple-500), var(--gold)); }
.hl-card .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.hl-card .txt { font-size: 13.5px; }
/* ---------- 报告首页：8 维度与 L1–L5 说明 ---------- */
.cover-model { margin-top: 18px; border-top: 1px solid rgba(255,255,255,.18); padding-top: 16px; }
.cm-head .cm-title { font-family: var(--serif); font-size: 15px; color: var(--gold); letter-spacing: 1px; margin-bottom: 6px; }
.cm-intro { font-size: 12px; line-height: 1.75; color: rgba(255,255,255,.78); margin: 0 0 12px; max-width: 880px; }
.cm-sub { font-size: 11px; color: var(--gold-300); letter-spacing: 1.6px; margin: 12px 0 8px; text-transform: uppercase; }
.cm-dims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.cm-group { grid-column: 1 / -1; font-size: 10px; letter-spacing: 1px; color: rgba(255,255,255,.48); margin-top: 2px; }
.cm-dim { display: flex; gap: 8px; align-items: flex-start; padding: 6px 9px; border-radius: 9px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); }
.cm-dim .cm-dot { margin-top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--dim, var(--purple-500)); flex-shrink: 0; }
.cm-dim b { display: block; font-size: 12px; color: #fff; font-weight: 700; }
.cm-dim .cm-desc { display: block; font-size: 10.5px; line-height: 1.55; color: rgba(255,255,255,.62); margin-top: 1px; }
.cm-levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.cm-level { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); border-radius: 9px; padding: 8px 9px; }
.cm-lv { display: inline-block; font-size: 9.5px; font-weight: 800; color: #2b210c; background: var(--gold); border-radius: 999px; padding: 0 7px; margin-bottom: 4px; }
.cm-level b { display: block; font-size: 11.5px; color: #fff; }
.cm-level .cm-tag { display: block; font-size: 9.5px; line-height: 1.5; color: rgba(255,255,255,.6); margin-top: 2px; }
.cm-hint { font-size: 10px; color: rgba(255,255,255,.46); margin-top: 8px; }
@media (max-width: 720px) { .cm-dims { grid-template-columns: 1fr; } .cm-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 报告正文：全部火花 ---------- */
.h3-num { font-family: inherit; font-size: 11.5px; font-weight: 700; color: var(--gold-600); background: var(--gold-100); border: 1px solid var(--gold-300); border-radius: 999px; padding: 1px 9px; }
.spark-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: -4px 0 12px; }
.level-dist { display: flex; flex-wrap: wrap; gap: 5px; }
.lv-chip { font-size: 10.5px; border-radius: 999px; padding: 2px 8px; background: #F1F0EC; color: #8e8e93; border: 1px solid var(--line); }
.lv-chip.L1 { background: #f3ead6; color: #6b551f; border-color: #e4d3ab; }
.lv-chip.L2 { background: #eee3c9; color: #6b551f; border-color: #ddc99a; }
.lv-chip.L3 { background: #e8d9b7; color: #5b4716; border-color: #d4bd8e; }
.lv-chip.L4 { background: #d9c396; color: #3F2F10; border-color: #c4a976; }
.lv-chip.L5 { background: #5A4A34; color: #fff; border-color: #5A4A34; }
.spark-card.low { background: #FBF8F3; }
.spark-card.low::before { background: linear-gradient(var(--purple-300), var(--gold-300)); opacity: .75; }
.spark-card .txt { white-space: pre-wrap; }

/* ---------- 报告正文：AI 学生画像 ---------- */
.ai-card { border: 1px solid var(--gold-300); border-radius: 16px; padding: 16px 18px; background: linear-gradient(160deg, #fdfaf2 0%, #f6f1e6 100%); box-shadow: var(--shadow); }
.ai-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.ai-badge { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: #3f2f10; background: linear-gradient(135deg, var(--gold), #e8d3a0); border-radius: 999px; padding: 2px 9px; }
.ai-kicker { font-size: 11.5px; color: #7a6a4e; }
.ai-block { margin: 10px 0; }
.ai-block h4 { margin: 0 0 5px; font-size: 13px; color: var(--purple-900); font-family: var(--serif); }
.ai-sum { margin: 0; font-size: 13.5px; line-height: 1.85; color: #3c3c40; white-space: pre-wrap; }
.ai-actions { margin: 2px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.8; color: #3c3c40; }
.ai-actions li { margin-bottom: 4px; }
.ai-note { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--gold-300); font-size: 10.5px; color: #8a7a5c; }
.ai-loading { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 12px 0; }
.spinner-sm { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #E6DCCD; border-top-color: var(--gold-600); animation: spin .8s linear infinite; display: inline-block; flex-shrink: 0; }
.ai-empty { font-size: 12.5px; color: var(--muted); padding: 10px 0; line-height: 1.7; }
.rpt-empty p { font-size: 13px; color: var(--muted); line-height: 1.8; text-align: center; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; margin: 0; }

.rpt-sign { display: flex; gap: 40px; justify-content: flex-end; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.rpt-footer { text-align: center; margin-top: 20px; font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }


.rpt-sign { display: flex; gap: 40px; justify-content: flex-end; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.rpt-footer { text-align: center; margin-top: 20px; font-size: 11.5px; color: var(--muted); letter-spacing: 1px; }


/* ================= 2026 康礼品牌 · 成长报告 ================= */
/* 取自《2026 康礼市场 UI》：象牙白 #FBF8F3 / 深藏青 #1B2A44 / 古铜 #8A6A43 / 浅铜 #CAA47B */
#reportBody, .report-export {
  --rpt-navy: #1B2A44;
  --rpt-navy-deep: #0F1626;
  --rpt-bronze: #8A6A43;
  --rpt-bronze-light: #CAA47B;
  --rpt-taupe: #D9C4A6;
  --rpt-ivory: #FBF8F3;
  --rpt-ivory-2: #F5EFE4;
  --rpt-ink: #2E3A4E;
  --rpt-muted: #8C857C;
  --rpt-line: #E6DCCD;
  --purple-950: #0F1626; --purple-900: #1B2A44; --purple-800: #1B2A44; --purple-700: #8A6A43;
  --purple-500: #CAA47B; --purple-300: #D9C4A6; --purple-100: #F5EFE4;
  --gold: #CAA47B; --gold-600: #8A6A43; --gold-300: #D9C4A6; --gold-100: #F7F2EA;
  --ink: #1B2A44; --muted: #8C857C; --line: #E6DCCD; --card: #ffffff;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--rpt-navy);
}

#reportBody .rpt-cover, .report-export .rpt-cover {
  background: var(--rpt-ivory);
  color: var(--rpt-navy);
  border: 1px solid var(--rpt-line);
  border-top: 4px solid var(--rpt-navy);
  border-radius: 2px;
  box-shadow: none;
  margin-bottom: 26px;
}
#reportBody .rpt-cover .inner, .report-export .rpt-cover .inner { padding: 30px 40px 26px; }
#reportBody .cover-logo, .report-export .cover-logo { margin-bottom: 18px; }
#reportBody .cover-logo img, .report-export .cover-logo img { height: 96px; width: auto; display: block; }
#reportBody .rpt-cover .school, .report-export .rpt-cover .school {
  color: var(--rpt-bronze); font-family: "Cinzel", "Optima", "Palatino Linotype", serif;
  font-size: 10.5px; letter-spacing: .22em; line-height: 1.7; text-transform: uppercase;
}
#reportBody .rpt-cover h1, .report-export .rpt-cover h1 {
  color: var(--rpt-navy); font-family: var(--serif); font-size: 30px; font-weight: 500;
  letter-spacing: .06em; line-height: 1.38; margin: 12px 0 5px;
}
#reportBody .rpt-cover h1 .zh-name, .report-export .rpt-cover h1 .zh-name { color: var(--rpt-navy); }
#reportBody .rpt-cover h1 .en-name, .report-export .rpt-cover h1 .en-name {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif; font-style: italic;
  font-size: .56em; color: var(--rpt-bronze); letter-spacing: .04em; margin-left: 7px;
}
#reportBody .rpt-cover h1 .title-sep, .report-export .rpt-cover h1 .title-sep { color: var(--rpt-bronze-light); margin: 0 6px; }
#reportBody .rpt-cover .sub, .report-export .rpt-cover .sub { color: var(--rpt-muted); opacity: 1; font-size: 12px; letter-spacing: .08em; }
#reportBody .rpt-cover .rule, .report-export .rpt-cover .rule {
  height: 1px; background: linear-gradient(90deg, var(--rpt-bronze), rgba(138,106,67,0)); margin: 18px 0 15px;
}
#reportBody .rpt-meta, .report-export .rpt-meta { color: var(--rpt-navy); font-size: 12px; gap: 24px; }
#reportBody .rpt-meta .k, .report-export .rpt-meta .k { color: var(--rpt-bronze); letter-spacing: .06em; }
#reportBody .cover-motto, .report-export .cover-motto {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--rpt-line);
}
#reportBody .cover-motto .zh, .report-export .cover-motto .zh { font-family: var(--serif); font-size: 14px; letter-spacing: .26em; color: var(--rpt-bronze); }
#reportBody .cover-motto .en, .report-export .cover-motto .en {
  font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 13px; letter-spacing: .04em; color: var(--rpt-muted);
}

/* 首页模型说明 */
#reportBody .cover-model, .report-export .cover-model { margin-top: 20px; border-top: 1px solid var(--rpt-line); padding-top: 16px; }
#reportBody .cm-head .cm-title, .report-export .cm-head .cm-title {
  font-family: var(--serif); font-size: 14px; color: var(--rpt-bronze); font-weight: 500; letter-spacing: .14em; margin-bottom: 6px;
}
#reportBody .cm-intro, .report-export .cm-intro { color: #4A5364; font-size: 11.5px; line-height: 1.75; max-width: 860px; }
#reportBody .cm-sub, .report-export .cm-sub { color: var(--rpt-bronze); font-size: 10.5px; letter-spacing: .18em; margin: 11px 0 7px; }
#reportBody .cm-group, .report-export .cm-group { color: var(--rpt-muted); font-size: 9.5px; letter-spacing: .14em; }
#reportBody .cm-dim, .report-export .cm-dim {
  background: #fff; border: 1px solid var(--rpt-line); border-radius: 2px; padding: 6px 9px;
}
#reportBody .cm-dim .cm-dot, .report-export .cm-dim .cm-dot { background: var(--rpt-bronze-light); }
#reportBody .cm-dim b, .report-export .cm-dim b { color: var(--rpt-navy); font-weight: 600; }
#reportBody .cm-dim .cm-desc, .report-export .cm-dim .cm-desc { color: #6B6F76; }
#reportBody .cm-level, .report-export .cm-level { background: #fff; border: 1px solid var(--rpt-line); border-radius: 2px; }
#reportBody .cm-lv, .report-export .cm-lv { background: var(--rpt-navy); color: var(--rpt-bronze-light); }
#reportBody .cm-level b, .report-export .cm-level b { color: var(--rpt-navy); }
#reportBody .cm-level .cm-tag, .report-export .cm-level .cm-tag { color: #6B6F76; }
#reportBody .cm-hint, .report-export .cm-hint { color: var(--rpt-muted); }

/* 概览数字 */
#reportBody .stat-card, .report-export .stat-card {
  background: #fff; border: 1px solid var(--rpt-line); border-top: 2px solid var(--rpt-bronze-light);
  border-radius: 2px; box-shadow: none; padding: 15px 14px;
}
#reportBody .stat-card .num, .report-export .stat-card .num { font-family: var(--serif); font-weight: 500; color: var(--rpt-navy); }
#reportBody .stat-card .num.gold, .report-export .stat-card .num.gold { color: var(--rpt-bronze); }
#reportBody .stat-card .lbl, .report-export .stat-card .lbl { color: var(--rpt-muted); letter-spacing: .06em; }

/* 章节 */
#reportBody .rpt-section, .report-export .rpt-section { margin: 28px 0; }
#reportBody .rpt-section > h3, .report-export .rpt-section > h3 {
  font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--rpt-navy);
  letter-spacing: .06em; border-bottom: 1px solid var(--rpt-taupe); padding-bottom: 8px; gap: 10px;
}
#reportBody .rpt-section > h3::before, .report-export .rpt-section > h3::before {
  content: ""; width: 7px; height: 7px; border-radius: 1px; background: var(--rpt-bronze-light); display: inline-block;
}

/* 雷达 / 维度 */
#reportBody .radar-box, .report-export .radar-box { background: #fff; border: 1px solid var(--rpt-line); border-radius: 2px; padding: 14px; }
#reportBody .dim-bar, .report-export .dim-bar { border-bottom: 1px solid #F0E8DC; }
#reportBody .dim-bar .dname, .report-export .dim-bar .dname { color: var(--rpt-navy); font-weight: 600; }
#reportBody .dim-bar .cnt, .report-export .dim-bar .cnt { color: var(--rpt-muted); }
#reportBody .lv-cell, .report-export .lv-cell { background: #F3EEE5; color: #8C857C; border-radius: 2px; }
#reportBody .lv-cell.on.L1, .report-export .lv-cell.on.L1 { background: #E7DCCB; color: #5A4A34; }
#reportBody .lv-cell.on.L2, .report-export .lv-cell.on.L2 { background: #DCC9AD; color: #4F3E28; }
#reportBody .lv-cell.on.L3, .report-export .lv-cell.on.L3 { background: #C9A87C; color: #3F2F10; }
#reportBody .lv-cell.on.L4, .report-export .lv-cell.on.L4 { background: #A97F50; color: #fff; }
#reportBody .lv-cell.on.L5, .report-export .lv-cell.on.L5 { background: #1B2A44; color: #FBF8F3; }

/* 火花卡片 */
#reportBody .hl-card, .report-export .hl-card {
  background: #fff; border: 1px solid var(--rpt-line); border-radius: 2px; box-shadow: none;
}
#reportBody .hl-card::before, .report-export .hl-card::before { width: 2px; background: var(--rpt-bronze-light); }
#reportBody .hl-card .meta, .report-export .hl-card .meta { color: var(--rpt-muted); }
#reportBody .hl-card .txt, .report-export .hl-card .txt { color: var(--rpt-ink); line-height: 1.75; }
#reportBody .h3-num, .report-export .h3-num { color: var(--rpt-bronze); background: var(--rpt-ivory); border-color: var(--rpt-taupe); }
#reportBody .lv-chip.L1, .report-export .lv-chip.L1 { background: #F0E7D9; color: #5A4A34; border-color: #E0D0B6; }
#reportBody .lv-chip.L2, .report-export .lv-chip.L2 { background: #E5D5BE; color: #5A4A34; border-color: #D2BB97; }
#reportBody .lv-chip.L3, .report-export .lv-chip.L3 { background: #D6BD98; color: #3F2F10; border-color: #C09C6F; }
#reportBody .lv-chip.L4, .report-export .lv-chip.L4 { background: #B08A5A; color: #fff; border-color: #8A6A43; }
#reportBody .lv-chip.L5, .report-export .lv-chip.L5 { background: #1B2A44; color: #FBF8F3; border-color: #1B2A44; }
#reportBody .spark-card.low, .report-export .spark-card.low { background: var(--rpt-ivory); }
#reportBody .spark-card.low::before, .report-export .spark-card.low::before { background: var(--rpt-taupe); opacity: 1; }
#reportBody .pill, .report-export .pill { background: var(--rpt-ivory); color: var(--rpt-bronze); border-color: var(--rpt-line); }
#reportBody .pill.lv, .report-export .pill.lv { background: var(--rpt-navy); color: var(--rpt-ivory); border-color: var(--rpt-navy); }
#reportBody .pill.dim, .report-export .pill.dim { background: var(--rpt-ivory); color: var(--rpt-bronze); }
#reportBody .pill.lp, .report-export .pill.lp { background: #EDF1F6; color: var(--rpt-navy); border-color: var(--rpt-taupe); }
#reportBody .lp-summary, .report-export .lp-summary { display: flex; flex-wrap: wrap; gap: 8px; }
/* 报告顶部「IB 学习者特质」汇总区已带标题，胶囊不再重复加 IB 角标 */
#reportBody .lp-summary .pill.lp::after, .report-export .lp-summary .pill.lp::after { content: none; }

/* 谈话 / 预警条目 */
#reportBody .feed-item, .report-export .feed-item {
  background: #fff; border: 1px solid var(--rpt-line) !important; border-left: 2px solid var(--rpt-bronze-light) !important;
  border-radius: 2px; padding: 12px 14px;
}
#reportBody .feed-item .meta, .report-export .feed-item .meta { color: var(--rpt-muted); }
#reportBody .feed-item .txt, .report-export .feed-item .txt { color: var(--rpt-ink); }

/* 计划 / 提示 */
#reportBody .rpt-note, .report-export .rpt-note {
  background: var(--rpt-ivory); border: 1px solid var(--rpt-line); border-radius: 2px; color: #5A4A34;
}
#reportBody .rpt-empty p, .report-export .rpt-empty p { border: 1px dashed var(--rpt-taupe); border-radius: 2px; color: var(--rpt-muted); }
#reportBody .rpt-footer, .report-export .rpt-footer {
  color: var(--rpt-muted); font-size: 10.5px; letter-spacing: .16em; border-top: 1px solid var(--rpt-line);
  padding-top: 12px; margin-top: 26px;
}

/* 学生画像 */
#reportBody .ai-card, .report-export .ai-card {
  background: var(--rpt-ivory); border: 1px solid var(--rpt-taupe); border-radius: 2px; box-shadow: none; padding: 18px 20px;
}
#reportBody .ai-kicker, .report-export .ai-kicker { color: var(--rpt-bronze); font-size: 11px; letter-spacing: .06em; }
#reportBody .ai-block h4, .report-export .ai-block h4 {
  color: var(--rpt-navy); font-family: var(--serif); font-weight: 500; font-size: 14px; letter-spacing: .06em;
}
#reportBody .ai-sum, .report-export .ai-sum { color: var(--rpt-ink); font-family: var(--serif); font-size: 14px; line-height: 1.95; }
#reportBody .ai-actions, .report-export .ai-actions { color: var(--rpt-ink); }
#reportBody .ai-actions li::marker, .report-export .ai-actions li::marker { color: var(--rpt-bronze-light); }
#reportBody .ai-note, .report-export .ai-note { border-top: 1px solid var(--rpt-line); color: var(--rpt-muted); }
#reportBody .spinner-sm, .report-export .spinner-sm { border-top-color: var(--rpt-bronze); }
#reportBody .ai-empty, .report-export .ai-empty { color: var(--rpt-muted); }

@media (max-width: 720px) {
  #reportBody .rpt-cover .inner, .report-export .rpt-cover .inner { padding: 22px 20px 20px; }
  #reportBody .cover-logo img, .report-export .cover-logo img { height: 78px; }
  #reportBody .rpt-cover h1, .report-export .rpt-cover h1 { font-size: 24px; }
  #reportBody .cover-motto, .report-export .cover-motto { flex-direction: column; gap: 4px; }
}

/* ---------- 打印 ---------- */
@media print {
  .topbar, .tabs, .sub-tabs, .btn, footer, #toast, .report-toolbar, .foot { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: 100%; }
  .panel { box-shadow: none; border: none; padding: 0; }
  .view { display: block !important; }
  #view-report { display: block !important; }
  #view-observe, #view-mentor, #view-roster , #view-stats { display: none !important; }
  .rpt-cover { box-shadow: none; }
}

/* ---------- toast / 页脚 ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--purple-950); color: #fff; padding: 11px 20px; border-radius: 12px; font-size: 13.5px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 全局加载遮罩（异步导出） ---------- */
.busy {
  position: fixed; inset: 0; background: rgba(0,0,0,.30); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 999; opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.busy.show { opacity: 1; pointer-events: auto; }
.busy-card {
  background: #fff; border-radius: 16px; padding: 22px 30px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.20); font-size: 14.5px; color: var(--purple-950);
}
.busy-card .spinner {
  width: 26px; height: 26px; border-radius: 50%; border: 3px solid #E6DCCD; border-top-color: var(--gold-600);
  animation: spin .8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 家校沟通周报 ---------- */
.weekly-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.weekly-bar input[type=date] { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; color: var(--ink); background: #fff; font-family: inherit; }

.weekly-overlay { position: fixed; inset: 0; z-index: 200; background: #e9e5db; display: flex; flex-direction: column; }
.weekly-toolbar { display: flex; align-items: center; gap: 16px; padding: 12px 22px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.08); flex-wrap: wrap; }
.weekly-toolbar b { font-size: 15px; color: var(--ink); }
.weekly-hint { flex: 1; font-size: 12px; color: var(--muted); min-width: 160px; }
.weekly-actions { display: flex; gap: 8px; }
.weekly-body { flex: 1; overflow-y: auto; padding: 20px 0; }
.weekly-body .mag { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.weekly-body .wpage { width: 210mm; min-height: 297mm; background: #fbf9f3; box-shadow: 0 8px 30px rgba(80,60,20,.14); }
.weekly-body .wpage.cover { background: #111; position: relative; overflow: hidden; }
[contenteditable="true"] { outline: none; }
[contenteditable="true"]:hover, [contenteditable="true"]:focus { background: rgba(201,162,39,.08); border-radius: 4px; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 12px 0 30px; letter-spacing: .4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.gold-text { color: var(--gold-600); }

/* ---------- 可搜索下拉 / 多选 ---------- */
.ss, .ms { position: relative; width: 100%; }
.ss-trigger, .ms-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; font-size: 14px; color: var(--ink); text-align: left; font-family: inherit;
}
.ss-trigger:focus, .ms-trigger:focus { outline: none; border-color: var(--purple-500); box-shadow: 0 0 0 3px rgba(196,173,121,.22); }
.ss-value.ph, .ms-value.ph { color: var(--muted); }
.ss-caret, .ms-caret { color: var(--purple-500); font-size: 12px; }
.ss-pop, .ms-pop {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 8px; max-height: 320px;
}
.ss-pop.open, .ms-pop.open { display: block; animation: fade .15s ease; }
.ss-input, .ms-input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; margin-bottom: 6px;
}
.ss-input:focus, .ms-input:focus { outline: none; border-color: var(--purple-500); }
.ss-list, .ms-list { max-height: 250px; overflow-y: auto; }
.ss-opt, .ms-opt {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.ss-opt:hover, .ms-opt:hover { background: var(--purple-100); }
.ss-opt.sel, .ms-opt.sel { background: #f0efea; color: var(--purple-800); }
.ss-opt-name { font-weight: 600; }
.ss-opt-sub { font-size: 12px; color: var(--muted); }
.ss-none { padding: 12px; text-align: center; color: var(--muted); font-size: 13px; }
.ms-check { width: 18px; height: 18px; border: 1.5px solid var(--purple-300); border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; flex-shrink: 0; }
.ms-opt.sel .ms-check { background: var(--purple-700); border-color: var(--purple-700); }

/* 顶栏下拉（浅色） */
.ss-dark .ss-trigger {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
}
.ss-dark .ss-value.ph { color: var(--muted); }
.ss-dark .ss-caret { color: var(--gold-600); }
.ss-dark .ss-pop { background: #fff; }
.ss-inline { display: flex; align-items: center; gap: 8px; }
.ss-inline > div { width: 200px; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-card {
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 460px;
  max-height: 90vh; overflow: auto; animation: fade .18s ease;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-family: var(--serif); color: var(--purple-900); font-size: 17px; }
.modal-x { border: none; background: none; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-x:hover { color: var(--red); }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }

/* 报告文本域 / 打印 */
#rptNote { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; font-family: inherit; resize: vertical; line-height: 1.7; }
#rptNote:focus { outline: none; border-color: var(--purple-500); box-shadow: 0 0 0 3px rgba(196,173,121,.22); }
.rpt-cover, .cover-logo img, .lv-cell.on, .stat-card, .hl-card, .ai-card, .lv-chip, .ai-badge, .cm-level, .cm-dim { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media print { #rptNote { border: none; resize: none; } }
@media print {
  .rpt-cover { break-after: page; page-break-after: always; }
  .hl-card, .ai-card, .cm-level, .cm-dim, .dim-bar { break-inside: avoid; page-break-inside: avoid; }
  .stat-strip { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 统计分析（管理员 · 教师火花贡献） ---------- */
/* 「统计分析」页签仅对管理员账号显示（JS 控制 hidden 属性） */
.tab[hidden] { display: none !important; }

.stats-toolbar { gap: 10px; align-items: flex-end; }
.stats-toolbar .field-inline input[type=date] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink); background: #fff; font-family: inherit; }
.stats-presets { display: flex; gap: 6px; flex-wrap: wrap; }

.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin: 4px 0 2px; }
.stats-strip .stat-card { padding: 13px 15px; }
.stats-strip .stat-card .num { font-size: 24px; line-height: 1.15; }
.stats-strip .stat-card.warn .num { color: #8A6A43; }

.stats-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.stats-filters input[type=search], .stats-filters select {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; color: var(--ink); background: #fff; font-family: inherit;
}
.stats-filters input[type=search] { min-width: 210px; }
.stats-filters .chk { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.stats-filters .spacer { flex: 1; }

.stats-rank { display: flex; flex-direction: column; gap: 8px; }
.sr-row {
  display: grid; grid-template-columns: 34px minmax(160px, 1.2fr) minmax(80px, 1.6fr) 96px;
  gap: 12px; align-items: center; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.sr-row.zero { background: #FBF8F3; border-style: dashed; opacity: .78; }
.sr-rank { font-family: var(--serif); font-weight: 800; font-size: 15px; color: var(--gold-600); text-align: center; }
.sr-row.top1 .sr-rank { font-size: 19px; color: #5A4A34; }
.sr-who { min-width: 0; }
.sr-who b { font-size: 14px; color: var(--purple-900); }
.sr-who .sr-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-bar { height: 10px; border-radius: 999px; background: #F0E8DC; overflow: hidden; }
.sr-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #D9C4A6, #B08A5A); }
.sr-num { text-align: right; }
.sr-num b { font-family: var(--serif); font-size: 18px; color: var(--purple-800); }
.sr-num em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.sr-meta { grid-column: 2 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--muted); margin-top: -4px; }

.stats-trend {
  display: flex; align-items: flex-end; gap: 4px; height: 136px; padding: 10px 12px 0;
  border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, #fff, #FBF8F3); overflow-x: auto;
}
.st-tick { flex: 1 1 0; min-width: 12px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.st-tick .bar-wrap { flex: 1 1 auto; width: 100%; min-height: 0; display: flex; align-items: flex-end; }
.st-tick .bar { width: 100%; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #CAA47B, #8A6A43); }
.st-tick .bar.zero { background: #EFE9DE; }
.st-tick .lbl { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.st-tick .cnt-lbl { font-size: 10px; color: #5A4A34; font-weight: 700; }

.dim-bar .sr-bar { flex: 1; }
.dim-bar .sr-bar > span { background: var(--dim, var(--gold)); }

.stats-matrix { overflow: auto; border: 1px solid var(--line); border-radius: 12px; max-height: 460px; }
.stats-matrix table { font-size: 12.5px; }
.stats-matrix th, .stats-matrix td { padding: 7px 9px; text-align: center; white-space: nowrap; }
.stats-matrix th { background: var(--purple-100); font-size: 11.5px; }
.stats-matrix th:first-child, .stats-matrix td:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 2; }
.stats-matrix th:first-child { background: var(--purple-100); }
.stats-matrix tr:hover td:first-child { background: #FBF8F3; }
.stats-matrix td.zero-cell { color: #D9C4A6; }
.stats-matrix .mtx-cell { display: inline-block; min-width: 24px; padding: 2px 7px; border-radius: 6px; font-weight: 700; color: #5A4A34; }
.stats-matrix .mtx-total { font-weight: 800; color: var(--purple-800); }

.stats-zero { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; }
.zc {
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  padding: 9px 12px; border: 1px dashed var(--gold-300); border-radius: 10px;
  background: var(--gold-100); font-size: 12.5px; color: #5A4A34;
}
.zc b { color: #3F2F10; }

.stu-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stu-chip {
  display: flex; align-items: baseline; gap: 8px; padding: 8px 13px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; font-size: 12.5px; color: var(--muted);
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.stu-chip b { color: var(--purple-900); font-size: 13px; }
.stu-chip .n { font-family: var(--serif); font-weight: 800; font-size: 15px; color: var(--gold-600); }

/* ---------- 移动端适配 ---------- */
@media (max-width: 760px) {
  .topbar { flex-direction: column; align-items: stretch; padding: 12px 14px; gap: 10px; }
  .topbar-right { flex-wrap: wrap; }
  .topbar-right .field-inline { flex: 1; min-width: 140px; }
  .topbar-right select, .ss-dark .ss-trigger { min-width: 0; width: 100%; }
  .brand-text h1 { font-size: 16px; }
  .tabs { padding: 8px 8px 0; overflow-x: auto; flex-wrap: nowrap; }
  .tab { padding: 10px 13px; font-size: 13px; white-space: nowrap; }
  main { padding: 14px 12px 40px; }
  .grid-2 { grid-template-columns: 1fr; gap: 12px; }
  .panel { padding: 15px; border-radius: 14px; }
  .form-row { flex-direction: column; gap: 0; }
  .field { min-width: 0; }
  .btn { padding: 12px 16px; font-size: 15px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .dim-grid { grid-template-columns: 1fr; }
  .hl-grid { grid-template-columns: 1fr; }
  .ss-inline > div { width: 150px; }
  .rpt-cover .inner { padding: 20px 18px; }
  .rpt-cover h1 { font-size: 23px; }
  .rpt-meta { gap: 12px; }
  .upload-zone { flex-wrap: wrap; }
  .table-wrap { max-height: 380px; }
  th, td { padding: 7px 8px; font-size: 12px; }
  .ss-opt, .ms-opt { padding: 11px 10px; }
  .ss-trigger, .ms-trigger { padding: 12px; }
  /* 统计分析：区间与预设按钮整行排布，排行行两列堆叠 */
  .stats-toolbar { flex-direction: row; align-items: flex-end; }
  .stats-toolbar .field-inline { flex: 1 1 46%; }
  .stats-toolbar .field-inline input { min-width: 0; width: 100%; }
  .stats-presets { width: 100%; }
  .stats-presets .btn { flex: 1; padding: 9px 10px; font-size: 12.5px; }
  .stats-filters input[type=search] { min-width: 0; width: 100%; }
  .sr-row { grid-template-columns: 26px 1fr 64px; gap: 8px; padding: 9px 11px; }
  .sr-bar { grid-column: 2 / -1; }
  .sr-meta { grid-column: 2 / -1; }
  .stats-trend { height: 120px; }
  .st-tick .cnt-lbl { display: none; }
}

/* 语言切换按钮 */
.lang-btn {
  align-self: flex-end; padding: 6px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
}
.lang-btn:hover { background: var(--purple-100); border-color: var(--purple-300); }

/* 专属口令登录后的身份锁定显示 */
.locked-user { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 13px; }
.locked-user b { color: var(--purple-800); }
.locked-user .lang-btn { align-self: auto; }

/* 图标（SVG） */
.ic { flex-shrink: 0; vertical-align: -2px; }

/* 状态点（绿/黄/红 —— Apple 系统色） */
.lv-ind { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.lv-ind.green { background: #D9C4A6; box-shadow: 0 0 0 3px rgba(196,173,121,.20); }
.lv-ind.amber { background: #B08A5A; box-shadow: 0 0 0 3px rgba(161,131,80,.24); }
.lv-ind.red   { background: #5A4A34; box-shadow: 0 0 0 3px rgba(111,87,48,.28); }

/* ---------- 火花墙 · 酷炫展示 ---------- */
/* 8 维度配色（不同度的金：浅香槟 → 深铜金） */
.d-wellbeing    { --dim:#e7dcc0; } /* 身心 浅香槟 */
.d-learning     { --dim:#D9C4A6; } /* 学习 浅金 */
.d-innovation   { --dim:#CAA47B; } /* 创新 金 */
.d-agency       { --dim:#B08A5A; } /* 内驱 中金 */
.d-leadership   { --dim:#A97F50; } /* 领导 深金 */
.d-collaboration{ --dim:#8A6A43; } /* 协作 暗金 */
.d-vision       { --dim:#c9b283; } /* 视野 暖金 */
.d-stewardship  { --dim:#9a7c47; } /* 责任 铜金 */

.feed-item {
  position: relative;
  border-left: 4px solid var(--dim, var(--purple-500));
  transition: transform .2s ease, box-shadow .2s ease;
  animation: sparkIn .5s cubic-bezier(.22,1,.36,1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
.feed-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,.10);
}

/* 火花墙卡片：更醒目的「火花」视觉 */
.spark-card {
  border-left-width: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,.03), 0 2px 10px color-mix(in srgb, var(--dim, #CAA47B) 14%, transparent);
}
.spark-card:hover {
  box-shadow: 0 12px 30px rgba(0,0,0,.10), 0 8px 24px color-mix(in srgb, var(--dim, #CAA47B) 34%, transparent);
}
.spark-card::before {
  content: ""; position: absolute; left: -5px; top: -1px; bottom: -1px; width: 5px;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(180deg, var(--dim, #CAA47B), #CAA47B);
  box-shadow: 0 0 12px color-mix(in srgb, var(--dim, #CAA47B) 55%, transparent);
}
.spark-card::after {
  content: "🔥"; position: absolute; right: 13px; top: 11px; opacity: .8;
  font-size: 17px; filter: drop-shadow(0 0 6px rgba(196,173,121,.85));
  animation: twinkle 2.4s ease-in-out infinite;
}
.spark-card .meta { padding-right: 28px; }
@keyframes twinkle {
  0%, 100% { opacity: .45; transform: scale(.82) rotate(-8deg); }
  50% { opacity: 1; transform: scale(1.18) rotate(7deg); }
}

@keyframes sparkIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* 维度徽章配色（彩色） */
.pill.dim { color: var(--dim, var(--purple-700)); background: color-mix(in srgb, var(--dim, #CAA47B) 14%, #fff); }

/* 时间分组标题 */
.date-group { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.date-group:first-child { margin-top: 4px; }
.date-group .dg-label {
  font-size: 12.5px; font-weight: 700; color: var(--purple-800); letter-spacing: .5px;
  padding: 3px 12px; border-radius: 999px; background: var(--purple-100); white-space: nowrap;
}
.date-group .dg-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-300), transparent); }

/* 火花墙容器：卡片铺开成多列网格 */
.feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  align-items: start;
}
.spark-card .meta-date { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* 火花墙 · 老师头像 */
.meta .author { display: inline-flex; align-items: center; gap: 6px; }
.meta .author .aname { display: inline-block; }
.avatar {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: inline-block;
  border: 1px solid #e4d7b8; background: #f3eddd; flex-shrink: 0; vertical-align: middle;
}

/* 火花墙 · 点赞按钮 */
.like-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 11.5px; font-weight: 600;
  color: var(--muted); transition: all .15s ease; line-height: 1.5;
}
.like-btn .like-ico { display: inline-flex; align-items: center; font-size: 12px; }
.like-btn .like-ico svg { display: block; }
.like-btn .like-ico svg path { fill: none; stroke: #e0475c; stroke-width: 1.8; transition: fill .15s ease; }
.like-btn:hover { border-color: #e0475c; color: #d63447; transform: translateY(-1px); }
.like-btn.on {
  background: color-mix(in srgb, #e0475c 13%, #fff); border-color: #e0475c; color: #d63447;
  box-shadow: 0 2px 8px color-mix(in srgb, #e0475c 30%, transparent);
}
.like-btn.on .like-ico svg path { fill: #e0475c; stroke: #e0475c; }
.like-btn.on .like-ico { animation: likePop .3s cubic-bezier(.22,1,.36,1); }
@keyframes likePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* ---------- 火花墙 · 维度筛选标签栏 + 照片墙瀑布流 ---------- */
.wall-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dim-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.dim-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 12.5px; font-weight: 600;
  color: var(--ink); transition: all .15s;
}
.dim-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim, var(--purple-500)); flex-shrink: 0; }
.dim-chip:hover { border-color: var(--dim, var(--purple-300)); transform: translateY(-1px); }
.dim-chip.active { background: var(--dim, var(--purple-700)); color: #fff; border-color: var(--dim, var(--purple-700)); box-shadow: 0 3px 10px color-mix(in srgb, var(--dim, var(--purple-700)) 40%, transparent); }
.dim-chip.active .dot { background: #fff; }
.dim-chip.all { --dim: var(--purple-700); }

.view-toggle { display: flex; gap: 6px; }
.wall-view-btn {
  padding: 5px 12px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--muted); transition: all .15s;
}
.wall-view-btn:hover { border-color: var(--purple-300); color: var(--purple-700); }
.wall-view-btn.active { background: var(--purple-700); color: #fff; border-color: var(--purple-700); }

/* 照片墙瀑布流：真正的照片墙（多列铺开） */
.photo-wall {
  display: block; /* 覆盖 .feed 的 flex/grid，让 column-count 生效 */
  column-count: 3;
  column-gap: 12px;
}
@media (max-width: 900px) { .photo-wall { column-count: 2; } }
@media (max-width: 520px) { .photo-wall { column-count: 1; } }
.photo-card {
  break-inside: avoid; margin-bottom: 12px; border-radius: 14px; overflow: hidden;
  position: relative; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0,0,0,.04);
  animation: sparkIn .4s ease both; transition: transform .18s ease, box-shadow .18s ease;
}
.photo-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.10), 0 6px 18px color-mix(in srgb, var(--dim, #CAA47B) 30%, transparent); }
.photo-card img, .photo-card video { width: 100%; display: block; }
.photo-card .pc-cap { padding: 7px 10px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.photo-card .pc-cap b { color: var(--ink); }
.photo-card .pc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ---------- 保存火花动画 ---------- */
.spark-burst { position: fixed; pointer-events: none; z-index: 9999; width: 0; height: 0; }
.spark-p {
  position: absolute; left: 0; top: 0; line-height: 1;
  animation: sparkFly 1s cubic-bezier(.16,.9,.3,1) forwards;
  will-change: transform, opacity;
}
.spark-dot {
  position: absolute; left: 0; top: 0; border-radius: 50%;
  animation: sparkFly 1s cubic-bezier(.16,.9,.3,1) forwards;
  will-change: transform, opacity;
  box-shadow: 0 0 8px 2px rgba(196,173,121,.6);
}
.spark-streak {
  position: absolute; left: 0; top: 0; width: 3px; height: 15px; border-radius: 3px;
  animation: sparkStreak 1s cubic-bezier(.16,.9,.3,1) forwards;
  will-change: transform, opacity;
  box-shadow: 0 0 6px 1px rgba(196,173,121,.5);
}
.spark-ring {
  position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; border: 2.5px solid #D9C4A6;
  animation: sparkRing .7s ease-out forwards;
  will-change: transform, opacity;
}
.spark-flash {
  position: absolute; left: 0; top: 0; font-size: 40px; line-height: 1;
  transform: translate(-50%,-50%);
  animation: sparkFlash .85s ease-out forwards;
  filter: drop-shadow(0 0 14px rgba(196,173,121,.95));
}
.spark-screen {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background: radial-gradient(circle at 50% 50%, rgba(196,173,121,.28), transparent 55%);
  animation: screenFlash .6s ease-out forwards;
}
@keyframes sparkFly {
  0% { transform: translate(-50%,-50%) scale(.2); opacity: 0; }
  12% { opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(var(--s,1)); opacity: 0; }
}
@keyframes sparkStreak {
  0% { transform: translate(-50%,-50%) rotate(var(--rot,0deg)) scaleX(.15); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot,0deg)) scaleX(1); opacity: 0; }
}
@keyframes sparkRing {
  0% { transform: scale(.2); opacity: .95; }
  100% { transform: scale(10); opacity: 0; }
}
@keyframes sparkFlash {
  0% { transform: translate(-50%,-50%) scale(.2) rotate(-24deg); opacity: 0; }
  22% { opacity: 1; }
  65% { transform: translate(-50%,-50%) scale(1.6) rotate(12deg); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(2.1) rotate(0); opacity: 0; }
}
@keyframes screenFlash {
  0% { opacity: .95; }
  100% { opacity: 0; }
}

/* ---------- 视频缩略图 + 播放弹层 ---------- */
.vid-thumb { position: relative; display: inline-block; cursor: pointer; }
.vid-thumb .play-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.vid-thumb:hover .play-badge { background: rgba(0,0,0,.72); }
.vid-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 10000; display: none; align-items: center; justify-content: center; }
.vid-lightbox .vid-lb-inner { position: relative; width: min(92vw, 960px); }
.vid-lightbox video { width: 100%; max-height: 85vh; background: #000; border-radius: 10px; display: block; }
.vid-lightbox .vid-lb-close { position: absolute; top: -40px; right: 0; background: rgba(255,255,255,.18); color: #fff; border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
@media print { .play-badge, .vid-lightbox { display: none !important; } }

/* ---------- 成长计划：多次填写 + 自动保存 ---------- */
.plan-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.plan-chip { padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); transition: all .15s; }
.plan-chip:hover { border-color: var(--gold-300); }
.plan-chip.active { background: var(--purple-700); color: #fff; border-color: var(--purple-700); }
.plan-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
#planSaveState { font-weight: 600; }

/* ================= 2026 康礼品牌 · 全平台 ================= */
:root {
  --navy: #1B2A44; --navy-deep: #0F1626; --slate: #3A4456;
  --ivory: #FBF8F3; --gold: #CAA47B; --bronze: #8A6A43; --muted: #8C857C; --line: #E6DCCD;
  --purple-950: #0F1626; --purple-900: #1B2A44; --purple-800: #1B2A44; --purple-700: #8A6A43;
  --purple-500: #CAA47B; --purple-300: #D9C4A6; --purple-100: #F5EFE4;
  --gold-600: #8A6A43; --gold-300: #D9C4A6; --gold-100: #F7F2EA;
  --cream: #FBF8F3; --ink: #1B2A44; --card: #FFFFFF;
  --red: #9B3A2C; --amber: #8A6A43; --green: #4F6B57;
  --shadow: 0 1px 2px rgba(27,42,68,.04), 0 6px 18px rgba(27,42,68,.06);
  --shadow-lg: 0 12px 36px rgba(15,22,38,.14);
  --radius: 4px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --en: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --caps: "Cinzel", "Optima", "Palatino Linotype", serif;
}
body {
  background: var(--ivory); color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .brand-text h1, .panel h2, .panel h3, .modal-head h3 { font-family: var(--serif); font-weight: 500; }
::selection { background: var(--gold); color: var(--navy); }

/* 顶栏 */
.topbar {
  background: var(--navy); color: var(--ivory);
  border-bottom: 1px solid rgba(202,164,123,.35);
  box-shadow: 0 2px 14px rgba(15,22,38,.14);
}
.brand { gap: 14px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 0; background: transparent;
  border: none; box-shadow: none; padding: 0; display: grid; place-items: center;
}
.brand-mark img { width: 44px; height: 44px; object-fit: contain; display: block; }
.brand-line { width: 1px; height: 34px; background: rgba(202,164,123,.55); flex-shrink: 0; }
.brand-text h1 { color: var(--ivory); font-size: 18px; font-weight: 500; letter-spacing: .08em; font-family: var(--serif); }
.brand-text p { color: var(--gold); font-family: var(--caps); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; margin-top: 2px; }
.topbar-right { gap: 14px; }
.field-inline span { color: rgba(251,248,243,.62); letter-spacing: .08em; }
.field-inline select, .field-inline input {
  background: var(--ivory); color: var(--navy); border: 1px solid rgba(202,164,123,.45); border-radius: 2px;
}
.field-inline select:focus, .field-inline input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(202,164,123,.18); }
.lang-btn {
  background: rgba(251,248,243,.08); color: var(--ivory);
  border: 1px solid rgba(202,164,123,.45); border-radius: 2px;
}
.lang-btn:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.locked-user { color: var(--ivory); }
.locked-user b { color: var(--gold); }

/* 页签 */
.tabs {
  background: rgba(251,248,243,.94); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.tab { color: var(--muted); border-bottom: 2px solid transparent; }
.tab:hover { color: var(--navy); }
.tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.sub-tabs { border-bottom: 1px solid var(--line); }
.sub-tab { color: var(--muted); }
.sub-tab:hover { color: var(--bronze); }
.sub-tab.active { color: var(--navy); border-bottom-color: var(--gold); }

/* 页面 / 面板 */
main { padding: 26px 28px 56px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: var(--shadow); padding: 24px;
}
.panel h2 { color: var(--navy); font-size: 20px; letter-spacing: .04em; }
.panel h3 { color: var(--navy); font-size: 15.5px; letter-spacing: .03em; }
.panel-head { border-bottom: 1px solid #F0E8DC; padding-bottom: 12px; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.hint { color: var(--muted); }
.foot { color: var(--muted); letter-spacing: .08em; }
.muted { color: var(--muted); }
.gold-text { color: var(--bronze); }

/* 按钮 */
.btn {
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  color: var(--navy); font-weight: 600; box-shadow: none;
}
.btn:hover { background: var(--ivory); border-color: var(--gold); color: var(--navy); }
.btn.primary {
  background: var(--navy); border-color: var(--navy); color: var(--ivory);
  background-image: none; box-shadow: none;
}
.btn.primary:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--ivory); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); background-image: none; }
.btn.gold:hover { background: #B08A5A; border-color: #B08A5A; color: var(--ivory); }
.btn.sm { border-radius: 2px; }
.btn.danger { color: var(--red); border-color: #E3C4B8; }
.btn.danger:hover { background: #FBF0EC; border-color: #D9A899; }

/* 表单 */
.field > span, .field-inline > span { color: var(--muted); letter-spacing: .06em; }
.field input, .field select, .field textarea,
.stats-toolbar .field-inline input[type=date], .weekly-bar input[type=date] {
  background: #fff; color: var(--navy); border: 1px solid var(--line); border-radius: 2px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(202,164,123,.18);
}
.star-detail summary { color: var(--bronze); }
.upload-btn {
  border: 1px dashed var(--gold); border-radius: 2px; color: var(--bronze); background: #fff;
}
.upload-btn:hover { border-color: var(--bronze); background: var(--ivory); }
.media-item { border-radius: 2px; border-color: var(--line); background: var(--ivory); }

/* 下拉 */
.ss-trigger, .ms-trigger, .ss-input, .ms-input {
  border-radius: 2px; border-color: var(--line); background: #fff; color: var(--navy);
}
.ss-trigger:focus, .ms-trigger:focus, .ss-input:focus, .ms-input:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(202,164,123,.18);
}
.ss-caret, .ms-caret { color: var(--gold); }
.ss-pop, .ms-pop { border-radius: 2px; border-color: var(--line); box-shadow: var(--shadow-lg); }
.ss-opt:hover, .ms-opt:hover { background: var(--ivory); }
.ss-opt.sel, .ms-opt.sel { background: var(--ivory); color: var(--navy); }
.ms-check { border-radius: 1px; border-color: var(--gold); }
.ms-opt.sel .ms-check { background: var(--navy); border-color: var(--navy); }
.ss-dark .ss-trigger { background: rgba(251,248,243,.08); color: var(--ivory); border-color: rgba(202,164,123,.45); }
.ss-dark .ss-value.ph { color: rgba(251,248,243,.55); }
.ss-dark .ss-caret { color: var(--gold); }

/* 标签 / 徽标 / 维度 */
.pill { background: var(--ivory); color: var(--bronze); border-color: var(--line); }
.pill.lv { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.pill.dim { background: var(--ivory); color: var(--bronze); border-color: var(--line); }
.badge { background: var(--ivory); color: var(--bronze); border: 1px solid var(--line); }
.cohort-badge { background: var(--gold); color: var(--navy); }
.engine-tag.llm { background: var(--ivory); color: var(--bronze); border: 1px solid var(--line); }
.engine-tag.heuristic { background: #F1F0EC; color: var(--muted); }
.clz-chip, .lv-btn, .dim-chip, .plan-chip, .wall-view-btn {
  border-radius: 2px; border-color: var(--line); background: #fff; color: var(--ink);
}
.clz-chip.selected { background: var(--ivory); border-color: var(--bronze); color: var(--navy); }
.lv-btn.selected { background: var(--navy); color: var(--ivory); border-color: var(--navy); background-image: none; }
.dim-chip.active { background: var(--navy); border-color: var(--navy); color: var(--ivory); box-shadow: none; }
.wall-view-btn.active { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.plan-chip.active { background: var(--navy); border-color: var(--navy); color: var(--ivory); }
.clz-chip .dot, .dim-chip .dot, .d-dot { background: var(--dim, var(--gold)); }
.d-wellbeing { --dim:#B08A5A; } .d-learning { --dim:#8A6A43; }
.d-innovation { --dim:#1B2A44; } .d-agency { --dim:#3A4456; }
.d-leadership { --dim:#A97F50; } .d-collaboration { --dim:#5E6B80; }
.d-vision { --dim:#9C7B52; } .d-stewardship { --dim:#7A5C38; }

/* 动态 / 卡片 */
.feed-item, .spark-card {
  background: #fff; border: 1px solid var(--line); border-radius: 2px;
  border-left: 2px solid var(--gold); box-shadow: 0 1px 2px rgba(27,42,68,.04);
}
.feed-item:hover, .spark-card:hover { box-shadow: var(--shadow); }
.feed-item .meta b, .spark-card .meta b { color: var(--navy); }
.feed-item .txt, .spark-card .txt { color: var(--ink); }
.spark-card::before { background: var(--gold); }
.date-group .dg-label { color: var(--bronze); }
.date-group .dg-line { background: linear-gradient(90deg, var(--gold), transparent); }
.photo-card { border-radius: 2px; border-color: var(--line); background: #fff; }
.photo-card .pc-cap b { color: var(--navy); }
.avatar { border-color: var(--line); }
.like-btn { border-radius: 2px; border-color: var(--line); }
.like-btn:hover { border-color: var(--bronze); color: var(--bronze); }

/* 表格 */
.table-wrap { border: 1px solid var(--line); border-radius: 2px; background: #fff; }
table { color: var(--ink); }
th { background: #F5EFE4; color: var(--navy); border-bottom: 1px solid var(--line); }
td { border-bottom: 1px solid #F0E8DC; }
tr:hover td { background: var(--ivory); }

/* 弹窗 / 提示 / 登录 */
.modal-card { background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow-lg); }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-head h3 { color: var(--navy); }
.modal-foot { border-top: 1px solid var(--line); }
.modal-x { color: var(--muted); }
.modal-x:hover { color: var(--bronze); }
.login-crest { display: flex; align-items: center; gap: 14px; margin: 2px 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.login-crest img { width: 58px; height: 58px; object-fit: contain; }
.login-crest b { display: block; font-family: var(--serif); font-weight: 500; font-size: 18px; color: var(--navy); letter-spacing: .08em; }
.login-crest span { display: block; font-family: var(--caps); font-size: 9px; color: var(--bronze); letter-spacing: .24em; margin-top: 2px; }
.alert { border-radius: 2px; }
.alert.red { background: #FBF0EC; color: var(--red); border-color: #E3C4B8; }
.alert.amber { background: var(--ivory); color: var(--bronze); border-color: var(--line); }
.alert.green { background: #F1F5F1; color: var(--green); border-color: #D6E0D6; }
.toast {
  background: var(--navy); color: var(--ivory); border: 1px solid var(--gold);
  border-radius: 2px; box-shadow: var(--shadow-lg);
}
.busy-card { background: #fff; border: 1px solid var(--line); border-radius: 2px; }
.busy-card .spinner { border-top-color: var(--gold); }

/* 统计 */
.stats-filters input[type=search], .stats-filters select { border-radius: 2px; border-color: var(--line); background: #fff; color: var(--navy); }
.stats-strip .stat-card { border-radius: 2px; border: 1px solid var(--line); border-top: 2px solid var(--gold); box-shadow: none; }
.stats-strip .stat-card .num { color: var(--navy); font-family: var(--serif); font-weight: 500; }
.stats-strip .stat-card.warn .num { color: var(--bronze); }
.sr-row { background: #fff; border: 1px solid var(--line); border-radius: 2px; }
.sr-row.top1 { background: var(--ivory); border-color: var(--gold); }
.sr-rank { color: var(--bronze); }
.sr-who b { color: var(--navy); }
.sr-bar { background: #F0E8DC; border-radius: 2px; }
.sr-bar > span { background: linear-gradient(90deg, var(--gold), var(--bronze)); border-radius: 2px; }
.sr-num b { color: var(--navy); }
.st-tick .bar { background: linear-gradient(180deg, var(--gold), var(--bronze)); border-radius: 2px 2px 0 0; }
.stats-matrix { border-radius: 2px; border-color: var(--line); }
.stats-matrix th { background: #F5EFE4; color: var(--navy); }
.stats-matrix th:first-child { background: #F5EFE4; }
.stats-matrix tr:hover td:first-child { background: var(--ivory); }
.stats-matrix .mtx-cell { color: var(--bronze); border-radius: 2px; }
.stats-matrix .mtx-total { color: var(--navy); }
.zc { background: var(--ivory); border: 1px solid var(--line); border-radius: 2px; color: var(--bronze); }
.zc b { color: var(--navy); }
.stu-chip { background: #fff; border: 1px solid var(--line); border-radius: 2px; box-shadow: none; }
.stu-chip b { color: var(--navy); }
.stu-chip .n { color: var(--bronze); }

/* 周报浮层 */
.weekly-overlay { background: #EFE9DE; }
.weekly-toolbar { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(27,42,68,.08); }
.weekly-body .wpage { background: var(--ivory); box-shadow: 0 8px 30px rgba(27,42,68,.14); }
.weekly-bar input[type=date] { border-radius: 2px; }

@media (max-width: 760px) {
  .brand-line { display: none; }
  .brand-mark, .brand-mark img { width: 38px; height: 38px; }
  .brand-text h1 { font-size: 16px; }
  .brand-text p { font-size: 8.5px; letter-spacing: .16em; }
  main { padding: 16px 14px 42px; }
  .panel { padding: 16px; border-radius: 4px; }
  .panel h2 { font-size: 18px; }
  .btn { border-radius: 2px; }
}

@media print {
  .topbar, .tabs, .sub-tabs, .btn, footer, #toast, .report-toolbar, .foot { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: 100%; }
  .panel { box-shadow: none; border: none; padding: 0; background: transparent; border-radius: 0; }
  .view { display: block !important; }
  #view-report { display: block !important; }
  #view-observe, #view-mentor, #view-roster, #view-stats { display: none !important; }
  .rpt-cover { box-shadow: none; }
}
.report-body, .report-export, .rpt-cover, .cover-logo img, .lv-cell.on, .stat-card, .hl-card, .ai-card, .lv-chip, .ai-badge, .cm-level, .cm-dim {
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}

/* ---------- 离校纪念册（farewell report） ---------- */
#reportBody .farewell-cover, .report-export .farewell-cover { border-top-color: var(--rpt-bronze-light); }
#reportBody .farewell-kicker, .report-export .farewell-kicker {
  margin-top: 6px; color: var(--rpt-bronze); font-family: var(--caps, "Cinzel", "Optima", serif);
  font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase;
}
#reportBody .farewell-cover h1, .report-export .farewell-cover h1 { margin-top: 8px; font-size: 32px; }
#reportBody .farewell-cover .sub, .report-export .farewell-cover .sub { color: var(--rpt-muted); letter-spacing: .12em; }
#reportBody .farewell-quote, .report-export .farewell-quote {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rpt-line);
  display: flex; flex-direction: column; gap: 5px;
}
#reportBody .farewell-quote .zh, .report-export .farewell-quote .zh {
  font-family: var(--serif); font-size: 15px; letter-spacing: .08em; color: var(--rpt-bronze);
}
#reportBody .farewell-quote .en, .report-export .farewell-quote .en {
  font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 12px;
  color: var(--rpt-muted); letter-spacing: .04em;
}
#reportBody .farewell-letter, .report-export .farewell-letter {
  background: #fff; border: 1px solid var(--rpt-line); border-left: 3px solid var(--rpt-bronze-light);
  padding: 22px 26px; font-family: var(--serif); font-size: 14.5px; line-height: 2; color: var(--rpt-ink);
}
#reportBody .farewell-letter p, .report-export .farewell-letter p { margin: 0 0 12px; }
#reportBody .farewell-letter p:last-child, .report-export .farewell-letter p:last-child { margin-bottom: 0; }
#reportBody .farewell-empty, .report-export .farewell-empty {
  text-align: center; padding: 28px 24px; border: 1px dashed var(--rpt-taupe);
  background: var(--rpt-ivory); color: var(--rpt-muted); line-height: 1.9; font-size: 13.5px;
}
#reportBody .farewell-empty-mark, .report-export .farewell-empty-mark {
  color: var(--rpt-bronze-light); font-size: 22px; margin-bottom: 8px;
}
#reportBody .farewell-empty p, .report-export .farewell-empty p { margin: 0; }
#reportBody .farewell-blessing, .report-export .farewell-blessing {
  background: var(--rpt-ivory); border: 1px solid var(--rpt-line); border-left: 3px solid var(--rpt-bronze-light);
  padding: 24px 28px; font-family: var(--serif); font-size: 15px; line-height: 2; color: var(--rpt-navy);
}
#reportBody .farewell-blessing p, .report-export .farewell-blessing p { margin: 0 0 12px; }
#reportBody .farewell-blessing p:last-child, .report-export .farewell-blessing p:last-child { margin-bottom: 0; }
#reportBody .farewell-sign, .report-export .farewell-sign {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--rpt-line);
  color: var(--rpt-bronze);
}
#reportBody .farewell-sign .zh, .report-export .farewell-sign .zh { font-family: var(--serif); font-size: 13px; letter-spacing: .06em; }
#reportBody .farewell-sign .en, .report-export .farewell-sign .en {
  font-family: var(--caps, "Cinzel", serif); font-size: 9px; letter-spacing: .18em; color: var(--rpt-muted);
}
#reportBody .farewell-date, .report-export .farewell-date { font-size: 18px; letter-spacing: .02em; }
#reportBody .farewell-letter, .report-export .farewell-letter,
#reportBody .farewell-blessing, .report-export .farewell-blessing,
#reportBody .farewell-empty, .report-export .farewell-empty { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media (max-width: 720px) {
  #reportBody .farewell-cover h1, .report-export .farewell-cover h1 { font-size: 26px; }
  #reportBody .farewell-letter, .report-export .farewell-letter { padding: 18px 18px; font-size: 13.5px; }
  #reportBody .farewell-blessing, .report-export .farewell-blessing { padding: 18px; font-size: 14px; }
  #reportBody .farewell-sign, .report-export .farewell-sign { flex-direction: column; align-items: flex-start; }
}
@media print {
  #reportBody .farewell-letter, .report-export .farewell-letter,
  #reportBody .farewell-blessing, .report-export .farewell-blessing,
  #reportBody .farewell-empty, .report-export .farewell-empty { break-inside: avoid; }
}

/* ================= 学科周报 / 家长端 ================= */
.grow { flex: 1; min-width: 0; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--purple-950); color: var(--gold); }
.sync-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; margin-bottom: 12px; }
.att-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.att-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 340px; }
.att-table th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-align: center; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.att-table td { padding: 5px 3px; text-align: center; }
.att-table .stu-cell { text-align: left; }
.att-table th.reg-col { background: #faf6ee; }
.hw-cell { width: 100%; min-width: 92px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; color: var(--ink); background: #fff; }
.hw-cell:focus { outline: none; border-color: var(--purple-300); box-shadow: 0 0 0 3px rgba(202,164,123,.15); }

/* ---------- 作业打分板块（老师端 · 百分制） ---------- */
.grade-board { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 12px; background: var(--cream); }
.grade-row { display: grid; grid-template-columns: minmax(110px, 150px) minmax(170px, 1fr) 84px minmax(140px, 1fr); gap: 8px; align-items: center; padding: 7px 0; border-top: 1px dashed var(--line); }
.grade-row:first-child { border-top: 0; }
.grade-stu { font-size: 13px; display: flex; flex-direction: column; line-height: 1.25; }
.grade-sub { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; font-size: 12px; }
.grade-sub .pill { margin-bottom: 2px; }

/* ---------- 打分板 v2：每份作业一格（表格列式） ---------- */
.grade-table th { min-width: 96px; }
.grade-table td.grade-cell { display: flex; flex-direction: column; gap: 4px; min-width: 104px; padding: 6px 5px; }
.grade-table .grade-score { width: 68px; align-self: center; }
.grade-table .grade-note { width: 96px; align-self: center; font-size: 11.5px; }
.grade-table td.stu-cell { min-width: 108px; }
.grade-table td { vertical-align: middle; }
.pweek-score-list { display: flex; flex-direction: column; gap: 10px; }
.pweek-score-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }

/* ---------- 作业清单（v3：一周多份作业） ---------- */
.hw-assign { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 14px; margin-bottom: 10px; }
.hw-assign-no { font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--gold-600); line-height: 1; }
.hw-assign-content { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; background: #fff; color: var(--ink); min-height: 44px; resize: vertical; }
.hw-assign-content:focus { outline: none; border-color: var(--purple-300); box-shadow: 0 0 0 3px rgba(202,164,123,.15); }
.pweek-hw-item { padding: 8px 0; border-top: 1px dashed var(--line); }
.pweek-hw-item:first-child { border-top: 0; padding-top: 2px; }
.pweek-hw-item .pweek-score-num { margin-left: 2px; }
.pweek-hw-text { margin-top: 6px; font-size: 13.5px; color: var(--ink); }
.grade-score { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 800; text-align: center; background: #fff; color: var(--ink); }
.grade-score:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(202,164,123,.18); }
.grade-note { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; background: #fff; color: var(--ink); }
.pill.sub-none { background: #f1f0ec; color: #8c857c; border: 1px solid #e3e0d8; }
.pill.sub-online { background: #e8f0f8; color: #2f5d8a; border: 1px solid #c6d9ec; }
.pill.sub-paper { background: #faf1dd; color: #9a6a1f; border: 1px solid #ecd6a6; }

/* ---------- 家长端：作业提交面板 ---------- */
.sub-panel { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.sub-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.sub-status.none { color: var(--muted); }
.sub-status.online { color: #2f5d8a; }
.sub-status.paper { color: #9a6a1f; }
.sub-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sub-actions { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.sub-pending { border: 1px dashed var(--gold-300); border-radius: 10px; background: var(--gold-100); padding: 8px 10px; margin: 6px 0; font-size: 12.5px; }
.sub-pending-item { padding: 2px 0; }
.sub-note { margin-top: 8px; }
.sub-grade { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; padding: 10px 12px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; }
.sub-grade-score { font-size: 32px; font-weight: 800; font-family: var(--serif); line-height: 1; }
.sub-grade-score.excellent { color: #2e7d5b; }
.sub-grade-score.pass { color: #9a6a1f; }
.sub-grade-score.fail { color: #a4433f; }
.sub-grade-unit { color: var(--muted); font-size: 13px; }
.sub-grade-note { font-size: 13px; color: var(--ink); margin-top: 4px; }
.pill.due { background: #eef1f6; color: #3c4a63; border: 1px solid #d6dde9; }
.pill.sub-overdue { background: #fbe9e7; color: #a4433f; border: 1px solid #ecc6c3; }
.pill.sub-missing { background: #fbe9e7; color: #a4433f; border: 1px solid #ecc6c3; }

/* ---------- 家长端「我的周报」视觉升级 ---------- */
.pweek-top { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pweek-top h2 { margin: 0; }
.pweek-top-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pweek-empty { text-align: left; padding: 30px 4px; color: var(--muted); }
.pweek-empty-ico { font-size: 30px; margin-bottom: 8px; }
.pweek-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #1B2A44 0%, #24375A 55%, #2E4A78 100%); color: #fff; border-radius: 18px; padding: 22px 22px 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.pweek-hero::before { content: ""; position: absolute; right: -30px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(202,164,123,.28), transparent 70%); }
.pweek-hero::after { content: ""; position: absolute; right: 34px; top: 22px; width: 120px; height: 120px; border-radius: 50%; border: 1px solid rgba(202,164,123,.35); }
.pweek-hero-main { position: relative; z-index: 1; }
.pweek-hero-kicker { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-300); font-weight: 700; }
.pweek-hero-week { font-family: var(--serif); font-size: 30px; font-weight: 700; line-height: 1.15; margin-top: 4px; letter-spacing: .01em; }
.pweek-hero-dates { font-size: 12.5px; color: #c8d0de; margin-top: 3px; letter-spacing: .04em; }
.pweek-hero-meta { font-size: 12.5px; color: #aeb9cb; margin-top: 9px; }
.pweek-hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 14px; }
.pweek-hero-stat { text-align: left; }
.pweek-hero-stat b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 700; color: #fff; line-height: 1.05; }
.pweek-hero-stat b i { font-style: normal; font-size: 13px; color: var(--gold-300); font-family: inherit; }
.pweek-hero-stat span { font-size: 11px; color: #aeb9cb; display: block; margin-top: 5px; letter-spacing: .08em; }
.pweek-sec { margin-bottom: 14px; }
.pweek-sec-head { display: flex; align-items: center; gap: 8px; margin: 2px 2px 10px; flex-wrap: wrap; }
.pweek-sec-ico { font-size: 15px; }
.pweek-sec-head h3 { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 0; }
.hw-overview { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px; box-shadow: var(--shadow); }
.hw-ov-item { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px dashed var(--line); }
.hw-ov-item:first-child { border-top: 0; }
.hw-ov-no { font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--gold-300); min-width: 26px; padding-top: 1px; }
.hw-ov-main { flex: 1; min-width: 0; }
.hw-ov-subject { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.hw-ov-text { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.55; }
.hw-ov-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.pweek-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.pweek-card-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fffdf9, #fff); }
.pweek-card-ava { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, #1B2A44, #8A6A43); color: var(--gold); font-family: var(--serif); font-size: 20px; font-weight: 700; display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 1px rgba(202,164,123,.45); }
.pweek-card-ava.latin { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; }
.pweek-card-title { min-width: 0; flex: 1; }
.pweek-card-subject { font-weight: 800; font-size: 15.5px; color: var(--ink); line-height: 1.25; }
.pweek-card-teachers { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pweek-chip-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-start; flex: none; margin-top: 7px; }
.pweek-chip { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pweek-chip.good { background: #e7f4ee; color: #2e7d5b; border-color: #bfe0d0; }
.pweek-chip.warn { background: #faf1dd; color: #9a6a1f; border-color: #ecd6a6; }
.pweek-blk { padding: 13px 16px 15px; border-bottom: 1px solid var(--line); }
.pweek-card .pweek-blk:last-child { border-bottom: 0; }
.pweek-blk-label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--purple-700); margin-bottom: 9px; }
.pweek-blk-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-300), transparent); margin-left: 4px; }
.pweek-hw { font-size: 14px; color: var(--ink); line-height: 1.65; }
.pweek-hw-text { margin-top: 8px; }
.pweek-hw-files { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px; }
.pweek-quote { position: relative; font-family: var(--serif); font-size: 14.5px; line-height: 1.75; color: var(--ink); background: var(--cream); border-left: 3px solid var(--gold); border-radius: 4px 12px 12px 4px; padding: 10px 14px; }
.pweek-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pweek-reply-row { margin-top: 10px; }
.pweek-sub-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }.pweek-sub-files { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.pweek-sub-at { font-size: 12px; color: var(--muted); margin-top: 7px; }
.pweek-sub-replace { margin-top: 8px; }
.pweek-sub-hint { margin-top: 9px; }
.pweek-score { display: flex; align-items: center; gap: 14px; background: linear-gradient(160deg, #fdfaf2, #f7f1e4); border: 1px solid var(--gold-300); border-radius: 14px; padding: 12px 15px; margin: 2px 0 10px; }
.pweek-score-num { flex: none; display: flex; align-items: baseline; gap: 5px; }
.pweek-score-num b { font-family: var(--serif); font-size: 42px; font-weight: 800; line-height: 1; }
.pweek-score-num span { font-size: 13px; color: var(--muted); }
.pweek-score-num.excellent b { color: #2e7d5b; }
.pweek-score-num.pass b { color: #9a6a1f; }
.pweek-score-num.fail b { color: #a4433f; }
.pweek-score-info { min-width: 0; }
.pweek-score-comment { font-size: 13.5px; color: var(--ink); }
.pweek-score-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Quiz 测验（老师端 + 家长端） ---------- */
.quiz-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.quiz-content { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; margin: 8px 0 10px; }
.quiz-table td { padding: 4px 3px; }
.quiz-score { width: 100%; min-width: 70px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; font-weight: 700; text-align: center; background: #fff; color: var(--ink); }
.quiz-score:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(202,164,123,.18); }
.quiz-note { width: 100%; min-width: 110px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; background: #fff; }
.quiz-view { border: 1px solid var(--gold-300); background: #fffdf9; border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.quiz-my { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.quiz-my-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.quiz-my-score { font-family: var(--serif); font-size: 30px; font-weight: 800; line-height: 1; }
.quiz-my-score.excellent { color: #2e7d5b; }
.quiz-my-score.pass { color: #9a6a1f; }
.quiz-my-score.fail { color: #a4433f; }
.quiz-my-total { color: var(--muted); font-size: 13px; }

/* ---------- 周报自动保存状态提醒 ---------- */
.wk-save-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; white-space: nowrap; transition: all .2s; }
.wk-save-status.saved { color: #2e7d5b; background: #e9f5ee; }
.wk-save-status.saved::before { content: '✓'; }
.wk-save-status.saving { color: #8a6d1f; background: #fbf3dc; }
.wk-save-status.saving::before { content: '⏳'; animation: pulse 1s infinite; }
.wk-save-status.dirty { color: #a4433f; background: #fbe9e8; }
.wk-save-status.dirty::before { content: '●'; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@media (max-width: 680px) {
  .pweek-hero-stats { grid-template-columns: repeat(2, 1fr); gap: 12px 8px; }
  .hw-ov-item { flex-wrap: wrap; }
  .pweek-card-head { flex-wrap: wrap; }
  .pweek-score { flex-wrap: wrap; }
}

/* ---------- 学科周报 · 学生作业完成统计（学术管理） ---------- */
.hwstats-alert { border: 1px solid #ecc6c3; background: #fdf3f1; color: #7d2f2a; border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 13px; }
.hwstats-alert.ok { border-color: #bfe0d0; background: #eef8f3; color: #2e7d5b; }
.hwstats-alert-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hwstats-stu { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.hwstats-stu.intervene { border-color: #ecc6c3; background: #fffdfc; box-shadow: inset 3px 0 0 #c94f43; }
.hwstats-stu-name { display: flex; flex-direction: column; line-height: 1.25; }
.hw-asg-list { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.hw-asg { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; background: var(--cream); border-radius: 9px; padding: 6px 9px; }
.hw-asg-subj { font-weight: 700; min-width: 110px; }
.pill.st-submitted { background: #e7f4ee; color: #2e7d5b; border: 1px solid #bfe0d0; }
.pill.st-late { background: #faf1dd; color: #9a6a1f; border: 1px solid #ecd6a6; }
.pill.st-missing { background: #fbe9e7; color: #a4433f; border: 1px solid #ecc6c3; }
.pill.st-pending { background: #f1f0ec; color: #8c857c; border: 1px solid #e3e0d8; }
@media (max-width: 680px) {
  .grade-row { grid-template-columns: 1fr 84px; }
  .grade-sub { grid-column: 1 / -1; }
  .grade-note { grid-column: 1 / -1; }
}
.att-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-grid; place-items: center; font-size: 15px; color: var(--ink); }
.att-btn.present { background: #e7f4ee; border-color: #bfe0d0; color: #2e7d5b; }
.att-btn.late { background: #faf1dd; border-color: #ecd6a6; color: #9a6a1f; }
.att-btn.leave { background: #e8f0f8; border-color: #c6d9ec; color: #2f5d8a; }
.att-btn.absent { background: #fbe9e7; border-color: #ecc6c3; color: #a4433f; }
.att-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.att-legend span { display: inline-flex; align-items: center; gap: 5px; }
.att-legend .att-btn { width: 22px; height: 22px; font-size: 12px; cursor: default; }
.bh-card { border: 1px solid var(--line); border-radius: 12px; padding: 11px; margin-bottom: 9px; }
.bh-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bh-period { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.bh-period-label { flex: none; min-width: 70px; font-size: 12px; color: var(--muted); font-weight: 600; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; font-weight: 600; color: var(--muted); }
.chip.on { background: var(--purple-950); border-color: var(--purple-950); color: var(--gold); }
.bh-sel { width: 100%; min-width: 78px; padding: 5px 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12px; color: var(--ink); }
.bh-sel.bh-active { background: #e7f4ee; border-color: #bfe0d0; color: #2e7d5b; }
.bh-sel.bh-focused { background: #e8f0f8; border-color: #c6d9ec; color: #2f5d8a; }
.bh-sel.bh-progress { background: #faf1dd; border-color: #ecd6a6; color: #9a6a1f; }
.bh-sel.bh-attention { background: #fbe9e7; border-color: #ecc6c3; color: #a4433f; }
.bh-note { width: 100%; min-width: 90px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.comment-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.reply-thread { margin: 8px 0 0 20px; padding-left: 12px; border-left: 2px solid var(--gold-300); }
.reply-item { font-size: 13px; margin-bottom: 8px; padding: 8px 10px; background: var(--cream); border-radius: 10px; }
.reply-item .who { font-weight: 700; color: var(--purple-700); }
.report-hero { background: linear-gradient(135deg, var(--purple-950), #2c3e5e); color: #fff; border-radius: 16px; padding: 18px; margin-bottom: 12px; }
.report-hero .meta { font-size: 12.5px; color: #c8d0de; }
.report-hero .title { font-size: 19px; font-weight: 800; margin-top: 2px; }
.report-hero .quote { font-family: Georgia, "Songti SC", serif; font-size: 15px; margin: 8px 0 0; color: var(--gold-300); }
.wk-sec { margin-bottom: 12px; }
.wk-sec h3 { font-size: 13px; color: var(--purple-700); letter-spacing: .3px; margin: 0 0 6px; text-transform: uppercase; }
.wk-kpi { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--cream); }
.wk-kpi .n { font-size: 21px; font-weight: 800; }
.wk-kpi .l { font-size: 12px; color: var(--muted); }
.wk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 78%; padding: 10px 13px; border-radius: 14px; font-size: 14px; }
.bubble.me { align-self: flex-end; background: var(--purple-950); color: #fff; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble .when { display: block; font-size: 11px; opacity: .65; margin-top: 3px; }
.cmt-list { margin-top: 8px; text-align: left; }
.cmt { border-top: 1px dashed var(--line); padding: 7px 0; font-size: 13px; text-align: left; }
.cmt .who { font-weight: 700; color: var(--purple-700); }
.cmt-row { text-align: left; }
.cmt-foot { margin-top: 2px; text-align: left; }
.link-btn { border: 0; background: none; padding: 2px 4px; color: var(--purple-700); font-size: 12px; cursor: pointer; font-weight: 600; }
.reply-item { text-align: left; }
.likers { font-size: 12px; color: var(--muted); }
.badge.new { background: #e7f4ee; color: #2e7d5b; border: 1px solid #bfe0d0; }
details.comment-box > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; }
details.comment-box > summary::-webkit-details-marker { display: none; }

/* 开关（管理员：家长周报展示分类） */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: #cdd3dd; border-radius: 26px; transition: .2s; }
.switch .slider:before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--purple-700, #4a3f6b); }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ---------- 站内提醒（个人小红点：点赞/评论/回复） ---------- */
.inbox-btn {
  position: relative; align-self: flex-end;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 32px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); cursor: pointer;
}
.inbox-btn:hover { background: var(--purple-100); border-color: var(--purple-300); }
.inbox-btn .ic { color: var(--purple-800); }
.inbox-dot {
  position: absolute; top: -6px; right: -6px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: #e5484d; color: #fff; font-size: 11px; font-weight: 800; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.inbox-card { max-width: 540px; max-height: 78vh; display: flex; flex-direction: column; overflow: hidden; }
.inbox-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; }
.inbox-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.inbox-item.unread { border-color: var(--gold-600); background: #fffdf7; }
.inbox-item-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inbox-item-head b { color: var(--purple-800); }
.inbox-unread { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; flex: none; }
.inbox-item-text { margin-top: 4px; color: var(--ink); font-size: 13px; white-space: pre-wrap; }
.inbox-item-foot { margin-top: 6px; }

