/* ============================================================
 * features-v2.css — v2 新页面样式
 * 全部使用主题变量，不硬编码颜色
 * ============================================================ */

/* 补齐主题里缺失的浅底色别名（style.css 用的是 -l 后缀） */
:root {
  --blue-bg: var(--blue-l, #ddf4ff);
  --gold-bg: var(--gold-l, #fff5cc);
  --red-bg: var(--red-l, #ffe4e4);
}

/* 页面头统一间距（部分页面 page-head 缺样式） */
.page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 10px;
}
.page-head .page-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.page-head .spacer {
  flex: 1;
}

/* ============================================================
 * 通用
 * ============================================================ */
.loading-line {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
}

.q2-actions, .rc-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.q2-actions .btn, .rc-actions .btn {
  min-width: 130px;
}

/* ============================================================
 * 答题页 v2
 * ============================================================ */
.quiz-v2 {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 120px;
}

.q2-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 100px 20px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
}

.q2-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: q2spin .8s linear infinite;
}
@keyframes q2spin {
  to { transform: rotate(360deg); }
}

/* 爱心耗尽 */
.q2-blocked {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 26px;
  text-align: center;
}
.q2-blocked-icon {
  font-size: 64px;
  margin-bottom: 16px;
}
.q2-blocked h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 10px;
}
.q2-blocked p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0 0 8px;
  font-weight: 600;
}
.q2-hint-text {
  color: var(--ink-3) !important;
  font-size: 13px !important;
}

/* 顶部栏 */
.q2-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 6px;
}
.q2-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--bg-soft);
}
.q2-progbar {
  flex: 1;
  height: 10px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
}
.q2-progbar i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  transition: width .3s ease;
}
.q2-prog {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
}

/* 状态栏（爱心 + 连击） */
.q2-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 20px 8px;
  min-height: 26px;
}
.q2-hearts {
  font-size: 15px;
  letter-spacing: 2px;
  line-height: 1;
}
.q2-combo {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-d);
  opacity: 0;
  transition: opacity .2s;
}
.q2-combo.on {
  opacity: 1;
  animation: q2pop .3s ease;
}
@keyframes q2pop {
  0% { transform: scale(.7); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* 题目区 */
.q2-stage {
  flex: 1;
  padding: 8px 18px 0;
  position: relative;
}

.q2-fav {
  position: absolute;
  top: 10px;
  right: 20px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--ink-3);
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  z-index: 2;
}
.q2-fav.on {
  color: var(--gold-d);
  border-color: var(--gold);
  background: var(--gold-bg);
}

.q2-card {
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 0 var(--line);
}

.q2-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 99px;
  background: var(--blue-bg);
  color: var(--blue-d);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 16px;
}

.q2-word-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.q2-word {
  font-size: 34px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.5px;
  word-break: break-word;
}
.q2-speak {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--blue-bg);
  border: 2px solid var(--blue);
  border-radius: 12px;
  cursor: pointer;
  flex: 0 0 auto;
}
.q2-speak:active { transform: scale(.94); }
.q2-speak-inline {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-d);
  background: var(--blue-bg);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.q2-pos {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 600;
}

.q2-question {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
}
.q2-question.zh {
  font-size: 24px;
}

.q2-tip {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 600;
}

.q2-hint-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-d);
  background: var(--gold-bg);
  border: 2px solid var(--gold);
  border-radius: 10px;
  cursor: pointer;
}
.q2-hint-btn:disabled {
  color: var(--ink-3);
  background: var(--bg-soft);
  border-color: var(--line);
  cursor: default;
}

/* 选项 */
.q2-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.q2-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  background: var(--bg);
  border: 2px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: 0 3px 0 var(--line-strong);
  cursor: pointer;
  text-align: left;
  transition: transform .1s, box-shadow .1s;
}
.q2-opt:active {
  transform: translateY(3px);
  box-shadow: none;
}
.q2-opt-key {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
  background: var(--bg-soft);
  border-radius: 8px;
}
.q2-opt-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.q2-opt.correct {
  border-color: var(--green-d);
  background: var(--green-bg);
  box-shadow: 0 3px 0 var(--green-d);
}
.q2-opt.correct .q2-opt-key {
  background: var(--green);
  color: #fff;
}
.q2-opt.wrong {
  border-color: var(--red-d);
  background: var(--red-bg);
  box-shadow: 0 3px 0 var(--red-d);
}
.q2-opt.wrong .q2-opt-key {
  background: var(--red);
  color: #fff;
}

/* 拼写输入 */
.q2-input-wrap {
  margin-top: 20px;
}
.q2-input {
  width: 100%;
  padding: 15px 18px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  background: var(--bg-soft);
  border: 2px solid var(--line-strong);
  border-radius: var(--r);
  outline: none;
  letter-spacing: 1px;
}
.q2-input:focus {
  border-color: var(--green);
  background: var(--bg);
}
.q2-input.correct {
  border-color: var(--green-d);
  background: var(--green-bg);
  color: var(--green-d);
}
.q2-input.wrong {
  border-color: var(--red-d);
  background: var(--red-bg);
  color: var(--red-d);
}

.q2-listen-big {
  display: block;
  width: 100%;
  padding: 24px;
  font-size: 20px;
  font-weight: 800;
  color: var(--blue-d);
  background: var(--blue-bg);
  border: 2px solid var(--blue);
  border-radius: var(--r-lg);
  cursor: pointer;
  margin-bottom: 12px;
}
.q2-listen-big:active { transform: scale(.98); }

/* 例句填空 */
.q2-cloze-line {
  font-size: 19px;
  line-height: 2;
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  word-break: break-word;
}
.q2-cloze-slot {
  display: inline;
  color: var(--blue-d);
  font-weight: 800;
  letter-spacing: 1px;
  padding: 0 2px;
}
.q2-cloze-slot.revealed {
  color: var(--green-d);
  border-bottom: 2px solid var(--green);
}

/* 底部按钮 */
.q2-footer {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
  margin-top: auto;
}
.q2-btn, .q2-btn-wide {
  flex: 1;
  padding: 16px;
  font-size: 16px;
  font-weight: 800;
  border-radius: var(--r);
}
.q2-btn-wide {
  width: 100%;
}

/* 反馈条 */
.q2-feedback {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 2px solid var(--line);
  box-shadow: 0 -8px 30px rgba(17, 24, 39, .12);
  z-index: 100;
  animation: q2slideup .22s ease;
}
@keyframes q2slideup {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.q2-feedback.ok {
  border-top-color: var(--green);
}
.q2-feedback.no {
  border-top-color: var(--red);
}
.q2-fb-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  border-radius: 50%;
}
.q2-feedback.ok .q2-fb-icon { background: var(--green); }
.q2-feedback.no .q2-fb-icon { background: var(--red); }

.q2-fb-body {
  flex: 1;
  min-width: 0;
}
.q2-fb-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 3px;
}
.q2-feedback.ok .q2-fb-title { color: var(--green-d); }
.q2-feedback.no .q2-fb-title { color: var(--red-d); }

.q2-fb-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}
.q2-fb-reward {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-d);
  margin-top: 4px;
}
.q2-continue {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 800;
  border-radius: var(--r);
}

/* 完成页 */
.q2-finish {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 24px;
  text-align: center;
}
.q2-finish-icon {
  font-size: 68px;
  margin-bottom: 14px;
}
.q2-finish h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 24px;
}
.q2-finish-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
}
.q2-fs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.q2-fs-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--green-d);
}
.q2-fs-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
.q2-finish-combo {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold-d);
  margin-bottom: 12px;
}
.q2-finish-rewards {
  width: 100%;
  max-width: 320px;
  padding: 16px;
  background: var(--gold-bg);
  border: 2px solid var(--gold);
  border-radius: var(--r);
  margin-bottom: 12px;
}
.q2-fr-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-d);
  margin-bottom: 8px;
}
.q2-fr-item {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.7;
}
.q2-offline-note {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 10px;
}

/* ============================================================
 * 口语练习
 * ============================================================ */
.sp-card {
  margin: 16px 18px;
  padding: 32px 20px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 0 var(--line);
  text-align: center;
}
.sp-word {
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.5px;
  word-break: break-word;
}
.sp-phon {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 600;
}
.sp-play {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-d);
  background: var(--blue-bg);
  border: 2px solid var(--blue);
  border-radius: 12px;
  cursor: pointer;
}

.sp-mic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 28px 0 18px;
}
.sp-record-btn {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  font-size: 34px;
  background: var(--bg);
  border: 3px solid var(--green);
  border-radius: 50%;
  box-shadow: 0 4px 0 var(--green-d);
  cursor: pointer;
  transition: transform .1s;
}
.sp-record-btn:active {
  transform: translateY(4px);
  box-shadow: none;
}
.sp-record-btn.recording {
  background: var(--red-bg);
  border-color: var(--red);
  box-shadow: 0 4px 0 var(--red-d);
  animation: spPulse 1.1s ease-in-out infinite;
}
@keyframes spPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.sp-record-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
}

.sp-score {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  margin: 10px 0;
  color: var(--ink-3);
}
.sp-score.great { color: var(--green-d); }
.sp-score.good { color: var(--green); }
.sp-score.ok { color: var(--gold-d); }
.sp-score.bad { color: var(--red-d); }

.sp-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  min-height: 20px;
}

.sp-result {
  margin-top: 16px;
  text-align: left;
}
.sp-grade {
  display: inline-block;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--green-d);
  background: var(--green-bg);
  border-radius: 99px;
  margin-bottom: 12px;
}
.sp-transcript {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 600;
  margin-bottom: 14px;
  word-break: break-word;
}
.sp-transcript b {
  color: var(--ink);
  font-weight: 800;
}
.sp-syl-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.sp-syl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.sp-syl {
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--green-d);
  background: var(--green-bg);
  border: 2px solid var(--green);
  border-radius: 10px;
}
.sp-syl i {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
  margin-left: 5px;
}
.sp-syl.bad {
  color: var(--red-d);
  background: var(--red-bg);
  border-color: var(--red);
}
.sp-weak {
  font-size: 13px;
  font-weight: 700;
  color: var(--red-d);
  margin-bottom: 10px;
}
.sp-tips {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.8;
}
.sp-points {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-d);
}
.sp-actions {
  padding: 0 18px 30px;
}

.sp-manual {
  display: flex;
  gap: 8px;
  margin: 14px 18px;
}
.sp-manual-input {
  flex: 1;
  padding: 12px 14px;
  font-size: 15px;
  background: var(--bg-soft);
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
}

/* ============================================================
 * 对话
 * ============================================================ */
.chat-screen {
  display: flex;
  flex-direction: column;
  /* dvh 会随键盘弹出收缩，vh 不会 —— 键盘一弹，vh 布局会把消息区顶到屏幕外 */
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
}
/* 场景列表页仍然滚动 */
.chat-screen.list-mode {
  height: auto;
  max-height: none;
  overflow: visible;
  padding-bottom: 80px;
}
.chat-scenarios {
  display: grid;
  gap: 12px;
  padding: 12px 18px 30px;
}
.chat-sc-item {
  display: block;
  text-align: left;
  padding: 18px;
  background: var(--bg);
  border: 2px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: 0 3px 0 var(--line-strong);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.chat-sc-item:active {
  transform: translateY(3px);
  box-shadow: none;
}
.chat-sc-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 3px;
}
.chat-sc-en {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-d);
  margin-bottom: 6px;
}
.chat-sc-desc {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 600;
  line-height: 1.6;
}

.chat-messages {
  /* flex:1 + min-height:0 才能在键盘弹出时真正收缩
     少了 min-height:0，flex 子项默认最小高度是内容高度，不会缩 */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* 对话页的 header 不参与滚动 */
.chat-screen.in-chat .chat-head {
  flex: 0 0 auto;
}
.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}
.chat-msg.ai { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg.sys {
  align-self: center;
  max-width: 100%;
  opacity: .85;
}
.chat-bubble {
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 600;
  border-radius: 18px;
  word-break: break-word;
}
.chat-msg.ai .chat-bubble {
  background: var(--bg);
  border: 2px solid var(--line);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.chat-msg.user .chat-bubble {
  background: var(--green);
  border: 2px solid var(--green-d);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.chat-msg.sys .chat-bubble {
  background: transparent;
  border: none;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}

.chat-hint {
  padding: 0 18px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-d);
  min-height: 20px;
}

.chat-inputbar {
  display: flex;
  gap: 8px;
  /* 作为 flex 子项固定在容器底部，不再 position:fixed
     fixed 元素不受父容器高度约束，键盘弹出时会和消息区重叠 */
  flex: 0 0 auto;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 2px solid var(--line);
}
.chat-input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 2px solid var(--line-strong);
  border-radius: 99px;
  outline: none;
}
.chat-input:focus {
  border-color: var(--green);
  background: var(--bg);
}
.chat-mic, .chat-send {
  flex: 0 0 auto;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 99px;
  cursor: pointer;
}
.chat-mic {
  width: 48px;
  padding: 0;
  font-size: 20px;
  background: var(--bg-soft);
  border: 2px solid var(--line-strong);
  color: var(--ink-2);
}
.chat-mic.recording {
  background: var(--red-bg);
  border-color: var(--red);
  animation: spPulse 1.1s ease-in-out infinite;
}
.chat-send {
  background: var(--green);
  border: 2px solid var(--green-d);
  color: #fff;
  box-shadow: 0 3px 0 var(--green-d);
}
.chat-send:active {
  transform: translateY(3px);
  box-shadow: none;
}
.chat-send:disabled {
  opacity: .5;
}

/* ============================================================
 * 作文
 * ============================================================ */
.essay-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 18px;
}
.essay-tab {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--bg-soft);
  border: 2px solid var(--line);
  border-radius: 99px;
  cursor: pointer;
}
.essay-tab.on {
  color: var(--green-d);
  background: var(--green-bg);
  border-color: var(--green);
}

.essay-body {
  padding: 0 18px 40px;
}

.essay-write {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.essay-title-input {
  padding: 13px 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg-soft);
  border: 2px solid var(--line-strong);
  border-radius: var(--r);
  outline: none;
}
.essay-textarea {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  line-height: 1.8;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--line-strong);
  border-radius: var(--r);
  outline: none;
  resize: vertical;
  min-height: 260px;
}
.essay-title-input:focus, .essay-textarea:focus {
  border-color: var(--green);
}
.essay-meter {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}
.essay-count {
  display: inline-block;
}
.essay-tip {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  text-align: center;
  line-height: 1.7;
}

/* 结果 */
.essay-result-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 0 var(--line);
  margin-bottom: 18px;
}
.essay-score {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
}
.essay-score.great { color: var(--green-d); }
.essay-score.good { color: var(--green); }
.essay-score.ok { color: var(--gold-d); }
.essay-score.bad { color: var(--red-d); }
.essay-score-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  margin-top: 4px;
}
.essay-stats {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}

.essay-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-2);
  margin: 20px 0 10px;
}

.essay-annotated {
  padding: 16px;
  font-size: 15px;
  line-height: 2;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--r);
  white-space: pre-wrap;
  word-break: break-word;
}
.essay-mark {
  background: var(--red-bg);
  border-bottom: 2px wavy var(--red);
  text-decoration: underline wavy var(--red);
  padding: 0 1px;
  cursor: help;
}

.essay-errors {
  display: grid;
  gap: 10px;
}
.essay-err-item {
  padding: 14px 16px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--r);
}
.essay-err-type {
  font-size: 11px;
  font-weight: 800;
  color: var(--red-d);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.essay-err-change {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
}
.essay-err-change del {
  color: var(--red-d);
  background: var(--red-bg);
  padding: 1px 5px;
  border-radius: 4px;
  text-decoration: line-through;
}
.essay-err-change ins {
  color: var(--green-d);
  background: var(--green-bg);
  padding: 1px 5px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 800;
}
.essay-arrow {
  color: var(--ink-3);
  font-weight: 700;
  margin: 0 4px;
}
.essay-err-msg {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  line-height: 1.6;
}

.essay-good {
  padding: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--green-d);
  background: var(--green-bg);
  border: 2px solid var(--green);
  border-radius: var(--r);
  text-align: center;
}

.essay-upgrades {
  display: grid;
  gap: 8px;
}
.essay-up-item {
  padding: 13px 16px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--r);
}
.essay-up-words {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.essay-up-from {
  color: var(--ink-3);
}
.essay-up-to {
  color: var(--blue-d);
  font-weight: 800;
}
.essay-up-reason {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  line-height: 1.6;
}

.essay-summary {
  padding: 16px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
  font-weight: 600;
  background: var(--bg-soft);
  border-radius: var(--r);
}

.essay-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.essay-list {
  display: grid;
  gap: 10px;
}
.essay-list-item {
  display: block;
  text-align: left;
  padding: 16px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 3px 0 var(--line);
  cursor: pointer;
}
.essay-list-item:active {
  transform: translateY(3px);
  box-shadow: none;
}
.essay-li-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 5px;
}
.essay-li-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.essay-li-score {
  color: var(--green-d);
}
.essay-li-preview {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.essay-list-loading {
  padding: 40px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
}

/* ============================================================
 * 家长端
 * ============================================================ */
.parent-body, .bindcode-body, .grade-body {
  padding: 0 18px 40px;
}

.parent-card {
  margin-bottom: 14px;
  padding: 18px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 3px 0 var(--line);
}
.parent-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
}
.parent-card-hint {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 10px;
}
.parent-sub-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
  margin: 16px 0 10px;
}
.parent-empty {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}
.parent-err {
  padding: 16px;
  font-size: 13px;
  color: var(--red-d);
  font-weight: 600;
}
.parent-privacy-note {
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-d);
  background: var(--gold-bg);
  border: 2px solid var(--gold);
  border-radius: var(--r);
  line-height: 1.6;
}

/* 统计格 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 10px;
}
.stat-item {
  padding: 12px 8px;
  text-align: center;
  background: var(--bg-soft);
  border-radius: var(--r);
}
.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--green-d);
  line-height: 1.1;
}
.stat-value i {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
  margin-left: 2px;
  font-weight: 700;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  margin-top: 5px;
}

/* 词库进度 */
.parent-books {
  display: grid;
  gap: 10px;
}
.parent-book-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
}
.pb-name {
  flex: 0 0 auto;
  width: 62px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pb-track {
  flex: 1;
  height: 8px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
}
.pb-track i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  transition: width .4s ease;
}
.pb-pct {
  flex: 0 0 auto;
  width: 34px;
  text-align: right;
  color: var(--green-d);
  font-weight: 800;
}
.pb-detail {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
}

/* 雷达（条形版） */
.radar-box {
  display: grid;
  gap: 9px;
}
.radar-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.radar-label {
  flex: 0 0 auto;
  width: 38px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.radar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
}
.radar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-l));
  border-radius: 99px;
  transition: width .5s ease;
}
.radar-val {
  flex: 0 0 auto;
  width: 32px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}
.radar-delta {
  flex: 0 0 auto;
  width: 34px;
  text-align: right;
  font-size: 11px;
  font-weight: 800;
}
.radar-delta.up { color: var(--green-d); }
.radar-delta.down { color: var(--red-d); }
.radar-delta.flat { color: var(--ink-3); }

/* 错题分布 */
.dist-list {
  display: grid;
  gap: 9px;
}
.dist-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.dist-label {
  flex: 0 0 auto;
  width: 62px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dist-track {
  flex: 1;
  height: 9px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
}
.dist-track i {
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: 99px;
  transition: width .4s ease;
}
.dist-pct {
  flex: 0 0 auto;
  width: 42px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: var(--red-d);
}

/* 周报 */
.report-text {
  display: none;
  padding: 16px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
  font-weight: 600;
  background: var(--bg-soft);
  border-radius: var(--r);
}
.report-text.on {
  display: block;
}
.report-text p {
  margin: 0 0 10px;
}
.report-text p:last-child {
  margin-bottom: 0;
}

.report-history {
  display: grid;
  gap: 8px;
}
.report-hist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-soft);
  border: 2px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
}
.rh-week {
  flex: 1;
  text-align: left;
  color: var(--ink-2);
}
.rh-min {
  color: var(--ink-3);
}
.rh-acc {
  color: var(--green-d);
}

/* 孩子切换 */
.child-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.child-chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--bg-soft);
  border: 2px solid var(--line);
  border-radius: 99px;
  cursor: pointer;
}
.child-chip.on {
  color: var(--green-d);
  background: var(--green-bg);
  border-color: var(--green);
}

/* 绑定行 */
.parent-bind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}

/* 绑定 UI */
.bind-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 22px;
  text-align: center;
}
.bind-icon {
  font-size: 60px;
  margin-bottom: 16px;
}
.bind-card h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
}
.bind-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-2);
  font-weight: 600;
  margin: 0 0 24px;
  max-width: 300px;
}
.bind-code-display {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 8px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  margin-bottom: 18px;
  font-family: ui-monospace, monospace;
}
.bind-input {
  width: 100%;
  max-width: 260px;
  padding: 15px;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 6px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 2px solid var(--line-strong);
  border-radius: var(--r);
  outline: none;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.bind-input:focus {
  border-color: var(--green);
  background: var(--bg);
}
.bind-note {
  margin-top: 24px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  line-height: 1.7;
}

/* 生成码 */
.bind-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 22px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 0 var(--line);
  margin-bottom: 14px;
  text-align: center;
}
.bind-code-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.bind-code-num {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 10px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace;
  transition: color .2s;
  margin-bottom: 10px;
}
.bind-code-num.on {
  color: var(--green-d);
}
.bind-code-timer {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  margin-bottom: 22px;
}
.bind-code-timer.expired {
  color: var(--red-d);
}
.bind-code-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  line-height: 1.8;
}

/* 隐私开关 */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.toggle-row:last-child {
  border-bottom: none;
}
.toggle-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.toggle-desc {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}
.switch {
  flex: 0 0 auto;
  width: 46px;
  height: 27px;
  background: var(--line-strong);
  border-radius: 99px;
  position: relative;
  transition: background .2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s;
}
.switch.on {
  background: var(--green);
}
.switch.on::after {
  transform: translateX(19px);
}

/* ============================================================
 * 排行榜 v2
 * ============================================================ */
.ranking-body {
  padding: 0 18px 40px;
}
.rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 16px;
}
.rank-scope {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.rank-week {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}

.rank-list {
  display: grid;
  gap: 8px;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--r);
}
.rank-row.me {
  border-color: var(--green);
  background: var(--green-bg);
}
.rank-no {
  flex: 0 0 auto;
  width: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-3);
}
.rank-no.top {
  font-size: 20px;
}
.rank-name {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-pts {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 800;
  color: var(--green-d);
  font-variant-numeric: tabular-nums;
}
.rank-words {
  flex: 0 0 auto;
  width: 52px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
}
.rank-mine {
  margin-top: 16px;
  padding: 13px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--green-d);
  background: var(--green-bg);
  border: 2px solid var(--green);
  border-radius: var(--r);
}
.rank-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  line-height: 1.8;
  text-align: center;
}

/* 年级设置 */
.grade-card {
  padding: 24px 20px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 0 var(--line);
}
.grade-card h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 14px;
}
.grade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.grade-btn {
  padding: 14px 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-2);
  background: var(--bg-soft);
  border: 2px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: 0 3px 0 var(--line-strong);
  cursor: pointer;
}
.grade-btn:active {
  transform: translateY(3px);
  box-shadow: none;
}
.grade-btn.on {
  color: var(--green-d);
  background: var(--green-bg);
  border-color: var(--green);
  box-shadow: 0 3px 0 var(--green-d);
}
.grade-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: var(--bg-soft);
  border: 2px solid var(--line-strong);
  border-radius: var(--r);
  outline: none;
  margin-bottom: 12px;
}
.grade-input:focus {
  border-color: var(--green);
  background: var(--bg);
}
.grade-hint {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  line-height: 1.7;
  margin-bottom: 18px;
}


/* ============================================================
 * 今日任务页
 * ============================================================ */
.tasks-body { padding: 0 18px 40px; }

.tk-status-card { padding: 16px 18px; }
.tk-status-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 18px;
}
.tk-status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.tk-hearts {
  font-size: 17px;
  letter-spacing: 2px;
  line-height: 1;
}
.tk-hearts .off { opacity: .28; }
.tk-status-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
}
.tk-points {
  font-size: 26px;
  font-weight: 800;
  color: var(--gold-d);
  line-height: 1;
}
.tk-refill {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}

.tk-task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.tk-task-row:last-child { border-bottom: none; }
.tk-task-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-3);
  background: var(--bg-soft);
  border-radius: 10px;
}
.tk-task-row.done .tk-task-icon {
  color: #fff;
  background: var(--green);
}
.tk-task-body { flex: 1; min-width: 0; }
.tk-task-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.tk-task-progress {
  display: flex;
  align-items: center;
  gap: 9px;
}
.tk-bar {
  flex: 1;
  height: 7px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
}
.tk-bar i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 99px;
  transition: width .4s ease;
}
.tk-task-row.done .tk-bar i { background: var(--green-d); }
.tk-count {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.tk-done-tag {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--green-d);
  background: var(--green-bg);
  border-radius: 99px;
}

.tk-chest {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 18px;
}
.tk-chest-icon {
  font-size: 52px;
  margin-bottom: 12px;
  line-height: 1;
}
.tk-chest-icon.bounce {
  animation: tkBounce 1.4s ease-in-out infinite;
}
@keyframes tkBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.tk-chest-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.tk-chest-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 16px;
}
.tk-chest.claimed { opacity: .75; }
.tk-chest.locked { opacity: .8; }
.tk-claim { max-width: 240px; }

.tk-reward-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.tk-reward-row:last-child { border-bottom: none; }
.tk-reward-kind {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.tk-reward-day {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
}

/* ============================================================
 * 语音诊断
 * ============================================================ */
.voice-status {
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--bg-soft);
  border-radius: var(--r);
  margin-bottom: 12px;
  line-height: 1.6;
}
.voice-status.ok {
  color: var(--green-d);
  background: var(--green-bg);
  border: 2px solid var(--green);
}
.voice-status.bad {
  color: var(--red-d);
  background: var(--red-bg);
  border: 2px solid var(--red);
}
.voice-detail {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}
.voice-line {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
.voice-problem {
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--red-d);
  background: var(--red-bg);
  border-radius: 8px;
  line-height: 1.6;
}

/* ============================================================
 * 专项练习
 * ============================================================ */
.ex-body { padding: 0 18px 40px; }

.ex-tip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 15px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-d);
  background: var(--gold-bg);
  border: 2px solid var(--gold);
  border-radius: var(--r);
  line-height: 1.6;
}
.ex-tip-icon { flex: 0 0 auto; }

.ex-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.ex-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  text-align: left;
  background: var(--bg);
  border: 2px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 3px 0 var(--line-strong);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.ex-card:active {
  transform: translateY(3px);
  box-shadow: none;
}
.ex-card-emoji {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--bg-soft);
  border-radius: 12px;
}
.ex-card-main { flex: 1; min-width: 0; }
.ex-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 3px;
}
.ex-card-desc {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  line-height: 1.5;
}
.ex-card-acc {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-3);
  text-align: right;
}
.ex-card-acc.great { color: var(--green-d); }
.ex-card-acc.good { color: var(--green); }
.ex-card-acc.ok { color: var(--gold-d); }
.ex-card-acc.bad { color: var(--red-d); }

.ex-stat-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.ex-stat-row:last-child { border-bottom: none; }
.ex-stat-label {
  flex: 0 0 auto;
  width: 76px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.ex-stat-track {
  flex: 1;
  height: 8px;
  background: var(--bg-soft);
  border-radius: 99px;
  overflow: hidden;
}
.ex-stat-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}
.ex-stat-fill.g { background: var(--green); }
.ex-stat-fill.y { background: var(--gold); }
.ex-stat-fill.r { background: var(--red); }
.ex-stat-val {
  flex: 0 0 auto;
  width: 38px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}
.ex-stat-n {
  flex: 0 0 auto;
  width: 48px;
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
}

/* 答题页 */
.ex-run-body { padding: 0 18px 40px; }
.ex-prog {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
}
.ex-stage { padding-top: 8px; }

.ex-card-q {
  padding: 26px 20px 22px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 0 var(--line);
  text-align: center;
}

.ex-badge {
  display: inline-block;
  padding: 5px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-d);
  background: var(--blue-bg);
  border-radius: 99px;
}

.ex-question {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 8px;
  word-break: break-word;
}
.ex-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.ex-phon {
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 12px;
}
.ex-ask {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
  margin: 12px 0 4px;
}
.ex-hintline {
  margin: 10px 0;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-d);
  background: var(--gold-bg);
  border-radius: 9px;
  text-align: left;
  line-height: 1.6;
}

.ex-speak-btn {
  display: inline-block;
  margin: 8px 0 14px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-d);
  background: var(--blue-bg);
  border: 2px solid var(--blue);
  border-radius: 10px;
  cursor: pointer;
}

.ex-spell-hint {
  font-family: ui-monospace, monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--ink-3);
  margin-bottom: 16px;
}

.ex-input {
  width: 100%;
  padding: 15px 18px;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 2px;
  color: var(--ink);
  background: var(--bg-soft);
  border: 2px solid var(--line-strong);
  border-radius: var(--r);
  outline: none;
}
.ex-input:focus {
  border-color: var(--green);
  background: var(--bg);
}
.ex-input.correct {
  border-color: var(--green-d);
  background: var(--green-bg);
  color: var(--green-d);
}
.ex-input.wrong {
  border-color: var(--red-d);
  background: var(--red-bg);
  color: var(--red-d);
}

.ex-options {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}
.ex-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  text-align: left;
  background: var(--bg);
  border: 2px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: 0 3px 0 var(--line-strong);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.ex-opt:active {
  transform: translateY(3px);
  box-shadow: none;
}
.ex-opt-key {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
  background: var(--bg-soft);
  border-radius: 8px;
}
.ex-opt-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  word-break: break-word;
}
.ex-opt.correct {
  border-color: var(--green-d);
  background: var(--green-bg);
  box-shadow: 0 3px 0 var(--green-d);
}
.ex-opt.correct .ex-opt-key {
  background: var(--green);
  color: #fff;
}
.ex-opt.wrong {
  border-color: var(--red-d);
  background: var(--red-bg);
  box-shadow: 0 3px 0 var(--red-d);
}
.ex-opt.wrong .ex-opt-key {
  background: var(--red);
  color: #fff;
}

.ex-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.ex-feedback {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 2px solid var(--line);
  box-shadow: 0 -8px 30px rgba(17, 24, 39, .12);
  z-index: 100;
  animation: exslide .22s ease;
}
@keyframes exslide {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.ex-feedback.ok { border-top-color: var(--green); }
.ex-feedback.no { border-top-color: var(--red); }
.ex-fb-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  border-radius: 50%;
}
.ex-feedback.ok .ex-fb-icon { background: var(--green); }
.ex-feedback.no .ex-fb-icon { background: var(--red); }
.ex-fb-text { flex: 1; min-width: 0; }
.ex-fb-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 3px;
  color: var(--ink);
}
.ex-feedback.ok .ex-fb-title { color: var(--green-d); }
.ex-feedback.no .ex-fb-title { color: var(--red-d); }
.ex-fb-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  word-break: break-word;
}
.ex-feedback .btn {
  flex: 0 0 auto;
  min-width: 88px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  border-radius: var(--r);
}

.ex-finish {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 24px;
  text-align: center;
}
.ex-finish-icon {
  font-size: 64px;
  margin-bottom: 14px;
}
.ex-finish h2 {
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 16px;
}
.ex-finish-stat {
  font-size: 32px;
  font-weight: 800;
  color: var(--green-d);
  margin-bottom: 6px;
}
.ex-finish-pct {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
  margin-bottom: 20px;
}

/* 听力题双按钮 */
.q2-listen-row {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.q2-listen-big, .q2-listen-sent {
  display: block;
  width: 100%;
  padding: 18px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
  border-radius: var(--r-lg);
  cursor: pointer;
}
.q2-listen-big {
  color: var(--blue-d);
  background: var(--blue-bg);
  border: 2px solid var(--blue);
}
.q2-listen-sent {
  color: var(--green-d);
  background: var(--green-bg);
  border: 2px solid var(--green);
}
.q2-listen-big:active, .q2-listen-sent:active {
  transform: scale(.98);
}
.q2-sent-hint {
  margin-top: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--bg-soft);
  border-radius: var(--r);
  text-align: left;
}
/* 收藏按钮：点击反馈 + 自动跳倒计时 */
.q2-fav {
  cursor: pointer;
  transition: transform .12s, color .15s, background .15s;
}
.q2-fav.tapping {
  transform: scale(.82);
}
.q2-fav.on {
  color: var(--gold-d);
  background: var(--gold-bg);
  border-color: var(--gold);
}
.q2-continue.auto-next {
  opacity: .9;
  letter-spacing: .3px;
}