/* 弧菌小课堂 —— 配色取自 TCBS 平板：蓝绿琼脂底、黄色（霍乱弧菌）与绿色（副溶血性弧菌）菌落 */
:root {
  --ink: #10323a;
  --ink-2: #3c5c63;
  --muted: #6f8c91;
  --line: rgba(16, 50, 58, .09);
  --line-2: rgba(16, 50, 58, .14);
  --bg: #eaf5f2;
  --card: #fff;
  --shadow-sm: 0 1px 2px rgba(16, 50, 58, .05), 0 2px 10px rgba(16, 50, 58, .05);
  --shadow: 0 14px 34px -14px rgba(16, 50, 58, .28);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Iowan Old Style", Georgia, "Times New Roman", "Songti SC", serif;
}

/* 每个角色一套强调色；根节点切换当前角色，角色按钮各自带自己的颜色 */
[data-persona="huo"], [data-p="huo"] {
  --accent: #ffc21f; --accent-strong: #f0a800; --accent-ink: #855600;
  --accent-soft: #fff6d9; --accent-soft-2: #ffe7a3; --hl: rgba(255, 196, 40, .42);
  --on-accent: #4a3000; --glow: rgba(255, 194, 31, .45);
}
[data-persona="fu"], [data-p="fu"] {
  --accent: #2fb877; --accent-strong: #1d9a5e; --accent-ink: #0f6a40;
  --accent-soft: #e0f6ea; --accent-soft-2: #b8ebd1; --hl: rgba(62, 196, 135, .3);
  --on-accent: #fff; --glow: rgba(47, 184, 119, .4);
}
[data-persona="mentor"], [data-p="mentor"] {
  --accent: #1b9aa0; --accent-strong: #137f86; --accent-ink: #0b5a60;
  --accent-soft: #ddf2f2; --accent-soft-2: #b5e2e2; --hl: rgba(27, 154, 160, .2);
  --on-accent: #fff; --glow: rgba(27, 154, 160, .35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
button:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- 背景：平板质感 + 柔和菌落光斑 ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1100px 620px at 8% -12%, #d3efe7 0%, transparent 60%),
    radial-gradient(900px 640px at 108% 108%, #cbe8ee 0%, transparent 56%),
    linear-gradient(180deg, #eff9f6 0%, #e2f1ed 100%);
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(16, 50, 58, .075) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent 75%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(48px); animation: drift 18s ease-in-out infinite alternate; }
.b1 { width: 360px; height: 360px; background: #ffd65e; left: -140px; top: 22%; opacity: .34; }
.b2 { width: 320px; height: 320px; background: #63d59d; right: -110px; top: -70px; opacity: .32; animation-delay: -6s; }
.b3 { width: 460px; height: 460px; background: #49b4b0; right: 12%; bottom: -260px; opacity: .22; animation-delay: -12s; }
@keyframes drift { to { transform: translate(40px, -30px) scale(1.08); } }

/* ---------- 布局：手机上讲义占满，对话从底部拉起；宽屏三栏 ---------- */
.app {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  max-width: 820px; margin: 0 auto;
}
.side { padding: calc(12px + env(safe-area-inset-top)) 14px 8px; flex: none; }
.stage { flex: 1; min-height: 0; position: relative; overflow: hidden; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.lesson { grid-area: 1 / 1; z-index: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.stage::after {
  content: ""; grid-area: 1 / 1; z-index: 2;
  background: rgba(10, 35, 40, .32); opacity: 0; pointer-events: none; transition: opacity .3s;
}
.chat {
  grid-area: 1 / 1; z-index: 3; min-height: 0; margin-top: 10px;
  display: flex; flex-direction: column;
  background: #f6fbfa; border-radius: 24px 24px 0 0;
  box-shadow: 0 -18px 40px -22px rgba(10, 35, 40, .5), 0 0 0 1px rgba(16, 50, 58, .05);
  transform: translateY(104%); visibility: hidden;
  transition: transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .38s;
}
.app.chat-open .chat { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
.app.chat-open .stage::after { opacity: 1; pointer-events: auto; }
@media (max-width: 1079px) {
  .desktop-only { display: none !important; }
  .app:not(.chat-open) .chips { display: none; }
}

.brand { display: flex; align-items: center; gap: 11px; }
.logo { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 6px 10px rgba(20, 128, 126, .28)); }
.logo svg { width: 100%; height: 100%; display: block; }
.brand-text { min-width: 0; }
.brand h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: .06em; line-height: 1.2; }
.brand p { margin: 1px 0 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-actions { margin-left: auto; display: flex; gap: 6px; }

.icon-btn {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72); color: var(--ink-2);
  cursor: pointer; transition: background .2s, transform .15s, color .2s;
}
.icon-btn:hover { background: #fff; color: var(--ink); }
.icon-btn:active { transform: scale(.94); }

/* 角色切换：手机上是分段胶囊 */
.personas {
  display: flex; gap: 4px; margin-top: 12px; padding: 4px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 2px rgba(16, 50, 58, .05);
}
.persona {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 5px 8px; border: 0; border-radius: 999px; background: transparent;
  font-size: 14px; font-weight: 650; color: var(--ink-2);
  cursor: pointer; transition: background .25s, box-shadow .25s, color .25s, transform .15s;
}
.persona:active { transform: scale(.97); }
.persona .pav { width: 28px; height: 28px; flex: none; transition: transform .3s; }
.persona .pav svg { width: 100%; height: 100%; display: block; }
.persona .ptext { display: flex; flex-direction: column; min-width: 0; }
.persona .pname { white-space: nowrap; }
.persona .platin, .persona .ptag { display: none; }
.persona.on { background: #fff; color: var(--ink); box-shadow: 0 2px 10px -2px rgba(16, 50, 58, .18), 0 0 0 1.5px var(--accent-soft-2); }
.persona.on .pav { transform: rotate(-6deg) scale(1.06); }

/* ---------- 讲义 ---------- */
.lesson-inner { max-width: 760px; margin: 0 auto; padding: 4px 14px 30px; }
.lesson strong { font-weight: 700; color: var(--ink); background: linear-gradient(transparent 60%, var(--hl) 0); padding: 0 1px; border-radius: 2px; }

/* 角色档案卡 */
.profile {
  position: relative; overflow: hidden; margin-top: 6px; padding: 16px 16px 14px;
  border-radius: 24px; border: 1px solid var(--accent-soft-2);
  background: linear-gradient(140deg, var(--accent-soft) 0%, rgba(255, 255, 255, .95) 62%);
  box-shadow: var(--shadow-sm); animation: rise .45s both;
}
.profile::after {
  content: ""; position: absolute; right: -60px; top: -70px; width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 68%); opacity: .5; pointer-events: none;
}
.profile-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.profile-av { width: 84px; height: 84px; flex: none; animation: bob 4.2s ease-in-out infinite; }
.profile-av svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 12px rgba(16, 50, 58, .16)); }
.profile-text { min-width: 0; }
.kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .2em; color: var(--accent-ink); opacity: .85; }
.profile h2 { margin: 3px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 26px; font-weight: 800; letter-spacing: .04em; line-height: 1.25; }
.profile h2 .full { font-size: 13.5px; font-weight: 650; letter-spacing: .02em; color: var(--accent-ink); background: rgba(255, 255, 255, .9); border: 1px solid var(--accent-soft-2); padding: 2px 10px; border-radius: 999px; }
.profile .latin { margin-top: 3px; font-family: var(--serif); font-style: italic; font-size: 14.5px; color: var(--muted); }
.tags { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); }
.hello { position: relative; z-index: 1; margin: 12px 0 0; padding: 11px 14px; font-size: 14.5px; line-height: 1.75; color: var(--ink-2); background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: 16px; }

/* 板块目录：吸顶，跟随滚动高亮 */
.toc {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 4px -14px 0; padding: 10px 14px;
  transition: background .25s, box-shadow .25s;
}
.toc.stuck {
  background: rgba(240, 249, 246, .86); box-shadow: 0 10px 20px -18px rgba(16, 50, 58, .6);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
}
.toc::-webkit-scrollbar { display: none; }
.toc-item {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px 4px 4px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .92);
  font-size: 13px; font-weight: 650; color: var(--ink-2);
  transition: background .2s, color .2s, border-color .2s;
}
.toc-item i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; background: var(--accent-soft); color: var(--accent-ink); transition: background .2s, color .2s; }
.toc-item:hover { border-color: var(--accent-soft-2); }
.toc-item.on { background: var(--ink); border-color: transparent; color: #fff; }
.toc-item.on i { background: var(--accent); color: var(--on-accent); }

/* 板块卡片 */
.sec {
  margin-top: 12px; padding: 18px 16px 14px; border-radius: 24px;
  background: rgba(255, 255, 255, .95); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  animation: rise .45s both; animation-delay: var(--d, 0s);
}
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sec-ic { width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 16px -8px var(--glow); }
.sec-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sec-no { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--accent-strong); }
.sec h3 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: .04em; }

.gist { position: relative; margin: 0 0 12px; padding: 10px 14px 10px 16px; border-radius: 14px; background: var(--accent-soft); font-size: 15.5px; font-weight: 700; line-height: 1.6; }
.gist strong { background: none; color: var(--accent-ink); }
.gist::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.stat { padding: 10px 8px 9px; border-radius: 14px; text-align: center; border: 1px solid var(--line); background: linear-gradient(180deg, #fff, #f6faf9); }
.stat b { display: block; font-size: 16px; font-weight: 800; line-height: 1.3; color: var(--accent-ink); }
.stat span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.4; color: var(--muted); text-wrap: balance; }

.rows { margin: 0; }
.row { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px dashed var(--line-2); }
.row:first-child { border-top: 0; padding-top: 2px; }
.row dt { align-self: start; margin-top: 3px; padding: 1px 3px; border-radius: 8px; text-align: center; font-size: 12.5px; font-weight: 750; line-height: 1.7; color: var(--accent-ink); background: var(--accent-soft); }
.row dd { margin: 0; font-size: 14.5px; line-height: 1.78; color: var(--ink-2); }

/* 流程：竖向步骤条 */
.flow { margin: 0 0 12px; padding: 12px 14px 2px; border-radius: 16px; background: #f5faf9; border: 1px solid var(--line); }
.flow-title { margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
.flow ol { list-style: none; margin: 0; padding: 0; counter-reset: f; }
.flow li { counter-increment: f; position: relative; padding: 0 0 12px 34px; }
.flow li::before {
  content: counter(f); position: absolute; left: 0; top: 0; z-index: 1;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px #f5faf9;
}
.flow li::after { content: ""; position: absolute; left: 10px; top: 24px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--accent-soft-2); }
.flow li:last-child::after { display: none; }
.flow b { display: block; font-size: 14.5px; font-weight: 750; line-height: 22px; }
.flow span { display: block; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }

.tip { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 10px 13px; border-radius: 14px; background: linear-gradient(135deg, #fff1ea, #fff9f6); border: 1px solid #ffd8c6; color: #7a3516; }
.tip svg { flex: none; margin-top: 4px; color: #e0673d; }
.tip p { margin: 0; font-size: 14px; line-height: 1.7; }
.tip p > b { margin-right: 6px; font-weight: 800; color: #c2502a; }
.tip strong { color: inherit; background: linear-gradient(transparent 60%, rgba(240, 122, 82, .24) 0); }

.ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ask-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 2px; font-size: 12.5px; font-weight: 750; color: var(--muted); }
.ask-av { width: 24px; height: 24px; flex: none; }
.ask-av svg { width: 100%; height: 100%; display: block; }
.ask .chip { white-space: normal; text-align: left; line-height: 1.45; }
.ask .chip svg { flex: none; }

/* 两菌对比表：两列各用自己的颜色 */
.cmp-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line-2); -webkit-overflow-scrolling: touch; }
.cmp { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.55; }
.cmp thead th { padding: 9px 10px; text-align: left; font-size: 13.5px; font-weight: 800; white-space: nowrap; color: var(--accent-ink); background: var(--accent-soft); }
.cmp thead th:first-child { width: 4.8em; background: #f2f7f6; }
.cmp-av { display: inline-block; width: 26px; height: 26px; margin-right: 4px; vertical-align: -8px; }
.cmp-av svg { width: 100%; height: 100%; display: block; }
.cmp tbody th { padding: 9px 10px; text-align: left; vertical-align: top; white-space: nowrap; font-size: 13px; font-weight: 750; color: var(--ink); background: #f8fbfb; border-top: 1px solid var(--line); }
.cmp td { padding: 9px 10px; vertical-align: top; color: var(--ink-2); border-top: 1px solid var(--line); }
.cmp td + td { border-left: 1px dashed var(--line); }

/* 左右对比卡 */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcard { padding: 12px 14px; border-radius: 18px; border: 1px solid var(--accent-soft-2); background: linear-gradient(180deg, var(--accent-soft), #fff 72%); }
.pcard-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pcard-av { width: 32px; height: 32px; flex: none; }
.pcard-av svg { width: 100%; height: 100%; display: block; }
.pcard-head b { font-size: 15px; font-weight: 800; color: var(--accent-ink); }
.pcard ul { margin: 0; padding: 0; list-style: none; }
.pcard li { position: relative; padding: 4px 0 4px 14px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.pcard li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pcard-foot { margin: 8px 0 0; padding: 8px 10px; border-radius: 12px; border: 1px dashed var(--accent-soft-2); background: rgba(255, 255, 255, .9); font-size: 13px; font-weight: 600; line-height: 1.6; color: var(--accent-ink); }

/* 易混点清单 */
.pits { list-style: none; margin: 0; padding: 0; counter-reset: k; display: grid; gap: 8px; }
.pits li { counter-increment: k; position: relative; padding: 10px 12px 10px 44px; border-radius: 14px; background: #fff8f4; border: 1px solid #ffe0d2; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.pits li::before { content: counter(k); position: absolute; left: 12px; top: 11px; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #f07a52; color: #fff; }
.pits strong { background: linear-gradient(transparent 60%, rgba(240, 122, 82, .22) 0); }

/* TCBS 平板示意 */
.dish { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.dish figure { margin: 0; padding: 12px 8px 10px; border-radius: 18px; text-align: center; border: 1px solid var(--accent-soft-2); background: linear-gradient(180deg, var(--accent-soft), #fff); }
.plate { display: block; width: min(116px, 78%); height: auto; margin: 0 auto 6px; filter: drop-shadow(0 8px 12px rgba(16, 50, 58, .16)); }
.dish figcaption { font-size: 12px; line-height: 1.5; color: var(--muted); }
.dish figcaption b { display: block; font-size: 14px; color: var(--accent-ink); }

/* 讲义结尾 */
.lend { margin-top: 16px; }
.lend-card { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #12383f, #1c5a60); box-shadow: 0 18px 36px -22px rgba(16, 50, 58, .8); }
.lend-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 16px -8px var(--glow); }
.lend-text { flex: 1; min-width: 0; }
.lend-text b { display: block; font-size: 16px; }
.lend-text small { display: block; margin-top: 2px; font-size: 12.5px; color: rgba(255, 255, 255, .72); }
.lend-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.lend-link { display: flex; align-items: center; gap: 10px; padding: 11px 14px 11px 10px; border-radius: 18px; cursor: pointer; text-align: left; border: 1px solid var(--accent-soft-2); background: linear-gradient(135deg, var(--accent-soft), #fff 80%); transition: transform .2s, box-shadow .2s; }
.lend-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lend-av { width: 38px; height: 38px; flex: none; }
.lend-av svg { width: 100%; height: 100%; display: block; }
.lend-t { flex: 1; min-width: 0; }
.lend-t b { display: block; font-size: 14.5px; color: var(--ink); }
.lend-t small { display: block; font-size: 12px; color: var(--muted); }
.lend-link > svg { flex: none; color: var(--accent-ink); }
.lend-note { margin: 18px 0 2px; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- 对话区 ---------- */
.chat-head { position: relative; flex: none; display: flex; align-items: center; gap: 10px; padding: 18px 14px 10px; border-bottom: 1px solid var(--line); }
.chat-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: rgba(16, 50, 58, .14); }
.hav { width: 36px; height: 36px; flex: none; }
.hav svg { width: 100%; height: 100%; display: block; }
.htext { min-width: 0; }
.htext b { display: block; font-size: 15.5px; font-weight: 750; }
.htext i { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.head-actions { margin-left: auto; display: flex; gap: 6px; }
.feed { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 14px 12px; -webkit-overflow-scrolling: touch; }
.feed-inner { max-width: 760px; margin: 0 auto; }
.feed-inner.static * { animation: none !important; }

/* 对话开场：建议问题 + 考考我 */
.cintro .msg { margin-top: 14px; }
.suggest { display: grid; gap: 8px; margin: -6px 0 4px 32px; }
.suggest-label { margin: 2px 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.sq {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff;
  font-size: 14px; font-weight: 600; line-height: 1.5; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
  animation: rise .4s both; animation-delay: calc(var(--i) * 50ms + .08s);
}
.sq svg { flex: none; color: var(--accent-strong); transition: transform .2s; }
.sq:hover { background: var(--accent-soft); border-color: var(--accent-soft-2); }
.sq:hover svg { transform: translateX(3px); }
.sq:active { transform: scale(.985); }
.wide {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--accent-soft-2);
  background: linear-gradient(135deg, var(--accent-soft), rgba(255, 255, 255, .9));
  transition: transform .2s, box-shadow .2s; animation: rise .45s both .3s;
}
.wide:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.wide .ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.wide b { display: block; font-size: 15px; }
.wide small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.wide.primary { background: linear-gradient(135deg, #12383f, #1c5a60); border-color: transparent; color: #fff; }
.wide.primary .ic { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 14px -4px var(--glow); }
.wide.primary small { color: rgba(255, 255, 255, .7); }

/* 消息 */
.msg { display: flex; gap: 10px; margin: 18px 0; animation: rise .35s both; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble {
  max-width: min(82%, 560px); padding: 10px 15px;
  background: linear-gradient(135deg, #12383f, #1a5057); color: #fff;
  border-radius: 20px 20px 6px 20px; font-size: 15px; line-height: 1.65;
  box-shadow: 0 8px 20px -12px rgba(16, 50, 58, .6);
  word-break: break-word;
}
.msg.ai { display: block; position: relative; }
.msg.ai .av { position: absolute; left: 0; top: 0; width: 26px; height: 26px; }
.msg.ai .av svg { width: 100%; height: 100%; display: block; }
.msg.ai .body { min-width: 0; }
.msg.ai .who { margin: 0 0 7px 32px; line-height: 26px; font-size: 12px; font-weight: 600; color: var(--muted); }
.msg.ai .bubble {
  background: #fff; border: 1px solid var(--line); border-radius: 6px 20px 20px 20px;
  padding: 12px 16px; box-shadow: var(--shadow-sm); font-size: 15px; line-height: 1.78;
  word-break: break-word;
}
.bubble.waiting { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
.bubble.error { display: inline-flex; align-items: center; gap: 8px; color: #b5471f; background: #fff5f1 !important; border-color: #ffd9c9 !important; font-size: 14px; }
.link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; padding: 2px 4px; }

/* 回答正文排版 */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: .45em 0; }
.md h3, .md h4 { display: flex; align-items: center; gap: 8px; margin: 1em 0 .4em; font-size: 15.5px; font-weight: 750; color: var(--accent-ink); }
.md h3::before { content: ""; width: 4px; height: 1.05em; border-radius: 3px; background: var(--accent); flex: none; }
.md h4 { font-size: 15px; color: var(--ink); }
.md strong { font-weight: 700; background: linear-gradient(transparent 58%, var(--hl) 0); padding: 0 1px; border-radius: 2px; }
.md em { font-style: normal; color: var(--accent-ink); }
.md ul, .md ol { margin: .4em 0; padding-left: 1.35em; }
.md li { margin: .25em 0; padding-left: .1em; }
.md li::marker { color: var(--accent-strong); font-weight: 700; }
.md code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--accent-soft); color: var(--accent-ink); padding: 1px 6px; border-radius: 6px; }
.md pre { background: #f4f8f7; padding: 10px 12px; border-radius: 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; color: var(--ink); }
.md blockquote { margin: .6em 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; color: var(--ink-2); }
.md hr { border: 0; height: 1px; background: var(--line-2); margin: 1em 0; }
.md .table-wrap { margin: .7em 0; overflow-x: auto; border: 1px solid var(--line-2); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.md table { border-collapse: collapse; width: 100%; font-size: 13.5px; line-height: 1.55; }
.md th { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; text-align: left; padding: 9px 12px; white-space: nowrap; }
.md td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; min-width: 7em; }
.md td:first-child { font-weight: 650; color: var(--ink); white-space: nowrap; min-width: 0; }
.md tbody tr:nth-child(even) td { background: rgba(16, 50, 58, .022); }
.md .ext { display: inline-block; margin-left: 4px; padding: 0 7px; font-size: 11px; font-weight: 700; line-height: 18px; color: #7b5bd6; background: #f1ecff; border-radius: 999px; vertical-align: 1px; cursor: help; }
.caret { display: inline-block; width: 8px; height: 1.05em; margin-left: 3px; vertical-align: -3px; border-radius: 2px; background: var(--accent); animation: caret 1s steps(2, start) infinite; }

/* 知识点卡片 */
.cards { display: grid; gap: 10px; margin-top: 10px; }
.card { border-radius: 18px; padding: 12px 15px 11px; border: 1px solid; }
.card-head { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 12.5px; font-weight: 800; letter-spacing: .08em; }
.card-points { background: linear-gradient(135deg, var(--accent-soft) 0%, #fff 85%); border-color: var(--accent-soft-2); }
.card-points .card-head { color: var(--accent-ink); }
.card-points ol { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.card-points li { counter-increment: p; display: flex; gap: 10px; padding: 4px 0; font-size: 14px; line-height: 1.6; }
.card-points li::before {
  content: counter(p); flex: none; width: 21px; height: 21px; margin-top: 1px; border-radius: 7px;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--accent); color: var(--on-accent);
}
.card-pit { background: linear-gradient(135deg, #fff1ea 0%, #fff 85%); border-color: #ffd8c6; }
.card-pit .card-head { color: #b5471f; }
.card-pit ul { margin: 0; padding: 0; list-style: none; }
.card-pit li { position: relative; padding: 4px 0 4px 18px; font-size: 14px; line-height: 1.6; }
.card-pit li::before { content: ""; position: absolute; left: 3px; top: 12px; width: 7px; height: 7px; border-radius: 2px; background: #f07a52; transform: rotate(45deg); }
.next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 2px 0 0; }
.next-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; margin-right: 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--accent-soft-2); background: rgba(255, 255, 255, .92); color: var(--accent-ink);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.chip:hover { background: var(--accent-soft); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.chip:active { transform: scale(.97); }
.chip.solid { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 6px 14px -6px var(--glow); }
.pop { animation: pop .55s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: var(--d, 0s); }

/* 随堂小测 */
.quiz { background: #fff; border: 1px solid var(--line); border-radius: 6px 22px 22px 22px; overflow: hidden; box-shadow: var(--shadow-sm); }
.quiz-head {
  display: flex; align-items: center; gap: 7px; padding: 11px 16px;
  background: linear-gradient(90deg, var(--accent-soft), #fff); border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--accent-ink);
}
.qtype { padding: 2px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--accent-soft-2); font-size: 11.5px; letter-spacing: .02em; }
.score { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11.5px; letter-spacing: .02em; }
.quiz-stem { padding: 14px 16px 6px; font-size: 15px; line-height: 1.8; }
.opts { display: grid; gap: 8px; padding: 8px 16px 16px; }
.opt {
  display: flex; align-items: flex-start; gap: 11px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff;
  font-size: 14.5px; line-height: 1.55; cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.opt .L { flex: none; width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: #eff5f4; color: var(--ink-2); transition: background .2s, color .2s; }
.opt:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.opt:hover:not(:disabled) .L { background: var(--accent); color: var(--on-accent); }
.opt:active:not(:disabled) { transform: scale(.985); }
.opt:disabled { cursor: default; opacity: .62; }
.opt.right { opacity: 1; border-color: #2fb877; background: #e8f8ef; }
.opt.right .L { background: #2fb877; color: #fff; }
.opt.wrong { opacity: 1; border-color: #f07a52; background: #fff2ec; animation: shake .45s; }
.opt.wrong .L { background: #f07a52; color: #fff; }
.opt.ghost { height: 46px; border-style: dashed; background: linear-gradient(90deg, #f5f9f8 25%, #eaf3f1 50%, #f5f9f8 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; cursor: default; }
.skeleton { padding: 16px 16px 4px; display: grid; gap: 9px; }
.skeleton i { display: block; height: 13px; border-radius: 6px; background: linear-gradient(90deg, #eef4f3 25%, #e1ecea 50%, #eef4f3 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.skeleton i.short { width: 60%; }
.quiz-result { margin: 0 16px 14px; padding: 12px 14px; border-radius: 16px; background: #f5faf9; border: 1px solid var(--line); }
.verdict { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; font-weight: 800; font-size: 14.5px; }
.verdict.ok { color: #148a52; }
.verdict.bad { color: #c2502a; }
.verdict svg { flex: none; }
.verdict .ans { flex: none; margin-left: auto; padding: 2px 10px; border-radius: 999px; background: #2fb877; color: #fff; font-size: 12.5px; }
.quiz-result p { margin: 7px 0 0; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.qpoint { display: flex; gap: 6px; align-items: flex-start; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line-2); font-size: 13.5px; font-weight: 650; color: var(--accent-ink); }
.qpoint svg { flex: none; margin-top: 3px; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 650; color: var(--ink-2);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 8px 16px -8px var(--glow); }

/* ---------- 输入区 ---------- */
.composer { flex: none; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); position: relative; z-index: 4; background: linear-gradient(180deg, rgba(246, 251, 250, .7), rgba(242, 249, 247, .96)); transition: background .3s; }
.composer::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 22px; background: linear-gradient(180deg, transparent, rgba(246, 251, 250, .7)); pointer-events: none; transition: opacity .3s; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; max-width: 760px; margin: 0 auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.input-row {
  display: flex; align-items: flex-end; gap: 8px; max-width: 760px; margin: 0 auto;
  padding: 6px 6px 6px 18px; border-radius: 26px;
  background: #fff; border: 1px solid var(--line-2);
  box-shadow: 0 12px 30px -16px rgba(16, 50, 58, .35);
  transition: border-color .2s, box-shadow .2s;
}
.input-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 12px 30px -16px rgba(16, 50, 58, .35); }
.input-row textarea {
  flex: 1; min-width: 0; max-height: 140px; padding: 9px 0; border: 0; outline: 0; resize: none;
  background: transparent; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5;
}
.input-row textarea::placeholder { color: #9bb1b4; }
.send {
  width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 8px 16px -8px var(--glow); transition: transform .15s, opacity .2s, background .2s;
}
.send:hover:not(:disabled) { transform: translateY(-1px) scale(1.04); }
.send:disabled { opacity: .35; box-shadow: none; cursor: default; }
.send.stopping { background: var(--ink); color: #fff; }
.disclaimer { margin: 7px 0 0; text-align: center; font-size: 11px; color: var(--muted); letter-spacing: .02em; }

/* ---------- 关于作品 ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 35, 40, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background .25s, backdrop-filter .25s; }
.sheet.open { background: rgba(10, 35, 40, .36); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet-panel {
  position: relative; width: 100%; max-width: 760px; max-height: 90dvh; max-height: 90vh;
  background: #fbfdfc; border-radius: 26px 26px 0 0; box-shadow: 0 -20px 60px -20px rgba(10, 35, 40, .45);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column;
}
.sheet.open .sheet-panel { transform: none; }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.sheet-body { overflow-y: auto; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); }
.about-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding-right: 40px; }
.about-hero svg { width: 60px; height: 60px; flex: none; }
.about-hero h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: .03em; }
.about-hero p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.sheet-body section { margin-top: 22px; }
.sheet-body h3 { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.sheet-body section > p { margin: 0; font-size: 14.5px; line-height: 1.8; color: var(--ink-2); }
.design-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.design { padding: 13px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.design b { font-size: 14.5px; }
.design p { margin: 5px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.verify { display: grid; gap: 10px; }
.vitem { display: flex; gap: 12px; padding: 13px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.vno { flex: none; font-family: var(--serif); font-size: 22px; font-weight: 700; color: #b9cfd1; line-height: 1.1; }
.vitem b { display: block; font-size: 14.5px; margin-bottom: 6px; }
.vrow { display: flex; gap: 8px; align-items: flex-start; margin-top: 5px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.vtag { flex: none; margin-top: 1px; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.vtag.ai { background: #eef1f2; color: #66797c; }
.vtag.fix { background: #e3f6ec; color: #13774a; }
.vsrc { margin-top: 6px; font-size: 12px; color: var(--muted); }
.reflect { padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--line); margin-bottom: 10px; }
.reflect b { font-size: 14px; }
.reflect p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.team { margin-top: 18px; font-size: 13px; color: var(--ink-2); }
.about-foot { margin: 24px 0 0; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- 动画 ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes bob { 50% { transform: translateY(-7px) rotate(-3deg); } }
@keyframes blink { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
@keyframes caret { to { visibility: hidden; } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes swim { to { transform: translateX(-12px); } }
.flagellum { animation: swim .5s linear infinite; }

/* ---------- 手机：输入框左侧的对话开关 ---------- */
.chat-toggle {
  position: relative; width: 40px; height: 40px; flex: none; margin-right: 2px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--accent-soft); color: var(--accent-ink); transition: background .2s, color .2s, transform .15s;
}
.chat-toggle:active { transform: scale(.94); }
.chat-toggle.on { background: var(--ink); color: #fff; }
.chat-toggle .badge { position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%; background: #f0603a; box-shadow: 0 0 0 2px #fff; animation: pop .4s both; }
@media (max-width: 1079px) {
  .input-row { padding-left: 6px; }
  .app.chat-open .composer { background: #f6fbfa; }
  .app.chat-open .composer::before { opacity: 0; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 560px) {
  .pair, .lend-links, .design-grid { grid-template-columns: 1fr; }
  .profile h2 { font-size: 24px; }
  .profile-av { width: 76px; height: 76px; }
  .stat b { font-size: 15px; }
  .cmp { font-size: 13px; }
  .cmp th, .cmp td { padding: 8px; }
  .md table { font-size: 13px; }
  .md th, .md td { padding: 8px 9px; }
  .md td { min-width: 5.5em; }
  .msg.ai .bubble { padding: 12px 14px; }
  .msg.ai .bubble, .quiz { font-size: 14.5px; }
}
@media (max-width: 360px) {
  .persona { font-size: 13px; gap: 4px; padding: 5px 4px; }
  .persona .pav { width: 24px; height: 24px; }
  .stats { gap: 6px; }
  .stat b { font-size: 14px; }
}

/* ---------- 宽屏：左侧选角色，中间讲义，右侧提问 ---------- */
@media (min-width: 1080px) {
  body { padding: 20px; }
  .app {
    display: grid;
    grid-template-columns: clamp(236px, 19vw, 272px) minmax(0, 1fr) clamp(340px, 27vw, 410px);
    grid-template-rows: minmax(0, 1fr) auto;
    max-width: 1520px; height: calc(100vh - 40px); height: calc(100dvh - 40px);
    background: rgba(255, 255, 255, .5);
    -webkit-backdrop-filter: blur(24px) saturate(1.2); backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, .85); border-radius: 30px;
    box-shadow: 0 40px 90px -40px rgba(16, 50, 58, .45);
    overflow: hidden;
  }
  .mobile-only { display: none !important; }
  .side { grid-column: 1; grid-row: 1 / 3; display: flex; flex-direction: column; padding: 24px 14px 18px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .38); overflow-y: auto; }
  .brand { padding: 0 6px; }
  .brand p { white-space: normal; }
  .brand p span { display: block; }
  .side-label { margin: 26px 8px 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
  .personas { flex-direction: column; gap: 8px; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .persona { justify-content: flex-start; gap: 11px; padding: 10px; border-radius: 20px; text-align: left; background: rgba(255, 255, 255, .45); border: 1px solid rgba(255, 255, 255, .7); }
  .persona:hover { background: rgba(255, 255, 255, .8); }
  .persona .pav { width: 46px; height: 46px; }
  .persona .pname { font-size: 15.5px; font-weight: 750; color: var(--ink); }
  .persona .platin { display: block; font-family: var(--serif); font-style: italic; font-size: 12.5px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .persona .ptag { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--accent-ink); }
  .persona.on { background: #fff; border-color: var(--accent-soft-2); box-shadow: 0 10px 24px -14px var(--glow), 0 0 0 1.5px var(--accent-soft-2); }
  .side-foot { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 12px; }
  .legend { padding: 14px 15px; border-radius: 18px; background: linear-gradient(145deg, #1b8c88, #12666a); color: #e7fbf8; box-shadow: 0 14px 30px -18px rgba(18, 102, 106, .8); }
  .legend-title { font-size: 12px; font-weight: 800; letter-spacing: .12em; margin-bottom: 8px; color: #fff; }
  .legend-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 1.9; }
  .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
  .dot.y { background: #ffd447; } .dot.g { background: #6ee0a6; } .dot.t { background: #5ccbbe; }
  .about-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); cursor: pointer; text-align: left; color: var(--ink-2); transition: background .2s; }
  .about-link:hover { background: #fff; }
  .about-link b { display: block; font-size: 14px; color: var(--ink); }
  .about-link small { display: block; font-size: 12px; color: var(--muted); }

  .stage { display: contents; }
  .stage::after { display: none; }
  .lesson { grid-column: 2; grid-row: 1 / 3; }
  .lesson-inner { max-width: 820px; padding: 8px 32px 36px; }
  .profile { margin-top: 20px; padding: 22px 24px 18px; }
  .profile-av { width: 104px; height: 104px; }
  .profile h2 { font-size: 30px; }
  .toc { gap: 5px; margin: 6px -32px 0; padding: 12px 32px; }
  .toc-item { padding-right: 10px; font-size: 12.5px; }
  .toc.stuck { background: rgba(247, 252, 250, .86); }
  .sec { margin-top: 14px; padding: 22px 24px 18px; }

  .chat { grid-column: 3; grid-row: 1; margin: 0; border-radius: 0; box-shadow: none; transform: none; visibility: visible; transition: none; background: rgba(255, 255, 255, .62); border-left: 1px solid var(--line); }
  .chat-head { padding: 18px 18px 14px; background: rgba(255, 255, 255, .5); }
  .chat-head::before { display: none; }
  .feed { padding: 0 18px 14px; }
  .composer { grid-column: 3; grid-row: 2; padding: 6px 18px 16px; background: rgba(255, 255, 255, .62); border-left: 1px solid var(--line); }
  .composer::before { background: linear-gradient(180deg, rgba(250, 253, 252, 0), rgba(250, 253, 252, .9)); }
  .input-row textarea { font-size: 15px; }

  .sheet { align-items: center; }
  .sheet-panel { border-radius: 26px; max-height: 86vh; transform: translateY(24px) scale(.98); opacity: 0; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .25s; }
  .sheet.open .sheet-panel { transform: none; opacity: 1; }
  .sheet-body { padding: 30px 32px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
