/* 三年级复习助手 - 儿童友好 iPad 界面 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f2f5fa;
  color: #2b3445;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

input, textarea { -webkit-user-select: auto; user-select: auto; }

/* 图片、视频自适应（iPhone / iPad 双端） */
img, video, canvas { max-width: 100%; height: auto; display: block; }

:root {
  --subject: #4f8ef7;
  --subject-soft: #e8f0fe;
  --ink: #2b3445;
  --sub: #7a869a;
  --card: #ffffff;
  --line: #e6ebf3;
  --ok: #2fb46c;
  --bad: #e5533c;
  --radius: 22px;
}
body[data-subject="chinese"]  { --subject: #f0654f; --subject-soft: #feece8; }
body[data-subject="math"]     { --subject: #3d7bff; --subject-soft: #e8effe; }
body[data-subject="english"]  { --subject: #12b886; --subject-soft: #e5f8f1; }

.wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 32px);
  min-height: 100%;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 14px;
}
.backbtn {
  width: 44px; height: 44px;
  border: none; border-radius: 14px;
  background: var(--card);
  box-shadow: 0 2px 8px rgba(43,52,69,.08);
  font-size: 22px; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.topbar h1 {
  font-size: 24px; font-weight: 700; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .spacer { flex: 1; }

/* ---------- 首页 ---------- */
.hero {
  background: linear-gradient(135deg, #4f8ef7, #7c4dff);
  border-radius: var(--radius);
  color: #fff;
  padding: 24px 22px;
  margin-bottom: 16px;
}
.hero h2 { font-size: 26px; margin-bottom: 6px; }
.hero p { opacity: .85; font-size: 15px; }
.hero .task {
  margin-top: 14px;
  background: rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 16px;
  display: flex; align-items: center; gap: 8px;
}

.subject-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.subject-card {
  border: none; border-radius: var(--radius);
  padding: 18px 12px 16px;
  color: #fff; text-align: left;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 6px 16px rgba(43,52,69,.12);
}
.subject-card .s-icon { font-size: 34px; line-height: 1; }
.subject-card .s-name { font-size: 20px; font-weight: 700; }
.subject-card .s-ver { font-size: 12px; opacity: .8; }
.subject-card.c-chinese  { background: linear-gradient(135deg, #f0826f, #e5533c); }
.subject-card.c-math     { background: linear-gradient(135deg, #5a92ff, #3d6bff); }
.subject-card.c-english  { background: linear-gradient(135deg, #27cd9b, #0da678); }

.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tool-card {
  background: var(--card); border: none; border-radius: var(--radius);
  padding: 16px; text-align: left; cursor: pointer;
  box-shadow: 0 2px 8px rgba(43,52,69,.06);
  display: flex; align-items: center; gap: 12px;
}
.tool-card .t-icon { font-size: 28px; }
.tool-card .t-name { font-size: 17px; font-weight: 600; }
.tool-card .t-desc { font-size: 13px; color: var(--sub); margin-top: 2px; }
.tool-card .badge {
  margin-left: auto; background: var(--bad); color: #fff;
  font-size: 13px; font-weight: 700;
  min-width: 26px; height: 26px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; padding: 0 8px;
}

/* ---------- 单元网格 ---------- */
.unit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.unit-card {
  background: var(--card); border: none; border-radius: var(--radius);
  padding: 16px; text-align: left; cursor: pointer;
  box-shadow: 0 2px 8px rgba(43,52,69,.06);
  position: relative; overflow: hidden;
}
.unit-card .u-no { font-size: 13px; color: var(--subject); font-weight: 700; }
.unit-card .u-title { font-size: 18px; font-weight: 700; margin-top: 4px; line-height: 1.35; }
.unit-card .u-meta { font-size: 13px; color: var(--sub); margin-top: 8px; }
.mastery-dot {
  position: absolute; top: 14px; right: 14px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #d6dde8;
}
.mastery-dot.m-good { background: var(--ok); }
.mastery-dot.m-mid  { background: #f5a623; }
.mastery-dot.m-bad  { background: var(--bad); }

.note-card {
  background: #fff8e6; border-radius: 16px;
  padding: 12px 14px; font-size: 13px; color: #8a6d1d;
  margin-bottom: 14px; line-height: 1.6;
}

/* ---------- 单元页 Tab ---------- */
.tabs {
  display: flex; gap: 6px;
  background: #e8edf5; border-radius: 16px; padding: 5px;
  margin-bottom: 16px;
}
.tabs button {
  flex: 1; border: none; border-radius: 12px;
  background: transparent; color: var(--sub);
  font-size: 16px; font-weight: 600;
  padding: 11px 0; cursor: pointer;
}
.tabs button.on {
  background: #fff; color: var(--subject);
  box-shadow: 0 2px 6px rgba(43,52,69,.1);
}

/* ---------- 学习：知识点卡片 ---------- */
.kcard {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(43,52,69,.06);
  margin-bottom: 12px; overflow: hidden;
}
.kcard > .k-head {
  width: 100%; border: none; background: none;
  display: flex; align-items: center; gap: 10px;
  padding: 16px; font-size: 17px; font-weight: 700; color: var(--ink);
  cursor: pointer; text-align: left;
}
.kcard > .k-head .arrow { margin-left: auto; color: var(--sub); transition: transform .2s; font-size: 14px; }
.kcard.open > .k-head .arrow { transform: rotate(90deg); }
.kcard .k-body { display: none; padding: 0 16px 16px; }
.kcard.open .k-body { display: block; }
.kcard .k-body li {
  list-style: none; font-size: 16px; line-height: 1.7;
  padding: 7px 0 7px 18px; position: relative; color: #3d4a63;
}
.kcard .k-body li::before {
  content: ""; position: absolute; left: 2px; top: 16px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--subject);
}

/* 生字/词语格子 */
.char-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.char-chip {
  border: 1.5px solid var(--line); background: #fff;
  border-radius: 12px; padding: 8px 12px;
  font-size: 20px; cursor: pointer; color: var(--ink);
}
.char-chip:active { background: var(--subject-soft); border-color: var(--subject); }

/* 古诗卡 */
.poem-card {
  background: linear-gradient(160deg, #fffdf6, #fdf3e3);
  border-radius: var(--radius);
  padding: 18px; margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(43,52,69,.06);
}
.poem-card h3 { font-size: 19px; margin-bottom: 2px; }
.poem-card .p-author { font-size: 13px; color: var(--sub); margin-bottom: 10px; }
.poem-card .p-line { font-size: 17px; line-height: 2; }
.poem-card .p-note { font-size: 14px; color: #8a6d1d; margin-top: 10px; line-height: 1.6; }
.speak-inline {
  border: none; background: var(--subject-soft); color: var(--subject);
  border-radius: 10px; padding: 6px 12px; font-size: 14px;
  cursor: pointer; margin-top: 10px; font-weight: 600;
}

/* ---------- 单词卡 ---------- */
.flash-area { display: flex; flex-direction: column; gap: 14px; }
.flash-card {
  background: var(--card); border-radius: 26px;
  min-height: 300px;
  box-shadow: 0 8px 24px rgba(43,52,69,.1);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 30px; cursor: pointer;
  position: relative;
}
.flash-card .f-en { font-size: 44px; font-weight: 800; color: var(--ink); text-align: center; }
.flash-card .f-zh { font-size: 26px; color: var(--subject); font-weight: 600; }
.flash-card .f-tip { position: absolute; bottom: 14px; font-size: 13px; color: var(--sub); }
.flash-nav { display: flex; gap: 10px; }
.flash-nav .fn-btn {
  flex: 1; border: none; border-radius: 16px;
  background: var(--card); color: var(--ink);
  font-size: 17px; font-weight: 600; padding: 16px 0; cursor: pointer;
  box-shadow: 0 2px 8px rgba(43,52,69,.08);
}
.flash-nav .fn-btn.primary { background: var(--subject); color: #fff; }
.flash-row { display: flex; gap: 10px; }
.flash-row button {
  flex: 1; border: none; border-radius: 16px;
  background: var(--subject-soft); color: var(--subject);
  font-size: 17px; font-weight: 700; padding: 18px 0; cursor: pointer;
}
.flash-count { text-align: center; color: var(--sub); font-size: 14px; }

/* ---------- 听力 ---------- */
.seg {
  display: flex; gap: 6px; background: #e8edf5; border-radius: 14px; padding: 4px;
  margin-bottom: 18px;
}
.seg button {
  flex: 1; border: none; border-radius: 10px; background: transparent;
  color: var(--sub); font-size: 15px; font-weight: 600; padding: 10px 0; cursor: pointer;
}
.seg button.on { background: #fff; color: var(--subject); }

.listen-stage {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 10px 0 24px;
}
.big-speak {
  width: 130px; height: 130px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--subject); color: #fff; font-size: 54px;
  box-shadow: 0 10px 24px rgba(43,52,69,.22);
  display: flex; align-items: center; justify-content: center;
}
.big-speak:active { transform: scale(.94); }
.listen-hint { font-size: 15px; color: var(--sub); }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.opt-grid button {
  border: 2px solid var(--line); background: var(--card);
  border-radius: 18px; padding: 20px 10px;
  font-size: 19px; font-weight: 600; color: var(--ink);
  cursor: pointer; min-height: 68px;
}
.opt-grid button.ok   { border-color: var(--ok); background: #e9f9f0; color: #177a45; }
.opt-grid button.bad  { border-color: var(--bad); background: #fdeeea; color: #a33321; }

.spell-row { display: flex; gap: 10px; width: 100%; }
.spell-row input {
  flex: 1; border: 2px solid var(--line); border-radius: 16px;
  font-size: 22px; padding: 14px 16px; text-align: center;
  outline: none; background: var(--card); color: var(--ink);
}
.spell-row input:focus { border-color: var(--subject); }
.btn-main {
  border: none; border-radius: 16px; background: var(--subject); color: #fff;
  font-size: 17px; font-weight: 700; padding: 14px 22px; cursor: pointer;
}
.btn-ghost {
  border: none; border-radius: 16px; background: #e8edf5; color: var(--sub);
  font-size: 15px; font-weight: 600; padding: 12px 18px; cursor: pointer;
}
.btn-ghost.on { background: var(--subject); color: #fff; }   /* 当前选中的设备角色 */

/* 账号选择（登录页） */
.acct-card {
  border: none; border-radius: 20px; background: #fff; cursor: pointer;
  width: 120px; padding: 18px 8px 14px; text-align: center;
  box-shadow: 0 4px 14px rgba(43, 52, 69, .08);
}
.acct-avatar {
  display: block; width: 64px; height: 64px; line-height: 64px; margin: 0 auto 10px;
  border-radius: 50%; color: #fff; font-size: 30px; font-weight: 700;
}
.acct-name { font-size: 16px; font-weight: 700; color: var(--ink); }

/* 任务奖励：条件进度条 */
.task-rule { font-size: 12px; color: var(--sub); margin: 4px 0 2px; text-align: left; }
.task-bar { height: 6px; border-radius: 3px; background: #eef1f6; overflow: hidden; margin-top: 3px; }
.task-bar i { display: block; height: 100%; border-radius: 3px; transition: width .4s; }
.r-type.t-task { background: #fff4e0; color: #c47b00; }
.spell-result { font-size: 18px; font-weight: 700; min-height: 26px; }
.spell-result.ok { color: var(--ok); }
.spell-result.bad { color: var(--bad); }

/* 句子跟读 */
.sentence-item {
  background: var(--card); border-radius: 18px;
  padding: 14px 16px; margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(43,52,69,.06);
}
.sentence-item .s-line { font-size: 17px; line-height: 1.6; margin-bottom: 8px; }
.sentence-item .s-zh { color: var(--sub); font-size: 15px; }
.sentence-item .s-btns { display: flex; gap: 8px; margin-top: 6px; }
.sentence-item .s-btns button {
  border: none; border-radius: 10px; padding: 8px 14px;
  background: var(--subject-soft); color: var(--subject);
  font-size: 14px; font-weight: 600; cursor: pointer;
}

/* ---------- 练习 ---------- */
.quiz-progress {
  height: 10px; background: #e8edf5; border-radius: 5px; overflow: hidden;
  margin-bottom: 16px;
}
.quiz-progress .bar { height: 100%; background: var(--subject); border-radius: 5px; transition: width .25s; }
.quiz-qnum { font-size: 14px; color: var(--sub); margin-bottom: 8px; }
.quiz-question {
  background: var(--card); border-radius: var(--radius);
  padding: 22px 20px; font-size: 21px; font-weight: 600; line-height: 1.6;
  box-shadow: 0 2px 8px rgba(43,52,69,.06); margin-bottom: 16px;
}
.quiz-question .q-speak {
  border: none; background: none; font-size: 20px; cursor: pointer;
  margin-left: 6px; vertical-align: middle;
}
.quiz-options { display: flex; flex-direction: column; gap: 12px; }
.quiz-options button {
  border: 2px solid var(--line); background: var(--card);
  border-radius: 18px; padding: 18px; text-align: left;
  font-size: 18px; line-height: 1.5; color: var(--ink); cursor: pointer;
}
.quiz-options button.ok  { border-color: var(--ok); background: #e9f9f0; }
.quiz-options button.bad { border-color: var(--bad); background: #fdeeea; }
.quiz-tip {
  background: #fff8e6; border-radius: 14px; padding: 12px 14px;
  font-size: 15px; color: #8a6d1d; margin-top: 14px; line-height: 1.6;
}
.quiz-done {
  text-align: center; padding: 40px 20px;
}
.quiz-done .score { font-size: 60px; font-weight: 800; color: var(--subject); }
.quiz-done .score-label { font-size: 16px; color: var(--sub); margin: 6px 0 24px; }

/* ---------- 错题本 / 家长页 ---------- */
.wrong-item {
  background: var(--card); border-radius: 18px; padding: 16px;
  margin-bottom: 12px; box-shadow: 0 2px 8px rgba(43,52,69,.06);
}
.wrong-item .w-q { font-size: 17px; line-height: 1.6; margin-bottom: 10px; }
.wrong-item .w-a { font-size: 15px; color: var(--ok); font-weight: 600; }
.wrong-item .w-btns { display: flex; gap: 8px; margin-top: 12px; }
.empty-tip { text-align: center; color: var(--sub); padding: 60px 20px; font-size: 16px; line-height: 1.8; }

.stat-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 2px 8px rgba(43,52,69,.06); }
.stat-table th, .stat-table td { padding: 12px 14px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--line); }
.stat-table th { background: #f6f8fc; font-size: 13px; color: var(--sub); }
.stat-table tr:last-child td { border-bottom: none; }

@media (max-width: 560px) {
  .subject-grid { grid-template-columns: 1fr; }
  .unit-grid { grid-template-columns: 1fr; }
  .flash-card .f-en { font-size: 36px; }
}

/* ================= 专项提升 ================= */
.sp-icon { font-size: 34px; line-height: 1.15; }
.q-speak {
  border: none; background: none; font-size: 20px; cursor: pointer;
  margin-left: 6px; vertical-align: middle;
}

/* 描红画布 */
.tracer-wrap { display: flex; justify-content: center; }
.tracer-canvas {
  background: #fdfdff; border-radius: 14px;
  box-shadow: 0 2px 10px rgba(43,52,69,.10);
  touch-action: none; cursor: crosshair;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.sp-actions { display: flex; gap: 14px; justify-content: center; margin-top: 6px; }
.sp-actions .btn-ghost,
.sp-actions .btn-main { min-width: 132px; padding: 14px 22px; font-size: 19px; }
.sp-progress { font-size: 14px; color: var(--sub); text-align: center; margin-bottom: 10px; }
.gp-chip {
  position: relative; width: 58px; height: 58px;
  font-size: 26px; font-weight: 600; font-family: inherit;
}
.gp-star {
  position: absolute; left: 0; right: 0; bottom: 2px;
  font-size: 9px; letter-spacing: -1px; font-weight: 400;
}

/* 拼读 / 字母游戏 */
.ph-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.ph-letter {
  flex: 0 0 52px; height: 52px; border-radius: 14px;
  border: 2px solid var(--subject); background: #fff;
  font-size: 24px; font-weight: 700; color: var(--subject); cursor: pointer;
}
.ph-note { font-size: 14px; color: var(--sub); margin-top: 6px; line-height: 1.6; }
.ph-word {
  font-family: "Avenir Next", "Century Gothic", Arial, "Helvetica Neue", sans-serif;
  font-size: 34px; letter-spacing: 3px; margin: 14px 0; color: var(--ink);
}
.ph-blank {
  display: inline-block; min-width: 20px;
  border-bottom: 4px solid var(--subject); color: var(--subject);
}
.ph-letters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; margin: 12px 0; }
.ph-letters button {
  width: 52px; height: 52px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--card);
  font-size: 24px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.ph-letters button.ok  { border-color: var(--ok); background: #e9f9f0; }
.ph-letters button.bad { border-color: var(--bad); background: #fdeeea; }
.ph-tile {
  min-width: 48px; height: 48px; padding: 0 12px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--card);
  font-size: 20px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.ph-tile.on { border-color: var(--subject); background: #eef4ff; }
.ph-empty { font-size: 15px; color: var(--sub); }

/* 组句 / 排词答案区 */
.po-answer {
  min-height: 56px; width: 100%;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
  border: 2px dashed var(--line); border-radius: 14px;
  padding: 8px; margin-bottom: 4px; background: #fbfcff;
}

/* 数学应用题 */
.ma-answer-row {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  font-size: 20px; margin: 14px 0 10px;
}
.ma-answer-row b {
  min-width: 110px; text-align: center; font-size: 30px;
  border-bottom: 3px solid var(--subject); padding: 0 8px; color: var(--ink);
}
.ma-pad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; max-width: 340px; margin: 0 auto 14px;
}
.ma-pad button {
  height: 56px; border-radius: 16px;
  border: none; background: var(--card);
  box-shadow: 0 2px 6px rgba(43,52,69,.10);
  font-size: 24px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.ma-pad button:active { transform: scale(.95); }
.ma-pad .ma-ok { background: var(--subject); color: #fff; }

/* 仿写输入 */
.fw-input {
  width: 100%; box-sizing: border-box;
  border: 2px solid var(--line); border-radius: 14px;
  padding: 12px; font-size: 17px; font-family: inherit;
  margin-top: 10px; resize: vertical; background: #fbfcff;
}
.fw-input:focus { outline: none; border-color: var(--subject); }

@media (max-width: 560px) {
  .gp-chip { width: 52px; height: 52px; font-size: 23px; }
  .ph-word { font-size: 30px; }
}

/* ================= 得分 / 测验 / 奖励 ================= */

/* 轻提示 */
.app-toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  transform: translateX(-50%) translateY(20px);
  background: rgba(43,52,69,.92); color: #fff;
  border-radius: 14px; padding: 12px 20px;
  font-size: 15px; max-width: 86vw; text-align: center;
  opacity: 0; pointer-events: none; z-index: 99;
  transition: opacity .25s, transform .25s;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 每日打卡 */
.checkin-btn {
  margin-top: 14px; width: 100%;
  border: none; border-radius: 14px;
  background: rgba(255,255,255,.95); color: #4f5ff0;
  font-size: 17px; font-weight: 700;
  padding: 14px 0; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.checkin-btn:active { transform: scale(.97); }

/* 得分页 */
.score-hero {
  background: linear-gradient(135deg, #6a5cff, #b04dff);
  border-radius: var(--radius); color: #fff;
  padding: 22px; text-align: center; margin-bottom: 14px;
}
.score-hero .score-big { font-size: 52px; font-weight: 800; line-height: 1.1; }
.score-hero .score-big small { font-size: 20px; font-weight: 600; opacity: .8; }
.score-hero .score-sub { font-size: 14px; opacity: .9; margin-top: 4px; }
.bucket-wrap { background: var(--card); border-radius: 18px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(43,52,69,.06); margin-bottom: 14px; }
.bucket { margin: 10px 0; }
.bucket-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.bucket-label span { color: var(--sub); font-weight: 400; }
.bucket-bar { height: 12px; border-radius: 6px; background: #edf1f8; overflow: hidden; }
.bucket-bar i { display: block; height: 100%; border-radius: 6px; transition: width .3s; }
.pts-gain { font-size: 16px; color: #8a6d1d; background: #fff8e6; border-radius: 12px; padding: 10px 14px; margin: 0 auto 18px; max-width: 420px; line-height: 1.6; }
.pts-gain b { color: #e58a00; }

.sec-title { font-size: 18px; font-weight: 700; margin: 18px 0 10px; color: var(--ink); }

/* 奖励 */
.reward-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reward-card {
  background: var(--card); border-radius: 20px; padding: 14px;
  box-shadow: 0 2px 8px rgba(43,52,69,.06); text-align: center;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.reward-card .r-img {
  width: 100%; height: 110px; border-radius: 14px; overflow: hidden;
  background: #f2f5fa; display: flex; align-items: center; justify-content: center;
  font-size: 44px;
}
.reward-card .r-img img { width: 100%; height: 100%; object-fit: cover; }
.reward-card .r-name { font-size: 16px; font-weight: 700; line-height: 1.4; }
.reward-card .r-meta { font-size: 13px; color: var(--sub); }
.reward-card .r-meta b { color: var(--ink); font-size: 15px; }
.r-type { display: inline-block; border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 700; }
.r-type.t-normal { background: #e8f0fe; color: #3d7bff; }
.r-type.t-super { background: #f3ecff; color: #8a3dff; }
.reward-card .r-buy { width: 100%; padding: 11px 0; font-size: 15px; }
.reward-card .r-buy:disabled { background: #e8edf5; color: #9aa4b5; }

/* 奖励管理（家长） */
.reward-admin-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.reward-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 2px 6px rgba(43,52,69,.05);
}
.reward-item .ri-img {
  width: 52px; height: 52px; border-radius: 12px; overflow: hidden; flex: 0 0 52px;
  background: #f2f5fa; display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.reward-item .ri-img img { width: 100%; height: 100%; object-fit: cover; }
.reward-item .ri-info { flex: 1; min-width: 0; }
.reward-item .ri-info b { display: block; font-size: 16px; }
.reward-item .ri-info i { font-style: normal; font-size: 13px; color: var(--sub); }
.p-form { background: var(--card); border-radius: 18px; padding: 14px; box-shadow: 0 2px 8px rgba(43,52,69,.06); }
.p-form input, .p-form select {
  width: 100%; box-sizing: border-box;
  border: 2px solid var(--line); border-radius: 12px;
  padding: 12px; font-size: 16px; margin-bottom: 10px; background: #fbfcff; color: var(--ink);
}
.p-form select { appearance: none; -webkit-appearance: none; }
.p-form input:focus, .p-form select:focus { outline: none; border-color: var(--subject); }
.upload-btn {
  display: block; text-align: center;
  border: 2px dashed var(--line); border-radius: 12px;
  padding: 12px; font-size: 15px; color: var(--sub); cursor: pointer;
}
.upload-btn input { display: none; }

/* 动态/兑换记录 */
.log-list { display: flex; flex-direction: column; gap: 6px; }
.log-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(43,52,69,.05); font-size: 14px;
}
.log-item span { flex: 1; min-width: 0; }
.log-item b.up { color: var(--ok); }
.log-item b.down { color: var(--bad); }
.log-item i { font-style: normal; color: var(--sub); font-size: 12px; }

/* 测验中心 */
.exam-subj { margin-bottom: 14px; }
.exam-subj-name { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.exam-unit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.exam-unit { padding: 12px; }
.exam-unit.blocked { opacity: .55; }
.exam-kind-list { display: flex; flex-direction: column; gap: 10px; }
.exam-kind.blocked { opacity: .55; }
.exam-tagline {
  font-size: 13px; color: var(--sub); margin-bottom: 10px; font-weight: 600;
}
.exam-badge {
  display: inline-block; background: #fdeeea; color: #c2410c;
  font-size: 12px; font-weight: 700; border-radius: 8px;
  padding: 2px 8px; margin-bottom: 8px;
}

@media (max-width: 560px) {
  .reward-grid { grid-template-columns: 1fr 1fr; }
  .exam-unit-grid { grid-template-columns: 1fr; }
}

/* 家长园地 · 设置表单行 */
.p-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--line, #e7ecf3); font-size: 15px;
}
.p-row:last-of-type { border-bottom: none; }
.p-row span { color: var(--ink); flex-shrink: 0; }
.p-row select, .p-row input {
  flex: 1; max-width: 62%; text-align: right; border: none; background: transparent;
  font-size: 15px; color: #2f6bff; font-weight: 600; outline: none;
  direction: ltr;
}
.p-row input { text-align: right; }
/* 奖励卡片 · 兑换内容说明 */
.r-desc {
  font-size: 12px; color: var(--sub); margin: 2px 0 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 家长园地 · 密码门（应用内数字键盘，密文圆点） */
.gate-card {
  max-width: 340px; margin: 4vh auto 0; background: var(--card);
  border-radius: 20px; padding: 30px 26px 26px; text-align: center;
  box-shadow: 0 4px 20px rgba(43,52,69,.08);
}
.gate-icon { font-size: 44px; }
.gate-title { font-size: 19px; font-weight: 800; margin-top: 6px; color: var(--ink); }
.gate-sub { font-size: 13px; color: var(--sub); margin: 4px 0 18px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; min-height: 18px; margin-bottom: 20px; }
.pin-dots i {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #b9c4d6; display: inline-block;
}
.pin-dots i.on { background: #4f8ef7; border-color: #4f8ef7; }
.pin-pad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  max-width: 280px; margin: 0 auto;
}
.pin-key {
  font-size: 22px; font-weight: 700; padding: 13px 0;
  border-radius: 14px; background: #fff; border: 1px solid #e2e8f2;
  color: var(--ink); touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pin-key:active { background: #eef4ff; border-color: #4f8ef7; }

/* ================= 英语课文听力 ================= */
.pp-card { background:#fff; border-radius:16px; padding:16px; box-shadow:0 1px 4px rgba(40,48,58,.06); }
.pp-title { font-size:16px; font-weight:800; margin-bottom:12px; }
.pp-line {
  display:flex; align-items:center; gap:10px; width:100%;
  padding:10px 12px; margin:6px 0; text-align:left;
  border:1px solid var(--line); border-radius:12px; background:#fbfcfe;
  cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.pp-line.on { border-color:var(--ok); background:#e9f9f0; }
.pp-line .pp-no {
  flex:none; width:22px; height:22px; border-radius:50%;
  background:#e8edf5; color:var(--sub); font-size:12px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}
.pp-line.on .pp-no { background:var(--ok); color:#fff; }
.pp-line .pp-en { flex:1; font-size:15px; color:var(--ink); }
.pp-line .pp-zh { flex:1; font-size:13px; color:var(--sub); }
