/* ============================================================
   爱拍题 AiPaiTi · 设计系统 v2 —— iOS 扁平化 · 教育清新绿
   干净白/浅灰底 · SF 系统字体 · 分组 inset 列表 · 极简阴影
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@500;600;700&display=swap');

/* ---------- Tokens ---------- */
:root {
  --bg:        #F4F6F5;   /* 分组背景（浅灰绿） */
  --surface:   #FFFFFF;   /* 卡片 / 列表组 */
  --ink:       #0E1512;   /* 主文字（近黑） */
  --ink-2:     #5C6660;   /* 次级文字 */
  --sub:       #8B938E;   /* 三级 / 副标题 */
  --faint:     #B7BDB9;   /* 占位 */

  --accent:      #28B463; /* 清新绿 */
  --accent-press:#1EA455;
  --accent-soft: #E7F6EE;
  --accent-ink:  #1B8F4E;

  --red:    #FF3B30;  --red-soft:#FFE9E7;
  --amber:  #FF9F0A;  --amber-soft:#FFF1DC;
  --indigo: #5E5CE6;  --indigo-soft:#ECEBFB;
  --blue:   #3B82F6;  --blue-deep:#2563EB;  --blue-soft:#E7F0FE;  --blue-ink:#1D4ED8;
  --sep:    #E7ECE9;      /* 分隔线 */

  --font: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, "PingFang SC", "Helvetica Neue", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", serif;

  --r-sm: 12px; --r-md: 15px; --r-btn: 15px; --r-lg: 22px; --r-xl: 26px; --r-pill: 999px;
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px; --sp-8:32px;

  --shadow-cta: 0 10px 24px -14px rgba(30,164,85,.5);
  --z-nav:20; --z-toast:40;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.serif { font-family: var(--serif); }

/* ---------- 设备外框（画廊/独立预览） ---------- */
.device { width: 390px; height: 844px; position: relative; background: #000; border-radius: 54px; padding: 12px; }
.device__screen { width:100%; height:100%; border-radius:44px; overflow:hidden; background:var(--bg); position:relative; }

/* ---------- 屏幕容器 ---------- */
.screen { width: 390px; height: 100vh; max-height: 100vh; margin: 0 auto; background: var(--bg);
  position: relative; display: flex; flex-direction: column; overflow: hidden; }

/* 状态栏 */
.statusbar { height: 50px; flex:0 0 auto; display:flex; align-items:flex-end; justify-content:space-between;
  padding: 0 24px 6px; font-size:14px; font-weight:700; color: var(--ink); }
.statusbar--light { color: #fff; }
.statusbar__icons { display:flex; gap:5px; align-items:center; }

/* iOS 导航栏 */
.navbar { height: 46px; flex:0 0 auto; display:flex; align-items:center; padding: 0 8px; position: relative; }
.navbar__title { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); font-size:17px; font-weight:700; letter-spacing:-.3px; white-space:nowrap; }
.navbar__btn { min-width:44px; height:44px; display:flex; align-items:center; gap:2px; color: var(--accent); font-size:17px; padding:0 8px; }
.navbar__btn svg { width:24px; height:24px; }
.navbar__spacer { flex:1; }
.navbar__action { color: var(--accent); font-size:16px; font-weight:600; padding: 0 10px; height:44px; display:flex; align-items:center; }

/* 大标题 */
.large-title { font-size: 32px; font-weight: 800; letter-spacing:-.7px; padding: 4px 4px 2px; }
.large-sub { color: var(--sub); font-size: 15px; padding: 0 4px 16px; }

/* 可滚动主体 */
.body { flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; padding: 4px 16px 20px; }
.body, .no-scrollbar { scrollbar-width:none; -ms-overflow-style:none; }
.body::-webkit-scrollbar, .no-scrollbar::-webkit-scrollbar { width:0; height:0; display:none; }

/* ---------- 文字工具 ---------- */
.section-header { font-size:13px; font-weight:600; color: var(--sub); padding: 4px 8px 8px; letter-spacing:.1px; }
.muted { color: var(--ink-2); } .sub { color: var(--sub); }
.sm { font-size:14px; } .tiny { font-size:12.5px; } .center { text-align:center; }
.h2 { font-size:20px; font-weight:800; letter-spacing:-.4px; }
.h3 { font-size:17px; font-weight:700; letter-spacing:-.2px; }

/* ---------- 按钮 ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:52px; padding:0 22px;
  border-radius: var(--r-btn); font-size:17px; font-weight:700; color:#fff; background: var(--accent);
  box-shadow: var(--shadow-cta); transition: transform .12s, background .15s, opacity .15s; }
.btn:active { transform: scale(.985); background: var(--accent-press); }
.btn--block { width:100%; }
.btn svg { width:20px; height:20px; }
.btn--tinted { background: var(--accent-soft); color: var(--accent-ink); box-shadow:none; }
.btn--gray { background: #EAEDEB; color: var(--ink); box-shadow:none; }
.btn--plain { background:none; color: var(--accent); box-shadow:none; height:auto; padding:0; font-weight:600; }
.btn--sm { height:36px; font-size:14px; padding:0 14px; border-radius:10px; }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-5); }
.card--tint { background: #D6F0DF; box-shadow: inset 0 0 0 1.5px rgba(30,164,85,.35); }

/* 现代大卡 · 卡内分区标题 + 进度环 */
.cardsec__hd { font-size:13px; font-weight:700; color: var(--sub); padding:14px 16px 6px; }
.ring { position:relative; flex:0 0 auto; }
.ring b { position:absolute; inset:0; display:grid; place-items:center; font-weight:800; }

/* ---------- 分组 inset 列表 ---------- */
.group { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.row { display:flex; align-items:center; gap:12px; padding:13px 16px; position:relative; background:none; width:100%; text-align:left; }
.row + .row::before { content:""; position:absolute; top:0; left:52px; right:0; height:1px; background: var(--sep); }
.row--tap:active { background: #F0F2F1; }
.row__ico { width:30px; height:30px; border-radius:8px; flex:0 0 auto; display:grid; place-items:center; color:#fff; }
.row__ico svg { width:18px; height:18px; }
.row__main { flex:1; min-width:0; }
.row__title { font-size:16px; font-weight:600; letter-spacing:-.2px; }
.row__sub { font-size:13px; color: var(--sub); margin-top:1px; }
.chev { color:#C4C9C6; font-size:20px; font-weight:600; line-height:1; }
.badge { font-size:14px; font-weight:600; color: var(--accent); }

/* 掌握列表 · 圆点极简行（合并三状态） */
.plainrow { display:flex; align-items:center; gap:12px; padding:13px 16px; width:100%; text-align:left; background:none; position:relative; }
.plainrow + .plainrow::before { content:""; position:absolute; left:40px; right:0; top:0; height:1px; background:var(--sep); }
.plainrow--flush + .plainrow--flush::before { left:16px; }
.plainrow:active { background:#F0F2F1; }
.dotmark { width:9px; height:9px; border-radius:999px; flex:0 0 auto; }
.spill { font-size:12px; font-weight:800; padding:4px 11px; border-radius:999px; white-space:nowrap; flex:0 0 auto; }
.iconbtn { display:grid; place-items:center; width:32px; height:32px; color: var(--ink-2); background:none; }
.iconbtn svg { width:22px; height:22px; }
.iconbtn:active { opacity:.5; }

/* 表单输入 */
.field { width:100%; height:46px; border:1px solid var(--sep); background:#fff; border-radius:12px; padding:0 14px; font-size:16px; color: var(--ink); }
.field::placeholder { color: var(--faint); }

/* iOS 开关 */
.switch { width:50px; height:30px; border-radius:999px; background:#E2E5E3; position:relative; flex:0 0 auto; transition:background .2s; }
.switch i { position:absolute; top:2px; left:2px; width:26px; height:26px; border-radius:999px; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:transform .2s; }
.switch.on { background: var(--accent); }
.switch.on i { transform:translateX(20px); }

/* 步进器 */
.stepper { display:flex; align-items:center; background: var(--bg); border-radius:10px; flex:0 0 auto; }
.stepper button { width:34px; height:32px; font-size:18px; font-weight:700; color: var(--accent-ink); }
.stepper span { min-width:24px; text-align:center; font-size:15px; font-weight:700; }

/* ---------- 标签 chip ---------- */
.chip { display:inline-flex; align-items:center; gap:5px; height:26px; padding:0 11px; border-radius: var(--r-pill);
  font-size:13px; font-weight:600; color: var(--ink-2); background:#EDEFEE; }
.chip--accent { background: var(--accent-soft); color: var(--accent-ink); }
.chip--amber  { background: var(--amber-soft); color: #C77800; }
.chip--blue   { background: var(--blue-soft); color: var(--blue-ink); }
.chip--red    { background: var(--red-soft); color: var(--red); }

/* ---------- 分段控件（iOS segmented） ---------- */
.segmented { display:flex; background:#EBEEEC; border-radius:10px; padding:2px; gap:2px; }
.segmented button { flex:1; height:32px; border-radius:8px; font-size:14px; font-weight:600; color: var(--ink-2); background:none; }
.segmented button.on { background:#fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* 筛选 chip（练习学科筛选） */
.fchip { height:33px; padding:0 15px; border-radius:999px; font-size:14px; font-weight:600; color: var(--ink-2); background: var(--surface); }
.fchip.on { background: var(--accent); color:#fff; }

/* ---------- 进度 ---------- */
.progress { height:8px; border-radius:999px; background:#E6EAE8; overflow:hidden; }
.progress__bar { height:100%; border-radius:999px; background: var(--accent); transition: width .5s; }
.progress--amber .progress__bar { background: var(--amber); }

/* ---------- 统计小卡 ---------- */
.stat { flex:1; background: var(--surface); border-radius: var(--r-lg); padding:14px 16px; }
.stat .n { font-size:27px; font-weight:800; letter-spacing:-.6px; }
.stat .l { font-size:13px; color: var(--sub); margin-top:2px; }

/* ---------- 聊天气泡（iOS iMessage 风） ---------- */
.chat { display:flex; flex-direction:column; gap:10px; }
.msg { display:flex; gap:8px; max-width:82%; align-items:flex-end; }
.msg--me { align-self:flex-end; flex-direction:row-reverse; }
.avatar { width:30px; height:30px; border-radius:999px; flex:0 0 auto; display:grid; place-items:center; font-size:13px; font-weight:700;
  background: var(--accent-soft); color: var(--accent-ink); }
.avatar--me { background:#E7E9E8; color: var(--ink-2); }
.bubble { padding:9px 14px; border-radius:20px; font-size:16px; line-height:1.45; }
.bubble--ai { background:#EAECEB; color: var(--ink); border-bottom-left-radius:6px; }
.bubble--me { background: var(--accent); color:#fff; border-bottom-right-radius:6px; }
.bubble--sys { align-self:center; background:none; color: var(--sub); font-size:13px; text-align:center; padding:2px; }
.bubble .hint { margin-top:6px; padding-top:6px; border-top:1px solid rgba(0,0,0,.08); font-size:13.5px; color: var(--ink-2); }

/* 快捷回复 */
.quickreplies { display:flex; flex-wrap:wrap; gap:8px; }
.quickreply { padding:8px 15px; border-radius:999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--accent-soft);
  color: var(--accent-ink); font-size:14px; font-weight:600; }
.quickreply:active { background: var(--accent-soft); }

/* 输入条 */
.composer { flex:0 0 auto; display:flex; align-items:center; gap:8px; padding:8px 14px calc(8px + env(safe-area-inset-bottom));
  background: rgba(244,246,245,.9); backdrop-filter: blur(12px); border-top:1px solid var(--sep); }
.composer__input { flex:1; height:40px; border-radius:999px; border:1px solid var(--sep); background:#fff; padding:0 16px; font-size:16px; color:var(--ink); }
.composer__input::placeholder { color: var(--faint); }
.composer__send { width:40px; height:40px; border-radius:999px; background:var(--accent); color:#fff; display:grid; place-items:center; flex:0 0 auto; }
.composer__send svg { width:20px; height:20px; }

/* 分步答题条 —— 建议气泡 + 输入（聊天式） */
.answerbar { flex:0 0 auto; background: var(--surface); border-radius: 22px 22px 0 0;
  border-top:1px solid var(--sep); box-shadow: 0 -8px 26px -14px rgba(14,21,18,.16);
  padding: 13px 14px calc(12px + env(safe-area-inset-bottom)); animation: sheetup .3s cubic-bezier(.32,.72,0,1); }
.answerbar__chips { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:11px; }
.chipbtn { padding:9px 15px; border-radius:999px; background: var(--accent-soft); color: var(--accent-ink);
  font-size:14.5px; font-weight:600; line-height:1.2; white-space:nowrap; transition: transform .1s, background .15s; }
.chipbtn:active { transform: scale(.96); background:#D2EEDD; }
.chipbtn--ghost { background:transparent; color: var(--sub); box-shadow: inset 0 0 0 1.5px var(--sep); }
.chipbtn--ghost:active { background:#F0F2F1; }
.answerbar__row { display:flex; align-items:center; gap:9px; }
.answerbar__input { flex:1; height:44px; border-radius:999px; border:1px solid var(--sep); background: var(--bg);
  padding:0 17px; font-size:15.5px; color: var(--ink); }
.answerbar__input::placeholder { color: var(--faint); }
.answerbar__send { width:44px; height:44px; flex:0 0 auto; border-radius:999px; background: var(--accent); color:#fff;
  display:grid; place-items:center; transition: opacity .15s, transform .1s; }
.answerbar__send:disabled { opacity:.34; }
.answerbar__send:not(:disabled):active { transform: scale(.92); }
.answerbar__send svg { width:20px; height:20px; }
@keyframes sheetup { from { transform: translateY(16px); opacity:0 } to { transform:none; opacity:1 } }

/* 跟老师解题 · 画布式（拍的题 / 解题过程图文 / 精简对话） */
.probbar { flex:0 0 auto; display:flex; align-items:center; gap:10px; padding:11px 16px; background:var(--surface); border-bottom:1px solid var(--sep); text-align:left; width:100%; }
.probbar__t { flex:1; min-width:0; font-size:14px; color:var(--ink); line-height:1.55; }
.soluitem { display:flex; align-items:center; gap:12px; background:var(--surface); border-radius:14px; padding:12px 14px; margin-bottom:10px; animation: sheetup .3s cubic-bezier(.32,.72,0,1); }
.soluitem__b { flex:1; min-width:0; }
.soluitem__t { font-size:13px; font-weight:800; color:var(--accent-ink); margin-bottom:5px; }
.soluitem__w { font-size:15px; line-height:1.65; color:var(--ink); }
.soluitem__fig { flex:0 0 auto; }
.dockchat { flex:0 0 auto; padding:11px 16px; background:var(--bg); border-top:1px solid var(--sep); display:flex; flex-direction:column; gap:8px; max-height:168px; overflow-y:auto; }

/* 完整解题过程 · 分步时间线 */
.solve-step { display:flex; gap:12px; padding-bottom:14px; position:relative; }
.solve-step:last-child { padding-bottom:0; }
.solve-step__n { flex:0 0 auto; width:24px; height:24px; border-radius:999px; background:var(--accent-soft); color:var(--accent-ink);
  font-size:13px; font-weight:800; display:grid; place-items:center; position:relative; z-index:1; }
.solve-step:not(:last-child)::before { content:""; position:absolute; left:11px; top:25px; bottom:1px; width:2px; background:var(--sep); border-radius:2px; }
.solve-step__b { flex:1; min-width:0; padding-top:2px; }
.solve-step__t { font-size:14px; font-weight:700; color:var(--ink); margin-bottom:3px; }
.solve-step__w { font-size:14px; line-height:1.7; color:var(--ink-2); }

/* 老师正在输入 */
.typing { flex:0 0 auto; text-align:center; color:var(--sub); font-size:13px; font-weight:600; padding:14px 0 calc(18px + env(safe-area-inset-bottom)); }
.typing i { display:inline-block; width:5px; height:5px; border-radius:50%; background:var(--faint); margin-left:4px; animation:blink 1.2s infinite; }
.typing i:nth-child(2){ animation-delay:.2s } .typing i:nth-child(3){ animation-delay:.4s }
@keyframes blink { 0%,60%,100%{ opacity:.25 } 30%{ opacity:1 } }

/* ---------- 底部 TabBar（iOS 半透明） ---------- */
.tabbar { flex:0 0 auto; height:60px; display:flex; justify-content:space-around; padding-top:7px;
  background: rgba(248,250,249,.86); backdrop-filter: blur(20px); border-top:1px solid var(--sep); }
.tab { display:flex; flex-direction:column; align-items:center; gap:3px; color:#9aa19d; font-size:10px; font-weight:600; padding:0 14px; }
.tab svg { width:26px; height:26px; }
.tab--active { color: var(--accent); }
/* 暗色场景（相机）：透明底 + 浅色文字 */
.tabbar--ghost { background: transparent; backdrop-filter: none; border-top: none; }
.tabbar--ghost .tab { color: rgba(255,255,255,.55); }
.tabbar--ghost .tab--active { color: var(--accent); }

/* ---------- 杂项 ---------- */
.stack > * + * { margin-top: 20px; }
.stack-sm > * + * { margin-top: 10px; }
.divider { height:1px; background: var(--sep); margin: 16px 0; }
.spacer { flex:1; }
.clickable { cursor: pointer; }
.icon { width:22px; height:22px; }

/* ---------- Remix Icon 尺寸（按容器） ---------- */
i[class^="ri-"], i[class*=" ri-"] { display:inline-flex; line-height:1; vertical-align:middle; }
.tab i { font-size:25px; margin-bottom:1px; }
.navbar__btn i { font-size:26px; }
.iconbtn i { font-size:22px; }
.composer__send i, .answerbar__send i { font-size:20px; }
.row__ico i { font-size:18px; }

/* ---------- 首启合规弹窗（底部弹窗：用户协议 + 年龄门 + 监护人同意） ---------- */
.agreecard__ico { font-size:42px; line-height:1; }
.agreecard__t { font-size:20px; font-weight:800; letter-spacing:-.3px; margin-top:12px; }
.agreecard__p { font-size:13.5px; color:var(--ink-2); line-height:1.7; margin-top:10px; }
.agreecard__q { font-size:14px; font-weight:700; color:var(--accent-ink); margin:18px 0 12px; }
.agreecard__law { font-size:11px; color:var(--sub); line-height:1.5; margin-top:14px; }

/* ---------- 年级切换按钮 + 底部选择弹层 ---------- */
.gradebtn { display:inline-flex; align-items:center; gap:3px; height:34px; padding:0 13px; border-radius:999px; background:var(--accent-soft); color:var(--accent-ink); font-size:14px; font-weight:700; }
.gradebtn i { font-size:16px; }
.sheetmask { position:absolute; inset:0; z-index:60; background:rgba(6,8,7,.5); display:flex; align-items:flex-end; }
.sheet { width:100%; background:var(--surface); border-radius:24px 24px 0 0; padding:10px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow:0 -8px 30px rgba(0,0,0,.2); }
.sheet__grip { width:38px; height:4px; border-radius:4px; background:var(--faint); margin:2px auto 12px; }
.sheet-enter-active, .sheet-leave-active { transition:opacity .25s; }
.sheet-enter-active .sheet, .sheet-leave-active .sheet { transition:transform .28s cubic-bezier(.4,0,.2,1); }
.sheet-enter-from, .sheet-leave-to { opacity:0; }
.sheet-enter-from .sheet, .sheet-leave-to .sheet { transform:translateY(100%); }

/* ---------- 拍题确认 · 每道题的框选（可点解题） ---------- */
.qbox { position:absolute; border:2px solid var(--accent); border-radius:7px; background:rgba(40,180,99,.16); box-shadow:0 0 10px rgba(40,180,99,.45); cursor:pointer; transition:background .12s, transform .1s; }
.qbox:active { background:rgba(40,180,99,.36); transform:scale(.99); }
.qbox--on { border-width:3px; background:rgba(40,180,99,.34); box-shadow:0 0 18px rgba(40,180,99,.75); }
.qbox--on .qbox__no { background:var(--accent-ink); box-shadow:0 0 0 3px rgba(40,180,99,.4), 0 2px 6px rgba(0,0,0,.35); }
.qbox__no { position:absolute; top:-11px; left:-9px; min-width:22px; height:22px; padding:0 5px; border-radius:11px; background:var(--accent); color:#fff; font-size:12px; font-weight:800; display:grid; place-items:center; box-shadow:0 2px 6px rgba(0,0,0,.35); }

/* ---------- 拍题取景 · AI 逐题识别扫描框（白框 + 扫光） ---------- */
.scanbox { position:absolute; border:2px solid rgba(255,255,255,.95); border-radius:8px; background:rgba(255,255,255,.05); box-shadow:0 0 16px rgba(255,255,255,.4), inset 0 0 12px rgba(255,255,255,.1); overflow:hidden; z-index:3; animation:scanmove 6.4s cubic-bezier(.5,0,.15,1) infinite; }
.scanbox__tag { position:absolute; top:-11px; left:8px; z-index:2; display:flex; align-items:center; gap:3px; background:rgba(255,255,255,.95); color:var(--accent-ink); font-size:10px; font-weight:700; padding:2px 8px; border-radius:6px; white-space:nowrap; box-shadow:0 2px 6px rgba(0,0,0,.3); }
.scanbox__tag i { font-size:11px; }
.scanbox__line { position:absolute; left:0; right:0; top:0; height:45%; background:linear-gradient(to bottom, transparent, rgba(255,255,255,.45) 70%, rgba(255,255,255,.85)); animation:scanline 1.5s ease-in-out infinite; }
@keyframes scanline { 0%,100% { transform:translateY(-100%); } 50% { transform:translateY(230%); } }
/* 各题真实坐标（逐行检测得完整题目范围：题干+选项+图+多行都框住） */
@keyframes scanmove {
  0%, 17%  { top:25.2%; left:1%; width:97%; height:6.8%; }   /* 题1 · 题干+A/B/C/D 选项 */
  24%, 42% { top:36.4%; left:1%; width:97%; height:9.2%; }   /* 题3 · 题干+三角图+选项 */
  49%, 67% { top:64%;   left:1%; width:97%; height:7.6%; }   /* 填空 · 题干+长方形图+第二行 */
  74%, 92% { top:81.8%; left:1%; width:97%; height:5%; }     /* 解答题 11 */
  100%     { top:25.2%; left:1%; width:97%; height:6.8%; }
}

/* ---------- 解题双模式按钮 ---------- */
.modebtn { flex:1; display:flex; align-items:center; gap:9px; padding:11px 12px; border-radius:var(--r-btn); background:var(--surface); box-shadow:inset 0 0 0 1.5px var(--sep); text-align:left; }
.modebtn i { font-size:22px; color:var(--accent-ink); flex:0 0 auto; }
.modebtn span { display:flex; flex-direction:column; line-height:1.25; }
.modebtn b { font-size:14.5px; font-weight:700; }
.modebtn small { font-size:11px; color:var(--sub); margin-top:2px; }
.modebtn--primary { background:var(--accent); box-shadow:none; }
.modebtn--primary i, .modebtn--primary b { color:#fff; }
.modebtn--primary small { color:rgba(255,255,255,.88); }
.modebtn:active { transform:translateY(1px); }

/* ---------- 今日待巩固 · 引用笔记卡 ---------- */
.reviewnote { display:block; width:100%; text-align:left; background:var(--surface); border-radius:14px; padding:14px 15px; box-shadow:0 2px 10px -2px rgba(14,21,18,.06); transition:transform .1s; }
.reviewnote:active { transform:scale(.99); }
.reviewnote__t { display:flex; align-items:center; gap:8px; font-size:15px; font-weight:700; color:var(--ink); }
.reviewnote__subj { font-size:11px; font-weight:600; color:var(--ink-2); background:var(--bg); padding:2px 8px; border-radius:7px; flex:0 0 auto; }
.reviewnote__due { font-size:11px; font-weight:600; color:#C77800; background:var(--amber-soft); padding:2px 7px; border-radius:7px; flex:0 0 auto; }
.reviewnote__arrow { margin-left:auto; color:var(--faint); font-size:20px; flex:0 0 auto; }
.reviewnote__q { margin-top:9px; padding-left:11px; border-left:3px solid #FFCB7A; font-size:12.5px; color:var(--ink-2); font-style:italic; line-height:1.55; }
.reviewnote--row { background:none; box-shadow:none; border-radius:0; padding:14px 16px; }
.reviewnote--row:active { transform:none; background:var(--bg); }
.reviewnote--sep { border-bottom:1px solid var(--sep); }

/* ---------- 学科大卡（全图沉浸 · 肖像铺满 + 底部渐变） ---------- */
.subjimm { position:relative; display:block; width:100%; aspect-ratio:16/9; border-radius:20px; overflow:hidden; box-shadow:0 12px 28px -12px rgba(14,21,18,.4); transition:transform .12s; }
.subjimm:active { transform:scale(.985); }
.subjimm__img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.subjimm__grad { position:absolute; inset:0; background:linear-gradient(to top, rgba(8,12,10,.85) 4%, rgba(8,12,10,.28) 40%, transparent 64%), linear-gradient(to right, rgba(8,12,10,.5), transparent 48%); }
.subjimm__badge { position:absolute; top:14px; right:14px; padding:5px 12px; border-radius:999px; font-size:12px; font-weight:700; color:#fff; box-shadow:0 2px 10px rgba(0,0,0,.22); }
.subjimm__info { position:absolute; left:18px; bottom:16px; text-align:left; }
.subjimm__name { font-size:27px; font-weight:800; color:#fff; letter-spacing:-.5px; line-height:1; text-shadow:0 2px 14px rgba(0,0,0,.35); }
.subjimm__person { font-size:13px; color:rgba(255,255,255,.9); margin-top:7px; text-shadow:0 1px 8px rgba(0,0,0,.4); }
.subjimm__arrow { position:absolute; right:16px; bottom:18px; color:#fff; font-size:24px; opacity:.92; }

/* ---------- 学科详情页 · 沉浸式大师 Header ---------- */
.subjhero { position:relative; display:block; width:100%; aspect-ratio:16/10; border-radius:20px; overflow:hidden; text-align:left; box-shadow:0 14px 30px -12px rgba(14,21,18,.45); transition:transform .12s; }
.subjhero:active { transform:scale(.99); }
.subjhero__img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.subjhero__grad { position:absolute; inset:0; background:linear-gradient(to top, rgba(8,12,10,.92) 6%, rgba(8,12,10,.2) 54%, transparent), linear-gradient(to right, rgba(8,12,10,.5), transparent 55%); }
.subjhero__info { position:absolute; left:18px; right:18px; bottom:60px; z-index:2; }
.subjhero__badge { display:inline-block; font-size:11px; font-weight:800; color:#0E1512; background:rgba(255,255,255,.94); padding:4px 11px; border-radius:999px; }
.subjhero__name { font-size:34px; font-weight:800; color:#fff; letter-spacing:-.6px; margin-top:9px; line-height:1; text-shadow:0 2px 14px rgba(0,0,0,.45); }
.subjhero__quote { font-size:12.5px; color:rgba(255,255,255,.88); margin-top:8px; font-style:italic; text-shadow:0 1px 6px rgba(0,0,0,.5); }
.subjhero__cta { position:absolute; left:16px; right:16px; bottom:16px; z-index:2; display:flex; align-items:center; justify-content:center; gap:6px; height:44px; border-radius:13px; background:rgba(255,255,255,.96); color:var(--ink); font-size:14.5px; font-weight:700; box-shadow:0 4px 14px rgba(0,0,0,.25); }
.subjhero__cta i { font-size:18px; color:var(--accent-ink); }

/* ---------- 学科列表 + 学科页 ---------- */
.subjcard__ava { position:relative; width:44px; height:44px; border-radius:50%; overflow:hidden; display:grid; place-items:center; flex:0 0 auto; }
.subjcard__ava svg { width:100%; height:100%; display:block; }
.subjcard__svg { display:block; width:100%; height:100%; }
.subjcard__ava img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.weakbox { display:flex; align-items:flex-start; gap:7px; margin-top:10px; padding:9px 11px; background:var(--amber-soft); border-radius:12px; font-size:12.5px; line-height:1.5; color:#8A5A00; }
.weakbox i { font-size:14px; flex:0 0 auto; margin-top:1px; color:var(--amber); }
.fromref { display:flex; align-items:flex-start; gap:7px; margin-top:8px; padding:9px 11px; background:var(--bg); border:1px dashed var(--faint); border-radius:12px; font-size:12.5px; line-height:1.5; color:var(--ink-2); cursor:pointer; }
.fromref i { font-size:14px; flex:0 0 auto; margin-top:1px; color:var(--accent-ink); }
.fromref:active { opacity:.6; }

/* 行内链接（正文中可点的强调词，如「家长中心」） */
.ilink { color:var(--accent-ink); font-weight:600; cursor:pointer; }
.ilink:active { opacity:.6; }

/* ---------- 家长验证门 · PIN 键盘 ---------- */
.gate__ico { width:64px; height:64px; border-radius:20px; background:var(--accent-soft); color:var(--accent-ink);
  display:grid; place-items:center; margin-top:6px; }
.gate__ico i { font-size:32px; }
.gate__title { font-size:20px; font-weight:800; letter-spacing:-.3px; color:var(--ink); margin-top:16px; }
.gate__sub { font-size:13.5px; line-height:1.5; color:var(--sub); text-align:center; margin-top:6px; max-width:264px; }

.pindots { display:flex; gap:16px; margin-top:26px; }
.pindots.shake { animation: pinShake .42s cubic-bezier(.36,.07,.19,.97); }
.pindot { width:14px; height:14px; border-radius:999px; background:transparent;
  border:1.5px solid var(--faint); transition:background .15s, border-color .15s, transform .15s; }
.pindot.on { background:var(--accent); border-color:var(--accent); transform:scale(1.05); }
@keyframes pinShake { 10%,90%{transform:translateX(-1px)} 20%,80%{transform:translateX(2px)}
  30%,50%,70%{transform:translateX(-5px)} 40%,60%{transform:translateX(5px)} }

.gate__hint { min-height:18px; margin-top:12px; font-size:13px; font-weight:600; color:var(--red); }

.keypad { display:grid; grid-template-columns:repeat(3,72px); gap:14px; margin-top:4px; }
.keypad__key { height:64px; border-radius:18px; background:var(--surface); font-size:26px; font-weight:600; color:var(--ink);
  box-shadow:0 1px 3px rgba(14,21,18,.06); transition:transform .08s, background .12s; }
.keypad__key:active { transform:scale(.94); background:var(--bg); }
.keypad__key i { font-size:24px; color:var(--ink-2); }
.keypad__key--ghost { background:transparent; box-shadow:none; pointer-events:none; }

.gate__link { margin-top:22px; font-size:14px; font-weight:600; color:var(--accent-ink); }
.gate__link:active { opacity:.6; }

/* ---------- 心愿星瓶 ---------- */
.starjar { width:64px; height:86px; flex:0 0 auto; filter:drop-shadow(0 3px 6px rgba(240,165,0,.18)); }
.starjar svg { display:block; }

/* ---------- 解题情感寄托弹窗 ---------- */
.emomask { position:absolute; inset:0; z-index:80; background:rgba(12,14,13,.5); backdrop-filter:blur(3px);
  display:flex; align-items:center; justify-content:center; padding:28px; }
.emocard { width:100%; max-width:300px; background:#fff; border-radius:26px; padding:22px 22px 20px;
  text-align:center; box-shadow:0 24px 60px rgba(0,0,0,.28); }
.emocard__jar { width:92px; height:116px; margin:0 auto 4px; }
.emocard__jar svg { display:block; }
.emocard__delta { display:inline-flex; align-items:center; gap:2px; font-size:13px; font-weight:800;
  padding:3px 12px; border-radius:999px; }
.emocard__delta.is-up { color:#E8A100; background:var(--amber-soft); }
.emocard__delta.is-down { color:var(--sub); background:#EEF0EF; }
.emocard__delta i { font-size:15px; }
.emocard__t { font-size:19px; font-weight:800; margin:12px 0 8px; letter-spacing:-.2px; color:var(--ink); }
.emocard__line { font-size:16px; line-height:1.7; color:var(--ink); padding:0 2px; }
.emocard__num { font-size:12px; color:var(--sub); margin-top:14px; }
.emocard__num b { color:#E8A100; font-size:14px; }
.emocard--win .jstar-new { transform-box:fill-box; transform-origin:center; animation:jstarPop .52s .06s both; }
@keyframes jstarPop { 0%{transform:scale(0) rotate(-40deg)} 55%{transform:scale(1.85) rotate(8deg)} 100%{transform:scale(1.35)} }
.emopop-enter-active { transition:opacity .22s ease; }
.emopop-leave-active { transition:opacity .18s ease; }
.emopop-enter-from, .emopop-leave-to { opacity:0; }
.emopop-enter-active .emocard { animation:emopopIn .34s cubic-bezier(.2,.9,.3,1.2); }
@keyframes emopopIn { from{transform:scale(.86) translateY(10px); opacity:.3} to{transform:none; opacity:1} }

/* ---------- 心愿罐：练习页入口 + 详情页 ---------- */
.jarentry { display:flex; align-items:center; gap:13px; width:100%; text-align:left;
  margin-top:14px; padding-top:15px; border-top:1px solid var(--sep); background:none; }
.jarentry__jar { width:44px; height:60px; flex:0 0 auto; filter:drop-shadow(0 2px 5px rgba(240,165,0,.2)); }
.jarentry__jar svg { display:block; }
.jarentry__main { flex:1; min-width:0; }
.jarentry__t { display:flex; align-items:baseline; gap:8px; }
.jarentry__t b { font-size:16px; font-weight:800; color:var(--ink); }
.jarentry__t span { font-size:14px; font-weight:700; color:#E8A100; }
.jarentry__s { font-size:12.5px; color:var(--sub); margin-top:2px; }
.jarentry:active { opacity:.6; }
/* 练习页瓶子：加星时最新一颗弹入，掉星时整瓶轻抖 */
.jarentry__jar.is-up .jstar-new { transform-box:fill-box; transform-origin:center; animation:jstarPop .52s .04s both; }
.jarentry__jar.is-down { animation:jarShake .42s ease; }
@keyframes jarShake { 0%,100%{transform:translateX(0) rotate(0)} 20%{transform:translateX(-3px) rotate(-2deg)} 50%{transform:translateX(3px) rotate(2deg)} 80%{transform:translateX(-2px) rotate(-1deg)} }
/* 从「已掌握」飞进瓶子的那颗星 */
.flystar { position:absolute; z-index:40; pointer-events:none; will-change:transform;
  filter:drop-shadow(0 3px 9px rgba(240,165,0,.55)); }
.flystar svg { display:block; }
/* 「已掌握」数字上涨：跳动 + 浮出 +1 */
.statbumpable { display:inline-block; transform-origin:center; will-change:transform; }
.statbump { animation:statBump .62s cubic-bezier(.3,1.5,.5,1); }
@keyframes statBump { 0%{transform:scale(1)} 35%{transform:scale(1.55) translateY(-3px); color:#12A150} 100%{transform:scale(1)} }
.statfloat { position:absolute; left:50%; top:-4px; transform:translateX(-50%); font-size:14px; font-weight:800;
  color:var(--accent-ink); pointer-events:none; animation:statFloat .92s ease-out forwards; }
@keyframes statFloat { 0%{opacity:0; transform:translate(-50%,6px) scale(.8)} 22%{opacity:1} 100%{opacity:0; transform:translate(-50%,-24px) scale(1.05)} }

.jarbig { width:118px; height:158px; margin:0 auto; filter:drop-shadow(0 6px 14px rgba(240,165,0,.22)); }
.jarbig svg { display:block; }

.jarrule { display:flex; align-items:flex-start; gap:12px; padding:10px 0; }
.jarrule + .jarrule { border-top:1px solid var(--sep); }
.jarrule__i { width:38px; height:38px; border-radius:11px; display:grid; place-items:center; flex:0 0 auto; margin-top:1px; }
.jarrule__i i { font-size:20px; }
.jarrule__t { font-size:15px; font-weight:700; color:var(--ink); line-height:1.4; }
.jarrule__s { font-size:12.5px; color:var(--sub); margin-top:3px; line-height:1.55; }

@media (prefers-reduced-motion: reduce) { * { transition:none !important; animation:none !important; } }
