/* ===== 快乐识字 本地版 · 样式
   视觉对齐原版 H5：暖橙渐变页头 / 米白底 / 白色 16px 圆角卡片 / 底部 Tab 栏 / 汉字楷体。
   设计原则：60-30-10（米白底·暖橙主色·青绿点缀）；大触控目标；适合 3-12 岁。
   色板沿用原版：--p #FF8A3D  --bg #FFF7EF  --ink #4A3B2A ...            */
:root {
  --p: #FF8A3D;          /* 主色：暖橙 */
  --p2: #FFB25E;         /* 渐变终点 */
  --bg: #FFF7EF;         /* 60% 页面底 */
  --card: #FFFFFF;       /* 卡片 */
  --ink: #4A3B2A;        /* 主文字（深咖） */
  --sub: #9C8B76;        /* 次要文字 */
  --ok: #4CAF7D;         /* 正确 / 已学 */
  --bad: #E5654F;        /* 错误 / 删除 */
  --blue: #5B9BD5;       /* 测验喇叭 */
  --line: #F5EDE2;       /* 分隔线 */
  --line2: #F5E6D3;      /* 选项描边 */
  --chipbg: #FFF1E0;     /* 药丸底 */
  --kaiti: "Kaiti SC", KaiTi, STKaiti, "KaiTi_GB2312", "PingFang SC", serif;
  --radius: 16px;
  --shadow: 0 2px 8px rgba(74, 59, 42, .06);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* hidden 属性必须永远生效：下面有若干 id/类选择器写了 display:flex|block，会反向盖掉浏览器默认的 [hidden] */
[hidden] { display: none !important; }
html { height: 100%; }
body {
  /* 注意：这里必须是 min-height。写成 height:100% 会让 body 只有一屏高，
     底部的 padding-bottom 失效，fixed 的 Tab 栏因此永久遮挡页脚内容。 */
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
input, select, button { font-size: inherit; color: inherit; }

/* ---------- 启动页 ---------- */
#boot {
  position: fixed; inset: 0; z-index: 500;
  background: linear-gradient(180deg, var(--p), var(--p2));
  display: flex; align-items: center; justify-content: center;
  transition: opacity .35s;
}
#boot.hide { opacity: 0; pointer-events: none; }
.boot-in { text-align: center; color: #fff; }
.boot-in .bi { font-size: 56px; }
.boot-in .bt { font-size: 22px; font-weight: 800; margin: 10px 0 6px; }
.boot-in .bs { font-size: 13px; opacity: .9; margin-bottom: 16px; }
.boot-bar { width: 180px; height: 6px; background: rgba(255, 255, 255, .35); border-radius: 3px; margin: 0 auto; overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; background: #fff; border-radius: 3px; animation: bootslide 1.1s ease-in-out infinite; }
@keyframes bootslide { 0% { transform: translateX(-100%);} 100% { transform: translateX(450%);} }

/* ---------- 顶部栏 ---------- */
.topbar {
  background: linear-gradient(135deg, var(--p), var(--p2));
  padding: 14px 16px 12px; color: #fff;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 10px rgba(255, 138, 61, .25);
}
.hrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.htitle { font-size: 19px; font-weight: 700; }
.hright { display: flex; gap: 8px; align-items: center; }
.pts { background: rgba(255, 255, 255, .25); border-radius: 20px; padding: 4px 12px; font-size: 14px; font-weight: 600; }
.chip {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .25); border: none; color: #fff;
  border-radius: 20px; padding: 4px 12px 4px 6px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip .avatar { font-size: 18px; }
.chip:active { transform: scale(.95); }

/* ---------- 内容 ---------- */
.content { padding: 14px; }
.view { display: none; }
.view.active { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }

.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.ct { font-size: 14px; font-weight: 700; color: var(--sub); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ct > span:first-child { color: var(--sub); }
.hint { font-size: 13px; color: var(--sub); line-height: 1.6; margin-bottom: 10px; }
.hint.sm { font-size: 12px; margin-bottom: 6px; }
.center { text-align: center; }

/* ---------- 今日 5 字 ---------- */
.tchips { display: flex; gap: 10px; }
.tchip {
  flex: 1; aspect-ratio: 1; border-radius: 14px; background: var(--chipbg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; cursor: pointer; border: 2px solid transparent; transition: transform .12s;
}
.tchip:active { transform: scale(.95); }
.tchip .z { font-size: 30px; font-weight: 700; font-family: var(--kaiti); }
.tchip .p { font-size: 11px; color: var(--sub); }
/* 当前选中：橙色描边。已学会：绿色。两者同时命中时以绿色为准（孩子需要知道“这个已经过了”），
   当前项另用底部小圆点做指示，避免用背景色抢掉“已学会”的反馈。 */
.tchip.cur:not(.done) { border-color: var(--p); background: #FFF4E8; }
.tchip.done { background: #E8F6EE; border-color: var(--ok); }
.tchip.cur::after {
  content: ""; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--p);
}
.tchip .ck {
  position: absolute; top: 4px; right: 4px; width: 16px; height: 16px;
  background: var(--ok); border-radius: 50%; color: #fff; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}
.pbar { height: 8px; background: #F2E8DB; border-radius: 4px; margin-top: 12px; overflow: hidden; }
.pfill { height: 100%; width: 0; background: linear-gradient(90deg, var(--p), var(--p2)); border-radius: 4px; transition: width .4s; }

/* ---------- 大字卡 ---------- */
.bigcard { text-align: center; padding: 20px 14px 16px; position: relative; }
.bz {
  font-size: 96px; font-weight: 700; line-height: 1.15;
  font-family: var(--kaiti); cursor: pointer; user-select: none;
}
.bz:active { transform: scale(.96); }
.bpy { font-size: 17px; color: var(--p); font-weight: 600; margin: 2px 0 6px; }
.bmeta { font-size: 12px; color: var(--sub); margin-bottom: 10px; }
.words { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.wchip {
  display: flex; align-items: center; gap: 4px;
  background: var(--chipbg); border-radius: 12px; padding: 6px 10px; font-size: 15px; cursor: pointer;
}
.wchip:active { transform: scale(.95); }
.wchip b { font-size: 15px; font-weight: 600; }
.spk {
  position: absolute; top: 12px; left: 12px; width: 34px; height: 34px;
  border: none; border-radius: 50%; background: #FFF4E8; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.spk::before { content: "🔊"; font-size: 16px; }
.spk:active { transform: scale(.9); }
.big-actions { margin-bottom: 10px; }
.big-actions .btn { width: 100%; }
.learned-tag {
  display: inline-block; color: var(--ok); font-weight: 800; font-size: 15px;
  background: #E8F6EE; border-radius: 20px; padding: 8px 22px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; background: linear-gradient(135deg, var(--p), var(--p2));
  color: #fff; border: none; border-radius: 22px; padding: 11px 30px;
  font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 3px 8px rgba(255, 138, 61, .35); transition: transform .12s;
}
.btn:active { transform: scale(.95); }
.btn.ghost { background: #fff; color: var(--p); border: 1.5px solid var(--p); box-shadow: none; }
.btn.ghost:active { background: #FFF4E8; }
/* 小按钮：必须保证 44px 以上高度，3-6 岁孩子手指粗，自检页实测到过 33px 难点中 */
.btn.sm { padding: 7px 16px; font-size: 13px; border-radius: 16px; min-height: 44px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.navrow { display: flex; gap: 10px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.mini { border: none; background: none; color: var(--bad); font-size: 14px; cursor: pointer; padding: 10px 12px; min-height: 44px; }
.mini.blue { color: var(--p); }
.inp {
  width: 100%; border: 1.5px solid #F0E2D0; border-radius: 12px; padding: 10px 12px;
  font-size: 14px; background: #FFFBF6; color: var(--ink); margin-top: 8px; outline: none;
}
.inp:focus { border-color: var(--p); }
.learn-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.learn-bar select { flex: 0 0 auto; max-width: 52%; border: 1.5px solid #F0E2D0; border-radius: 12px; padding: 8px 10px; font-size: 13px; background: #FFFBF6; }
.learn-bar input { flex: 1; border: 1.5px solid #F0E2D0; border-radius: 12px; padding: 8px 12px; font-size: 13px; background: #FFFBF6; outline: none; min-width: 0; }
.learn-bar input:focus { border-color: var(--p); }

/* ---------- 字表网格 ---------- */
/* 不用嵌套滚动（max-height + overflow）：在小屏上套两层滚动极易误操作，改为分页「显示更多」 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; padding: 2px; }
.cell {
  background: var(--chipbg); border-radius: 12px; padding: 8px 4px; text-align: center;
  cursor: pointer; position: relative; transition: transform .12s; border: 2px solid transparent;
}
.cell:active { transform: scale(.94); }
.cell .c-char { font-size: 26px; line-height: 1.2; font-family: var(--kaiti); font-weight: 700; color: var(--ink); }
.cell .c-py { font-size: 10px; color: var(--sub); }
.cell.done { background: #E8F6EE; border-color: var(--ok); }
.cell.master { background: #E8F6EE; border-color: var(--ok); }
.cell.done::after, .cell.master::after {
  content: "✓"; position: absolute; top: 2px; right: 4px; color: var(--ok); font-size: 11px; font-weight: 800;
}
.cell.master::after { content: "⭐"; font-size: 10px; }
.cell.wrong-dot::before {
  content: ""; position: absolute; top: 5px; left: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--bad);
}

/* ---------- 组词 / 测验 ---------- */
.qzhint { text-align: center; font-size: 14px; color: var(--sub); margin-bottom: 4px; }
.qz { font-size: 52px; font-weight: 700; text-align: center; padding: 14px 0; font-family: var(--kaiti); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.opt {
  background: var(--bg); border: 2px solid var(--line2); border-radius: 14px;
  padding: 14px 8px; text-align: center; font-size: 20px; cursor: pointer;
  font-weight: 600; transition: transform .12s;
}
.opt:active { transform: scale(.95); }
.opt.big { font-size: 30px; font-family: var(--kaiti); }
.opt.right { background: #E8F6EE; border-color: var(--ok); color: var(--ok); animation: pop2 .3s; }
.opt.wrong { background: #FDECEA; border-color: var(--bad); color: var(--bad); animation: shake .4s; }
.fb { text-align: center; margin-top: 12px; font-size: 15px; font-weight: 700; min-height: 22px; }
.fb.ok { color: var(--ok); }
.fb.no { color: var(--bad); }
@keyframes shake { 0%, 100% { transform: translateX(0);} 25% { transform: translateX(-6px);} 50% { transform: translateX(6px);} 75% { transform: translateX(-4px);} }
@keyframes pop2 { 0% { transform: scale(1);} 50% { transform: scale(1.07);} 100% { transform: scale(1);} }
.listen {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #8BC0E8);
  margin: 8px auto 4px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 3px 10px rgba(91, 155, 213, .4);
}
.listen:active { transform: scale(.92); }
.listen svg { width: 30px; height: 30px; }
.qend { text-align: center; padding: 10px 0; }
.qend .stars { font-size: 32px; letter-spacing: 3px; color: var(--p2); }
.qend .stars i { font-style: normal; color: #E8DCCB; }
.qend-score { font-size: 18px; font-weight: 800; margin: 8px 0; }
.qend-sub { font-size: 13px; color: var(--sub); }

/* ---------- 复习列表 ---------- */
.review-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.review-item:last-child { border-bottom: none; }
.review-item .rc { font-size: 34px; font-family: var(--kaiti); font-weight: 700; color: var(--p); }
.review-item .rm { flex: 1; font-size: 13px; color: var(--sub); min-width: 120px; }
/* 复习操作区：听 / 不认识 / 认识 三个等宽按钮，独占一行避免挤坏行高 */
.rv-acts { display: flex; gap: 8px; width: 100%; }
.rv-acts .btn { flex: 1; padding: 9px 4px; min-height: 44px; }

/* ---------- 我的 ---------- */
.me-head { display: flex; align-items: center; gap: 12px; }
.me-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #FFC46B, var(--p));
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.me-name { font-size: 16px; font-weight: 700; }
.me-sub { font-size: 12px; color: var(--sub); margin-top: 2px; }
.me-pts { margin-left: auto; font-size: 13px; color: var(--sub); }
.stat3 { display: flex; gap: 10px; text-align: center; }
.stat { flex: 1; background: var(--chipbg); border-radius: 14px; padding: 12px 4px; }
.stat .n { font-size: 22px; font-weight: 800; color: var(--p); }
.stat .l { font-size: 11px; color: var(--sub); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 10px; }
.cal-d {
  aspect-ratio: 1; border-radius: 8px; background: #F2E8DB; font-size: 10px;
  display: flex; align-items: center; justify-content: center; color: var(--sub);
}
.cal-d.on { background: var(--ok); color: #fff; font-weight: 700; }
.lvlprog { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12px; }
.lvlprog .ln { width: 78px; color: var(--sub); flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvlprog .lb { flex: 1; height: 8px; background: #F2E8DB; border-radius: 4px; overflow: hidden; }
.lvlprog .lf { display: block; height: 100%; background: var(--p); border-radius: 4px; }
.lvlprog .lv { width: 56px; text-align: right; color: var(--sub); flex: 0 0 auto; }
.wrong-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.wrong-chip {
  background: #FDECEA; border: 1.5px solid #F5C9C0; border-radius: 12px;
  padding: 6px 12px; text-align: center; cursor: pointer; min-width: 44px;
}
.wrong-chip b { font-size: 20px; font-family: var(--kaiti); color: var(--bad); }
.wrong-chip span { display: block; font-size: 10px; color: var(--sub); font-weight: 400; }
.rrow { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rrow:last-child { border-bottom: none; }
.rrow .rn { flex: 1; font-size: 14px; }
.rrow .rc { font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--p); }
.rrow .rd { font-size: 11px; color: var(--sub); white-space: nowrap; }
.rrow .cant { font-size: 11px; color: var(--sub); white-space: nowrap; }
.setrow { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.setrow:last-child { border-bottom: none; }
.avpick-row { display: flex; gap: 6px; flex-wrap: wrap; }
.avpick {
  width: 36px; height: 36px; border-radius: 50%; background: var(--chipbg);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  cursor: pointer; border: 2px solid transparent;
}
.avpick.on { border-color: var(--p); }
.adfree { text-align: center; font-size: 13px; color: var(--sub); padding: 8px 0 14px; }
.adfree a { color: var(--p); cursor: pointer; padding: 12px 8px; display: inline-block; }
/* 可点击的文字链接（如「忘记密码」）：需保证 44px 命中区 */
.link { color: var(--p); cursor: pointer; text-decoration: underline; display: inline-block; padding: 12px 10px; font-size: 13px; }
.row2 { display: flex; gap: 8px; margin-top: 8px; }
.row2 .btn { flex: 1; padding: 10px 4px; }
.mem-hero { background: linear-gradient(135deg, #FFC46B, var(--p)); border-radius: 16px; padding: 16px; color: #4A2E10; }
.mem-plan { font-size: 18px; font-weight: 800; }
.mem-exp { font-size: 12px; margin-top: 4px; opacity: .9; }
.mem-tag { display: inline-block; font-size: 11px; margin-top: 8px; padding: 3px 10px; border-radius: 12px; background: rgba(255, 255, 255, .45); }

/* ---------- 底部 Tab ---------- */
.tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; background: #fff; display: flex;
  box-shadow: 0 -2px 12px rgba(74, 59, 42, .08);
  padding-bottom: env(safe-area-inset-bottom); z-index: 30;
}
.tab {
  flex: 1; text-align: center; padding: 9px 0 7px; font-size: 11px; color: var(--sub);
  cursor: pointer; border: none; background: none; transition: transform .1s;
}
.tab .ic { font-size: 21px; display: block; line-height: 1.2; }
.tab.active, .tab.on { color: var(--p); font-weight: 700; }
.tab:active { transform: scale(.9); }

/* ---------- 弹层 ---------- */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 150; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card {
  position: relative; background: #fff; border-radius: 20px; padding: 22px 20px;
  width: 100%; max-width: 360px; max-height: 90vh; overflow-y: auto;
  animation: pop .28s;
}
.modal-card .close {
  position: absolute; top: 10px; right: 12px; border: none; background: none;
  font-size: 20px; color: var(--sub); cursor: pointer; line-height: 1;
}
.modal-t { font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 12px; }
.modal-t-sm { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
/* 描红舞台：Hanzi Writer 往 #hwBox 里注 SVG，降级描红用 canvas，二者互斥显示 */
.trace-stage {
  display: flex; align-items: center; justify-content: center;
  min-height: 300px; margin: 10px auto 0;
}
#hwBox {
  width: 100%; max-width: 300px; aspect-ratio: 1;
  background: #fff; border: 2px dashed var(--line2); border-radius: 16px; overflow: hidden;
}
#hwBox svg { display: block; width: 100%; height: 100%; touch-action: none; }
#traceCanvas {
  width: 100%; max-width: 300px; height: auto; aspect-ratio: 1; display: block;
  background: #fff; border: 2px dashed var(--line2); border-radius: 16px; touch-action: none;
}
.trace-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
/* 今日任务完成卡（绿色态） */
.goal-ok {
  text-align: center; background: #E8F6EE; border: 2px solid var(--ok);
  color: var(--ink); font-size: 16px;
}
.goal-ok b { font-size: 18px; color: var(--ok); }
.pwd-inp { text-align: center; font-size: 26px; letter-spacing: 12px; padding: 12px; }
.pwd-msg { text-align: center; font-size: 12px; color: var(--bad); min-height: 18px; margin: 6px 0; }
hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }

/* 宝贝档案 */
.profile-list { display: flex; flex-direction: column; gap: 8px; }
.profile-pill {
  display: flex; align-items: center; gap: 10px; background: var(--bg);
  border-radius: 12px; padding: 10px 14px; cursor: pointer; border: 2px solid transparent; font-size: 14px;
}
.profile-pill.active { border-color: var(--p); background: #FFF4E8; }
.profile-pill .avatar { font-size: 22px; }
.add-profile { display: flex; gap: 8px; flex-wrap: wrap; }
.add-profile input, .add-profile select {
  flex: 1; min-width: 90px; border: 1.5px solid #F0E2D0; border-radius: 12px;
  padding: 9px 10px; font-size: 13px; background: #FFFBF6;
}

/* ---------- 年龄引导 ---------- */
.onboard {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(180deg, var(--p), var(--p2) 30%, var(--bg) 30.1%);
  overflow-y: auto; padding: 60px 20px 40px;
}
.onboard[hidden] { display: none; }
.ob-logo { text-align: center; color: rgba(255, 255, 255, .9); font-size: 14px; font-weight: 600; }
.ob-title { text-align: center; color: #fff; font-size: 26px; font-weight: 800; margin: 10px 0 6px; }
.ob-sub { text-align: center; color: rgba(255, 255, 255, .85); font-size: 13px; margin-bottom: 26px; }
.ob-card {
  max-width: 420px; margin: 0 auto 12px; background: #fff; border-radius: 16px;
  padding: 14px 18px; display: flex; align-items: center; gap: 14px;
  cursor: pointer; box-shadow: 0 2px 8px rgba(74, 59, 42, .08); transition: transform .12s;
}
.ob-card:active { transform: scale(.98); }
.ob-ic { font-size: 26px; }
.ob-band { font-size: 17px; font-weight: 700; }
.ob-desc { font-size: 12px; color: var(--sub); margin-top: 2px; }
.ob-arrow { margin-left: auto; font-size: 22px; color: #D8C9B8; }
.ob-cancel { display: block; margin: 16px auto 0; }
.ob-foot { text-align: center; font-size: 11px; color: #B8A893; margin-top: 18px; }

/* ---------- 庆祝 ---------- */
.cele { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 160; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cele[hidden] { display: none; }
.cele-box {
  background: #fff; border-radius: 20px; padding: 30px 34px; text-align: center;
  animation: pop .35s; max-width: 320px;
}
.cele-box .e { font-size: 52px; }
.cele-box .t { font-size: 18px; font-weight: 800; margin: 8px 0 4px; }
.cele-box .s { font-size: 14px; color: var(--sub); line-height: 1.6; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0;} 100% { transform: scale(1); opacity: 1;} }

/* ---------- 护眼休息 ---------- */
#eye { position: fixed; inset: 0; background: rgba(255, 247, 239, .97); z-index: 300; display: flex; align-items: center; justify-content: center; text-align: center; }
#eye[hidden] { display: none; }
.eye-in { padding: 20px; }
.eye-ic { font-size: 46px; }
.eye-t { font-size: 17px; font-weight: 800; margin: 8px 0 4px; }
.eye-s { font-size: 13px; color: var(--sub); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%); background: rgba(40, 30, 20, .9); color: #fff;
  padding: 10px 18px; border-radius: 12px; font-size: 14px; z-index: 400;
  max-width: 84vw; text-align: center;
}
.toast[hidden] { display: none; }

/* ---------- AI 小老师 ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 380px; }
.chat-log { flex: 1; overflow-y: auto; padding: 4px 2px; }
.chat-log .msg { margin: 8px 0; max-width: 86%; padding: 10px 14px; border-radius: 14px; line-height: 1.6; font-size: 14px; white-space: pre-wrap; }
.chat-log .msg.user { background: linear-gradient(135deg, var(--p), var(--p2)); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-log .msg.bot { background: var(--bg); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-input { display: flex; gap: 8px; margin-top: 8px; }
.chat-input input { flex: 1; min-width: 0; border: 1.5px solid #F0E2D0; border-radius: 12px; padding: 10px 12px; font-size: 14px; background: #FFFBF6; outline: none; }
.chat-input input:focus { border-color: var(--p); }

/* ---------- 小屏微调 ---------- */
@media (max-width: 360px) {
  .bz { font-size: 84px; }
  .qz { font-size: 44px; }
  .opt.big { font-size: 26px; }
  .htitle { font-size: 17px; }
  .pts { padding: 4px 8px; font-size: 13px; }
}
