/* Kaopy 3.1 降低使用摩擦（t-20261024-hnjw 前端线）。沿用「考场白纸」的 token，不另起一套颜色。 */

/* ---------- 5.1 输入框折进左下角气泡 ---------- */
.composer-launcher {
  position: relative;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-pop);
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), opacity .16s linear, border-color .16s linear;
}
.composer-launcher:hover { transform: translateY(-1px); border-color: var(--accent); }
.composer-launcher:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.composer-launcher__glyph { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.composer-launcher__ring { position: absolute; inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 34 104; stroke-linecap: round; opacity: 0; pointer-events: none; }
.center.is-answering .composer-launcher__ring { opacity: .9; animation: composer-ring-spin 1.1s linear infinite; }
@keyframes composer-ring-spin { to { transform: rotate(360deg); } }
.center.is-composer-open .composer-launcher { display: none; }

/* 折起时气泡对齐正文栏左缘、离底边留出呼吸距离，不挤在左侧竖栏底部的头像旁（人类 10/24） */
.center.is-composer-folded > .composer { padding-bottom: 20px; }
/* 日常模式：气泡上方浮出三个小气泡，点一个就以它的字发一条消息；输入区展开或导师正在回答时收起 */
.daily-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px 2px; animation: shell-fade-in .22s cubic-bezier(.2,.8,.2,1) both; }
.daily-chips[hidden] { display: none; }
.center.is-composer-open .daily-chips, .center.is-answering .daily-chips { display: none; }
.daily-chip { padding: 6px 13px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); color: var(--muted); font: inherit; font-size: var(--fs-caption); font-weight: 500; line-height: 1.2; cursor: pointer; box-shadow: var(--shadow-pop); transition: color .16s linear, border-color .16s linear, transform .16s cubic-bezier(.2,.8,.2,1); }
.daily-chip:hover { color: var(--accent-strong); border-color: var(--accent); transform: translateY(-1px); }
.daily-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* 每条回答底部的操作排（复制、重试）：平时淡出，鼠标移到这条消息上、或键盘聚焦其中的元素时淡入；
   位置不动，不让页面跳。触屏（没有悬停）保持常显。「导师记下了」回执始终显示 */
@media (hover: hover) {
  .msg-assistant > .msg-actions { opacity: 0; transition: opacity .16s linear; }
  .msg-assistant:hover > .msg-actions,
  .msg-assistant:focus-within > .msg-actions { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .msg-assistant > .msg-actions { transition: none; }
}
/* 消息左边不再挂考呗头像，内容更连贯 */
.msg-assistant > .msg-head > .klogo { display: none; }
@keyframes shell-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* 阶段路标、单元标题卡、题卡：第一次出现统一轻轻淡入上移（workspace.js enterOnce） */
.shell-enter { animation: shell-fade-in .28s cubic-bezier(.2,.8,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  .shell-enter, .daily-chips { animation: none; }
}
.center.is-composer-folded .composer-box,
.center.is-composer-folded #stagedAnswers { display: none; }
/* 输入框折起时，计划那一行不再贴着输入框：补齐下边与圆角，和气泡隔开一行，同停靠区的卡片一个样子 */
.center.is-composer-folded .plan-strip:not([hidden]) {
  margin-bottom: 9px;
  border-bottom: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop), inset 0 1px 0 rgba(255, 255, 255, .7);
}
[data-theme="dark"] .center.is-composer-folded .plan-strip:not([hidden]) { box-shadow: var(--shadow-pop), inset 0 1px 0 rgba(255, 255, 255, .05); }
.composer-box.is-popping { transform-origin: 0 100%; animation: composer-pop .2s cubic-bezier(.2,.8,.2,1); }
@keyframes composer-pop { from { opacity: 0; transform: translate(-18px, 10px) scale(.94); } to { opacity: 1; transform: none; } }
.composer-fold { color: var(--faint); }
.composer-fold:hover { color: var(--ink); }
.composer-box > .composer-foot { justify-content: flex-start; gap: 4px; }
.composer-box > .composer-foot > .composer-actions { margin-left: auto; }
/* ---------- 5.3 旁问页边批注 ---------- */
/* 页边批注不挪正文：气泡只放在正文右边已有的空白里（人类 10/24） */
.mn-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: visible; }
.mn-art { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.mn-lead,
.mn-brace { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; transition: stroke-width .16s linear, opacity .16s linear; }
.mn-lead { stroke-width: 1.2; opacity: .55; }
.mn-brace { stroke-width: 1.4; opacity: .7; }
.mn-lead.is-hot, .mn-lead.is-open { stroke-width: 1.6; opacity: 1; }
.mn-brace.is-hot, .mn-brace.is-open { stroke-width: 1.8; opacity: 1; }
/* 框出一块的引线从图上的角标出发，先走在白纸上：用白纸上的笔（kaopy.css --paper-pen） */
.mn-lead.is-region { stroke: var(--paper-pen); stroke-width: 1.3; opacity: .85; }
.mn-lead.is-region:is(.is-hot, .is-open) { stroke-width: 1.7; opacity: 1; }

.mn-bubble {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  width: 208px;
  pointer-events: auto;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(22, 25, 29, 0.05), 0 6px 18px -10px rgba(31, 95, 224, 0.35);
  color: var(--ink);
  font: 400 12.5px/1.5 var(--font-sans);
  transition: border-color .16s linear, box-shadow .16s linear;
}
.mn-bubble[hidden] { display: none; }
.mn-bubble:hover, .mn-bubble.is-open { border-color: var(--accent); }
.mn-bubble.is-entering { animation: mn-bubble-in .32s cubic-bezier(.2,.8,.2,1) .26s both; }
@keyframes mn-bubble-in { from { opacity: 0; translate: -10px 0; } to { opacity: 1; translate: 0 0; } }
.mn-bubble.is-arrived { animation: mn-bubble-arrive .7s ease-out; }
@keyframes mn-bubble-arrive { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.mn-bubble__tag { display: none; }
.mn-bubble[data-mode="block"] .mn-bubble__tag,
.mn-bubble[data-mode="quiz"] .mn-bubble__tag {
  display: inline-block;
  margin: 7px 0 0 10px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  line-height: 18px;
}
.mn-compose { display: none; padding: 8px 10px 7px; }
.mn-bubble[data-state="compose"] .mn-compose { display: block; }
.mn-bubble[data-state="compose"] .mn-summary { display: none; }
.mn-input {
  display: block;
  width: 100%;
  min-height: 20px;
  max-height: 96px;
  padding: 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
}
.mn-input::placeholder { color: var(--faint); }
.mn-compose__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed color-mix(in srgb, var(--accent) 22%, var(--border)); }
/* 快捷键提示：两颗回车键帽（t-20261026-wybz：不写操作说明）。按过一次第一颗亮起；写了字只剩一颗，亮起 */
.mn-hint { display: inline-flex; align-items: center; gap: 3px; color: var(--faint); }
.mn-key { display: grid; place-items: center; width: 20px; height: 17px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--border-strong), 0 1px 0 var(--border-strong); transition: background-color .12s ease, color .12s ease, box-shadow .12s ease; }
.mn-key svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mn-compose.is-armed .mn-key:first-child,
.mn-compose.has-text .mn-key:first-child { background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent), 0 1px 0 var(--accent); }
.mn-compose.has-text .mn-key + .mn-key { display: none; }
.mn-quick { flex: none; padding: 2px 8px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 500 11.5px/1.6 var(--font-sans); cursor: pointer; }
.mn-quick:hover { background: var(--accent-strong); }
/* 触屏没有实体回车键：键帽提示不画，「直接发问」靠右 */
@media (hover: none) and (pointer: coarse) { .mn-hint { display: none; } .mn-compose__row { justify-content: flex-end; } }
/* 右栏里「没懂」开的旁问：发送键旁同样一个「直接发问」。它是文字按钮，不按图标键的 32px 方块排 */
.composer-box .composer-actions > .btn.a-quick { width: auto; padding: 0 12px; }
.mn-summary {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mn-summary__dot { flex: none; width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; background: var(--accent); }
.mn-bubble[data-state="answering"] .mn-summary__dot { animation: mn-dot-pulse 1s ease-in-out infinite; }
@keyframes mn-dot-pulse { 50% { transform: scale(1.7); opacity: .45; } }
.mn-bubble[data-state="answering"] .mn-summary__text { color: var(--muted); }
.mn-summary__text { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
/* 摘要里的公式整个算一个单位：放不下的宽公式被收在气泡宽度内（t-20261007-6ziq） */
.mn-summary__text .math-render { max-width: 100%; overflow: hidden; }
.mn-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 9px; }
/* 窄屏放不下页边：气泡缩成一个点，引线照样连过去，点开就是对话框 */
.mn-bubble.is-compact { width: 26px; height: 26px; border-radius: 50%; }
.mn-bubble.is-compact .mn-bubble__tag,
.mn-bubble.is-compact .mn-summary__text,
.mn-bubble.is-compact .mn-compose { display: none !important; }
.mn-bubble.is-compact .mn-summary { display: grid !important; place-items: center; width: 100%; height: 100%; padding: 0; }
.mn-bubble.is-compact .mn-summary__dot { margin: 0; }
/* 删除旁问的 ×：悬停气泡或聚焦时显示，触屏常显；点点状的小气泡不放 */
.mn-bubble__del, .aside-delete { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; opacity: 0; transition: opacity .16s linear, color .16s linear, background-color .16s linear; }
.mn-bubble__del { position: absolute; top: 4px; right: 4px; }
.aside-delete { position: absolute; top: 6px; right: 6px; }
.mn-bubble__del svg, .aside-delete svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.mn-bubble:hover .mn-bubble__del, .mn-bubble:focus-within .mn-bubble__del,
.anchor-card:hover .aside-delete, .aside-pane:focus-within .aside-delete { opacity: 1; }
/* 旁问一打开，输入框拿到焦点、右上角的「删除」跟着现形：这一下不淡入（那一刻右栏正在滑入 / 大括号正在画、发送键正在落下，同一刻不超过两样在动） */
.aside-delete, .mn-bubble__del { transition-property: color, background-color; }
.mn-bubble__del:hover, .aside-delete:hover { color: var(--danger); background: var(--danger-soft); }
.mn-bubble__del:focus-visible, .aside-delete:focus-visible { opacity: 1; outline: 2px solid var(--accent); outline-offset: 1px; }
@media (hover: none) { .mn-bubble__del, .aside-delete { opacity: 1; } }
.mn-bubble .mn-summary { padding-right: 28px; }
.mn-bubble.is-compact .mn-bubble__del { display: none; }
.anchor-card { position: relative; }
/* 回到原消息（回到课件）：卡片右上角一颗圆底的返回图标，挨着删除的 ×；字只在读屏和悬停提示里 */
.a-back { position: absolute; top: 6px; right: 32px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); cursor: pointer; transition: color .16s linear, border-color .16s linear, background-color .16s linear; }
.a-back svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.a-back:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.a-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.anchor-card > .caption { padding-right: 56px; }
/* 旁问窗里「去笔记这一节」：别处问、挂到笔记的旁问才有，排在回到原消息的左边 */
.a-note { position: absolute; top: 6px; right: 58px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); cursor: pointer; transition: color .16s linear, border-color .16s linear, background-color .16s linear; }
.a-note[hidden] { display: none; }
.a-note svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a-note:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.a-note:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.anchor-card.has-note-link > .caption { padding-right: 84px; }

.mn-float {
  position: fixed;
  /* 从笔记页「打开这条旁问」时，窄屏右栏是抽屉（--z-drawer），对话框要浮在它上面 */
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 220px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
}
.mn-float[hidden] { display: none; }
.mn-float.is-entering { animation: mn-float-in .22s cubic-bezier(.2,.8,.2,1); }
@keyframes mn-float-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.mn-float__head { display: flex; align-items: flex-start; gap: 8px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--border); }
.mn-float__tag { flex: none; padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 11.5px; line-height: 20px; }
.mn-float__quote { flex: 1; min-width: 0; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mn-float__dock { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: -2px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--faint); cursor: pointer; }
.mn-float__dock svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* 浮窗头上的「去笔记这一节」：和吸附键同一种图标键，排在它左边（workspace.js 按线程挂的笔记补上） */
.mn-float__note { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: -2px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--faint); cursor: pointer; }
.mn-float__note svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mn-float__dock:hover, .mn-float__note:hover { background: var(--accent-soft); color: var(--accent-strong); }
.mn-float__dock:focus-visible, .mn-float__note:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mn-float__close { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin: -2px -2px 0 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--faint); cursor: pointer; }
.mn-float__close:hover { background: var(--surface-subtle); color: var(--ink); }
.mn-float__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mn-float__body { display: flex; flex: 1; min-height: 0; flex-direction: column; }
/* 下沿的拉手：上下拖动改窗口高度 */
.mn-float__grip { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 12px; cursor: ns-resize; touch-action: none; }
.mn-float__grip::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 32px; height: 3px; border-radius: 2px; background: var(--border-strong); opacity: 0; transform: translateX(-50%); transition: opacity .16s linear; }
.mn-float:hover .mn-float__grip::after, .mn-float.is-resizing .mn-float__grip::after { opacity: 1; }
.mn-float__width-grip { position: absolute; right: 0; top: 50px; bottom: 14px; z-index: 2; width: 8px; cursor: ew-resize; touch-action: none; }
.mn-float__corner-grip { position: absolute; right: 0; bottom: 0; z-index: 3; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none; }
.mn-float__corner-grip::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 6px; height: 6px; border-right: 2px solid var(--border-strong); border-bottom: 2px solid var(--border-strong); }
.mn-float.is-resizing { user-select: none; }
.mn-float__body { padding-bottom: 8px; }
/* 新旁问只有输入与底部提示；发出第一句后同一个窗口才长成对话框。 */
.mn-float.is-compose { min-height: 0; }
.mn-float.is-compose :is(.mn-float__head, .aside-pane.is-margin, .mn-float__grip, .mn-float__width-grip, .mn-float__corner-grip) { display: none; }
.mn-float.is-compose .mn-compose { display: block; }
.mn-float.is-compose .mn-float__body { padding-bottom: 0; }
/* 窄屏还没问出第一句：输入框是贴在视口底边的一条，从下面升上来（t-20261026-wybz） */
.mn-float.is-sheet { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.mn-float.is-sheet .mn-compose { padding: 12px 14px 10px; }
.mn-float.is-sheet .mn-input { font-size: 15px; }
.mn-float.is-sheet.is-entering { animation: mn-sheet-in .24s cubic-bezier(.2,.8,.2,1); }
@keyframes mn-sheet-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* 输入条开着时，左下角的输入框圆钮让开：它比输入条更靠边，会在输入条左侧露出一角 */
body:has(.mn-float.is-sheet:not([hidden])) .composer-launcher { visibility: hidden; }
/* 手机上问过的旁问铺满整屏（aside-margin.js placeTall）：盖住贴底的闸门和输入圆钮；没有右栏可吸、触屏上没有拖动改大小的拉手 */
body:has(.mn-float.is-tall:not([hidden])) .composer-launcher { visibility: hidden; }
.mn-float.is-tall :is(.mn-float__dock, .mn-float__grip, .mn-float__width-grip, .mn-float__corner-grip) { display: none; }
@media (hover: none) { .mn-float :is(.mn-float__grip, .mn-float__width-grip, .mn-float__corner-grip) { display: none; } }
/* 页边放不下把手：气泡不画；长段在左边距画一道竖线代替大括号 */
.mn-bubble.is-tucked { display: none !important; }
.mn-brace.is-margin-bar { stroke-width: 3; opacity: .5; }
.mn-float .aside-pane.is-margin { display: flex; flex: 1; min-height: 0; flex-direction: column; padding: 0 14px 12px; animation: none; }
.aside-pane.is-margin .anchor-card { display: none; }
/* 浮窗头的分隔线和滚动区之间留 6px：滚上去的字在线下就已隐去，不贴着线（t-20261026-kb3r） */
.mn-float .aside-thread { margin: 6px 0 12px; }
/* 首段加粗只给多段回答；旁问通常一段话，整段不跟着变粗（t-20261027-pz69） */
.mn-float .amsg-k .aside-answer > p:first-child:has(~ p) { font-weight: 600; }

/* ---------- 5.2 讲解回合：题卡折在「懂了 / 没懂」后面 ---------- */
.api-questionnaire.is-gated { display: none; }
/* 回答还在逐段放出（闸门没开、逐段没放完、调查卡没交）：闸门或卡片就是最后一项，之后的出处、导师记下了、操作排、建议气泡等放完再出。判断只在 syncRevealHold */
.msg-assistant.is-revealing > :is(.quiz-gate, .api-questionnaire) ~ * { display: none !important; }
/* 闸门（「考呗 / 没懂」）的样子、涟漪与题卡扫出在 teaching-flow.css（t-20261026-wybz） */
/* 正文和题交替的回答：正文、闸门、题卡在同一列里逐段放出来。外层不画框，每道题自己一张卡 */
.msg-body[hidden], .api-questionnaire.is-segmented [hidden] { display: none !important; }
.api-questionnaire.is-segmented { max-width: none; margin: 0; padding: 0; border: 0; background: none; }
.api-questionnaire.is-segmented > .api-questionnaire-head { display: none; }
/* 一条回答连出几道题（逐道出、答完留着）同样一题一张卡：每张卡自带边框和题间距，上一题的答案与解析收在自己的卡里，
   不再和下一题的题干挤在同一张纸上连成一串（t-20261027-ee0p）。标题和进度小格留在第一张卡上方 */
.api-questionnaire.is-stepped { padding: 0; border: 0; border-radius: 0; background: none; }
.api-questionnaire.is-stepped > .api-questionnaire-head { padding: 0 2px; }
.api-questionnaire:is(.is-segmented, .is-stepped) > .api-questionnaire-grid { display: flex; flex-direction: column; gap: 14px; }
.api-questionnaire:is(.is-segmented, .is-stepped) .api-question-section,
.api-questionnaire:is(.is-segmented, .is-stepped) .api-question-section + .api-question-section {
  max-width: 720px; margin: 0; padding: 18px 20px 16px; border: 0; border-radius: var(--r-md);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--border);
}
.api-questionnaire.is-segmented > .api-questionnaire-grid > .msg-body { margin: 0; }
.api-questionnaire:is(.is-segmented, .is-stepped) > .quiz-follow, .api-questionnaire:is(.is-segmented, .is-stepped) > .api-question-actions { margin-top: 14px; }
@media (max-width: 720px) {
  .api-questionnaire:is(.is-segmented, .is-stepped) .api-question-section,
  .api-questionnaire:is(.is-segmented, .is-stepped) .api-question-section + .api-question-section { padding: 15px; }
}
.seg-cont { display: flex; margin: 2px 0; }
.api-questionnaire:is(.is-segmented, .is-stepped) .seg-in { animation: seg-in .36s cubic-bezier(.2,.8,.2,1) both; }
@keyframes seg-in { from { opacity: 0; transform: translateY(8px); } }
/* 正文后连着几道题、一道一道出（t-20261026-nh74）：还没轮到的题收起；标题旁一排小格 + 「第 k / n 题」 */
.api-questionnaire.is-stepped [hidden] { display: none !important; }
.api-questionnaire.is-stepped > .api-questionnaire-head { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.quiz-steps { display: inline-flex; align-items: center; gap: 8px; }
.quiz-steps__cells { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.quiz-steps__cell { width: 16px; height: 6px; border-radius: 999px; background: var(--border); transition: background-color .2s ease; }
.quiz-steps__cell.is-current { background: var(--accent); }
.quiz-steps__cell.is-correct { background: var(--success); }
.quiz-steps__cell.is-incorrect { background: var(--danger); }
.quiz-steps__cell.is-skipped, .quiz-steps__cell.is-done { background: var(--faint); }
.api-questionnaire-head .quiz-steps__text { color: var(--muted); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
/* 检测题卡比正文醒目（人类 10/24）：题卡浮起一层，顶边一道主色线，像发到手上的一张答题纸；调查卡不变 */
.api-questionnaire:not(.is-survey):not(.is-segmented):not(.is-stepped):has(.api-question-section[data-block-type="quiz"]) {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  box-shadow: inset 0 3px 0 var(--accent), var(--shadow-pop);
}
.api-questionnaire:is(.is-segmented, .is-stepped) .api-question-section[data-block-type="quiz"] { box-shadow: inset 0 3px 0 var(--accent), inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, var(--border)), var(--shadow-pop); }
/* 一组题里判完的卡退成中性的纸，顶边主色线只留给正在答的那一张：几张卡叠在一起不再一片蓝，一眼看出该答哪一道（t-20261027-pi1u） */
.api-questionnaire.is-stepped .api-question-section[data-block-type="quiz"][data-quiz-verdict] { box-shadow: inset 0 0 0 1px var(--border), var(--shadow-pop); }
/* 每张卡左上角写「第 k 题」：组头的「第 k / n 题」滚出视野后，也知道眼前是哪一道（还没轮到的题收起、不计数） */
.api-questionnaire.is-stepped > .api-questionnaire-grid { counter-reset: kp-step-q; }
.api-questionnaire.is-stepped .api-question-section[data-block-type="quiz"] { counter-increment: kp-step-q; }
.api-questionnaire.is-stepped .api-question-section[data-block-type="quiz"]::before { content: "第 " counter(kp-step-q) " 题"; display: block; margin-bottom: 10px; color: var(--muted); font-size: var(--fs-caption); font-weight: 600; font-variant-numeric: tabular-nums; }
html:lang(en) .api-questionnaire.is-stepped .api-question-section[data-block-type="quiz"]::before { content: "Question " counter(kp-step-q); }
/* 判完的题卡右上角盖一枚大章：答对一个大钩、答错一个大叉、简答题拿到部分分一个半勾、跳过一枚斜着的「跳过」框章。
   只看题卡自己的判定（data-quiz-verdict，刷新后按存下的作答照样画）；刚交的题（.ca-live）章落下来 */
.api-question-section[data-block-type="quiz"][data-quiz-verdict] { position: relative; }
.api-question-section[data-block-type="quiz"][data-quiz-verdict] > .api-question-stem { padding-right: 76px; }
/* 跳过的题：正确项只描空心圈，免得实心点读成「你选了这项」（t-20261027-721b） */
.api-question-section[data-block-type="quiz"][data-quiz-verdict="skipped"] .api-question-option.is-right::before { background: var(--surface); box-shadow: none; }
.api-question-section[data-block-type="quiz"][data-quiz-verdict]::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 8px;
  width: 52px;
  height: 52px;
  pointer-events: none;
  transform: rotate(-8deg);
  -webkit-mask: var(--quiz-stamp) center / contain no-repeat;
  mask: var(--quiz-stamp) center / contain no-repeat;
}
.api-question-section[data-block-type="quiz"][data-quiz-verdict="correct"]::after {
  --quiz-stamp: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M9 25.5l10 10L40 13' fill='none' stroke='%23000' stroke-width='5.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background: var(--success);
}
.api-question-section[data-block-type="quiz"][data-quiz-verdict="incorrect"]::after {
  --quiz-stamp: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M13 13l22 22M35 13L13 35' fill='none' stroke='%23000' stroke-width='5.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background: var(--danger);
}
/* 半勾同答题纸部分得分的批改记号（study-paper.css .quiz-paper-mark.is-partial），按大章的笔画重画 */
.api-question-section[data-block-type="quiz"][data-quiz-verdict="partial"]::after {
  --quiz-stamp: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M9 25.5l10 10L40 13M21.5 19L32 29.5' fill='none' stroke='%23000' stroke-width='5.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background: var(--danger);
}
.api-question-section[data-block-type="quiz"][data-quiz-verdict="skipped"]::after {
  content: attr(data-quiz-stamp) / '';
  top: 14px;
  right: 10px;
  width: auto;
  height: auto;
  padding: 2px 9px;
  border: 2px solid currentColor;
  border-radius: 6px;
  color: var(--muted);
  font: 800 15px/1.3 var(--font-sans);
  letter-spacing: .12em;
  -webkit-mask: none;
  mask: none;
}
.ca-live.api-question-section[data-quiz-verdict]::after { animation: quiz-stamp-in 340ms var(--ca-back) calc(140ms + var(--ca-off)) both; }
@keyframes quiz-stamp-in { from { opacity: 0; transform: rotate(-8deg) scale(1.6); } }
/* 答后三个按钮：没懂 · 再出一道 · 懂了，继续 */
.quiz-follow { gap: 8px; }
/* 「重新出题」（t-20261027-mup0）：答错那一排里一枚很轻的文字按钮，只在题本身有问题时才会点；
   点下去后整张题卡淡下去，这一排只剩一行「正在重新出题…」 */
.quiz-follow .quiz-rewrite-link { padding: 4px 6px; border: 0; white-space: nowrap; border-radius: 4px; background: none; color: var(--muted); font: inherit; font-size: var(--fs-caption); cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.quiz-follow .quiz-rewrite-link:hover:not([disabled]) { color: var(--ink); text-decoration-color: currentColor; }
.quiz-follow .quiz-rewrite-link[disabled] { cursor: default; opacity: .5; }
.quiz-follow.is-rewriting { align-items: center; }
.quiz-rewriting-status { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; color: var(--muted); font-size: var(--fs-caption); }
.quiz-rewriting-status::before { content: ''; flex: none; width: 12px; height: 12px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: km-note-spin 900ms linear infinite; }
.api-questionnaire .api-question-section.is-rewriting, .api-questionnaire .api-question-section.is-rewriting:disabled { opacity: .55; pointer-events: none; transition: opacity .2s ease; }
/* 答对或跳过后直接接着讲：「继续」按钮不露面，自动续讲没发出去时才放出来 */
.api-question-actions.is-auto-pending { display: none !important; }
/* 个性化解析：原解析下面追加一段窄的点评，左边一道细红线，小标签旁一枚错因签；生成中只占一行小字 */
.api-quiz-personal-pending { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--muted); font-size: var(--fs-caption); }
.api-quiz-personal-pending::before { content: ''; flex: none; width: 12px; height: 12px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: km-note-spin 900ms linear infinite; }
.api-quiz-key.is-personal > summary { display: flex; align-items: center; gap: 8px; }
.api-quiz-personal { margin-top: 10px; padding: 1px 0 1px 10px; border-left: 2px solid var(--danger); }
.api-quiz-personal__head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; color: var(--muted); font-size: var(--fs-caption); }
.api-quiz-personal__body > :first-child { margin-top: 0; }
.api-quiz-personal__body > :last-child { margin-bottom: 0; }
.api-quiz-error-type { padding: 0 7px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: 11.5px; font-weight: 500; line-height: 20px; }
.api-quiz-personal.is-fresh { animation: quiz-personal-in .5s ease both; }
@keyframes quiz-personal-in { from { opacity: 0; transform: translateY(3px); } }

/* ---------- 5.4 笔记索引行 ---------- */
.msg-note-index { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-top: 14px; color: var(--faint); font: 400 var(--fs-caption)/1.7 var(--font-sans); font-variant-numeric: tabular-nums; }
.msg-note-index > b { flex: none; color: var(--muted); font-weight: 600; }
.msg-note-index > i { color: var(--border-strong); font-style: normal; }
.msg-note-index__ref { display: inline-flex; align-items: baseline; gap: 4px; padding: 0 2px; border: 0; border-radius: 4px; background: none; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.msg-note-index__ref:hover, .msg-note-index__ref:focus-visible { color: var(--accent-strong); text-decoration-color: currentColor; background: var(--accent-soft); outline: none; }
.msg-note-index__lines { color: var(--faint); }
.msg-note-index__ref:hover .msg-note-index__lines { color: inherit; }
/* 两者都有：笔记索引在前，出处摘要接在同一行后段 */
.msg-note-index:has(+ .msg-sources) { display: inline-flex; margin-right: 14px; }
.msg-note-index + .msg-sources { display: inline-block; margin-top: 0; vertical-align: baseline; }
.note-inline-ref { color: inherit; }

/* ---------- 5.6 笔记图 ---------- */
.note-fig { display: block; margin: 12px 0; }
.note-fig.is-loading { color: var(--faint); font-size: var(--fs-caption); }
.note-fig.is-missing { color: var(--muted); font-size: var(--fs-caption); }
.sn-fig .canvas-visual-card { margin: 0; }

/* ---------- 5.4 / 5.7 笔记页：按行号亮、左栏气泡、底栏横线、段旁的点 ---------- */
.sn-content > [data-line-start] { transition: background-color .3s ease; border-radius: 4px; }
.sn-content > .is-line-hit { animation: sn-line-hit 2.6s ease both; }
@keyframes sn-line-hit { 0%, 55% { background: color-mix(in srgb, var(--marker) 34%, transparent); box-shadow: -8px 0 0 color-mix(in srgb, var(--marker) 34%, transparent), 8px 0 0 color-mix(in srgb, var(--marker) 34%, transparent); } 100% { background: transparent; box-shadow: none; } }
.sn-content > .is-cue-hit { background: color-mix(in srgb, var(--accent) 7%, transparent); box-shadow: -8px 0 0 color-mix(in srgb, var(--accent) 7%, transparent), 8px 0 0 color-mix(in srgb, var(--accent) 7%, transparent); }

.sn-note.has-cues .sn-note__cues { position: relative; padding-top: 14px; }
.sn-cues__top { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.sn-cues__label { color: var(--faint); font-size: 11px; line-height: 1.5; }
.sn-cues__lane { position: absolute; inset: 0; pointer-events: none; }
.sn-cue { position: relative; }
.sn-cues__lane > .sn-cue { position: absolute; left: 0; right: 0; pointer-events: auto; transition: top .2s ease; }
.sn-cue__pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px 0 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 500 11.5px/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease, background-color .14s ease;
  animation: sn-cue-in .3s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes sn-cue-in { from { opacity: 0; transform: translateX(-4px); } }
.sn-cue__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.sn-cue[data-kind="mistake"] .sn-cue__dot { background: var(--danger); }
.sn-cue[data-kind="mistake"][data-tone="reviewed"] .sn-cue__dot { background: var(--marker); }
.sn-cue[data-kind="mistake"][data-tone="mastered"] .sn-cue__dot { background: var(--success); }
.sn-cue__pin:hover, .sn-cue.is-open .sn-cue__pin, .sn-cue.is-hot .sn-cue__pin { border-color: var(--accent); color: var(--ink); }
.sn-cue__pin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sn-cue__card {
  position: absolute;
  left: 0;
  top: 28px;
  z-index: 8;
  box-sizing: border-box;
  width: 248px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  color: var(--ink);
  font: 400 12.5px/1.6 var(--font-sans);
  animation: sn-cue-card .18s cubic-bezier(.2,.8,.2,1);
}
.sn-cue__card[hidden] { display: none; }
@keyframes sn-cue-card { from { opacity: 0; transform: translateY(-3px); } }
.sn-cue.is-open { z-index: 8; }
.sn-cue__quote { margin: 0 0 6px; color: var(--reading-ink); font-family: var(--reading-book); font-size: 13.5px; line-height: 1.7; }
.sn-cue__facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 0 0 6px; }
.sn-cue__facts dt { color: var(--faint); }
.sn-cue__facts dd { margin: 0; overflow-wrap: anywhere; }
.sn-cue__meta { margin: 0; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
/* 错题记录的底行：时间在左，回到那道题的箭头在右 */
.sn-cue__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.sn-cue__go { display: grid; place-items: center; width: 24px; height: 24px; margin-right: -4px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); cursor: pointer; transition: color .16s linear, border-color .16s linear, background-color .16s linear; }
.sn-cue__go .sn-icon { width: 14px; height: 14px; stroke-width: 1.9; }
.sn-cue__go:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.sn-cue__go:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 底栏：一行一行的横线，直接在横线上写；不是输入框的样子 */
.sn-note__summary:not(:empty) { padding-bottom: 10px; }
.sn-summary__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 2px; }
.sn-summary__label { color: var(--cornell-focus, var(--accent-strong)); font-size: var(--fs-ui); font-weight: 600; }
.sn-summary__state { color: var(--faint); font-size: 11px; }
.sn-summary__state[data-tone="ok"] { color: var(--success); }
.sn-summary__state[data-tone="error"] { color: var(--danger); }
.sn-summary__text {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 84px;
  margin: 0;
  padding: 0 2px;
  border: 0;
  outline: 0;
  resize: none;
  overflow: hidden;
  background: transparent repeating-linear-gradient(to bottom, transparent 0 27px, var(--border) 27px 28px);
  background-attachment: local;
  color: var(--reading-ink);
  font: 400 15px/28px var(--reading-book);
  caret-color: var(--accent);
}
.sn-summary__text::placeholder { color: var(--faint); font-family: var(--font-sans); font-size: 13px; }
.sn-summary__text:focus { background-image: repeating-linear-gradient(to bottom, transparent 0 27px, color-mix(in srgb, var(--accent) 38%, var(--border)) 27px 28px); }

.sn-sec-dot { display: inline-block; width: 18px; height: 18px; margin-left: 6px; padding: 0; border: 0; border-radius: 50%; background: none; vertical-align: 1px; cursor: pointer; position: relative; }
.sn-sec-dot::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 45%, var(--border-strong)); transition: transform .14s ease, background-color .14s ease; }
.sn-sec-dot:hover::before, .sn-sec-dot:focus-visible::before { background: var(--accent); transform: scale(1.35); }
.sn-sec-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* 右栏窄（康奈尔两栏会叠成一栏）：左栏收成一条细边，气泡照样贴着它那一行 */
@container (max-width: 40rem) {
  .sn-note.has-cues { display: grid; grid-template-columns: 50px minmax(0, 1fr); column-gap: 12px; }
  .sn-note.has-cues .sn-note__cues { order: 0; grid-column: 1; grid-row: 2 / 4; padding: 14px 6px 16px 0; border-top: 0; border-right: 1px solid var(--cornell-border, var(--border)); }
  .sn-note.has-cues .cornell-workspace__page-header, .sn-note.has-cues .sn-note__main { grid-column: 2; }
  .sn-note.has-cues .sn-note__summary { grid-column: 1 / -1; }
  /* 细边只有 44px：点、两个字、边框刚好放下，字不折行 */
  .sn-note.has-cues .sn-cue__pin { gap: 3px; padding: 0 4px; }
  .sn-note.has-cues .sn-cue__card { width: 228px; }
  .sn-note.has-cues .sn-cues__label { display: none; }
}
/* 窄屏时 cornell-workspace.css 也按视口把两栏叠成一栏，同样收成细边 */
@media (max-width: 767px) {
  .sn-note.has-cues { display: grid; grid-template-columns: 50px minmax(0, 1fr); column-gap: 12px; }
  .sn-note.has-cues .sn-note__cues { order: 0; grid-column: 1; grid-row: 2 / 4; padding: 14px 6px 16px 0; border-top: 0; border-right: 1px solid var(--cornell-border, var(--border)); }
  .sn-note.has-cues .cornell-workspace__page-header, .sn-note.has-cues .sn-note__main { grid-column: 2; }
  .sn-note.has-cues .sn-note__summary { grid-column: 1 / -1; }
  /* 细边只有 44px：点、两个字、边框刚好放下，字不折行 */
  .sn-note.has-cues .sn-cue__pin { gap: 3px; padding: 0 4px; }
  .sn-note.has-cues .sn-cue__card { width: 228px; }
  .sn-note.has-cues .sn-cues__label { display: none; }
}

/* ---------- 5.5 地图与计划嵌入窗口 ---------- */
.chat-widget.knowledge-map-widget.is-embed,
.chat-widget.plan-card.is-embed { display: flex; flex-direction: column; gap: 0; width: 100%; max-width: 720px; height: auto; min-height: 0; padding: 0; overflow: hidden; cursor: default; }
.chat-widget.is-embed:hover { box-shadow: none; }
.kmw-head, .plan-card__bar { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px 8px 14px; cursor: pointer; transition: background-color .14s ease; }
.kmw-head:hover, .plan-card__bar:hover { background: var(--surface-subtle); }
.kmw-head:focus-visible, .plan-card__bar:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.knowledge-map-widget.is-embed .kmw-art { flex: none; width: 58px; height: 38px; }
.knowledge-map-widget.is-embed .kmw-text { flex: 1; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 8px; padding: 0; }
.knowledge-map-widget.is-embed .kmw-text strong { font-size: 14px; }
.knowledge-map-widget.is-embed .kmw-progress { flex-basis: 100%; }
.knowledge-map-widget.is-embed .kmw-units { display: none; }
.knowledge-map-widget.is-embed:not(.has-embed) .kmw-units { display: -webkit-box; flex-basis: 100%; margin-top: 0; }
.kmw-open, .plan-card__open { display: grid; place-items: center; flex: none; width: 28px; height: 28px; margin-left: auto; border-radius: 8px; color: var(--faint); transition: color .14s ease, background-color .14s ease; }
.kmw-open svg, .plan-card__open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kmw-head:hover .kmw-open, .plan-card__bar:hover .plan-card__open { color: var(--ink); background: var(--surface); }
.kmw-embed, .plan-card__embed { position: relative; max-height: 360px; overflow: auto; border-top: 1px solid var(--border); background: var(--surface); overscroll-behavior: contain; }
.kmw-embed:focus-visible, .plan-card__embed:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.knowledge-map-widget.is-embed:not(.has-embed) .kmw-embed { display: none; }
.kmw-embed { height: 360px; padding: 4px 6px; }
.kmw-embed .km-empty { margin: 16px; }
/* 嵌入窗口只留标题行一个打开入口：导图自己的放大按钮不画（开发者模式的状态行照旧） */
.kmw-embed .km-maximize, .kmw-embed .km-head.is-bare { display: none; }
/* 草稿节点：虚线框、淡一些；刚出现时从左边长出来 */
.kmw-embed .km-node--unit.is-draft { border-style: dashed; background: transparent; }
.kmw-embed .km-subunit:has(> .km-subunit__title.is-draft) { border-style: dashed; border-left-style: solid; background: transparent; }
.kmw-embed .is-draft { color: var(--muted); }
.kmw-embed .is-draft-new { animation: kmw-draft-in .42s cubic-bezier(.2,.8,.2,1) both; }
@keyframes kmw-draft-in { from { opacity: 0; transform: translateX(-8px); } }
.knowledge-map-widget.is-drafting .kmw-open { color: var(--accent); }
/* 后台建图（t-20261027-4g4w）：卡片单独挂在对话里（建图进行中在最底下），和回答里的卡片同一个样子；没建完时状态行不再闪 */
.study-map-build { display: flow-root; }
.knowledge-map-widget[data-status="failed"] .kmw-status { color: var(--danger); animation: none; }
/* 地图建好后替学生唤醒导师的那一句：不是学生气泡，是居中的一行小字，两边细线 */
.msg-system-note { display: flex; align-items: center; gap: 12px; margin: 6px 0 18px; color: var(--faint); font: 400 var(--fs-caption)/1.5 var(--font-sans); }
.msg-system-note::before, .msg-system-note::after { content: ''; flex: 1 1 24px; height: 1px; background: var(--border); }
.msg-system-note > span { flex: 0 1 auto; text-align: center; }
.plan-card.is-embed .plan-card__bar strong { font-weight: 600; }
.plan-card__embed { padding: 10px 6px 4px; }
.plan-card__embed .pt-outline { width: 100%; padding-bottom: 6px; }
.plan-card.is-embed .plan-card__foot { align-items: center; margin-top: 0; padding: 8px 12px 8px 14px; border-top: 1px solid var(--border); }
/* 计划排上日期时中间是时间表（plan.css .pt-tt）：贴边、高一些，一眼看到考试日前的四五周 */
.plan-card.has-timetable .plan-card__embed { max-height: 500px; padding: 0; }

/* 地图与计划嵌入窗口比正文宽（t-20261024-hnjw）：以对话区为准居中，最宽 1040px，两边留出页边（workspace.js layoutWideCards
   写 --wide-card-w / --wide-card-x）；没写变量时照旧占正文宽。 */
#streamSlot { --wide-card-w: 100%; --wide-card-x: 0px; }
#streamSlot .chat-widget.is-embed { width: var(--wide-card-w); max-width: none; margin-left: var(--wide-card-x); }
/* 嵌入窗口够宽（≥ 720px）时地图是从左往右的导图（和地图窗口同一种排法），高一些；左栏才有的「展开全部 / 收起」不画 */
.kmw-embed { height: 420px; }
.kmw-embed .km-toolbar { display: none; }
/* 导图四列按窗口宽度伸缩：嵌入窗口和地图窗口里都不横向滚动（门户里的地图照旧） */
.kmw-embed .km-grid { grid-template-columns: minmax(84px, .62fr) minmax(140px, 1fr) minmax(160px, 1.18fr) minmax(200px, 1.6fr); column-gap: 28px; padding: 14px 16px 24px; }
.knowledge-map-page-overlay .km-grid { grid-template-columns: minmax(96px, .62fr) minmax(160px, 1fr) minmax(190px, 1.18fr) minmax(240px, 1.6fr); column-gap: 40px; padding: 18px 24px 32px; }
/* 地图窗口与计划窗口放大：最宽 1400px，从顶栏下面 16px 到底边 16px（不盖顶栏）；右栏开着时占满右栏左边的区域 */
@media (min-width: 768px) {
  dialog.knowledge-map-page-overlay { width: min(1400px, 92vw); height: min(940px, calc(100dvh - var(--topbar-h) - 32px)); margin: calc(var(--topbar-h) + 16px) auto 16px; }
  dialog.knowledge-map-page-overlay.is-beside-panel { width: min(1400px, calc(100vw - var(--right-panel-w) - 32px)); }
  /* 计划窗口的日程跟着窗口长高（窗口栏、计划外内容和底栏共约 190px，同 plan.css 原来按 78dvh 窗口算的那一条） */
  .plan-overlay .pc-scroll { height: clamp(320px, calc(min(940px, 100dvh - var(--topbar-h) - 32px) - 190px), 760px); }
}

/* ---------- 5.8 讲解房间顶部「笔记生成中 n/m」、答题纸每题一句 ---------- */
.center { position: relative; }
.notes-gen-banner { position: absolute; top: 10px; left: 50%; z-index: 6; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 12px 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-pop); color: var(--muted); font: 500 var(--fs-caption)/1.5 var(--font-sans); font-variant-numeric: tabular-nums; transform: translateX(-50%); animation: notes-banner-in .26s cubic-bezier(.2,.8,.2,1) both; pointer-events: none; }
.notes-gen-banner[hidden] { display: none; }
.notes-gen-banner .km-note__spin { width: 12px; height: 12px; }
@keyframes notes-banner-in { from { opacity: 0; transform: translate(-50%, -6px); } }
.quiz-paper-cheer { margin: 2px 0 0; color: var(--muted); font-family: var(--quiz-paper-pen-font, inherit); font-size: 14px; line-height: 1.6; }
.quiz-paper-cheer.is-correct { color: var(--success); }

/* ---------- 「再出一道」并入上一张题卡：不显示用户消息；这一轮回复不挂头像、状态、备课行，
   生成中只转一个圈，新题卡接在上一张下面（requestAction 记在回复上，workspace.js）。
   整组只留一排复制 / 旁问 / 讲错了，在最后一张题卡下面；点它作用在这一组的第一条消息（workspace.js groupHeadArticle） ---------- */
/* 新题卡和上一张之间留与一组题相同的 14px（不再收到 8px，两道主色顶线几乎贴住；t-20261027-pi1u） */
.msg-assistant[data-request-action="quiz_another"] { margin-top: 0; }
.msg-assistant[data-request-action="quiz_another"] > :is(.msg-head, .tool-activity-group, .msg-note-index) { display: none; }
.msg-assistant:has(+ .msg-assistant[data-request-action="quiz_another"]) > .msg-actions { display: none; }
.msg-assistant[data-request-action="quiz_another"] > .stream-activity { box-sizing: border-box; width: 18px; height: 18px; min-height: 0; margin: 8px 0 8px 4px; padding: 0; overflow: hidden; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; background: none; font-size: 0; color: transparent; animation: quiz-another-spin .75s linear infinite; }
.msg-assistant[data-request-action="quiz_another"] > .stream-activity > * { display: none; }
@keyframes quiz-another-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .mn-bubble.is-entering, .mn-bubble.is-arrived, .mn-float.is-entering, .mn-float.is-sheet.is-entering { animation: none; }
  .mn-key { transition: none; }
  #chatInner { transition: none; }
  .composer-box.is-popping { animation: none; }
  .center.is-answering .composer-launcher__ring { animation-duration: 3s; }
  .api-questionnaire:is(.is-segmented, .is-stepped) .seg-in, .api-quiz-personal.is-fresh,
  .sn-cue__pin, .sn-cue__card, .kmw-embed .is-draft-new, .notes-gen-banner { animation: none; }
  .sn-content > .is-line-hit { animation-duration: 4s; }
  .msg-assistant[data-request-action="quiz_another"] > .stream-activity { animation-duration: 2s; }
  .sn-cues__lane > .sn-cue { transition: none; }
}
/* 右上角那组图标（笔记、资料、旁问、明暗）和左栏知识地图图标同一级：36px 的钮、19px 的图标 */
.topbar .rp-entry, .topbar .rp-theme-btn { width: 36px; min-width: 36px; height: 36px; }
.topbar .rp-entry svg, .topbar .rp-theme-btn svg { width: 19px; height: 19px; }
/* 悬浮窗口的外框统一成旁问悬浮窗的样子（人类 10/24）：14px 圆角、蓝灰细边、柔和的大阴影，标题栏下一道细线。
   右栏（资料、笔记、旁问各段）、放大后的窗口和笔记窗口都用同一组值 */
:root { --win-radius: 14px; --win-border: color-mix(in srgb, var(--accent) 24%, var(--border)); --win-shadow: var(--shadow-modal); }
@media (min-width: 1024px) {
  .rp { border-color: var(--win-border); border-radius: var(--win-radius); box-shadow: var(--win-shadow); }
  .rp-tabbar { border-radius: var(--win-radius) var(--win-radius) 0 0; border-bottom: 1px solid var(--border); }
  .rp-body { border-radius: 0 0 var(--win-radius) var(--win-radius); }
}
@media (min-width: 768px) {
  .knowledge-map-page-overlay__panel { border-color: var(--win-border); border-radius: var(--win-radius); box-shadow: var(--win-shadow); }
  .knowledge-map-page-overlay__header { padding: 12px 14px 10px; }
}

/* ---------- t-20261026-wybz fixB ---------- */
/* 旁问还没问出第一句就没发出去：说明挂在输入框下面，一行字、按钮在字的下面靠右，不挤成窄条 */
.mn-compose > .mn-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--border); }
.mn-compose > .mn-notice > span { flex: 1 0 100%; color: var(--muted); font-size: var(--fs-caption); line-height: 1.55; }
/* 确认计划以后顶栏单元进度条亮一下：光扫过一遍、槽外一圈淡蓝（关键帧在 unit-progress.css）；计划卡上不再写「进度在左栏」 */
.unit-progress.is-lit .up-track { animation: up-glow 900ms ease-out 80ms both; }
.unit-progress.is-lit .up-glint { animation: up-glint 640ms ease-out 140ms both; }
.unit-progress.is-lit .up-badge { animation: up-hop var(--motion-t1) var(--ease-back); }
/* 计划日程「总览 / 按天」：一颗两格的图标页签（按天三根竖条、总览九宫格），当前那一格涂蓝；字只在读屏和悬停里。
   「其余单元在列表视图里」这类说明不再写 */
.pc-overview-key__btn { position: relative; display: inline-flex; gap: 2px; width: 62px; height: 28px; padding: 2px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); color: transparent; font-size: 0; line-height: 0; }
.pc-overview-key__btn:hover { background: var(--surface); border-color: var(--accent); }
.pc-overview-key__btn::before, .pc-overview-key__btn::after { content: ''; flex: 1; border-radius: var(--r-pill); background-color: var(--faint); -webkit-mask: var(--pc-key-icon) center / 15px 15px no-repeat; mask: var(--pc-key-icon) center / 15px 15px no-repeat; }
.pc-overview-key__btn::before { --pc-key-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.5' y='2' width='3.2' height='12' rx='1'/%3E%3Crect x='6.4' y='2' width='3.2' height='12' rx='1'/%3E%3Crect x='11.3' y='2' width='3.2' height='12' rx='1'/%3E%3C/svg%3E"); }
.pc-overview-key__btn::after { --pc-key-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.5' y='1.5' width='3.6' height='3.6' rx='.8'/%3E%3Crect x='6.2' y='1.5' width='3.6' height='3.6' rx='.8'/%3E%3Crect x='10.9' y='1.5' width='3.6' height='3.6' rx='.8'/%3E%3Crect x='1.5' y='6.2' width='3.6' height='3.6' rx='.8'/%3E%3Crect x='6.2' y='6.2' width='3.6' height='3.6' rx='.8'/%3E%3Crect x='10.9' y='6.2' width='3.6' height='3.6' rx='.8'/%3E%3Crect x='1.5' y='10.9' width='3.6' height='3.6' rx='.8'/%3E%3Crect x='6.2' y='10.9' width='3.6' height='3.6' rx='.8'/%3E%3Crect x='10.9' y='10.9' width='3.6' height='3.6' rx='.8'/%3E%3C/svg%3E"); }
.plan-calendar:not(.is-overview) .pc-overview-key__btn::before, .plan-calendar.is-overview .pc-overview-key__btn::after { background-color: var(--accent-strong); }
.pc-note { display: none; }
/* 「回到最新」：页底停着下一单元卡、计划条或待确认卡时，圆钮让到它们上方，不压住卡上的字和按钮 */
.composer:has(:is(#nextUnitCard, #planStrip, #changeDock, #finishDock, .dock-bubbles):not([hidden], [data-dock-bubble])) > .scroll-to-latest { top: -46px; }
/* 手机上问过的旁问铺满（placeTall）：头上那段引文是被问的那段，点它收起窗口回到原文；回答是主体，输入框只占一行高 */
.mn-float.is-tall .mn-float__quote { cursor: pointer; -webkit-line-clamp: 3; }
.mn-float.is-tall .aside-compose { display: flex; align-items: center; gap: 8px; min-height: 0; padding: 6px 6px 6px 14px; }
.mn-float.is-tall .aside-compose textarea { flex: 1; min-width: 0; min-height: 24px; max-height: 4.8em; padding-block: 7px; }
.mn-float.is-tall .aside-compose .composer-foot { flex: none; width: auto; margin: 0; padding: 0; border: 0; }
.mn-float.is-tall .aside-thread { margin-bottom: 8px; scroll-padding-bottom: 12px; padding-bottom: 12px; }

/* ---------- t-20261027-i1dr b7 知识地图后台建图 ----------
   建图进行中是输入框上方停靠区里的一条细条（树形小图、「知识地图」，底边一道进度轨），点开是地图窗口；
   建好那一刻轨填满变绿，细条收起，对话里落一张同样形状的紧凑记录卡（勾 + 前三个单元名）。不写批数、课程名、过程描述。 */
.map-build-dock { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .18s cubic-bezier(.4, 0, 1, 1), opacity .18s linear; }
.map-build-dock[hidden] { display: none; }
.map-build-dock.is-leaving { grid-template-rows: 0fr; opacity: 0; }
.map-build-dock > .knowledge-map-widget { min-height: 0; }
.chat-widget.knowledge-map-widget.is-compact { position: relative; display: block; box-sizing: border-box; width: 100%; max-width: 460px; height: auto; min-height: 0; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); cursor: default; }
.chat-widget.knowledge-map-widget.is-compact:hover { border-color: var(--border); box-shadow: none; }
.study-map-build > .knowledge-map-widget.is-compact { margin: 14px 0; }
.chat-widget.knowledge-map-widget.is-compact[data-kind="strip"] { width: min(100%, 360px); max-width: 360px; border-color: var(--border-strong); background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); box-shadow: var(--shadow-pop), inset 0 1px 0 rgba(255, 255, 255, .7); animation: change-dock-in 200ms cubic-bezier(.2, .8, .2, 1); }
[data-theme="dark"] .chat-widget.knowledge-map-widget.is-compact[data-kind="strip"] { background: color-mix(in srgb, var(--canvas) 86%, transparent); box-shadow: var(--shadow-pop), inset 0 1px 0 rgba(255, 255, 255, .05); }
.is-compact .kmw-bar { display: flex; align-items: center; }
.is-compact .kmw-head { flex: 1; min-width: 0; min-height: 48px; gap: 10px; padding: 6px 6px 6px 12px; }
.is-compact .kmw-art { flex: none; width: 52px; height: 34px; }
.is-compact .kmw-text { flex: 1; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0; padding: 0; overflow: hidden; white-space: nowrap; }
.is-compact .kmw-text strong { flex: none; font-size: 14px; font-weight: 600; }
.is-compact .kmw-units { display: block; flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-compact .kmw-units:empty { display: none; }
.is-compact .kmw-check, .is-compact .kmw-fail { display: none; flex: none; }
.is-compact[data-kind="record"][data-state="done"] .kmw-check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.kmw-check svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.is-compact[data-state="failed"] .kmw-fail { display: inline; color: var(--danger); font-size: var(--fs-caption); font-weight: 600; }
/* 地图此刻打不开（没存下任何一批就失败了）：没有手型、没有放大图标，门和把手是同一个事实 */
.is-compact[data-openable="false"] .kmw-head { cursor: default; }
.is-compact[data-openable="false"] .kmw-head:hover { background: none; }
.is-compact[data-openable="false"] .kmw-open { display: none; }
.kmw-retry, .km-build__retry { display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; transition: color .14s ease, border-color .14s ease, background-color .14s ease; }
.kmw-retry { margin-right: 10px; }
.kmw-retry svg, .km-build__retry svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kmw-retry:hover, .km-build__retry:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.kmw-retry:focus-visible, .km-build__retry:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kmw-retry[hidden], .km-build__retry[hidden] { display: none; }
/* 进度轨：一道细线，宽度由 workspace.js 一处刷（--map-track）；批内的位置每秒缓动一格，读回执、存盘直接到位 */
.map-track { --map-track: 0%; position: relative; display: block; height: 3px; overflow: hidden; background: color-mix(in srgb, var(--border) 80%, transparent); }
.map-track > i { display: block; width: var(--map-track); height: 100%; background: var(--accent); transition: width .9s linear; }
.map-track.is-jump > i { transition: none; }
.is-compact[data-kind="record"] .map-track, .is-compact[data-state="failed"] .map-track { display: none; }
.is-compact[data-state="done"] .map-track > i { background: var(--success); transition: width .3s ease-out, background-color .2s linear; }
@media (max-width: 480px) { .chat-widget.knowledge-map-widget.is-compact[data-kind="strip"] { width: 100%; max-width: none; } }
@media (prefers-reduced-motion: reduce) {
  .map-build-dock, .map-track > i, .is-compact[data-state="done"] .map-track > i { transition: none; }
  .chat-widget.knowledge-map-widget.is-compact[data-kind="strip"] { animation: none; }
}
