* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #f5f7fa;
  color: #2c3e50;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

.view { display: none; padding: 16px 16px calc(28px + env(safe-area-inset-bottom)); max-width: 680px; margin: 0 auto; }
.view.active { display: block; }

.hero { padding: 26px 6px 20px; text-align: center; }
.hero h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.hero .sub { margin: 8px 0 0; font-size: 13px; color: #7f8c9b; }
.foot { text-align: center; font-size: 12px; color: #a5b1bd; margin-top: 18px; }

.card {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(74,144,217,.08);
}
.card.center { text-align: center; }

.list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }

.unit {
  background: #fff; border-radius: 14px; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 10px rgba(74,144,217,.08);
  cursor: pointer;
}
.unit:active { transform: scale(.995); }
.badge {
  display: inline-block; background: #4a90d9; color: #fff;
  font-size: 11px; border-radius: 999px; padding: 2px 10px; margin-bottom: 6px;
}
.unit-title { font-size: 16px; font-weight: 600; }
.unit-cn { font-size: 12px; color: #7f8c9b; margin-top: 4px; }
.unit-meta { font-size: 11px; color: #a5b1bd; text-align: right; line-height: 1.7; }

.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.topbar-title { font-size: 13px; color: #7f8c9b; }
.back {
  border: none; background: #eef3f8; color: #4a90d9;
  font-size: 13px; padding: 6px 14px; border-radius: 999px;
}
.title { margin: 4px 0 4px; font-size: 19px; text-align: center; }
.sub-center { margin: 0 0 16px; font-size: 12px; color: #7f8c9b; text-align: center; }
.sec { font-size: 13px; color: #7f8c9b; font-weight: 500; margin: 18px 4px 10px; }

.text-row {
  background: #fff; border-radius: 14px; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 10px rgba(74,144,217,.08);
}
.text-row .name { font-size: 15px; font-weight: 600; }
.text-row .meta { font-size: 11px; color: #a5b1bd; margin-top: 4px; }

.btn {
  border: none; border-radius: 999px; font-size: 14px; padding: 10px 18px;
  background: #4a90d9; color: #fff; font-weight: 500;
}
.btn.green { background: #2ecc71; }
.btn.block { display: block; width: 100%; margin-top: 14px; padding: 12px 0; }
.btn:active { opacity: .85; }
.btn.small { font-size: 12px; padding: 8px 14px; }

.words { max-height: 40vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.word { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px solid #eef3f8; font-size: 13px; }
.word:last-child { border-bottom: none; }
.word .cn { color: #95a5b3; font-size: 12px; }

.speed-bar {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 14px; padding: 10px 12px; margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(74,144,217,.08);
}
.speed-label { font-size: 12px; color: #7f8c9b; flex: none; }
.segs { display: flex; flex: 1; gap: 6px; }
.seg {
  flex: 1; border: none; border-radius: 999px; padding: 7px 0;
  font-size: 12px; background: #eef3f8; color: #2c3e50; white-space: nowrap;
}
.seg.active { background: #4a90d9; color: #fff; }
.bgm {
  border: none; border-radius: 999px; padding: 7px 12px; font-size: 11px;
  background: #eef3f8; color: #95a5b3; flex: none;
}
.bgm.on { background: #2ecc71; color: #fff; }

.progress { font-size: 12px; color: #a5b1bd; margin: 0; }
.speaker { font-size: 12px; color: #4a90d9; margin: 12px 0 4px; }
.sentence { font-size: 20px; font-weight: 600; line-height: 1.5; margin: 0; min-height: 60px; }

.ctrl { display: flex; gap: 8px; margin-top: 18px; }
.cbtn {
  flex: 1; border: none; border-radius: 999px; padding: 11px 0;
  font-size: 12px; background: #eef3f8; color: #4a90d9;
}
.cbtn.primary { background: #4a90d9; color: #fff; flex: 1.2; }
.cbtn.on { background: #2ecc71; color: #fff; }

.lines { max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lines .ln { display: flex; gap: 8px; padding: 8px 6px; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.lines .ln .no { color: #a5b1bd; font-size: 11px; width: 18px; flex: none; }
.lines .ln.active { background: #eaf3fc; }
.lines .ln.active .body { color: #2a6db5; font-weight: 600; }

.stage { min-height: 90px; display: flex; flex-direction: column; justify-content: center; margin-top: 10px; }
.hint-icon { font-size: 40px; }
.hint-text { color: #95a5b3; font-size: 15px; margin-top: 6px; }
.answer-word { font-size: 28px; font-weight: 700; color: #2a6db5; }
.answer-cn { font-size: 14px; color: #7f8c9b; margin-top: 6px; }

.dots { display: flex; justify-content: center; gap: 9px; margin-top: 12px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #dde5ee; }
.dots i.on { background: #4a90d9; }
.tip { font-size: 11px; color: #a5b1bd; margin: 8px 0 0; min-height: 16px; }

.auto-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; font-size: 12px; color: #7f8c9b; }
.switch { width: 40px; height: 22px; border-radius: 999px; background: #dde5ee; position: relative; transition: background .2s; }
.switch::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 2px; left: 2px; transition: left .2s;
}
.switch.on { background: #4a90d9; }
.switch.on::after { left: 20px; }

.card.done { border: 1.5px solid #2ecc71; text-align: center; }
.done-title { margin: 0; font-size: 17px; font-weight: 700; color: #2ecc71; }
.done-sub { margin: 6px 0 0; font-size: 12px; color: #7f8c9b; }

/* ---------- 四科首页 ---------- */
.hero.small { padding: 14px 6px 16px; }
.subject-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.subject-card {
  background: #fff; border-radius: 16px; padding: 18px 14px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(74,144,217,.08); border: 1px solid #eef3f8;
  display: flex; flex-direction: column; gap: 6px; min-height: 128px;
}
.subject-card:active { transform: scale(.98); }
.sub-icon { font-size: 28px; line-height: 1; }
.sub-name { font-size: 17px; font-weight: 700; color: #22374e; }
.sub-desc { font-size: 11px; color: #8a97a8; line-height: 1.5; }
.sub-meta { font-size: 10px; color: #4a90d9; margin-top: auto; }
.entry-card { padding: 16px 18px; }
.entry-title { font-size: 15px; font-weight: 600; color: #22374e; }
.entry-sub { font-size: 11px; color: #8a97a8; margin-top: 4px; }
.install-tip {
  margin-top: 12px; font-size: 12px; line-height: 1.7; color: #4a6a8a;
  background: #f2f8ff; border-radius: 10px; padding: 12px;
}

/* ---------- 英语复习页 ---------- */
.rev-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.revtab {
  flex: 1; border: none; border-radius: 999px; padding: 10px 0;
  font-size: 13px; background: #fff; color: #6b7a8d;
  box-shadow: 0 2px 8px rgba(74,144,217,.06);
}
.revtab.on { background: #4a90d9; color: #fff; font-weight: 600; }
.rev-panel { margin-bottom: 14px; }
.center-tip { text-align: center; margin: 0 0 12px; }
.point-row {
  display: flex; gap: 8px; font-size: 13px; line-height: 1.75; color: #33445c;
  padding: 10px 0; border-bottom: 1px solid #eef3f8;
}
.point-row:last-child { border-bottom: none; }
.point-no { color: #4a90d9; font-weight: 600; flex: none; }
.ext-line { color: #2a6db5; }
.ext-block {
  background: #f2f8ff; border: 1px solid #d8e8fb; border-radius: 10px;
  padding: 10px 12px; margin-top: 12px;
}
.ext-title { font-size: 13px; font-weight: 600; color: #4a90d9; margin-bottom: 4px; }
.ext-block .point-row { font-size: 12px; }
.phrase-card { padding: 14px 16px; }
.phrase-row, .ex-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; cursor: pointer; }
.ex-row { border-top: 1px dashed #e3eaf2; margin-top: 6px; padding-top: 12px; }
.phrase-en { font-size: 16px; font-weight: 600; color: #22374e; flex: 1; }
.phrase-cn { font-size: 11px; color: #8a97a8; }
.ex-en { font-size: 13px; color: #33445c; flex: 1; line-height: 1.5; }
.ex-cn { font-size: 11px; color: #9aa7b6; text-align: right; max-width: 38%; }
.play-ico {
  width: 30px; height: 30px; line-height: 30px; text-align: center;
  border-radius: 50%; background: #eaf3fd; color: #4a90d9; font-size: 11px; flex: none;
}
.play-ico.small { width: 26px; height: 26px; line-height: 26px; }

/* ---------- 三科题目 ---------- */
.quiz-score-card { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: 13px; color: #4a6a8a; }
.quiz-card { padding: 16px; }
.quiz-q { display: flex; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.6; color: #22374e; margin-bottom: 12px; }
.quiz-no { color: #4a90d9; flex: none; }
.quiz-opts { display: flex; flex-direction: column; gap: 8px; }
.quiz-opt {
  border: 1px solid #e3eaf2; background: #fbfdff; border-radius: 10px;
  padding: 11px 12px; font-size: 13px; text-align: left; color: #33445c; line-height: 1.5;
}
.quiz-opt.done { cursor: default; }
.quiz-opt.right { background: #eafaf0; border-color: #2ecc71; color: #1e8449; font-weight: 600; }
.quiz-opt.wrong { background: #fdeeee; border-color: #e74c3c; color: #c0392b; }
.quiz-explain { margin-top: 12px; background: #f7f9fc; border-radius: 10px; padding: 12px; }
.ex-verdict { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.ex-verdict.ok { color: #1e8449; }
.ex-verdict.no { color: #c0392b; }
.ex-text { font-size: 12px; line-height: 1.75; color: #4a5a6e; }

/* ---------- 语音提问 ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  border: none; background: #fff; color: #6b7a8d; font-size: 13px;
  padding: 8px 18px; border-radius: 999px; box-shadow: 0 2px 8px rgba(74,144,217,.06);
}
.chip.on { background: #4a90d9; color: #fff; font-weight: 600; }
.oral-q { font-size: 16px; line-height: 1.7; font-weight: 600; color: #22374e; margin: 10px 0 14px; }
.inline-sec { margin: 0 0 10px; }
.record-btn { background: #4a90d9; }
.record-btn.listening { background: #e74c3c; }
.rec-status { font-size: 11px; color: #8a97a8; text-align: center; margin: 8px 0 10px; min-height: 15px; }
.answer-input {
  width: 100%; border: 1px solid #e3eaf2; border-radius: 10px; padding: 10px 12px;
  font-size: 13px; line-height: 1.6; color: #2c3e50; resize: vertical;
  font-family: inherit; background: #fbfdff;
}
.oral-result { border-left: 4px solid #4a90d9; }
.verdict { font-size: 17px; font-weight: 700; }
.verdict.good { color: #1e8449; }
.verdict.mid { color: #d68910; }
.verdict.low { color: #c0392b; }
.judge-score { font-size: 12px; color: #4a90d9; margin-top: 4px; }
.judge-tip { font-size: 12px; color: #7f8c9b; margin-top: 6px; }
.judge-row { font-size: 12px; line-height: 1.7; margin-top: 10px; }
.judge-row.ok { color: #1e8449; }
.judge-row.miss { color: #c0392b; }
.judge-answer {
  font-size: 13px; line-height: 1.75; color: #33445c;
  background: #f7f9fc; border-radius: 10px; padding: 12px; margin-top: 12px;
}

/* ---------- 安装到手机桌面 ---------- */
.wechat-tip {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff8e6; border: 1px solid #f5dfa8; color: #8a6a20;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
  font-size: 12px; line-height: 1.7;
}
.wx-arrow { font-size: 22px; line-height: 1.2; color: #e0a020; flex: none; }
.install-card { border: 1.5px solid #b9ebcd; background: #f6fffa; }
.install-head { display: flex; align-items: center; gap: 12px; }
.install-icon { width: 48px; height: 48px; border-radius: 11px; flex: none; }
.install-meta { flex: 1; min-width: 0; }
.install-x {
  border: none; background: transparent; color: #a5b1bd;
  font-size: 22px; line-height: 1; padding: 0 2px; align-self: flex-start;
}
.install-card .btn.green { font-size: 15px; }
.link-btn {
  border: none; background: transparent; color: #4a90d9;
  font-size: 12px; padding: 10px 0 0; display: block; width: 100%;
}
.foot-link {
  display: none; border: none; background: transparent; color: #4a90d9;
  font-size: 12px; width: 100%; padding: 10px 0 4px;
}
.guide-hint {
  background: #eaf3fd; border-left: 4px solid #4a90d9; border-radius: 10px;
  padding: 12px 14px; font-size: 12px; line-height: 1.75; color: #33445c;
  margin-bottom: 14px;
}
.guide-card .entry-title { margin-bottom: 10px; }
.steps { margin: 0; padding-left: 20px; }
.steps li { font-size: 13px; line-height: 1.85; color: #4a5a6e; margin-bottom: 6px; }
.faq { font-size: 12px; line-height: 1.8; color: #6b7a8d; margin: 10px 0 0; }
#btn-guide-install { margin-bottom: 14px; }

/* ---------- 欢快背景乐：选曲 ---------- */
.bgm-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 14px; }
.bgm-label { font-size: 11px; color: #8a97a8; flex: none; }
.bgm-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.bgm-chips.tight { flex: none; width: 100%; margin: 8px 0 2px; }
.bgm-chip {
  border: 1px solid #dce7f2; background: #fff; color: #5b7186;
  font-size: 11px; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.bgm-chip.on { background: #4a90d9; border-color: #4a90d9; color: #fff; font-weight: 600; }

/* ---------- 知识要点朗读 ---------- */
.pt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pt-row .btn.small {
  background: #4a90d9; color: #fff; border: none; border-radius: 999px;
  font-size: 12px; padding: 8px 16px; font-family: inherit;
}
.pt-row .bgm { font-size: 11px; }
.pt-voices { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.pt-voices .chip { font-size: 11px; padding: 6px 12px; box-shadow: none; border: 1px solid #e3eaf2; }
.pt-voices .chip.on { border-color: #4a90d9; }
.pt-status { font-size: 11px; color: #8a97a8; min-height: 16px; }
.pt-list { margin-top: 6px; }
.pt-list .point-row { cursor: pointer; border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.pt-list .point-row.speaking {
  background: #eaf3fd; border-left: 3px solid #4a90d9; color: #1b4c82; font-weight: 600;
}
.pt-list .ext-title { margin-top: 12px; }

/* ---------- 语音提问：按单元选 ---------- */
.oral-picker {
  background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(74,144,217,.08);
}
.picker-label { font-size: 12px; font-weight: 600; color: #4a6a8a; margin-bottom: 8px; }
.picker-name { font-size: 11px; color: #8a97a8; margin-top: 8px; line-height: 1.6; }
.unit-chips, .q-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.unit-chip, .q-chip {
  border: 1px solid #e3eaf2; background: #fbfdff; color: #5b7186;
  font-size: 11px; padding: 7px 12px; border-radius: 999px; font-family: inherit;
}
.unit-chip.on, .q-chip.on { background: #4a90d9; border-color: #4a90d9; color: #fff; font-weight: 600; }
.rec-status.warn {
  color: #a05a10; background: #fff5e3; border-radius: 8px;
  padding: 8px 10px; line-height: 1.6;
}

/* ---------- 语文：按课文分的词语听写 ---------- */
.dict-entry {
  border: 1px solid #cfe3f7;
  background: linear-gradient(135deg, #f4faff, #e9f3ff);
}
.dict-entry .badge { background: #e5f0ff; color: #2f6fae; }
.pick-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.pick-label {
  flex: 0 0 32px; font-size: 12px; color: #8298ac;
  line-height: 30px; font-weight: 600;
}
.pick-row .chips { flex: 1; margin: 0; gap: 6px; }
.pick-row .chip {
  margin: 0; font-size: 12px; padding: 6px 11px;
  border-radius: 999px; border: 1px solid #e3eaf2;
  background: #fbfdff; color: #5b7186; font-family: inherit;
}
.pick-row .chip.on {
  background: #4a90d9; border-color: #4a90d9; color: #fff; font-weight: 600;
}
.dots { flex-wrap: wrap; row-gap: 7px; }
.dots i.cur { background: #f0a500; transform: scale(1.35); }
.cd-reveal {
  margin-top: 16px; padding: 16px 14px; border-radius: 14px;
  background: #f5faff; border: 1px dashed #b8d4f0;
}
.cd-word {
  font-size: 28px; font-weight: 700; letter-spacing: 3px;
  color: #1f4e79; word-break: break-all;
}
.cd-wordtip {
  margin-top: 8px; font-size: 12.5px; color: #6b8299; line-height: 1.7;
}
