/* 思径 · 应用本体共用基线样式（手机端 + 电脑壳都用它打底，字号=原始设计值）
 * 三层分工（2026-10-15 用户要求核查后的最终分类）：
 *   app.css         = 本文件，两端共用基线，字号保持原始值
 *   app-mobile.css  = 手机端字号放大层（只在宽 <500px 生效），"手机字再大点"只改它
 *   simulator.css   = 电脑端演示外壳（壳外观 + 壳内压缩，只在宽 ≥500px 生效）
 * 改 App 布局/配色/动效 → 动本文件（两端同时生效，因为电脑壳里装的就是同一个 App）
 * 改手机字大小 → 动 app-mobile.css；改电脑壳外观 → 动 simulator.css
 * 视觉基准：原型图（iPhone 15 390×844，Navy #1A4A8A / Blue #3B82F6 / Ice White #F4F8FD）
 * 字体：iPhone 系统字体（PingFang SC），不依赖 Google Fonts */
:root {
  --ink: #16324f;
  --muted: #5d738c;
  --forest: #2b6cb0;
  --forest-deep: #1a4a8a;
  --gold: #3b82f6;
  --gold-soft: #dbeafe;
  --cream: #f4f8fd;
  --paper: #ffffff;
  --mist: #e8f1fb;
  --line: rgba(26, 74, 138, 0.10);
  --danger: #c0392b;
  --safe-t: env(safe-area-inset-top, 0px); /* 顶部安全区（灵动岛/状态栏），无头测试可注入模拟 */
  --safe-b: env(safe-area-inset-bottom, 0px); /* 底部安全区（home 横条） */
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
  background: #dde8f4;
  color: var(--ink);
  letter-spacing: 0.06em;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
/* 锁页（2026-10-17 用户要求"界面固定不许划"）：整页级滚动全部关掉——页面不许上下/左右拖动、不许双指缩放、不许双击放大。
 * 页面内允许滑动的只剩两块：对话/记录区的上下滚动（.scroll）、超长公式在自己盒子里的左右滑动（.katex-display/.formula 的 overflow-x）。
 * touch-action: pan-x pan-y = 保留两个方向的拖动手势（公式横向滑动要用），但禁止捏合缩放与双击放大（zoom 手势不在允许列表里） */
html, body {
  overflow: hidden;
  overscroll-behavior: none; /* 顺带禁掉下拉刷新 */
  touch-action: pan-x pan-y;
  background: linear-gradient(180deg, #f7fbff 0%, #eaf2fb 100%);
}
button { cursor: pointer; border: none; background: none; font-family: inherit; letter-spacing: inherit; color: inherit; }
input { font-family: inherit; letter-spacing: inherit; color: inherit; }
/* 状态栏：仅电脑模拟器显示（由 simulator.css 打开），手机上由系统状态栏承担 */
.status-bar { display: none; }

/* ===== 应用外壳：手机上全屏，电脑上居中展示手机宽度 ===== */
.app {
  max-width: 480px; /* 盖住 iPhone 16 Pro Max 的 440pt，不留侧缝 */
  margin: 0 auto;
  height: 100vh; /* 回退：老 iOS 不认识 dvh 时用 */
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative; /* 隐藏页用绝对定位悬浮（见 .view 说明） */
  overflow: hidden; /* 锁壳：壳内任何超宽内容都不许把壳撑宽，页面级更不许拖动 */
  background: linear-gradient(180deg, #f7fbff 0%, #eaf2fb 100%);
}

/* ===== 顶部品牌栏 ===== */
.nav-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + var(--safe-t, 0px)) 16px 8px; flex: none; /* 品牌栏下移到灵动岛/状态栏下方 */
  position: relative; /* 汉堡菜单以它为锚点定位 */
}
.brand { display: flex; gap: 10px; align-items: center; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(145deg, #3b82f6, #16324f);
  display: grid; place-items: center; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand h3 { font-size: 19px; letter-spacing: 0.12em; font-weight: 600; line-height: 1.2; }
.brand p { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 12px; background: #fff;
  display: grid; place-items: center; box-shadow: 0 1px 0 var(--line);
  color: var(--forest-deep);
}
.icon-btn svg { width: 18px; height: 18px; }

/* ===== 页面与滚动区 =====
 * 隐藏页不用 display:none（iOS Safari 有 bug：display 切换回来后内容不重绘、一片空白，
 * 要手动滚动才显示）。改为"绝对定位悬浮 + 不可见"：页面永远在渲染，切换只翻 visibility */
.view { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.view:not(.active) {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  visibility: hidden; pointer-events: none;
}
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; /* 只许上下滚：超宽内容归公式盒子自己滚，不许把页面撑宽 */ padding: 8px 16px 18px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }

/* ===== 空状态：欢迎卡片 ===== */
.hero-card {
  background: linear-gradient(160deg, #143a72, #2b6cb0 55%, #4c8fd6);
  color: #f4f8fd; border-radius: 24px; padding: 18px 18px 16px;
  box-shadow: 0 14px 28px rgba(26, 74, 138, 0.22);
}
.hero-card .kicker { font-size: 11px; letter-spacing: 0.2em; color: #dbeafe; }
.hero-card h4 { font-size: 20px; margin: 8px 0 6px; font-weight: 700; letter-spacing: 0.1em; line-height: 1.45; }
.hero-card p { font-size: 13px; line-height: 1.85; color: rgba(255,255,255,0.86); }
.cam-cta {
  margin-top: 14px; width: 100%; height: 48px; border-radius: 14px;
  background: #ffffff; color: var(--forest-deep); font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: 0.12em;
}
.cam-cta svg { width: 18px; height: 18px; }
/* 相册导入次按钮（2026-10-19 新增）：半透明白、描边，与主按钮区分 */
.cam-album {
  margin-top: 8px; width: 100%; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,0.12); color: #f4f8fd; font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid rgba(255,255,255,0.5); letter-spacing: 0.08em;
}
.cam-album svg { width: 16px; height: 16px; }
.principle {
  margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.85;
  padding: 10px 12px; border-left: 3px solid var(--gold);
  background: rgba(255,255,255,0.7); border-radius: 0 12px 12px 0;
}
.principle b { color: var(--ink); }
.hint-text { margin-top: 10px; font-size: 11px; color: #8aa3bc; text-align: center; letter-spacing: 0.05em; }

/* ===== 题目卡片（原型的 photo-strip 在 demo 中显示为文字题） ===== */
.question-card {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border-radius: 16px; padding: 12px; border: 1px solid var(--line);
  margin-bottom: 12px;
}
.question-meta { min-width: 0; flex: 1; }
.question-meta b { display: block; font-size: 14px; line-height: 1.6; letter-spacing: 0.06em; font-weight: 600; word-break: break-all; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #e8f1fb; color: var(--forest); font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; margin-bottom: 6px; letter-spacing: 0.12em;
}

/* ===== 题目理解（agent-note） ===== */
.agent-note {
  background: #fff; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px;
  border: 1px solid var(--line); font-size: 13px; line-height: 1.85;
  overflow-wrap: anywhere; /* 超长连续文字（无空格）也能换行，不撑出屏幕 */
}
.agent-note em { font-style: normal; color: var(--forest); font-weight: 700; }

/* ===== 步骤卡片 ===== */
.step {
  background: #fff; border-radius: 18px; border: 1px solid var(--line);
  margin-bottom: 10px; overflow: hidden;
}
/* minmax(0,1fr) + min-width:0：内容再宽也不能把格子撑破（否则长公式会把文字列撑出卡片被裁掉） */
.step-main { display: grid; grid-template-columns: minmax(0, 1fr) 44px; }
.step-body { padding: 12px 4px 12px 14px; min-width: 0; overflow-wrap: anywhere; }
.step-index { font-size: 11px; color: var(--gold); font-weight: 700; letter-spacing: 0.18em; }
.step-body h5 { font-size: 15px; margin: 4px 0 6px; letter-spacing: 0.08em; line-height: 1.5; }
.step-body p { font-size: 13px; color: #2a4664; line-height: 1.85; }
.think-label {
  font-size: 12px; color: #1a4a8a; margin: 6px 0 8px; background: #eef5ff;
  border-radius: 10px; padding: 8px 10px; line-height: 1.8;
  white-space: pre-line; /* 模型输出的真实换行按原样断行显示 */
  overflow-wrap: anywhere; /* 超长连续文字（无空格）也能换行，不撑出屏幕 */
}
.think-label b { display: block; font-size: 10px; letter-spacing: 0.18em; color: #3b82f6; margin-bottom: 2px; }
.do-label { margin-top: 6px; white-space: pre-line; /* 模型输出的真实换行按原样断行显示 */ overflow-wrap: anywhere; }
.do-label b { font-size: 10px; letter-spacing: 0.18em; color: #3b82f6; display: block; margin-bottom: 2px; }
/* 独立公式（$$ 渲染的整行公式）各自可左右滑动，长公式也能看全；KaTeX 内部不参与换行规则 */
.do-label .katex-display, .think-label .katex-display, .agent-note .katex-display, .summary .katex-display {
  margin: 6px 0; overflow-x: auto; overflow-y: hidden; padding: 2px 0;
}
.think-label .katex, .do-label .katex, .agent-note .katex, .summary .katex { overflow-wrap: normal; }
/* 公式标记（配合 app.js 的"放不下才折行"逻辑）：独立公式形态占整行 */
.kx-display { display: block; }
.formula { margin-top: 8px; background: #f4f8fd; border-radius: 10px; padding: 8px 10px; font-size: 13px; overflow-x: auto; letter-spacing: 0; }
.formula .katex-display { margin: 2px 0; }

/* ===== 三角形按钮 ===== */
.tri { width: 44px; display: flex; align-items: flex-start; justify-content: center; padding-top: 16px; }
.tri button {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; color: var(--forest);
  background: #eef5ff; transition: transform 0.25s ease, background 0.2s;
}
.tri button.open { transform: rotate(-90deg); background: #dbeafe; color: #1a4a8a; }
.tri button .caret {
  width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
  border-right: 8px solid currentColor; margin-top: 2px;
}

/* ===== 知识点展开区 ===== */
.knowledge {
  display: none; border-top: 1px dashed #c5d7ec;
  background: linear-gradient(180deg, #f7fbff, #e8f1fb);
  padding: 12px 14px 14px;
  box-shadow: inset 0 8px 12px rgba(59, 130, 246, 0.06);
}
.knowledge.open { display: block; animation: rise 0.28s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.knowledge h6 { font-size: 12px; color: #1a4a8a; margin-bottom: 8px; letter-spacing: 0.14em; }
.kp {
  display: flex; gap: 8px; padding: 8px; background: #fff; border-radius: 12px;
  margin-bottom: 8px; align-items: flex-start; font-size: 13px;
}
.kp svg { width: 16px; height: 16px; color: var(--gold); flex: none; margin-top: 3px; }
.kp b { font-size: 13px; display: block; letter-spacing: 0.08em; }
/* 文字区：占满剩余宽度（不能写宽泛的 .kp span，会把 KaTeX 公式的 span 也变成块级元素，
   公式就变成左侧挤一堆、右边全空的大方块——"知识点排版错乱"的根因） */
.kp-text { flex: 1; min-width: 0; }
/* 知识点解释按 ①②③ 拆行后每行的样式 */
.kp-line { font-size: 12px; color: var(--muted); line-height: 1.7; display: block; margin-top: 5px; white-space: pre-line; }

/* ===== 知识点内追问（💬 问老师） ===== */
.kp-followup { margin-top: 8px; border-top: 1px dashed #c5d7ec; padding-top: 6px; }
.kp-ask { font-size: 11px; color: var(--forest); font-weight: 600; padding: 2px 0; letter-spacing: 0.06em; }
.kp-chat { margin-top: 6px; }
.kp-chat-msgs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.kp-msg {
  max-width: 88%; font-size: 12px; line-height: 1.7; padding: 6px 10px;
  border-radius: 12px; white-space: pre-line; letter-spacing: 0.03em; word-break: break-word;
}
.kp-msg.user { align-self: flex-end; background: var(--forest); color: #fff; border-bottom-right-radius: 4px; }
.kp-msg.agent { align-self: flex-start; background: #eef5ff; color: var(--ink); border-bottom-left-radius: 4px; }
.kp-msg.wait { color: var(--muted); }
.kp-msg .katex-display { margin: 4px 0; }
.kp-chat-form { display: flex; gap: 6px; }
.kp-chat-form input {
  flex: 1; min-width: 0; height: 32px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; padding: 0 10px; font-size: 16px; outline: none; letter-spacing: 0.03em; /* ≥16px：iOS 聚焦不再自动放大 */
}
.kp-chat-form input:focus { border-color: #b7d0f0; }
.kp-chat-form button {
  flex: none; height: 32px; padding: 0 12px; border-radius: 10px;
  background: var(--gold-soft); color: var(--forest); font-size: 11px; font-weight: 700; /* 与「没看懂？问老师」字体同色 */
}
.kp-chat-form button:disabled { opacity: 0.5; }

/* ===== 思路总结卡片 ===== */
.summary {
  background: linear-gradient(180deg, #f0f6ff, #fff);
  border: 1px solid #b7d0f0; border-radius: 18px; padding: 14px; margin: 6px 0 12px;
}
.summary .tag { font-size: 11px; font-weight: 700; color: #1a4a8a; letter-spacing: 0.18em; }
.summary h5 { margin: 6px 0 8px; font-size: 16px; letter-spacing: 0.08em; }
.summary .idea { font-size: 13px; line-height: 1.85; color: #2a4664; background: #fff; border-radius: 10px; padding: 8px 10px; border: 1px solid var(--line); overflow-wrap: anywhere; }
.summary h6 { font-size: 11px; color: #1a4a8a; letter-spacing: 0.14em; margin: 10px 0 4px; }
.summary li { font-size: 12.5px; margin-left: 16px; margin-bottom: 6px; line-height: 1.8; color: #2a4664; }
.summary .closing { margin-top: 8px; font-size: 12px; color: var(--muted); }

/* ===== 加载中：三步进度显示 ===== */
.loading-card {
  background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px;
  border: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.progress-list { display: flex; flex-direction: column; gap: 8px; }
.progress-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 12px; background: #f7fbff;
  color: #8aa3bc; transition: background .3s, color .3s;
}
.progress-row.active { background: #eef5ff; color: #1a4a8a; }
.progress-icon { font-size: 14px; flex: none; }
.progress-text { flex: 1; min-width: 0; }
.progress-text b { font-weight: 600; letter-spacing: .08em; }
.progress-row:not(.active) .progress-desc { opacity: .8; }
.loading-tip { margin-top: 10px; font-size: 11px; color: #8aa3bc; text-align: center; letter-spacing: 0.04em; }
.typing { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: middle; flex: none; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #3b82f6; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .3; } }

/* ===== 发题衔接：思考动画上拉进场（发第二题直接接思考动画，与上一题衔接自然） ===== */
.loading-card { animation: pull-up .45s cubic-bezier(.22, .9, .3, 1) both; }
@keyframes pull-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 卡片滑入动画 ===== */
.card-in { opacity: 0; transform: translateY(14px); }
.card-in.in { animation: card-rise .5s ease both; }
@keyframes card-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 知识点懒加载状态 ===== */
.kp-loading {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); padding: 4px 0;
}
.kp-error { font-size: 12px; color: var(--danger); padding: 4px 0; line-height: 1.8; }
.kp-error button {
  margin-left: 8px; padding: 4px 10px; border-radius: 8px;
  background: var(--forest); color: #fff; font-size: 11px; font-weight: 700;
}
.kp-empty { font-size: 12px; color: var(--muted); padding: 4px 0; }

/* ===== 错误提示 ===== */
.error-card {
  background: #fdf3f2; border: 1px solid #f0c9c4; border-radius: 16px;
  padding: 14px; margin-bottom: 12px; font-size: 13px; color: var(--danger); line-height: 1.8;
}
.error-card button {
  display: block; margin-top: 8px; height: 34px; padding: 0 14px; border-radius: 10px;
  background: var(--forest); color: #fff; font-size: 12px; font-weight: 700;
}

/* ===== 输入栏 ===== */
.composer {
  display: flex; gap: 8px; padding: 8px 16px calc(10px + var(--safe-b, 0px)); align-items: center; /* 输入框独占最底部，home 横条安全区由它垫高 */
  background: rgba(244,248,253,0.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); flex: none;
}
.composer input {
  flex: 1; height: 42px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; padding: 0 14px; outline: none; font-size: 16px; letter-spacing: 0.04em; /* ≥16px：iOS 聚焦不再自动放大 */
}
.composer input:focus { border-color: #b7d0f0; }
.send {
  width: 42px; height: 42px; border-radius: 14px; background: var(--forest);
  color: #fff; display: grid; place-items: center; flex: none;
  transition: opacity .15s;
}
.send:disabled { opacity: .5; cursor: default; }
.send svg { width: 18px; height: 18px; }

/* ===== 顶部汉堡菜单（2026-10-15 用户拍板：底部 tab 栏移到这里，点三条杠弹出） ===== */
.header-btns { display: flex; gap: 8px; align-items: center; }
.menu {
  position: absolute; top: calc(100% - 4px); right: 16px; z-index: 70;
  background: #fff; border-radius: 16px; border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(26, 74, 138, 0.18);
  padding: 6px; min-width: 150px;
  display: none;
}
.menu.open { display: block; animation: rise 0.22s ease; }
.menu .tab {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; border-radius: 12px;
  font-size: 16px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--muted); text-align: left;
}
.menu .tab svg { width: 21px; height: 21px; flex: none; }
.menu .tab.on { background: #eef5ff; color: var(--forest-deep); }

/* ===== 搜题记录（本地存储 + 科目筛选，视觉参照原型图） ===== */
.hist-head { padding: 12px 16px 6px; flex: none; }
.hist-head h3 { font-size: 17px; font-weight: 600; letter-spacing: 0.1em; }
.hist-search {
  width: 100%; height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; padding: 0 12px; outline: none; font-size: 16px; margin-bottom: 10px; /* ≥16px：iOS 聚焦不再自动放大 */
}
.hist-search:focus { border-color: #b7d0f0; }
.hist-seg { display: flex; gap: 6px; margin-bottom: 10px; }
.hist-seg button {
  flex: 1; height: 30px; border-radius: 10px; background: #eef5ff;
  color: var(--muted); font-size: 12px; font-weight: 600; /* 无过渡：筛选切换立即生效，不要渐隐渐显手感 */
}
.hist-seg button.on { background: var(--forest); color: #fff; }
.section-label { font-size: 11px; color: #8aa3bc; letter-spacing: 0.14em; margin: 2px 2px 8px; }
.hist-item {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 8px;
}
.hist-item:active { background: #f7fbff; }
.hist-thumb {
  width: 40px; height: 44px; flex: none; border-radius: 10px; background: var(--cream);
  display: grid; place-items: center; color: var(--forest-deep);
  font-size: 18px; font-style: italic; font-weight: 600;
}
.hist-main { flex: 1; min-width: 0; }
.hist-main h5 {
  font-size: 13px; line-height: 1.5; font-weight: 600; word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hist-main p { font-size: 11px; color: var(--muted); margin-top: 3px; letter-spacing: 0.04em; }
.hist-pill {
  flex: none; font-size: 10.5px; color: var(--forest); background: #eef5ff;
  border-radius: 999px; padding: 3px 9px; letter-spacing: 0.08em; font-weight: 600;
}
.hist-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.hist-empty p { font-size: 13px; line-height: 2; }

/* ===== 轻提示 ===== */
.toast {
  position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); /* 锚定 .app：手机上 app 铺满屏效果不变，电脑模拟器里提示浮在"手机"内 */
  background: rgba(22, 50, 79, 0.92); color: #fff; font-size: 12px;
  padding: 9px 16px; border-radius: 999px; letter-spacing: 0.06em; z-index: 50;
  animation: rise 0.25s ease;
}

/* 拍照识别中遮罩（2026-10-17 按原型图改「初学者自述页」）：absolute 锚定 .app（.app 已是 relative，两端通用），
 * z-index 40 < toast 的 50，提示能浮在遮罩上；不能用 fixed——电脑模拟器外壳有 transform。
 * 等待豆包识别（3~10 秒）期间放四条自言自语动画，降低等待感 */
.recog-mask {
  position: absolute; inset: 0; z-index: 40;
  background: linear-gradient(180deg, #143a72, #1a4a8a); /* 原型 .process 同款深蓝渐变 */
  color: #eaf3ff; padding: 90px 24px 40px;
}
.recog-mask[hidden] { display: none; }
.recog-pulse {
  width: 72px; height: 72px; border-radius: 24px; background: rgba(219, 234, 254, 0.18);
  display: grid; place-items: center; margin-bottom: 18px;
  animation: recog-pulse 1.6s ease-in-out infinite;
}
.recog-pulse svg { width: 32px; height: 32px; color: #dbeafe; }
@keyframes recog-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.recog-kicker { font-size: 11px; color: #dbeafe; letter-spacing: 0.2em; }
.recog-title { font-size: 22px; margin: 8px 0 6px; letter-spacing: 0.1em; }
.recog-sub { color: #c5d6e8; font-size: 13px; line-height: 1.85; letter-spacing: 0.07em; margin: 0 0 4px; }
.recog-thoughts { margin-top: 22px; }
.recog-thought {
  opacity: 0; transform: translateY(8px); font-size: 13px; line-height: 1.85; letter-spacing: 0.07em;
  padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  animation: recog-in 0.45s ease forwards;
}
.recog-thought:nth-child(1) { animation-delay: 0.15s; }
.recog-thought:nth-child(2) { animation-delay: 0.7s; }
.recog-thought:nth-child(3) { animation-delay: 1.25s; }
.recog-thought:nth-child(4) { animation-delay: 1.85s; }
@keyframes recog-in { to { opacity: 1; transform: none; } }

/* 确认题目区域（裁剪）界面（2026-10-17 按原型图浅色重做）：拍照后先框题再识别，只识别蓝框内的内容 */
.crop-screen {
  position: absolute; inset: 0; z-index: 45; /* 高于识别遮罩 40，低于 toast 50 */
  display: flex; flex-direction: column; background: #f4f8fd; color: #16324f; /* 原型 .confirm 同款浅底深字 */
}
.crop-screen[hidden] { display: none; }
.crop-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top));
  font-size: 13px;
}
.crop-back {
  width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #16324f;
  border: none; display: grid; place-items: center; flex: none;
}
.crop-back svg { width: 18px; height: 18px; }
.crop-title { font-size: 14px; font-weight: 600; }
.crop-spacer { width: 36px; flex: none; } /* 与返回键等宽占位，让标题真正居中（原型同款） */
.crop-stage {
  position: relative; flex: 1; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #c5d7ec; /* 原型定格照片底色；照片 letterbox 留边处正好露出浅蓝灰 */
  touch-action: none; /* 拖动蓝框时禁止页面滚动/缩放 */
}
.crop-stage img { max-width: 100%; max-height: 100%; }
/* 蓝框：外圈阴影把框外压暗，框内保持原亮度；压暗调浅适配浅色页面 */
.crop-box {
  position: absolute; border: 2px solid #2b6cb0; cursor: move; touch-action: none;
  box-shadow: 0 0 0 9999px rgba(15, 35, 58, 0.45);
}
.crop-handle { position: absolute; width: 22px; height: 22px; background: #fff; border: 2px solid #2b6cb0; border-radius: 4px; }
.crop-handle[data-handle="nw"] { left: -11px; top: -11px; cursor: nwse-resize; }
.crop-handle[data-handle="ne"] { right: -11px; top: -11px; cursor: nesw-resize; }
.crop-handle[data-handle="sw"] { left: -11px; bottom: -11px; cursor: nesw-resize; }
.crop-handle[data-handle="se"] { right: -11px; bottom: -11px; cursor: nwse-resize; }
/* 底部操作区：原型 .confirm-actions 同款（主按钮 + 重拍） */
.crop-actions {
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  display: grid; gap: 8px;
}
.crop-primary {
  height: 48px; border-radius: 14px; background: #2b6cb0; color: #fff;
  font-weight: 700; font-size: 15px; letter-spacing: 0.1em; border: none;
}
.crop-secondary {
  height: 44px; border-radius: 14px; color: #1a4a8a; font-weight: 600; font-size: 15px;
  background: none; border: none;
}

/* 意见反馈弹层（2026-10-19 部署上线配套）：浅色风格与裁剪页一致 */
.fb-screen {
  position: absolute; inset: 0; z-index: 46; /* 高于裁剪页 45，低于 toast 50 */
  display: flex; flex-direction: column; background: #f4f8fd; color: #16324f;
}
.fb-screen[hidden] { display: none; }
.fb-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top));
  font-size: 13px;
}
.fb-back {
  width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #16324f;
  border: none; display: grid; place-items: center; flex: none;
}
.fb-back svg { width: 18px; height: 18px; }
.fb-title { font-size: 14px; font-weight: 600; }
.fb-spacer { width: 36px; flex: none; } /* 与返回键等宽占位，让标题居中（裁剪页同款） */
.fb-body {
  flex: 1; display: flex; flex-direction: column; gap: 12px;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto; min-height: 0;
}
.fb-tip { font-size: 13px; color: #5d738c; margin: 0; line-height: 1.6; }
.fb-body textarea {
  flex: 1; min-height: 140px; resize: none; border-radius: 14px;
  border: 1.5px solid #c5d7ec; background: #fff; padding: 12px 14px;
  font-size: 15px; color: #16324f; font-family: inherit; line-height: 1.6;
  box-sizing: border-box; -webkit-appearance: none; appearance: none;
}
.fb-body textarea:focus, .fb-body input:focus { outline: none; border-color: #2b6cb0; }
.fb-body input {
  height: 44px; border-radius: 14px; border: 1.5px solid #c5d7ec; background: #fff;
  padding: 0 14px; font-size: 14px; color: #16324f; font-family: inherit;
  box-sizing: border-box; -webkit-appearance: none; appearance: none;
}
.fb-submit {
  height: 48px; border-radius: 14px; background: #2b6cb0; color: #fff;
  font-weight: 700; font-size: 15px; letter-spacing: 0.1em; border: none; flex: none;
}
.fb-submit:disabled { opacity: 0.6; }

/* ===== 相机页（2026-10-19 仿 iPhone 原生相机：实时取景 + 左下角相册缩略图 + 快门 + 翻转） ===== */
.cam-screen {
  position: absolute; inset: 0; z-index: 44; /* 低于裁剪页 45、高于识别遮罩 40 */
  display: flex; flex-direction: column; background: #000; color: #fff;
}
.cam-screen[hidden] { display: none; }
.cam-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0));
}
.cam-back {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,0.4); color: #fff;
  border: none; display: grid; place-items: center; flex: none;
}
.cam-back svg { width: 18px; height: 18px; }
.cam-hint { font-size: 13px; letter-spacing: 0.1em; opacity: 0.85; }
.cam-spacer { width: 36px; flex: none; } /* 与返回键等宽占位，让标题真正居中（裁剪页同款做法） */
.cam-stage { position: relative; flex: 1; overflow: hidden; background: #000; }
#cam-video { width: 100%; height: 100%; object-fit: cover; display: block; }
#cam-video.mirror { transform: scaleX(-1); } /* 前置镜头预览镜像，与真机一致 */
.cam-off {
  position: absolute; inset: 0; z-index: 1; display: grid; place-content: center;
  text-align: center; gap: 8px; color: #9fb3c8; font-size: 13px; line-height: 1.7;
}
.cam-off[hidden] { display: none; }
.cam-off .cam-off-sub { font-size: 12px; opacity: 0.8; }
.cam-flash {
  position: absolute; inset: 0; z-index: 3; background: #fff; opacity: 0;
  pointer-events: none; transition: opacity 0.12s ease;
}
.cam-flash.on { opacity: 1; }
.cam-bottombar {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px calc(26px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0));
}
.cam-thumb {
  width: 56px; height: 56px; border-radius: 12px; border: 2px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.15); color: #fff; overflow: hidden; flex: none;
  display: grid; place-items: center; padding: 0;
}
.cam-thumb svg { width: 22px; height: 22px; }
.cam-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-shutter {
  width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff;
  background: rgba(255,255,255,0.25); display: grid; place-items: center; flex: none;
}
.cam-shutter span { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: block; }
.cam-shutter:active span { transform: scale(0.9); }
.cam-flip {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,0.35); color: #fff;
  border: none; display: grid; place-items: center; flex: none;
}
.cam-flip svg { width: 20px; height: 20px; }

/* 流式输出：尾部"正在继续书写"指示（2026-10-16） */
.stream-status { display: flex; justify-content: center; align-items: center; gap: 6px;
  padding: 10px 0 4px; text-align: center; font-size: 12px; color: #8aa3bc; }

/* （电脑端演示外壳样式已移出，见 simulator.css） */

