/* styles.css — 情绪小镇·亲子卡牌 */
:root {
  --bg: #fdf6ec;
  --paper: #fffdf8;
  --ink: #3d2f2a;
  --muted: #7d6c61; /* ≥4.5:1 对比度（on #fffdf8 = 4.93, on #fdf6ec = 4.67） */
  --accent: #1f6f63;
  --accent-deep: #14544a;
  --mint: #7fc8a9;
  --sun: #ffd66e;
  --lav: #b8a7e8;
  --radius: 24px;
  --radius-big: 32px;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.05), 0 8px 24px rgba(20, 20, 20, 0.08);
}
* { box-sizing: border-box; }
[hidden]:not([hidden="until-found" i]) { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}
#app { max-width: 880px; margin: 0 auto; padding: 0 16px 32px; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1 { font-size: 1.6rem; margin: 0.4em 0; }
h2 { font-size: 1.25rem; }
code { background: #f3ead9; padding: 1px 6px; border-radius: 6px; font-size: .85em; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center-text { text-align: center; }

/* 页脚 */
.footer { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 18px 4px 6px; color: var(--muted); font-size: .8rem; border-top: 1px dashed #e5d9c8; margin-top: 24px; }
.footer a { color: var(--muted); }

/* 卡片纸面 */
.card-paper { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin: 14px 0; }
.hero { text-align: center; }
.hero-img { max-width: 100%; border-radius: var(--radius); margin-bottom: 8px; }
.map-img { max-height: 260px; object-fit: cover; width: 100%; }

/* 表单 */
.form label { display: block; margin: 14px 0 4px; font-weight: 600; }
.form input[type="text"], .form input[type="password"], .form input:not([type]), .form select {
  width: 100%; font-size: 1.1rem; padding: 14px 16px; margin-top: 6px;
  border: 2px solid #ead9c2; border-radius: 16px; background: #fff; color: var(--ink);
}
.form input:focus, .form select:focus { outline: 3px solid var(--sun); border-color: var(--accent); }
.form-err { color: #b3261e; font-size: .92rem; min-height: 1.2em; margin: 8px 0 0; }
/* 账号与管理后台 */
.acct-chip { color: var(--accent-deep) !important; font-weight: 700; }
.tabs { display: flex; gap: 8px; margin: 14px 0 0; }
.tab-btn {
  border: 2px solid #ead9c2; background: #fff; color: var(--muted); border-radius: 999px;
  padding: 8px 20px; font: inherit; font-weight: 600; cursor: pointer;
}
.tab-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
fieldset { border: 2px solid #f0e4d2; border-radius: 16px; margin: 16px 0; padding: 12px 16px; }
legend { font-weight: 700; padding: 0 8px; }
.radio { display: block; font-weight: 400 !important; margin: 8px 0 !important; font-size: 1rem; }
.radio input { transform: scale(1.4); margin-right: 10px; accent-color: var(--accent-deep); }

/* 按钮 */
.btn-primary, .btn-secondary, .btn-quiet {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  border-radius: 999px; font-weight: 700; text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; padding: 12px 26px; font-size: 1.05rem; box-shadow: 0 3px 0 var(--accent-deep); }
.btn-primary:active { transform: translateY(2px); box-shadow: none; }
.btn-secondary { background: #fff; color: var(--accent-deep); border: 2px solid var(--accent); padding: 10px 22px; }
.btn-quiet { background: transparent; color: var(--muted); padding: 8px 12px; font-size: .9rem; }
.btn-quiet.on { color: var(--accent-deep); font-weight: 800; }
.btn-big { font-size: 1.2rem; padding: 16px 30px; width: 100%; margin-top: 18px; }
.row-actions { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 18px; flex-wrap: wrap; }

/* 首页 */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.tile { background: #fff7ea; border-radius: var(--radius); padding: 22px 14px; text-align: center; text-decoration: none; color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.tile-emoji { display: block; font-size: 2.2rem; margin-bottom: 8px; }
.banner { background: #fff3d6; border: 2px dashed var(--sun); border-radius: 16px; padding: 12px 16px; margin: 12px 0; }
.banner.good { background: #e8f7ef; border-color: var(--mint); }

/* 场景选择 */
.scene-list { display: grid; gap: 12px; }
.scene-btn {
  font-size: 1.15rem; padding: 18px 20px; border-radius: var(--radius); border: none;
  background: #fff; box-shadow: var(--shadow); cursor: pointer; text-align: left; color: var(--ink); font-weight: 600;
}
.scene-btn:hover { background: #fff3e2; outline: 3px solid var(--sun); }

/* 发牌 */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 14px 0; }
.deal-card { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border: 1px solid #f3e8d5; }
.role-badge { display: inline-block; background: var(--mint); color: #fff; border-radius: 999px; padding: 2px 12px; font-size: .8rem; font-weight: 800; margin-bottom: 8px; }
.role-focus .role-badge { background: var(--accent); color: #fff; }
.role-challenge .role-badge { background: var(--lav); color: #fff; }

/* 卡面：卡型背景（3:4 竖版，顶部插画窗口 + 底部色带文字区） */
.cardface {
  position: relative; isolation: isolate; aspect-ratio: 3 / 4; width: 100%;
  background-size: cover; background-position: center; background-color: #f7ead6;
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cardface-illu { position: absolute; z-index: 1; top: 7%; left: 9%; right: 9%; height: 42%; }
.cardface-illu img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
/* 有专属插画时：插画铺满卡面，底图让位，避免两张插画叠在一起 */
.cardface.has-illu { background-image: none !important; background-color: #f3e7d4; }
.cardface.has-illu .cardface-illu { top: 0; left: 0; right: 0; height: 100%; }
.cardface.has-illu .cardface-illu img { border-radius: 0; }
.cardface-band { z-index: 3; }
.cardface-ev { z-index: 4; }
.cardface-fallback { z-index: 2; }
.cardface-band {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 10px 14px 12px;
  background: rgba(255, 253, 248, 0.94);
}
.cardface-title { font-weight: 800; font-size: 1.05rem; overflow-wrap: anywhere; }
.cardface-story { margin: 4px 0 0; font-size: .88rem; line-height: 1.55; overflow-wrap: anywhere; }
.cardface-meta { margin: 4px 0 0; font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
.cardface-wrap { max-width: 340px; margin: 0 auto; }
/* 长故事切换为流式卡面：文字带参与布局，完整内容保持可读而不被裁切。 */
.cardface:has(.cardface-story) { container-type: inline-size; min-block-size: calc(100cqw * 4 / 3); aspect-ratio: auto; }
.cardface:has(.cardface-story) .cardface-band { position: relative; margin-top: max(54cqw, 47%); min-block-size: 0; }
.cardface:has(.cardface-story).has-illu .cardface-band { margin-top: max(54cqw, 47%); }
@media (max-width: 560px) {
  .cardface-story, .cardface-meta { overflow-wrap: anywhere; word-break: normal; }
  .cardface:has(.cardface-story) .cardface-band { margin-top: 53%; }
}

/* 孩子端 */
.child-stage { text-align: center; }
.child-h1 { font-size: 2rem; }
.child-story { font-size: 1.25rem; line-height: 1.9; margin: 14px 0; }
.child-goal { font-size: 1.15rem; background: #e8f7ef; border-radius: 16px; padding: 10px 16px; display: inline-block; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 18px; }
.pick-card { border: none; background: transparent; padding: 0; cursor: pointer; text-align: left; }
.pick-card:hover .cardface, .pick-card:focus-visible .cardface { outline: 4px solid var(--sun); transform: scale(1.02); }
.pick-card .cardface { transition: transform .12s ease; }
.choice-list { display: grid; gap: 14px; margin-top: 18px; }
.btn-choice {
  font-size: 1.35rem; padding: 22px; border-radius: var(--radius-big); border: none;
  background: var(--accent); color: #fff; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 var(--accent-deep);
}
.btn-choice:active { transform: translateY(3px); box-shadow: none; }

/* 玩局 */
.play-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .play-layout { grid-template-columns: 1fr 1fr; } }
.zone-tag { display: inline-block; background: var(--mint); color: #fff; border-radius: 999px; padding: 2px 14px; font-size: .8rem; font-weight: 800; }
.parent-zone .zone-tag { background: var(--lav); }
.parent-zone details { margin: 10px 0; border-top: 1px dashed #e5d9c8; padding-top: 8px; }
.parent-zone summary { font-weight: 700; cursor: pointer; }
.parent-zone blockquote { background: #fff7ea; border: 1px solid #f0e0c8; margin: 10px 0; padding: 10px 14px; border-radius: 12px; }
.parent-zone blockquote::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 2px; }
.variant-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.variant-tab { border: 2px solid #ead9c2; background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: .85rem; }
.variant-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.play-actions { display: grid; gap: 10px; margin-top: 14px; }

/* 表情选择（图标按钮） */
.feeling-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feeling-row-review { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.feeling { display: block; text-align: center; border: 2px solid #f0e4d2; border-radius: 18px; padding: 12px 6px; font-size: .8rem; cursor: pointer; }
.feeling-img { display: block; width: 64px; height: 64px; object-fit: contain; margin: 0 auto 6px; }
.feeling-text { display: block; }
.feeling input { position: absolute; opacity: 0; }
.feeling:has(input:checked) { border-color: var(--accent); background: #fff3e2; }
.feeling-skip { display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* 章节地图 */
.map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; }
.map-node { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border: 3px solid transparent; }
.map-node.cur { border-color: var(--accent); }
.map-node.done { border-color: var(--mint); background: #f4fbf7; }
.map-emoji { font-size: 2rem; }
.map-emoji .sticker-img { width: 72px; height: 72px; object-fit: contain; transform: rotate(-6deg); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .18)); }
.sticker-img.big { width: 56px; height: 56px; object-fit: contain; vertical-align: middle; margin-right: 8px; }
.chapter-done { display: flex; align-items: center; }
.map-title { font-weight: 800; margin: 6px 0; }
.sticker { display: inline-block; background: var(--mint); color: #fff; border-radius: 999px; padding: 3px 14px; font-weight: 800; font-size: .85rem; margin-top: 8px; transform: rotate(-3deg); }
.cur-sticker { background: var(--accent); transform: rotate(2deg); }

/* 下一步卡 */
.next-card { max-width: 380px; margin: 0 auto; background: #fff; border-radius: var(--radius-big); box-shadow: var(--shadow); padding: 18px; }

/* 表格（打印列表 / 后台） */
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee2cf; vertical-align: top; }
.admin-table th { background: #faf1e2; }
.tel { font-weight: 800; color: var(--accent-deep); }

/* 打印工具条与打印纸面 */
.print-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.print-sheet { display: grid; gap: 20px; margin: 16px 0; }
@media (min-width: 760px) { .print-sheet { grid-template-columns: 1fr 1fr; } }
.print-face { background: #fff; border: 2px dashed #cbb89f; border-radius: 12px; padding: 18px; break-inside: auto; }
.print-head { display: flex; justify-content: space-between; font-weight: 800; border-bottom: 2px solid #f0e4d2; padding-bottom: 6px; margin-bottom: 10px; }
.print-foot { margin-top: 12px; padding-top: 6px; border-top: 1px dashed #e5d9c8; color: var(--muted); font-size: .75rem; }
.print-face h4 { margin: 10px 0 4px; }
.print-face ol, .print-face ul { margin: 4px 0; padding-left: 22px; }
.anchor-line { font-size: .85rem; }

@page card-a6 { size: A6 portrait; margin: 8mm; }
@page card-a5 { size: A5 portrait; margin: 10mm; }
.print-sheet.a6 .print-face { max-width: 105mm; }
.print-sheet.a5 .print-face { max-width: 148mm; }

@media print {
  @page card-a6 { size: 105mm 148mm; margin: 0; }
  @page card-a5 { size: A5 portrait; margin: 0; }
  body { background: #fff; }
  .topbar, .footer, .print-toolbar, button, .btn-primary, .btn-secondary, .btn-quiet { display: none !important; }
  #app { display: block; max-width: none; min-height: 0; padding: 0; }
  .print-sheet { display: block; margin: 0; }
  .print-face { border: 1.5px solid #999; border-radius: 4mm; box-sizing: border-box; break-inside: auto; }
  .print-sheet.a6 .print-face { page: card-a6; inline-size: 105mm; min-block-size: 148mm; padding: 8mm; font-size: 9pt; line-height: 1.5; }
  .print-sheet.a5 .print-face { page: card-a5; inline-size: 148mm; min-block-size: 210mm; padding: 10mm; font-size: 10.5pt; line-height: 1.5; }
  .print-face .cardface:has(.cardface-story) { min-block-size: 0; }
  .print-face .cardface:has(.cardface-story) .cardface-band { margin-top: 38%; }
  .print-back p { margin: 1.5mm 0; }
  .print-back h4 { margin: 2mm 0 1mm; break-after: avoid; }
  .print-front { break-after: page; }
  /* 卡面背景图：已在 .cardface 上设置 print-color-adjust: exact；
     若浏览器未勾选「背景图形」，降级为背景色 + 描边，文字区仍完整可读 */
  .cardface { box-shadow: none; border: 1.5px solid #cbb89f; background-color: #f7ead6; }
  .cardface-band { background: rgba(255, 253, 248, 0.96); border-top: 1px solid #e5d9c8; }
}

/* ================= 初始诊断 ================= */
.diag-list { display: grid; gap: 10px; margin: 16px 0; }
.diag-item { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 18px; padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.diag-item:hover { outline: 3px solid var(--sun); }
.diag-idx { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.diag-main { flex: 1; display: grid; gap: 4px; }
.diag-bar { display: block; height: 8px; background: #f0e4d2; border-radius: 999px; overflow: hidden; }
.diag-bar i { display: block; height: 100%; width: 100%; background: var(--mint); border-radius: 999px; transform-origin: left; transform: scaleX(var(--fill, 0)); transition: transform .3s; }
.diag-bar.big { height: 12px; margin-top: 6px; }
.diag-status { flex: none; font-size: .8rem; color: var(--muted); border: 1.5px solid #ead9c2; border-radius: 999px; padding: 3px 12px; }
.diag-status.doing { border-color: var(--sun); color: #a07c1f; }
.diag-status.done { border-color: var(--mint); color: #2e8b6e; }
.diag-head { margin-bottom: 8px; }
.diag-field { display: block; margin: 14px 0 4px; font-weight: 600; }
.diag-field input, .diag-field select { width: 100%; font-size: 1.05rem; padding: 12px 14px; margin-top: 6px; border: 2px solid #ead9c2; border-radius: 14px; background: #fff; color: var(--ink); }
.dev-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #f0e4d2; flex-wrap: wrap; }
.dev-text { flex: 1; min-width: 220px; font-size: .95rem; }
.dev-opts { display: flex; gap: 6px; flex: none; }
.dev-opt { border: 2px solid #ead9c2; border-radius: 12px; padding: 8px 12px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.dev-opts.scale5 .dev-opt { font-size: .95rem; }
.dev-opt:has(input:checked) { border-color: var(--accent); background: #fff3e2; }
.dev-opt input { position: absolute; opacity: 0; }
.tq-item legend { font-weight: 600; font-size: .95rem; }
.tq-skip { color: var(--muted); font-size: .9rem; }
.btn-primary[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ================= 专业结果报告 ================= */
.demo-banner {
  background: #fff7ec; color: #6b4a32; font-weight: 500; text-align: left;
  padding: 10px 14px; border: 1px solid #e4c5a8; border-left: 4px solid var(--clay, #b4552d);
  border-radius: 10px; margin: 10px 0; font-size: .86rem; line-height: 1.65;
}
.report {
  background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.08);
  padding: 40px 44px; margin: 14px 0; max-width: 820px;
  font-size: .95rem; line-height: 1.85; color: #2f2a26;
}
.report-demo { outline: 3px dashed #e56b3f; outline-offset: -8px; }
.report h1, .report h2, .report h3, .report h4 { font-family: Georgia, "Songti SC", "SimSun", serif; letter-spacing: .02em; }
.report h2 { font-size: 1.35rem; border-bottom: 3px double #cbb89f; padding-bottom: 8px; margin: 34px 0 16px; }
.report h3 { font-size: 1.08rem; margin: 22px 0 8px; color: #6b4a2f; }
.report-cover { text-align: center; padding: 26px 0 6px; }
.report-cover-img { max-width: 420px; width: 100%; border-radius: 12px; margin-bottom: 18px; }
.report-kicker { letter-spacing: .35em; color: var(--muted); font-size: .8rem; text-transform: uppercase; }
.report-title { font-size: 2rem; margin: 10px 0 20px; }
.report-meta { margin: 0 auto; border-collapse: collapse; font-size: .9rem; }
.report-meta th, .report-meta td { border: 1px solid #e5d9c8; padding: 8px 16px; text-align: left; }
.report-meta th { background: #faf5ea; font-weight: 600; color: #6b4a2f; white-space: nowrap; }
.report-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 10px 0; }
.report-table th, .report-table td { border: 1px solid #e5d9c8; padding: 7px 10px; text-align: left; vertical-align: top; }
.report-table th { background: #faf5ea; color: #6b4a2f; }
.report-flex { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.report-flex .radar { flex: none; width: 260px; }
.report-flex .report-table { flex: 1; min-width: 300px; }
.rate-chip { display: inline-block; color: #fff; border-radius: 999px; padding: 1px 12px; font-size: .78rem; font-weight: 700; }
.report-note, .report-flag, .report-quote { border: 1px solid #eee2cf; border-radius: 12px; padding: 10px 14px; font-size: .9rem; }
.report-note { background: #faf5ea; }
.report-flag { background: #fdeee6; font-size: .85rem; }
.report-quote { font-family: Georgia, "Songti SC", serif; font-size: 1.05rem; margin: 12px 0; padding: 10px 16px; background: #f6f2fc; }
.report-note::before, .report-flag::before, .report-quote::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 2px; }
.report-note::before { background: var(--sun); }
.report-flag::before { background: var(--accent-deep); }
.report-quote::before { background: var(--lav); }
.temp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.temp-cell { display: flex; gap: 8px; align-items: center; border: 1px solid #eee2cf; border-radius: 10px; padding: 8px 10px; font-size: .85rem; }
.temp-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.pref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 10px 0; }
.pref-cell { border: 2px solid var(--mint); border-radius: 12px; padding: 10px 12px; background: #f4fbf7; }
.pref-cell.undecided { border-color: #e5d9c8; background: #fbf8f2; }
.pref-result { font-family: Georgia, "Songti SC", serif; font-size: 1.15rem; font-weight: 800; }
.pref-title { font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.pref-ev { font-size: .78rem; color: #6b5d52; }
.mix-bar { display: flex; height: 34px; border-radius: 999px; overflow: hidden; margin: 10px 0; }
.mix-seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: .75rem; font-weight: 700; min-width: 0; }
.mix-authoritative { background: #5aa77c; }
.mix-authoritarian { background: #e56b3f; }
.mix-permissive { background: #e8b84b; }
.mix-neglectful { background: #b8a7e8; }
.report-block { border-top: 1px solid #eee2cf; padding-top: 6px; margin-top: 18px; }
.script { color: #6b4a2f; background: #faf5ea; padding: 2px 8px; border-radius: 8px; font-size: .86rem; }
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dodont-col { border-radius: 14px; padding: 16px 18px; }
.dodont-col.do { background: #eef7f1; border: 2px solid var(--mint); }
.dodont-col.dont { background: #fdeee6; border: 2px solid #f0b9a0; }
.dodont-col h3 { margin-top: 0; }
.dodont-col li { margin: 8px 0; font-size: .9rem; }
.glossary dt { font-weight: 800; margin-top: 8px; color: #6b4a2f; }
.glossary dd { margin: 2px 0 8px 0; font-size: .9rem; }
.report-disclaimer { border: 2px dashed #cbb89f; border-radius: 12px; padding: 12px 16px; font-size: .9rem; background: #fbf8f2; }
.report-footer { margin-top: 34px; border-top: 1px solid #e5d9c8; padding-top: 12px; font-size: .82rem; color: #6b5d52; }
.report-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ================= 报告打印（A4） ================= */
@page { size: A4; margin: 18mm 16mm; }
@media print {
  .no-print { display: none !important; }
  .demo-banner { display: block !important; break-inside: avoid; color: #333; border-color: #777; }
  .report {
    box-shadow: none; border-radius: 0; padding: 0; max-width: none; margin: 0;
    font-size: 10.5pt;
  }
  .report-demo { outline: none; }
  .report-part { page-break-before: always; }
  .report-part:first-of-type, .report-cover.report-part { page-break-before: avoid; }
  .report-block, .report-table, .pref-grid, .dodont, .temp-grid { break-inside: auto; }
  .report-table thead { display: table-header-group; }
  .report-table tr { break-inside: avoid; }
  .report-cover-img { max-width: 110mm; }
  .report-flex { flex-wrap: wrap; }
  .report-flex .report-table { min-width: 0; }
  .report .rv-chart, .report .rv-goal-chart { overflow: visible; }
  .radar { width: 78mm; }
  .report h2 { margin-top: 0; break-after: avoid; }
  /* 页眉页脚：@page 边距 + 文档自身 cover/footer 承担；浏览器页眉页脚请在打印对话框关闭 */
}

/* ================= 小屏（≤520px，iPhone 390 等） ================= */
@media (max-width: 520px) {
  .report { padding: 22px 18px; }
  .report-cover { overflow-x: auto; }
  .dodont { grid-template-columns: 1fr; }
  .temp-grid { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .diag-item { flex-wrap: wrap; }
  .diag-main { min-width: 160px; }
  .pref-grid { grid-template-columns: 1fr 1fr; }
}

/* ================= 兴趣轨道 ================= */
.track-card { background: #fff; border: 1px solid #f3e8d5; border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; }
.track-card.active { border-color: var(--mint); background: #fbfdfa; }
.track-head { display: flex; align-items: center; gap: 12px; }
.track-icon { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; color: var(--ink, #333); }
.track-icon .track-svg, .track-svg { width: 1.8rem; height: 1.8rem; }
.track-icon.inline { width: 1.6rem; height: 1.6rem; vertical-align: -0.3rem; }
.track-title { flex: 1; display: grid; gap: 2px; }
.track-intro { margin: 8px 0 4px; }
.track-guide { display: inline-block; background: #fff3d6; border: 1.5px dashed var(--sun); border-radius: 12px; padding: 8px 14px; margin: 8px 0; text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 600; }
.track-weeks { display: grid; gap: 10px; margin: 10px 0; }
.track-week { border: 1px solid #f0e4d2; border-radius: 14px; padding: 10px 12px; }
.track-week.cur { border-color: var(--accent); }
.track-week.done { background: #f4fbf7; border-color: var(--mint); }
.track-week-title { font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.track-cell { display: inline-block; border: 1.5px solid #ead9c2; border-radius: 999px; padding: 5px 14px; margin: 3px 6px 3px 0; font-size: .85rem; text-decoration: none; color: var(--ink); background: #fff; }
.track-cell:hover { border-color: var(--accent); }
.track-cell.done { background: #e8f7ef; border-color: var(--mint); color: #2e8b6e; }
.teen-note { border-color: var(--lav); background: #f6f2fc; }

/* ================= 发牌页备选区 ================= */
.alt-zone { margin: 14px 0; border-top: 1px dashed #e5d9c8; padding-top: 12px; }
.alt-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.alt-card { border: 1px solid #f3e8d5; background: #fff; border-radius: var(--radius); padding: 10px; cursor: pointer; text-align: center; box-shadow: var(--shadow); }
.alt-card:hover { outline: 3px solid var(--sun); }
.alt-swap { display: inline-block; margin-top: 8px; font-size: .82rem; font-weight: 700; color: var(--accent-deep); }

/* ================= 玩局页加厚 ================= */
.step-dots { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.step-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #ead9c2; background: #fff; color: var(--muted); font-weight: 700; cursor: pointer; font-size: .85rem; }
.step-dot.cur { border-color: var(--accent); background: var(--accent); color: #fff; transform: scale(1.15); }
.step-dot.done { border-color: var(--mint); background: var(--mint); color: #fff; }
.step-cur { font-weight: 800; color: var(--accent-deep); }
.materials-check { text-align: left; background: #fff7ea; border-radius: 14px; padding: 10px 14px; margin-top: 10px; }
.check-item { display: block; font-size: .92rem; margin: 6px 0; }
.check-item input { transform: scale(1.3); margin-right: 8px; accent-color: var(--mint); }
.faq-item { font-size: .9rem; background: #faf5ea; border-radius: 10px; padding: 8px 12px; margin: 6px 0; }

/* ================= 章节地图按月分组 ================= */
.month-block { margin: 18px 0 26px; }
.month-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid #f0e4d2; padding-bottom: 6px; margin-bottom: 10px; }
.month-head h2 { margin: 0; font-size: 1.15rem; }
.month-block.locked { opacity: .55; }
.lock-note { font-size: .85rem; color: var(--muted); }
.map-cards { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.map-card-chip { background: #faf1e2; border: 1px solid #ead9c2; border-radius: 999px; padding: 2px 10px; font-size: .75rem; color: var(--ink); }

/* ================= 知识库 ================= */
.kb-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.kb-filter { border: 2px solid #ead9c2; background: #fff; border-radius: 999px; padding: 6px 16px; cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--muted); }
.kb-filter.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.kb-list { display: grid; gap: 10px; }
.kb-entry { background: #fff; border: 1px solid #f0e4d2; border-radius: 16px; padding: 12px 16px; }
.kb-entry summary { cursor: pointer; display: grid; gap: 2px; }
.kb-name { font-weight: 800; font-size: 1.02rem; }
.kb-en { color: var(--muted); font-weight: 400; font-size: .82rem; margin-left: 6px; }
.kb-tagline { color: var(--muted); font-size: .9rem; }
.kb-body { border-top: 1px dashed #e5d9c8; margin-top: 10px; padding-top: 8px; }
.kb-body h4 { margin: 10px 0 4px; color: #6b4a2f; }
.kb-body ul { margin: 4px 0; padding-left: 22px; }
.kb-body li { margin: 4px 0; }
.kb-meta { font-size: .78rem; color: var(--muted); margin-top: 10px; }
.kb-divider { border: none; border-top: 2px dashed #e5d9c8; margin: 26px 0; }

/* ---------- 家庭共进计划（fpp.js） ---------- */
.fpp { max-width: 1080px; }
.fpp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.fpp-actions { display: flex; align-items: center; gap: 10px; }
.fpp-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 18px; border-bottom: 1px solid var(--line, #eee2cf); }
.fpp-tab { border: 1px solid transparent; background: none; padding: 9px 14px; border-radius: 10px 10px 0 0; font: inherit; font-size: 14px; color: #7d6c61; cursor: pointer; }
.fpp-tab:hover { background: #faf3e8; }
.fpp-tab.on { background: #fffdf8; border-color: #eee2cf; border-bottom-color: #fffdf8; color: #b44a22; font-weight: 700; margin-bottom: -1px; }
.fpp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.fpp-card { background: #fffdf8; border: 1px solid #eee2cf; border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; }
.fpp-card h3 { margin: 0 0 10px; font-size: 17px; }
.fpp-card h4 { margin: 16px 0 8px; font-size: 14px; color: #2f6f62; }
.fpp-field { display: block; margin: 8px 0; }
.fpp-field > span { display: block; font-size: 12.5px; color: #7d6c61; margin-bottom: 4px; }
.fpp-field input[type="text"], .fpp-field input[type="number"], .fpp-field textarea, .fpp-field select {
  width: 100%; box-sizing: border-box; padding: 9px 11px; font: inherit; font-size: 14px;
  border: 1px solid #e6d8c4; border-radius: 10px; background: #fff; color: #2b2118;
}
.fpp-field input:focus, .fpp-field textarea:focus, .fpp-field select:focus { outline: 2px solid #ffb28c; outline-offset: 1px; }
.fpp-four { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }
.fpp-gas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 10px; padding: 8px 0; border-top: 1px dashed #eee2cf; margin-top: 6px; }
.fpp-gas > span { grid-column: 1 / -1; }
.fpp-gbo-row { display: grid; gap: 6px; margin-top: 6px; }
.gbo { display: grid; grid-template-columns: 52px 1fr 30px; align-items: center; gap: 8px; font-size: 13px; }
.gbo input[type="range"] { accent-color: #b44a22; width: 100%; }
.gbo output { font: 13px ui-monospace, monospace; text-align: right; }
.fpp-goal { border: 1px solid #eee2cf; border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: #fff; }
.fpp-goal summary { cursor: pointer; list-style: none; }
.fpp-goal summary::-webkit-details-marker { display: none; }
.fpp-goal summary::before { content: "▸ "; color: #b44a22; }
.fpp-goal[open] summary::before { content: "▾ "; }
.fpp-goal-row { border-bottom: 1px dashed #eee2cf; padding: 8px 0; }
.fpp-dose { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 10px 0; font-size: 13px; }
.fpp-dose input[type="number"] { width: 62px; padding: 6px 8px; font: inherit; border: 1px solid #e6d8c4; border-radius: 8px; }
.fpp-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.fpp-trend { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px dashed #eee2cf; padding: 6px 0; font-size: 13px; }
.spark { color: #2f6f62; }
.fpp-log { list-style: none; margin: 6px 0; padding: 0; font-size: 13px; }
.fpp-log li { padding: 5px 0; border-bottom: 1px dashed #eee2cf; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link-btn { margin-left: auto; border: 0; background: none; color: #a3341f; font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; }
.meeting-list { margin: 6px 0; padding-left: 22px; }
.meeting-list li { margin: 7px 0; font-size: 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
@media (max-width: 640px) {
  .fpp-card { padding: 14px; }
  .fpp-head { flex-direction: column; }
}
@media print {
  .topbar, .sync-statusbar, .fpp-tabs, .fpp-actions, .row-actions, .link-btn, .play-actions, .game-choices { display: none !important; }
  .fpp-card { break-inside: auto; border-color: #ccc; }
}

/* ============================================================
   2026-10-21 前端优化（Taste-Skill × UI-Critic）
   形状规则：按钮 12 / 输入 10 / 卡片 16 / 胶囊仅用于 chip
   单一 accent：深青绿 #1f6f63（暖陶土仅保留在插画内容中）
   ============================================================ */
:root {
  --ui-accent: #1f6f63;
  --ui-accent-deep: #14544a;
  --ui-accent-soft: #e3f1ed;
  --ui-line: #e7dccd;
  --ui-line-strong: #d6c7b3;
  --ui-ink-2: #6b5d52;
  --ui-focus: #1f6f63;
  --ui-r-btn: 12px;
  --ui-r-input: 10px;
  --ui-r-card: 16px;
}

/* 顶栏：品牌与工具一行，五个主入口在窄屏按词换行。 */
.topbar {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px;
  align-items: center; padding: 10px 2px 6px;
  border-bottom: 1px solid var(--ui-line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(1.2) blur(8px);
}
.brand {
  grid-column: 1; grid-row: 1; display: inline-flex; align-items: center; gap: 6px;
  min-width: 0; font-weight: 800; color: var(--ink); text-decoration: none;
}
.brand-mark, .brand-logo {
  display: block; width: 30px; height: 30px; flex: none; object-fit: contain; border-radius: 4px;
}
.brand-mark { background: url("assets/tongxin_logo_192.png") center / contain no-repeat; }
.brand-word { display: block; font-size: 15px; letter-spacing: .2px; white-space: nowrap; }
.topbar nav {
  grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px; min-width: 0; width: 100%;
}
.topbar nav a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 0;
  min-height: 44px; padding: 6px 9px; border-radius: 8px;
  color: var(--ui-ink-2); text-decoration: none; font-size: .875rem; line-height: 1.35;
  white-space: normal; text-align: center; overflow-wrap: normal; word-break: normal;
}
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--ui-accent); background: var(--ui-accent-soft); }
.topbar nav a[aria-current="page"] { font-weight: 700; }
.topbar-tools {
  grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end;
  gap: 4px; min-width: 0; flex-wrap: wrap;
}
.topbar-tools > a {
  display: inline-flex; align-items: center; min-height: 44px; min-width: 0; padding: 0 7px;
  color: var(--ui-ink-2); font-size: .8rem; text-decoration: none; border-radius: 8px; white-space: nowrap;
}
.topbar-tools > a:hover, .topbar-tools > a[aria-current="page"] { color: var(--ui-accent); background: var(--ui-accent-soft); }
.topbar-tools > .topbar-account { display: block; align-content: center; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.kid-switch { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.kid-switch > span {
  position: static; width: auto; height: auto; margin: 0; padding: 0; overflow: visible;
  clip: auto; clip-path: none; white-space: normal; font-size: .72rem; line-height: 1.25; color: var(--ui-ink-2);
}
.kid-switch select {
  min-height: 44px; min-width: 0; width: 9rem; max-width: 100%; padding: 0 24px 0 8px;
  font-size: 13px; font-weight: 600; text-overflow: ellipsis;
  color: var(--ui-accent); background: var(--ui-accent-soft); border: 1px solid var(--ui-line);
  border-radius: 10px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 14px) center, calc(100% - 9px) center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.kid-switch select:hover { border-color: var(--ui-accent); }
.app-lang {
  grid-column: 3; grid-row: 1; justify-self: end; min-width: 44px; min-height: 44px; padding: 5px 8px;
  border: 1px solid var(--ui-line-strong); background: transparent; color: var(--muted); border-radius: 10px;
  font: 700 11px/1 ui-monospace, Menlo, monospace; cursor: pointer;
}
.app-lang:hover { color: var(--accent-deep); border-color: var(--accent); background: #e8f7ef; }
.topbar:not(:has(.topbar-tools)) nav { grid-template-columns: minmax(0, 1fr) auto; }
.topbar nav .app-lang { grid-column: auto; grid-row: auto; }
@media (max-width: 720px) {
  .topbar { gap: 4px 6px; padding-top: 6px; }
  .topbar nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .topbar nav a { flex: 1 1 min-content; min-width: 44px; padding: 6px 4px; }
  .topbar-tools > .topbar-account { max-width: 6rem; flex: 1 1 3rem; }
  .kid-switch select { width: 7rem; }
}
@media (max-width: 540px) {
  .topbar-tools { gap: 0 2px; }
  .topbar-tools > a { padding-inline: 4px; font-size: .74rem; }
  .topbar-tools .kid-switch { display: grid; grid-template-columns: auto minmax(0, 1fr); flex: 1 1 100%; }
  .topbar-tools .kid-switch select { width: 100%; }
}

/* 保存状态：说明由原生 details 展开，重试资格由应用状态机控制。 */
.sync-statusbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px;
  min-width: 0; margin: 6px 0 10px; padding: 5px 0;
  border-bottom: 1px solid var(--ui-line); color: var(--ui-ink-2); font-size: .78rem; line-height: 1.5;
}
.sync-statusbar #sync-status { flex: 1 1 12rem; min-width: 0; margin: 0; font-size: inherit; overflow-wrap: anywhere; }
.sync-statusbar details { min-width: 0; max-width: 100%; margin-left: auto; }
.sync-statusbar summary {
  min-height: 44px; align-content: center; cursor: pointer; color: var(--ui-accent-deep);
  font-size: .78rem; text-decoration: underline; text-underline-offset: 3px;
}
.sync-statusbar details[open] { flex-basis: 100%; margin-left: 0; }
.sync-statusbar .sync-detail-body { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding: 0 0 6px; }
.sync-statusbar #sync-detail { flex-basis: 100%; margin: 0 0 4px; font-size: .78rem; overflow-wrap: anywhere; }
.sync-statusbar :is(.btn-quiet, .btn-secondary) { min-height: 44px; padding: 6px 10px; font-size: .78rem; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere; }
.sync-statusbar #sync-refresh-note { min-width: 0; font-size: .75rem; overflow-wrap: anywhere; }
.sync-statusbar.error, .sync-statusbar[data-sync-severity="error"], .sync-statusbar[data-sync-severity="conflict"] {
  padding: 8px 12px; border: 1px solid #d8a995; border-radius: 10px; background: #fff4ec; color: #783b24;
}
.sync-statusbar.is-expanded, .sync-statusbar[data-sync-expanded="true"] { align-items: flex-start; row-gap: 6px; }
.sync-statusbar.is-expanded details, .sync-statusbar[data-sync-expanded="true"] details { flex-basis: 100%; margin-left: 0; }
@media (max-width: 540px) {
  .sync-statusbar { gap: 0 8px; }
  .sync-statusbar #sync-status { flex-basis: 10rem; }
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ui-focus); outline-offset: 3px; border-radius: 6px;
}
@media (forced-colors: active) {
  a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline-color: Highlight;
  }
}

/* 首页：平衡双栏 hero + 紧凑入口 */
.home-hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 28px; align-items: center; padding: 28px 4px 18px;
}
.home-kicker { margin: 0; font-size: 12.5px; letter-spacing: .06em; color: var(--ui-ink-2); text-transform: uppercase; }
.home-hero h1 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.25; margin: 10px 0 8px; letter-spacing: -.01em; }
.home-sub { margin: 0 0 18px; color: var(--ui-ink-2); font-size: 15px; max-width: 30em; }
.home-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.home-cta .btn-primary, .home-cta .btn-secondary { min-height: 44px; display: inline-flex; align-items: center; }
.home-stats { display: flex; gap: 26px; margin: 22px 0 0; padding: 14px 0 0; border-top: 1px solid var(--ui-line); }
.home-stats div { margin: 0; }
.home-stats dt { font-size: 12px; color: var(--ui-ink-2); }
.home-stats dd { margin: 2px 0 0; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.home-hero-art { margin: 0; border-radius: var(--ui-r-card); overflow: hidden; }
.home-hero-art img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.home-entries { margin-top: 8px; }
.home-entries-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.home-entries-head h2 { font-size: 16px; margin: 0; }
.quiet-link { font-size: 13px; color: var(--ui-ink-2); text-decoration: none; }
.quiet-link:hover { color: var(--ui-accent); }
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile2 {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--paper); border: 1px solid var(--ui-line);
  border-radius: var(--ui-r-card); padding: 14px 14px 13px;
  text-decoration: none; color: var(--ink); min-height: 92px;
  transition: border-color .15s ease, transform .15s ease;
}
.tile2:hover { border-color: var(--ui-accent); }
.tile2:active { transform: scale(.985); }
.tile-idx { font: 11px/1 ui-monospace, Menlo, monospace; color: var(--ui-accent); letter-spacing: .08em; }
.tile-title { font-weight: 700; font-size: 15px; margin-top: 4px; }
.tile-desc { font-size: 12.5px; color: var(--ui-ink-2); line-height: 1.5; }

/* 按钮与输入：统一形状与触控 */
.btn-primary, .btn-secondary, .btn-quiet { border-radius: var(--ui-r-btn); min-height: 44px; }
.btn-primary { background: var(--ui-accent); box-shadow: 0 3px 0 var(--ui-accent-deep); }
.btn-primary:hover { background: var(--ui-accent-deep); }
.btn-secondary { color: var(--ui-accent); border: 1.5px solid var(--ui-accent); background: var(--paper); }
.btn-secondary:hover { background: var(--ui-accent-soft); }
.btn-quiet.on { color: var(--ui-accent); }
.form input[type="text"], .form input:not([type]), .form select { border-radius: var(--ui-r-input); border-color: var(--ui-line-strong); }
.form input:focus, .form select:focus { outline: 2px solid var(--ui-focus); border-color: var(--ui-accent); }

/* FPP：页签单行、滑块可触、头部断行修复 */
.fpp-head { gap: 10px; }
.fpp-meta { font-size: 13px; color: var(--ui-ink-2); margin: 4px 0 0; }
.fpp-meta a { color: var(--ui-accent); text-decoration: none; }
.fpp-meta .sep { color: var(--ui-line-strong); margin: 0 6px; }
.fpp-tabs {
  display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto;
  scrollbar-width: none; margin: 10px 0 18px; border-bottom: 1px solid var(--ui-line);
}
.fpp-tabs::-webkit-scrollbar { display: none; }
.fpp-tab { flex: none; min-height: 44px; border-radius: 10px 10px 0 0; }
.fpp-tab.on { color: var(--ui-accent); }
.fpp-card { border-radius: var(--ui-r-card); }
.fpp-field input[type="text"], .fpp-field input[type="number"], .fpp-field textarea, .fpp-field select {
  border-radius: var(--ui-r-input); min-height: 44px;
}
.fpp-field input:focus, .fpp-field textarea:focus, .fpp-field select:focus { outline: 2px solid var(--ui-focus); }
.gbo { min-height: 44px; }
.gbo input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 44px; background: transparent; accent-color: unset;
}
.gbo input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: #e9ded0; }
.gbo input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px;
  border-radius: 50%; background: var(--ui-accent); border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22); cursor: pointer;
}
.gbo input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: #e9ded0; }
.gbo input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--ui-accent);
  border: 3px solid #fff; cursor: pointer;
}
.fpp-saved { font-size: 12.5px; color: var(--ui-ink-2); }

/* 横幅 */
.banner { border-radius: var(--ui-r-card); }

@media (max-width: 860px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 18px; }
  .home-hero-copy { order: 0; }
  .home-hero-art { order: 1; }
  .home-hero-art img { aspect-ratio: auto; height: auto; object-fit: contain; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-stats { gap: 18px; }
}
@media (max-width: 560px) {
  .print-toolbar { align-items: stretch; }
  .print-toolbar > :is(a, button) { min-block-size: 44px; }
  .print-face { padding: 14px; }
  .print-head { gap: 8px; flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .home-hero h1 { font-size: 24px; }
}
@media (pointer: coarse) {
  .pick-card, .alt-card, .game-card, .scene-btn, .variant-tab, .step-dot { min-block-size: 44px; }
}
@media print {
  .topbar { display: none; }
}

/* 桌面端加宽内容区（移动优先之外的宽松视图） */
@media (min-width: 1100px) {
  #app { max-width: 1040px; }
  .home-hero { gap: 40px; }
}

/* 目标标签（替代 🎯 装饰） */
.goal-tag {
  display: inline-block; font-size: 11px; letter-spacing: .06em; font-weight: 700;
  color: var(--ui-accent); background: var(--ui-accent-soft);
  border-radius: 999px; padding: 1px 8px; margin-right: 8px; vertical-align: 1px;
}
.map-emoji { font-variant-numeric: tabular-nums; color: var(--ui-ink-2); font-weight: 700; font-size: 13px; }

.gate-mark { display: block; width: 44px; height: 44px; margin: 0 auto 8px; background: url("assets/tongxin_logo_192.png") center / contain no-repeat; }

/* ---------- 测评中心（T0/T1） ---------- */
.assess-head { padding: 8px 4px 2px; }
.assess-kicker { margin: 0 0 4px; font: 700 11px/1.5 ui-monospace, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.assess-head h1 { font-size: 1.85rem; margin: .15em 0 .3em; letter-spacing: -.01em; }
.assess-head p { margin: 0; }
.assess-family-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.assess-family-head h2 { margin: 0 0 2px; }
.assess-sub { margin: 18px 0 8px; font-size: 1rem; }
.assess-members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.assess-member { position: relative; display: flex; flex-direction: column; background: #fff7ea; border: 1px solid #f0e4d2; border-radius: 12px; padding: 10px 12px; }
.assess-member-name { font-weight: 700; }
.assess-member-meta { font-size: .78rem; color: var(--muted); }
.assess-del { position: absolute; right: 5px; top: 4px; font-size: .7rem; padding: 4px 6px; }
.assess-member-form { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto auto; gap: 10px; align-items: end; margin-top: 14px; padding-top: 14px; border-top: 1px dashed #e5d9c8; }
.assess-member-form label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; }
.assess-member-form input, .assess-member-form select { padding: 9px 10px; border: 1.5px solid #ead9c2; border-radius: 10px; font-size: .9rem; background: #fff; color: var(--ink); }
.assess-check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; font-size: .85rem !important; }
.assess-check input { transform: scale(1.15); accent-color: var(--accent-deep); }
.assess-consent .row-actions { justify-content: flex-start; }
.assess-modules { margin-top: 26px; }
.assess-modules-head h2 { margin-bottom: 4px; }
.assess-card { background: var(--paper); border-radius: 20px; box-shadow: var(--shadow); padding: 18px 20px; margin: 12px 0; }
.assess-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.assess-card-head h3 { margin: .1em 0; font-size: 1.1rem; }
.assess-tier { font: 700 10px/1 ui-monospace, Menlo, monospace; color: var(--accent-deep); background: #e8f7ef; border: 1px solid #b7d9cf; border-radius: 999px; padding: 4px 9px; }
.assess-intro { font-size: .86rem; color: var(--muted); margin: 8px 0 10px; }
.assess-runs { display: grid; gap: 8px; }
.assess-run { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff7ea; border-radius: 12px; padding: 8px 10px; }
.assess-run > span:first-child { font-weight: 600; }
.assess-run-state { font-size: .75rem; color: var(--muted); }
.assess-run-state.done { color: var(--accent-deep); font-weight: 700; }
.assess-run button { margin-left: auto; }
.assess-run button:disabled { opacity: .45; cursor: not-allowed; }
.assess-boundary { margin-top: 20px; }
.assess-run-head { padding: 6px 4px; }
.assess-progress { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); margin: 10px 0 4px; }
.assess-bar { flex: 1; height: 6px; background: #f0e4d2; border-radius: 999px; overflow: hidden; }
.assess-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.assess-domain { border: 1.5px solid #f0e4d2; border-radius: 18px; padding: 8px 16px 14px; margin: 14px 0; background: var(--paper); }
.assess-domain legend { font-weight: 800; padding: 0 8px; color: var(--accent-deep); }
.assess-item { padding: 12px 0; border-top: 1px dashed #eadfce; }
.assess-item:first-of-type { border-top: 0; }
.assess-q { margin: 0 0 8px; font-size: .98rem; line-height: 1.65; }
.assess-options { display: flex; flex-wrap: wrap; gap: 8px; }
.assess-opt { display: flex; align-items: center; gap: 6px; margin: 0 !important; padding: 6px 12px; background: #fff7ea; border: 1.5px solid #ead9c2; border-radius: 999px; font-size: .85rem; font-weight: 500 !important; cursor: pointer; }
.assess-opt:has(input:checked) { background: #e8f7ef; border-color: var(--accent); color: var(--accent-deep); font-weight: 700 !important; }
.assess-opt input { accent-color: var(--accent-deep); }
.assess-missing { color: #a3341f; font-size: .78rem; margin: 6px 0 0; }
.assess-form .row-actions { justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 720px) {
  .assess-member-form { grid-template-columns: 1fr 1fr; }
  .assess-run button { margin-left: 0; width: 100%; }
  .assess-head h1 { font-size: 1.55rem; }
  .assess-options { gap: 6px; }
  .assess-opt { padding: 6px 9px; font-size: .8rem; }
}

/* ---------- 报告 v2 ---------- */
.rv-head { padding: 6px 4px 2px; }
.rv-head h1 { font-size: 1.9rem; margin: .15em 0 .35em; }
.rv-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.rv-section { padding: 22px; }
.rv-section h2 { margin: 0 0 12px; font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.rv-part { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 13px/1 ui-monospace, Menlo, monospace; }
.rv-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rv-sub { margin: 20px 0 8px; font-size: 1rem; }
.rv-list { margin: 0; padding-left: 20px; font-size: .92rem; line-height: 1.8; }
.rv-list li { margin: 4px 0; }
.rv-priorities li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #eadfce; padding: 5px 0; }
.rv-priorities span { font-family: ui-monospace, Menlo, monospace; color: var(--accent-deep); }
.rv-profiles { display: grid; gap: 12px; }
.rv-profile { border: 1.5px solid #f0e4d2; border-radius: 16px; padding: 12px 14px; background: #fffaf1; }
.rv-profile-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.rv-profile-head h3 { margin: 0 0 6px; font-size: 1rem; }
.rv-private { margin: 0 0 8px; font-size: .8rem; color: var(--accent-deep); }
.rv-chart { overflow-x: auto; }
.rv-chart svg, .rv-profile svg { display: block; width: 100%; height: auto; }
.rv-members { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-member { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; background: #fff7ea; border: 1px solid #f0e4d2; border-radius: 10px; }
.rv-member strong { font-size: .9rem; }
.rv-member span { font-size: .76rem; color: var(--muted); }
.rv-plan { display: grid; gap: 12px; }
.rv-plan-item { border: 1.5px solid #f0e4d2; border-radius: 14px; padding: 14px 16px; background: #fffaf1; }
.rv-plan-head { display: flex; align-items: center; gap: 10px; }
.rv-plan-head h3 { margin: 0; flex: 1; font-size: 1.02rem; }
.rv-plan-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 11px/1 ui-monospace, Menlo, monospace; }
.rv-weeks { margin: 10px 0 0; padding-left: 20px; font-size: .9rem; line-height: 1.75; }
.rv-weeks li { margin: 5px 0; }
.rv-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rv-role { background: #fff7ea; border: 1px solid #f0e4d2; border-radius: 12px; padding: 10px 12px; }
.rv-role strong { color: var(--accent-deep); font-size: .9rem; }
.rv-role p { margin: 4px 0 0; font-size: .86rem; line-height: 1.7; }
@media (max-width: 720px) {
  .rv-cols, .rv-roles { grid-template-columns: 1fr; }
  .rv-head h1 { font-size: 1.55rem; }
  .rv-section { padding: 16px; }
}
@media print {
  .rv-actions, .topbar, .footer { display: none !important; }
  .rv-section, .rv-profile { break-inside: auto; }
  .rv-chart, .rv-goal-chart, .rv-evidence-grid { overflow: visible; }
  .rv-chart svg, .rv-goal-chart svg, .rv-profile svg { max-width: 100%; break-inside: avoid; }
  .card-paper { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- 每周计划 ---------- */
.plan-head { padding: 6px 4px 2px; }
.plan-head h1 { font-size: 1.8rem; margin: .15em 0 .35em; }
.plan-meta { display: grid; grid-template-columns: 1fr 1fr auto; gap: 18px; align-items: start; }
.plan-meta > div { display: flex; flex-direction: column; gap: 3px; }
.plan-meta span { font-size: .8rem; color: var(--muted); line-height: 1.6; }
.plan-weeks { display: grid; gap: 12px; margin-top: 16px; }
.plan-week { background: var(--paper); border-radius: 18px; box-shadow: var(--shadow); padding: 16px 18px; }
.plan-week-head { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f0e4d2; padding-bottom: 8px; }
.plan-week-head h2 { margin: 0; font-size: 1.05rem; flex: 1; }
.plan-week-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 12px/1 ui-monospace, Menlo, monospace; }
.plan-tasks { list-style: none; margin: 0; padding: 0; }
.plan-task { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed #eadfce; }
.plan-task:last-child { border-bottom: 0; }
.plan-task label { display: flex; gap: 9px; align-items: flex-start; font-size: .92rem; line-height: 1.65; cursor: pointer; }
.plan-task input { margin-top: 4px; transform: scale(1.15); accent-color: var(--accent-deep); }
.plan-task.done .plan-task-text { text-decoration: line-through; color: var(--muted); }
.plan-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.plan-chip { white-space: nowrap; font: 600 9.5px/1.7 ui-monospace, Menlo, monospace; color: var(--accent-deep); background: #e8f7ef; border: 1px solid #b7d9cf; border-radius: 999px; padding: 1px 8px; }
.plan-chip.role { color: #6b5726; background: #f4efe2; border-color: #dfd2ae; }
@media (max-width: 720px) {
  .plan-meta { grid-template-columns: 1fr; }
  .plan-task { flex-direction: column; }
  .plan-chips { justify-content: flex-start; padding-left: 28px; }
  .plan-head h1 { font-size: 1.5rem; }
}

/* ---------- 卡面升级：证据等级 ---------- */
.cardface-ev {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  font: 700 9px/1 ui-monospace, Menlo, monospace; letter-spacing: .06em;
  color: var(--accent-deep); background: rgba(255, 253, 248, .92);
  border: 1px solid #b7d9cf; border-radius: 999px; padding: 4px 7px;
}

/* ---------- 小游戏 ---------- */
.games-head { padding: 6px 4px 2px; }
.games-head h1 { font-size: 1.8rem; margin: .15em 0 .35em; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.game-card { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--paper); border-radius: 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border: 1px solid #f3e8d5; }
.game-card:hover { outline: 3px solid #f6e2b8; }
.game-mark { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; font: 700 12px/1 ui-monospace, Menlo, monospace; }
.game-card-body { display: flex; flex-direction: column; gap: 3px; }
.game-card-body strong { font-size: 1rem; }
.game-how { font-size: .82rem; color: var(--muted); line-height: 1.6; margin-top: 3px; }
.games-note { margin-top: 16px; }
.game-head { padding: 6px 4px 2px; }
.game-head h1 { font-size: 1.8rem; margin: .15em 0 .35em; }
.visual-media { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--ui-line, #e6d9c8); border-radius: 14px; background: var(--ui-card, #fffaf1); margin: 8px 0 4px; }
.visual-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-fallback { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; padding: 18px; text-align: center; color: var(--ui-ink-2, #6f6559); background: repeating-linear-gradient(135deg, #fff8ec 0 12px, #f7eddd 12px 24px); }
.media-fallback svg { width: min(42%, 150px); height: auto; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.media-fallback span { max-width: 32rem; font-size: .86rem; line-height: 1.6; }
.game-stage { min-height: 360px; }
.game-progress { margin: 0 0 10px; font: 700 10px/1.5 ui-monospace, Menlo, monospace; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; }
.game-stage h2 { margin: .2em 0 .7em; font-size: 1.3rem; line-height: 1.5; }
.game-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.game-choice { border: 1.5px solid #d9cbb6; background: #fffaf1; color: var(--ink); border-radius: 12px; padding: 11px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.game-choice:hover { border-color: var(--accent); }
.game-choice.correct { background: #e8f7ef; border-color: var(--accent); color: var(--accent-deep); }
.game-choice:disabled { cursor: default; opacity: .9; }
.game-feedback { min-height: 1.5em; margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
.game-instr { margin: 0 0 14px; font-size: 1.1rem; font-weight: 600; }
.traffic-light { width: 150px; margin: 18px auto; padding: 12px; background: #2f2f2f; border-radius: 24px; display: grid; gap: 10px; }
.traffic-light span { width: 100%; aspect-ratio: 1; border-radius: 50%; background: #4b4b4b; }
.traffic-light.red span:nth-child(1) { background: #c83b2c; }
.traffic-light.yellow span:nth-child(2) { background: var(--sun); }
.traffic-light.green span:nth-child(3) { background: #3f9d68; }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 520px; margin: 0 auto; }
.mem-card { position: relative; aspect-ratio: 1; border: 1.5px solid #d9cbb6; border-radius: 14px; background: var(--accent); color: transparent; font: 700 1.4rem/1 ui-monospace, Menlo, monospace; cursor: pointer; }
.mem-card::before { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.55); font-size: 1.4rem; }
.mem-card.open, .mem-card.matched { background: #fffaf1; color: var(--ink); }
.mem-card.open::before, .mem-card.matched::before { content: none; }
.mem-card.matched { background: #e8f7ef; border-color: var(--accent); }
.story-dice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.story-card { min-height: 110px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 14px; background: #fff7ea; border: 1.5px solid #e5d5bc; border-radius: 14px; font-weight: 700; }
.story-dice + textarea, #story-text, #game-note { width: 100%; padding: 11px 13px; border: 1.5px solid #d9cbb6; border-radius: 12px; font: inherit; color: var(--ink); background: #fff; resize: vertical; }
.bingo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bingo-cell { display: flex; gap: 8px; align-items: flex-start; min-height: 78px; padding: 10px; background: #fff7ea; border: 1.5px solid #e5d5bc; border-radius: 12px; font-size: .82rem; line-height: 1.5; cursor: pointer; }
.bingo-cell input { margin-top: 3px; accent-color: var(--accent-deep); }
.breath-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0 8px; }
.breath-orb { width: 130px; height: 130px; border-radius: 50%; background: #e8f7ef; border: 2px solid #b7d9cf; transition: transform 4s ease-in-out, background 2s ease; }
.breath-orb.inhale { transform: scale(1.35); background: #d5eee6; transition-duration: 4s; }
.breath-orb.hold { transform: scale(1.35); background: #d5eee6; transition-duration: .3s; }
.breath-orb.exhale { transform: scale(.9); background: #eef2e8; transition-duration: 6s; }
.breath-label { margin: 0; font-weight: 600; }
.num-input { width: 110px; padding: 11px 14px; border: 1.5px solid #d9cbb6; border-radius: 12px; font: inherit; font-size: 1.1rem; color: var(--ink); background: #fff; }
.word-hunt { font-family: ui-monospace, Menlo, monospace; font-size: 2rem; letter-spacing: .06em; color: var(--accent-deep); }
.game-done { text-align: left; }
.game-done h2 { margin-top: .2em; }
@media (max-width: 720px) {
  .memory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bingo-grid { grid-template-columns: 1fr; }
  .story-dice { grid-template-columns: 1fr; }
  .story-card { min-height: 64px; }
  .games-head h1, .game-head h1 { font-size: 1.5rem; }
  .game-head, .game-stage { padding-left: 16px; padding-right: 16px; }
  .game-stage { min-height: 280px; }
  .game-choices, .game-stage .row-actions { align-items: stretch; }
  .game-choice, .game-stage .row-actions > button, .game-stage .row-actions > a { width: 100%; min-height: 48px; }
  .traffic-light { width: min(150px, 42vw); }
}
@media (prefers-reduced-motion: reduce) {
  .breath-orb, .course-cell, .pick-card .cardface, .tile2 { transition: none; }
}

/* 无专属插画时：不铺斜纹占位块，露出卡面底图与对话气泡，只在角上留一个类型小签 */
.cardface-illu { position: absolute; z-index: 1; top: 7%; left: 9%; right: 9%; height: 42%; }
.cardface-fallback {
  position: absolute; z-index: 2; left: 0; bottom: 0; display: inline-block; text-align: center;
  padding: 3px 9px; border-radius: 999px; color: #7a6248;
  font: 700 9px/1.5 ui-monospace, Menlo, monospace; letter-spacing: .1em;
  background: rgba(255, 252, 245, .82);
  border: 1px solid rgba(214, 194, 168, .7);
}
.cardface-illu img { position: relative; z-index: 1; }

/* 窄屏长表单 */
@media (max-width: 720px) {
  .assess-member-form > *, .game-card-body, .assess-run > span { min-width: 0; }
  .assess-member-form input, .assess-member-form select { width: 100%; min-width: 0; }
}
@media (max-width: 540px) {
  .assess-member-form { grid-template-columns: 1fr; }
}

/* 报告来源与转介 */
.rv-evidence { margin: 8px 0 0; font: 600 10px/1.6 ui-monospace, Menlo, monospace; letter-spacing: .04em; color: #6b5726; }
.rv-ev { display: inline-block; margin-top: 8px; font: 600 9px/1.6 ui-monospace, Menlo, monospace; letter-spacing: .04em; color: #6b5726; }
.rv-referral { border-top: 2px solid #c4694a; }
.rv-ref-item { border-left: 3px solid #c4694a; background: #f9efea; border-radius: 0 10px 10px 0; padding: 10px 12px; margin: 10px 0; }
.rv-ref-item.amber { border-left-color: #e0b45e; background: #fff8e7; }
.rv-ref-item p { margin: 4px 0 0; font-size: .9rem; line-height: 1.7; }

/* 每周计划：卡/游戏/每日任务 */
.plan-task a { color: var(--accent-deep); font-weight: 700; text-decoration: none; }
.plan-task a:hover { text-decoration: underline; }
.plan-task-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.plan-daily-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.plan-day { background: #fff7ea; border: 1px solid #f0e4d2; border-radius: 10px; padding: 7px 8px; font-size: .72rem; line-height: 1.45; }
.plan-day strong { display: block; color: var(--accent-deep); font-family: ui-monospace, Menlo, monospace; font-size: .68rem; margin-bottom: 2px; }
@media (max-width: 720px) {
  .plan-daily-days { grid-template-columns: 1fr; }
  .plan-task-meta { justify-content: flex-start; padding-left: 28px; }
}

/* ---------- 微课 ---------- */
.course-h2 { margin: 22px 0 6px; font-size: 1.05rem; display: flex; align-items: baseline; gap: 10px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 8px; }
.course-cell { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--ui-line); border-radius: 12px; text-decoration: none; color: inherit; background: var(--ui-card, #fff); transition: border-color .15s, transform .15s; }
.course-cell:hover { border-color: var(--ui-accent); transform: translateY(-1px); }
.course-cell.locked { opacity: .55; pointer-events: auto; }
.course-cell.done { border-color: var(--ui-accent); background: var(--ui-accent-soft); }
.course-no { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; background: var(--ui-accent-soft); color: var(--ui-accent); }
.course-cell.done .course-no { background: var(--ui-accent); color: #fff; }
.course-cell-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.course-concept, .course-script, .course-task, .course-linked, .course-continuation, .course-fidelity { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--ui-line); }
.course-concept h3, .course-script h3, .course-task h3, .course-linked h3, .course-continuation h3, .course-fidelity h3 { font-size: .95rem; margin: 0 0 8px; color: var(--ui-accent); }
.course-media .course-hero { width: 100%; height: 100%; aspect-ratio: auto; margin: 0; border: 0; border-radius: 0; }
.course-continuation-list { display: grid; gap: 10px; margin: 0; padding-left: 1.35rem; }
.course-continuation-list li { min-width: 0; }
.course-continuation-list a { color: var(--ui-accent); font-weight: 700; overflow-wrap: anywhere; }
.course-continuation-list .map-cards { margin: 6px 0 0; }
.script-line { font-size: 1.02rem; line-height: 1.8; background: var(--ui-accent-soft); border-radius: 10px; padding: 12px 14px; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab-btn { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ui-line); background: transparent; font-size: .88rem; cursor: pointer; color: var(--ui-ink-2); }
.tab-btn.on { background: var(--ui-accent); border-color: var(--ui-accent); color: #fff; }
.course-fidelity .radio { display: flex; gap: 8px; align-items: center; min-height: 40px; }
@media (max-width: 720px) {
  .course-grid { grid-template-columns: 1fr; }
  .course-continuation-list { padding-left: 1.15rem; }
  .course-continuation-list .map-cards { display: grid; grid-template-columns: 1fr; }
  .course-continuation-list .map-card-chip { overflow-wrap: anywhere; }
  .game-choice { flex: 1 1 100%; min-width: 0; }
  .memory-grid { gap: 6px; }
  .mem-card { font-size: clamp(1rem, 5vw, 1.4rem); }
}

/* 三元证据徽章 */
.cardface-ev.ev-triple { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; line-height: 1.2; }
.cardface-ev.ev-triple b { font-weight: 700; }
.cardface-ev.ev-triple i { font-style: normal; letter-spacing: -1px; }
.cardface-ev.ev-triple u { text-decoration: none; opacity: .85; }

/* 知识库三元徽章与边界 */
.kb-ev { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; font-size: .72rem; font-style: normal; color: var(--ui-ink-2); background: var(--ui-accent-soft); border-radius: 999px; padding: 2px 10px; vertical-align: middle; }
.kb-ev i { font-style: normal; letter-spacing: -1px; }
.kb-ev u { text-decoration: none; opacity: .85; }
.kb-boundary, .kb-uncertainty { font-size: .86rem; color: var(--ui-ink-2); border-left: 3px solid var(--ui-line); padding-left: 10px; margin: 10px 0 0; }

/* ---------- 内容审阅（只读派生视图） ---------- */
.review-panel { margin-top: 24px; padding-top: 18px; border-top: 2px solid var(--ui-line); }
.review-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.review-heading h2 { margin: 0 0 4px; }
.review-export { flex: none; }
.review-filters { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; align-items: end; margin: 14px 0 10px; }
.review-filters label { display: grid; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--ui-ink-2); }
.review-filters select, .review-filters input {
  width: 100%; min-height: 42px; padding: 8px 10px; border: 1.5px solid var(--ui-line-strong);
  border-radius: var(--ui-r-input); background: #fff; color: var(--ink); font: inherit; font-size: .88rem;
}
.review-filters input:focus, .review-filters select:focus { outline: 2px solid var(--ui-focus); outline-offset: 1px; border-color: var(--ui-accent); }
.review-search { grid-column: span 2; }
.review-filters > .btn-quiet { min-height: 42px; border: 1.5px solid var(--ui-line); }
.review-summary { margin: 8px 0 12px; padding: 9px 12px; border-radius: 10px; background: var(--ui-accent-soft); color: var(--ui-accent-deep); font: 600 .82rem/1.6 ui-monospace, Menlo, monospace; }
.review-table-wrap { overflow-x: auto; border: 1px solid var(--ui-line); border-radius: 12px; }
.review-table { min-width: 1420px; font-size: .8rem; }
.review-table th { white-space: nowrap; }
.review-table td { max-width: 250px; overflow-wrap: anywhere; }
.review-status { display: inline-block; padding: 2px 8px; border: 1px solid var(--ui-line-strong); border-radius: 999px; font-size: .74rem; white-space: nowrap; }
.review-status-draft { color: #7b5d18; background: #fff5d8; border-color: #e7cb70; }
.review-status-reviewed { color: #305a78; background: #edf5fb; border-color: #a8c8df; }
.review-status-approved { color: var(--ui-accent-deep); background: #e8f7ef; border-color: #9acbb8; }
.review-status-retired { color: #6d625c; background: #f2eee9; border-color: #cfc4b9; }
.review-evidence-triad { display: grid; gap: 4px; min-width: 170px; }
.review-evidence-triad span { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--ui-line); }
.review-evidence-triad b { color: var(--ui-ink-2); font-size: .72rem; }
.review-warning-list { margin: 0; padding-left: 16px; color: #a3341f; font-size: .76rem; line-height: 1.5; }
.review-warning-list li { margin: 2px 0; }
.review-ok { color: var(--ui-accent-deep); font-size: .76rem; }
.review-source { display: inline-block; color: var(--ui-ink-2); }
.review-license { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: .72rem; white-space: nowrap; }
.review-license-documented { color: var(--ui-accent-deep); background: #e8f7ef; border: 1px solid #9acbb8; }
.review-license-verify, .review-license-missing { color: #8a5a15; background: #fff5d8; border: 1px solid #e7cb70; }
.review-empty { text-align: center !important; padding: 24px !important; }
@media (max-width: 720px) {
  .review-filters { grid-template-columns: 1fr 1fr; }
  .review-search { grid-column: 1 / -1; }
  .review-filters > .btn-quiet { grid-column: 1 / -1; }
}
@media print {
  .review-heading button, .review-filters, .review-alert, #review-lifecycle { display: none !important; }
  .review-table-wrap { overflow: visible; border: 0; }
  .review-table { min-width: 0; font-size: 7pt; }
}

/* ---------- 报告可视化与家庭周看板 ---------- */
.rv-goal-chart, .rv-evidence-grid { overflow-x: auto; }
.rv-evidence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.evidence-summary { border: 1px solid var(--ui-line); border-radius: var(--ui-r-card); background: var(--paper); padding: 14px 16px; }
.evidence-summary h3 { margin: 0 0 8px; font-size: .98rem; }
.evidence-summary dl { display: grid; grid-template-columns: minmax(72px, auto) 1fr; gap: 5px 10px; margin: 0; font-size: .82rem; }
.evidence-summary dt { color: var(--ui-ink-2); font-weight: 700; }
.evidence-summary dd { margin: 0; overflow-wrap: anywhere; }
.week-board { border: 2px solid var(--ui-line); }
.week-board-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.week-board-toolbar h2 { margin: 0; }
.week-board-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 14px; }
.week-board-progress, .week-board-goals, .week-board-notes { min-width: 0; }
.week-board h3 { margin: 0 0 8px; font-size: 1rem; }
.week-board progress { appearance: none; display: block; width: 100%; height: 12px; border: 0; border-radius: 999px; overflow: clip; background: #f0e4d2; accent-color: var(--accent); }
.week-board progress::-webkit-progress-bar { background: #f0e4d2; }
.week-board progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.week-board progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.week-board-progress > p { margin: 6px 0 10px; color: var(--ui-ink-2); font-size: .85rem; }
.week-board-tasks { max-height: 360px; overflow-y: auto; padding-right: 4px; }
.week-board-table-wrap { overflow-x: auto; border: 1px solid var(--ui-line); border-radius: 10px; }
.week-board-table { min-width: 420px; margin: 0; font-variant-numeric: tabular-nums; }
.week-board-table th[scope="row"] { white-space: normal; min-width: 150px; }
.week-board-table td { text-align: center; }
.week-board-notes { margin-top: 18px; border-top: 1px dashed var(--ui-line); padding-top: 14px; }
.week-board-note-lines { min-height: 70px; margin-top: 8px; border-bottom: 1px solid var(--ui-line-strong); background: repeating-linear-gradient(to bottom, transparent 0 30px, var(--ui-line) 30px 31px); }
@media (max-width: 720px) {
  .week-board-grid { grid-template-columns: 1fr; gap: 14px; }
  .week-board-toolbar { align-items: center; }
  .week-board .plan-task { flex-direction: column; }
  .week-board .plan-task-meta, .week-board .plan-chips { justify-content: flex-start; padding-left: 28px; }
  .week-board-tasks { max-height: none; }
  .rv-evidence-grid { grid-template-columns: 1fr; }
}
@media print {
  body.print-week-board .topbar,
  body.print-week-board .footer,
  body.print-week-board .plan-head,
  body.print-week-board .plan-meta,
  body.print-week-board .plan-weeks,
  body.print-week-board .plan-roles,
  body.print-week-board > *:not(#app),
  body.print-week-board .week-board-print { display: none !important; }
  body.print-week-board #app { max-width: none; padding: 0; }
  body.print-week-board .week-board { display: block; border: 1px solid #999; box-shadow: none; margin: 0; }
  body.print-week-board .week-board-grid { grid-template-columns: 1fr 1fr; }
  body.print-week-board .week-board-tasks { max-height: none; overflow: visible; }
  .week-board, .week-board-table { break-inside: auto; }
  .week-board-table-wrap { overflow: visible; }
  .week-board-table { min-width: 0; }
  .week-board-table thead { display: table-header-group; }
  .week-board-table tr, .week-board-tasks li { break-inside: avoid; }
}

/* ---------- 咨询 / 问题工作台 ---------- */
.consult-page { display: grid; gap: 18px; }
.consult-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 22px 24px; }
.consult-hero-text { max-width: 62ch; }
.consult-hero-text h1 { margin: 4px 0 6px; }
.consult-eyebrow { margin: 0; color: var(--ui-accent); font: 700 .72rem/1.4 ui-monospace, Menlo, monospace; letter-spacing: .14em; }
.consult-hero-status { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 210px; }
.consult-statusbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.consult-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border: 1px solid var(--ui-line); border-radius: 999px; background: #fff; color: var(--ui-ink-2); font-size: .74rem; white-space: nowrap; }
.consult-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.consult-side, .consult-main { padding: 18px 20px; min-width: 0; }
.consult-side-head, .consult-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.consult-side-head h2 { margin: 0 0 2px; font-size: 1.05rem; }
.consult-side-head .muted { white-space: nowrap; }
.consult-topic-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.consult-topic { border: 1.5px solid var(--ui-line); border-radius: 14px; background: #fff; padding: 12px 13px; }
.consult-topic.is-active { border-color: var(--ui-accent); box-shadow: 0 0 0 2px var(--ui-accent-soft); }
.consult-topic.status-working { border-left: 4px solid #d79a2b; }
.consult-topic.status-resolved { border-left: 4px solid #6aa98c; opacity: .82; }
.consult-topic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.consult-topic-head strong { line-height: 1.35; }
.consult-topic-desc { margin: 6px 0 8px; color: var(--ui-ink-2); font-size: .86rem; line-height: 1.5; overflow-wrap: anywhere; }
.consult-topic-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--ui-ink-2); font-size: .76rem; }
.consult-topic-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.consult-topic-actions .btn-quiet { min-height: 34px; padding: 0 10px; font-size: .78rem; }
.consult-danger { color: #a3341f !important; border-color: #ecc3b7 !important; }
.consult-status-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--ui-line-strong); background: #f7f1e8; color: var(--ui-ink-2); font-size: .72rem; white-space: nowrap; }
.consult-status-badge.status-working { background: #fff5d8; border-color: #e7cb70; color: #7b5d18; }
.consult-status-badge.status-resolved { background: #e8f7ef; border-color: #9acbb8; color: var(--ui-accent-deep); }
.consult-topic-form { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--ui-line-strong); display: grid; gap: 10px; }
.consult-topic-form h3 { margin: 0; font-size: .96rem; }
.consult-topic-form label { display: grid; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--ui-ink-2); }
.consult-topic-form input, .consult-topic-form textarea, .consult-topic-form select {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1.5px solid var(--ui-line-strong);
  border-radius: var(--ui-r-input); background: #fff; color: var(--ink); font: inherit; font-size: .88rem;
}
.consult-topic-form textarea { resize: vertical; min-height: 74px; }
.consult-topic-form input:focus, .consult-topic-form textarea:focus, .consult-topic-form select:focus { outline: 2px solid var(--ui-focus); outline-offset: 1px; border-color: var(--ui-accent); }
.consult-topic-links { display: grid; gap: 8px; }
.consult-privacy { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--ui-line); }
.consult-privacy h3 { margin: 0 0 6px; font-size: .9rem; }
.consult-privacy .btn-quiet { margin-top: 8px; }
.consult-child-picker { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--ui-ink-2); font-weight: 700; }
.consult-child-picker select { min-height: 36px; padding: 4px 8px; border: 1.5px solid var(--ui-line-strong); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: .84rem; }
.consult-active-topic { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 10px; border-radius: 999px; background: var(--ui-accent-soft); color: var(--ui-accent-deep); font-size: .8rem; }
.consult-active-topic .btn-quiet { min-height: 28px; padding: 0 8px; font-size: .74rem; }
.consult-thread { margin: 14px 0 0; max-height: 62vh; overflow-y: auto; padding-right: 4px; scroll-behavior: smooth; }
.consult-turn { padding: 14px 0; border-top: 1px dashed var(--ui-line); }
.consult-turn:first-child { border-top: 0; padding-top: 0; }
.consult-question { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: var(--ui-accent-soft); }
.consult-question p { margin: 0; flex: 1; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.consult-q-mark { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--ui-accent); color: #fff; font: 700 .78rem/1 ui-monospace, Menlo, monospace; }
.consult-delete-session { flex: none; min-height: 28px; padding: 0 8px; font-size: .72rem; }
.consult-answer { margin-top: 10px; }
.consult-answer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.consult-mode { display: inline-flex; padding: 2px 9px; border-radius: 999px; background: #efe8db; color: var(--ui-ink-2); font-size: .72rem; font-weight: 700; }
.consult-mode-offline { background: #efe8db; }
.consult-mode-model { background: #e6efff; color: #2c4d86; }
.consult-mode-safety { background: #fff1ec; color: #8a2f1c; }
.consult-not-diagnosis { margin-left: auto; color: var(--ui-ink-2); font-size: .72rem; }
.consult-offline { margin: 8px 0 0; padding: 7px 10px; border-radius: 10px; background: #fbf4e6; color: #6d5523; font-size: .78rem; }
.consult-crisis { margin: 10px 0 4px; padding: 12px 14px; border: 1.5px solid #d66a4a; border-radius: 14px; background: #fff1ec; color: #7a2e1c; }
.consult-crisis p { margin: 6px 0 0; }
.consult-section { margin: 14px 0; padding-left: 12px; border-left: 3px solid var(--ui-line); }
.consult-section h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 5px; font-size: .92rem; }
.consult-sec-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--ui-accent-soft); color: var(--ui-accent-deep); font: 700 .72rem/1 ui-monospace, Menlo, monospace; }
.consult-sec-stop { border-left-color: #d79a2b; }
.consult-sec-sources { border-left-color: var(--ui-line-strong); }
.consult-section-body { margin: 0 0 4px; line-height: 1.65; overflow-wrap: anywhere; }
.consult-bullets { margin: 4px 0 0; padding-left: 1.1rem; line-height: 1.6; }
.consult-bullets li { margin: 3px 0; }
.consult-cites { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: baseline; }
.consult-cite { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 4px; border: 1px solid #b9d6cd; border-radius: 6px; background: #effaf6; color: var(--ui-accent-deep); font: 700 .68rem/1 ui-monospace, Menlo, monospace; cursor: pointer; }
.consult-cite:hover { background: #dff4ec; }
.consult-policy-notes { margin: 8px 0 0; padding-left: 1.1rem; color: var(--ui-ink-2); font-size: .86rem; line-height: 1.6; }
.consult-referral { margin-top: 10px; }
.consult-referral-table { font-size: .84rem; }
.consult-referral-table td { vertical-align: top; }
.consult-citation-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.consult-citation { border: 1px solid var(--ui-line); border-radius: 12px; background: #fff; padding: 10px 12px; }
.consult-citation-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.consult-citation-head a { color: var(--ui-accent-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.consult-type { display: inline-flex; padding: 1px 7px; border-radius: 999px; font-size: .68rem; font-weight: 700; background: #f0e9dd; color: var(--ui-ink-2); }
.consult-type-kb { background: #e6f0ff; color: #2c4d86; }
.consult-type-card { background: #fdf0d8; color: #7a5413; }
.consult-type-course { background: #e8f7ef; color: var(--ui-accent-deep); }
.consult-type-game { background: #f2e9ff; color: #5b3d8c; }
.consult-cite-index { margin-left: auto; color: var(--ui-ink-2); font: 700 .72rem/1 ui-monospace, Menlo, monospace; }
.consult-citation-summary { margin: 5px 0 0; color: var(--ui-ink-2); font-size: .82rem; line-height: 1.5; }
.consult-citation-meta { margin: 6px 0 0; }
.consult-ev { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: var(--ui-accent-soft); color: var(--ui-ink-2); font-size: .71rem; }
.consult-ev b { font-weight: 700; }
.consult-ev i { font-style: normal; letter-spacing: -1px; }
.consult-ev u { text-decoration: none; opacity: .85; }
.consult-ev-missing { background: #f7f1e8; color: #7b5d18; }
.consult-boundary { margin: 6px 0 0; padding-left: 9px; border-left: 2px solid var(--ui-line); color: var(--ui-ink-2); font-size: .78rem; line-height: 1.5; }
.consult-citation-source { margin: 4px 0 0; color: var(--ui-ink-2); font-size: .75rem; overflow-wrap: anywhere; }
.consult-dropped { margin-top: 10px; color: var(--ui-ink-2); font-size: .78rem; }
.consult-dropped summary { cursor: pointer; }
.consult-dropped code { padding: 1px 5px; border-radius: 5px; background: #f2ece2; font-size: .72rem; }
.consult-composer { margin-top: 14px; padding-top: 12px; border-top: 1.5px solid var(--ui-line); }
.consult-composer textarea { width: 100%; min-height: 82px; padding: 10px 12px; border: 1.5px solid var(--ui-line-strong); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; line-height: 1.55; resize: vertical; }
.consult-composer textarea:focus { outline: 2px solid var(--ui-focus); outline-offset: 1px; border-color: var(--ui-accent); }
.consult-composer-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.consult-examples { display: flex; flex-wrap: wrap; gap: 6px; }
.consult-example { min-height: 30px; padding: 0 10px; border: 1px solid var(--ui-line); border-radius: 999px; background: #fff; color: var(--ui-ink-2); font-size: .76rem; cursor: pointer; }
.consult-example:hover { border-color: var(--ui-accent); color: var(--ui-accent-deep); }
.consult-empty { padding: 26px 14px; text-align: center; color: var(--ui-ink-2); }
.consult-empty p { margin: 4px 0; }
.consult-error { margin-top: 10px; padding: 8px 12px; border: 1px solid #ecc3b7; border-radius: 10px; background: #fff1ec; color: #8a2f1c; font-size: .84rem; }
@media (max-width: 960px) {
  .consult-layout { grid-template-columns: 1fr; }
  .consult-hero { flex-direction: column; }
  .consult-hero-status { align-items: flex-start; width: 100%; }
  .consult-statusbar { justify-content: flex-start; }
  .consult-thread { max-height: none; }
}
@media (max-width: 720px) {
  .consult-hero, .consult-side, .consult-main { padding: 16px; }
  .consult-topic-links { grid-template-columns: 1fr; }
  .consult-composer-row { align-items: stretch; }
  .consult-composer-row .btn-primary { width: 100%; }
  .consult-not-diagnosis { margin-left: 0; width: 100%; }
  .consult-referral-table { display: block; overflow-x: auto; }
  .consult-topic-meta { gap: 4px 8px; }
}
@media (max-width: 420px) {
  .consult-topic-head { flex-direction: column; }
  .consult-citation-head { align-items: flex-start; }
  .consult-cite-index { margin-left: 0; }
}

/* ---------- 体系地图（system-map.js） ---------- */
.sys-head { margin-bottom: 18px; }
.sys-head h1 { margin: 6px 0 8px; }
.sys-path { margin-bottom: 16px; }
.sys-steps { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; }
.sys-steps a { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line, #e3ddcd); border-radius: 10px; background: #fffdf8; color: inherit; text-decoration: none; height: 100%; }
.sys-steps a:hover, .sys-steps a:focus-visible { border-color: #1f6f63; }
.sys-steps strong { font-size: 14px; }
.sys-steps span { color: #6f6a5d; font-size: 12px; line-height: 1.4; }
.sys-summary { margin-bottom: 16px; }
.sys-totals { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.sys-totals div { background: #f7f4ec; border-radius: 8px; padding: 10px 12px; }
.sys-totals b { display: block; font-size: 22px; line-height: 1.1; color: #1f6f63; }
.sys-totals span { font-size: 12px; color: #6f6a5d; }
.sys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.sys-line { background: #fffdf8; border: 1px solid #e3ddcd; border-radius: 12px; padding: 14px 16px; }
.sys-line header { display: flex; align-items: center; gap: 8px; }
.sys-line h3 { margin: 0; font-size: 16px; flex: 1 1 auto; }
.sys-code { font-family: var(--pub-mono, ui-monospace, monospace); font-size: 11px; letter-spacing: .08em; color: #14544a; background: #eef5f3; border: 1px solid #bcd8d1; border-radius: 999px; padding: 2px 7px; }
.sys-badge { font-size: 11px; border-radius: 999px; padding: 2px 8px; border: 1px solid transparent; }
.sys-badge.ok { color: #14544a; background: #eef5f3; border-color: #bcd8d1; }
.sys-badge.mid { color: #7a5a12; background: #fdf6e3; border-color: #e6d5a3; }
.sys-badge.gap { color: #8c3b2e; background: #fbeee9; border-color: #e8c4b8; }
.sys-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 10px 0 8px; }
.sys-counts div { background: #faf7ef; border-radius: 6px; padding: 6px 8px; }
.sys-counts dt { font-size: 11px; color: #6f6a5d; }
.sys-counts dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; color: #22301f; }
.sys-ded { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: #6f6a5d; }
.sys-modules { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.sys-chip { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: #f2efe6; color: #4c463c; border: 1px solid #e3ddcd; }
.sys-links { display: flex; gap: 14px; font-size: 12px; }
.sys-links a { color: #1f6f63; text-decoration: none; border-bottom: 1px solid rgba(31, 111, 99, .35); }
.sys-gaps { margin-top: 16px; }
@media (max-width: 1080px) {
  .sys-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sys-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sys-grid { grid-template-columns: 1fr; }
  .sys-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sys-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sys-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.section-nav { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--ui-line); padding: 8px 2px; }
.section-nav-label { flex: none; font-size: .8rem; font-weight: 700; color: var(--ui-accent); }
.section-nav-links { display: flex; flex-wrap: wrap; gap: 2px 8px; min-width: 0; }
.section-nav-links a, .route-return { display: inline-flex; align-items: center; min-height: 44px; color: var(--ui-ink-2); font-size: .82rem; text-decoration: none; padding: 0 4px; }
.section-nav-links a:hover, .section-nav-links a[aria-current="page"], .route-return:hover { color: var(--ui-accent); text-decoration: underline; text-underline-offset: 4px; }
.route-return { margin-top: 6px; }
.route-recovery-note { padding: 10px 14px; margin: 12px 0; border: 1px solid var(--ui-line-strong); border-radius: var(--ui-r-input); background: var(--ui-accent-soft); text-align: left; }
.route-recovery-note p { margin: 0 0 4px; }
.route-recovery-note a, .onb-recovery-actions a, .sys-profile-link a { color: var(--ui-accent-deep); overflow-wrap: anywhere; }
.onb-recovery-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 10px 0; font-size: .85rem; }
.onb-recovery-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.sys-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sys-profile-link { margin-bottom: 0; font-size: .85rem; }
@media (max-width: 1080px) { .sys-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .section-nav { align-items: flex-start; flex-direction: column; gap: 0; }
  .section-nav-links { gap: 0 10px; }
  .sys-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print { .section-nav, .route-return { display: none !important; } }

/* ---------- 月度简报 ---------- */
.brief h1 { margin: 6px 0 10px; }
.brief-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 10px 0 8px; }
.brief-stat { background: #f7f4ec; border-radius: 10px; padding: 12px; }
.brief-stat b { display: block; font-size: 24px; line-height: 1.1; color: #1f6f63; }
.brief-stat span { display: block; font-size: 12px; color: #4c463c; margin-top: 4px; }
.brief-stat em { display: block; font-style: normal; font-size: 11px; color: #7a7466; margin-top: 2px; }
.brief-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.brief-chip { font-size: 12px; border: 1px solid #e3ddcd; background: #fffdf8; border-radius: 999px; padding: 3px 9px; }
.brief-line { height: 2px; background: #d9d2c0; margin: 18px 0; }
@media (max-width: 760px) { .brief-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.brief-write { display: block; margin: 12px 0 6px; }
.brief-write textarea { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #d9d2c0; border-radius: 8px; background: #fffdf8; font: inherit; line-height: 1.5; resize: vertical; }
.brief-write textarea:focus { outline: 2px solid rgba(31,111,99,.35); outline-offset: 1px; }

/* 咨询：常用议题一键建立 */
.consult-starters { margin: 12px 0 4px; padding-top: 10px; border-top: 1px dashed #e3ddcd; }
.consult-starter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.consult-starter { text-align: left; padding: 7px 9px; border: 1px solid #e3ddcd; border-radius: 8px; background: #fffdf8; color: #22301f; font-size: 13px; cursor: pointer; }
.consult-starter:hover, .consult-starter:focus-visible { border-color: #1f6f63; background: #eef5f3; }
@media (max-width: 760px) { .consult-starter-grid { grid-template-columns: 1fr; } }

/* 咨询 → 计划：把一小步落成任务 */
.consult-plan-action { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.consult-plan-action .btn-secondary { min-height: 34px; padding: 0 12px; font-size: 13px; }

.consult-notice { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; padding: 8px 12px; border: 1px solid #bcd8d1; background: #eef5f3; border-radius: 8px; color: #14544a; font-size: 13px; }
.consult-notice a { color: #14544a; font-weight: 600; }

/* 体系地图：展开本线内容 */
.sys-details { margin-top: 10px; border-top: 1px dashed #e3ddcd; padding-top: 8px; }
.sys-details summary { cursor: pointer; font-size: 12.5px; color: #14544a; }
.sys-details summary::marker { color: #8a8375; }
.sys-detail-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin-top: 8px; }
.sys-detail-cols h4 { margin: 4px 0 2px; font-size: 11px; color: #6f6a5d; text-transform: uppercase; letter-spacing: .04em; }
.sys-detail-cols ul { margin: 0; padding-left: 16px; }
.sys-detail-cols li { font-size: 12px; line-height: 1.5; }
.sys-detail-cols a { color: #22301f; text-decoration: none; border-bottom: 1px solid rgba(31,111,99,.25); }
.sys-detail-cols a:hover { color: #1f6f63; }
@media (max-width: 760px) { .sys-detail-cols { grid-template-columns: 1fr; } }

/* 咨询：议题页签 + 问题探讨画布 */
.consult-tabs { display: flex; gap: 4px; margin: 4px 0 10px; border-bottom: 1px solid #e3ddcd; }
.consult-tab { position: relative; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: #6f6a5d; font: inherit; font-size: 13.5px; cursor: pointer; }
.consult-tab:hover { color: #22301f; }
.consult-tab.is-active { color: #14544a; border-bottom-color: #1f6f63; font-weight: 600; }
.consult-tab-count { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 9px; background: #eef5f3; color: #14544a; font-size: 11px; }

.cc-panel { margin-top: 4px; }
.cc-header { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid #e3ddcd; }
.cc-header h2 { margin: 0 0 4px; font-size: 19px; }
.cc-header p { margin: 0; font-size: 12.5px; }
.cc-progress { display: flex; gap: 4px; align-items: center; }
.cc-progress strong { margin-left: 6px; font-size: 12px; color: #14544a; }
.cc-dot { width: 8px; height: 8px; border-radius: 50%; background: #e3ddcd; }
.cc-dot.is-done { background: #1f6f63; }

.cc-step { padding: 16px 0 18px; border-bottom: 1px dashed #e3ddcd; }
.cc-step-head { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.cc-step-head h3 { margin: 0; font-size: 15.5px; }
.cc-step-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #f0ece0; color: #6f6a5d; font-size: 12px; font-weight: 600; }
.cc-step-no.is-done { background: #1f6f63; color: #fff; }
.cc-step-done { margin-left: auto; font-size: 11px; color: #14544a; }

.cc-field { display: block; margin: 8px 0; }
.cc-label { display: block; margin-bottom: 4px; font-size: 12px; color: #6f6a5d; }
.cc-field input[type=text], .cc-field input[type=date], .cc-field input[type=number], .cc-field textarea, .cc-field select {
  width: 100%; padding: 8px 10px; border: 1px solid #d9d2c0; border-radius: 8px; background: #fffdf8; font: inherit; font-size: 13.5px; line-height: 1.5;
}
.cc-field textarea { resize: vertical; }
.cc-field input:focus, .cc-field textarea:focus, .cc-field select:focus { outline: 2px solid rgba(31,111,99,.3); outline-offset: 1px; }
.cc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.cc-grid-3 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 90px; gap: 0 14px; }

.cc-report { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0; padding: 8px 10px; border: 1px solid #e3ddcd; border-radius: 8px; background: #fbf8ee; font-size: 12.5px; color: #6f6a5d; }

.cc-suggest { margin: 8px 0 12px; }
.cc-suggest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.cc-suggest-item { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 9px 11px; border: 1px dashed #c9c2b0; border-radius: 8px; background: #fffdf8; color: #22301f; font: inherit; cursor: pointer; }
.cc-suggest-item strong { font-size: 13px; }
.cc-suggest-item span { font-size: 11.5px; color: #6f6a5d; line-height: 1.45; }
.cc-suggest-item:hover, .cc-suggest-item:focus-visible { border-color: #1f6f63; background: #eef5f3; }

.cc-hyp-list { display: grid; gap: 10px; margin-top: 10px; }
.cc-hyp { padding: 10px 12px; border: 1px solid #e3ddcd; border-radius: 10px; background: #fffdf8; }
.cc-hyp.is-primary { border-color: #1f6f63; box-shadow: inset 3px 0 0 #1f6f63; }
.cc-hyp-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.cc-hyp-title { display: flex; gap: 6px; align-items: center; font-size: 13.5px; }
.cc-hyp-remove { font-size: 11.5px; color: #8a6b5e; }
.cc-cues { margin: 6px 0; padding-left: 18px; }
.cc-cues li { font-size: 12px; color: #4a463c; line-height: 1.55; }
.cc-hyp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.cc-kb { margin: 4px 0; font-size: 11.5px; color: #6f6a5d; }
.cc-kb a { color: #14544a; text-decoration: none; border-bottom: 1px solid rgba(31,111,99,.25); }
.cc-verdict { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #6f6a5d; }
.cc-verdict select { width: auto; min-width: 120px; padding: 5px 8px; border: 1px solid #d9d2c0; border-radius: 6px; background: #fffdf8; font: inherit; font-size: 12.5px; }
.cc-empty { margin: 8px 0; font-size: 12.5px; color: #6f6a5d; }

.cc-checklist { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: #f7f3e8; }
.cc-checklist ul { margin: 4px 0 0; padding-left: 18px; }
.cc-checklist li { font-size: 11.5px; color: #4a463c; line-height: 1.6; }

.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.cc-redflags { margin-top: 12px; padding: 10px 12px; border: 1px solid #e2c9c1; border-radius: 8px; background: #fdf6f3; }
.cc-redflags h4 { margin: 0 0 4px; font-size: 12.5px; color: #8a4b39; }
.cc-redflags ul { margin: 0; padding-left: 18px; }
.cc-redflags li { font-size: 11.5px; color: #6b4a3f; line-height: 1.6; }

.cc-summary { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #eef5f3; border: 1px solid #bcd8d1; }
.cc-summary h4 { margin: 0 0 4px; font-size: 12px; color: #14544a; text-transform: uppercase; letter-spacing: .04em; }
.cc-summary p { margin: 4px 0; font-size: 13px; line-height: 1.6; color: #22301f; }

@media (max-width: 900px) {
  .cc-grid-2, .cc-grid-3, .cc-suggest-list, .cc-hyp-grid { grid-template-columns: 1fr; }
}

.consult-topic-canvas { display: inline-block; padding: 1px 7px; border-radius: 9px; background: #eef5f3; color: #14544a; font-size: 11px; }

/* 轨道周的适龄提示：混合年龄段轨道里，标出不属于当前孩子年龄段的周 */
.track-week.off-band { opacity: .68; }
.off-band-note { margin-left: 8px; padding: 1px 6px; border-radius: 8px; background: #f0ece0; color: #6f6a5d; font-size: 10.5px; font-weight: 400; }

/* 体系地图：兴趣轨道概览 */
.sys-tracks { margin-top: 16px; }
.sys-track-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.sys-track { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border: 1px solid #e3ddcd; border-radius: 9px; background: #fffdf8; text-decoration: none; color: #22301f; }
.sys-track strong { font-size: 12.5px; line-height: 1.35; }
.sys-track span { font-size: 11px; color: #6f6a5d; }
.sys-track:hover { border-color: #1f6f63; background: #eef5f3; }
@media (max-width: 900px) { .sys-track-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sys-track-grid { grid-template-columns: 1fr; } }

/* 建档 / 设置：多孩子编辑器 */
.onb-children { display: grid; gap: 10px; margin: 6px 0 4px; }
.onb-child { padding: 10px 12px; border: 1px solid #e3ddcd; border-radius: 10px; background: #fffdf8; }
.onb-child-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.onb-child-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1fr); gap: 8px; }
.onb-child-grid label { margin: 0; text-align: left; }
.onb-child-grid input, .onb-child-grid select { padding: 10px 12px; font-size: .95rem; border-radius: 10px; }
@media (max-width: 720px) { .onb-child-grid { grid-template-columns: 1fr; } }

.hero:has(.onb-hero) { text-align: left; }
.onb-hero { display: block; width: 160px; max-width: 28%; height: auto; object-fit: contain; margin: 0 0 10px; border-radius: 10px; }
.hero:has(.onb-hero) h1 { margin: 4px 0 8px; }
.hero:has(.onb-hero) > .muted { max-width: 55ch; margin: 8px 0 12px; }
.hero:has(.onb-hero) .onb-recovery-actions { justify-content: flex-start; gap: 2px 12px; margin: 4px 0; }
.hero:has(.onb-hero) .form { text-align: left; }
@media (max-width: 720px) {
  .hero:has(.onb-hero) { display: grid; grid-template-columns: minmax(0, 1fr) 80px; column-gap: 10px; padding: 16px; }
  .onb-hero { grid-column: 2; grid-row: 1; align-self: start; width: 80px; max-width: 100%; margin: 0; }
  .hero:has(.onb-hero) h1 { grid-column: 1; grid-row: 1; font-size: 1.4rem; line-height: 1.3; }
  .hero:has(.onb-hero) > :not(.onb-hero):not(h1) { grid-column: 1 / -1; min-width: 0; }
  .hero:has(.onb-hero) > .muted { font-size: .875rem; line-height: 1.6; }
  .hero:has(.onb-hero) .onb-recovery-actions { font-size: .78rem; }
  .hero:has(.onb-hero) .form label { margin-top: 10px; }
  .onb-child-grid input, .onb-child-grid select { font-size: 1rem; }
}

/* 咨询意见：个案概念化 → 假设 → 周方案 */
.cf {
  margin: 14px 0 18px; padding: 18px 20px; border-radius: 16px;
  background: linear-gradient(180deg, #fbf7ef, #fdfcf9 62%);
  border: 1px solid var(--ui-line);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.cf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cf-kicker { font: 700 11px/1.4 ui-monospace, Menlo, monospace; letter-spacing: .12em; color: var(--ui-accent); text-transform: uppercase; }
.cf-conf { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; }
.cf-conf-high { color: #1f6b4f; background: #e7f4ec; }
.cf-conf-medium { color: #7a5a12; background: #fbf1d8; }
.cf-conf-low { color: #8a4a2a; background: #fbe9df; }
.cf-restate { margin: 0 0 8px; color: var(--ui-ink-2); font-size: 14px; }
.cf-direct { margin: 0 0 4px; font-size: 15.5px; line-height: 1.75; color: var(--ink); }
.cf-block { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #e6dbc8; }
.cf-block h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .04em; color: #6b5726; text-transform: none; }
.cf-cycle { margin: 0; padding-left: 0; list-style: none; counter-reset: cfc; }
.cf-cycle li { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dotted #ece2d2; font-size: 14px; line-height: 1.6; }
.cf-cycle li:last-child { border-bottom: 0; }
.cf-cycle li b { color: var(--ui-accent); font-weight: 700; }
.cf-cycle { counter-reset: cfc; }
.cf-hyps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cf-hyps li { padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #ece2d2; }
.cf-hyp-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.cf-rank { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ui-accent-soft); color: var(--ui-accent); font-size: 11px; font-weight: 800; }
.cf-tag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #e7f4ec; color: #1f6b4f; }
.cf-hyp-body { margin: 6px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--ui-ink-2); }
.cf-hyp-falsify { margin: 6px 0 0; font-size: 12.5px; color: #8a4a2a; }
.cf-cites { margin-top: 8px; }
.cf-diff { margin: 12px 0 0; font-size: 13px; line-height: 1.7; padding: 10px 12px; border-left: 3px solid var(--ui-accent); background: #f6faf7; color: var(--ui-ink-2); }
.cf-change { margin: 0 0 10px; font-weight: 600; font-size: 14.5px; }
.cf-script { margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; background: #fff7e8; border: 1px solid #f0dfbd; font-size: 14.5px; line-height: 1.75; }
.cf-alt { margin: 0 0 10px; font-size: 13px; color: var(--ui-ink-2); }
.cf-alt p { margin: 6px 0 0; }
.cf-alt b { margin-right: 6px; color: var(--ui-accent); }
.cf-dose, .cf-measure, .cf-not, .cf-fade { margin: 6px 0 0; font-size: 12.5px; color: var(--ui-ink-2); }
.cf-misread { margin: 8px 0 0; padding: 8px 11px; border-left: 3px solid #cfa96b; border-radius: 0 8px 8px 0; background: #fbf4e6; color: #6f5a3c; font-size: 12.5px; line-height: 1.7; }
.cf-roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cf-roles li { display: grid; grid-template-columns: 88px 1fr; gap: 10px; font-size: 13.5px; line-height: 1.65; }
.cf-roles li b { color: var(--ui-accent); }
.cf-stop { margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; background: #fdf0ea; color: #8a4a2a; font-size: 12.5px; line-height: 1.7; }
.cf-stop b { display: block; margin-bottom: 4px; }
.cf-boundary { margin: 12px 0 0; font-size: 11.5px; color: #8b8577; line-height: 1.6; }
@media (max-width: 640px) {
  .cf { padding: 14px; }
  .cf-cycle li { grid-template-columns: 44px 1fr; }
  .cf-roles li { grid-template-columns: 1fr; gap: 2px; }
}
@media print {
  .cf { break-inside: avoid; box-shadow: none; }
}

/* 已有回答时压缩输入区，把纵向空间让给阅读 */
.consult-composer.is-compact textarea { min-height: 56px; }
.consult-composer.is-compact .consult-examples { display: none; }
.consult-composer.is-compact:focus-within textarea { min-height: 82px; }
.consult-thread { max-height: calc(100vh - 240px); }
.cf-notes { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.cf-notes li { font-size: 12.5px; line-height: 1.65; color: var(--ui-ink-2); padding: 7px 10px; border-radius: 9px; background: #f6f3ea; border-left: 3px solid #cbb98d; }
.cf-notes li.cf-note-agreement { border-left-color: #b9603a; background: #fbf1ec; }
.cf-notes li.cf-note-plan { border-left-color: var(--ui-accent); background: #f1f7f3; }
.consult-hero.is-slim { padding: 12px 18px; }
.consult-hero.is-slim .consult-eyebrow { margin: 0; }
.consult-hero.is-slim h1 { font-size: 1.15rem; margin: 2px 0 0; }
.consult-hero.is-slim .consult-hero-status { gap: 6px; }
/* 有回答时不再使用内层滚动：长报告交给页面滚动，避免双滚动条 */
.consult-thread.has-answer { max-height: none; overflow: visible; }
.cf-note-tag { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 6px; background: #e7efe9; color: #2d5f4a; font-size: 10.5px; font-weight: 700; }
.cf-notes li.cf-note-dossier { background: #f2f6f3; border-left-color: #7ba58d; }

/* 地图上直接开局：本周节点内嵌场景快捷入口 */
.map-start { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 2px; }
.map-start-btn {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 8px;
  border: 1px solid var(--ui-line); border-radius: 999px; background: #fff;
  color: var(--ui-ink-2); font-size: 11.5px; text-decoration: none; white-space: nowrap;
}
.map-start-btn:hover { border-color: var(--ui-accent); color: var(--ui-accent); }

/* 专项练习包（设置页） */
.persona-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; margin: 10px 0 6px; }
.persona-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e6d9c4; border-radius: 10px; background: #fffdf8; font-size: 13px; cursor: pointer; }
.persona-item input { margin: 0; }
.persona-item span { flex: 1 1 auto; }
.persona-item i { font-style: normal; font: 700 11px/1 ui-monospace, Menlo, monospace; color: #9c8a72; }
.persona-item:has(input:checked) { border-color: var(--accent); background: #eef8f2; }

/* 专项包：待临床审阅提示 */
.persona-pending { margin-top: 2px; color: #7a6248; }
