/* 卷析 AI —— 共享样式（H5 主页面 + 管理后台） */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* hidden 属性优先于任何 display 规则（修复 flex/grid 元素 hidden 失效） */
[hidden] { display: none !important; }

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1f2430;
  --muted: #69718a;
  --line: #e6e9f4;
  --primary: #5b5ff1;
  --primary-2: #8b5cf6;
  --grad: linear-gradient(135deg, #5b5ff1, #8b5cf6);
  --green: #10b981;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --radius: 20px;
  --shadow: 0 10px 40px rgba(30, 41, 80, .08);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
             "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
             "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

/* 背景装饰光斑 */
.bg-deco {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 320px at 12% -6%, rgba(91, 95, 241, .12), transparent 60%),
    radial-gradient(460px 300px at 96% 4%, rgba(139, 92, 246, .10), transparent 60%),
    radial-gradient(560px 380px at 50% 110%, rgba(16, 185, 129, .07), transparent 60%);
}

.shell { max-width: 680px; margin: 0 auto; padding: 18px 16px 56px; }
.shell.slim { max-width: 460px; }

/* ---------------- 顶栏 ---------------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; box-shadow: 0 6px 16px rgba(91, 95, 241, .35);
}
.admin-link {
  color: var(--muted); text-decoration: none; font-size: 13.5px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  transition: .2s;
}
.admin-link:hover { color: var(--primary); border-color: var(--primary); }

/* ---------------- 品牌 Logo 图片 ---------------- */
/* logo.png 为横向组合标（图标+文字），深色内容，仅用于浅色背景 */
.brand-logo { display: block; height: 34px; width: auto; }
body.h5 .brand-logo { height: 50px; }
.auth-logo { display: block; width: 200px; max-width: 72%; margin: 0 auto 20px; }

/* ---------------- Hero ---------------- */
.hero { text-align: center; padding: 26px 8px 30px; }
.hero-badge {
  display: inline-block; font-size: 12.5px; color: var(--primary); font-weight: 600;
  background: rgba(91, 95, 241, .09); border: 1px solid rgba(91, 95, 241, .18);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 16px; letter-spacing: .5px;
}
.hero h1 { font-size: clamp(27px, 6.4vw, 40px); font-weight: 800; letter-spacing: .5px; }
.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: 14.5px; margin: 12px auto 0; max-width: 480px; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 20px; margin-bottom: 18px;
  animation: rise .5s ease both;
}
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.card-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------------- 上传区 ---------------- */
.dropzone {
  border: 2px dashed #d7dcf0; border-radius: 16px; background: #fafbff;
  padding: 32px 16px; text-align: center; cursor: pointer; transition: .2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: rgba(91, 95, 241, .05); }
.dropzone svg { width: 42px; height: 42px; margin-bottom: 8px; }
.dz-main { font-size: 15px; font-weight: 600; }
.dz-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; margin-top: 14px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: visible; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.thumb .rm {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border: none; border-radius: 50%;
  background: #1f2430; color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* ---------------- 表单 ---------------- */
.fgroup { margin-top: 18px; }
.flabel { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 9px; }
.flabel .req { color: var(--rose); }
.flabel .opt { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #f4f5fb; color: #4b5268; font-size: 13px; cursor: pointer; transition: .15s;
  user-select: none;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.on {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(91, 95, 241, .3); font-weight: 600;
}

input[type="text"], input[type="tel"], input[type="number"], input[type="password"], input[type="tel"], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: #fafbff; font-size: 14.5px; color: var(--ink); outline: none; transition: .2s;
  font-family: inherit; -webkit-appearance: none; appearance: none;
}
textarea { min-height: 84px; line-height: 1.6; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 95, 241, .14); background: #fff; }
input::placeholder, textarea::placeholder { color: #a6adc5; }

.score-row { display: flex; align-items: center; gap: 10px; }
.score-row .slash { color: var(--muted); font-weight: 700; }

.btn-primary {
  display: block; width: 100%; height: 52px; margin-top: 22px; border: none; border-radius: 16px;
  background: var(--grad); color: #fff; font-size: 16.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 24px rgba(91, 95, 241, .35); transition: .2s; letter-spacing: 2px;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(91, 95, 241, .42); }
.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-ghost {
  display: block; width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--ink); font-size: 14.5px; font-weight: 600; cursor: pointer; transition: .2s;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-row { display: flex; gap: 10px; margin-top: 8px; }
.btn-row .btn-primary, .btn-row .btn-ghost { margin-top: 14px; }

.hint { text-align: center; color: #9aa1b8; font-size: 12px; margin-top: 12px; }
.hint.left { text-align: left; margin: -4px 0 4px; }

.frow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
hr { border: none; border-top: 1px solid var(--line); margin: 22px 0 18px; }

/* ---------------- 分析中 ---------------- */
.analyzing { text-align: center; padding: 34px 20px; }
.orb { width: 76px; height: 76px; margin: 0 auto 18px; position: relative; }
.orb-core {
  position: absolute; inset: 14px; border-radius: 50%; background: var(--grad);
  animation: pulse 1.4s ease-in-out infinite; box-shadow: 0 8px 26px rgba(91, 95, 241, .4);
}
.orb::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(91, 95, 241, .25); border-top-color: var(--primary);
  animation: spin 1.1s linear infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.16); } }
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing h2 { font-size: 18px; margin-bottom: 20px; }

.steps { list-style: none; text-align: left; max-width: 300px; margin: 0 auto; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 9px 0; color: #a6adc5; font-size: 14px; transition: .3s; }
.steps li i {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid #d7dcf0; flex: none;
  display: flex; align-items: center; justify-content: center; font-style: normal; transition: .3s;
}
.steps li.active { color: var(--ink); font-weight: 600; }
.steps li.active i { border-color: var(--primary); border-top-color: transparent; animation: spin .9s linear infinite; }
.steps li.done { color: var(--muted); }
.steps li.done i { border-color: var(--green); background: var(--green); position: relative; }
.steps li.done i::after {
  content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(0.5px, -1px);
}

/* ---------------- 报告（新 JSON schema） ---------------- */
.report-hero {
  background: linear-gradient(135deg, #4f46e5, #7c3aed 55%, #9333ea);
  border-radius: var(--radius); color: #fff; padding: 24px 22px; margin-bottom: 18px;
  box-shadow: 0 14px 40px rgba(91, 95, 241, .35); animation: rise .5s ease both;
}
.report-hero .rh-row1 { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.report-hero .rk { font-size: 19px; font-weight: 800; margin-bottom: 6px; letter-spacing: .5px; }
.difficulty-pill {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
  background: rgba(255,255,255,.2); margin-top: 2px;
}
.difficulty-pill.diff-基础 { background: rgba(16, 185, 129, .28); }
.difficulty-pill.diff-中等 { background: rgba(245, 158, 11, .28); }

/* 得分圆环 */
.rh-row2 { display: flex; justify-content: center; margin-top: 14px; }
.score-circle { position: relative; width: 190px; height: 190px; }
.score-circle svg { display: block; width: 100%; height: 100%; }
.score-circle .ring-track { stroke: rgba(255, 255, 255, .22); }
.score-circle .ring-bar { transition: stroke-dashoffset 1s ease .2s; }
.sc-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; text-align: center;
}
.sc-num { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.sc-of { font-size: 13px; opacity: .85; }
.sc-pct {
  font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}
.difficulty-pill.diff-偏难, .difficulty-pill.diff-困难 { background: rgba(244, 63, 94, .28); }
.score-free-badge {
  font-size: 13px; padding: 8px 16px; border-radius: 12px; background: rgba(255,255,255,.18);
}
.ring { width: 86px; height: 86px; flex: none; }
.ring text { font-weight: 800; }
.score-note { font-size: 12.5px; opacity: .85; margin-top: 12px; line-height: 1.5; }
.region-tag { font-size: 12px; opacity: .85; margin-top: 8px; }

.paper-summary { font-size: 14px; color: var(--ink); line-height: 1.6; margin-bottom: 4px; }

.current-level {
  font-size: 14.5px; color: var(--ink); line-height: 1.7; padding: 12px 14px;
  background: linear-gradient(135deg, rgba(91,95,241,.07), rgba(139,92,246,.04));
  border: 1px solid rgba(91, 95, 241, .14); border-radius: 12px;
}

/* 薄弱环节卡片 */
.weak-card {
  border-left: 4px solid var(--amber); background: #fffaf1; border-radius: 12px;
  padding: 14px 16px; margin-top: 10px; font-size: 13.5px;
}
.weak-card.pnote { border-left-color: #94a3b8; background: #f8fafc; }
.weak-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.weak-top b { font-size: 14.5px; }
.wp-idx {
  display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px;
  background: var(--grad); color: #fff; border-radius: 6px; letter-spacing: .5px;
}
.weak-card .ev { color: var(--muted); font-size: 12.5px; margin: 4px 0; line-height: 1.5; }
.weak-card .diag { color: #78350f; font-size: 13px; margin-top: 8px; padding: 8px 12px; background: rgba(245, 158, 11, .1); border-radius: 8px; line-height: 1.6; }

.err-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.err-tag {
  font-size: 11.5px; padding: 3px 10px; border-radius: 999px;
  background: rgba(100, 116, 139, .12); color: #4b5563; font-weight: 600;
}

/* 提升建议 */
.advice-block { margin-top: 14px; }
.advice-label {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 12px;
  border-radius: 999px; margin-bottom: 8px;
}
.advice-label.short { background: rgba(91, 95, 241, .1); color: var(--primary); }
.advice-label.long { background: rgba(16, 185, 129, .12); color: #0a8f68; }
.advice-body {
  font-size: 14px; line-height: 1.7; padding: 12px 14px; background: #f7f8fc;
  border-radius: 12px; color: var(--ink); white-space: pre-wrap;
}

/* 操作按钮 */
.actions { display: flex; gap: 10px; }
.actions .btn-primary { margin-top: 0; height: 48px; font-size: 15px; }
.actions .btn-ghost { height: 48px; }

/* ---------------- 错误 / 提示 ---------------- */
.error-card { text-align: center; }
.error-card h3 { font-size: 17px; margin-bottom: 8px; }
.error-card p { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }

/* ---------------- 管理后台：模型配置列表 ---------------- */
.pitem { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 12px; transition: .2s; }
.pitem.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 95, 241, .12); }
.pitem .ptop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pitem .pname { font-weight: 700; font-size: 14.5px; }
.pitem .pmeta { color: var(--muted); font-size: 12.5px; margin-top: 4px; word-break: break-all; }
.pitem .pbtns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pbtn {
  font-size: 12.5px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; color: #4b5268; transition: .15s;
}
.pbtn:hover { border-color: var(--primary); color: var(--primary); }
.pbtn.primary { background: var(--grad); color: #fff; border-color: transparent; }
.pbtn.danger:hover { border-color: var(--rose); color: var(--rose); }
.pbtn:disabled { opacity: .55; cursor: not-allowed; }
.pempty { text-align: center; color: var(--muted); font-size: 13px; padding: 22px 0 6px; }

.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 99;
  background: #23283b; color: #fff; font-size: 13.5px; padding: 10px 20px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: 86vw; text-align: center;
  animation: rise .3s ease both;
}

footer { text-align: center; color: #a6adc5; font-size: 12px; margin-top: 34px; }

@media (max-width: 420px) {
  .card { padding: 18px 15px; }
  .report-hero .lv { font-size: 26px; }
}

/* ================== 新：认证 & 娃管理 ================== */
.topbar { position: relative; }
.top-right { display: flex; align-items: center; gap: 10px; }
.nav-links {
  display: flex; gap: 4px; background: rgba(255,255,255,.7);
  border-radius: 999px; padding: 4px; backdrop-filter: blur(8px);
}
.nav-item {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; color: #5b6378;
  cursor: pointer; text-decoration: none; transition: .15s;
}
.nav-item.active { background: var(--grad); color: #fff; font-weight: 600; }

.user-chip {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink);
  background: #f0f2f8; padding: 6px 12px; border-radius: 999px;
}
.user-chip span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-btn {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer;
}
.logout-btn:hover { border-color: var(--rose); color: var(--rose); }

.auth-card {
  background: var(--card); border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow); max-width: 380px; margin: 30px auto;
}
.auth-tabs { display: flex; background: #f4f6fb; border-radius: 999px; padding: 4px; margin-bottom: 22px; }
.auth-tab {
  flex: 1; padding: 10px; border: none; background: transparent; font-size: 14px;
  color: var(--muted); cursor: pointer; border-radius: 999px; transition: .15s;
}
.auth-tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.btn-primary.full { width: 100%; margin-top: 10px; }
.auth-hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 14px; }

.view-header {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 24px 4px 14px;
}
.view-header h2 { font-size: 17px; line-height: 30px; white-space: nowrap; flex: 0 0 auto; }
.btn-primary.sm, .btn-ghost.sm { padding: 7px 14px; font-size: 13px; height: auto; border-radius: 10px; }
.btn-ghost.danger { color: var(--rose); border-color: rgba(244,63,94,.25); }
.btn-ghost.danger:hover { background: rgba(244,63,94,.06); }

/* 娃列表 */
.children-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.child-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border-radius: 16px; padding: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.ci-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ci-badge {
  background: rgba(91,95,241,.1); color: var(--primary); font-size: 11px;
  padding: 2px 8px; border-radius: 999px; font-weight: 500;
}
.ci-sub { color: var(--muted); font-size: 12.5px; margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.ci-note { color: #5b6378; font-size: 12.5px; margin-top: 6px; background: #f8f9fc; padding: 6px 10px; border-radius: 8px; }
.ci-actions { display: flex; flex-direction: column; gap: 6px; }

.child-form-card h3 { margin-bottom: 12px; font-size: 15px; }
.child-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.child-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.req { color: var(--rose); }

/* 分析页娃选择器 */
.child-selector { margin-bottom: 14px; }
.child-empty {
  text-align: center; padding: 18px; background: #fff; border-radius: 16px;
  border: 1.5px dashed #d8dbe8;
}
.child-empty span { font-size: 32px; }
.child-empty p { color: var(--muted); margin: 6px 0 10px; font-size: 13.5px; }
.child-empty small { color: #9aa2b8; font-size: 11.5px; }

.child-card {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 14px; padding: 12px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.child-card.auto { border-left: 3px solid var(--primary); }
.cc-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cc-info { flex: 1; min-width: 0; }
.cc-name { font-weight: 700; font-size: 14.5px; }
.cc-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.cc-change {
  font-size: 12px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--primary); cursor: pointer;
}
.cc-change:hover { background: rgba(91,95,241,.06); }

.child-multi {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  background: #fff; border-radius: 12px; padding: 10px 12px;
}
.child-multi label { font-size: 13px; color: var(--muted); }
.child-multi select {
  flex: 1; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line);
  font-size: 13px; background: #fff;
}

/* 娃卡片右侧图标按钮 */
.cc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.cc-icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--primary); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.cc-icon-btn:hover { background: rgba(91,95,241,.08); border-color: var(--primary); }
.cc-icon-btn:active { transform: scale(.94); }

/* 切换娃下拉弹层 */
.child-selector { position: relative; }
.child-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  background: #fff; border-radius: 14px; box-shadow: 0 12px 36px rgba(30,41,80,.16);
  border: 1px solid var(--line); overflow: hidden; animation: rise .18s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cd-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; transition: .12s;
}
.cd-item:hover { background: #f6f7fc; }
.cd-item.active { background: rgba(91,95,241,.06); }
.cd-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cd-info { flex: 1; min-width: 0; }
.cd-name { font-weight: 600; font-size: 13.5px; }
.cd-meta { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.cd-check { color: var(--primary); font-weight: 700; }

/* 历史失败标识 */
.history-item.failed { border-left: 3px solid var(--rose); }
.hi-failed-badge {
  background: #fde2e4; color: var(--rose); font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
}

/* 历史 */
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.04);
  cursor: pointer; transition: .15s;
}
.history-item:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.hi-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hi-subject { font-weight: 700; font-size: 14.5px; }
.hi-grade { color: var(--muted); font-size: 12.5px; }
.hi-child { color: var(--primary); font-size: 12.5px; }
.hi-score { margin-top: 8px; display: flex; align-items: center; gap: 10px; }
.hi-score-val { font-weight: 700; font-size: 18px; color: var(--primary); }
.hi-detail-btn {
  margin-left: auto; flex: 0 0 auto;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--primary); font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: .15s;
}
.hi-detail-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.hi-detail-btn:active { transform: scale(.96); }
.hi-diff {
  font-size: 11px; padding: 2px 10px; border-radius: 999px; font-weight: 600;
}
.hi-diff.diff-基础 { background: #e6f7ef; color: var(--green); }
.hi-diff.diff-中等 { background: #fff4e0; color: var(--amber); }
.hi-diff.diff-偏难 { background: #fde2e4; color: var(--rose); }
.hi-diff.diff- { background: #eef0f7; color: var(--muted); }
.hi-meta { margin-top: 8px; color: var(--muted); font-size: 12px; display: flex; gap: 12px; }
.hi-remark {
  margin-top: 6px; font-size: 12px; line-height: 1.5; color: #92620b;
  background: #fff8e6; border-radius: 8px; padding: 6px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.filter-select {
  flex: 0 0 auto; width: auto; min-width: 104px; max-width: 140px;
  height: 30px; padding: 0 28px 0 12px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink); cursor: pointer;
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%235b5ff1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 95, 241, .14); }

.empty-box {
  text-align: center; padding: 30px 16px; color: var(--muted);
  background: #fff; border-radius: 16px; border: 1.5px dashed #e0e3ef;
}
.empty-emoji { font-size: 40px; margin-bottom: 8px; }
.empty-box p { font-size: 13px; margin-bottom: 12px; }

.history-banner {
  background: linear-gradient(135deg, rgba(91,95,241,.08), rgba(139,92,246,.08));
  color: var(--primary); padding: 10px 16px; border-radius: 12px;
  font-size: 13px; margin-bottom: 14px; font-weight: 500;
}

/* ================== PC 管理端 ================== */
.admin-pc-body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); margin: 0; padding: 0;
}
.pc-layout {
  display: grid; grid-template-columns: 220px 1fr; min-height: 100vh;
}
.pc-sidebar {
  background: linear-gradient(180deg, #1f2430, #2a2f45);
  color: #fff; padding: 20px 0;
}
.pc-logo {
  padding: 0 5px 10px; border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.pc-logo span {
  width: 32px; height: 32px; border-radius: 10px; background: var(--grad);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.pc-nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.pc-nav-item {
  padding: 10px 14px; border-radius: 10px; cursor: pointer; color: rgba(255,255,255,.65);
  font-size: 13.5px; transition: .15s; display: flex; align-items: center; gap: 10px;
}
.pc-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.pc-nav-item.active { background: rgba(91,95,241,.2); color: #fff; }
.pc-nav-item .badge {
  margin-left: auto; background: rgba(255,255,255,.12); font-size: 11px;
  padding: 2px 8px; border-radius: 999px;
}

.pc-main { padding: 28px 36px; overflow-y: auto; }
.pc-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.pc-header h1 { font-size: 22px; }
.pc-user-info { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }

.pc-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.pc-stat {
  background: #fff; border-radius: 14px; padding: 18px 20px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.pc-stat-num { font-size: 28px; font-weight: 700; color: var(--primary); }
.pc-stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }

.pc-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.pc-table th {
  text-align: left; padding: 12px 16px; background: #f8f9fc; font-size: 13px;
  color: var(--muted); font-weight: 600;
}
.pc-table td { padding: 14px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.pc-table tr:hover td { background: #fafbfd; }
.pc-table .row-actions { display: flex; gap: 6px; }
.pc-tbtn { padding: 4px 10px; font-size: 12px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.pc-tbtn:hover { border-color: var(--primary); color: var(--primary); }
.pc-tbtn.danger:hover { border-color: var(--rose); color: var(--rose); }

.pc-modal-overlay {
  position: fixed; inset: 0; background: rgba(30,41,80,.45); z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.pc-modal {
  background: #fff; border-radius: 16px; padding: 24px; width: 480px; max-height: 80vh;
  overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.pc-modal h3 { margin-bottom: 16px; font-size: 16px; }

/* Prompt 编辑区 */
.prompt-editor { margin-top: 10px; }
.prompt-editor label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.prompt-editor textarea {
  width: 100%; min-height: 180px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); font-family: inherit; font-size: 13px;
  resize: vertical; background: #fafbfd;
}
.prompt-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* PC 登录页 */
.pc-login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #5b5ff1, #8b5cf6);
}
.pc-login-box {
  background: #fff; border-radius: 20px; padding: 36px 32px; width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.pc-login-box h1 { text-align: center; font-size: 20px; margin-bottom: 6px; }
.pc-login-box > p { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }

/* View switch */
.pc-view { display: none; }
.pc-view.active { display: block; }

@media (max-width: 900px) {
  .pc-layout { grid-template-columns: 1fr; }
  .pc-sidebar { display: none; }
  .pc-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================================
   H5 新版设计 ·「理性的温度」
   仅作用于 <body class="h5">；管理端 / PC 后台沿用上方原样式，互不影响
   ===================================================================== */
body.h5 {
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --ink: #111827;
  --muted: #4B5563;
  --line: #E5E7EB;
  --primary: #4F46E5;
  --primary-2: #6366F1;
  --accent: #10B981;
  --warning: #F59E0B;
  --green: #10B981;
  --amber: #F59E0B;
  --grad: linear-gradient(135deg, #4F46E5, #6366F1);
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, .04);
  --t3: #9CA3AF;
  --soft: #EEF2FF;
}

body.h5 .bg-deco {
  background:
    radial-gradient(560px 340px at 10% -8%, rgba(79, 70, 229, .10), transparent 62%),
    radial-gradient(480px 300px at 96% 2%, rgba(16, 185, 129, .08), transparent 62%),
    radial-gradient(600px 380px at 50% 108%, rgba(79, 70, 229, .06), transparent 62%);
}

/* ---------- 版式骨架 ---------- */
body.h5 .shell { max-width: 680px; margin: 0 auto; padding: 16px 16px 56px; }
@media (min-width: 768px) { body.h5 .shell { max-width: 900px; padding: 20px 24px 64px; } }
@media (min-width: 1024px) { body.h5 .shell { max-width: 1180px; } }

body.h5 .grid-2 { display: grid; gap: 16px; }
@media (min-width: 768px) {
  body.h5 .grid-2 { grid-template-columns: 1fr 1fr; align-items: start; }
  body.h5 .grid-2 > .card { margin-bottom: 0; }
  body.h5 .grid-2 > .rp-card { margin-bottom: 0; }
}

/* ---------- 顶栏 ---------- */
body.h5 .topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247, 248, 250, .86);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  margin: 0 -16px 18px; padding: 10px 16px;
}
@media (min-width: 768px) { body.h5 .topbar { margin: 0 -24px 20px; padding: 12px 24px; } }
body.h5 .brand { font-size: 16px; letter-spacing: .3px; }
body.h5 .logo {
  width: 32px; height: 32px; border-radius: 9px; font-size: 16px;
  background: var(--grad); box-shadow: 0 6px 16px rgba(79, 70, 229, .26);
}
body.h5 .nav-links { display: flex; gap: 2px; }
body.h5 .nav-item {
  position: relative; padding: 8px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--muted); transition: .15s;
}
body.h5 .nav-item:hover { color: var(--primary); background: rgba(79, 70, 229, .06); }
body.h5 .nav-item.active { background: transparent; color: var(--primary); font-weight: 600; }
body.h5 .nav-item.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; background: var(--primary); border-radius: 2px;
}
body.h5 .user-chip {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 6px 4px 12px; font-size: 13px;
}
body.h5 .logout-btn { border: none; background: transparent; color: var(--t3); font-size: 12.5px; padding: 0 8px; }
body.h5 .logout-btn:hover { color: var(--rose); }

/* ---------- 卡片 / 按钮 / 表单 ---------- */
body.h5 .card {
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 18px; margin-bottom: 16px;
}
@media (min-width: 768px) { body.h5 .card { padding: 22px; } }
body.h5 .card-title { font-size: 18px; font-weight: 600; }
body.h5 .card-sub { color: var(--t3); font-size: 13px; }

body.h5 .btn-primary {
  background: var(--primary); border-radius: 14px; height: 48px;
  font-size: 15.5px; letter-spacing: .5px; box-shadow: 0 8px 20px rgba(79, 70, 229, .24);
}
body.h5 .btn-primary:hover { box-shadow: 0 12px 26px rgba(79, 70, 229, .32); }
body.h5 .btn-primary:active { transform: scale(.985); }
body.h5 .btn-primary.sm { height: auto; border-radius: 10px; box-shadow: none; padding: 7px 14px; font-size: 13px; }
body.h5 .btn-ghost {
  border-radius: 12px; border-color: var(--line); color: var(--muted);
  font-size: 14px; background: #fff;
}
body.h5 .btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: rgba(79, 70, 229, .05); }

body.h5 .flabel { font-size: 13px; color: var(--ink); }
body.h5 .flabel .opt { color: var(--t3); }
body.h5 input[type="text"], body.h5 input[type="number"], body.h5 input[type="password"],
body.h5 input[type="tel"], body.h5 select, body.h5 textarea {
  border-radius: 12px; border-color: var(--line); background: #fff; font-size: 14px;
}
body.h5 input:focus, body.h5 select:focus, body.h5 textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14);
}
body.h5 .chip.on { background: var(--primary); box-shadow: 0 4px 12px rgba(79, 70, 229, .24); }
body.h5 .hint { color: var(--t3); font-size: 12.5px; }
body.h5 footer { color: var(--t3); font-size: 12px; }

body.h5 .dropzone { border-color: #D7DBE3; border-radius: 14px; background: #FBFCFE; }
body.h5 .dropzone:hover, body.h5 .dropzone.dz-hover, body.h5 .dropzone.drag {
  border-color: var(--primary); background: rgba(79, 70, 229, .04);
}
body.h5 .dz-main { font-size: 14.5px; }
body.h5 .dz-sub { color: var(--t3); }

body.h5 .view-header { margin: 20px 2px 14px; }
body.h5 .view-header h2 { font-size: 18px; font-weight: 600; color: var(--ink); }

/* ---------- 娃信息 / 历史列表 微调 ---------- */
body.h5 .auth-card { border-radius: var(--radius); box-shadow: var(--shadow); }
body.h5 .auth-tabs { background: #F3F4F6; }
body.h5 .auth-tab.active { color: var(--primary); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
body.h5 .child-item, body.h5 .history-item {
  border-radius: 14px; box-shadow: var(--shadow); border: 1px solid transparent;
}
body.h5 .history-item:hover { border-color: #E0E3EA; box-shadow: 0 8px 24px rgba(17, 24, 39, .07); }
body.h5 .hi-detail-btn { border-color: var(--line); color: var(--primary); }
body.h5 .hi-detail-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
body.h5 .ci-note { background: #F7F8FA; color: var(--muted); }
body.h5 .empty-box { border-color: var(--line); color: var(--t3); }
body.h5 .auth-card { max-width: 420px; margin: 28px auto; }
body.h5 #analyzeView > h2 {
  font-size: clamp(22px, 4.6vw, 30px); font-weight: 800; color: var(--ink);
  line-height: 1.35; margin: 8px 2px 16px;
}
body.h5 #analyzeView > h2 em { font-style: normal; color: var(--primary); }
body.h5 .analyzing h2 { color: var(--ink); }
body.h5 .steps li { color: var(--t3); }
body.h5 .steps li.active { color: var(--primary); }

/* Pad / 桌面：列表双列 */
@media (min-width: 768px) {
  body.h5 .children-list,
  body.h5 .history-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
}

/* =====================================================================
   报告：模块一 全局概览
   ===================================================================== */
/* 概述：单列顺序展示（得分 → 描述 → 失分分布 → 知识点） */
.rp-hero {
  display: block; padding: 22px 20px; margin-bottom: 16px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  animation: rpRise .4s ease both;
}
@media (min-width: 768px) { .rp-hero { padding: 26px 24px; } }
@keyframes rpRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rpFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.rp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.rp-tag {
  font-size: 12px; font-weight: 600; color: var(--primary);
  background: var(--soft); border-radius: 999px; padding: 4px 12px;
}
.rp-tag.plain { color: var(--muted); background: #F3F4F6; }
.rp-score { font-size: 48px; font-weight: 800; color: var(--primary); line-height: 1.05; letter-spacing: -1px; }
.rp-score small { font-size: 16px; font-weight: 600; color: var(--t3); margin-left: 4px; letter-spacing: 0; }
.rp-rate { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.rp-rate b { color: var(--accent); font-weight: 700; }
.rp-note { font-size: 12px; color: #51597c; margin-top: 6px; line-height: 1.5; }

/* 家长本次填写的备注回显 */
.rp-remark {
  margin-top: 10px; font-size: 12.5px; line-height: 1.55; color: #7a5310;
  background: #fff8e6; border: 1px solid #f6e2b8; border-radius: 10px;
  padding: 8px 12px; display: flex; gap: 8px; align-items: flex-start;
}
.rp-remark-tag {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #b45309;
  background: #fdefcf; border-radius: 999px; padding: 2px 8px; margin-top: 1px;
}

.rp-donut { position: relative; width: 136px; height: 136px; margin: 0 auto; }
.rp-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rp-donut .track { stroke: #F1F2F6; }
.rp-donut .bar { stroke: var(--primary); transition: stroke-dashoffset 1s cubic-bezier(.22, .8, .3, 1) .15s; }
.rp-donut .bar.good { stroke: var(--accent); }
.rp-donut .bar.low { stroke: var(--warning); }
.rp-donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
}
.rp-donut-center b { font-size: 23px; font-weight: 800; color: var(--ink); }
.rp-donut-center span { font-size: 11.5px; color: var(--t3); }

/* 按难度档的失分分布环形图 */
.rp-donut .seg {
  transition: stroke-dasharray .9s cubic-bezier(.22, .8, .3, 1) .15s;
}
.rp-legend { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.rp-legend-row { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.rp-legend-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; }
.rp-legend-name { flex: 0 0 auto; width: 46px; color: var(--ink); font-weight: 600; }
.rp-legend-bar {
  flex: 1 1 auto; height: 6px; border-radius: 999px; background: #f1f2f6; overflow: hidden;
}
.rp-legend-bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .9s cubic-bezier(.22, .8, .3, 1) .15s; }
.rp-legend-val {
  flex: 0 0 auto; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11.5px;
}
.rp-donut-cap { margin-top: 8px; font-size: 11.5px; line-height: 1.5; color: var(--t3); }

.rp-bars { display: flex; flex-direction: column; gap: 12px; }
.rp-bar-row { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.rp-bar-name { color: var(--muted); }
.rp-bar-track { height: 8px; border-radius: 999px; background: #F1F2F6; overflow: hidden; }
.rp-bar-fill { height: 100%; border-radius: 999px; width: 0; transition: width .9s cubic-bezier(.22, .8, .3, 1) .1s; background: var(--primary); }
.rp-bar-fill.s1 { background: #C7D2FE; }
.rp-bar-fill.s2 { background: #818CF8; }
.rp-bar-fill.s3 { background: var(--primary); }
.rp-bar-val { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.rp-kps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.rp-hero-block .rp-kps { margin-top: 0; }
.rp-hero-block .rp-legend { margin-top: 0; }
.rp-kp { font-size: 12px; color: var(--muted); background: #F7F8FA; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }

/* =====================================================================
   报告：模块二 / 三 通用卡片
   ===================================================================== */
.rp-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 18px; margin-bottom: 16px; animation: rpRise .4s ease both;
}
@media (min-width: 768px) { .rp-card { padding: 22px; } }
.rp-card-title { font-size: 18px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.rp-card-sub { font-size: 13px; color: var(--t3); margin: 4px 0 16px; }
.rp-sec-label {
  font-size: 12px; font-weight: 700; color: var(--t3);
  letter-spacing: .5px; margin: 18px 0 8px;
}
.rp-level {
  font-size: 14px; line-height: 1.6; color: var(--ink);
  background: var(--soft); border-radius: 12px; padding: 12px 14px;
}
.rp-strengths { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-strength {
  font-size: 12.5px; font-weight: 600; color: #047857;
  background: rgba(16, 185, 129, .10); border-radius: 999px; padding: 5px 12px;
}

/* ---------- 逐题失分清单 ---------- */
.rp-qlist { display: flex; flex-direction: column; }
.rp-qrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #F1F2F6; }
.rp-qrow:first-child { border-top: none; }
.rp-qrow.uncertain { background: rgba(245, 158, 11, .07); border-radius: 10px; padding: 10px 8px; }
.rp-qbadge {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rp-qmain { flex: 1; min-width: 0; }
.rp-qbrief { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.rp-qmeta { font-size: 11.5px; color: var(--t3); margin-top: 2px; }
.rp-cert {
  font-size: 11px; color: #B45309; background: rgba(245, 158, 11, .16);
  border-radius: 6px; padding: 1px 6px; margin-left: 6px;
}
.rp-qlost {
  flex: 0 0 auto; font-size: 14px; font-weight: 700; color: var(--warning);
  font-variant-numeric: tabular-nums;
}

/* ---------- 薄弱点折叠面板 ---------- */
.rp-acc {
  border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px;
  overflow: hidden; background: #fff; transition: border-color .2s, box-shadow .2s;
}
.rp-acc:hover { border-color: #D7DBE3; }
.rp-acc.open { border-color: rgba(245, 158, 11, .45); box-shadow: 0 6px 18px rgba(245, 158, 11, .10); }
.rp-acc-head { display: flex; align-items: center; gap: 10px; padding: 13px 14px; cursor: pointer; user-select: none; }
.rp-acc-idx {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px;
  background: var(--soft); color: var(--primary); font-size: 11.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.rp-acc-title { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.rp-badge { flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.rp-badge.lost { background: rgba(245, 158, 11, .14); color: #B45309; }
.rp-badge.pri-高 { background: rgba(245, 158, 11, .16); color: #B45309; }
.rp-badge.pri-中 { background: var(--soft); color: var(--primary); }
.rp-badge.pri-低 { background: #F3F4F6; color: var(--muted); }
.rp-acc-arrow { flex: 0 0 auto; width: 14px; height: 14px; color: var(--t3); transition: transform .25s; }
.rp-acc.open .rp-acc-arrow { transform: rotate(180deg); }
.rp-acc-body { display: none; padding: 0 14px 14px; }
.rp-acc.open .rp-acc-body { display: block; animation: rpFade .25s ease both; }

/* 双轨诊断 */
.rp-dual { display: grid; gap: 12px; }
@media (min-width: 600px) {
  .rp-dual { grid-template-columns: 1fr 1px 1fr; gap: 14px; }
  .rp-dual-divider { background: var(--line); }
  .rp-dual-divider.hide-sm { display: block; }
}
.rp-dual-label { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; color: var(--t3); margin-bottom: 5px; }
.rp-dual-surface { font-size: 14px; line-height: 1.6; color: var(--ink); }
.rp-dual-deep { font-size: 14px; line-height: 1.6; color: var(--muted); }
.rp-evidence { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
.rp-qnos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rp-qno {
  font-size: 11.5px; font-weight: 700; color: var(--primary);
  background: var(--soft); border-radius: 6px; padding: 2px 8px;
}

/* ---------- 归因与行动建议（薄弱点折叠面板内） ---------- */
.rp-attr-wrap { margin-top: 14px; }
.rp-attr-title { font-size: 11.5px; font-weight: 700; letter-spacing: .5px; color: var(--t3); margin-bottom: 8px; }
.rp-attr-card {
  border-left: 3px solid var(--primary); border-radius: 10px;
  background: var(--soft); padding: 12px 14px; margin-bottom: 10px;
}
.rp-attr-card:last-child { margin-bottom: 0; }
.rp-attr-card-warn { border-left-color: #8B5CF6; }
.rp-attr-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rp-attr-name { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.rp-attr-cat {
  font-size: 11px; font-weight: 700; color: var(--primary);
  background: rgba(91, 95, 241, .08); border-radius: 6px; padding: 2px 8px;
}
.rp-attr-label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; color: var(--t3); margin-bottom: 4px; }
.rp-attr-manifest { margin-bottom: 12px; }
.rp-attr-text { display: block; font-size: 13px; line-height: 1.6; color: var(--muted); }
.rp-attr-steps { list-style: none; margin: 0; padding: 0; }
.rp-attr-steps li { display: flex; gap: 8px; margin-bottom: 8px; }
.rp-attr-steps li:last-child { margin-bottom: 0; }
.rp-attr-idx {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; margin-top: 2px;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rp-attr-do { font-size: 13px; line-height: 1.65; color: var(--ink); }
.rp-attr-goal { font-size: 12px; line-height: 1.55; color: var(--muted); margin-top: 3px; }

/* =====================================================================
   报告：模块三 行动建议
   ===================================================================== */
/* 一级 Tab：概述 / 行动建议 / 学情诊断 */
.rp-tabs {
  display: flex; gap: 6px; padding: 5px; margin-bottom: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); position: sticky; top: 58px; z-index: 30;
}
@media (min-width: 768px) { .rp-tabs { top: 64px; } }
.rp-tab {
  flex: 1 1 0; min-width: 0; border: none; background: transparent; cursor: pointer;
  padding: 10px 6px; border-radius: 10px; transition: .18s;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--muted);
  text-align: center; white-space: nowrap;
}
.rp-tab:hover { color: var(--primary); background: rgba(79, 70, 229, .06); }
.rp-tab.on { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .26); }
.rp-tab.on:hover { background: var(--grad); color: #fff; }
.rp-panel { display: none; animation: rpFade .22s ease both; }
.rp-panel.on { display: block; }

/* 行动建议：短期 / 长期左右并排（各占一半） */
.rp-suggest-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .rp-suggest-grid { grid-template-columns: 1fr 1fr; gap: 16px; } }
.rp-suggest-col {
  background: #FBFCFE; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.rp-suggest-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; margin-bottom: 12px; }
.rp-suggest-icon {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 8px; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.rp-suggest-col.short .rp-suggest-head { color: var(--primary); }
.rp-suggest-col.short .rp-suggest-icon { background: var(--soft); color: var(--primary); }
.rp-suggest-col.long .rp-suggest-head { color: #047857; }
.rp-suggest-col.long .rp-suggest-icon { background: rgba(16, 185, 129, .12); color: #047857; }

.rp-check { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.rp-check li { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.rp-dot {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
  border: 2px solid var(--primary); position: relative; transition: .18s;
}
.rp-check li.done .rp-dot { background: var(--primary); }
.rp-check li.done .rp-dot::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.rp-text { flex: 1; font-size: 14px; line-height: 1.6; color: var(--ink); transition: .18s; }
.rp-check li.done .rp-text { color: var(--t3); text-decoration: line-through; }
.rp-advice-plain { font-size: 14px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; }

/* ---------- 报告底部操作 ---------- */
.rp-actions { display: flex; gap: 10px; margin-top: 4px; }
.rp-actions button { flex: 1; }
body.h5 .rp-actions .btn-primary { margin-top: 0; }
body.h5 .rp-actions .btn-ghost { height: 48px; }

/* ---------- 报告容器（Tab 化后为纵向单列，限宽保证阅读舒适度） ---------- */
body.h5 #result { margin: 0 auto; scroll-margin-top: 80px;}
body.h5 .rp-actions { margin-bottom: 16px; }
