/* ============================================================
   汉语拼音在线学习 · 样式表
   卡通风格，适合小学一、二年级
   —— 注意：所有「选中/激活」状态都写死背景色与文字色，
      不依赖变量，避免出现「白字无背景 → 看不见」的问题。
   ============================================================ */
:root {
  --bg: #eaf7ff;
  --card: #ffffff;
  --ink: #1f3350;
  /* 拼音小帽子（.zhub 里的拼音行）：比 --ink-2 略深、与主字同色系，
     投影/远距离更清楚，又不至于和汉字"两行字抢眼" */
  --zhub: #3b5673;
  /* 辅助文字：原来 #6b7f99 在白底上只有 ~3.9:1，一年级小朋友看不清，
     加深到 #4a6379 —— 白底对比度 6.3:1，达到 WCAG AA。 */
  --ink-2: #4a6379;
  /* 触控最小尺寸：所有主要按钮都按 44×44 设计（一年级手指小，好点） */
  --tap: 44px;
  --line: #e3edf9;
  /* —— P2 收硬编码：全站重复最多的几个颜色收成变量（值与原来一字不差，外观不变）——
       以后想统一换配色只改这里；theme.css 是季节主题覆盖层，故意保留写死不动。
       ⚠️ 变量名先查过全文再定：--ok 早已存在(#22a86b)，所以深绿另起 --ok-deep，别撞名。 */
  --title: #1b4f86;      /* 卡片小标题深蓝 */
  --border: #dcebfb;     /* 卡片 / 输入框 / 下拉框描边 */
  --muted: #47637f;      /* 次要说明文字 */
  --line-soft: #e6f1fd;  /* 分隔虚线 / 浅描边 */
  --blue-mid: #2f6fb8;   /* 次级蓝（悬停 / 次级按钮） */
  --blue-deep: #2b7fe0;  /* 主蓝加深（选中态） */
  --ok-deep: #1f8f5d;    /* 正确 / 成功深绿（与已有的 --ok #22a86b 不同，别混） */

  --blue: #4a9eff;
  --green: #3fc97b;
  --orange: #ff8c42;
  --purple: #a06bff;
  --pink: #ff5f7e;
  --teal: #2cc0b0;
  --yellow: #ffc93c;

  --blue-soft: #eaf4ff;
  --green-soft: #e8faf0;
  --orange-soft: #fff2e6;
  --purple-soft: #f3edff;
  --pink-soft: #ffeef2;
  --teal-soft: #e5f8f5;
  --yellow-soft: #fff8e1;

  /* —— 分类色（全站统一「颜色 = 类别」，各页共用同一套）——
       声母 = 蓝 · 韵母 = 青 · 整体认读 = 橙 · 声调 = 紫
       注：韵母原用绿色，现改为「青」，把绿色专门留给下面的「正确 / 已学」，
           这样「分类色」与「反馈色」彻底分开，孩子不会把"绿色=韵母"和
           "绿色=答对"混在一起。 */
  --cat-sm: #4a9eff;      /* 声母 */
  --cat-ym: #2cc0b0;      /* 韵母 */
  --cat-zt: #ff8c42;      /* 整体认读 */
  --cat-tone: #a06bff;    /* 声调 */
  --cat-sm-soft: #eaf4ff;
  --cat-ym-soft: #e5f8f5;
  --cat-zt-soft: #fff2e6;

  /* —— 反馈色（独立于分类色）——
       正确 / 已学会 = 绿（--ok）；答错 = 温柔橙（--err，不用刺眼红，低龄不吓人）。
       反馈一律「颜色 + ✓ / ✗ 图标」双重编码，色盲孩子也能分辨。 */
  --ok: #22a86b;
  --ok-soft: #e8faf0;
  --err: #f2a33c;          /* 答错「再试一次」：温柔橙 */
  --err-soft: #fff4e4;     /* 答错底色：暖米色，不扎眼 */
  --err-ink: #a8611a;      /* 答错文字：暖褐，保证对比度 */

  --radius: 22px;
  --shadow: 0 4px 0 rgba(120, 160, 210, .18), 0 8px 20px rgba(90, 140, 200, .10);
  --shadow-lg: 0 6px 0 rgba(120, 160, 210, .22), 0 14px 28px rgba(90, 140, 200, .16);
  --font: "YouYuan", "幼圆", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --pinyin: "Andika PY", "Segoe UI", Arial, sans-serif;

  /* —— 统一响应式变量（批次一新增）——
     --topH  顶栏高度（批次五用 ResizeObserver 实时校正）
     --gutter 页面/栅格留白
     --side-w 侧栏宽度
     --content-max 内容最大宽度
     --card-min 卡片流式最小宽度（clamp 随视口缩放） */
  --topH: 64px;
  --gutter: 20px;
  --side-w: 260px;
  --content-max: 1280px;
  --card-min: clamp(96px, 19vw, 150px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
/* 横向溢出用 overflow-x: clip —— 它与 hidden 都能裁掉横向溢出，但 clip 不建立滚动容器：
   hidden 会让另一个轴的 overflow-y 被计算成 auto，body/html 变成“不滚动的滚动容器”，
   页面上所有 position:sticky（顶栏、侧栏、音节表四线三格）都会失效（第 38 轮实测验证）。 */
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #bfe7ff 0%, #dcf2ff 34%, #eefaff 62%, #f6fff4 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: clip;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--blue-mid); text-decoration: none; }

/* ---------- 卡通背景装饰 ---------- */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sky .sun {
  position: absolute; top: 74px; right: 4.4%;
  width: 96px; height: 96px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe89a, #ffc93c 62%, #ffb200);
  /* 原来三层辉光（最外一层 150px 范围）在低端设备上很吃 GPU，也容易抢焦点；
     减为两层、并收小范围 —— 保留暖意，不再"发大光" */
  box-shadow: 0 0 26px 8px rgba(255, 206, 92, .46), 0 0 60px 24px rgba(255, 216, 132, .2);
  animation: sunPulse 4.5s ease-in-out infinite;
}
@keyframes sunPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.sky .cloud {
  position: absolute; height: 46px; width: 120px; border-radius: 999px;
  background: #fff; opacity: .92;
  box-shadow: 0 4px 0 rgba(150, 190, 230, .18);
}
.sky .cloud::before, .sky .cloud::after {
  content: ""; position: absolute; background: #fff; border-radius: 50%;
  box-shadow: 0 4px 0 rgba(150, 190, 230, .18);
}
.sky .cloud::before { width: 56px; height: 56px; top: -26px; left: 18px; }
.sky .cloud::after { width: 40px; height: 40px; top: -18px; right: 20px; }
/* 只留 2 朵云飘动（c1/c2），另 2 朵静止 —— 多动画同时跑在老设备上会掉帧，
   而且背景越安静，孩子越容易把注意力放在拼音上 */
.sky .c1 { top: 90px; left: 4%; transform: scale(.9); animation: drift 46s linear infinite; }
.sky .c2 { top: 190px; left: 42%; transform: scale(1.15); animation: drift 62s linear infinite; }
.sky .c3 { top: 60px; left: 56%; transform: scale(.75); }
.sky .c4 { top: 300px; left: 18%; transform: scale(1.0); }
@keyframes drift { from { margin-left: -18vw; } to { margin-left: 108vw; } }
.sky .hills {
  position: absolute; left: -6%; right: -6%; bottom: 108px; height: 220px;
  background:
    radial-gradient(60% 100% at 22% 100%, #9fe08a 0 70%, transparent 71%),
    radial-gradient(52% 100% at 62% 100%, #b6e89f 0 70%, transparent 71%),
    radial-gradient(48% 100% at 92% 100%, #8edb7c 0 70%, transparent 71%);
}
.sky .grass {
  position: absolute; left: 0; right: 0; bottom: 0; height: 118px;
  background: linear-gradient(180deg, #b6e89f 0%, #9fe08a 45%, #8ad973 100%);
  border-radius: 60px 60px 0 0 / 34px 34px 0 0;
}
@media (prefers-reduced-motion: reduce) {
  .sky .cloud, .sky .sun { animation: none; }
}

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 4px solid #cdeaae;
  box-shadow: 0 6px 18px rgba(120, 170, 210, .16);
}
.brand { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; min-width: 0; }
.brand .logo svg { width: 28px; height: 28px; }
.brand-text h1 { font-size: clamp(13px, 1.5vw, 16px); font-weight: 800; letter-spacing: 0; color: var(--title); white-space: nowrap; }
.brand-text p { font-size: 11px; color: var(--ink-2); margin-top: 0; }
.logo { display: inline-flex; filter: drop-shadow(0 2px 0 rgba(120, 170, 210, .3)); }

/* 放不下就自动换到第二行：不再用横向滚动（那会冒出一条难看的滑动条，
   且藏起来后末尾按钮会被悄悄切掉）。宽屏仍是一行。 */
.main-nav { display: flex; gap: 5px; flex-wrap: wrap; overflow: visible; flex: 1 1 auto; justify-content: flex-start; min-width: 0; }
.main-nav { scrollbar-width: none; -ms-overflow-style: none; }
.main-nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
.nav-btn {
  padding: 7px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 700; color: var(--muted);
  background: #f1f7ff; border: 2px solid var(--border);
  white-space: nowrap; transition: transform .14s, background .14s, color .14s;
}
.nav-btn:hover { background: #e4f1ff; color: var(--blue-mid); transform: translateY(-1px); }
.nav-btn .ico { margin-right: 3px; }
/* 选中态：写死背景与文字色，保证对比度 */
.nav-btn.active {
  background: var(--blue); color: #ffffff; border-color: var(--blue-deep);
  box-shadow: 0 4px 0 var(--blue-deep);
}

/* ---------- 顶栏二级菜单（学拼音 / 拼读 / 拼音闯关 / 全部栏目） ----------
   桌面：鼠标移上去就出现；触屏：点一下出现，点别处收起。
   ⚠️ 顶栏 .main-nav 是 overflow-x:auto 的横向滚动条，绝对定位会被它裁掉，
      所以这里用 position:fixed，位置由 JS 按按钮的 rect 现算（app.js positionNavFly）。 */
.nav-item { position: relative; display: inline-flex; flex: 0 0 auto; }
.nav-caret { margin-left: 4px; font-size: 10px; opacity: .75; }
.nav-fly {
  display: none; position: fixed; z-index: 300;
  flex-direction: column; gap: 6px; padding: 8px; min-width: 178px;
  background: #fff; border: 3px solid var(--border); border-radius: 16px;
  box-shadow: 0 10px 26px rgba(60, 90, 130, .22);
}
.nav-item.open .nav-fly { display: flex; }
.nav-item.open > .nav-btn:not(.active) { background: #e4f1ff; color: var(--blue-mid); }   /* 菜单开着时父按钮也亮一下 */
@media (hover: hover) {
  .nav-item:hover .nav-fly { display: flex; }
}
/* 透明桥：补上按钮与二级菜单之间的 6px 间隙，鼠标从按钮移到菜单时不"中途断开"（否则会闪退够不着）。
   ⚠️ .nav-fly 是 position:fixed，按钮与菜单之间的空隙不属于 .nav-item，鼠标经过会丢失 :hover 并触发 mouseleave 收起。 */
.nav-item[data-fly]::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
.nav-sub {
  display: flex; align-items: center; gap: 8px; min-height: var(--tap);
  padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line-soft);
  background: #f6faff; color: var(--title); font-size: 15px; font-weight: 700;
  font-family: inherit; cursor: pointer; white-space: nowrap; text-align: left;
  transition: background .12s, border-color .12s;
}
.nav-sub:hover { background: #e4f1ff; border-color: #cfe4fb; }
.nav-sub.active { background: var(--blue); color: #fff; border-color: var(--blue-deep); }
.nav-sub .ns-ico { font-size: 17px; line-height: 1; }
/* 「全部栏目」＝ 11 个入口，横过来排两列，省高度 */
.nav-fly-wide { flex-direction: row; flex-wrap: wrap; width: 356px; }
.nav-fly-wide .nav-sub { flex: 1 1 158px; }

/* ---------- 发音不可用提示 ---------- */
.audio-notice {
  position: relative; z-index: 2;
  max-width: 1080px; margin: 12px auto 0; padding: 12px 18px;
  background: #fff8e6; border: 3px solid #ffe0a3; border-radius: 16px;
  color: #9a6b00; font-size: 14px; line-height: 1.7;
}
.audio-notice b { color: #c06a1e; }
.audio-notice .how { display: block; margin-top: 4px; color: #7a5a13; }
.audio-notice.ok { background: var(--green-soft); border-color: #b6e8cc; color: var(--ok-deep); }

/* ---------- 布局 ---------- */
.layout {
  position: relative; z-index: 1;
  max-width: var(--content-max); margin: 16px auto 0; padding: 0 var(--gutter);
  display: flex; gap: var(--gutter); align-items: flex-start;
}
#main { flex: 1 1 auto; min-width: 0; }
/* 首页专属：让工作台右上角渐隐，太阳完整透出；只在大屏、且只在首页生效 */
@media (min-width: 1024px) {
  .workbench.is-home {
    -webkit-mask-image: radial-gradient(ellipse 700px 460px at 96.5% 8.5%, rgba(0,0,0,0) 0, rgba(0,0,0,0) 34%, rgba(0,0,0,.36) 55%, rgba(0,0,0,.82) 74%, rgba(0,0,0,1) 88%), radial-gradient(ellipse 420px 250px at 74% 34%, rgba(0,0,0,1) 0, rgba(0,0,0,1) 52%, rgba(0,0,0,0) 100%);
    mask-image: radial-gradient(ellipse 700px 460px at 96.5% 8.5%, rgba(0,0,0,0) 0, rgba(0,0,0,0) 34%, rgba(0,0,0,.36) 55%, rgba(0,0,0,.82) 74%, rgba(0,0,0,1) 88%), radial-gradient(ellipse 420px 250px at 74% 34%, rgba(0,0,0,1) 0, rgba(0,0,0,1) 52%, rgba(0,0,0,0) 100%);
  }
}
/* 白色「工作台」容器：把学习区整体托在一块干净的白色面板上，便于小朋友专注 */
.workbench {
  background: var(--card);
  border: 3px solid var(--line-soft);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: clamp(14px, 2.4vw, 28px);
}
.view { display: none; }
/* 淡入只动透明度、不动 transform：
   transform 会让 .view 成为 fixed 元素的包含块（position:fixed 相对它定位），
   音节表四线三格悬浮用的是 JS fixed，必须保证任何时刻 .view 都没有 transform。 */
.view.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sidebar { flex: 0 0 var(--side-w); display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--topH) + 12px); }
.side-card {
  background: var(--card); border-radius: var(--radius); padding: 14px 16px;
  border: 3px solid var(--line-soft); box-shadow: var(--shadow);
}
.side-card h3 { font-size: 15px; margin-bottom: 10px; color: var(--title); }
.side-card ul { list-style: none; }
.side-card li { font-size: 13px; color: var(--ink-2); padding: 6px 0; border-bottom: 2px dashed #eef4fb; }
.side-card li:last-child { border-bottom: none; }

/* ---------- 今日复习（侧栏错音清单） ---------- */
.tr-tip { font-size: 12px; color: var(--ink-2); margin: 0 0 8px; }
.tr-empty { font-size: 13px; color: var(--ok-deep); font-weight: 700; margin: 2px 0; }
.tr-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 2px dashed #eef4fb;
}
.tr-item:last-child { border-bottom: none; }
.tr-py {
  flex: 1 1 auto; min-width: 0; font-family: var(--pinyin);
  font-size: 18px; font-weight: 700; color: var(--title);
}
.tr-cnt { flex: 0 0 auto; font-size: 11px; color: var(--pink); font-weight: 700; }
.tr-play, .tr-ok {
  flex: 0 0 auto; min-height: var(--tap); min-width: 44px;   /* 可点区域 ≥44px */
  border-radius: 12px; cursor: pointer; font-weight: 800; font-size: 13px;
  border: 2px solid var(--border); background: #fafcff; color: var(--blue-mid);
}
.tr-play { font-size: 18px; }
.tr-ok { background: var(--green-soft); border-color: #b6e8cc; color: var(--ok-deep); padding: 0 10px; }
.tr-play:active, .tr-ok:active { transform: scale(.96); }

/* ---------- 今日复习「整页」（首页入口进来） ---------- */
.rv-wrap { max-width: 720px; margin: 0 auto; padding: 4px 2px 10px; }
.rv-count { font-size: 13px; font-weight: 800; color: var(--pink); }
.rv-tip { font-size: 14px; color: var(--ink-2); margin: 0 0 12px; }
.rv-card { text-align: center; }
.rv-empty-ico { font-size: 46px; line-height: 1; margin-bottom: 8px; }
.rv-empty { font-size: 18px; font-weight: 800; color: var(--ok-deep); margin: 0 0 6px; }
.rv-sub { font-size: 13px; color: var(--ink-2); margin: 0 0 14px; }
.rv-list { display: flex; flex-direction: column; gap: 10px; }
.rv-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 3px solid var(--line-soft); border-radius: 18px;
  box-shadow: var(--shadow); padding: 10px 12px;
}
.rv-num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: #eaf4ff; color: var(--blue-deep); font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.rv-py {
  flex: 1 1 auto; min-width: 0; font-family: var(--pinyin);
  font-size: 26px; font-weight: 700; color: var(--title);
}
.rv-cnt { flex: 0 0 auto; font-size: 12px; font-weight: 800; color: var(--pink); }
.rv-play, .rv-ok {
  flex: 0 0 auto; min-height: var(--tap); min-width: 48px;   /* 可点区域 ≥44px */
  border-radius: 14px; cursor: pointer; font-weight: 800; font-size: 14px;
  border: 2px solid var(--border); background: #fafcff; color: var(--blue-mid);
}
.rv-play { font-size: 20px; }
.rv-ok { background: var(--green-soft); border-color: #b6e8cc; color: var(--ok-deep); padding: 0 14px; }
.rv-play:active, .rv-ok:active { transform: scale(.96); }
.rv-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.rv-actions .tool-btn { min-height: var(--tap); }
@media (max-width: 639px) {
  .rv-py { font-size: 22px; }
  .rv-item { gap: 8px; padding: 9px 10px; }
}

.side-tip { font-size: 12px; color: var(--ink-2); margin-top: 8px; line-height: 1.7; }
.rule-text { font-size: 13px; color: var(--muted); margin: 8px 0; line-height: 2; }
.set-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink-2); margin: 8px 0; }
.set-row select {
  font-family: inherit; font-size: 13px; padding: 5px 8px; border-radius: 10px;
  border: 2px solid var(--border); background: #fafcff; color: var(--ink);
}
/* 显示模式：文字在上、下拉在下，省横向空间（不影响其它 set-row） */
.set-row.set-stack { flex-direction: column; align-items: stretch; gap: 4px; }
.set-row.set-stack select { width: 100%; box-sizing: border-box; }
/* 全局音量（整行可点，滑块 ≥44px 触摸目标）
   ⚠️ 这是「音量被调成 0 导致没声音」时唯一能一眼看出来的地方，别删。 */
.vol-wrap { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: var(--tap); }
#volRange {
  -webkit-appearance: none; appearance: none;
  width: 108px; height: 6px; margin: 0; border-radius: 999px; cursor: pointer;
  background: #d7e3f1; outline: none;
}
#volRange::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%; background: #2f8adf;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .28); cursor: pointer;
}
#volRange::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: #2f8adf;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .28); cursor: pointer;
}
#volRange::-moz-range-track { height: 6px; border-radius: 999px; background: #d7e3f1; }
#volRange:focus-visible { box-shadow: 0 0 0 3px rgba(47, 138, 223, .35); }
#volNum { flex: 0 0 42px; text-align: right; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
#volRange[data-zero="1"]::-webkit-slider-thumb { background: #b9c6d4; }
#volRange[data-zero="1"]::-moz-range-thumb { background: #b9c6d4; }
#volNum[data-zero="1"] { color: #c0392b; font-weight: 800; }
/* 答题反馈音总开关（卡通小开关，整行可点，≥44px 触摸目标） */
.set-switch { cursor: pointer; user-select: none; padding: 6px 0; }
.set-switch .switch { position: relative; display: inline-block; width: 50px; height: 28px; flex: 0 0 auto; }
.set-switch .switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.set-switch .slider {
  position: absolute; inset: 0; border-radius: 999px; background: #d7e3f1;
  transition: background .2s; pointer-events: none;
}
.set-switch .slider::before {
  content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s;
}
.set-switch .switch input:checked + .slider { background: #36c47a; }
.set-switch .switch input:checked + .slider::before { transform: translateX(22px); }

/* ---------- 通用面板 ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 4px 0 14px; }
.section-head h2 { font-size: clamp(18px, 2.6vw, 22px); color: var(--title); letter-spacing: .5px; }
/* 面板里的说明文字统一用一个可读的深蓝灰（原来各处深浅不一，有的只有 2.5:1） */
.desc { color: var(--ink-2); }
.section-head .desc { font-size: 13px; color: var(--ink-2); }

/* 每屏的强引导横幅：用一句口语化的提示 + 一个大按钮，告诉小朋友「现在该做什么」 */
.view-cta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(100deg, #eaf4ff 0%, #f1ecff 100%);
  border: 3px solid #d8e8ff; border-radius: 18px;
  padding: 12px 16px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.view-cta .vc-ico { font-size: 30px; line-height: 1; flex: 0 0 auto; }
.view-cta .vc-text { flex: 1 1 160px; min-width: 150px; font-size: 15px; font-weight: 700; color: var(--title); line-height: 1.5; }
.view-cta .vc-btn { flex: 0 0 auto; white-space: nowrap; }
.view-cta .vc-close { display: none; }        /* ✕ 只在手机版（浮层形态）出现 */
/* 专注模式（答题/闯关）下，引导横幅让位给题目 */
body.focus-mode .view-cta { display: none; }

.panel {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  border: 3px solid var(--line-soft); box-shadow: var(--shadow); margin-bottom: 18px;
}

/* 子标签页 */
.subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.subtab {
  padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 700;
  background: #eef4fb; color: var(--muted); border: 2px solid var(--border); transition: all .16s;
}
.subtab:hover { background: #e2edfb; }
.subtab.blue.active { background: var(--blue); color: #fff; border-color: var(--blue-deep); box-shadow: 0 3px 0 var(--blue-deep); }
.subtab.green.active { background: var(--green); color: #fff; border-color: #2bab63; box-shadow: 0 3px 0 #2bab63; }
.subtab.teal.active { background: var(--cat-ym); color: #fff; border-color: #1f9e91; box-shadow: 0 3px 0 #1f9e91; }
.subtab.orange.active { background: var(--orange); color: #fff; border-color: #e0721f; box-shadow: 0 3px 0 #e0721f; }
.subtab.purple.active { background: var(--purple); color: #fff; border-color: #8551e6; box-shadow: 0 3px 0 #8551e6; }

/* 分类筛选 */
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-chip { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #f0f5fb; color: var(--muted); border: 2px solid #e3eefb; }
.filter-chip.active { background: var(--green); color: #fff; border-color: #2bab63; }

/* 展示方式切换（学拼音 / 声调） */
.learn-modes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.learn-modes .lm-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.mchip { padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #f0f5fb; color: var(--muted); border: 2px solid #e3eefb; min-height: var(--tap); cursor: pointer; }
.mchip.active { background: var(--blue); color: #fff; border-color: var(--blue-deep); }

/* 声调表：一屏全部时横排展示所有声调卡，隐藏翻页箭头与圆点 */
#view-tone.tone-all .tone-carousel { flex-wrap: wrap; }
/* 窄屏不能横向撑开：5 张卡自动换行（原来 nowrap 把整页撑到 836px，390 视口下右侧全被切掉） */
#view-tone.tone-all .tc-track { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 6px; align-items: stretch; min-width: 0; }
#view-tone.tone-all .tone-carousel .tone-slide { display: block; flex: 1 1 0; min-width: 150px; }
#view-tone.tone-all .tone-carousel .tc-arrow { display: none; }
#view-tone.tone-all .tc-dots { display: none; }

/* 学拼音：展示方式并进工具条同一行，不再单独占一层导航 */
.toolbar .learn-modes { margin-bottom: 0; }

/* 学拼音：「分屏展示 / 一屏全部」合并成一个按钮 ——
   只显示「当前这一条」，另一条仍留在 DOM 里（不删元素，测试与无障碍照旧能点到），点一下来回切。
   ::before 的 ⇄ 只加在视觉上，不影响 textContent（test_page 断言的是纯文案「一屏全部」）。 */
#view-learn .learn-modes .mchip:not(.active) { display: none; }
#view-learn .learn-modes .mchip.active::before { content: '⇄ '; opacity: .7; }

/* 学拼音：「▶ 连读全部 / ⏸ 暂停 / ▶ 继续」合成同一个键（#playAll），
   原来的独立暂停键不再显示（元素保留，连读控制器仍绑定它）。 */
#view-learn #learnPause { display: none; }

/* 写一写：「一笔一笔描 / 整字自由描」合并成一个按钮（和学拼音的「展示方式」同一套做法）——
   只显示当前这条，另一条留在 DOM 里，点当前这条就是换另一种。 */
#writeModes .mchip:not(.active) { display: none; }
#writeModes .mchip.active::before { content: '⇄ '; opacity: .7; }
/* 写一写：「✍️ 笔顺」和「✏️ 回描红」是同一颗键 —— 正在放笔顺动画时它变成回描红，
   所以动画下面不再单挂一颗「✏️ 回描红」。 */
#writeStroke.is-back { background: #eef6ff; border-color: #cfe4ff; color: #1f6fd0; font-weight: 800; }

/* ---------- 手机端：学拼音顶部压成「两行」 ----------
   原来顶部叠了三层：4 个分类入口（折成 2×2）+ 展示方式 + 连读/停止/随机（还会再折行）。
   现在 ≤639px 只有两行：
     第一行 = 声母 / 韵母 / 整体认读 / 按课学（一行 4 个入口）
     第二行 = ⇄ 一屏全部 ｜ ▶ 连读全部 ｜ ⏹ 停止 ｜ 🎲 随机读一个
   只用 CSS 实现，不动 DOM、不动文案：
   · 入口的「拼音小帽子」收起（底部那 6 个 tab 本来也没有拼音），汉字仍是主视觉；
   · 数量「（23个）」用 ::before/::after 排成第二行，长标签「整体认读音节」显示成「整体认读」
     —— 原文案完整留在 DOM 里，只是视觉上换短的，读屏和「按文案找元素」的测试都不受影响。
   桌面一行放得下，保持原样（拼音帽子照旧）。 */
@media (max-width: 639px) {
  #view-learn > .subtabs {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px;
  }
  #view-learn > .subtabs .subtab {
    display: flex; align-items: center; justify-content: center;
    padding: 4px 2px; border-radius: 14px; font-size: 13px; white-space: nowrap; text-align: center;
  }
  #view-learn > .subtabs .subtab .zhub { font-size: 0; }
  #view-learn > .subtabs .subtab .zhub > i { display: none; }
  #view-learn > .subtabs .subtab .zhub::before { font-size: 13px; line-height: 1.2; }
  #view-learn > .subtabs .subtab .zhub::after { font-size: 10.5px; line-height: 1.2; opacity: .85; }
  #view-learn > .subtabs .subtab[data-sub="sm"] .zhub::before { content: '声母'; }
  #view-learn > .subtabs .subtab[data-sub="sm"] .zhub::after { content: '（23个）'; }
  #view-learn > .subtabs .subtab[data-sub="ym"] .zhub::before { content: '韵母'; }
  #view-learn > .subtabs .subtab[data-sub="ym"] .zhub::after { content: '（24个）'; }
  #view-learn > .subtabs .subtab[data-sub="zt"] .zhub::before { content: '整体认读'; }
  #view-learn > .subtabs .subtab[data-sub="zt"] .zhub::after { content: '（16个）'; }
  #view-learn > .subtabs .subtab[data-sub="lesson"] .zhub::before { content: '📖 按课学'; }

  /* 第二行：工具条排成一行（前 3 个按内容宽度、最后一个吃掉余下的宽度）。
     这样「⏹ 停止」不占多余宽度，「▶ 连读全部 / ⇄ 一屏全部」也不会被挤成两行；
     最长的「🎲 随机读一个」拿到余量后折成两行，整行仍然只有一个高度，不溢到卡片外。
     「展示方式」四个字省掉：⇄ 已经表示这个键可以来回切。 */
  #view-learn .toolbar {
    display: grid; grid-template-columns: auto auto auto minmax(0, 1fr);
    gap: 5px; align-items: stretch;
  }
  #view-learn .toolbar .learn-modes { display: contents; }   /* 让 chip 直接成为网格第 1 格 */
  #view-learn .toolbar .lm-label { display: none; }
  #view-learn .toolbar .mchip,
  #view-learn .toolbar .tool-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 0; padding: 4px 6px; font-size: 12px; white-space: nowrap;
  }
  #view-learn .toolbar .tool-btn .zhub { font-size: 12px; }
  #view-learn .toolbar .tool-btn .zhub > i { display: none; }
  /* 最长的那个允许折行（「🎲 随机」/「读一个」），其余保持一行不被拆字 */
  #view-learn .toolbar #playOne { white-space: normal; padding: 4px 4px; line-height: 1.15; }
}
/* 375px 及以下：一行排 4 个会把字挤成单字一行 —— 干脆排成 2×2，两个都看得清 */
@media (max-width: 375px) {
  #view-learn .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-learn .toolbar #playOne { white-space: nowrap; }
}

/* 按钮 */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tool-btn {
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: #fff; color: #33506e; border: 2px solid var(--border); transition: all .14s;
}
.tool-btn:hover { border-color: var(--blue); color: var(--blue-mid); transform: translateY(-1px); }
.tool-btn.primary { background: var(--blue); color: #fff; border-color: var(--blue-deep); box-shadow: 0 4px 0 var(--blue-deep); }
.tool-btn.primary:hover { background: #3d90f5; color: #fff; }
.tool-btn.primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--blue-deep); }

/* ---------- 连读控制：暂停 / 继续 / 停止 ---------- */
.tool-btn.seq-btn:disabled { opacity: .45; cursor: default; transform: none; border-color: #e6eef8; color: #9ab0c8; }
.tool-btn.seq-btn:disabled:hover { border-color: #e6eef8; color: #9ab0c8; transform: none; }
.tool-btn.seq-btn.is-paused { background: #ff9f43; border-color: #f3902f; color: #fff; box-shadow: 0 4px 0 #f3902f; }
.tool-btn.seq-btn.is-paused:hover { background: #ffab5c; color: #fff; }

/* 连读时，高亮"正在读"的那一项 */
.seq-active { outline: 3px solid var(--blue); outline-offset: 2px; }
.card.seq-active { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ---------- 拼音卡片 ---------- */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); }
.card {
  position: relative; background: var(--card); border-radius: 20px;
  padding: 12px 8px 10px;
  border: 3px solid var(--line-soft); box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card:active { transform: translateY(1px) scale(.98); }
/* 按下反馈：一点就有"陷下去"的感觉，小朋友确认自己点中了 */
.filter-chip:active, .mchip:active { transform: scale(.95); }
.quiz-opt:active { transform: scale(.97); }
.t4-card:active { transform: scale(.94); }
/* 字母卡描边 = 分类色（淡彩）：声母蓝 / 韵母青 / 整体认读橙 */
.card.sm { border-color: #cfe6ff; }
.card.yun { border-color: #bdeee6; }
.card.zt { border-color: #ffe0c2; }
/* 已学：绿色描边 + 浅绿底，字母仍为深色，保证可读 */
.card.learned { border-color: var(--green); background: #f3fdf7; }
.card.learned .sige-svg .pytext { fill: #17804f; }
.card .badge {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  opacity: 0; transform: scale(.4); transition: all .2s;
}
.card.learned .badge { opacity: 1; transform: scale(1); }
.card .sige-svg { --u: 17px; }
/* 呼读音例字降级为小标签（一年级不认"玻坡摸佛"，这些字是给家长/老师看的）；
   主视觉 = 四线三格字母 + 播放按钮 */
/* 呼读音例字（玻坡摸佛…）一年级并不认，本来就是给家长/老师看的：
   挪到卡片左上角当角标，不再占卡片主轴的一行。 */
.card .zi {
  position: absolute; top: 8px; left: 9px; z-index: 1;
  font-size: 11px; font-weight: 700; color: var(--ink-2);
  background: #f0f5fb; border-radius: 999px; padding: 0 7px;
  line-height: 1.6; opacity: .85;
}
/* 主动作「点读」：整张卡片本来就能点，但需要一个一眼看得见的按钮。
   改成实心主色胶囊 —— 卡片里对比度最高的元素（原来是 44px 浅蓝小圆，反而最弱）。 */
.card .spk {
  font-size: 14px; font-weight: 800; line-height: 1; opacity: 1; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 40px; min-width: 44px; padding: 0 14px; margin-top: 4px; border-radius: 999px;
  background: var(--blue); border: 2px solid var(--blue-deep); color: #fff;
  box-shadow: 0 3px 0 var(--blue-deep);
  transition: transform .15s, background .15s;
}
.card:hover .spk { background: #3d90f5; transform: translateY(-1px); }

/* 播放跟随：正在响的卡 = 浅蓝底 + 蓝边 + 字母变深蓝 + 轻轻呼吸，
   让小朋友的眼睛能跟着"正在读的那张卡"走（已学绿卡播放时蓝底优先） */
.card.seq-active {
  background: var(--blue-soft);
  border-color: var(--blue);
}
.card.seq-active .sige-svg .pytext { fill: #174f96; }
.card.seq-active .sige-svg { animation: seqPulse 1.1s ease-in-out infinite; }
@keyframes seqPulse { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }
@media (prefers-reduced-motion: reduce) { .card.seq-active .sige-svg { animation: none; } }

/* 四线三格（SVG 精确定位：基线严格落在第三线，x-height 等于中格） */
.sige-svg {
  --u: 18px;
  display: block; height: calc(var(--u) * 3); width: auto; max-width: 100%;
  margin: 0 auto; overflow: visible;
}
/* 四线三格线：原来 #b3d0ec / 1.2 对白底只有约 1.6:1，投影或投屏上几乎看不出格线；
   改成 #5b8fbf（约 3.2:1）+ 加粗，仍比字母浅，不会抢主视觉 */
.sige-svg .l4 { stroke: #5b8fbf; stroke-width: 2; }
.sige-svg .pytext { font-family: var(--pinyin); font-weight: 700; fill: #1d4a7a; }
.sige-svg.purple .pytext { fill: #6a3fc0; }
.sige-svg.pink .pytext { fill: #d93a60; }
.sige-svg.teal .pytext { fill: #0d7a6f; }

/* ---------- 声调练习 ---------- */
.tone-big { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tone-big .sige-svg { --u: 28px; margin: 6px 0; }
.tone-name { font-size: 15px; font-weight: 700; color: var(--title); }
.tone-name .mark { color: #8551e6; font-family: var(--pinyin); }
.tone-alias { font-size: 13px; color: var(--ink-2); }
.hl { color: #d93a60; font-family: var(--pinyin); }
/* 声调表：说明与「正在练」压成同一行，顶部筛选区不再占掉半屏 */
.tone-pickbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tone-pickbar .desc { margin: 0; }
.tone-example { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

/* ---------- 声调：顶部三个栏目 + 「筛选」下拉（与拼读页同款） ---------- */
/* 标题行右侧的筛选按钮统一走 .blend-fil + .cat-more.blend-fil-btn（全平台显示） */
.section-head .blend-fil { margin-left: auto; }
/* 顶部三个栏目（韵母 / 声母 / 整体认读）：比分类胶囊再大一档，点谁就练谁 */
.tone-kind-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tone-kind-bar .kind-chip { padding: 8px 18px; font-size: 16px; border-radius: 14px; }
/* 窄屏：标题只跟「筛选」一行，说明文字换到第二行占满整行 */
@media (max-width: 639px) {
  #view-tone .section-head h2 { order: 1; }
  #view-tone .section-head .blend-fil { order: 2; }
  #view-tone .section-head .desc { order: 3; flex: 1 1 100%; }
}

.tone-drawer-sec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tone-drawer-sec + .tone-drawer-sec { margin-top: 10px; }
.tone-drawer-k {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 800; color: #6b3fbf;
  background: var(--purple-soft); border: 2px solid #e6d8ff; border-radius: 999px;
  padding: 3px 10px;
}
.example-chip {
  font-size: 15px; padding: 5px 12px; border-radius: 12px;
  background: var(--purple-soft); border: 2px solid #ddccff; color: #6a3fc0; font-weight: 700;
  transition: all .14s;
}
.example-chip:hover { background: var(--purple); border-color: #8551e6; color: #fff; }
.example-chip.active { background: var(--purple); border-color: #8551e6; color: #fff; box-shadow: 0 2px 0 #8551e6; }
.example-chip.dim { opacity: .55; }

.yunmu-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.yunmu-pick {
  padding: 7px 13px; border-radius: 999px; font-family: var(--pinyin);
  font-size: 16px; font-weight: 700; background: #f0f5fb; color: var(--muted); border: 2px solid #e3eefb;
}
/* 韵母选择器 → 用韵母的分类色（青），与「韵母=青」保持一致 */
.yunmu-pick.active { background: var(--cat-ym); color: #fff; border-color: #1f9e91; box-shadow: 0 3px 0 #1f9e91; }

.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 460px; margin: 12px auto 0; }
.choice-btn {
  padding: 16px; border-radius: 18px; font-family: var(--pinyin); font-size: 26px; font-weight: 700;
  background: #f5f8fc; border: 2px solid var(--border); color: #1d4a7a; transition: all .14s;
}
.choice-btn:hover { border-color: var(--purple); }
/* 反馈色：正确 = --ok（绿）、错误 = --err（红），统一走变量，与分类色分离 */
.choice-btn.right { background: var(--ok-soft); border-color: var(--ok); color: #17804f; }
.choice-btn.wrong { background: var(--err-soft); border-color: var(--err); color: var(--err-ink); }

.quiz-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 460px; margin: 12px auto 0; }
.quiz-opt {
  padding: 16px; border-radius: 18px; font-family: var(--pinyin); font-size: 23px; font-weight: 700;
  background: #f5f8fc; border: 2px solid var(--border); color: #1d4a7a; transition: all .14s;
}
.quiz-opt:hover { border-color: var(--blue); }
.quiz-opt.right { background: var(--ok-soft); border-color: var(--ok); color: #17804f; }
/* 错到 2 次后「给台阶」：把正确答案亮出来（描边加粗 + 轻轻跳动一下） */
.quiz-opt.right.reveal { box-shadow: 0 0 0 4px rgba(63, 201, 123, .28); animation: revealPop .5s ease; }
@keyframes revealPop { 0% { transform: scale(1); } 45% { transform: scale(1.07); } 100% { transform: scale(1); } }
.qz-reveal { font-size: 14.5px; color: #17804f; font-weight: 700; }
.qz-reveal b { font-family: var(--pinyin); font-size: 20px; }

/* ---------- 小测验：开始前的设置区（选范围 / 选题数 / 规则说明） ---------- */
.qz-setup { padding: 14px 16px 10px; }
.qz-setup-head { display: flex; align-items: center; gap: 8px; }
.qz-setup-tip { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); }
/* 「? 规则」按钮：44px 触摸目标（一年级手指小，别做成小圆点） */
.qz-help {
  flex: 0 0 auto; width: var(--tap); height: var(--tap); min-width: var(--tap);
  padding: 0; border-radius: 999px;
  border: 2px solid #d5e8ff; background: var(--blue-soft); color: var(--title);
  font-family: inherit; font-size: 17px; font-weight: 800; line-height: 1;
  cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.qz-help:hover { background: #dcecff; }
.qz-help[aria-expanded="true"] { background: var(--blue); border-color: var(--blue-deep); color: #fff; }
/* ⚠️ 下面这些卡片被 JS 用 hidden 属性开合，一旦设了 display 就必须显式处理 [hidden]，
   否则 hidden 会被 display:flex 顶掉（「点了没反应 / 关不掉」的老坑）。 */
.qz-rule {
  font-size: 13px; color: var(--ink-2); line-height: 1.75;
  background: var(--yellow-soft); border: 2px solid #ffe0a3; border-radius: 14px;
  padding: 9px 12px; margin: 8px 0 10px;
}
.qz-rule[hidden] { display: none; }
.quiz-opt.wrong { background: var(--err-soft); border-color: var(--err); color: var(--err-ink); }
.quiz-opt:disabled { cursor: default; opacity: .6; }

.score-bar { display: flex; gap: 8px; align-items: center; font-size: 15px; font-weight: 700; color: var(--title); }
.score-bar .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* ---------- 拼读练习 ---------- */
.blend-steps { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.blend-step {
  flex: 1 1 200px; min-width: 180px; background: #fbfdff;
  border-radius: 18px; padding: 12px; border: 2px solid var(--line-soft);
}
.blend-step .st-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.blend-step .st-label em { font-style: normal; font-size: 12px; color: var(--ink-2); font-weight: 400; }
.blend-step .st-label .st-num {
  display: inline-flex; width: 22px; height: 22px; border-radius: 50%;
  background: var(--pink); color: #fff; align-items: center; justify-content: center;
  margin-right: 6px; font-size: 12px; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.blend-step .sel-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.blend-step .sel-btn {
  padding: 6px 11px; border-radius: 11px; font-family: var(--pinyin);
  font-size: 16px; font-weight: 700; background: #f2f6fb; color: #1d4a7a;
  border: 2px solid #e3eefb; transition: all .12s;
}
.blend-step .sel-btn:hover { background: #e6eefb; }
.blend-step .sel-btn.active { background: var(--pink); color: #fff; border-color: #dd4462; box-shadow: 0 3px 0 #dd4462; }
.blend-step .sel-btn.dim { opacity: .35; }
.blend-step .sel-btn.jm.none { min-width: 92px; }
/* 分类拼读筛选条 */
.cat-bar { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.cat-chip {
  padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: #f2f6fb; color: var(--ink-2); border: 1.5px solid #e3eefb; cursor: pointer;
  transition: all .12s; user-select: none;
}
.cat-chip:hover { background: #e6eefb; }
.cat-chip.active { background: var(--blue); color: #fff; border-color: var(--blue-deep); box-shadow: 0 2px 0 var(--blue-deep); }
.blend-result { text-align: center; padding: 16px; }
.blend-result .formula { font-size: 22px; font-family: var(--pinyin); font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.blend-result .sige-svg { --u: 26px; margin: 8px auto; }
.blend-note { font-size: 14px; color: #a5551a; background: var(--orange-soft); border: 2px solid #ffdcbb; border-radius: 14px; padding: 9px 12px; margin-top: 10px; }
.blend-note.ok { color: #17804f; background: var(--green-soft); border-color: #b6e8cc; }
.blend-note.warn { color: #b06a00; background: #fff4e2; border-color: #ffd29a; }
.blend-result .formula.blocked { color: #b9c2cc; text-decoration: line-through; opacity: .8; }
.blend-invalid {
  display: inline-block; margin-top: 8px; padding: 10px 22px;
  font-size: 18px; font-weight: 800; font-family: var(--pinyin);
  color: #c0392b; background: #fdecea; border: 2px dashed #e7a59c;
  border-radius: 14px; letter-spacing: 1px;
}
.tag3 {
  display: inline-block; margin-left: 8px; padding: 2px 10px;
  font-size: 12px; border-radius: 999px; background: #e9f1ff; color: var(--blue-mid);
  border: 2px solid #cfe3ff; vertical-align: middle; font-weight: 700;
}

/* ---------- 音节表 ---------- */
.syl-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 2px dashed #eef4fb; }
.syl-row:last-child { border-bottom: none; }
.syl-label {
  flex: 0 0 54px; font-family: var(--pinyin); font-weight: 700; font-size: 17px; color: #0f7f74;
  background: var(--teal-soft); border: 2px solid #bdeee7; border-radius: 11px; text-align: center; padding: 3px 0;
}
.syl-cells { display: flex; flex-wrap: wrap; gap: 5px; }
.syl-cell {
  padding: 5px 10px; border-radius: 11px; font-family: var(--pinyin);
  font-size: 15px; font-weight: 700; background: #f4f8fc; color: #1d4a7a;
  border: 2px solid var(--line-soft); transition: all .12s;
}
.syl-cell:hover { background: var(--teal); border-color: #22a294; color: #fff; }
.syl-cell.hit { background: var(--orange-soft); border-color: #ffb877; color: #a5551a; }
/* 音节表：点选式筛选（一年级不会打字，主要靠点） */
.syl-pick-tip {
  font-size: 13px; color: var(--ink-2); line-height: 1.7;
  background: var(--yellow-soft); border: 2px solid #ffe0a3; border-radius: 14px;
  padding: 8px 12px; margin-bottom: 10px;
}
.syl-pick { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 8px; }
.syl-pick-k {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 800; color: var(--title);
  background: var(--blue-soft); border: 2px solid #d5e8ff; border-radius: 999px;
  padding: 3px 10px;
}
.syl-pick-k em { font-style: normal; font-weight: 400; font-size: 11.5px; color: var(--ink-2); }
.syl-count { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 2px 0 10px; }
.syl-count b { color: #0f7f74; font-size: 16px; }

.syl-detail {
  text-align: center; padding: 14px; background: var(--teal-soft); border: 2px solid #bdeee7; border-radius: 18px; margin-bottom: 12px;
  /* 悬浮由 JS 实现（bindSylSticky / .syl-fixed 内联定位），见 js/app.js ——
     CSS sticky 会被「只包住这一块的小父容器」钳制失效，不能用。 */
}
.syl-detail .sige-svg { --u: 24px; margin: 6px auto; }
.syl-detail .tones-row { display: flex; gap: 6px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
/* ⚠️ 这里的 !important 必须保留：theme.css 最后加载，里面有
   `html.night input{...}`（权重相同但更晚），夜间模式会盖掉输入框的底色与描边。 */
.syl-detail input {
  font-family: var(--pinyin) !important; border: 2px solid var(--border) !important; border-radius: 999px !important;
  background: #fafcff; color: var(--ink);
}
/* ---- 各页「筛选」标题行随滚动悬浮（第 43 轮起：音节表 / 声调练习，定位由 JS 写 .sticky-head-fixed）----
   悬浮时变成一张白色卡条（白底 + 描边 + 投影，与 .syl-detail / .lv-mode 同一套语言），
   否则透明的一行会直接压在内容上糊成一片。
   外边距挪到宿主身上：卡条固定后由宿主撑住原高度与间距，原位不塌、下面内容不跳。 */
#sylHeadHost, #toneHeadHost { display: block; margin: 4px 0 14px; }
#sylHeadHost > .section-head, #toneHeadHost > .section-head { margin: 0; }
.section-head.sticky-head-fixed {
  background: #fff; border: 2px solid #bdeee7; border-radius: 16px;
  padding: 8px 12px; box-shadow: 0 6px 18px rgba(30, 90, 80, .14);
}
/* 悬浮态是「操作态」：窄屏把说明文字收起来，保持一行，不占掉半屏 */
@media (max-width: 639px) {
  .section-head.sticky-head-fixed .desc { display: none; }
}

.quiz-review-row { flex-wrap: wrap; }
.quiz-review-row .example-chip { min-width: 62px; }
.big-feedback { text-align: center; font-size: 21px; font-weight: 800; padding: 10px; color: var(--title); }

/* ---------- 提示气泡 / 撒花 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: rgba(27, 79, 134, .94); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: all .25s;
  z-index: 200; max-width: 86vw; box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.confetti { position: fixed; top: -10px; z-index: 300; pointer-events: none; }

/* ============================================================
 * 答题全屏正向反馈（建议 3.3）
 *   · 答对：屏幕中央一枚「✓ 放大弹跳」+ 一句「太棒了！」，加一圈柔光。
 *   · 连击：每满 3 题换成暖橙金配色、停得更久，和普通答对区分开。
 *   · pointer-events:none —— 全屏但不拦截点击，1 秒后自动淡出。
 * ============================================================ */
.big-fx {
  position: fixed; inset: 0; z-index: 250; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; opacity: 0;
}
.big-fx::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 46%, rgba(63, 201, 123, .22), rgba(63, 201, 123, 0) 62%);
}
.big-fx.show { opacity: 1; animation: fxFade 1s ease forwards; }
@keyframes fxFade { 0% { opacity: 0; } 10% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
.big-fx-check {
  font-size: clamp(110px, 22vw, 210px); font-weight: 900; line-height: 1;
  color: #22a86b; transform: scale(.2); opacity: 0;
  text-shadow: 0 8px 0 rgba(34, 168, 107, .22), 0 16px 32px rgba(34, 168, 107, .28);
}
.big-fx.show .big-fx-check { animation: fxCheckPop .62s cubic-bezier(.2, 1.5, .4, 1) forwards; }
@keyframes fxCheckPop {
  0%   { transform: scale(.2) rotate(-12deg); opacity: 0; }
  55%  { transform: scale(1.16) rotate(3deg); opacity: 1; }
  78%  { transform: scale(.96) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.big-fx-text {
  font-size: clamp(20px, 3.2vw, 34px); font-weight: 900; color: #17804f;
  background: rgba(255, 255, 255, .94); border: 3px solid #bdeed7; border-radius: 999px;
  padding: 8px 26px; box-shadow: 0 10px 24px rgba(34, 168, 107, .2);
  transform: translateY(12px); opacity: 0;
}
.big-fx.show .big-fx-text { animation: fxTextUp .5s .18s ease forwards; }
@keyframes fxTextUp { to { transform: translateY(0); opacity: 1; } }
/* 连击庆祝：暖橙金，更大更热闹 */
.big-fx.combo::before { background: radial-gradient(circle at 50% 46%, rgba(255, 176, 60, .3), rgba(255, 176, 60, 0) 64%); }
.big-fx.combo .big-fx-check { color: #ff9f1c; text-shadow: 0 8px 0 rgba(255, 159, 28, .24), 0 18px 36px rgba(255, 159, 28, .32); }
.big-fx.combo .big-fx-text { color: #9a5b00; border-color: #ffd699; }
.big-fx.combo .big-fx-text b { color: #d2691e; }
@media (prefers-reduced-motion: reduce) {
  .big-fx.show { animation: none; opacity: 1; }
  .big-fx.show .big-fx-check { animation: none; transform: scale(1); opacity: 1; }
  .big-fx.show .big-fx-text { animation: none; transform: none; opacity: 1; }
}

/* ============================================================
 * 学习时长卡片 + 护眼休息提醒
 * ============================================================ */
.time-line { font-size: 14px; color: var(--ink); }
.time-line b { color: var(--title); font-size: 20px; }
.time-line.small { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.time-rest {
  margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #16694d;
  background: #eafaf1; border: 1.5px solid #bdeed7; border-radius: 12px; padding: 6px 8px;
}
.time-rest b { color: #0f7a52; font-size: 15px; }

.rest-mask {
  position: fixed; inset: 0; z-index: 260;
  background: rgba(24, 52, 84, .38);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.rest-mask[hidden] { display: none; }
.rest-card {
  background: #fff; border-radius: 24px; padding: 22px 20px 18px;
  max-width: 340px; width: 100%; text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .24);
  animation: restPop .38s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes restPop {
  0% { transform: scale(.86) translateY(14px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.rest-ico { font-size: 46px; line-height: 1; }
.rest-title { font-size: 19px; font-weight: 800; color: var(--title); margin: 8px 0 6px; }
.rest-desc { font-size: 14px; color: var(--ink-2); line-height: 1.75; }
.rest-desc b { color: #16694d; }
.rest-btns { display: flex; gap: 8px; margin-top: 14px; }
.rest-btns .tool-btn { flex: 1; }

/* ---------- 页脚 ---------- */
.footer {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 22px auto 26px; padding: 12px 20px 22px;
  text-align: center;
}
.footer .copy { font-size: 12px; color: var(--ink-2); }

/* ---------- 响应式：统一 4 档断点 ----------
   ≤639 手机 / 640–1023 平板 / ≥1024 桌面（默认）/ ≥1440 大屏
   --tap  默认 44px（桌面鼠标）；平板及以下提升到 48px（触控更稳）
   --gutter 默认 20px；平板 16px；手机 12px；大屏 28px
   --card-min 用 clamp 做流式卡片最小宽度；字号用 clamp() 平滑缩放 */
@media (max-width: 1023px) {
  :root { --tap: 48px; --gutter: 16px; }
  /* 单列时 cross 轴就是"横向"：必须 stretch。
     用 flex-start 时 #main 会退化成"按内容宽度收缩"，
     内容偏窄的页（闯关地图 / 小测验设置）实测只剩 446px 并贴在左边（768px 视口，偏心 -145px）。 */
  .layout { flex-direction: column; align-items: stretch; }
  .sidebar {
    position: fixed; top: 0; right: 0; z-index: 70;   /* 抬到手机底部 Tab（60）之上，抽屉打开时完整覆盖 */
    width: min(86vw, 320px);
    /* dvh = 当前"看得见"的视口高：手机地址栏收放时仍以可视高度为准。
       只写 height:100% 时部分手机按更大的初始包含块计算，抽屉底部会被裁掉又滚不到。 */
    height: 100vh; height: 100dvh;
    transform: translateX(110%); transition: transform .28s ease;
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    padding: calc(var(--topH) + 14px) 14px calc(22px + env(safe-area-inset-bottom));
    background: var(--card); box-shadow: -10px 0 28px rgba(60,90,130,.22);
    flex: none;
  }
  body.drawer-open .sidebar { transform: translateX(0); }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 7px 12px; }
  .top-drawer-btn .txt { display: none; }
  .brand-text p { display: none; }
  .main-nav { order: 3; width: 100%; justify-content: flex-start; flex-wrap: wrap; overflow-x: visible; }
  .sky .sun { width: 66px; height: 66px; top: 30px; right: 6%; }
}

@media (max-width: 639px) {
  :root { --gutter: 12px; }
  .brand-text h1 { font-size: 15px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 10px 6px; }
  .sige-svg { --u: 17px; }
  .choice-grid, .quiz-options { grid-template-columns: repeat(2, 1fr); }
  .section-head h2 { font-size: 19px; }
  .top-drawer-btn .txt { display: none; }
  .main-nav { display: none; }
  /* 首页 .home-mods / .home-subs 的手机端列数见下方「首页模块格」一节：
     这两个选择器的基础规则在本断点之后，写在这里会被 auto-fill 覆盖。 */
  .home-cta { font-size: 18px; padding: 0 22px; }
  /* 页脚在手机上弱化，避免抢内容，并给底部导航留出空间 */
  .footer { margin: 14px auto 90px; padding: 8px 16px 14px; }
  .footer .copy { font-size: 11px; opacity: .8; }
  /* 抽屉滚到底时，底部那条 6 个 Tab 的固定导航会压住最后几行设置
     （护眼提醒间隔 / 再听一遍 / 检测发音）：这里补足底部留白，让它们都能滚出来。 */
  .sidebar { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* 平板横屏：部分内容用两列，信息更紧凑、不浪费宽屏空间 */
@media (min-width: 900px) and (max-width: 1023px) and (orientation: landscape) {
  .cf-list { grid-template-columns: repeat(2, 1fr); }
  .home-mods { grid-template-columns: repeat(4, 1fr); }
  .lv-map { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}

@media (min-width: 1440px) {
  :root { --gutter: 28px; --content-max: 1360px; --card-min: clamp(110px, 16vw, 168px); }
}

/* ============================================================
 * 拼音注音：汉字上方一行小拼音（一年级识字少，看拼音也能读）
 *   汉字仍是主视觉，拼音只是"小帽子"，不喧宾夺主。
 * ============================================================ */
.zhub {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.18;
}
.zhub > i {
  display: block; font-style: normal;
  font-family: var(--pinyin); font-weight: 700;
  /* 一年级小朋友与教室投屏都偏小：12.5 → 14px，并换成略深于 --ink-2 的同色系，
     远距离更清楚，同时仍比汉字淡一档，不会"两行字抢眼"。 */
  font-size: 14px; letter-spacing: .2px;
  color: var(--zhub);
}
/* 深底白字场景（选中态 / 主按钮）：拼音帽子跟着变浅，保证看得清 */
.nav-btn.active .zhub > i,
.subtab.active .zhub > i,
.tool-btn.primary .zhub > i,
.lpart.active .zhub > i { color: inherit; }
/* 首页成长树入口本来就是绿色主题卡，拼音帽子跟着主字同色，避免"绿字配蓝帽" */
.home-mod-tree .zhub > i { color: inherit; }

/* ============================================================
 * 触控友好：主要按钮的最小触控区 ≥ 44×44
 *   一年级小朋友手指小、准头差，按钮太小容易点错、点不到。
 *   统一用 flex 居中，保证加了高度后文字仍在正中间。
 * ============================================================ */
.nav-btn, .subtab, .tool-btn, .filter-chip, .cat-chip,
.sel-btn, .yunmu-pick, .example-chip, .syl-cell,
.choice-btn, .quiz-opt, .cf-item, .cf-both,
.lv-btn, .lv-opt, .lv-chip, .lv-wrong-item, .lv-map-btn,
.more-item {
  min-height: var(--tap);
}
.nav-btn, .subtab, .tool-btn, .filter-chip, .cat-chip,
.example-chip, .syl-cell, .lv-btn {
  display: inline-flex; align-items: center; justify-content: center;
}
.sel-btn, .yunmu-pick, .cat-chip { padding-top: 4px; padding-bottom: 4px; }
/* 只有图标的小按钮也要够大（关闭 ✕ 一类） */
.ptree-close, .pt-mode-btn, .pt-mini-btn { min-width: var(--tap); min-height: var(--tap); }

/* ============================================================
 * 卡通化学习进度：会长大结果的「拼音树」
 * ============================================================ */
.grow-card { text-align: center; }
.tree-svg { display: block; width: 100%; max-width: 168px; margin: 0 auto; }
.tree-svg text { font-family: var(--font); }

.grow-bar {
  height: 14px; margin: 6px 0 8px; border: 2px solid var(--border);
  background: #eaf3fb; border-radius: 999px; overflow: hidden;
}
.grow-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #7fd8a0, #ffc93c);
  transition: width .55s cubic-bezier(.34, 1.35, .64, 1);
}
.grow-num { font-size: 13px; color: var(--ink-2); }
.grow-num b { color: var(--green); font-size: 17px; }
.grow-word { margin: 6px 0; font-size: 13px; font-weight: 700; color: var(--title); }
.grow-star { font-size: 14px; font-weight: 800; color: #e8940c; }
#starNum { display: inline-block; }
#starNum.pop { animation: starPop .45s ease; }
@keyframes starPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.55) rotate(-8deg); }
  100% { transform: scale(1); }
}

/* 本周打卡小日历（建议 5）：7 个小格子，学过就点亮 */
.wk-cal { margin: 8px 0 2px; }
.wk-tip { font-size: 12.5px; font-weight: 700; color: var(--title); }
.wk-cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 7px; }
.wk-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5px 2px 4px; border-radius: 12px;
  background: #f1f6fc; border: 2px solid #e3edf9; min-height: 38px;
}
.wk-cell .wk-w { font-size: 12px; font-weight: 800; color: var(--muted); }
.wk-cell .wk-d { font-size: 15px; font-weight: 800; color: transparent; line-height: 1.2; }
.wk-cell.on { background: #e8f8ef; border-color: #9ad9b6; }
.wk-cell.on .wk-d { color: var(--ok-deep); }
.wk-cell.today { border-color: #4a9eff; box-shadow: 0 0 0 2px rgba(74, 158, 255, .25); }

/* 学会一个新拼音时，从卡片上飞出一颗星星 */
.fly-star {
  position: absolute; left: 50%; top: 2px; z-index: 6;
  font-size: 15px; font-weight: 800; color: #e8940c; white-space: nowrap;
  text-shadow: 0 1px 2px #fff; pointer-events: none;
  animation: flyUp 1.1s ease-out forwards;
}
@keyframes flyUp {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); }
  25% { opacity: 1; transform: translate(-50%, -8px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -48px) scale(1); }
}

/* ============================================================
 * 易混淆对比
 * ============================================================ */
/* 易混淆对比：一组一组时的翻组条 */
.cf-nav {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap; margin-top: 14px;
}
.cf-nav .tool-btn { min-height: var(--tap); }
.cf-pos { font-size: 14px; font-weight: 800; color: var(--title); }

.cf-list { display: grid; gap: 14px; }
.cf-card {
  background: var(--card); border: 2px solid #eaf2fb; border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.cf-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cf-cat {
  font-size: 12px; font-weight: 700; color: #fff; background: var(--purple);
  padding: 3px 10px; border-radius: 999px;
}
.cf-title { font-family: var(--pinyin); font-size: 19px; font-weight: 700; color: var(--title); }
.cf-vs-mini { font-family: var(--font); font-size: 12px; color: var(--pink); }

/* 电脑 / 大屏：一组里两个音「横向并排」对比（A ｜VS｜ B） */
.cf-row { display: flex; flex-direction: row; align-items: stretch; justify-content: center; gap: 10px; flex-wrap: nowrap; }
.cf-item {
  flex: 1 1 0; min-width: 0; max-width: 220px; position: relative;
  background: #f7fbff; border: 2px solid #e3eefb; border-radius: 18px;
  padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform .14s, box-shadow .14s, border-color .14s, background .14s;
}
.cf-item:hover { border-color: var(--blue); background: #eef6ff; transform: translateY(-2px); }
.cf-item.seq-active { outline: 3px solid var(--blue); outline-offset: 2px; background: #eaf4ff; }
.cf-item .sige-svg { --u: 21px; }
.cf-zi { font-size: 21px; font-weight: 700; color: var(--ink); }
.cf-spk { font-size: 12px; color: var(--ink-2); }

.cf-vs {
  align-self: center; font-size: 15px; font-weight: 900; color: var(--pink);
  background: var(--pink-soft); border-radius: 999px; padding: 8px 10px;
}
.cf-tip {
  margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.6;
  background: var(--yellow-soft); border-radius: 14px; padding: 8px 12px;
}

/* 手机（≤639）：一组里两个音「竖向对齐」对比（上下排，VS 居中在两者之间）
   注意：必须写在上面 .cf-row 基础规则之后，否则会被桌面规则覆盖 */
@media (max-width: 639px) {
  .cf-row { flex-direction: column; align-items: center; flex-wrap: nowrap; gap: 8px; }
  .cf-item { width: 100%; max-width: 280px; flex: 0 0 auto; }
  .cf-vs { align-self: center; padding: 4px 12px; }
}

/* ---------- 顶栏：星形 + 家长·老师按钮 ---------- */
.top-star, .top-drawer-btn {
  flex: 0 0 auto; min-height: var(--tap);
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; font-weight: 700; cursor: pointer;
  padding: 0 9px; font-size: 13px; transition: transform .14s, background .14s;
}
.top-star { background: var(--yellow-soft); border: 2px solid #ffe39a; color: #a9770a; font-size: 16px; line-height: 1; }
.top-drawer-btn { background: #f1f7ff; border: 2px solid var(--border); color: var(--muted); }
.top-star:hover, .top-drawer-btn:hover { transform: translateY(-1px); }
.top-drawer-btn .ico { font-size: 15px; }

/* ---------- 侧栏抽屉（手机/平板右侧滑出） ---------- */
.drawer-mask { display: none; position: fixed; inset: 0; z-index: 55; background: rgba(20,40,70,.42); }
body.drawer-open .drawer-mask { display: block; }
body.drawer-open { overflow: hidden; }
/* 桌面折叠：隐藏侧栏（仅 ≥1024 生效，避免影响手机抽屉） */
@media (min-width: 1024px) {
  body.side-collapsed .sidebar { display: none; }
}

/* ---------- 首页 ---------- */
.home-wrap { max-width: 880px; margin: 6px auto 0; padding: 4px 2px 8px; }
.home-hero { text-align: center; margin-bottom: 16px; }
.home-cta {
  display: inline-block; min-height: 56px; padding: 0 30px;
  font-size: 20px; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, #5eb6ff, #4a9eff);
  border: 3px solid var(--blue-deep); border-radius: 999px;
  box-shadow: 0 5px 0 var(--blue-deep); transition: transform .14s;
}
.home-cta:hover { transform: translateY(-2px); }
.home-cta:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--blue-deep); }
.home-last { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.home-grow {
  background: var(--card); border: 3px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 18px;
}
.hg-star { font-size: 15px; font-weight: 800; color: #e8940c; }
.hg-stage { font-size: 15px; font-weight: 700; color: var(--title); }
.hg-streak { font-size: 14px; font-weight: 700; color: #d2691e; }
.hg-sub { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
/* 首页进度：今日小任务 + 学习状态条 合成"一张卡、一行"
   （原来 .home-goal / .home-grow 各占一张卡、各占一行；两处说的都是"今天学到哪了"） */
.home-stats {
  background: var(--card); border: 3px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px 16px; margin: 14px auto 18px;
}
.hs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.hs-sep { color: #cbdcf0; font-weight: 800; }
.hs-row .go-title { font-size: 15px; font-weight: 800; color: #9a6b00; }
.hs-row .go-item {
  font-size: 13.5px; font-weight: 700; color: #7a6a3a;
  padding: 3px 10px; border-radius: 999px; background: #fff; border: 2px solid #ffedc4;
}
.hs-row .go-item.ok { color: var(--ok-deep); border-color: #b6e8cc; background: #f2fcf6; }
.hs-row .go-star { font-size: 13.5px; font-weight: 800; color: #d78a00; }
.hs-row .go-note { font-size: 12.5px; font-weight: 700; color: #b08a3a; }
.hs-row .hg-stage { font-size: 14px; }
.hs-row .hg-star { font-size: 14px; }
.hs-row .hg-streak { font-size: 13.5px; }
.hs-row .hg-sub { margin: 0; font-size: 13px; }
.home-stats .grow-bar { margin: 2px 0 0; }
.home-mods { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(var(--card-min), 1fr)); max-width: 1000px; margin: 0 auto; }
.home-mod {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: var(--tap); padding: 14px 10px;
  background: var(--card); border: 3px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); cursor: pointer; transition: transform .14s, border-color .14s, background .14s;
  font-size: 17px; font-weight: 700; color: var(--title);
}
.home-mod:hover { transform: translateY(-2px); border-color: var(--blue); background: #eef6ff; }
.home-mod:active { transform: scale(.96); }
.hm-ico { font-size: 34px; line-height: 1; }
.hm-desc { font-size: 12.5px; font-weight: 600; color: var(--ink-2); line-height: 1.4; }
.home-mod-tree { background: var(--green-soft); border-color: #b6e8cc; color: var(--ok-deep); }
/* 首页首屏收敛：主入口用大卡（高一点、图标大一点），其余入口用小格
   —— 「学拼音」不在这一排里，它由上方 hero 大按钮承担 */
.hm-big { min-height: 92px; }
.hm-big .hm-ico { font-size: 40px; }
.home-subs {
  display: grid; gap: 12px; margin: 12px auto 0; max-width: 1000px;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
}
.hm-sm { min-height: 62px; padding: 8px 6px; gap: 2px; font-size: 14px; border-radius: 16px; }
.hm-sm .hm-ico { font-size: 26px; }

/* 手机（≤639）：首页入口锁 2 列。
   必须写在上方 .home-mods / .home-subs 基础规则之后——两者特异性相同，
   只有后出现的规则生效；原先写在文件前段的 ≤639 断点里，一直被 auto-fill 覆盖，
   390px 下会自动排成 3 列，出现「3-1-2-2-1」的锯齿。 */
@media (max-width: 639px) {
  .home-mods { display: none; }   /* 底部 6 个 tab 已列同一批入口，首页不再重复 */
  .home-subs { grid-template-columns: repeat(2, 1fr); }
  /* 闯关已在底部 tab 里，手机首页不再重复 */
  .home-subs .hm-level { display: none; }
}

/* ---------- 手机底部导航 + 更多面板（仅 ≤639 显示） ---------- */
.mobile-tabs { display: none; }
/* 桌面/平板不显示底部导航（用顶部固定栏导航）；手机端底部导航常驻，
   进入小测验 / 拼音闯关（专注模式）也保留，方便随时退出 */
@media (max-width: 639px) {
  .mobile-tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(10px);
    border-top: 3px solid #cdeaae; box-shadow: 0 -6px 18px rgba(120, 170, 210, .18);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); gap: 2px;
  }
  #main { padding-bottom: 78px; }
}
.mtab {
  position: relative;
  flex: 1 1 0; min-height: var(--tap); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: 13px; font-weight: 700; border-radius: 12px; padding: 3px 0;
}
.mtab .mt-ico { font-size: 24px; line-height: 1; }
.mtab.active { color: var(--blue-deep); background: #eaf4ff; }
/* 带二级的 tab（学拼音 / 拼读）：右上角一个小三角，提示「点一下还有选项」 */
.mtab[data-sub-menu]::after { content: '▴'; position: absolute; top: 2px; right: 12px; font-size: 9px; opacity: .55; }

#moreSheet { display: none; position: fixed; inset: 0; z-index: 70; }
#moreSheet.open { display: block; }
.more-mask { position: absolute; inset: 0; background: rgba(20, 40, 70, .42); }
.more-card {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 28px rgba(60, 90, 130, .25); animation: sheetUp .26s ease;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.more-title { text-align: center; font-size: 15px; font-weight: 800; color: var(--title); margin-bottom: 12px; }
/* 全部栏目（11 项）在手机上一屏放不下：卡片 flex 布局 —— 标题固定、列表区滚动、「关闭」永远钉在底部 */
.more-card {
  display: flex; flex-direction: column;
  max-height: 86vh;
}
.more-title { flex: 0 0 auto; }
.more-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  align-content: start; padding-bottom: 4px;
}
.more-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 74px; background: var(--card); border: 3px solid var(--line-soft); border-radius: 18px;
  box-shadow: var(--shadow); cursor: pointer; color: var(--title); font-size: 14px; font-weight: 700;
}
.more-item:active { transform: scale(.97); }
.mi-ico { font-size: 30px; line-height: 1; }
.more-close {
  display: block; width: 100%; margin-top: 12px; min-height: var(--tap);
  flex: 0 0 auto;
  background: #f0f5fb; color: var(--muted); border: 2px solid #e3eefb; border-radius: 14px;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.more-close:hover { background: #e6eefb; }

/* ---------- 一课一屏：分页控件 ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 12px 0; }
.pager-info { font-size: 13px; color: var(--ink-2); font-weight: 700; min-width: 78px; text-align: center; }
.dots { display: inline-flex; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 50%; border: none; background: #cfe2f7; cursor: pointer; padding: 0; }
.dot.active { background: var(--blue); transform: scale(1.15); }
#learnPrev:disabled, #learnNext:disabled { opacity: .4; cursor: default; }

/* ---------- 声调练习：一次一张的轮播 ---------- */
.tone-carousel { display: flex; align-items: center; gap: 8px; }
.tc-track { flex: 1; min-width: 0; }
.tone-slide { display: none; }
.tone-slide.active { display: block; }
.tc-arrow { flex: 0 0 auto; min-width: var(--tap); min-height: var(--tap); font-size: 26px; font-weight: 800; line-height: 1; border-radius: 999px; background: var(--blue-soft); border: 2px solid var(--border); color: var(--blue-deep); cursor: pointer; }
.tc-arrow:hover { background: #dbeeff; }
.tc-dots { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.tc-dot { width: 12px; height: 12px; border-radius: 50%; border: none; background: #cfe2f7; cursor: pointer; padding: 0; }
.tc-dot.active { background: var(--blue); }

/* ---------- 拼读：手机贴底结果栏 ----------
   手机上选完 声母 → 韵母 后，结果区常常滚出屏幕，所以把公式再贴底显示一份。
   ⚠️ 之前这里是「隐藏 #bResult、只留底部栏」，结果区里的大字四线三格和「拼一拼」按钮
      在手机上就全没了；现在改成两边都显示，底部栏只做「贴底快捷条」。 */
.blend-result-bar { display: none; }
@media (max-width: 639px) {
  /* 底部导航栏 .mobile-tabs 是常驻的（48px + 上下 padding 12 + 上边框 3 ≈ 63），
     底部栏必须按它的净高上移，否则会被压在导航栏底下看不见。 */
  :root { --tabH: 64px; }
  .blend-result-bar {
    display: flex; align-items: center; gap: 10px;
    position: fixed; left: 0; right: 0;
    bottom: calc(var(--tabH) + env(safe-area-inset-bottom)); z-index: 58;
    padding: 10px 14px;
    background: #fff; border-top: 3px solid #cdeaae;
    box-shadow: 0 -6px 18px rgba(120, 170, 210, .18);
  }
  /* 音节长的时候要换行，不能截成省略号 —— zhuàng 这种尾巴被吃掉就看不出来了 */
  .brb-txt { flex: 1; min-width: 0; font-size: 17px; font-weight: 800; color: var(--title); white-space: normal; overflow-wrap: break-word; }
  .brb-txt.blocked, .blend-result-bar.blocked .brb-txt { color: #b9c2cc; text-decoration: line-through; }
}

/* ============================================================
 * 学拼音卡片：新增「写一写」入口 + 占格标签
 * ============================================================ */
.card { cursor: pointer; user-select: none; -webkit-user-select: none; }
.card.k-open { z-index: 40; } /* 口诀浮层展开时，卡片抬到同排/下一排之上 */
.card-play { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.grid-tag {
  display: inline-block; margin-top: 2px; padding: 2px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: #fff; line-height: 1.5;
}
.gt-mid { background: var(--blue); }
.gt-dot { background: var(--purple); }
.gt-up { background: var(--green); }
.gt-down { background: var(--orange); }
.gt-full { background: var(--pink); }
/* 次要动作「写一写」「怎么读」：并排放在卡片底部，中性浅底小胶囊。
   不再用整宽彩底按钮去抢主动作（点读）的注意力，但触控高度仍守 44px。 */
.card-acts { display: flex; gap: 6px; width: 100%; margin-top: 4px; }
.card-acts > button { flex: 1 1 0; min-width: 0; }
.write-btn {
  min-height: var(--tap); margin: 0;
  padding: 4px 4px; border-radius: 12px; font-size: 12px; font-weight: 700;
  background: #f6f9fd; border: 2px solid #e3edf9; color: #5b7186;
  cursor: pointer; transition: background .14s, transform .12s;
}
.write-btn:hover { background: #eaf1fa; }
.write-btn:active { transform: translateY(1px); }
.write-btn.done { background: var(--green-soft); border-color: #b6e8cc; color: var(--ok-deep); }

/* 声母卡「怎么读」小按钮 + 展开的发音小口诀（建议 7） */
.how-btn {
  min-height: var(--tap); margin: 0;
  padding: 4px 4px; border-radius: 12px; font-size: 12px; font-weight: 700;
  background: #f6f9fd; border: 2px solid #e3edf9; color: #5b7186;
  cursor: pointer; transition: background .14s, transform .12s;
}
.how-btn:hover { background: #eaf1fa; }
.how-btn:active { transform: translateY(1px); }

/* 手机（≤639）：卡片只有约 150px 宽，两个次要按钮必须单行放下、不许折字；
   点读按钮同步收窄一点，但仍是卡片里最显眼的元素。 */
@media (max-width: 639px) {
  .card-acts { gap: 4px; }
  .write-btn, .how-btn { font-size: 11px; padding: 2px 2px; white-space: nowrap; }
  .card .spk { font-size: 13px; padding: 0 12px; }
}
.k-line {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 260px; z-index: 40; pointer-events: none;
  padding: 5px 10px; border-radius: 12px; text-align: center;
  font-size: 12.5px; line-height: 1.6; font-weight: 700;
  background: #f5f0ff; border: 2px solid #e6dcfb; color: #6a4db8;
  box-shadow: 0 6px 16px rgba(106,77,184,.22);
  animation: klineIn .16s ease;
}
@keyframes klineIn { from { opacity: 0; transform: translateX(-50%) translateY(-5px); } to { opacity: 1; transform: translateX(-50%); } }

/* 拼读「碰一碰」：字母逐个点亮，最后合拢成整音节（建议 2）
   ⚠️ 底部栏 .brb-txt 里是同一套分色 span（由 syncBar 从公式复制过来），
      动画要一并覆盖过去，否则手机上只看得到字、看不到「碰一碰」。 */
.formula .f-s, .formula .f-j, .formula .f-y, .formula .f-z,
.brb-txt .f-s, .brb-txt .f-j, .brb-txt .f-y, .brb-txt .f-z {
  display: inline-block;                     /* inline 元素上 transform 不生效 */
  transition: transform .18s ease, opacity .18s ease, color .18s ease;
}
.formula .f-on, .brb-txt .f-on { transform: translateY(-6px); color: #0f7f74; }
.formula.merge .f-s, .brb-txt.merge .f-s { transform: translateX(38%); opacity: .12; }
.formula.merge .f-j, .brb-txt.merge .f-j { transform: translateX(18%); opacity: .12; }
.formula.merge .f-y, .brb-txt.merge .f-y { transform: translateX(-12%); opacity: .12; }
.formula.merge .f-z, .brb-txt.merge .f-z { transform: scale(1.28); color: #0f7f74; }

/* 声调手势小图标（建议 3） */
.tone-gesture { vertical-align: -7px; margin-right: 5px; }

/* ============================================================
 * 按课学习（📖）：跟着人教版教材一课一课走
 * ============================================================ */
/* 「学拼音」两部分切换 */
.learn-parts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.lpart {
  padding: 9px 18px; border-radius: 999px; font-size: 15px; font-weight: 700;
  background: #eef4fb; color: var(--muted); border: 2px solid var(--border);
  min-height: var(--tap); cursor: pointer; transition: all .16s;
}
.lpart:hover { background: #e2edfb; }
.lpart.active { background: var(--purple); color: #fff; border-color: #8551e6; box-shadow: 0 3px 0 #8551e6; }

.ls-h3 { font-size: 15px; color: var(--title); margin-bottom: 10px; }
/* 课程表 */
.lsn-map { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
.lsn-card {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 12px 10px 14px; text-align: center; cursor: pointer;
  background: var(--card); border: 3px solid var(--line-soft); border-radius: 20px;
  box-shadow: var(--shadow); transition: transform .14s, border-color .14s, box-shadow .14s;
}
.lsn-card:hover { transform: translateY(-3px); border-color: var(--purple); box-shadow: var(--shadow-lg); }
.lsn-card:active { transform: translateY(1px) scale(.99); }
.lsn-no {
  font-size: 12px; font-weight: 800; color: #fff; background: var(--purple);
  padding: 2px 11px; border-radius: 999px;
}
.lsn-ico { font-size: 28px; line-height: 1; }
.lsn-title { font-family: var(--pinyin); font-size: 19px; font-weight: 800; color: var(--title); }
.lsn-items { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.lsn-tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 8px; border-radius: 999px; cursor: pointer;
  background: #f1f7ff; border: 2px solid var(--border);
  font-family: var(--pinyin); font-size: 13px; font-weight: 700; color: var(--title);
  transition: background .14s, border-color .14s;
}
.lsn-tag:hover { background: #e4f1ff; border-color: var(--blue); }
.lsn-tag b { font-family: var(--font); font-weight: 700; color: var(--ink-2); }
.lsn-tag i { font-style: normal; font-size: 11px; opacity: .75; }
.lsn-tag.done { background: var(--green-soft); border-color: #b6e8cc; color: var(--ok-deep); }
.lsn-tag.done b { color: var(--ok-deep); }
.lsn-prog { font-size: 12px; font-weight: 700; color: var(--ink-2); }

/* 本课学习页 */
.ls-tip {
  display: flex; align-items: center; gap: 10px;
  background: var(--yellow-soft) !important; border-color: #ffe0a3 !important;
}
.ls-tip-ico { font-size: 30px; line-height: 1; flex: 0 0 auto; }
.ls-tip-txt { font-size: 14px; font-weight: 700; color: #8a5d06; line-height: 1.7; }
.ls-sec { margin-bottom: 14px; }
.ls-grid { margin-bottom: 4px; }
/* 本课韵母 · 四个声调 */
.tone4-grid { display: flex; flex-direction: column; gap: 10px; }
.tone4-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #f7fbff; border: 2px solid #e3effb; border-radius: 14px; padding: 8px 10px;
}
.t4-name {
  flex: 0 0 auto; min-width: 48px; font-size: 14px; font-weight: 800; color: var(--title);
  font-family: var(--pinyin); white-space: nowrap;
}
.t4-card {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 56px; padding: 6px 10px; border-radius: 12px; cursor: pointer;
  background: #ffffff; border: 2px solid var(--border); color: var(--blue-mid);
  transition: transform .12s, background .12s, border-color .12s;
}
.t4-card:hover { background: #e4f1ff; border-color: #9cc7f5; transform: translateY(-1px); }
.t4-card.hit { background: #dbeeff; border-color: var(--blue-deep); transform: scale(.96); }
/* 播放跟随：正在响的四声/拼读卡同样浅蓝底 + 文字变深蓝 + 呼吸 */
.t4-card.seq-active {
  background: var(--blue-soft); border-color: var(--blue);
  transform: translateY(-1px);
}
.t4-card.seq-active .t4-py { color: #174f96; }
.t4-card.seq-active .t4-ex { color: var(--blue-mid); }
.t4-card.seq-active { animation: seqPulse 1.1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .t4-card.seq-active { animation: none; } }
.t4-py { font-family: var(--pinyin); font-weight: 800; font-size: 21px; line-height: 1.1; }
.t4-ex { font-size: 11.5px; font-weight: 700; color: #8fa2b8; line-height: 1.2; white-space: nowrap; }
.ls-actions { margin-top: 14px; }
.ls-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; }
.ls-pos { font-size: 13px; font-weight: 800; color: var(--title); min-width: 82px; text-align: center; }
#lsPrev:disabled, #lsNext:disabled { opacity: .4; cursor: default; }

/* 闯关地图（按课程顺序） */
.ls-bmap { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.ls-bm {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 6px; min-height: var(--tap); cursor: pointer;
  background: #f7fbff; border: 3px solid var(--line-soft); border-radius: 18px;
  box-shadow: var(--shadow); transition: transform .14s, border-color .14s, background .14s;
}
.ls-bm:hover { transform: translateY(-2px); border-color: var(--blue); background: #eef6ff; }
.ls-bm-no { font-size: 11px; font-weight: 800; color: #fff; background: var(--purple); padding: 1px 9px; border-radius: 999px; }
.ls-bm-t { font-family: var(--pinyin); font-size: 14px; font-weight: 800; color: var(--title); }
.ls-bm-s { font-size: 13px; color: #e8940c; letter-spacing: 1px; }
.ls-bm-go { font-size: 12px; font-weight: 700; color: var(--blue-mid); }
/* 未解锁：置灰 + 不可点 */
.ls-bm.ls-locked { opacity: .55; filter: grayscale(1); cursor: default; }
.ls-bm.ls-locked:hover { transform: none; border-color: var(--line-soft); background: #f7fbff; }
.ls-bm.ls-locked .ls-bm-go { color: #8fa6bd; }

/* 闯关地图上的「第 N 课」徽章 */
.lv-lesson {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 11px; font-weight: 800; color: #fff; background: var(--purple);
  padding: 2px 8px; border-radius: 999px; box-shadow: 0 2px 5px rgba(0, 0, 0, .16);
}

/* 课程卡上的「本课词」预览 */
.lsn-words {
  font-size: 12px; font-weight: 700; color: var(--purple);
  background: var(--purple-soft); border: 2px solid #e7dcff; border-radius: 999px;
  padding: 2px 10px; max-width: 100%;
}

/* ---------- 本课音节词认读（把拼音落到识字上） ---------- */
.wd-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.wd-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px 10px; text-align: center; cursor: pointer;
  background: var(--card); border: 3px solid var(--line-soft); border-radius: 20px;
  box-shadow: var(--shadow); transition: transform .14s, border-color .14s, box-shadow .14s;
}
.wd-card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--shadow-lg); }
.wd-card:active { transform: translateY(1px) scale(.99); }
.wd-card.wd-wide { min-width: 150px; }
.wd-syls { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.wd-syl {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 7px; border-radius: 999px; cursor: pointer;
  background: var(--blue-soft); border: 2px solid var(--border);
  font-family: var(--pinyin); font-size: 13px; font-weight: 700; color: var(--title);
  transition: background .14s, border-color .14s;
}
.wd-syl:hover { background: #e0efff; border-color: var(--blue); }
.wd-syl.qing { background: var(--yellow-soft); border-color: #ffe0a3; color: #a9770a; }
.wd-syl i { font-style: normal; font-size: 10px; opacity: .85; }
.wd-hz {
  font-family: var(--font); font-size: 25px; font-weight: 800; color: var(--ink);
  line-height: 1.2; letter-spacing: 2px;
}
/* 一字一音的写法：拼音压在自己那个汉字的上方，字与音严格上下对齐
   （原来拼音排成一行、汉字排成一行、各自居中——两行宽度不同就对不上） */
.wd-cells { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 6px 10px; width: 100%; }
.wd-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wd-cell .wd-hz { font-size: 25px; line-height: 1.15; letter-spacing: 0; }
.wd-cell .wd-syl { padding: 1px 6px; font-size: 12.5px; white-space: nowrap; }
.wd-go { font-size: 12px; font-weight: 700; color: var(--blue); }
.wd-card.playing { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(74, 158, 255, .3), var(--shadow-lg); }

/* ---------- 语文园地板块 ---------- */
.gb { background: #fbfdff; border: 3px solid var(--line-soft); border-left: 6px solid var(--teal); border-radius: 18px; padding: 12px 14px; }
.gb-note { font-size: 13px; font-weight: 700; color: var(--ink-2); line-height: 1.7; margin-bottom: 10px; }
.gb-rows { display: flex; flex-direction: column; gap: 8px; }
.gb-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.gb-dash { color: var(--orange); font-weight: 800; font-size: 16px; }
.tn-btn {
  display: inline-flex; align-items: baseline; gap: 4px; min-height: var(--tap);
  padding: 6px 14px; border-radius: 14px; cursor: pointer;
  background: var(--yellow-soft); border: 2px solid #ffe0a3; color: #a9770a;
  font-family: var(--font); font-size: 18px; font-weight: 800;
  transition: background .14s, transform .12s;
}
.tn-btn i { font-style: normal; font-family: var(--pinyin); font-size: 13px; color: #c98b12; }
.tn-btn:hover { background: #fff3cf; }
.tn-btn:active { transform: translateY(1px); }
.gb-cmp { display: flex; flex-direction: column; gap: 10px; }
.gb-pair { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.gb-tag {
  flex: 0 0 auto; font-size: 13px; font-weight: 800; color: #fff; background: var(--teal);
  padding: 3px 11px; border-radius: 999px; margin-right: 2px;
}
.lk-row { gap: 6px; }
.lk-ym {
  display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap);
  padding: 4px 12px; border-radius: 14px; cursor: pointer;
  background: var(--teal-soft); border: 2px solid #bfeee7; color: #1f8b7e;
  font-family: var(--pinyin); font-size: 18px; font-weight: 800;
}
.lk-ym:active { transform: translateY(1px); }
.lk-z {
  display: inline-flex; align-items: baseline; gap: 4px; min-height: var(--tap);
  padding: 6px 12px; border-radius: 14px; cursor: pointer;
  background: #f1f7ff; border: 2px solid var(--border); color: var(--title);
  font-family: var(--font); font-size: 17px; font-weight: 800;
}
.lk-z i { font-style: normal; font-family: var(--pinyin); font-size: 12px; color: #6f93b8; }
.lk-z:active { transform: translateY(1px); }
.gb-poem { display: flex; flex-direction: column; gap: 10px; }
.gb-poem-t {
  align-self: center; font-family: var(--font); font-size: 18px; font-weight: 800; color: var(--title);
  background: var(--purple-soft); border: 2px solid #e7dcff; border-radius: 999px; padding: 3px 16px;
}

@media (max-width: 639px) {
  .lsn-map { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .lsn-card { padding: 10px 6px 12px; }
  .lsn-title { font-size: 16px; }
  .ls-bmap { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .ls-bm { padding: 7px 4px; }
  .ls-bm-t { font-size: 12px; }
  .lpart { padding: 8px 12px; font-size: 14px; }
  .wd-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .wd-hz { font-size: 22px; }
  .gb-pair { gap: 6px; }
  .gb-tag { font-size: 12px; padding: 2px 9px; }
  /* 拼读/四声卡在手机上自适应：一行放 4 张不溢出 */
  .t4-name { min-width: 42px; font-size: 12.5px; }
  .t4-card { min-width: 0; flex: 1 1 48px; padding: 5px 4px; border-radius: 10px; }
  .t4-py { font-size: 17px; }
  .tone4-row { gap: 6px; padding: 7px 8px; }
}

/* ---------- 写一写 · 四线三格描红弹窗 ---------- */
/* 层级错开：本遮罩 120，「重新学一遍」遮罩 125（见 paintree.css .rs-mask），同时弹出时不互相覆盖 */
.write-mask {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center; padding: 14px;
  background: rgba(24, 52, 84, .45);
}
.write-mask.show { display: flex; }
.write-card {
  position: relative; width: 100%; max-width: 420px;
  background: #fff; border-radius: 24px; padding: 18px 18px 16px;
  box-shadow: var(--shadow-lg); animation: writePop .26s ease;
  max-height: calc(100vh - 28px);           /* 手机上弹窗变高（多了笔顺行），可滚动不裁切 */
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
}
@keyframes writePop { from { transform: scale(.9) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.write-card h3 { font-size: 18px; color: var(--title); text-align: center; margin-bottom: 6px; }
.write-letter { text-align: center; }
.write-letter .sige-svg { --u: 30px; margin: 2px auto 4px; }
.write-rhyme {
  font-size: 14px; color: var(--muted); line-height: 1.7; text-align: center;
  background: var(--yellow-soft); border: 2px solid #ffe0a3; border-radius: 14px;
  padding: 8px 12px; margin: 8px 0;
}
.write-canvas-wrap { position: relative; width: 100%; max-width: 100%; margin: 4px auto 10px; }
.write-canvas {
  display: block; width: 100%; height: auto; max-width: none; touch-action: none;
  border-radius: 16px; background: #fbfdff; border: 2px solid var(--line-soft); cursor: crosshair;
}
/* ---------- 写一写 · 笔顺动画（SVG 覆盖层，与描红笔迹分层） ---------- */
.stroke-layer {
  position: absolute; inset: 0; display: none; overflow: hidden;
  border-radius: 16px; background: #fbfdff;
  box-shadow: inset 0 0 0 2px var(--line-soft);
}
.stroke-layer.on { display: block; }
.stroke-layer svg { display: block; width: 100%; height: 100%; }
/* 字形、字重、字族全部跟「学拼音」四线三格里的 .pytext 保持一致 */
.st-word { font-family: var(--pinyin); font-weight: 700; }
/* 每一笔的墨：
 *   新做法（矢量轮廓）—— 用 fill 上色，fill-rule="evenodd" 负责把 o 的圈那种内孔挖空；
 *   兜底做法（等宽带子）—— fill="none" + stroke。
 * 所以这里**不能**写 fill: none，那会把 SVG 属性里的 fill 盖掉、笔画直接看不见。 */
.st-ink { stroke-linejoin: round; }
.st-num text { font-size: 15px; font-weight: 800; fill: #fff; text-anchor: middle; dominant-baseline: central; }
.stroke-tip {
  display: none; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted);
  background: var(--blue-soft); border: 2px solid var(--border); border-radius: 12px;
  padding: 6px 10px; margin: 2px 0 8px;
}
.stroke-tip.on { display: block; }
.stroke-bar, .stroke-nav { display: none; gap: 8px; margin-bottom: 8px; }
.stroke-bar.on, .stroke-nav.on { display: flex; }
.stroke-bar .tool-btn, .stroke-nav .tool-btn {
  flex: 1; min-height: var(--tap); min-width: 44px; font-size: 13px; padding: 8px 6px;
}
.stroke-nav { align-items: center; }
.st-pos {
  flex: 0 0 auto; min-width: 84px; text-align: center;
  font-size: 13px; font-weight: 800; color: var(--title);
}
.stroke-bar .tool-btn:disabled { opacity: .45; cursor: default; transform: none; }
.write-actions { display: flex; gap: 10px; }
.write-actions .tool-btn { flex: 1; min-height: var(--tap); min-width: 44px; font-size: 13px; padding: 8px 6px; }
.write-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: var(--tap); height: var(--tap); min-width: var(--tap); min-height: var(--tap);
  border-radius: 50%; background: #f1f7ff; border: 2px solid var(--border); color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.write-close:hover { background: #e4f1ff; }

/* ============================================================
 * 大字模式（建议 8）：整体放大 1.12 倍，字更大、按钮更好点
 * ============================================================ */
html.big-mode { zoom: 1.12; }
html.big-mode .zhub > i { font-size: 15px; }         /* 大字模式下拼音小帽子再同步放大一档 */

/* ============================================================
 * 流畅模式（性能兜底）：给老旧「班班通 / 投影电脑」用
 *   —— 关掉背景动画、去掉毛玻璃、压掉大范围发光阴影。
 *      视觉降级但内容一字不减，滚动/切换更顺。
 * ============================================================ */
html.lite-mode .sky .sun,
html.lite-mode .sky .cloud { animation: none !important; }
html.lite-mode:not(.night) .sky .sun {
  /* 三层大范围辉光很吃 GPU，降为一层柔和光晕（夜间月亮不受此影响） */
  box-shadow: 0 0 32px 8px rgba(255, 206, 92, .42) !important;
}
html.lite-mode .sky .c2,
html.lite-mode .sky .c4 { display: none; }          /* 少画两朵云，减少重绘 */
html.lite-mode:not(.night) .topbar,
html.lite-mode:not(.night) .mobile-tabs {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #ffffff !important;                    /* 毛玻璃 → 纯白，避免投影上糊成一团 */
}
html.lite-mode .view.active { animation: none; }     /* 换页不再淡入 */
/* 注意：不动卡片/按钮的常规投影 —— 那是「可点击」的视觉线索，一年级很依赖它。
   只去掉范围最大、最吃 GPU 的装饰性发光即可。 */

/* ============================================================
 * 教室模式（建议 3.4）：投屏到「班班通 / 白板」用
 *   —— 学生坐在 3–6 米外，所以：整体放大 + 去装饰 + 提高对比。
 *      1) 字号整体放大到 1.3 倍（可再叠加「大字模式」）；
 *      2) 去掉天空/云朵/季节粒子与 footer，背景转纯色，投影不糊；
 *      3) 顶栏 / 底部栏关掉毛玻璃 backdrop-filter（投影仪上会糊成一团）；
 *      4) 卡片描边加粗，远距离轮廓更清楚。
 * ============================================================ */
html.classroom { zoom: 1.3; }
html.classroom .zhub > i { font-size: 16px; }        /* 教室投屏：拼音小帽子再放大一档，后排也看得清 */
html.classroom .sky { display: none; }               /* 去装饰背景，留纯色底，对比更高 */
html.classroom:not(.night) body {
  background: #eef5ff;                               /* 渐变 → 近纯色，投影更干净 */
  background-attachment: initial;
}
html.classroom:not(.night) .topbar,
html.classroom:not(.night) .mobile-tabs {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #ffffff !important;
}
html.classroom .topbar { border-bottom-width: 5px; }
html.classroom .card, html.classroom .panel, html.classroom .side-card { border-width: 3px; }
html.classroom .footer { display: none; }            /* 去掉次要版权行，减少干扰 */
/* 一屏一个任务：测验 / 闯关的题干与选项再放大一档，后排也看得清 */
html.classroom #qzStage .quiz-opt { font-size: 30px; }
html.classroom #qzStage .tone-name { font-size: 20px; }

/* ============================================================
 * 首页 · 今日小任务（建议 10）
 * ============================================================ */
.home-goal {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin: 14px auto 4px; max-width: 900px;
  padding: 12px 16px; border-radius: 18px;
  background: #fff8e8; border: 3px solid #ffe3a6;
}
.home-goal .go-title { font-size: 16px; font-weight: 800; color: #9a6b00; margin-right: 4px; }
.home-goal .go-item {
  font-size: 15px; font-weight: 700; color: #7a6a3a;
  padding: 4px 12px; border-radius: 999px; background: #fff; border: 2px solid #ffedc4;
}
.home-goal .go-item.ok { color: var(--ok-deep); border-color: #b6e8cc; background: #f2fcf6; }
.home-goal .go-star { font-size: 14px; font-weight: 800; color: #d78a00; }
.home-goal .go-note { font-size: 13px; font-weight: 700; color: #b08a3a; }

/* 手机（≤639）：今日小任务从三行压成两行 —— 标题一行、两个任务并排一行。
   「完成小任务，今天就是拼音小明星」这句一年级读不下来，手机端收起（桌面仍留给家长看）。
   必须写在上面 .home-goal 基础规则之后，同优先级下后者才生效。 */
@media (max-width: 639px) {
  .home-goal {
    display: grid; grid-template-columns: auto auto; justify-content: space-between;
    gap: 6px 8px; margin: 12px auto 4px; padding: 10px 10px;
  }
  .home-goal .go-title { grid-column: 1 / -1; font-size: 14px; margin: 0; }
  .home-goal .go-item {
    font-size: 12px; padding: 4px 5px; text-align: center; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .home-goal .go-note { display: none; }
  .home-goal .go-star { grid-column: 1 / -1; font-size: 13px; text-align: center; }
}

/* ============================================================
 * 家长周报（建议 6）：弹窗 + 打印
 * ============================================================ */
.weekly-mask {
  position: fixed; inset: 0; z-index: 118;
  background: rgba(24, 46, 74, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 18px 12px; overflow-y: auto;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.weekly-mask[hidden] { display: none; }
body.weekly-open { overflow: hidden; }
.weekly-card {
  background: #fff; border-radius: 26px; width: 100%; max-width: 620px;
  box-shadow: 0 10px 0 rgba(60, 110, 170, .22), 0 24px 48px rgba(30, 70, 120, .28);
  padding: 18px 20px 16px; margin: auto;
}
.wk-head { display: flex; align-items: center; justify-content: space-between; }
.wk-head h3 { font-size: 20px; color: var(--title); }
.wk-close {
  width: 38px; height: 38px; border-radius: 50%; font-size: 18px;
  background: var(--line); color: #4a6480; font-weight: 700; cursor: pointer;
}
.wk-date { font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 8px 0 2px; }
.w-rows { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 6px; }
.w-row {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline;
  padding: 9px 12px; border-radius: 14px; background: #f4f8fc;
}
.w-row .wk { font-size: 13px; font-weight: 800; color: var(--muted); min-width: 84px; }
.w-row .wv { font-size: 15px; font-weight: 700; color: #1f3350; }
.w-mis { color: #b04a4a; }
.wk-note { font-size: 12px; color: var(--ink-2); margin: 8px 0 2px; }
.wk-empty { font-size: 15px; color: var(--ink-2); padding: 10px 0; }
.wk-actions { display: flex; gap: 10px; margin-top: 12px; }
.wk-actions .tool-btn { flex: 1; min-height: var(--tap); font-size: 14px; }

/* ---- 手机竖屏：选择器「选完自动收起」 ----
   声调页 32 个韵母、拼读页 23 / 24 个声母韵母、音节表 25 个声母，铺开就是 4~6 行，
   把真正要练的内容挤到第二屏以后。这里只留已选的那一个 + 「换一个 ▾」；
   没选中的按钮只是 display:none，仍然留在 DOM 里（键盘 / 读屏 / 自动化测试都还找得到）。 */
.pick-more {
  display: none; align-items: center; gap: 2px; margin-left: 8px; padding: 4px 10px;
  font-family: inherit; font-size: 12.5px; font-weight: 800; color: var(--blue-mid);
  background: #fff; border: 1.5px solid #cfe4ff; border-radius: 999px;
}
.pick-more:hover { background: #eef6ff; border-color: #9fcaf7; }

/* ---- 「筛选 ▾」：手机版把分类条收进这里 ----
   拼读页的声母 / 韵母分类、音节表的「① 声母 ② 类别」两排，铺开就是 4~6 行。
   电脑宽屏直接平铺（这个按钮 display:none 不出现），只有手机才收成一颗按钮。 */
.cat-more {
  display: none; align-items: center; gap: 4px; margin-left: 8px; padding: 8px 14px;
  font-family: inherit; font-size: 13px; font-weight: 800; color: var(--blue-mid);
  background: #fff; border: 2px solid #cfe4ff; border-radius: 999px;
  min-height: var(--tap); cursor: pointer; transition: background .12s, border-color .12s;
}
.cat-more:hover { background: #eef6ff; border-color: #9fcaf7; }
.cat-more.on { background: var(--purple); border-color: #8a4be0; color: #fff; }

/* ---- 第 35 轮：拼读练习的下拉筛选（手机、电脑都用同一个下拉） ----
   按钮显示当前所筛的分类（如「单韵母 ▾」），点开在按钮下方弹一个小面板，
   点面板里的分类即筛选，点按钮外任意处自动收起。 */
.blend-fil { position: relative; display: inline-flex; vertical-align: middle; margin-left: 6px; }
.blend-fil-btn { display: inline-flex; }          /* 桌面也显示（.cat-more 默认是 none） */
.cat-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 176px; max-width: 300px; padding: 8px; gap: 6px; flex-wrap: wrap;
  background: #fff; border: 2px solid #dbe9fb; border-radius: 14px;
  box-shadow: 0 12px 26px rgba(30, 70, 120, .18);
}
.cat-menu.is-open { display: flex; }
.cat-menu .cat-chip { font-family: var(--pinyin); }
/* 声调 / 音节表的「筛选」浮层有两段（混合练·哪一类 / 声母·类别），竖排两段，加宽 */
.cat-menu.tone-fil-menu, .cat-menu.syl-fil-menu {
  flex-direction: column; align-items: stretch; gap: 10px;
  min-width: 264px; max-width: 336px;
}
/* 这两个「筛选 ▾」按钮在标题行右侧，浮层往右会长出屏幕 —— 改右对齐收进来 */
.section-head .blend-fil .cat-menu { left: auto; right: 0; }
/* 按课学习「本课拼读」的按声母筛：一行「按声母筛」+ 筛选按钮 */
.pd-fil-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; }
.pd-fil-k { font-size: 12.5px; font-weight: 800; color: #6b3fbf; }

@media (max-width: 639px) {
  .pick-more.on { display: inline-flex; }
  .yunmu-picker.is-fold .yunmu-pick:not(.active),
  .sel-grid.is-fold .sel-btn:not(.active),
  .syl-pick.is-fold:not(.is-open) .cat-chip:not(.active) { display: none; }

  /* 强引导横幅 → 浮层小卡片：不再占页面高度，✕ 关掉，往下滑自动让开 */
  .view.active { animation: fadeInPhone .22s ease; }   /* 去掉 transform，否则浮层的 fixed 会短暂错位 */
  .view-cta {
    position: fixed; left: 8px; right: 8px; top: calc(var(--topH) + 8px); z-index: 55;
    margin: 0; border-radius: 18px; flex-wrap: nowrap;
    box-shadow: 0 10px 22px rgba(30, 70, 120, .22);
    transition: transform .22s ease, opacity .22s ease;
  }
  .view-cta.is-away { transform: translateY(-170%); opacity: 0; pointer-events: none; }
  .view-cta .vc-ico { font-size: 24px; }
  .view-cta .vc-text { flex: 1 1 auto; min-width: 0; font-size: 13.5px; }
  .view-cta .vc-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; flex: 0 0 auto; margin-left: 2px;
    border-radius: 50%; background: #eef4fb; color: #4a6480;
    font-size: 15px; font-weight: 800; cursor: pointer; border: none;
  }
  .view-cta .vc-close:hover { background: #e0eaf7; }

  /* 分类条收进「筛选 ▾」：默认收起，点开才铺开 */
  .cat-more { display: inline-flex; }
  .cat-bar { display: none; }
  .cat-bar.is-open { display: flex; }
  .syl-pick.is-cat { display: none; }
  .syl-pick.is-cat.is-open { display: flex; }
  .syl-pick.is-cat .pick-more { display: none; }   /* 有了筛选，这个「换一个」就多余了 */
}
@keyframes fadeInPhone { from { opacity: 0; } to { opacity: 1; } }

/* ---- 键盘 / 遥控笔聚焦环 ----
   全站原来只有成长树叶片和音量滑块有焦点样式，用 Tab 走一遍基本看不出焦点在哪。
   鼠标点击不触发（:focus-visible），教室投屏用键盘或遥控笔时才出现。 */
button:focus-visible, a:focus-visible, [tabindex]:focus-visible,
.tool-btn:focus-visible, .mchip:focus-visible, .subtab:focus-visible,
.filter-chip:focus-visible, .cat-chip:focus-visible, .sel-btn:focus-visible,
.yunmu-pick:focus-visible, .example-chip:focus-visible, .home-mod:focus-visible,
.lv-mode:focus-visible, .lv-fold:focus-visible, .nav-btn:focus-visible,
.mtab:focus-visible, .pick-more:focus-visible, .tc-arrow:focus-visible,
.gb-quit:focus-visible, .wl-btn:focus-visible, .lv-btn:focus-visible {
  outline: 3px solid #2f8adf; outline-offset: 2px;
}

/* ============================================================
 * 第 24 轮：按课学习 / 小测验 / 音节表 的几处收拢
 * ============================================================ */

/* ---- 「温故」「🧩 本课拼读」：标题栏点一下展开 / 收起（默认收起）----
   新学的才是这一课的主角，复习和拼读点开再看。收起只是 display:none，
   正文仍然在 DOM 里（读屏、键盘和自动化测试照旧找得到）。 */
.ls-foldsec .ls-fold {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 8px 12px; border-radius: 14px;
  background: #f2f7fd; border: 2px solid #e3eefb;
  transition: background .14s, border-color .14s;
}
.ls-foldsec .ls-fold:hover { background: #e8f2fd; border-color: #cfe3fa; }
.ls-foldsec .ls-fold .fold-ico { font-size: 13px; color: #4a80c0; }
.ls-foldsec .ls-fold .fold-hint { margin-left: auto; flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #6b8fb8; }
.ls-foldsec.is-collapsed .ls-foldbody { display: none; }
.ls-foldsec.is-collapsed .ls-fold { margin-bottom: 0; }

/* ---- 本课拼读：按声母筛（只列这一课会考的那几个）---- */
.pd-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.pd-filter .cat-chip { font-family: var(--pinyin); }

/* ---- 「点一点卡片听标准发音 · 本课已点读 N / N」并到「📖 按课学习」旁边 ---- */
.learn-parts .lp-hint { align-self: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }

/* 「▶ 连读本课」与「⏸ 暂停」合成一颗键（元素保留，连读控制器仍绑定它） */
#view-lesson #lessonPause { display: none; }

@media (max-width: 639px) {
  /* ---- 课程表卡片：一年级只要认出「这一课学哪些字母」----
     词块（.lsn-words）、点读进度（.lsn-prog）和重复的一行课名字母（.lsn-title）都收起来，
     卡片上只留课号 + 字母卡；字母卡里的代表字与 🔊 也收掉，一行能排 3~4 个。 */
  .lsn-words, .lsn-prog, .lsn-title { display: none; }
  .lsn-card { padding: 10px 8px 12px; gap: 5px; }
  .lsn-map { gap: 10px; }
  .lsn-tag { padding: 3px 7px; }
  .lsn-tag b, .lsn-tag i { display: none; }
  .lsn-tag { font-size: 15px; }
  /* 字母卡占满卡片宽度，每一行居中，不会挤到左边参差不齐 */
  .lsn-items { width: 100%; }

  /* ---- 「🔤 自主学习 / 📖 按课学习 / 本课已点读 N / N」挤成一行 ----
     「点一点卡片听标准发音」这句在手机上省掉（桌面照旧显示），
     剩下的进度提示才放得进按钮旁边。 */
  .learn-parts { flex-wrap: nowrap; gap: 6px; margin-bottom: 12px; }
  .learn-parts .lpart { padding: 8px 10px; font-size: 13px; min-width: 0; }
  .learn-parts .lp-hint { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .learn-parts .lp-hint-full { display: none; }

  /* ---- 按课学习：字母卡上那个「提示拼音的汉字」在手机上不出现 ----
     （卡片左上角的 哥 / 科 / 喝 之类，是给拼音读音做提示的汉字；
       手机屏窄，孩子只要认字母本身。桌面照旧显示。）
     注：音节词卡（.wd-card）不受影响 —— 那上面的汉字就是这一课要认的词。 */
  #view-lesson .card .zi { display: none; }

  /* ---- 「← 课程表 / ▶ 连读本课 / ⏹ 停止 / 🎲 随机读一个」排成一行 ----
     和「学拼音」页同一套做法：前 3 个按内容宽度，最后一个吃掉余下的宽度；
     手机上收起拼音小帽子，4 个按钮才排得下。 */
  #view-lesson .ls-tools {
    display: grid; grid-template-columns: auto auto auto minmax(0, 1fr);
    gap: 5px; align-items: stretch;
  }
  #view-lesson .ls-tools .tool-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 0; padding: 6px 7px; font-size: 12.5px; white-space: nowrap;
  }
  #view-lesson .ls-tools .tool-btn .zhub > i { display: none; }
  /* 最长的那个（🎲 随机读一个）字号降半档，否则会折成三行 */
  #view-lesson .ls-tools #lsOne { font-size: 11.5px; padding: 6px 4px; }

  /* ---- 小测验：类别条收进「筛选 ▾」，当前这一类仍然看得见 ---- */
  #quizCat.is-fold .cat-chip:not(.active) { display: none; }

  /* ---- 音节表：标题在左、「筛选 ▾」在右、说明单独一行（和声调页一致）---- */
  #view-table .section-head h2 { order: 1; }
  #view-table .section-head .blend-fil { order: 2; }
  #view-table .section-head .desc { order: 3; flex: 1 1 100%; }

  /* ---- 顶栏随滑动收起 / 回弹 ----
     一年级在手机上滚两下就看不到顶栏了，而它占着 60px、只在最上面有用：
     往下滑收起，往上滑或滚回顶部立刻回来。 */
  .topbar { transition: transform .22s ease; }
  body.top-hide .topbar { transform: translateY(-130%); }
}
/* 375px 及以下：一行排 4 个会把「随机读一个」挤成单字一行 —— 改成 2×2 */
@media (max-width: 375px) {
  #view-lesson .ls-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view-lesson .ls-tools #lsOne { white-space: nowrap; }
}

/* 打印：只印周报卡片本身 */
@media print {
  body * { visibility: hidden; }
  #weeklyMask, #weeklyMask * { visibility: visible; }
  #weeklyMask {
    position: absolute; left: 0; top: 0; width: 100%; padding: 0;
    background: #fff; overflow: visible;
  }
  #weeklyMask .wk-close, #weeklyMask .wk-actions { display: none; }
  .weekly-card { box-shadow: none; max-width: 100%; }
}

/* ---------------- 学生档案（多人进度） ---------------- */
/* 一个班几十个孩子时，一行一个会把侧栏拉得老长、把下面的卡片全挤下去。
   所以这里改成「一行多个、排满了自动换行」的小标签；
   并且用等宽格子排（不是按字数自由伸缩），两个字的名字和三个字的名字
   左右边界都对齐、✕ 也排成一条线，看着才像一张整齐的名单。
   整块还限了高度，人实在太多就在自己这一小块里滚动，绝不去挤别的内容。 */
.pf-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 6px; margin-top: 6px; align-content: start;
  max-height: 168px; overflow-y: auto; padding-right: 2px;
}
.pf-chip-wrap { display: flex; align-items: stretch; gap: 3px; min-width: 0; }
.pf-name { flex: 1 1 auto; min-width: 0; text-align: center; }
.pf-name.pf-chip {
  min-height: 36px; padding: 6px 4px; font-size: 14px; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-name.active { outline: 2px solid #5eb6ff; background: #eaf4ff; font-weight: 700; }
.pf-del { flex: 0 0 26px; width: 26px; padding: 0; color: #c8556b; }
.pf-del.pf-chip-del { min-height: 36px; font-size: 12px; }
/* 手机上格子再收一点，保证一行还能放下两个 */
@media (max-width: 480px) {
  .pf-list { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); max-height: 150px; }
  .pf-name.pf-chip { font-size: 13px; }
}

/* 顶栏「👧 当前：XXX」—— 本身就是学生档案的入口，点一下名单在它下面弹出 */
.pf-badge-wrap { position: relative; flex: 0 0 auto; }
#pfBadge::after { content: ' ▾'; font-size: 11px; opacity: .85; }
.pf-pop {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  z-index: 130; width: min(300px, 90vw); max-height: 70vh; overflow-y: auto;
  padding: 12px 14px; border-radius: 14px;
  background: var(--card, #fff); border: 2px solid var(--border, #cfe0f3);
  box-shadow: 0 14px 40px rgba(30, 60, 110, .24);
  text-align: left;
}
.pf-pop[hidden] { display: none; }
/* 小屏幕上别让它顶出屏幕外，改成贴着右边对齐 */
@media (max-width: 480px) {
  .pf-pop { left: auto; right: 0; transform: none; width: min(300px, calc(100vw - 24px)); }
}
/* 顶栏「当前学生」醒目标识：选中孩子时高亮，未选时弱化显示"公共区" */
.cur-student {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  border: none; cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #5eb6ff, #7c6bff);
  box-shadow: 0 4px 12px rgba(94, 182, 255, .42);
}
.cur-student.empty { color: #6f8aa3; background: #eef3f8; box-shadow: none; border: 2px solid #dce7f0; font-weight: 700; }
.cur-student[hidden] { display: none; }
.pf-modal { position: fixed; inset: 0; z-index: 320; display: flex; align-items: center; justify-content: center; background: rgba(20,40,70,.45); }
.pf-modal[hidden] { display: none; }
.pf-modal-box { width: min(460px, 92vw); max-height: 88vh; overflow: auto; background: #fff; border-radius: 16px; padding: 20px 22px; box-shadow: 0 18px 50px rgba(20,40,70,.35); }
.pf-modal-box h3 { margin: 0 0 8px; }
.pf-modal-box textarea { width: 100%; box-sizing: border-box; border: 2px solid #cfe0f3; border-radius: 10px; padding: 10px; font-size: 15px; resize: vertical; font-family: inherit; line-height: 1.6; }
.pf-file-row { margin-top: 10px; }
.pf-file-label { display: inline-block; font-size: 14px; color: #3a6ea5; cursor: pointer; }
.pf-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
/* 回收站：删学生 / 清进度 的留底，一条一行，点「恢复」捞回来 */
.pf-trash-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; max-height: 46vh; overflow-y: auto; }
.pf-trash-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 2px solid var(--border); border-radius: 12px; background: #f8fbff;
}
.pf-trash-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.pf-trash-meta b { font-weight: 800; }
.pf-trash-meta span { font-size: 12px; color: var(--muted); }
.pf-trash-btn { flex: 0 0 auto; padding: 6px 12px; font-size: 13px; }

/* ---------- 顶栏「家长·老师」下拉菜单 ---------- */
.top-menu-wrap { position: relative; }
/* 透明桥：补上按钮与下拉之间的 8px 间隙，鼠标从按钮移到菜单时不断开（否则悬停会闪退够不着） */
.top-menu-wrap::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.top-menu {
  position: fixed; top: 0; left: 0; right: auto; z-index: 120;
  min-width: 188px; max-width: calc(100vw - 16px);
  background: var(--card); border: 2px solid var(--border); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(30,60,110,.22);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.top-menu[hidden] { display: none; }
/* 关闭按钮（手机端必点才显，给个 ✕ 方便关；桌面按 Esc 也能关） */
.top-menu-x {
  position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border); background: #f1f7ff; color: var(--muted); font-size: 14px; cursor: pointer; z-index: 1;
}
.top-menu-x:hover { background: #e3eefc; }
.top-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 10px 36px 10px 12px; border: none; border-radius: 10px; background: transparent;
  font: inherit; font-size: 14px; color: var(--ink); cursor: pointer;
}
.top-menu-item:hover, .top-menu-item:focus { background: #eef6ff; }
.top-menu-all { border-top: 2px dashed var(--line-soft); margin-top: 3px; color: var(--muted); }

/* ---------- 家长·老师下拉：把单个面板拎出来当独立窗口 ---------- */
.panel-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,40,70,.42);
}
.panel-modal[hidden] { display: none; }
.panel-modal-mask { position: absolute; inset: 0; }
.panel-modal-box {
  position: relative; z-index: 1; width: min(440px, 92vw); max-height: 86vh; overflow-y: auto;
  background: var(--card); border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 20px 60px rgba(30,60,110,.32); padding: 20px 20px 22px;
}
.panel-modal-x {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--border); background: #f1f7ff; color: var(--muted); font-size: 15px; cursor: pointer; z-index: 2;
}
.panel-modal-x:hover { background: #e3eefc; }
/* 搬到弹窗里的侧栏卡片：去掉自身边框/阴影/底色，由弹窗框统一承载 */
.side-card.in-modal { border: none; box-shadow: none; background: transparent; padding: 0 2px; }

/* ============================================================
 * 第三块 · 螺旋复习：复习页「今天错的 / 以前错的」两栏 + 考考我小测
 * ============================================================ */
.rv-sub-head { margin: 14px 0 6px; font-size: 15px; font-weight: 700; color: var(--ink); }
.rv-list-past .rv-item { background: var(--card); opacity: .96; }
.rv-quiz { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.rv-q-play { font-size: 17px; padding: 12px 22px; min-height: var(--tap); border-radius: 999px;
  border: 2px solid var(--blue); background: var(--blue-soft); color: var(--blue-deep); cursor: pointer; font-weight: 700; }
.rv-q-opts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 6px; }
.rv-q-opt { font-size: 22px; font-family: var(--pinyin, var(--font)); padding: 14px 20px; min-width: 84px; min-height: var(--tap);
  border-radius: 14px; border: 2px solid var(--border); background: var(--card); color: var(--ink); cursor: pointer; font-weight: 700; }
.rv-q-opt:hover { border-color: var(--blue); background: var(--blue-soft); }
.rv-q-opt.right { background: var(--ok-soft); border-color: var(--ok); color: var(--ok-deep); }
.rv-q-opt.wrong { background: var(--err-soft); border-color: var(--err); color: var(--err-ink); opacity: .6; }
.rv-q-fb { min-height: 22px; margin: 6px 0 0; font-size: 15px; font-weight: 700; }
.rv-q-fb.ok { color: var(--ok-deep); }
.rv-q-fb.no { color: var(--orange); }

/* ============================================================
 * 第四块 · 激励具体化：集星换奖状 + 今日成就卡
 * ============================================================ */
.pt-cert { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.pt-cert b { color: var(--orange); font-size: 15px; }
.pt-cert.done { color: var(--ok-deep); font-weight: 700; }
.pt-cert-bar { display: block; height: 6px; margin: 5px 0 3px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.pt-cert-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--yellow), var(--orange)); }
.pt-cert-n { font-size: 12px; color: var(--muted); }

.grow-cert { display: flex; gap: 8px; margin-top: 8px; }
.grow-cert-btn { flex: 1; min-height: var(--tap); font-size: 14px; }

/* 奖状 / 成就卡弹窗（独立遮罩，不与拼音树弹窗互相干扰） */
.cert-mask { position: fixed; inset: 0; background: rgba(20, 26, 38, .55); z-index: 1200;
  display: flex; align-items: center; justify-content: center; padding: 18px; }
.cert-mask[hidden] { display: none; }
.cert-box { width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--card);
  border-radius: 18px; box-shadow: var(--shadow-lg); padding: 18px 18px 14px; }
.cert-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cert-head b { font-size: 18px; color: var(--ink); }
.cert-x { border: none; background: transparent; font-size: 20px; color: var(--muted); cursor: pointer; min-width: var(--tap); min-height: var(--tap); }
.cert-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.cert-note { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.cert-list { display: flex; flex-direction: column; gap: 10px; }
.cert-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px;
  border: 2px solid var(--border); background: var(--card); }
.cert-card.got { border-color: var(--yellow); background: var(--yellow-soft); }
.cert-card.lock { opacity: .72; }
.cert-ico { font-size: 30px; width: 44px; text-align: center; }
.cert-meta { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cert-meta b { font-size: 16px; color: var(--ink); }
.cert-need { font-size: 13px; color: var(--orange); font-weight: 700; }
.cert-word { font-size: 13px; color: var(--muted); }

/* 奖状纸（打印友好：白底、大字、带名字和日期） */
.cert-paper { background: #fffdf5; color: #3a2f18; border: 3px solid #f0c96b; border-radius: 14px;
  padding: 22px 20px; text-align: center; box-shadow: inset 0 0 0 6px #fffdf5, inset 0 0 0 7px #f5dc9e; }
.cert-p-top { font-size: 24px; font-weight: 800; letter-spacing: 6px; color: #b8862f; }
.cert-p-ico { font-size: 52px; margin: 10px 0 4px; }
.cert-p-name { font-size: 22px; font-weight: 800; color: #8a5a12; }
.cert-p-to { margin: 12px 0 6px; font-size: 17px; }
.cert-p-to b { color: #b8862f; }
.cert-p-word { font-size: 16px; line-height: 1.9; }
.cert-p-star { margin-top: 12px; font-size: 17px; font-weight: 700; color: #b8862f; }
.cert-p-sign { display: flex; justify-content: space-between; margin-top: 18px; font-size: 13px; color: #8a7a55; }
.today-card .tc-to { margin: 10px 0 14px; font-size: 16px; color: #8a5a12; font-weight: 700; }
.tc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tc-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px;
  border-radius: 12px; background: #fff8e3; border: 1px solid #f0dcae; }
.tc-ico { font-size: 24px; }
.tc-cell b { font-size: 22px; color: #8a5a12; }
.tc-cell b i { font-size: 13px; font-style: normal; color: #a08a5c; }
.tc-t { font-size: 13px; color: #8a7a55; }

/* 打印奖状 / 成就卡：只留那张纸，其余全隐掉 */
@media print {
  body > *:not(.cert-mask) { display: none !important; }
  .cert-mask { position: static; background: #fff; padding: 0; display: block; }
  .cert-box { box-shadow: none; max-height: none; width: 100%; padding: 0; border-radius: 0; }
  .cert-head, .cert-foot { display: none !important; }
}
