/* ============================================================
   purple — 对话页 + 落地页共用样式
   令牌三层：primitive → semantic → component
   Accent lock: 学校蓝 #0B6BB8（品牌合理化，单一 accent）
   图标：自绘 house style（stroke 1.8、圆头、几何母题统一）
   深色模式：系统跟随 + data-theme 手动；动效仅 transform/opacity + reduced-motion
   ============================================================ */

/* ---------- 1. primitive ---------- */
:root {
  --z-50: #FAFBFC;
  --z-100: #F4F6F8;
  --z-200: #EBEEF2;
  --z-900: #14181D;
  --z-700: #333B44;
  --z-500: #66707B;
  --z-300: #A5AFB9;
  --z-line: #E4E8ED;

  --blue-50: #EAF2FA;  --blue-100: #D8E8F6; --blue-600: #0B6BB8; --blue-700: #0A5D9F;
  --green-700: #2E7D4F; --green-50: #E9F4ED;
  --orange-700: #A96207; --orange-50: #FCF0E1;
  --red-700: #B04A4A; --red-50: #FAECEC;
  --yellow-700: #946A00; --yellow-50: #FAF2DC;

  --font-sans: "HarmonyOS Sans SC", "MiSans", -apple-system, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, ui-monospace, monospace;
}

/* 深色（系统跟随 + 手动覆盖同值）：纯黑中性色，参考 Grok/X.AI —— 去蓝调科技感 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --z-50: #0E0E0E;
    --z-100: #000000;
    --z-200: #171717;
    --z-900: #F2F2F2;
    --z-700: #CFCFCF;
    --z-500: #8A8A8A;
    --z-300: #565656;
    --z-line: #242424;
    --blue-50: #151515;  --blue-100: #1F1F1F; --blue-600: #5CA9E6; --blue-700: #7DBCEE;
    --green-700: #82CC96; --green-50: #141414;
    --orange-700: #DFA55E; --orange-50: #1B1611;
    --red-700: #E08A8A; --red-50: #1B1212;
    --yellow-700: #D9B84C; --yellow-50: #191712;
  }
}
:root[data-theme="dark"] {
  --z-50: #0E0E0E;
  --z-100: #000000;
  --z-200: #171717;
  --z-900: #F2F2F2;
  --z-700: #CFCFCF;
  --z-500: #8A8A8A;
  --z-300: #565656;
  --z-line: #242424;
  --blue-50: #151515;  --blue-100: #1F1F1F; --blue-600: #5CA9E6; --blue-700: #7DBCEE;
  --green-700: #82CC96; --green-50: #141414;
  --orange-700: #DFA55E; --orange-50: #1B1611;
  --red-700: #E08A8A; --red-50: #1B1212;
  --yellow-700: #D9B84C; --yellow-50: #191712;
}

/* ---------- 2. semantic ---------- */
:root {
  --bg: var(--z-100);
  --surface: #FFFFFF;
  --surface-2: var(--z-50);
  --text: var(--z-900);
  --text-body: var(--z-700);
  --text-2: var(--z-500);
  --text-3: var(--z-300);
  --border: var(--z-line);
  --border-faint: var(--z-line);
  --accent: var(--blue-600);
  --accent-strong: var(--blue-700);
  --accent-bg: var(--blue-50);
  --accent-bg-strong: var(--blue-100);
  --ok: var(--green-700); --ok-bg: var(--green-50);
  --warn: var(--yellow-700); --warn-bg: var(--yellow-50);
  --danger: var(--red-700); --danger-bg: var(--red-50);
  --btn-bg: var(--accent);
  --btn-bg-hover: var(--accent-strong);
  --btn-fg: #FFFFFF;
  --side-bg: var(--surface);
  --shadow-1: 0 1px 2px rgba(16, 24, 32, 0.04), 0 2px 8px rgba(16, 24, 32, 0.04);
  --shadow-2: 0 4px 16px rgba(16, 24, 32, 0.08);
  --ring: 0 0 0 3px rgba(11, 107, 184, 0.16);
  /* AI-Native 变量（styles.csv 推荐） */
  --user-bubble-bg: var(--blue-50);
  --ai-surface: var(--surface);
  --input-h: 48px;
  --typing-dot: 7px;
  --msg-gap: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #0A0A0A; --side-bg: #050505; --user-bubble-bg: #1C1C1C;
    /* 深色主按钮：白底黑字（Grok 式 CTA），解决蓝底白字对比度不足 */
    --btn-bg: #F2F2F2; --btn-bg-hover: #DADADA; --btn-fg: #0A0A0A;
  }
}
:root[data-theme="dark"] {
  --surface: #0A0A0A; --side-bg: #050505; --user-bubble-bg: #1C1C1C;
  --btn-bg: #F2F2F2; --btn-bg-hover: #DADADA; --btn-fg: #0A0A0A;
}
:root[data-theme="light"] { --surface: #FFFFFF; --side-bg: #FFFFFF; --user-bubble-bg: var(--blue-50); }

/* ---------- 3. component ---------- */
:root {
  --radius-l: 14px;
  --radius-m: 10px;
  --radius-s: 7px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --side-w: 256px;
  /* 衬线中文栈：官方门户风标题用（Noto/思源宋 → 系统宋体逐级兜底） */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC",
    "STZhongsong", "STSong", "SimSun", serif;
  /* wordmark 栈：Palatino 的书卷气与宋体同属衬线世界，替代廉价感无衬线粗体 */
  --font-wordmark: "Palatino Linotype", Palatino, "Book Antiqua", Georgia,
    "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ---------- 骨架 ---------- */
.app { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- 侧栏 ---------- */
.sidebar {
  width: var(--side-w);
  flex: none;
  background: var(--side-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky; top: 0;
  height: 100vh;
}
.side-head {
  padding: 18px 14px 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.wordmark {
  font-family: var(--font-wordmark);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1;
}
/* 行内 wordmark（正文/标题里嵌的 purple 字样），字号随上下文 */
.wm {
  font-family: var(--font-wordmark);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.new-chat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: none;
  border-radius: var(--radius-m);
  padding: 0 12px;
  height: 38px;
  cursor: pointer;
  transition: background 160ms var(--ease), transform 200ms var(--ease);
}
.new-chat-btn:hover { background: var(--btn-bg-hover); }
.new-chat-btn:active { transform: scale(0.97); }

.side-list { flex: 1; overflow-y: auto; padding: 2px 8px 8px; }
.session-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-m);
  cursor: pointer;
  color: var(--text-body);
  transition: background 130ms var(--ease);
  position: relative;
}
.session-item:hover { background: var(--surface-2); }
.session-item.active { background: var(--surface-2); }
.session-item.active .session-title { color: var(--text); font-weight: 600; }
.session-title {
  flex: 1;
  font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.session-rename {
  display: none;
  flex: 1;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 2px 6px;
  outline: none;
}
.session-item.renaming .session-title { display: none; }
.session-item.renaming .session-rename { display: block; }
.session-del {
  flex: none;
  width: 22px; height: 22px;
  display: none;
  align-items: center; justify-content: center;
  border: none; background: transparent;
  color: var(--text-3);
  border-radius: 6px;
  cursor: pointer;
}
.session-item:hover .session-del { display: inline-flex; }
.session-del:hover { color: var(--danger); background: var(--danger-bg); }
.side-empty { padding: 14px 12px; font-size: 12.5px; color: var(--text-3); }
.side-error { color: var(--danger); }
.side-error a { color: var(--text); font-weight: 600; text-decoration: none; }
.side-error a:hover { text-decoration: underline; }
.side-brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none;
  width: fit-content;
}
.logo-img { height: 25px; width: auto; display: block; }
/* 深色底换白色反白版校徽（浅蓝版在暗背景对比度不足） */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

.side-foot {
  padding: 10px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.side-btn {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-body);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 0 12px;
  height: 38px;
  cursor: pointer;
  transition: all 150ms var(--ease);
}
.side-btn:hover { background: var(--surface-2); border-color: var(--text-3); color: var(--text); }
.side-btn .spacer { flex: 1; text-align: left; }

.side-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10, 14, 20, 0.45);
  z-index: 30;
}

/* ---------- 记忆管理弹窗（P62/P63）：全局 + 当前会话，可增改删 ---------- */
.mem-modal-box {
  width: min(560px, calc(100vw - 32px));
  max-height: min(72vh, 640px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-2);
}
.mem-modal-body { flex: 1; overflow-y: auto; padding: 6px 18px 18px; }
.mem-group-label {
  font-size: 11.5px; font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.08em;
  padding: 14px 6px 6px;
}
.mem-item {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 7px 8px;
  border-radius: 6px;
}
.mem-item:hover { background: var(--surface-2); }
.mem-text {
  flex: 1; min-width: 0;
  font-size: 13px; line-height: 1.65;
  color: var(--text-body);
  word-break: break-word;
  cursor: text;
}
.mem-item.editing .mem-text { display: none; }
.mem-edit {
  display: none;
  flex: 1; min-width: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 5px;
  padding: 3px 8px;
  outline: none;
}
.mem-item.editing .mem-edit { display: block; }
.mem-del {
  flex: none;
  width: 20px; height: 20px;
  display: none; align-items: center; justify-content: center;
  border: none; background: transparent;
  color: var(--text-3);
  font-size: 15px; line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
.mem-item:hover .mem-del { display: inline-flex; }
.mem-del:hover { color: var(--danger); background: var(--danger-bg); }
.mem-empty { padding: 2px 8px 6px; font-size: 12.5px; line-height: 1.6; color: var(--text-3); }
.mem-add { padding: 2px 8px 4px; }
.mem-add-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text);
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 6px;
  outline: none;
  transition: border-color 150ms var(--ease);
}
.mem-add-input:focus { border-color: var(--accent); border-style: solid; }

/* ---------- 失败回复错误卡（P63）：可点踩上报 ---------- */
.err-card {
  border-left: 3px solid var(--danger);
  background: var(--danger-bg);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin: 2px 0 4px;
}
.err-card .err-flag {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--danger);
  margin-bottom: 4px;
}
.err-card .md p { color: var(--text-body); }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header.scrolled { box-shadow: var(--shadow-1); }
.header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 13px 22px;
  display: flex; align-items: center; gap: 12px;
}
.icon-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--text-body);
  cursor: pointer;
}
.icon-btn-inline { display: inline-flex; width: 28px; height: 28px; border-radius: 7px; }
.tagline { margin: 0; font-size: 13px; color: var(--text-2); }
.header-status {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
}

/* ---------- 会话区 ---------- */
.chat {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  /* 底部留白覆盖 sticky 输入区（composer+fineprint≈130px）+ 操作条余量 */
  padding: 26px 22px 150px;
  display: flex;
  flex-direction: column;
  gap: var(--msg-gap);
}

/* 空态：垂直水平居中，衬线大字（去问题预设卡） */
.empty-state { margin: auto; padding: 20px 0; text-align: center; }
.hero {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--text);
}
.hero .wm { font-size: 0.94em; }
.hero-sub { margin: 0; color: var(--text-2); font-size: 14px; }
.ask-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.ask-card {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-body);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 150ms;
}
.ask-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--text-3); }
.ask-card:active { transform: scale(0.98); }
.ask-card .card-tag { font-size: 11px; font-weight: 600; color: var(--text-3); }
.ask-card .card-q { display: block; margin-top: 1px; font-weight: 600; color: var(--text); }

/* ---------- 消息 ---------- */
.msg { animation: enter 380ms var(--ease) both; }
@keyframes enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg-row { display: flex; gap: 11px; align-items: flex-start; }

.avatar {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  user-select: none;
}
.avatar.p { background: var(--accent); color: #fff; }
.avatar.u { background: var(--surface-2); color: var(--text-2); border-radius: 50%; }

.msg-user { align-self: flex-end; max-width: 85%; }
.msg-user .msg-row { flex-direction: row-reverse; }
.msg-user .bubble {
  background: var(--user-bubble-bg);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-l) var(--radius-l) 5px var(--radius-l);
  padding: 10px 15px;
  color: var(--text-body);
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-assistant { max-width: 100%; }
.msg-assistant .content { min-width: 0; flex: 1; }

.md { color: var(--text-body); }
.md p { margin: 0 0 10px; }
.md p:last-child { margin-bottom: 0; }
.md strong { color: var(--text); font-weight: 600; }
.md em { color: var(--text); }
.md code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0 5px;
}
.md ul, .md ol { margin: 4px 0 12px; padding-left: 20px; }
.md li { margin: 3px 0; }
.md li::marker { color: var(--text-3); font-weight: 600; }
.md h4 { margin: 14px 0 8px; font-size: 15px; font-weight: 700; color: var(--text); }

/* 思考中指示器（P65：转圈 + 梗文字轮播，参考 dsh-status-rotator） */
.typing {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.think-line {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px;
  color: var(--text-2);
}
.think-spin {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid var(--text-3);
  border-top-color: transparent;
  border-radius: 50%;
  animation: think-rotate 0.8s linear infinite;
  flex: none;
}
@keyframes think-rotate { to { transform: rotate(360deg); } }

/* 流式插入锚点（P68）：只作 DOM 定位用，不产生任何盒子——此前的蓝色闪烁光标
   在首 token 未到时单独占一行，看起来像排版故障；流式反馈已由转圈+梗文字承担 */
.stream-anchor { display: contents; }

.meta-line {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
}
.meta-line .flag {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.meta-line .flag.degraded { background: var(--warn-bg); color: var(--warn); }
.meta-line .flag.corrected { background: var(--danger-bg); color: var(--danger); }

/* 操作条（P68）：默认透明但**保留占位高度**——悬停淡入时正文不跳动。
   触屏没有 hover，媒体查询里保持常显，否则手机上完全点不到。
   focus-within 让键盘 Tab 也能唤起（否则键盘用户永远摸不到这些按钮）。 */
.actions {
  margin-top: 10px;
  display: flex; align-items: center; gap: 7px;
  opacity: 0;
  transition: opacity 160ms var(--ease);
}
.msg-assistant:hover .actions,
.msg-assistant:focus-within .actions,
.msg-assistant.fb-open .actions { opacity: 1; }
@media (hover: none) {
  .actions { opacity: 1; }
}
.act-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 4px 10px;
  cursor: pointer;
  transition: all 140ms var(--ease);
}
.act-btn:hover { color: var(--text); border-color: var(--text-3); background: var(--surface-2); }
.act-btn:active { transform: scale(0.95); }
/* 复制成功：按钮自身变色+换勾，比角落小字显眼 */
.act-btn.copied { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }
.act-note { font-size: 12px; color: var(--text-3); }

/* 来源侧边面板（Gemini 式浮层抽屉）：消息内只留 [n] 上标 + 「来源 n」触发按钮 */
.src-backdrop {
  position: fixed; inset: 0; z-index: 44;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
}
.src-backdrop.show { opacity: 1; pointer-events: auto; }
.src-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(360px, 92vw);
  z-index: 45;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 32px rgba(16, 24, 32, 0.10);
  transform: translateX(105%);
  transition: transform 240ms var(--ease);
  display: flex; flex-direction: column;
}
.src-panel.open { transform: translateX(0); }
.src-panel-head {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.src-panel-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.src-panel-body { flex: 1; overflow-y: auto; padding: 6px 16px 16px; }
.src-item.flash { background: var(--accent-bg); border-radius: var(--radius-s); }

/* 正文引用上标 [n]（仅 finalize 阶段生成，点击打开面板并定位） */
.cite {
  color: var(--text-2);
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  padding: 0 1px;
  user-select: none;
}
.cite:hover { text-decoration: underline; }

.src-list { padding: 2px 14px 6px; }
.src-item {
  padding: 10px 0 10px 12px;
  border-bottom: 1px solid var(--border-faint);
  border-left: 2px solid var(--border);
  margin-left: 2px;
  transition: border-color 150ms;
}
.src-item:last-child { border-bottom: none; }
.src-item:hover { border-left-color: var(--accent); }
.src-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.src-no {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  background: var(--accent-bg);
  border-radius: 5px;
  padding: 0 6px;
  cursor: help;
}
.src-label { font-size: 13px; font-weight: 600; color: var(--text); }
.src-chapter { font-size: 11px; color: var(--text-3); }
.src-snippet { margin-top: 4px; font-size: 12px; color: var(--text-2); }
.src-link {
  display: inline-block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px dashed var(--text-3);
}
.src-link:hover { border-bottom-style: solid; }

/* ---------- 回答操作条（P63 Gemini 式）：赞/踩/重新生成/复制 + 点踩反馈面板 ---------- */
/* P73：反馈按钮是"图标 + 中文标签"（对校园场景比纯图标明确），故不锁 34px 宽；
   选中态选择器同时匹配 .active.up/.active.down（JS 已补 up/down 类） */
.act-btn.fb { padding: 4px 9px; }
.act-btn.fb svg { flex: none; }
.act-btn.fb.active.up,
.act-btn.active.up { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.act-btn.fb.active.down,
.act-btn.active.down { color: var(--danger); background: var(--danger-bg); border-color: transparent; }

.fb-panel {
  margin-top: 8px;
  /* sticky 输入区盖住视口底部约 90px：滚动定位时预留，避免面板下半被挡 */
  scroll-margin-bottom: 120px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--surface-2);
}
.fb-panel-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.fb-panel-sub { font-size: 12px; color: var(--text-2); margin-top: -4px; }
.fb-opt {
  display: inline-flex; align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 140ms var(--ease), color 140ms var(--ease);
}
.fb-opt:hover { border-color: var(--text-2); color: var(--text); }
.fb-opt.fb-submit { color: var(--text); }
.fb-other-row { display: flex; gap: 8px; width: 100%; }
.fb-other-input {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  outline: none;
}
.fb-other-input:focus { border-color: var(--accent); box-shadow: var(--ring); }

/* ---------- 来源条目：整条可点直达官网（P63） ---------- */
.src-item.clickable { cursor: pointer; }
.src-item.clickable:hover { background: var(--surface-2); }
.src-jump {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
  flex: none;
}
.src-item.clickable:hover .src-jump { color: var(--text-2); }
.src-attach-note { margin-top: 4px; font-size: 11.5px; color: var(--text-3); }

.msg-system .bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange-700);
  border-radius: var(--radius-m);
  padding: 12px 16px;
  color: var(--text-body);
}

/* 回到底部 */
.to-bottom {
  position: fixed;
  right: max(18px, calc(50vw - 470px));
  bottom: 122px;
  z-index: 20;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-1);
  display: none;
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 160ms var(--ease);
}
.to-bottom.show { display: inline-flex; }
.to-bottom:hover { color: var(--text); border-color: var(--text-3); transform: translateY(-2px); }

/* ---------- 输入区 ---------- */
.composer-wrap {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 22px 18px;
  position: sticky;
  bottom: 0;
  /* P66：去掉上沿渐变特效——它会压住内容尾部；用实底+细线与聊天区隔离 */
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-l);
  padding: 10px 10px 10px 17px;
  min-height: var(--input-h);
  box-shadow: var(--shadow-1);
  transition: box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.composer:focus-within { box-shadow: var(--shadow-1), var(--ring); border-color: var(--accent); }
.composer textarea {
  flex: 1;
  border: none; outline: none; resize: none;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  background: transparent;
  color: var(--text);
  max-height: 140px;
  padding: 9px 0;
}
.composer textarea::placeholder { color: var(--text-3); }
.send-btn {
  flex: none;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 160ms var(--ease), transform 220ms var(--ease), opacity 200ms;
}
.send-btn:hover { background: var(--btn-bg-hover); transform: translateY(-1px) scale(1.03); }
.send-btn:active { transform: scale(0.92); }
.send-btn:disabled { opacity: 0.35; cursor: default; transform: none; }
.fineprint { margin: 9px 4px 0; font-size: 12px; color: var(--text-3); text-align: center; }

/* ---------- VR 弹窗 ---------- */
.modal {
  position: fixed; inset: 0;
  z-index: 50;
  background: rgba(8, 12, 18, 0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 180ms var(--ease);
}
.modal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-box {
  width: min(1080px, 96vw);
  height: min(700px, 90vh);
  background: var(--surface);
  border-radius: var(--radius-l);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-2);
  animation: popIn 240ms var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: scale(0.97) translateY(8px); } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px; font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.modal-box iframe { flex: 1; border: none; width: 100%; }

/* ---------- 落地页（/：官方门户风） ----------
   主品牌=长沙学院；衬线标题 + 细线编辑排版 + 直角按钮；
   克制用色：校蓝只出现在 kicker/编号/CTA/顶部色条，不做大面积渲染 */
.landing { background: var(--surface); }

.land-nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--border);
}
.land-nav-inner {
  max-width: 1120px; margin: 0 auto;
  padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.land-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.land-brand .logo-img { height: 30px; }
.land-brand-sep { width: 1px; height: 18px; background: var(--border); }
.land-brand-sub {
  font-family: var(--font-wordmark);
  font-size: 13px; color: var(--text-2); letter-spacing: 0.03em;
}
.land-links { display: flex; align-items: center; gap: 20px; }
.land-links a { font-size: 13.5px; color: var(--text-2); text-decoration: none; }
.land-links a:hover { color: var(--text); }
.land-theme {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  color: var(--text-body);
  cursor: pointer;
  transition: all 150ms var(--ease);
}
.land-theme:hover { color: var(--text); border-color: var(--text-3); }
.land-cta {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 18px;
  border-radius: 3px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 13.5px; font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background 160ms var(--ease);
}
.land-cta:hover { background: var(--btn-bg-hover); }

/* --- Hero：排版驱动，宋体大字撑场 --- */
.landing .hero {
  display: block;
  margin: 0;
  padding: 84px 22px 60px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.7;
  color: inherit;
}
.hero-inner { max-width: 1120px; margin: 0 auto; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-kicker {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 20px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.1em;
}
.kicker-dash { width: 28px; height: 1px; background: var(--text-3); flex: none; }
.hero-title {
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.8vw, 54px);
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: 0.015em;
  color: var(--text);
}
.landing .hero-sub {
  margin: 0 0 32px;
  max-width: 36em;
  font-size: 15.5px;
  line-height: 1.95;
  color: var(--text-2);
}
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  height: 46px; padding: 0 24px;
  border: none; border-radius: 3px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-sans);
  font-size: 14.5px; font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms var(--ease);
}
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-ghost {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid var(--text-3);
  padding-bottom: 3px;
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-2); }

.hero-media { margin: 0; }
.hero-media-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}
.hero-media-btn img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  /* 素材左上角带 720yun 水印：裁掉顶部一截 */
  object-position: center 82%;
  display: block;
  border-radius: 2px;
  border: 1px solid var(--border);
  transition: transform 300ms var(--ease);
}
.hero-media-btn:hover img { transform: scale(1.012); }
.hero-media-tag {
  position: absolute;
  left: 12px; bottom: 12px;
  padding: 5px 12px;
  border-radius: 2px;
  /* 深浅色都压在图片上，固定深底白字，不随主题令牌翻转 */
  background: rgba(8, 8, 8, 0.72);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: background 200ms var(--ease);
}
.hero-media-btn:hover .hero-media-tag { background: rgba(0, 0, 0, 0.88); }
.hero-media figcaption {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-3);
}

/* --- 语料统计：真实数字，衬线大字 --- */
.hero-stats {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start;
  gap: 64px;
  margin: 56px 0 0; padding-top: 30px;
  border-top: 1px solid var(--border);
}
.hero-stats dt {
  font-family: var(--font-serif);
  font-size: 30px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text);
}
.hero-stats dd { margin: 7px 0 0; font-size: 12.5px; letter-spacing: 0.03em; color: var(--text-2); }

/* --- 编号分节（壹/贰）：编辑排版 --- */
.scene-sec { border-top: 1px solid var(--border); padding: 76px 22px 80px; }
.sec-inner { max-width: 1120px; margin: 0 auto; }
.sec-head {
  display: grid; grid-template-columns: auto 1fr;
  gap: 8px 30px; align-items: baseline;
  margin-bottom: 44px;
}
.sec-no {
  font-family: var(--font-serif);
  font-size: 32px; font-weight: 600;
  line-height: 1;
  color: var(--text);
}
.sec-head-copy h2 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 25px; font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text);
}
.sec-head-copy p { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--text-2); }

.scene-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.scene {
  display: flex; flex-direction: column; gap: 12px;
  border-top: 2px solid var(--text);
  padding-top: 20px;
  text-decoration: none;
  transition: border-color 180ms var(--ease);
}
.scene-tag {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-3);
}
.scene-q {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px; font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--text);
}
.scene-note { margin: 0; flex: 1; font-size: 13px; line-height: 1.85; color: var(--text-2); }
.scene-go { font-size: 12.5px; color: var(--text-3); transition: color 160ms var(--ease); }
.scene:hover { border-top-color: var(--text-3); }
.scene:hover .scene-go { color: var(--text); }

/* --- 机制分节：浅灰带 + 中文编号列表 --- */
.mech-sec {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 76px 22px 68px;
}
.mech-list {
  list-style: none;
  margin: 0; padding: 0;
  max-width: 780px;
  counter-reset: mech;
}
.mech-list li {
  counter-increment: mech;
  position: relative;
  padding: 20px 0 20px 58px;
  font-size: 14px; line-height: 1.95;
  color: var(--text-body);
}
.mech-list li + li { border-top: 1px solid var(--border); }
.mech-list li::before {
  content: counter(mech, cjk-ideographic);
  position: absolute; left: 0; top: 18px;
  font-family: var(--font-serif);
  font-size: 19px; font-weight: 600;
  color: var(--text);
}
.mech-list li:first-child { padding-top: 0; }
.mech-list li:first-child::before { top: 3px; }
.mech-list strong { color: var(--text); font-weight: 600; }
.mech-list code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 5px;
}
.scope-row {
  margin-top: 40px; padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex; gap: 20px; align-items: baseline;
}
.scope-label {
  flex: none;
  font-size: 12px; font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.2em;
}
.scope-row p { margin: 0; font-size: 13px; letter-spacing: 0.04em; color: var(--text-body); }

.land-foot { border-top: 1px solid var(--border); padding: 28px 22px 36px; text-align: center; }
.land-foot p { margin: 0 0 6px; font-size: 12.5px; color: var(--text-2); }
.land-foot-fine { font-size: 11.5px; color: var(--text-3); }

/* ---------- 指路卡（T1 guide 支路，聊天流内） ---------- */
.guide-card {
  margin-top: 10px;
  display: flex; align-items: center; gap: 12px;
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 10px 14px;
}
.guide-ic { color: var(--text-2); display: inline-flex; }
.guide-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.guide-flag { font-size: 13px; font-weight: 700; color: var(--text); }
.guide-min { font-size: 12px; color: var(--text-2); }
.guide-link {
  flex: none;
  display: inline-flex; align-items: center;
  height: 34px; padding: 0 14px;
  border-radius: 9px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: background 160ms var(--ease);
}
.guide-link:hover { background: var(--btn-bg-hover); }

/* ---------- 指路页（/campus/route：官图底图 + SVG 路线叠加） ---------- */
.route-page { background: var(--bg); }
.route-head {
  max-width: 940px; margin: 0 auto;
  padding: 18px 22px 8px;
  display: flex; align-items: center; gap: 16px;
}
.route-head-main { flex: 1; min-width: 0; }
.route-head-main h1 {
  margin: 0 0 4px;
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.route-sum { margin: 0 0 8px; font-size: 13.5px; color: var(--text-2); }
.route-sum strong { color: var(--text); }
.route-main { max-width: 940px; margin: 0 auto; padding: 12px 22px 44px; }
.selbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.sel-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.selbar select {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 8px;
  max-width: 240px;
  outline: none;
}
.selbar select:focus { border-color: var(--accent); box-shadow: var(--ring); }
.btn-mini {
  display: inline-flex; align-items: center;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 140ms var(--ease);
}
.btn-mini:hover { color: var(--text); border-color: var(--text-3); }
.btn-mini-primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.btn-mini-primary:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }
.map-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  padding: 10px;
  position: relative;
}
/* 可交互视口：拖动平移 / 滚轮·双指缩放 */
.vp {
  position: relative;
  height: clamp(420px, 66vh, 700px);
  overflow: hidden;
  border-radius: var(--radius-m);
  background: var(--z-100);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.vp:active { cursor: grabbing; }
.world { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.stage { position: relative; }
.map-img {
  display: block;
  width: 100%;
  pointer-events: none;
}
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 标记层：屏幕空间等大点/钉（不随缩放变形），标签仅悬停或手动开关 */
.mkr { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.m-dot, .m-pin, .m-wp { position: absolute; left: 0; top: 0; pointer-events: auto; }
.m-dot {
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 32, 0.35);
  cursor: pointer;
}
.m-dot:hover { box-shadow: 0 0 0 4px rgba(11, 107, 184, 0.3), 0 1px 3px rgba(16, 24, 32, 0.35); }
.m-lbl {
  position: absolute; left: 10px; top: -9px;
  white-space: nowrap;
  font-size: 11px; font-weight: 600;
  color: #14181D;  /* 芯片底固定浅色，文字固定深色（暗色模式下也不反转） */
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(20, 24, 32, 0.15);
  border-radius: 5px;
  padding: 1px 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms var(--ease);
}
.m-dot:hover .m-lbl, .mkr.labels-on .m-lbl { opacity: 1; }
.m-wp {
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  pointer-events: none;
}
.m-pin {
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(16, 24, 32, 0.4);
  cursor: pointer;
}
.m-pin.start { background: var(--ok); }
.m-pin.end { background: var(--accent); width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.route-underline {
  fill: none; stroke: #fff;
  stroke-width: 8; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0.9;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.route-line {
  fill: none; stroke: var(--accent);
  stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
/* 地图工具栏：位于地图上方，不遮挡图面 */
.map-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.tb-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.tb-legend {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-2);
}
.lg-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.lg-start { background: var(--ok); margin-left: 10px; }
.lg-end { background: var(--accent); }
/* 720° 实景层 */
.view720 { position: absolute; inset: 0; z-index: 3; border-radius: var(--radius-m); overflow: hidden; }
.view720 iframe { width: 100%; height: 100%; border: none; }
/* 点位弹卡 */
.popup {
  position: absolute;
  z-index: 6;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-2);
  padding: 10px 12px;
}
.popup-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.popup-name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.popup-x {
  border: none; background: none;
  color: var(--text-3);
  font-size: 16px; line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.popup-x:hover { color: var(--text); }
.popup-desc { margin: 4px 0 8px; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.popup-acts { display: flex; gap: 6px; }
.popup-acts .btn-mini { height: 30px; font-size: 12px; padding: 0 10px; }
.route-steps {
  margin: 18px 2px 0; padding: 0;
  list-style: none;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 0;
}
.route-steps li { display: inline-flex; align-items: baseline; }
.route-steps li:not(:last-child)::after { content: "→"; margin: 0 8px; color: var(--text-3); }
.step-btn {
  display: inline-flex; align-items: baseline; gap: 6px;
  border: none; background: none;
  font-family: var(--font-sans);
  font-size: 13px; color: var(--text-2);
  cursor: pointer;
  padding: 2px 0;
}
.step-btn:hover .step-name { color: var(--text); }
.step-name { font-weight: 600; color: var(--text); transition: color 140ms var(--ease); }
.step-min { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.route-fine { margin: 12px 4px 0; font-size: 12px; color: var(--text-3); }

/* ---------- 移动端 ---------- */
@media (max-width: 820px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 40;
    transform: translateX(-102%);
    transition: transform 240ms var(--ease);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
  }
  .sidebar.open { transform: translateX(0); }
  .side-overlay.show { display: block; }
  .icon-btn { display: inline-flex; }
  .header-status { display: none; }
  .chat { padding: 20px 14px 10px; gap: 14px; }
  .ask-grid { grid-template-columns: 1fr; }
  .composer-wrap { padding: 8px 14px 14px; }
  .msg-user { max-width: 92%; }
  .hero { font-size: 24px; }
  .to-bottom { right: 14px; bottom: 108px; }
  .modal { padding: 10px; }
  .modal-box { height: 82vh; }
  /* 来源面板：移动端改底部 sheet */
  .src-backdrop.show { background: rgba(10, 14, 20, 0.45); }
  .src-panel {
    top: auto; left: 0; right: 0;
    width: auto; max-height: 72vh;
    border-left: none; border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    transform: translateY(105%);
    box-shadow: 0 -12px 32px rgba(16, 24, 32, 0.14);
  }
  .src-panel.open { transform: translateY(0); }
  /* 落地页 */
  .land-nav-inner { padding: 12px 16px; }
  .land-brand-sub { display: none; }
  .land-brand-sep { display: none; }
  .land-links { gap: 12px; }
  .land-links a:not(.land-cta) { display: none; }
  .landing .hero { padding: 46px 16px 40px; }
  .landing .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .landing .hero-sub { font-size: 15px; }
  .hero-stats { grid-template-columns: 1fr; gap: 16px; margin-top: 34px; }
  .scene-sec, .mech-sec { padding: 50px 16px 54px; }
  .sec-head { grid-template-columns: auto 1fr; gap: 6px 18px; margin-bottom: 30px; }
  .sec-no { font-size: 26px; }
  .sec-head-copy h2 { font-size: 21px; }
  .scene-grid { grid-template-columns: 1fr; gap: 26px; }
  .mech-list li { padding-left: 44px; }
  .scope-row { flex-direction: column; gap: 8px; }
  /* 指路页 */
  .route-head { flex-wrap: wrap; padding: 14px 16px 4px; }
  .route-main { padding: 10px 16px 36px; }
  .selbar select { max-width: 150px; }
  .vp { height: min(62vh, 560px); }
}

/* 无障碍 */
@media (prefers-reduced-motion: reduce) {
  .msg { animation: none; }
  .think-spin { animation: none; border-style: dashed; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- 指路迷你卡（P29：对话内嵌裁剪路线小图 + 分步文字） ---------- */
.guide-card-mini {
  display: block;
  max-width: 380px;
}
.guide-card-mini .guide-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  flex-wrap: wrap;
}
.guide-mini {
  display: block;
  margin: 8px 0 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--accent-bg);
}
.guide-mini svg { display: block; width: 100%; height: auto; max-height: 240px; }
.guide-steps {
  margin: 2px 0 8px;
  padding-left: 20px;
  display: grid; gap: 3px;
  font-size: 12.5px;
  color: var(--text-body);
}
.guide-step-min { color: var(--text-2); margin-left: 6px; font-size: 12px; }

.guide-mini svg { margin: 0 auto; }

/* ---------- 登录态（P34）：头部用户名 + 退出 ---------- */
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: auto;
}
.user-chip-name { font-size: 12.5px; color: var(--text-2); }
.logout-form { display: inline; }
.logout-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: var(--radius-s);
  height: 26px; padding: 0 10px;
  font: inherit; font-size: 12px;
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.logout-btn:hover { color: var(--danger); border-color: var(--danger); }

.admin-link {
  font-size: 12.5px; color: var(--text-2); text-decoration: none;
}
.admin-link:hover { text-decoration: underline; }
