/* 小问号 · 主视觉 A「暖纸书房」——宋体标题 + 暖纸底 + 墨绿舞台 + 暖橙点缀 */
:root {
  --paper: #faf6ec; --card: #fffdf6; --ink: #1d4d3b; --ink-soft: #5d7a6c;
  --accent: #d9782d; --accent-soft: #f0a03c; --line: #e6ddc8;
  --blue: #2980b9; --red: #e74c3c; --green: #27ae60;
  --serif: 'Songti SC', 'STSong', serif;
  --sans: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); height: 100vh; display: flex; flex-direction: column; }
.hidden { display: none !important; }
button { border: 1.2px solid var(--line); border-radius: 11px; padding: 11px 19px; font-size: 15.5px; cursor: pointer; background: var(--card); color: var(--ink); font-family: var(--sans); transition: all .15s ease; }
button:hover { border-color: var(--ink-soft); }
button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
button.primary:hover { background: #256349; }
button.primary:disabled { opacity: .35; cursor: default; }
button.ghost { border-color: var(--line); }
button.solved { border-color: var(--green); color: var(--green); font-weight: 600; }
/* 「这道题老师讲错了」：低调但看得见；点完出原因选项 */
button.wrong { border-color: #e0a34a; color: #a86a12; }
button.wrong:disabled { opacity: .55; }
.wrong-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wrong-reasons .mini-btn { margin-left: 0; }
.wrong-done { margin-top: 6px; color: #128a43; font-size: 13px; }
button.voice { border-color: var(--accent); color: var(--accent); font-weight: 600; }
button.voice.on { background: var(--accent); color: #fff; }
.voice-status { font-size: 14px; color: var(--accent); align-self: center; }
input, select, textarea { border: 1.2px solid var(--line); border-radius: 11px; padding: 11px 15px; font-size: 15.5px; background: rgba(255,255,255,.05); color: var(--ink); font-family: var(--sans); }
select { appearance: none; background: var(--card); border-radius: 99px; padding: 8px 18px; color: var(--ink-soft); font-size: 13.5px; cursor: pointer; }

/* 向导 */
#wizard { flex: 1; display: flex; align-items: center; justify-content: center; }
.wizard-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 40px 46px; max-width: 640px; box-shadow: 0 18px 60px rgba(29,77,59,.10); }
.wizard-card h1 { margin: 0 0 4px; font-family: var(--serif); letter-spacing: 1px; }
.wizard-card .sub { color: var(--ink-soft); margin: 0 0 24px; }
.step { border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; margin-bottom: 14px; }
.step.dim { opacity: .6; }
.step h3 { margin: 0 0 6px; }
.step p { font-size: 14px; color: var(--ink-soft); margin: 0 0 12px; line-height: 1.7; }
.step input { width: 60%; margin-right: 8px; }
.tag { font-size: 12px; background: var(--accent); color: #fff; border-radius: 6px; padding: 2px 8px; vertical-align: middle; }
.tag.gray { background: #bbb; }
#w-result { margin-left: 10px; font-size: 14px; }

/* 头部 */
#main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
header { display: flex; align-items: center; gap: 22px; padding: 14px 34px; border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: 2px; margin-right: 6px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 2px 8px rgba(29,77,59,.18); }
.brand .en { font-size: 15px; color: var(--ink-soft); font-weight: 400; letter-spacing: 1px; }
.brand .slogan { font-size: 16.5px; color: var(--accent); font-weight: 600; letter-spacing: 2.5px; font-family: var(--serif); margin-left: 2px; padding-left: 14px; border-left: 1.5px solid var(--line); }
nav.top { display: flex; gap: 24px; font-size: 16.5px; color: var(--ink-soft); }
nav.top a { color: var(--ink-soft); text-decoration: none; padding-bottom: 5px; }
nav.top a.on { color: var(--ink); font-weight: 600; border-bottom: 2.5px solid var(--accent); }
nav.top a:hover { color: var(--ink); }
.spacer { flex: 1; }

/* 主工作区 */
.workspace { flex: 1; display: flex; min-height: 0; gap: 24px; padding: 22px 34px; }
.media { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#stage { position: relative; flex: 1; background: linear-gradient(160deg, #12261d, #1d4d3b); border-radius: 20px; overflow: hidden; display: flex; align-items: center; justify-content: center; box-shadow: 0 22px 55px rgba(29,77,59,.16); }
#camera { width: 100%; height: 100%; object-fit: contain; }
#frame-wrap { position: absolute; inset: 0; background: #10241c; }
#frame-wrap img { width: 100%; height: 100%; object-fit: contain; }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#stage-empty { position: absolute; color: #9dbfae; font-size: 16px; letter-spacing: 1px; }
.media-bar { display: flex; gap: 8px; padding-top: 10px; flex-wrap: wrap; }
.media-bar button { white-space: nowrap; padding: 9px 12px; font-size: 14px; }

/* 对话区 */
.chat { flex: 1.15; display: flex; flex-direction: column; min-width: 440px; gap: 16px; }
.chat-panel { flex: 1; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; min-height: 0; }
.panel-title { font-size: 13px; letter-spacing: 4px; color: var(--ink-soft); padding: 16px 22px 0; }
#messages { flex: 1; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 14px; font-size: 16.5px; line-height: 1.7; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--ink); color: #fff; border-radius: 14px 4px 14px 14px; }
.msg.bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; }
.msg.sys { align-self: center; color: var(--ink-soft); font-size: 12.5px; background: none; }
.msg.thinking { align-self: flex-start; color: var(--ink-soft); font-size: 14px; }
.chat-bar { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--card); }
#chat-input { flex: 1; }

/* 今日统计 */
.today-panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 22px 18px; }
.stat-row { display: flex; text-align: center; }
.stat-row .stat { flex: 1; border-right: 1px solid var(--line); background: none; border-radius: 0; padding: 4px 0 0; border-top: none; border-bottom: none; border-left: none; }
.stat-row .stat:last-child { border-right: none; }
.stat b { display: block; font-size: 30px; font-family: var(--serif); }
.stat span { font-size: 14px; color: var(--ink-soft); }

/* SVG 标注 */
.ann-stroke { fill: none; stroke-width: 4; stroke-linecap: round; }
.ann-label-bg { rx: 6; }
.ann-label { font-size: 22px; fill: #fff; font-weight: 600; }
@keyframes draw-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
#overlay g { animation: draw-in .35s ease-out both; transform-origin: center; transition: opacity .5s ease; }
@keyframes ann-pulse { 0%,100% { filter: none; } 50% { filter: drop-shadow(0 0 10px rgba(240,160,60,.9)); } }
#overlay g.ann-new { animation: draw-in .35s ease-out both, ann-pulse 1.6s ease 2; }

/* 弹层 */
.modal { position: fixed; inset: 0; background: rgba(29,77,59,.38); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-card { background: var(--card); border-radius: 20px; padding: 28px 32px; width: min(740px, 92vw); max-height: 86vh; overflow-y: auto; box-shadow: 0 30px 80px rgba(18,38,29,.3); }
.modal-card h2 { margin: 0 0 14px; font-family: var(--serif); letter-spacing: 1px; }
.sub-inline { font-size: 13px; color: var(--ink-soft); font-weight: 400; font-family: var(--sans); letter-spacing: 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.tabs button.active { background: var(--ink); color: #fff; }
#prompt-editor { width: 100%; margin-bottom: 10px; border-radius: 12px; line-height: 1.8; }
.row { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.row input { flex: 1; }
.version { border: 1px solid var(--line); border-radius: 11px; padding: 9px 13px; margin-bottom: 8px; font-size: 13px; }
.version .meta { flex: 1; color: var(--ink-soft); }
.version-head { display: flex; align-items: center; gap: 10px; }
.version .current-tag { color: var(--accent, #2e7d32); font-weight: 600; margin-left: 4px; }
.version-body { margin-top: 8px; }
.version-content { white-space: pre-wrap; max-height: 260px; overflow-y: auto; background: rgba(255,255,255,.06); border-radius: 8px; padding: 10px 12px; font-size: 12.5px; line-height: 1.6; font-family: inherit; margin: 0 0 8px; }

/* 提示词原理 Help 流程图 */
.help-btn { font-size: 12.5px; padding: 4px 12px; vertical-align: middle; margin-left: 10px; color: var(--accent); border-color: var(--accent-soft); }
.help-card { width: min(820px, 94vw); }
.help-lead { font-size: 14px; line-height: 1.8; color: var(--ink-soft); margin: 0 0 18px; }
.help-lead b { color: var(--ink); }
.flow { display: flex; flex-direction: column; gap: 14px; }
.flow-stage { border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; background: var(--paper); }
.flow-stage-title { font-family: var(--serif); font-weight: 700; letter-spacing: 1px; margin-bottom: 12px; }
.flow-row { display: flex; align-items: stretch; gap: 8px; }
.flow-node { flex: 1; background: var(--card); border: 1.2px solid var(--line); border-radius: 13px; padding: 12px 14px; text-align: center; font-size: 15px; }
.flow-node b { display: block; font-size: 14px; margin-top: 3px; }
.flow-node span { display: block; font-size: 12px; color: var(--ink-soft); line-height: 1.55; margin-top: 4px; }
.flow-node.anchor { border-color: var(--accent-soft); background: rgba(124,108,255,.14); }
.flow-node.reply { border-color: var(--green); background: rgba(52,211,153,.10); }
.flow-arrow { align-self: center; color: var(--accent); font-size: 20px; font-weight: 700; }
.flow-down { text-align: center; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 1px; }
.flow-layers { display: flex; flex-direction: column; gap: 6px; }
.flow-layer { display: flex; align-items: center; gap: 12px; border: 1.2px solid var(--line); border-radius: 11px; padding: 9px 14px; background: var(--card); font-size: 13.5px; }
.flow-layer i { font-style: normal; font-family: var(--serif); font-weight: 700; color: var(--ink-soft); }
.flow-layer b { min-width: 128px; }
.flow-layer span { flex: 1; color: var(--ink-soft); font-size: 12.5px; line-height: 1.5; }
.flow-layer em { font-style: normal; font-size: 12px; white-space: nowrap; border-radius: 99px; padding: 3px 10px; }
.flow-layer.editable { border-color: var(--accent-soft); }
.flow-layer.editable em { background: rgba(124,108,255,.14); color: var(--accent); }
.flow-layer.locked em { background: rgba(255,255,255,.08); color: #777; }
.flow-layer.auto em { background: rgba(255,255,255,.06); color: var(--ink-soft); }
.flow-stage.tip { background: rgba(52,211,153,.10); border-color: rgba(52,211,153,.35); }
.flow-stage.tip p { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--ink); }
#report-body { line-height: 1.75; }
footer { text-align: center; font-size: 12px; color: #a89f8c; padding: 8px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 8px 34px; }
footer a { color: #a89f8c; }

/* 登录/注册 + 家长模式 + 余额（AlphaTutor 商用层） */
#auth-gate { flex: 1; display: flex; align-items: center; justify-content: center; }
.auth-card { max-width: 460px; width: 92vw; }
.auth-locale-row { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin:8px 0 2px; color:var(--ink-soft); font-size:13px; }
.auth-locale-row select { width:auto; min-width:112px; padding:7px 30px 7px 10px; }
.auth-tabs { display: flex; gap: 8px; margin: 14px 0; }
.auth-tabs button { flex: 1; }
.auth-tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
#auth-login-form, #auth-register-form { display: flex; flex-direction: column; gap: 10px; }
.auth-tip { font-size: 13px; color: var(--ink-soft); text-align: center; margin: 4px 0 0; }
.auth-error { color: var(--red); font-size: 14px; text-align: center; margin: 10px 0 0; }
.balance-chip { text-decoration: none; background: rgba(124,108,255,.14); border: 1.2px solid var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.balance-chip.low { background: rgba(244,63,94,.12); border-color: var(--red); color: var(--red); }

/* 新对话/历史/邀请 */
.mini-btn { font-size: 12.5px; padding: 5px 12px; letter-spacing: 0; margin-left: 8px; }
.invite-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; margin-bottom: 8px; }
.invite-code { font-family: ui-monospace, monospace; font-size: 16px; font-weight: 700; letter-spacing: 1px; flex: 1; }
.invite-status { font-size: 12px; border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.invite-status.unused { background: rgba(255,255,255,.06); color: var(--ink-soft); }
.invite-status.pending { background: rgba(124,108,255,.14); color: var(--accent); }
.invite-status.activated { background: rgba(52,211,153,.10); color: var(--green); }
.invite-url { font-family: ui-monospace, monospace; font-size: 13px; color: var(--ink); }
.history-day { font-family: var(--serif); font-weight: 700; letter-spacing: 1px; margin: 14px 0 8px; color: var(--ink-soft); }
.history-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; margin-bottom: 8px; cursor: pointer; font-size: 14px; }
.history-item:hover { border-color: var(--ink-soft); }
.history-item .meta { color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; }
.history-msgs { max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 6px 2px; }

/* 几何板书区：与画面上下分屏，恒定可见，系统输出专用（用户不可写） */
/* 8/16 修：aspect-ratio 想按宽度算高度，max-height 又把高度硬砍到 44vh，
   两者打架的结果是盒子变成 5:1 的扁横条（实测 1456×289），
   object-fit:contain 把画面缩到只占一半宽，另一半空出来——
   John 看到的"右边多出来一根竖条"就是这块空档。
   改法：宽度跟着高度走（用 aspect-ratio 但让 width 自适应），盒子永远是 16:9。 */
#stage {
  flex: none; aspect-ratio: 16 / 9;
  height: min(34vh, calc(100% * 9 / 16));
  max-width: 100%; width: auto; min-height: 170px;
  margin: 0 auto;                     /* 比容器窄时居中，不靠边 */
  transition: height .45s ease;
}
/* 板书有内容时(body.board-live)视频窗再让一档,板书区动态伸展上去(John 8/24) */
body.board-live #stage { height: min(24vh, calc(100% * 9 / 16)); min-height: 140px; }
/* 矮屏再压一档：仍然只动高度、宽度自适应，绝不再用 max-height 去砍 aspect-ratio */
@media (max-height: 800px) {
  #stage { height: min(30vh, calc(100% * 9 / 16)); }
  body.board-live #stage { height: min(21vh, calc(100% * 9 / 16)); }
}
#board-panel { flex: 1; min-height: 210px; display: flex; flex-direction: column; background: #fffdf6; border: 1px solid var(--line); border-radius: 20px; margin-top: 10px; overflow-y: auto; overflow-x: hidden; }
.board-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.board-title { font-family: var(--serif); font-weight: 700; letter-spacing: 1px; font-size: 14.5px; }
#board-state { font-size: 12.5px; color: var(--ink-soft); }
.board-head button { padding: 5px 12px; font-size: 12.5px; }
#jxgbox { flex: 1; width: 100%; min-height: 170px; }
#board-caption { padding: 7px 14px; font-size: 14px; color: var(--ink); background: var(--paper); border-top: 1px solid var(--line); line-height: 1.5; min-height: 32px; max-height: 76px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* 跟讲 v2 确认式翻页提示条（John 9/2）：老师讲到第 n 步了，孩子点「明白了，翻页」才翻 */
.board-suggest { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 14px; font-size: 13.5px; color: var(--ink); background: #fff7e0; border-top: 1px solid #f1d98a; }
.board-suggest .bs-text { flex: 1 1 160px; }
.board-suggest button { padding: 4px 10px; font-size: 12.5px; border-radius: 999px; border: 1px solid #e4c25a; background: #fff; cursor: pointer; white-space: nowrap; }
.board-suggest .bs-yes { background: #f7c948; border-color: #e4b33a; font-weight: 600; }
.board-suggest[hidden] { display: none; }

/* ── BoardPresenter v3 · P0（2026-09-02，John 拍板）：步骤台账 + 大确认卡 + 图账分区 ── */
#board-panel { position: relative; }
/* 几何/立体/函数图：图在上、台账在下（P2 再做宽屏左图右账） */
#board-panel.has-ledger #jxgbox { flex: 0 0 auto; height: clamp(150px, 30%, 240px); min-height: 150px; }   /* John 9/2：图少占、账多占 */
#board-panel.has-ledger #board-notes { flex: 1 1 0; min-height: 120px; border-top: 1px solid var(--line); }
#board-notes.bl { padding: 12px 18px 18px 14px; gap: 0; }
.bl-givens { margin: 0 0 12px 46px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.55); font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.bl-givens b { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11.5px; letter-spacing: .08em; color: var(--ink); margin-right: 8px; }
.bl-step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; position: relative; }
.bl-step[hidden] { display: none; }
.bl-spine { position: relative; }
.bl-spine::after { content: ""; position: absolute; left: 16px; top: 34px; bottom: -6px; width: 2px; background: var(--line); }
.bl-step:last-of-type .bl-spine::after, .bl-step.bl-last .bl-spine::after { display: none; }
.bl-badge { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); color: var(--ink); display: grid; place-items: center; font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600; font-size: 14px; background: #fff; transition: background .25s, color .25s, box-shadow .25s; }
.bl-step.now .bl-badge { background: var(--ink); color: #fff; box-shadow: 0 0 0 6px rgba(47,107,255,.18); }
.bl-step.done .bl-badge { border-color: var(--accent); color: var(--accent); }
.bl-step.done .bl-badge::after { content: "✓"; font-size: 13px; }
.bl-step.done .bl-badge span { display: none; }
.bl-step.past { opacity: .62; transition: opacity .4s; }
.bl-step.past:hover { opacity: 1; }
.bl-card { padding: 5px 0 16px; min-width: 0; }
.bl-title { font-weight: 700; font-size: 15.5px; display: flex; align-items: baseline; gap: 10px; color: var(--ink); }
.bl-title .bl-k { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; color: var(--ink-soft); letter-spacing: .08em; }
.bl-body { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.bl-body .note-line { border-left: none; padding-left: 0; margin: 0; }
.bl-look { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #2456b8; margin-top: 4px; }
.bl-look[hidden] { display: none; }
.bl-look i { width: 10px; height: 10px; border-radius: 50%; background: #2456b8; display: inline-block; }
.bl-result { display: inline-block; margin-top: 8px; padding: 5px 12px; border-radius: 8px; background: #e3f3e8; color: #1f8a4c; font-weight: 700; font-size: 14.5px; border: 1px solid transparent; transform: scale(1.15); opacity: 0; transition: transform .18s, opacity .18s; }
.bl-result.on { transform: none; opacity: 1; }
.bl-result[hidden] { display: none; }
.bl-step.answer .bl-result { font-size: 17px; border: 2px double #1f8a4c; padding: 8px 16px; }
/* 几何笔画：JSXGraph 出的 SVG 线/路径描边画出来；点落笔弹入 */
.bl-draw { transition: stroke-dashoffset var(--bl-ms, 800ms) linear; }
.bl-pop { transform-box: fill-box; transform-origin: center; transition: transform .14s cubic-bezier(.2,1.6,.4,1); }
/* P2：横排 flow 版式（≤4 步短算式题）：卡片 → 箭头 → 卡片；容器窄于 700px 自动折回竖向台账 */
#board-notes.bl-flow { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 0 18px; }
#board-notes.bl-flow .bl-givens { flex: 1 1 100%; margin-left: 0; }
#board-notes.bl-flow .bl-step { grid-template-columns: 30px 1fr; flex: 1 1 180px; max-width: 320px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 4px 8px; background: rgba(255,255,255,.6); position: relative; }
#board-notes.bl-flow .bl-step:not(.bl-last)::after { content: "→"; position: absolute; right: -16px; top: 14px; color: #2456b8; font-weight: 700; font-size: 16px; }
#board-notes.bl-flow .bl-spine::after { display: none; }
@container (max-width: 700px) { #board-notes.bl-flow { flex-direction: column; } #board-notes.bl-flow .bl-step { max-width: none; } #board-notes.bl-flow .bl-step::after { content: "↓"; right: auto; left: 8px; top: auto; bottom: -18px; } }
/* P2：台账卡回看联动（悬停/点击某一步 → 图上该步重新亮起） */
.bl-step.past { cursor: pointer; }
.bl-step.bl-peek { opacity: 1; }
.bl-step.bl-peek .bl-badge { box-shadow: 0 0 0 4px rgba(36,86,184,.18); }
/* P1：笔尖 + 本步新元素呼吸高亮 1.2s */
.bl-pen { pointer-events: none; opacity: 0; transition: opacity .15s; }
.bl-glow { animation: bl-glow 1.2s ease-out 1; }
@keyframes bl-glow { 0% { filter: drop-shadow(0 0 0 rgba(36,86,184,0)); } 35% { filter: drop-shadow(0 0 6px rgba(36,86,184,.9)); } 100% { filter: drop-shadow(0 0 0 rgba(36,86,184,0)); } }
/* 确认卡（板书区居中弹窗，取代 13.5px 小提示条） */
.board-suggest.bl-modal { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 0; background: rgba(20,25,35,.28); backdrop-filter: blur(2px); border: 0; }
/* John 9/2 晚实测：弹窗"关都关不掉"——上面这条 display:grid 与 .board-suggest[hidden]{display:none} 同优先级、后者在前被盖掉，hidden 失效 */
.board-suggest.bl-modal[hidden] { display: none !important; }
.board-suggest.bl-modal .bl-ccard { width: min(420px, 88%); background: #fff; border: 1.5px solid #2456b8; border-radius: 14px; padding: 16px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.25); animation: bl-in .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes bl-in { from { transform: translateY(10px) scale(.97); opacity: 0; } }
.bl-ccard .bl-h { font-weight: 700; font-size: 15.5px; color: var(--ink); margin-bottom: 12px; line-height: 1.5; }
.bl-ccard .bl-h em { font-style: normal; color: #2456b8; }
.bl-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.bl-btns button { font: inherit; font-size: 15px; min-height: 44px; padding: 0 20px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; font-weight: 600; }
.bl-btns button.bl-yes { background: #2456b8; border-color: #2456b8; color: #fff; }
/* 对话窗里的确认卡（文字/语音都有对话窗） */
.msg.board-confirm { align-self: stretch; max-width: 100%; background: #fff; border: 1.5px solid #2456b8; border-radius: 14px; padding: 14px 16px; animation: bl-in .35s cubic-bezier(.2,1.4,.4,1); }
.msg.board-confirm.settled { border-color: var(--line); color: var(--ink-soft); font-size: 13.5px; padding: 8px 14px; }
@media (prefers-reduced-motion: reduce) { .bl-draw, .bl-pop, .bl-result, .bl-step.past { transition: none !important; } .bl-ccard, .msg.board-confirm { animation: none; } }
@media print { .bl-step { opacity: 1 !important; break-inside: avoid; } .bl-step[hidden] { display: grid; } .board-suggest, #board-facts .drag-toggle { display: none !important; } }

/* 笔记式板书 */
#board-notes { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 26px; display: flex; flex-direction: column; gap: 10px; }
.note-line { font-size: 17px; line-height: 1.7; color: var(--ink); font-family: var(--serif); border-left: 3px solid var(--accent-soft); padding-left: 12px; animation: note-in .5s ease both; }
@keyframes note-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* 板书结论条：文字结论不上画布，按讲解顺序点亮 */
#board-facts { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
#board-facts:not(:empty) { padding: 6px 12px; border-top: 1px dashed var(--line); }
.board-fact { font-size: 14px; font-family: var(--serif); font-weight: 600; color: var(--ink); background: rgba(124,108,255,.14); border: 1px solid var(--accent-soft); border-radius: 8px; padding: 3px 10px; animation: note-in .4s ease both; }



/* ═══════════════════════════════════════════════════════════
   Apple 玻璃拟态主题：柔彩渐晕底 / 磨砂玻璃卡片 / 立体 3D 按钮
   ═══════════════════════════════════════════════════════════ */
:root {
  --paper: #f2f5fa;
  --card: rgba(255,255,255,.62);
  --ink: #17181c;
  --ink-soft: #6e7683;
  --accent: #2f6bff;
  --accent-soft: #6ea8ff;
  --line: rgba(120,140,180,.18);
  --glass-blur: blur(26px) saturate(1.5);
  --btn-3d: 0 10px 22px rgba(47,80,150,.16), 0 2px 6px rgba(47,80,150,.10), inset 0 1.5px 0 rgba(255,255,255,.95), inset 0 -2px 4px rgba(120,140,180,.12);
  --btn-3d-press: 0 3px 8px rgba(47,80,150,.14), inset 0 2px 6px rgba(47,80,150,.16);
}
body {
  background:
    radial-gradient(900px 620px at 12% -6%, rgba(160,196,255,.55), transparent 60%),
    radial-gradient(820px 560px at 92% 4%, rgba(255,196,225,.42), transparent 60%),
    radial-gradient(900px 700px at 55% 112%, rgba(196,180,255,.40), transparent 62%),
    #f2f5fa;
  background-attachment: fixed;
  color: var(--ink);
  letter-spacing: .01em;
}

/* 字体：全站 SF/苹方体系，标题粗黑、收紧字距 */
.brand, .modal-card h2, .board-title, section.panel h2, .wizard-card h1 {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
  font-weight: 800; letter-spacing: .02em;
}
.stat b { font-family: -apple-system, 'PingFang SC', sans-serif; font-weight: 800; }

/* 头部：悬浮玻璃条 */
header { background: rgba(255,255,255,.55); backdrop-filter: var(--glass-blur); border-bottom: 1px solid rgba(255,255,255,.7); box-shadow: 0 8px 30px rgba(47,80,150,.06); }
.brand .slogan { color: var(--accent); border-left-color: var(--line); font-weight: 700; }
nav.top a.on { border-bottom-color: var(--accent); }
.child-chip { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.8); border-radius: 999px; padding: 3px 6px 3px 4px; box-shadow: var(--btn-3d); }
.child-chip select { border: none; background: transparent; box-shadow: none; font-weight: 600; }
.icon-btn { padding: 7px 10px !important; border: none !important; box-shadow: none !important; background: transparent !important; }
.tutor-btn { font-weight: 600; }

/* 按钮：立体 3D 玻璃感 */
button {
  border-radius: 999px; border: 1px solid rgba(255,255,255,.85);
  background: linear-gradient(180deg, #ffffff 0%, #eef2f9 100%);
  color: var(--ink); box-shadow: var(--btn-3d);
  transition: transform .12s ease, box-shadow .12s ease;
}
button:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.95); }
button:active { transform: translateY(1px); box-shadow: var(--btn-3d-press); }
button.primary {
  background: linear-gradient(180deg, #5f95ff 0%, #2f6bff 60%, #2456d8 100%);
  color: #fff; border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 12px 26px rgba(47,107,255,.35), inset 0 1.5px 0 rgba(255,255,255,.55), inset 0 -2px 5px rgba(0,40,140,.25);
}
button.primary:hover { background: linear-gradient(180deg, #6da0ff 0%, #3d77ff 60%, #2a5ee2 100%); }
button.primary:disabled { opacity: .35; box-shadow: none; }
button.solved { background: linear-gradient(180deg, #ffffff, #eafaf0); color: #128a43; border-color: rgba(255,255,255,.9); }
button.voice { background: linear-gradient(180deg, #ffffff, #eaf1ff); color: var(--accent); }
button.voice.on { background: linear-gradient(180deg, #5f95ff, #2f6bff); color: #fff; }
.voice-status { color: var(--accent); }
input, textarea { border-radius: 16px; background: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.9); box-shadow: inset 0 2px 6px rgba(47,80,150,.08); color: var(--ink); }
select { border-radius: 999px; background: linear-gradient(180deg, #ffffff, #eef2f9); border: 1px solid rgba(255,255,255,.85); box-shadow: var(--btn-3d); color: var(--ink); font-weight: 500; cursor: pointer; }
input::placeholder { color: #9aa3b2; }

/* 画面区：深色屏幕悬浮在玻璃世界里 */
#stage { background: #0f1216; border-radius: 24px; box-shadow: 0 24px 50px rgba(23,32,60,.28), inset 0 0 0 1px rgba(255,255,255,.06); }
#stage-empty { color: #8b93a0; }

/* 板书区：磨砂玻璃白板 */
#board-panel { background: var(--card); backdrop-filter: var(--glass-blur); border: 1px solid rgba(255,255,255,.75); border-radius: 24px; box-shadow: 0 18px 44px rgba(47,80,150,.12); }
.board-head { background: rgba(255,255,255,.5); border-bottom-color: var(--line); }
#board-caption { background: rgba(255,255,255,.5); border-top-color: var(--line); }
.board-fact { background: rgba(47,107,255,.10); border: 1px solid rgba(47,107,255,.28); color: #2456d8; border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.note-line { border-left-color: var(--accent); }

/* 对话区：玻璃卡片 + iOS 蓝气泡 */
.chat-panel, .today-panel { background: var(--card); backdrop-filter: var(--glass-blur); border: 1px solid rgba(255,255,255,.75); border-radius: 24px; box-shadow: 0 18px 44px rgba(47,80,150,.12); }
.msg.user { background: linear-gradient(180deg, #4f8cff, #2f6bff); color: #fff; box-shadow: 0 6px 16px rgba(47,107,255,.28); }
.msg.bot { background: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.95); color: var(--ink); box-shadow: 0 4px 12px rgba(47,80,150,.08); }
.chat-bar { background: rgba(255,255,255,.4); border-top-color: var(--line); }
.stat b { color: var(--accent); }
.stat-row .stat { border-right-color: var(--line); }

/* 弹层：厚玻璃 */
.modal { background: rgba(60,80,130,.25); backdrop-filter: blur(10px); }
.modal-card, .wizard-card { background: rgba(255,255,255,.78); backdrop-filter: var(--glass-blur); border: 1px solid rgba(255,255,255,.9); border-radius: 26px; box-shadow: 0 40px 100px rgba(23,32,60,.25); }
.tabs button.active, .auth-tabs button.active { background: linear-gradient(180deg, #5f95ff, #2f6bff); color: #fff; border-color: rgba(255,255,255,.5); }
.version, .invite-row, .history-item, .kid-row { background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: 0 4px 12px rgba(47,80,150,.06); }
.version-content { background: rgba(240,244,250,.9); }
.invite-status.pending { background: rgba(47,107,255,.1); color: #2456d8; }
.invite-status.activated { background: rgba(18,138,67,.1); color: #128a43; }
.current-tag { color: #128a43 !important; }

/* Tutor 设置弹层 */
.cfg-item { border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.55); border-radius: 18px; padding: 14px 18px; margin-bottom: 12px; box-shadow: 0 4px 14px rgba(47,80,150,.07); }
.cfg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.cfg-head b { font-size: 15px; }
.cfg-item p { margin: 0; font-size: 13px; line-height: 1.75; color: var(--ink-soft); }
.cfg-item p b { color: var(--ink); font-weight: 600; }

/* Help 流程图 */
.flow-stage { background: rgba(255,255,255,.5); border-color: rgba(255,255,255,.85); }
.flow-node, .flow-layer { background: rgba(255,255,255,.75); border-color: rgba(255,255,255,.95); }
.flow-node.anchor { background: rgba(47,107,255,.08); border-color: rgba(47,107,255,.3); }
.flow-node.reply { background: rgba(18,138,67,.08); border-color: rgba(18,138,67,.3); }
.flow-arrow, .flow-down { color: var(--accent); }
.flow-layer.editable { border-color: rgba(47,107,255,.35); }
.flow-layer.editable em { background: rgba(47,107,255,.1); color: #2456d8; }
.flow-stage.tip { background: rgba(18,138,67,.07); border-color: rgba(18,138,67,.25); }

/* 开场动效 */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
#main header { animation: fadein .45s ease both; }
#main .media { animation: rise .55s .06s cubic-bezier(.22,.8,.3,1) both; }
#main .chat { animation: rise .55s .14s cubic-bezier(.22,.8,.3,1) both; }
.auth-card, .wizard-card, .modal-card { animation: rise .4s cubic-bezier(.22,.8,.3,1) both; }
.msg { animation: rise .25s ease both; }
@media (prefers-reduced-motion: reduce) {
  #main header, #main .media, #main .chat, .auth-card, .wizard-card, .modal-card, .msg { animation: none; }
}

/* ── 知识帖（板书区科普卡·分 tab·高冲击视觉）───────────── */
#board-knowledge {
  margin: 10px 14px 14px;
  border-radius: 18px;
  padding: 2px;
  background: linear-gradient(120deg, #7c5cff, #2f6bff 38%, #17c3b2 75%, #ffb545);
  box-shadow: 0 10px 34px rgba(80, 90, 255, .22);
  animation: rise .5s ease both;
}
#board-knowledge .kn-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 8px;
}
#board-knowledge .kn-tag {
  color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0,0,0,.25); white-space: nowrap;
}
#board-knowledge .kn-tabs { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
#board-knowledge .kn-tab {
  border: none; cursor: pointer; font-size: 12.5px; font-weight: 700;
  padding: 6px 13px; border-radius: 99px;
  /* 面板变窄时标签会被挤成 39×80 的竖条（文字竖排），几乎点不中——禁止换行、给下限 */
  white-space: nowrap; flex: none; min-height: 26px;
  background: rgba(255,255,255,.22); color: #fff;
  backdrop-filter: blur(6px); transition: all .18s;
}
#board-knowledge .kn-tab.active {
  background: #fff; color: #2f6bff;
  box-shadow: 0 3px 10px rgba(0,0,0,.18); transform: translateY(-1px);
}
#board-knowledge .kn-close {
  border: none; background: rgba(255,255,255,.25); color: #fff;
  width: 24px; height: 24px; border-radius: 8px; cursor: pointer; font-size: 12px; padding: 0;
}
#board-knowledge .kn-card {
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(246,248,255,.95));
  border-radius: 0 0 16px 16px; padding: 14px 20px 16px;
}
#board-knowledge .kn-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
#board-knowledge .kn-title { font-size: 17px; font-weight: 800; letter-spacing: .3px; }
#board-knowledge .kn-formula {
  font-family: ui-monospace, 'SF Mono', monospace; font-size: 14px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #2f6bff, #7c5cff);
  border-radius: 10px; padding: 3px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 9px rgba(47,107,255,.35);
}
#board-knowledge .kn-img { max-width: min(200px, 42%); border-radius: 12px; float: right; margin: 0 0 8px 14px; box-shadow: 0 6px 18px rgba(31,41,55,.18); }
#board-knowledge .kn-line { margin: 5px 0; font-size: 14px; line-height: 1.75; }
#board-knowledge .kn-analogy {
  margin: 10px 0 0; padding: 9px 13px; font-size: 13.5px; line-height: 1.7;
  background: rgba(23, 195, 178, .09); border-left: 3px solid #17c3b2; border-radius: 8px;
}
#board-knowledge .kn-fact {
  margin: 8px 0 0; padding: 9px 13px; font-size: 13.5px; line-height: 1.7; font-weight: 600;
  background: rgba(255, 181, 69, .13); border-left: 3px solid #ffb545; border-radius: 8px;
}
#board-knowledge .kn-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
#board-knowledge .kn-links a {
  font-size: 12.5px; font-weight: 700; text-decoration: none; color: var(--accent);
  background: #fff; border: 1.5px solid rgba(47, 107, 255, .3);
  border-radius: 99px; padding: 6px 14px;
  box-shadow: 0 3px 8px rgba(31, 41, 55, .08);
  transition: transform .15s, box-shadow .15s;
}
#board-knowledge .kn-links a:hover { transform: translateY(-1.5px); box-shadow: 0 5px 14px rgba(47, 107, 255, .25); }

/* ── 板书笔记排版模板：公式与解释分层，公式专业渲染 ─────────── */
#board-notes { padding: 16px 22px; }
/* ── 写字辅导：板书上的大字（2026-08-26）────────────────────────────────
   要点是"大"和"跟得住"：字占满板书宽度，米字格给结构参照，
   淡色描红底稿让孩子看得见下一笔往哪儿走，标签实时报第几笔。 */
#board-notes .hz-row { display: flex; flex-wrap: nowrap; gap: 18px; justify-content: center; align-items: flex-start; }
/* 最多四字（服务端 writable(...,4) 封顶）一律【并列一排】（John 8/27：虎头蛇尾要四格并排）——
   nowrap + flex:1 1 0 让几个字平分横向空间，字多格子自动变小，绝不折行摞两层 */
/* 尺寸只由 CSS 决定：一个字时尽量大，两三个字并排时各自收窄但不小于 200。
   不在 JS 里量宽度——那一刻面板可能还没布局，量到 0 会把字缩成最小号。
   高度同时封顶（John 8/27：字太大要滚动才看得全）——田字格必须在板书可视区里
   一眼看到，40vh 在常见窗口下正好整格入画；字大不大，不如整格看得见重要。 */
#board-notes .hz-cell { display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 1 1 0; max-width: min(460px, 40vh); min-width: 0; }
#board-notes .hz-row:has(.hz-cell:only-child) .hz-cell { flex-basis: min(100%, 40vh); }
#board-notes .hz-svg { border: 1.5px solid #d8cfae; border-radius: 8px; background: #fffdf6;
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; }
#board-notes .hz-tag { font: 600 13px/1.4 "IBM Plex Mono", ui-monospace, monospace; color: #b8860b; letter-spacing: .04em; }
#board-notes .hz-info { margin: 14px auto 0; max-width: 560px; border-top: 1px solid #e7dcc0; padding-top: 12px;
  display: flex; flex-direction: column; gap: 6px; }
#board-notes .hz-line { font-size: 14.5px; line-height: 1.8; color: #3c4351; }
#board-notes .hz-line b { font-size: 16px; color: #1a1a1a; letter-spacing: .06em; }
#board-notes .hz-k { display: inline-block; min-width: 34px; margin-right: 8px; font-size: 12px;
  color: #8a8f98; letter-spacing: .1em; }
#board-notes .hz-eg { color: #5b6472; font-style: normal; }
#board-notes .hz-credit { margin-top: 4px; font-size: 11px; color: #a8adb6; letter-spacing: .02em; }
#board-notes .hz-credit a { color: #a8adb6; text-decoration: underline; }
@media (max-width: 860px) { #board-notes .hz-row { gap: 12px; } }

#board-notes .note-line {
  font-size: 14.5px; line-height: 1.9; margin: 7px 0; color: var(--ink);
  border-left: 3px solid rgba(47, 107, 255, .35); padding-left: 12px;
}
#board-notes .note-line .katex { font-size: 1.12em; }
#board-notes .note-formula {
  margin: 14px auto 12px; padding: 14px 20px; text-align: center;
  background: linear-gradient(135deg, rgba(47, 107, 255, .06), rgba(124, 92, 255, .07));
  border: 1px solid rgba(47, 107, 255, .18); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 14px rgba(47, 80, 150, .07);
  overflow-x: auto; max-width: 96%;
}
#board-notes .note-formula .katex-display { margin: 0; }
#board-notes .note-formula .katex { font-size: 1.35em; }
#board-knowledge .kn-formula .katex { font-size: 1.05em; color: #fff; }
#board-knowledge .kn-line .katex { font-size: 1.1em; }

/* 语言硬开关（页头一键切）—— 2026-08-29 John：原来只显示一个「中」字，
   用户根本不知道那儿能切语言。改成分段开关：两种语言都摆出来、当前项高亮，
   谁都一眼看懂这是切换。两格用 grid 等宽，滑块平移 50% 才对得准。 */
.lang-btn {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr;
  align-items: center; padding: 3px; min-width: 108px; border-radius: 99px;
  font-weight: 700; letter-spacing: 0; line-height: 1;
}
.lang-btn span {
  position: relative; z-index: 1; padding: 5px 4px; font-size: 12.5px;
  white-space: nowrap; transition: color .25s ease;
}
.lang-knob {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 99px; background: linear-gradient(135deg, #2F6BFF, #5d8bff);
  box-shadow: 0 3px 10px rgba(47, 107, 255, .34);
  transition: transform .3s cubic-bezier(.2, .8, .3, 1);
}
.lang-btn.en .lang-knob { transform: translateX(100%); }
.lang-btn span:first-of-type { color: #fff; }
.lang-btn span:last-of-type { color: var(--ink-soft); }
.lang-btn.en span:first-of-type { color: var(--ink-soft); }
.lang-btn.en span:last-of-type { color: #fff; }
@media (prefers-reduced-motion: reduce) { .lang-knob { transition: none; } }
/* 顶栏本来就没有任何窄屏处理（flex 不换行、无断点），语言开关从 42px 变成 108px
   会让它更挤。窄屏把品牌 slogan 收起来——它约 150px，正好抵消还有富余，
   而且是顶栏里信息量最低的一块。 */
@media (max-width: 1120px) {
  .brand .slogan { display: none; }
}
@media (max-width: 900px) {
  header { gap: 14px; padding: 12px 18px; }
  nav.top { gap: 16px; font-size: 15.5px; }
}

/* ── 液态玻璃描边（rim light）：上下缘受光、中段隐没——取代均匀白边 ──── */
.chat-panel, .today-panel, .modal-card, .child-chip, .tutor-btn, .lang-btn,
.cfg-item, #tutor-modal .modal-card, .wizard-card {
  border: none;
  position: relative;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .28), 0 18px 44px rgba(47, 80, 150, .12);
}
.chat-panel::before, .today-panel::before, .modal-card::before, .child-chip::before,
.tutor-btn::before, .lang-btn::before, .cfg-item::before, .wizard-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .16) 22%,
    rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0) 62%,
    rgba(255, 255, 255, .14) 80%, rgba(255, 255, 255, .42) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* 玻璃底色再通透一点，靠 rim 而不是底色撑住轮廓 */
.chat-panel, .today-panel { background: rgba(255, 255, 255, .42); }

/* 板书头部自适应（9/2 John 平板实测「下一步」被裁掉）：宽时一行，状态文案先截断让位；
   面板窄到一行塞不下时按钮折到第二行、状态文案让到最下一行——「下一步」永远在屏幕里。
   按面板自身宽度（容器查询）而非视口判断：左右分栏时面板比视口窄得多。 */
#board-panel { container-type: inline-size; }
.board-head { flex-wrap: wrap; row-gap: 6px; }
.board-head .board-title { white-space: nowrap; }
.board-head button { white-space: nowrap; padding: 5px 10px; flex-shrink: 0; }
#board-state { flex: 1 1 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@container (max-width: 700px) {
  .board-head { gap: 6px; padding: 6px 10px; }
  .board-head button { padding: 4px 8px; font-size: 12px; }
  #board-state { flex-basis: 100%; order: 9; font-size: 12px; }
}

/* ── 板书知识卡片（定义/公式/案例/提示 四色）──────────── */
.note-kcard { margin: 10px 0; padding: 12px 16px; border-radius: 14px; background: #fff;
  box-shadow: 0 4px 14px rgba(31, 41, 55, .07); border-left: 4px solid #94a3b8; }
.note-kcard .kc-tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 2px;
  border-radius: 99px; padding: 2px 10px; color: #fff; margin-bottom: 6px;
  font-family: -apple-system, 'PingFang SC', system-ui, sans-serif; }
.note-kcard b { display: block; font-size: 15px; letter-spacing: .3px; margin-bottom: 4px; }
.note-kcard p { font-family: -apple-system, 'PingFang SC', system-ui, sans-serif;
  font-size: 13.5px; line-height: 1.8; color: rgba(23, 24, 28, .78); margin: 0; }
.note-kcard.k-def { border-left-color: #2f6bff; } .note-kcard.k-def .kc-tag { background: #2f6bff; }
.note-kcard.k-formula { border-left-color: #7c5cff; } .note-kcard.k-formula .kc-tag { background: #7c5cff; }
.note-kcard.k-case { border-left-color: #f08c1a; } .note-kcard.k-case .kc-tag { background: #f08c1a; }
.note-kcard.k-tip { border-left-color: #12a150; } .note-kcard.k-tip .kc-tag { background: #12a150; }
.note-kcard .katex { font-size: 1.08em; }
.note-kcard.k-vocab { border-left-color: #0e9aa7; } .note-kcard.k-vocab .kc-tag { background: #0e9aa7; }
.note-kcard.k-bg { border-left-color: #8d6e63; } .note-kcard.k-bg .kc-tag { background: #8d6e63; }
.note-kcard.k-ext { border-left-color: #d81b60; } .note-kcard.k-ext .kc-tag { background: #d81b60; }
.note-kcard .kc-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.note-kcard .kc-links a { font-size: 12px; font-weight: 700; text-decoration: none; color: var(--accent);
  background: rgba(47, 107, 255, .07); border: 1px solid rgba(47, 107, 255, .25); border-radius: 99px; padding: 4px 12px; }
.note-kcard .kc-links a:hover { background: rgba(47, 107, 255, .13); }

/* ── 站内视频播放器（充满板书区） ─────────────────────── */
#board-video { position: absolute; left: 0; right: 0; z-index: 6; background: #0b0f1c; display: flex; flex-direction: column; border-radius: 24px; box-shadow: 0 18px 44px rgba(0,0,0,.3); }
#board-video .bv-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; color: rgba(255,255,255,.85); font-size: 13px; }
#board-video #bv-close { border: none; border-radius: 99px; padding: 6px 14px; cursor: pointer; background: rgba(255,255,255,.14); color: #fff; font-size: 12.5px; }
#board-video #bv-close:hover { background: rgba(255,255,255,.25); }
#board-video #bv-frame { flex: 1; min-height: 0; }
#board-video iframe { width: 100%; height: 100%; border: 0; display: block; }
#board-video .bv-loading { height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); font-size: 14px; }

/* 回首页故事按钮：演示时一键回到 landing 讲故事 */
#btn-story {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 99px; text-decoration: none;
  font-size: 14px; font-weight: 700; letter-spacing: .04em; color: var(--ink);
  background: rgba(255,255,255,.72); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 10px 26px rgba(47,80,150,.16), inset 0 1px 0 rgba(255,255,255,.95);
  transition: transform .2s, box-shadow .2s, opacity .2s;
  opacity: .82;
}
#btn-story:hover { opacity: 1; transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(47,80,150,.22), inset 0 1px 0 rgba(255,255,255,.95); }
#btn-story:active { transform: translateY(1px); }
@media (max-width: 640px) {
  #btn-story { right: 14px; bottom: 14px; padding: 10px 14px; }
  #btn-story span { display: none; }
}

/* ── 新手教程：老师亲自带一遍 ── */
#tut-offer { position: fixed; inset: 0; z-index: 240; background: rgba(15,20,32,.5);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); display: flex; align-items: center; justify-content: center; padding: 20px; }
#tut-offer .tut-card { max-width: 380px; text-align: center; background: var(--card); border-radius: 24px; padding: 32px 28px;
  box-shadow: 0 26px 70px rgba(20,30,60,.32), inset 0 1px 0 rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.7); }
#tut-offer .tut-emoji { font-size: 42px; }
/* 免费徽章 + 元信息（2026-08-29）：家长按下"开始"之前，最先想知道的是
   "这要不要花我钱"。把这句话摆在标题上方，比藏在旁白里管用。*/
#tut-offer .tut-free { display: inline-block; margin: 10px 0 2px; padding: 5px 14px; border-radius: 99px;
  background: #eaf7ee; color: #1f7a45; border: 1px solid #cbe8d5; font-size: 12.5px; font-weight: 700; }
#tut-offer .tut-meta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin: -6px 0 16px; font-size: 12.5px; color: var(--ink-soft); }
#tut-offer .tut-ask { font-size: 16.5px; line-height: 1.8; margin: 12px 0 20px; }
#tut-offer button { width: 100%; padding: 13px; border-radius: 13px; font-size: 15px; font-weight: 700; margin-top: 9px; }

#tut-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 230;
  width: min(680px, 94vw); border-radius: 20px; padding: 16px 22px; text-align: center;
  background: rgba(255,255,255,.86); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255,255,255,.9); box-shadow: 0 18px 48px rgba(20,30,60,.22); }
#tut-bar .tut-dots { display: flex; gap: 7px; justify-content: center; margin-bottom: 11px; }
#tut-bar .tut-dots i { width: 26px; height: 4px; border-radius: 99px; background: rgba(120,140,180,.26); transition: .3s; }
#tut-bar .tut-dots i.on { background: var(--accent); width: 38px; }
#tut-bar .tut-dots i.done { background: rgba(47,107,255,.45); }
#tut-bar .tut-say { font-size: 15.5px; line-height: 1.75; min-height: 46px; }
#tut-bar .tut-ctl { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
#tut-bar .tut-ctl button { padding: 8px 18px; font-size: 13.5px; border-radius: 11px; }

/* 被讲到的控件：高亮呼吸 */
.tut-spot { position: relative; z-index: 231; outline: 3px solid var(--accent);
  outline-offset: 3px; border-radius: 12px; animation: tutPulse 1.5s ease-in-out infinite; }
@keyframes tutPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(47,107,255,.42) } 50% { box-shadow: 0 0 0 11px rgba(47,107,255,0) } }

/* ── 分享海报弹层（邀请码 / 回放共用） ── */
.poster-pop { position: fixed; inset: 0; z-index: 250; background: rgba(12,18,30,.66);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 18px; }
.poster-pop .pp-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 96vh; }
.poster-pop .pp-tabs { display: inline-flex; gap: 4px; background: rgba(255,255,255,.14); border-radius: 99px; padding: 4px; }
.poster-pop .pp-tabs button { border: none; background: transparent; color: rgba(255,255,255,.72);
  border-radius: 99px; padding: 7px 20px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.poster-pop .pp-tabs button.on { background: #fff; color: #17181c; font-weight: 800; }
.poster-pop .pp-img { max-height: 74vh; max-width: 92vw; border-radius: 16px;
  box-shadow: 0 22px 64px rgba(0,0,0,.5); background: #fff; }
.poster-pop .pp-tip { color: rgba(255,255,255,.76); font-size: 13px; margin: 0; text-align: center; }
.poster-pop .pp-ctl { display: flex; gap: 10px; }
.poster-pop .pp-ctl button { padding: 10px 22px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.poster-pop .pp-ctl .ghost { background: rgba(255,255,255,.16); color: #fff; border: none; }

/* ── 忘记密码：引导找运营人工重置 ── */
.auth-tip a { color: var(--accent); text-decoration: none; font-weight: 600; }
.forgot-pop { position: fixed; inset: 0; z-index: 260; background: rgba(15,20,32,.55);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.forgot-pop .fp-card { max-width: 350px; text-align: center; background: var(--card); border-radius: 24px;
  padding: 30px 28px; border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 26px 70px rgba(20,30,60,.32), inset 0 1px 0 rgba(255,255,255,.9); }
.forgot-pop .fp-emoji { font-size: 38px; }
.forgot-pop h2 { font-size: 19px; margin: 10px 0 10px; }
.forgot-pop p { font-size: 14px; line-height: 1.85; color: var(--ink-soft); margin: 0 0 18px; }
.forgot-pop img { width: 168px; border-radius: 14px; box-shadow: 0 10px 28px rgba(47,80,150,.18); }
.forgot-pop button { width: 100%; margin-top: 20px; padding: 12px; border-radius: 13px; font-size: 14.5px; font-weight: 700; }

/* ── 邀请码：解锁进度 + 过期回收态 ── */
.invite-status.stale { background: rgba(180,150,90,.16); color: #96742c; }
.inv-lock { text-align: center; padding: 26px 22px; border-radius: 18px;
  background: rgba(47,107,255,.05); border: 1px dashed rgba(47,107,255,.3); }
.inv-lock-icon { font-size: 34px; }
.inv-lock b { display: block; font-size: 16.5px; margin: 10px 0 14px; }
.inv-lock p { font-size: 13px; color: var(--ink-soft); line-height: 1.8; margin: 12px 0 0; }
.inv-bar { height: 8px; border-radius: 99px; background: rgba(120,140,180,.18); overflow: hidden; max-width: 320px; margin: 0 auto; }
.inv-bar i { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #2f6bff, #7c5cff); transition: width .5s; }

/* 解锁恭喜弹层 */
.unlock-pop { position: fixed; inset: 0; z-index: 265; background: rgba(15,20,32,.58);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.unlock-pop .up-card { max-width: 380px; text-align: center; background: var(--card); border-radius: 26px;
  padding: 34px 30px; border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 28px 74px rgba(20,30,60,.34), inset 0 1px 0 rgba(255,255,255,.9); }
.unlock-pop .up-emoji { font-size: 52px; animation: upPop .7s cubic-bezier(.2,1.4,.4,1); }
@keyframes upPop { 0% { transform: scale(.3); opacity: 0 } 100% { transform: none; opacity: 1 } }
.unlock-pop h2 { font-size: 21px; margin: 12px 0 10px; }
.unlock-pop p { font-size: 14.5px; line-height: 1.85; color: var(--ink-soft); margin: 0 0 20px; }
.unlock-pop .up-codes { display: flex; gap: 6px; justify-content: center; margin-bottom: 20px; }
.unlock-pop .up-codes i { width: 34px; height: 44px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(160deg, #2f6bff, #7c5cff); color: #fff; font-style: normal; font-size: 19px;
  box-shadow: 0 8px 20px rgba(63,92,255,.35); }
.unlock-pop button { width: 100%; padding: 13px; border-radius: 13px; font-size: 15px; font-weight: 700; margin-top: 8px; }

/* ── 做对后的收尾卡：讲不讲都行，点 OK 就干净结束 ── */
.wrapup-card { margin: 14px 0 6px; padding: 20px 22px; border-radius: 20px; text-align: center;
  background: linear-gradient(160deg, rgba(52,211,153,.10), rgba(47,107,255,.08));
  border: 1px solid rgba(52,211,153,.35); box-shadow: 0 10px 30px rgba(30,120,90,.10); }
.wrapup-card .wu-title { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.wrapup-card p { font-size: 14px; line-height: 1.85; color: var(--ink-soft); margin: 0 0 16px; }
.wrapup-card .wu-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.wrapup-card .wu-btns button { padding: 11px 22px; border-radius: 13px; font-size: 14.5px; font-weight: 700; }

/* ── 题目图卡（板书区）：标注画在这里，实时摄像头画面永不被冻结 ── */
/* 题目图卡与上方实时画面组成"一对"：同宽、同圆角、同比例、各自带标签。
   8/16 John 反馈：原先一个满宽深色 16:9、一个内缩浅色 46% 高，
   "一大一小、中间劈成两半、也不知道两边各是什么"，看着就乱。 */
/* 练习题卡：小问号口头出的题，钉在板书区顶部——孩子抬头就能看见，不用回翻聊天 */
/* 题干卡（9/3）：与练习题卡同一形制，蓝灰底以示"这是题目本身" */
#board-problem { flex: none; margin: 10px 0 6px; border-radius: 16px; padding: 10px 16px 12px; background: linear-gradient(180deg, #f4f7fd, #eef2fa); border: 1px solid #d5dced; }
#board-problem .bp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
#board-problem .bp-head .pane-tag { position: static; background: #dde6f7; color: #2b4a8a; }
#board-problem #bq-toggle { margin-left: auto; padding: 2px 10px; font-size: 12.5px; border-color: #c9d3ea; }
#board-problem p { margin: 0; font-size: 15.5px; line-height: 1.8; color: #263048; white-space: pre-wrap; }
#board-problem p.hidden { display: none; }
@media (prefers-color-scheme: dark) { #board-problem { background: linear-gradient(180deg, #1c2233, #171c29); border-color: #34405c; } #board-problem p { color: #e6ebf7; } }
#board-practice { flex: none; margin: 10px 0 6px; border-radius: 16px; padding: 12px 16px 14px;
  background: linear-gradient(180deg, #fffdf4, #fff8e6); border: 1.5px solid #f0dfae;
  box-shadow: 0 6px 22px rgba(120, 90, 20, .10); }
#board-practice .bp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
#board-practice .bp-head .pane-tag { position: static; background: #fbeec6; color: #8a6a12; }
#board-practice #bp-close { margin-left: auto; padding: 2px 10px; font-size: 12.5px; border-color: #ecdcb0; }
#board-practice p { margin: 0; font-size: 16.5px; line-height: 1.85; color: #2a2a24; font-weight: 600;
  white-space: pre-wrap; }
@media (prefers-color-scheme: dark) {
  #board-practice { background: linear-gradient(180deg, #2a2418, #1f1b12); border-color: #5c4a22; }
  #board-practice p { color: #f3ead6; }
}
#board-figure { position: relative; margin: 10px 0 6px; border-radius: 20px; overflow: hidden;
  background: #0f1216; border: 1px solid var(--line);
  aspect-ratio: 16 / 9; max-height: 34vh; width: 100%;
  flex: none;                 /* 板书面板是 flex 列，不锁住的话 aspect-ratio 会被压成 2px 高 */
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s ease; }
#board-figure.faded { opacity: .38; }          /* 讲完这条就淡下去，不长期霸屏 */
#board-figure img { width: 100%; height: 100%; object-fit: contain; display: block; }
#board-figure svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#board-figure figcaption { position: absolute; left: 10px; bottom: 8px; font-size: 11.5px;
  background: rgba(23,24,28,.62); color: #fff; border-radius: 99px; padding: 3px 10px; letter-spacing: .02em; }
/* 两个画面各自的身份标签：一眼看出哪个是实时、哪个是拍下来的题 */
.pane-tag { position: absolute; left: 12px; top: 10px; z-index: 3;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  background: rgba(15,18,22,.66); color: #fff; border-radius: 99px;
  padding: 4px 11px; backdrop-filter: blur(6px); pointer-events: none; }
.pane-tag.live::before { content: ''; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: #ff5a5a; margin-right: 6px; vertical-align: 1px;
  animation: livedot 1.4s ease-in-out infinite; }
@keyframes livedot { 0%,100% { opacity: 1 } 50% { opacity: .25 } }
#board-figure.faded figcaption { opacity: 0; }

/* ── 批改结果卡（John 8/16：字要大、看得清第几题错了；不做图上标注） ── */
.grade-card {
  max-width: 92% !important;
  background: linear-gradient(180deg, #fffdf7, #fff9ec) !important;
  border: 1px solid #f0dfae !important;
  border-radius: 16px !important;
  padding: 16px 18px !important;
  box-shadow: 0 6px 20px rgba(180, 140, 40, .10);
}
.grade-card .g-head {
  font-size: 21px; font-weight: 800; letter-spacing: .5px; color: #8a5a10;
  line-height: 1.45;
}
.grade-card .g-head b { font-size: 25px; color: #b8791a; }
.grade-card .g-head.g-ok { color: #1f7a4d; }
.grade-card .g-sub { font-size: 14.5px; color: #8b7a55; margin-top: 4px; line-height: 1.6; }
/* 四分类小片（批改 v2）：对/要改/没做/没看清 分开说，家长一眼扫清全貌 */
.grade-card .g-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.grade-card .g-chip { font-size: 14.5px; font-weight: 700; padding: 4px 12px; border-radius: 99px; background: #fff; border: 1.5px solid #e3d9c2; color: #6b5d40; }
.grade-card .g-c-ok { color: #1f7a4d; border-color: #b5dcc5; }
.grade-card .g-c-wrong { color: #c0392b; border-color: #f0b6ae; }
.grade-card .g-c-unclear { color: #8a6d1f; border-color: #e6d194; }
/* 订正完成庆祝（8/29）：一排 emoji 依次蹦起——错了能自己改对，值得一场小烟花 */
.grade-card .g-party { display: flex; gap: 10px; justify-content: center; font-size: 30px; margin: 4px 0 8px; }
.grade-card .g-party span { display: inline-block; animation: g-pop .9s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes g-pop { 0% { transform: translateY(18px) scale(.3); opacity: 0; }
  60% { transform: translateY(-8px) scale(1.15); opacity: 1; } 100% { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .grade-card .g-party span { animation: none; } }
.grade-card .g-recheck { display: block; margin-top: 12px; font-weight: 700; color: #1f7a4d;
  border-color: #b5dcc5; background: #f2faf5; }
/* 结果卡 v3（8/29 John：要细节）：原图缩略 + 逐题一行 */
.grade-card .g-photo { display: block; max-width: 100%; max-height: 200px; border-radius: 12px;
  border: 1px solid #e8dfc8; margin: 10px 0 4px; cursor: zoom-in; object-fit: contain; }
.grade-card .g-rows { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.grade-card .g-row { display: flex; gap: 8px; align-items: baseline; background: #fff;
  border: 1px solid #eee4cc; border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.grade-card .g-row .g-vic { flex: none; }
.grade-card .g-row .g-rno { flex: none; font-weight: 800; }
.grade-card .g-row .g-rbody { flex: 1; min-width: 0; }
.grade-card .g-row .g-rexpr { color: #6b5d40; margin-right: 8px; }
.grade-card .g-row .g-rmine { color: #8b7a55; }
.grade-card .g-row .g-rv { flex: none; font-size: 12.5px; color: #8b7a55; white-space: nowrap; }
.grade-card .g-row.g-v-wrong { border-color: #f0b6ae; }
.grade-card .g-row.g-v-wrong .g-rv { color: #c0392b; font-weight: 700; }
.grade-card .g-row.g-v-right .g-rv { color: #1f7a4d; }
.grade-card .g-row.g-v-unclear { border-style: dashed; }
.grade-card .g-row .g-help { margin-top: 6px; }
/* 环球英语·大冒险 沉浸场景（8/29 John：要短视频感、角色互动、沉浸式） */
#sp-scene { position: fixed; inset: 0; z-index: 110; background: #000; }
#sp-scene.hidden { display: none; }
.sps-bg { position: absolute; inset: 0; overflow: hidden; }
.sps-bg img { width: 100%; height: 100%; object-fit: cover;
  animation: sps-kenburns 22s ease-in-out infinite alternate; }
@keyframes sps-kenburns { 0% { transform: scale(1.14) translate(2%, 1%); } 100% { transform: scale(1.02) translate(-1%, -1%); } }
#sp-scene.talking .sps-bg img { animation-play-state: paused; transform: scale(1.1) translate(3%, 2%); transition: transform 1.6s ease; }
.sps-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.45) 100%),
    linear-gradient(180deg, rgba(0,0,0,.35), transparent 18%, transparent 78%, rgba(0,0,0,.5)); }
.sps-stamp { position: absolute; left: 50%; top: 38%; transform: translate(-50%,-50%) rotate(-4deg);
  font-size: clamp(34px, 7vw, 64px); font-weight: 900; letter-spacing: .12em; color: #fff;
  text-shadow: 0 6px 30px rgba(0,0,0,.7); border: 4px solid rgba(255,255,255,.9); border-radius: 14px;
  padding: 10px 26px; opacity: 0; animation: sps-stamp 2.6s ease forwards; pointer-events: none; }
@keyframes sps-stamp { 0% { opacity: 0; transform: translate(-50%,-50%) rotate(-4deg) scale(1.6); }
  18% { opacity: 1; transform: translate(-50%,-50%) rotate(-4deg) scale(1); }
  75% { opacity: 1; } 100% { opacity: 0; } }
.sps-hud { position: absolute; left: 14px; top: 14px; display: flex; flex-direction: column; gap: 7px; max-width: min(46vw, 340px); }
.sps-goal { background: rgba(12,16,24,.72); backdrop-filter: blur(6px); color: #fff; border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px; padding: 7px 12px; font-size: 13.5px; display: flex; gap: 8px; align-items: baseline;
  transition: transform .3s, border-color .3s; }
.sps-goal.hit { border-color: #6fdb9a; color: #c9f5d9; }
.sps-goal.hit .sps-tick { animation: sps-pop .5s cubic-bezier(.2,1.8,.4,1); }
.sps-dots { margin-left: auto; font-size: 10px; letter-spacing: 2px; color: #ffc24b; flex: none; padding-left: 8px; }
@keyframes sps-pop { 0% { transform: scale(.3); } 100% { transform: scale(1); } }
.sps-side { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 8px; }
.sps-side button { background: rgba(12,16,24,.72); backdrop-filter: blur(6px); color: #fff;
  border: 1px solid rgba(255,255,255,.22); border-radius: 99px; padding: 9px 16px; font-size: 13.5px; cursor: pointer; }
.sps-side button:hover { border-color: #ffc24b; }
.sps-hint { position: absolute; left: 50%; bottom: 108px; transform: translateX(-50%);
  background: rgba(255, 194, 75, .94); color: #4a3319; border-radius: 99px; padding: 8px 20px;
  font-size: 15.5px; box-shadow: 0 8px 30px rgba(0,0,0,.4); max-width: 86vw; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; animation: sps-hintin .5s ease; }
.sps-hint b { font-weight: 800; }
.sps-hint.hidden { display: none; }
@keyframes sps-hintin { 0% { opacity: 0; transform: translate(-50%, 8px); } 100% { opacity: 1; transform: translate(-50%, 0); } }
.sps-sub { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; gap: 12px; align-items: center; max-width: min(88vw, 720px);
  background: rgba(12,16,24,.78); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px; padding: 10px 18px 10px 10px; color: #fff; }
.sps-sub.hidden { display: none; }
.sps-sub img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2.5px solid rgba(255,255,255,.7); }
#sp-scene.talking .sps-sub img { border-color: #ffc24b; animation: sps-talk 1s ease-in-out infinite; }
@keyframes sps-talk { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.sps-sub b { font-size: 12.5px; color: #ffc24b; letter-spacing: .06em; }
#sps-sub-text { font-size: 16.5px; line-height: 1.55; }
/* 菜单改为右侧滑入的道具卡（8/29 三测：菜单要"飞出来"让孩子点；不再全屏压黑，场景照常演） */
.sps-modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end;
  padding-right: 20px; background: transparent; pointer-events: none; }
.sps-modal .sps-menucard { pointer-events: auto; }
.sps-modal.hidden { display: none; }
.sps-modal.fly .sps-menucard { animation: sps-flyin .65s cubic-bezier(.2,1.3,.35,1); }
@keyframes sps-flyin { 0% { transform: translateX(120%) rotate(8deg); opacity: 0; }
  100% { transform: rotate(-1.5deg); opacity: 1; } }
.sps-menuitem { cursor: pointer; transition: background .2s; }
.sps-menuitem:hover { background: rgba(179,64,42,.08); }
.sps-menuitem.said { animation: sps-said .5s ease; }
@keyframes sps-said { 0% { background: #ffe9b8; transform: scale(1.03); } 100% { background: transparent; } }
.sps-menucard { background: #fdf7e8; border-radius: 18px; padding: 22px 30px; width: min(84vw, 360px);
  box-shadow: 0 30px 80px rgba(0,0,0,.5); border: 1px solid #e8d9b0;
  transform: rotate(-1.5deg); font-family: Georgia, 'Songti SC', serif; }
.sps-menuhead { text-align: center; font-weight: 900; letter-spacing: .22em; color: #b3402a; font-size: 14px; }
.sps-menutitle { text-align: center; font-size: 30px; font-weight: 900; color: #4a3319; margin: 2px 0 12px;
  border-bottom: 2px dashed #d8c48e; padding-bottom: 8px; }
.sps-menuitem { display: flex; justify-content: space-between; font-size: 16.5px; color: #4a3319; padding: 6px 0;
  border-bottom: 1px dotted #e0d2a8; }
.sps-menuitem i { flex: 1; border-bottom: 1px dotted #c9b07f; margin: 0 8px; }
#sps-menu-close { display: block; margin: 14px auto 0; border: 0; background: #b3402a; color: #fff;
  border-radius: 99px; padding: 8px 22px; cursor: pointer; }
.sps-done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(4,8,14,.72); backdrop-filter: blur(6px); }
.sps-done.hidden { display: none; }
.sps-donecard { background: #fffdf4; border-radius: 20px; padding: 26px 30px; width: min(88vw, 420px);
  text-align: center; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
@media (prefers-reduced-motion: reduce) { .sps-bg img, .sps-sub img, .sps-stamp { animation: none !important; opacity: 1; } }

/* 环球英语·大冒险 任务卡（M0）：菜单道具 + 任务打勾 + 目标句型 */
.sp-menu { background: #fffdf6; border: 1.5px dashed #d9a441; border-radius: 12px; padding: 10px 14px;
  margin: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 14px; }
.sp-menu b { letter-spacing: .18em; color: #b8791a; margin-right: 4px; }
.sp-menu-item { background: #fff; border: 1px solid #eee0bd; border-radius: 8px; padding: 3px 10px; }
.sp-goals { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.sp-goal { background: #fff; border: 1px solid #eee4cc; border-radius: 12px; padding: 8px 12px;
  font-size: 14.5px; display: flex; gap: 8px; align-items: baseline; }
.sp-goal.hit { border-color: #b5dcc5; background: #f2faf5; }
.sp-tick { flex: none; }
.sp-phrase { background: #eaf1ff; color: #285fe8; border-radius: 8px; padding: 2px 8px; font-size: 13px; }
.sp-know { background: #f6f9ff; border-radius: 12px; padding: 10px 14px; margin-top: 10px; font-size: 13.5px; line-height: 1.7; }
/* 批改等待卡的活气（8/29）：小人蹦跳 + 流动光条 + 秒表——正在干活，不是卡死 */
.grade-card .g-worker { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px;
  font-size: 14.5px; color: #6b5d40; }
.grade-card .g-guy { font-size: 22px; display: inline-block; animation: g-hop 1s ease-in-out infinite; }
@keyframes g-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px) rotate(-6deg); } }
.grade-card .g-clock { margin-left: auto; font-variant-numeric: tabular-nums; color: #8b7a55; font-size: 13px; }
.grade-card .g-bar { height: 8px; border-radius: 99px; background: #f0e8d2; overflow: hidden; margin-bottom: 10px; }
.grade-card .g-bar i { display: block; height: 100%; width: 40%; border-radius: 99px;
  background: linear-gradient(90deg, #f4c04a, #e79b2e, #f4c04a); animation: g-slide 1.6s ease-in-out infinite; }
@keyframes g-slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .grade-card .g-guy, .grade-card .g-bar i { animation: none; }
}
/* 错题号：一眼扫到是哪几题 */
.grade-card .g-nums { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.grade-card .g-no {
  font-size: 19px; font-weight: 800; letter-spacing: .5px;
  background: #fff; color: #c0392b; border: 2px solid #f0b6ae;
  border-radius: 12px; padding: 5px 14px;
}
.grade-card .g-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.grade-card .g-item {
  background: #fff; border: 1px solid #f2e6c9; border-radius: 12px; padding: 10px 13px;
  font-size: 16px; line-height: 1.7;
}
.grade-card .g-item b { font-size: 17px; color: #c0392b; margin-right: 10px; }
.grade-card .g-expr {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 17px; color: #2c3e50; background: #f6f8fa;
  border-radius: 7px; padding: 2px 9px; margin-right: 10px;
}
.grade-card .g-mine { font-size: 15.5px; color: #7f8c8d; }
.grade-card .g-why { font-size: 15.5px; color: #8a5a10; margin-top: 5px; }
@media (max-width: 760px) {
  .grade-card .g-head { font-size: 19px; }
  .grade-card .g-no { font-size: 17px; }
  .grade-card .g-item { font-size: 15px; }
}

/* ── 「怎么跟小问号说话」速查卡 ── */
.howto-hint {
  background: #eef4ff !important; border: 1px solid #cddcff !important;
  font-size: 14.5px; line-height: 1.75; max-width: 92% !important;
}
.howto-hint b { color: #2f6bff; }
.howto-hint button {
  border: none; background: none; cursor: pointer; font-size: 13.5px;
  padding: 2px 6px; border-radius: 8px;
}
.howto-hint .ht-more { color: #2f6bff; font-weight: 700; }
.howto-hint .ht-more:hover { background: #dfe9ff; }
.howto-hint .ht-never { color: #93a1b5; }

#howto-modal { position: fixed; inset: 0; z-index: 60; display: flex;
  align-items: center; justify-content: center; }
#howto-modal.hidden { display: none; }
#howto-modal .ht-mask { position: absolute; inset: 0; background: rgba(20,28,45,.42); backdrop-filter: blur(3px); }
#howto-modal .ht-panel {
  position: relative; background: #fff; border-radius: 20px; padding: 22px 24px;
  width: min(720px, 92vw); max-height: 86vh; overflow-y: auto;
  box-shadow: 0 24px 70px rgba(20,30,60,.28);
}
#howto-modal .ht-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
#howto-modal .ht-head b { font-size: 20px; letter-spacing: .4px; }
#howto-modal .ht-sub { font-size: 14px; color: #7b8794; margin-top: 5px; line-height: 1.6; }
#howto-modal .ht-close { border: none; background: #f2f4f8; width: 30px; height: 30px;
  border-radius: 10px; cursor: pointer; font-size: 14px; color: #6b7684; }
#howto-modal .ht-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: 12px; margin-top: 16px; }
#howto-modal .ht-card { background: #fafbfd; border: 1px solid #e8edf4; border-radius: 14px; padding: 14px 16px; }
#howto-modal .ht-t { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
#howto-modal .ht-icon { margin-right: 7px; }
#howto-modal .ht-l { font-size: 14.5px; color: #48525f; line-height: 1.85; }
#howto-modal .ht-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
#howto-modal .ht-key {
  border: 1px solid #cddcff; background: #f4f8ff; color: #2f6bff;
  border-radius: 99px; padding: 4px 12px; font-size: 13.5px; cursor: pointer;
}
#howto-modal .ht-key:hover { background: #e4edff; }
#howto-modal .ht-foot { font-size: 13.5px; color: #93a1b5; margin-top: 14px; line-height: 1.7; }

/* ── 板书就绪后题图卡缩成小条（点击可展开）：把第一屏还给讲解内容 ──
   8/18 真人测试：窄窗口下题图卡(34vh)独占板书面板第一屏，"就绪"了孩子也看不到板书 */
#board-figure.mini { aspect-ratio: auto; height: 112px; max-height: 18vh; min-height: 64px; cursor: pointer; opacity: .92; }
#board-figure.mini img { object-fit: contain; object-position: center; }
#board-figure.mini figcaption { display: none; }

/* ── 概念卡精装（John 8/19：更炫更高级的渲染）── */
#board-knowledge { animation: kn-rise .45s cubic-bezier(.2,.8,.25,1); }
@keyframes kn-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.kn-card { border-radius: 16px; background: linear-gradient(180deg, #fbfcff, #f3f7ff);
  border: 1px solid #e2e9fb; box-shadow: 0 10px 30px rgba(47,107,255,.08); padding: 14px 16px; }
.kn-head .kn-tag { background: linear-gradient(90deg, #335cff, #7c5cff); color: #fff;
  border-radius: 99px; padding: 3px 12px; box-shadow: 0 3px 10px rgba(83,92,255,.28); }
.kn-line b { color: #335cff; }
.kn-links a { display: inline-block; background: #eef3ff; border: 1px solid #d7e2ff; color: #335cff;
  border-radius: 99px; padding: 5px 14px; margin: 6px 6px 0 0; text-decoration: none;
  font-size: 12.5px; transition: background .15s, color .15s, transform .15s; }
.kn-links a:hover { background: #335cff; color: #fff; transform: translateY(-1px); }

/* ── 上课布局模式（John 8/19：课件区最重要）：实时画面缩成小条，课件占大屏 ── */
body.lesson-mode #stage { height: 96px !important; min-height: 96px !important; }
body.lesson-mode #lesson-frame { height: min(66vh, 720px); }
body.lesson-mode #board-figure { display: none; }
body.lesson-mode #jxgbox { display: none; }

/* 概念课结束入口 + 概念星星庆祝（John 8/19 结课体验） */
#lesson-exit-btn { display: none; }
body.lesson-mode #lesson-exit-btn { display: inline-block; margin: 0 0 8px; padding: 5px 16px; font-size: 13px; opacity: .82; }
#lesson-exit-btn:hover { opacity: 1; }
.star-celebrate { background: linear-gradient(120deg, #fff8e1, #fdf3d0); border: 1px solid #e8c34a; border-radius: 14px; padding: 12px 16px; }
.star-celebrate a { font-weight: 700; color: #b8860b; }
.star-pop { display: inline-block; font-size: 26px; animation: starPop 1s ease-out; }
@keyframes starPop {
  0% { transform: scale(0) rotate(-60deg); }
  55% { transform: scale(1.7) rotate(12deg); }
  75% { transform: scale(.9); }
  100% { transform: scale(1); }
}

/* ── 转化弹窗（John 8/19：扎心对比线下辅导 + 释放家长精力，强推订阅）── */
.pw-mask { position: fixed; inset: 0; background: rgba(12,16,32,.55); backdrop-filter: blur(6px);
  z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px; animation: pwFade .3s ease; }
@keyframes pwFade { from { opacity: 0; } }
.pw { position: relative; width: min(430px, 94vw); max-height: 92vh; overflow-y: auto; background: #fff;
  border-radius: 26px; padding: 0 22px 20px; box-shadow: 0 30px 80px rgba(20,30,80,.4); animation: pwUp .38s cubic-bezier(.2,.9,.3,1.15); }
@keyframes pwUp { from { opacity: 0; transform: translateY(26px) scale(.96); } }
.pw-close { position: absolute; top: 14px; right: 14px; border: none; background: rgba(255,255,255,.25);
  color: #fff; width: 30px; height: 30px; border-radius: 99px; cursor: pointer; font-size: 14px; z-index: 2; }
.pw-head { margin: 0 -22px 16px; padding: 26px 24px 20px; border-radius: 26px 26px 0 0; text-align: center; color: #fff;
  background: linear-gradient(125deg, #335cff, #7c5cff 55%, #b06ab3); }
.pw-spark { font-size: 40px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.25)); animation: pwPulse 2s ease infinite; }
@keyframes pwPulse { 50% { transform: scale(1.12); } }
.pw-head h2 { margin: 6px 0 4px; font-size: 22px; }
.pw-head p { font-size: 14px; opacity: .92; letter-spacing: .06em; }
.pw-compare { display: flex; align-items: stretch; gap: 8px; }
.pw-col { flex: 1; border-radius: 16px; padding: 14px 12px; text-align: center; }
.pw-off { background: #f5f5f7; color: #6b7280; }
.pw-on { background: linear-gradient(160deg, #eef2ff, #f4edff); border: 1.5px solid #c7d2fe; color: #1f2455; }
.pw-tag { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; border-radius: 99px; padding: 3px 10px; margin-bottom: 8px; }
.pw-off .pw-tag { background: #e5e7eb; }
.pw-on .pw-tag { background: #335cff; color: #fff; }
.pw-col b { display: block; font-size: 30px; line-height: 1.1; }
.pw-off b { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: #ef4444aa; }
.pw-col b i { font-style: normal; font-size: 12px; font-weight: 600; }
.pw-col ul { list-style: none; margin: 10px 0 0; padding: 0; font-size: 12.5px; line-height: 2; }
.pw-vs { align-self: center; font-weight: 900; font-size: 13px; color: #9ca3af; }
.pw-relief { margin: 14px 0 16px; background: #fffaf0; border: 1px solid #fde9c8; border-radius: 16px; padding: 13px 16px; }
/* 成果条 + 尝鲜价（2026-08-29）：先摆这家人自己做成的事，再谈钱 */
.pw-facts { background: #f4faf6; border: 1px solid #d9ecdf; border-radius: 14px;
  padding: 12px 16px; margin: 0 0 14px; }
.pw-facts b { display: block; font-size: 14px; margin-bottom: 6px; color: #1d4d3b; }
.pw-facts ul { margin: 0; padding-left: 18px; }
.pw-facts li { font-size: 13.5px; line-height: 1.9; color: #3d6353; }
.pw-facts li b { display: inline; font-size: 15px; color: #d9782d; margin: 0; }
.pw-cta s { opacity: .62; font-weight: 500; text-decoration-thickness: 1.5px; margin-right: 3px; }
/* CTA 改竖排：塞进原价和说明之后，单行 flex 会把标题挤到折行（实测截图）。
   主行一行放完，说明另起一行。*/
.pw-cta { flex-direction: column; gap: 3px !important; }
.pw-main { display: block; white-space: nowrap; }
.pw-year em, .pw-month em { font-style: normal; }
.pw-month em { font-size: 12px; color: #8a8a8a; font-weight: 500; }
.pw-note { font-size: 12.5px; line-height: 1.7; color: #8a8a8a; text-align: center; margin: 10px 0 2px; }

.pw-relief b { font-size: 14.5px; }
.pw-relief p { margin: 5px 0 0; font-size: 13px; line-height: 1.8; color: #7c6f57; }
.pw-cta { display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 16px;
  padding: 14px; font-size: 16.5px; font-weight: 800; text-decoration: none; margin-bottom: 10px; }
.pw-year { background: linear-gradient(90deg, #335cff, #7c5cff); color: #fff; box-shadow: 0 10px 26px rgba(83,92,255,.35); }
.pw-year em { font-style: normal; font-size: 11.5px; background: #ffd76a; color: #6b4d00; border-radius: 99px; padding: 3px 10px; }
.pw-month { border: 1.5px solid var(--line, #e5e7eb); color: var(--ink, #16181c); background: #fff; font-size: 14.5px; padding: 11px; }
.pw-later { display: block; margin: 2px auto 0; border: none; background: none; color: #9ca3af; font-size: 12.5px; cursor: pointer; text-decoration: underline; }

/* 文字模式下的语音输入：点一下说话、再点一下转文字（孩子不用打字） */
#btn-mic { flex: none; white-space: nowrap; }
#btn-mic.rec { background: #ffe9e6; border-color: #f0b3aa; color: #c2352a; animation: mic-pulse 1.1s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 6px rgba(224,82,77,.16); } }

/* ══ 板书区舞台状态机的视觉规则（John 8/20）══
   知识帖占场时收起空画布，让它【整张露出来】而不是只露个头；
   让位时先滑走再隐藏，不硬闪。 */
#board-panel.stage-concept #jxgbox,
#board-panel.stage-concept #board-caption,
#board-panel.stage-concept #board-facts { display: none; }
#board-panel.stage-concept #board-knowledge { margin-top: 4px; }
#board-knowledge { transition: opacity .3s ease, transform .3s ease; }
#board-knowledge.kn-out { opacity: 0; transform: translateY(14px) scale(.985); pointer-events: none; }
/* 视频占场：板书内容让出主视觉（视频层本就绝对定位覆盖，这里避免底下内容抢滚动） */
#board-panel.stage-video { overflow: hidden; }
/* 概念课占场：课件是主角，板书/知识帖的残留内容一律不显示 */
#board-panel.stage-lesson #jxgbox,
#board-panel.stage-lesson #board-notes,
#board-panel.stage-lesson #board-facts,
#board-panel.stage-lesson #board-caption,
#board-panel.stage-lesson #board-figure { display: none; }
/* 知识帖占场时：卡片吃满板书区并【自己滚动】——面板矮的时候也从顶部完整展开，
   而不是被挤在底下只露一条边（John 8/20 反馈的"只露个头"） */
#board-panel.stage-concept { overflow: hidden; }
#board-panel.stage-concept #board-knowledge {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 8px 14px 12px;
}

/* ── 听写台：听写时它接管板书区。设计约束只有一条——
   屏幕上不能出现任何目标词，所以这里没有任何内容区，只有进度、序号和动作。 */
#dict-stage, #dict-result { padding: 14px 16px 18px; }
.dict-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.dict-title { font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.dict-dots { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.dict-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: color-mix(in srgb, currentColor 14%, transparent);
  transition: transform .18s ease, background .18s ease;
}
.dict-dot.done { background: color-mix(in srgb, currentColor 42%, transparent); }
.dict-dot.now { background: #2f6bff; transform: scale(1.45); }
.dict-dot.skip { background: color-mix(in srgb, #f0a020 70%, transparent); }
.dict-counter { font-size: 24px; font-weight: 700; letter-spacing: .01em; margin-bottom: 12px; }
.dict-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dict-done { margin-top: 10px; width: 100%; padding: 12px; font-size: 16px; }
.dict-tip { margin-top: 12px; font-size: 12.5px; opacity: .6; line-height: 1.6; }
.dict-speaking .dict-counter { animation: dictPulse 1.1s ease-in-out infinite; }
@keyframes dictPulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }

/* 结果卡：错的词到这一刻才第一次上屏 */
/* 听写批改：原图 + 在字上画圈。圈是【提示去核对】不是【判你错】——
   模型的框不会很准，所以用柔和的琥珀色描边而不是刺眼的红叉。 */
.dsheet { position: relative; line-height: 0; border-radius: 12px; overflow: hidden; background: #000; }
.dsheet img { width: 100%; height: auto; display: block; }
.dmark {
  position: absolute; border: 3px solid rgba(245, 158, 11, .95); border-radius: 10px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .55), 0 2px 10px rgba(0, 0, 0, .3);
  pointer-events: none;
}
.dsheet-note { margin: 10px 2px 0; font-size: 14px; color: var(--muted, #667); }
/* 改判会连答案一起显示，所以默认收起——展开就等于把答案摊在屏幕上 */
.dict-fix { margin: 14px 0 4px; }
.dict-fix > summary { cursor: pointer; font-size: 14px; color: var(--muted, #667); }
.dict-fixlist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dict-fixlist .dc-fix { font-size: 14px; }

.dict-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-bottom: 16px; }
.dict-card {
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  border-radius: 12px; padding: 12px 10px; text-align: center;
}
.dict-card.wrong { border-color: color-mix(in srgb, #e5484d 45%, transparent); background: color-mix(in srgb, #e5484d 6%, transparent); }
.dict-card.unsure { border-style: dashed; }
.dict-card .dc-word { font-size: 21px; font-weight: 700; letter-spacing: .04em; }
.dict-card .dc-written { font-size: 12.5px; opacity: .65; margin-top: 5px; min-height: 1.2em; }
.dict-card .dc-fix { margin-top: 9px; font-size: 12px; padding: 4px 9px; }
.dict-card.fixed { opacity: .5; }

/* 听写接管板书区：板书自己的操作条一并收起——那一排按钮此刻一个都用不上，
   而且「给我看一步」在听写状态下会让孩子误以为能看到词。 */
#board-panel.stage-dictation .board-head { display: none; }
#board-panel.stage-dictation { overflow-y: auto; }
#board-panel.stage-dictation #dict-stage,
#board-panel.stage-dictation #dict-result { padding-top: 14px; }
/* 「我写完了」是这块屏幕上唯一重要的动作：面板再矮也必须够得着，钉在底部。 */
#board-panel.stage-dictation .dict-done {
  position: sticky; bottom: 0; z-index: 2;
  box-shadow: 0 -10px 16px -10px rgba(0,0,0,.25);
}
#board-panel.stage-dictation .dict-tip { padding-bottom: 2px; }

/* ── 小手拉小手：转介绍活动卡。产品主色是蓝，这张卡故意用暖色——它是一份礼物，不是一个功能。 */
#ref-modal {
  position: fixed; inset: 0; z-index: 240;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 16, 28, .55); backdrop-filter: blur(6px);
  animation: refFade .3s ease;
}
#ref-modal.hidden { display: none; }
@keyframes refFade { from { opacity: 0 } to { opacity: 1 } }
.ref-card {
  position: relative; width: min(440px, calc(100vw - 36px));
  border-radius: 22px; padding: 26px 24px 20px;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 190, 120, .35), transparent 55%),
    linear-gradient(160deg, #fff8f0 0%, #fdf3ff 55%, #f0f6ff 100%);
  color: #1f2230;
  box-shadow: 0 24px 70px -18px rgba(80, 40, 120, .45);
  animation: refPop .42s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes refPop { from { transform: translateY(26px) scale(.94); opacity: 0 } to { transform: none; opacity: 1 } }
.ref-x {
  position: absolute; top: 12px; right: 12px;
  border: 0; background: rgba(0,0,0,.06); color: #6b6b78;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px;
}
.ref-hero { text-align: center; }
.ref-hands-svg { width: 168px; height: 76px; }
.ref-hand-l { animation: refHandL 1.6s ease-in-out infinite alternate; transform-origin: 20px 60px; }
.ref-hand-r { animation: refHandR 1.6s ease-in-out infinite alternate; transform-origin: 180px 60px; }
@keyframes refHandL { from { transform: rotate(-2deg) } to { transform: rotate(1.5deg) } }
@keyframes refHandR { from { transform: rotate(2deg) } to { transform: rotate(-1.5deg) } }
.ref-sparks { animation: refTwinkle 1.8s ease-in-out infinite; }
@keyframes refTwinkle { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.ref-hero h2 {
  margin: 6px 0 4px; font-size: 26px; letter-spacing: .12em;
  background: linear-gradient(90deg, #ff7e5f, #a55eea 55%, #2f6bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ref-sub { margin: 0 0 16px; font-size: 14px; line-height: 1.7; color: #4a4a5a; }
.ref-sub b { color: #e8590c; }
.ref-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.ref-tier {
  position: relative; text-align: center; padding: 13px 6px 11px;
  background: rgba(255, 255, 255, .75); border: 1px solid rgba(160, 120, 200, .18);
  border-radius: 14px;
}
.ref-tier i { font-style: normal; font-size: 22px; display: block; }
.ref-tier b { display: block; font-size: 17px; margin: 3px 0 2px; color: #6c3fc5; }
.ref-tier span { font-size: 11.5px; line-height: 1.45; color: #6b6b78; display: block; }
.ref-tier small { opacity: .75; }
.ref-hot { border-color: #ffb46b; background: linear-gradient(180deg, #fff6e8, #fff); box-shadow: 0 4px 18px -6px rgba(255, 150, 60, .45); }
.ref-hot b { color: #e8590c; font-size: 18px; }
.ref-hot em {
  position: absolute; top: -9px; right: -6px; font-style: normal;
  background: linear-gradient(90deg, #ff7e5f, #ffb46b); color: #fff;
  font-size: 10.5px; padding: 2px 8px; border-radius: 999px; letter-spacing: .05em;
}
.ref-mystats {
  margin-bottom: 12px; padding: 9px 12px; border-radius: 11px;
  background: rgba(47, 107, 255, .07); font-size: 12.5px; color: #39415a; text-align: center;
}
.ref-actions { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ref-cta {
  width: 100%; border: 0; cursor: pointer; padding: 13px; border-radius: 13px;
  font-size: 15.5px; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, #ff7e5f, #ff9a44);
  box-shadow: 0 10px 24px -8px rgba(255, 126, 95, .55);
  transition: transform .15s ease;
}
.ref-cta:active { transform: scale(.97); }
.ref-link { font-size: 13px; color: #2f6bff; text-decoration: none; }
.ref-fine { margin: 12px 0 0; font-size: 11px; color: #9a97a5; text-align: center; line-height: 1.6; }
@media (max-width: 430px) { .ref-tiers { gap: 6px } .ref-tier b { font-size: 15px } }
.ref-notice {
  margin-bottom: 12px; padding: 10px 13px; border-radius: 12px; text-align: center;
  font-size: 13px; line-height: 1.65; color: #5a3a00;
  background: linear-gradient(180deg, #fff6e0, #fff2d2);
  border: 1px solid rgba(255, 180, 107, .55);
  box-shadow: 0 6px 18px -8px rgba(255, 150, 60, .4);
}
.ref-notice b { color: #e8590c; }
.ref-nomore {
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
  font-size: 12px; color: #9a97a5; cursor: pointer; user-select: none;
}
.ref-nomore input { accent-color: #6c3fc5; cursor: pointer; }
.ref-preview-tag {
  margin: -8px -6px 10px; text-align: center; font-size: 11.5px; letter-spacing: .04em;
  color: #8a5a00; background: repeating-linear-gradient(45deg, #fff3d6, #fff3d6 10px, #ffeabb 10px, #ffeabb 20px);
  border-radius: 8px; padding: 5px 8px;
}

/* 语音时长面板：和 token 额度分开展示，家长一眼看清还能讲多久 */
.voice-hero { font-size: 15px; }
.voice-hero b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.voice-bar { height: 8px; border-radius: 999px; margin-top: 10px;
  background: color-mix(in srgb, currentColor 10%, transparent); overflow: hidden; }
.voice-bar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #2f6bff, #7aa2ff); transition: width .4s ease; }
.voice-warn { margin: 10px 0 0; font-size: 13px; color: #b26a00; }

/* 听写历史档案入口：只给"哪一次、错几个"，不给词表——给了就成了照着念 */
.ds-history { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.ds-history:empty { display: none; }
.dsh-title { font-size: 13px; color: var(--muted, #667); margin-bottom: 2px; }
.dsh-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; width: 100%; }
.dsh-item .muted { font-size: 12px; font-weight: 400; }

/* 听写批改结果（8/23 重做）：先说清楚是哪几个字，图只是佐证。 */
.dwrong { background: #fff8ee; border: 1px solid #f3ddb8; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.dwrong-t { font-size: 14px; font-weight: 700; color: #8a5a12; margin-bottom: 10px; }
.dwrong-row { display: flex; flex-wrap: wrap; gap: 10px; }
.dwrong-w { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #eadfc9;
  border-radius: 12px; padding: 6px 8px 6px 14px; }
.dwrong-w > b { font-size: 26px; font-weight: 800; letter-spacing: 2px; color: #2b3038; line-height: 1.1; }
.dwrong-w .dc-fix { border: none; background: #f0f3f7; color: #5b6472; border-radius: 9px;
  padding: 5px 10px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.dwrong-w .dc-fix:hover { background: #e3e8ef; }
.dwrong-w.fixed { opacity: .55; }
.dwrong-w .dc-fix.fixed { background: #e8f5ec; color: #187a4b; }
.dwrong-note { margin: 10px 0 0; font-size: 13px; color: #96754a; }
/* 缩略图上的「看大图」——8/23 John：这么小压根看不见 */
.dsheet { position: relative; }
.dsheet-zoom { position: absolute; right: 10px; bottom: 10px; border: none; border-radius: 10px;
  background: rgba(17,24,39,.72); color: #fff; font-size: 13px; font-weight: 600;
  padding: 7px 12px; cursor: pointer; line-height: 1; }
.dsheet-zoom:hover { background: rgba(17,24,39,.9); }
/* 大图：全屏看一眼，叉掉或按 Esc 关 */
#dsheet-big { position: fixed; inset: 0; z-index: 80; background: rgba(12,18,15,.88);
  display: flex; align-items: center; justify-content: center; padding: 24px; }
#dsheet-big .dsb-inner { position: relative; max-width: min(1100px, 94vw); max-height: 92vh; }
#dsheet-big .dsheet { border-radius: 14px; overflow: hidden; max-height: 92vh; }
#dsheet-big img { max-height: 92vh; width: auto; max-width: 100%; display: block; }
#dsheet-big .dsb-close { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px;
  border: none; border-radius: 50%; background: #fff; color: #222; font-size: 18px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.35); }

/* ══════════════════════════════════════════════════════════════════
   工具栏（2026-08-24 重做）
   ══════════════════════════════════════════════════════════════════
   改之前：8 个等重的浮起药丸平铺一行，每个都带 --btn-3d 的重投影。
   三个问题：① 全是同一重量，看不出哪个是主动作 ② 阴影互相打架，视觉很吵
   ③ flex-wrap 换行后「语音辅导」被甩到第二行最右，读起来像掉出去的。

   现在：功能相近的按钮共用一条【内凹轨道】，一组读作一个物件（分组降噪，
   这是 Operate 型界面的第一优先级）；主动作单独加重；语音钉在最右。
   ------------------------------------------------------------------ */
.media-bar { gap: 10px; align-items: center; }

/* 内凹轨道：组内按钮不再各自投影，改由轨道统一承托 */
.tool-seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(233,238,247,.9), rgba(246,249,253,.75));
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: inset 0 2px 5px rgba(47,80,150,.10), 0 1px 0 rgba(255,255,255,.9);
}

.media-bar .tool {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--ink); background: transparent; border: 1px solid transparent;
  box-shadow: none;                         /* 轨道已经给了深度，按钮自己不再投影 */
  position: relative; white-space: nowrap;
  transition: background .16s ease, box-shadow .16s ease, transform .12s ease;
}
.media-bar .tool:hover {
  transform: none;                          /* 组内不做位移，否则轨道里会「跳」 */
  background: linear-gradient(180deg, #ffffff, #f3f6fb);
  box-shadow: 0 2px 6px rgba(47,80,150,.14), inset 0 1px 0 rgba(255,255,255,.95);
}
.media-bar .tool:active { transform: translateY(.5px); box-shadow: inset 0 2px 5px rgba(47,80,150,.16); }
.media-bar .tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 已激活（摄像头开着 / 画面已转正）：填充实心，一眼看出状态 */
.media-bar .tool.on {
  background: linear-gradient(180deg, #ffffff, #e8f0ff);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(47,107,255,.20), inset 0 0 0 1px rgba(47,107,255,.28);
}

/* 主动作「拍题」：不用满蓝填充——图标本身是彩色的，压在蓝底上会脏。
   改用淡蓝底 + 蓝字 + 更实的托举，既压得住又不跟图标抢色。 */
.media-bar .tool.key {
  background: linear-gradient(180deg, #eaf1ff, #d8e5ff);
  color: #1f4fd8;
  box-shadow: 0 3px 10px rgba(47,107,255,.22), inset 0 1px 0 rgba(255,255,255,.9), inset 0 0 0 1px rgba(47,107,255,.22);
}
.media-bar .tool.key:hover { background: linear-gradient(180deg, #f2f6ff, #cfe0ff); }
.media-bar .tool.key:disabled { opacity: .42; box-shadow: none; background: transparent; color: var(--ink-soft); }
.media-bar .tool:disabled { cursor: default; }
.media-bar .tool:disabled .ti { filter: grayscale(1); opacity: .55; }

/* 语音：另一种交互模态，脱离轨道单独站，用描边区分 */
.media-bar .tool.voice {
  padding: 8px 18px 8px 12px;
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  color: var(--accent); border: 1.5px solid rgba(47,107,255,.35);
  box-shadow: 0 6px 16px rgba(47,107,255,.18), inset 0 1px 0 rgba(255,255,255,.95);
}
.media-bar .tool.voice:hover { box-shadow: 0 8px 20px rgba(47,107,255,.26), inset 0 1px 0 #fff; transform: translateY(-1px); }
.media-bar .tool.voice.on {
  background: linear-gradient(180deg, #5f95ff, #2f6bff); color: #fff;
  border-color: rgba(255,255,255,.5);
  box-shadow: 0 10px 24px rgba(47,107,255,.42), inset 0 1.5px 0 rgba(255,255,255,.5);
}
/* 通话中把彩色图标压成白色，否则蓝底上读不清 */
.media-bar .tool.voice.on .ti { filter: brightness(0) invert(1); }

/* ── 图标：我们自己的软 3D 图标集，一张雪碧图 ──
   每格 96px（1x），显示 20px = 近 5 倍密度，缩到 18px 也不糊。 */
.ti {
  width: 20px; height: 20px; flex: none; display: inline-block;
  background-image: url('assets/ui-icons/sprite.webp');
  background-repeat: no-repeat;
  background-size: 160px 20px;              /* 8 格 × 20px */
  /* 生成的是软 3D 实体，给一点点自身投影让它「坐」在按钮上而不是浮着 */
  filter: drop-shadow(0 1px 1px rgba(47,80,150,.18));
}
.ti-camera    { background-position:    0 0; }
.ti-flip      { background-position: -20px 0; }
.ti-capture   { background-position: -40px 0; }
.ti-grade     { background-position: -60px 0; }
.ti-dictation { background-position: -80px 0; }
.ti-howto     { background-position: -100px 0; }
.ti-upload    { background-position: -120px 0; }
.ti-voice     { background-position: -140px 0; }

/* 待复习数字：原来写在文案里（「听写 · 10 个待复习」）把按钮撑得老长，
   改成角标——数字本身就是提醒，不需要一句话来解释它。 */
.tool-badge {
  min-width: 17px; height: 17px; padding: 0 5px; margin-left: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
  color: #fff; border-radius: 999px;
  background: linear-gradient(180deg, #ff8a5c, #f4622c);
  box-shadow: 0 2px 5px rgba(224,80,20,.38), inset 0 1px 0 rgba(255,255,255,.45);
}

/* ── 摄像头选择（原来是一个裸的原生 select，跟整套玻璃语言完全不搭）──
   现在：摄像头按钮右侧长出一个小箭头，点开是卡片式列表。
   原生 select 仍留在 DOM 里当数据源，选完写回它再派发 change，老逻辑一行不用改。 */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cam-pick-btn {
  padding: 7px 11px !important; margin-left: -6px;
  border-radius: 999px; background: transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.cam-pick-btn .tl { font-size: 13px; color: var(--ink-soft); }
.cam-pick-caret {
  width: 0; height: 0; display: block;
  border-left: 4.5px solid transparent; border-right: 4.5px solid transparent;
  border-top: 5.5px solid var(--ink-soft);
  transition: transform .18s ease;
}
.cam-pick-btn[aria-expanded="true"] .cam-pick-caret { transform: rotate(180deg); }

.cam-pop {
  position: absolute; z-index: 60; min-width: 268px; max-width: 340px;
  padding: 7px; border-radius: 20px;
  background: rgba(255,255,255,.86); backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 26px 60px rgba(23,32,60,.24), 0 3px 10px rgba(47,80,150,.12);
  animation: camPop .18s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes camPop { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.cam-pop-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-soft); padding: 7px 12px 8px;
}
.cam-opt {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: 14px; cursor: pointer;
  background: transparent; border: 1px solid transparent; box-shadow: none;
  font-size: 14.5px; font-weight: 600; color: var(--ink); text-align: left;
}
.cam-opt:hover { background: rgba(47,107,255,.09); transform: none; }
.cam-opt .ti { width: 26px; height: 26px; background-size: 208px 26px; }
.cam-opt .ti-camera { background-position: 0 0; }
.cam-opt-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cam-opt-tick { color: var(--accent); font-weight: 800; opacity: 0; flex: none; }
.cam-opt[aria-selected="true"] { background: rgba(47,107,255,.12); }
.cam-opt[aria-selected="true"] .cam-opt-tick { opacity: 1; }
.cam-opt-hint { font-size: 12px; color: var(--ink-soft); font-weight: 500; padding: 2px 12px 8px; }

/* 窄屏：轨道可以换行，但组内永远不拆开 */
@media (max-width: 900px) {
  .media-bar { gap: 8px; }
  .media-bar .tool { padding: 7px 12px 7px 9px; font-size: 14px; }
  .media-bar .tool .tl { font-size: 14px; }
}
@media (max-width: 560px) {
  .tool-seg { flex-wrap: nowrap; }
  .media-bar .tool.voice { padding: 8px 14px 8px 10px; }
}

/* 语音按钮贴右：不用 .spacer（flex:1 会在第一行吃光剩余空间，
   换行时反而把语音按钮甩到第二行左边——比重做前还难看）。
   margin-left:auto 在同一行和独占一行两种情况下都贴右。 */
.media-bar #voice-status { margin-left: auto; }
.media-bar #voice-status.hidden + .tool.voice { margin-left: auto; }
.media-bar .tool.voice { margin-left: auto; }
/* 语速滑块套进来之后（2026-09-07）：贴右的职责交给外层 .voice-stack，
   否则 margin-left:auto 贴的是这个小容器的右边、不是整条工具栏的右边，
   滑块和按钮就会左右错开（本地实测）。stretch 让两者同宽，读作一个物件。 */
.media-bar .voice-stack { margin-left: auto; }
.media-bar .voice-stack .tool.voice { margin-left: 0; }
.media-bar #voice-status.hidden + .voice-stack { margin-left: auto; }

/* 摄像头选择箭头：紧贴「摄像头」，和它共用一个轨道格 */
.media-bar .cam-pick-btn { margin-left: -8px; padding-left: 8px !important; padding-right: 10px !important; }
.media-bar .cam-pick-btn:hover { background: rgba(47,107,255,.10); box-shadow: none; }
/* 向上翻时，出场动画的方向也要跟着翻，否则看着像从错误的方向弹出来 */
.cam-pop-up { animation-name: camPopUp; transform-origin: bottom left; }
@keyframes camPopUp { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }


/* ── 框选浮层（2026-08-28 精确制导拍题）───────────────────────── */
#frame-select { position: fixed; inset: 0; z-index: 130; background: rgba(12,16,24,.92);
  display: flex; flex-direction: column; }
#frame-select.hidden { display: none; }
.fs-head, .fs-foot { display: flex; gap: 10px; align-items: center; padding: 12px 16px;
  background: rgba(20,26,36,.9); }
.fs-tip { color: #cfd6e2; font-size: 14px; }
.fs-head .ghost, .fs-foot .ghost { background: rgba(255,255,255,.12); color: #fff; border: 0;
  padding: 8px 16px; border-radius: 10px; }
.fs-foot .primary { background: var(--accent, #2F6BFF); color: #fff; border: 0;
  padding: 10px 22px; border-radius: 12px; font-size: 15px; }
.fs-foot .primary:disabled { opacity: .4; }
.fs-stage { flex: 1; overflow: hidden; position: relative; touch-action: none; cursor: crosshair; }
#fs-img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none;
  -webkit-user-drag: none; max-width: none; }
/* 框选教学动画（8/29）：金色虚线框循环"画"出来，手指沿对角线跟着划。
   pointer-events:none——用户在它上面直接开拖，第一下就进入真框选 */
#fs-coach { position: relative; flex: 0 0 auto; display: flex;
  align-items: center; justify-content: center; pointer-events: none;
  background: transparent; }
#fs-coach.hidden { display: none; }
.fsc-demo { display: block; position: absolute; z-index: 2; top: 55px; left: 50%; transform: translateX(-50%); width: 200px; height: 130px; }
.fsc-rect { position: absolute; left: 0; top: 0; border: 3px dashed #ffc24b; border-radius: 8px;
  box-shadow: 0 0 24px rgba(255, 194, 75, .35); transform-origin: top left;
  width: 200px; height: 130px; animation: fsc-draw 2.4s ease-in-out infinite; }
.fsc-hand { position: absolute; font-size: 34px; left: 0; top: 0;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); animation: fsc-hand 2.4s ease-in-out infinite; }
@keyframes fsc-draw { 0% { transform: scale(.12); opacity: 0; } 12% { opacity: 1; }
  70% { transform: scale(1); opacity: 1; } 88% { opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@keyframes fsc-hand { 0% { transform: translate(2px, 2px); opacity: 0; } 12% { opacity: 1; }
  70% { transform: translate(190px, 118px); opacity: 1; } 88% { opacity: 1; }
  100% { transform: translate(190px, 118px); opacity: 0; } }
.fsc-txt { color: #fff; font-size: 13px; font-weight: 500; text-align: center; line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0,0,0,.6); padding: 0 24px; }
@media (prefers-reduced-motion: reduce) { .fsc-rect, .fsc-hand { animation: none; } .fsc-rect { opacity: 1; } }

#fs-box { position: absolute; border: 2.5px solid #35d07f; background: transparent;
  box-shadow: none; pointer-events: none; }

/* 框题原图不叠色；说明在图外，窄屏工具栏换行。 */
.fs-foot { flex-wrap: wrap; }
#fs-resolution { color: #cfd6e2; font-size: 12px; }

/* ── 语速滑块（John 2026-09-07：家长反馈"娃觉得有点慢"，要一个能自己拖的）──────────
   钉在「语音辅导」正上方，和它读作一个物件：调的就是这位老师说话的快慢。
   配色一律走语音按钮那套蓝（--accent），不另发明颜色；轨道用已填充/未填充两段，
   一眼看得出当前偏慢还是偏快。 */
.voice-stack { display: inline-flex; flex-direction: column; align-items: stretch; gap: 6px; }
.vspeed {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 11px; border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #eef4ff);
  border: 1px solid rgba(47,107,255,.22);
  box-shadow: 0 3px 10px rgba(47,107,255,.10), inset 0 1px 0 rgba(255,255,255,.95);
}
.vspeed-cap { font-size: 11.5px; color: var(--accent); font-weight: 600; letter-spacing: .02em; white-space: nowrap; opacity: .85; }
.vspeed-val {
  font-size: 11.5px; color: var(--accent); font-weight: 700; white-space: nowrap;
  min-width: 2.6em; text-align: right; font-variant-numeric: tabular-nums;
}
.vspeed-range {
  -webkit-appearance: none; appearance: none; width: 96px; height: 18px;
  background: transparent; cursor: pointer; margin: 0;
}
/* 轨道：--fill 由 JS 写成百分比，左侧已填充、右侧留白 */
.vspeed-range::-webkit-slider-runnable-track {
  height: 5px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0 var(--fill,50%), rgba(47,107,255,.16) var(--fill,50%) 100%);
}
.vspeed-range::-moz-range-track { height: 5px; border-radius: 999px; background: rgba(47,107,255,.16); }
.vspeed-range::-moz-range-progress { height: 5px; border-radius: 999px; background: var(--accent); }
.vspeed-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; margin-top: -5px; border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #eaf1ff);
  border: 1.5px solid var(--accent);
  box-shadow: 0 2px 6px rgba(47,107,255,.34), inset 0 1px 0 #fff;
  transition: transform .12s ease, box-shadow .12s ease;
}
.vspeed-range::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--accent);
  background: linear-gradient(180deg, #ffffff, #eaf1ff); box-shadow: 0 2px 6px rgba(47,107,255,.34);
}
.vspeed-range:hover::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 3px 9px rgba(47,107,255,.42), inset 0 1px 0 #fff; }
.vspeed-range:active::-webkit-slider-thumb { transform: scale(1.04); }
.vspeed-range:focus-visible { outline: none; }
.vspeed-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(47,107,255,.28), 0 2px 6px rgba(47,107,255,.34); }
/* 通话中改了：轻轻提示要重连才生效（会话中改 TTSConfig 是禁区，见 server 注释） */
.vspeed.hint { animation: vspeed-hint 1.6s ease; }
@keyframes vspeed-hint { 0%,100% { border-color: rgba(47,107,255,.22); } 35% { border-color: var(--accent-soft); } }
@media (max-width: 520px) { .vspeed-range { width: 74px; } .vspeed-cap { display: none; } }
@media (prefers-reduced-motion: reduce) { .vspeed-range::-webkit-slider-thumb { transition: none; } .vspeed.hint { animation: none; } }
