
/* ---------- 基础 ---------- */
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1a2332;
  --muted: #6d7a8c;
  --line: #e5e9f2;
  --primary: #3b6ef5;
  --primary-dark: #2b55cc;
  --primary-soft: #eaf0ff;
  --green: #12a97e;
  --green-soft: #e6f7f1;
  --red: #e2534b;
  --red-soft: #fdecea;
  --amber: #e79a2b;
  --amber-soft: #fdf3e2;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(23, 43, 77, .06);
  --shadow-sm: 0 2px 8px rgba(23, 43, 77, .05);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
h4 { font-size: 15px; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; font-size: 15px; color: inherit; }
ul, ol { margin: 6px 0; padding-left: 20px; }
li { margin: 4px 0; }

.muted { color: var(--muted); }
.small-text { font-size: 12.5px; line-height: 1.6; }
.mt { margin-top: 22px; }

/* ---------- 顶栏 ---------- */
.topbar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, #3b6ef5, #6f8cff);
  color: #fff; display: grid; place-items: center;
  font-weight: 750; font-size: 19px;
  box-shadow: 0 6px 16px rgba(59, 110, 245, .3);
}
.brand-text h1 { font-size: 17px; }
.brand-text p { font-size: 12px; color: var(--muted); }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 16px;
  transition: .18s;
}
.icon-btn:hover { border-color: #c9d5ee; transform: translateY(-1px); }
.icon-btn.off { opacity: .45; }

/* ---------- 导航 ---------- */
.tabs {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: .18s;
  border: 1px solid transparent;
}
.tab:hover { color: var(--text); background: #eef2fa; }
.tab.on {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  border-color: #dbe4f8;
  box-shadow: var(--shadow-sm);
}

/* ---------- 主区 ---------- */
.app { max-width: 1080px; margin: 0 auto; padding: 20px; min-height: 60vh; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-head h2 { font-size: 24px; }
.page-head p { max-width: 620px; margin-top: 4px; }
.head-actions { display: flex; gap: 8px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(1100px 240px at 100% -20%, rgba(59, 110, 245, .14), transparent 60%),
    linear-gradient(135deg, #ffffff 0%, #f7faff 100%);
  border: 1px solid #e2e9f9;
  border-radius: 24px;
  padding: 30px 32px;
  margin-bottom: 18px;
  overflow: hidden;
}
.hero h2 { font-size: 30px; line-height: 1.35; margin: 6px 0 10px; }
.hero .muted { max-width: 430px; }
.eyebrow {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); font-weight: 650; margin-bottom: 4px;
}
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- 环形进度 ---------- */
.ring {
  --deg: 0deg;
  width: 132px; height: 132px; border-radius: 50%;
  background: conic-gradient(var(--primary) var(--deg), #e8eefc 0);
  display: grid; place-items: center;
  flex: none;
}
.ring-inner {
  width: 106px; height: 106px; border-radius: 50%;
  background: #fff; display: grid; place-content: center; text-align: center;
  box-shadow: inset 0 0 0 1px #edf1fa;
}
.ring-inner strong { font-size: 22px; display: block; font-variant-numeric: tabular-nums; }
.ring-inner span { font-size: 11.5px; color: var(--muted); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 12px;
  background: #eef2fa; color: #2c3a4f;
  font-size: 14px; font-weight: 600;
  transition: .18s;
  border: 1px solid transparent;
}
.btn:hover { background: #e4ebf7; }
.btn.primary {
  background: linear-gradient(135deg, var(--primary), #5a83f7);
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 110, 245, .25);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(59, 110, 245, .3); }
.btn.ghost { background: #fff; border-color: var(--line); }
.btn.ghost:hover { border-color: #c7d4ee; }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { color: var(--primary); font-size: 13px; font-weight: 600; padding: 2px 0; }
.link:hover { text-decoration: underline; }

/* ---------- 统计卡 ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { margin: 0; padding: 16px 18px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.stat-top i { font-style: normal; font-size: 15px; opacity: .8; }
.stat strong { display: block; font-size: 24px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.stat p { font-size: 12px; color: var(--muted); }

/* ---------- 打卡周视图 ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-cell {
  background: #f6f8fc; border-radius: 12px; padding: 8px 0; text-align: center;
  color: var(--muted); position: relative;
}
.day-cell span { display: block; font-size: 11px; }
.day-cell b { font-size: 15px; color: #45526a; font-weight: 600; }
.day-cell.on { background: var(--primary-soft); color: var(--primary); }
.day-cell.on b { color: var(--primary); }
.day-cell i {
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--green);
}

.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ---------- 行 ---------- */
.row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 9px 0; border-bottom: 1px dashed #eef1f7;
  font-size: 13.5px;
}
.row:last-child { border-bottom: none; }
.row b { font-variant-numeric: tabular-nums; }
.row.col { gap: 10px; }
.row.col .bar { flex: 1; }

/* ---------- 进度条 ---------- */
.bar { height: 7px; background: #eef1f7; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5a83f7, #7c9bff); transition: width .4s ease; }
.bar.thin { height: 5px; margin: 6px 0 20px; }
.bar.mini { height: 6px; max-width: 130px; }

/* ---------- 推荐卡 ---------- */
.next-unit { padding-top: 4px; }
.unit-no {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--primary); background: var(--primary-soft);
  padding: 2px 8px; border-radius: 6px;
}
.next-unit h4 { margin: 8px 0 2px; font-size: 17px; }
.mini-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- 单元网格 ---------- */
.module-block { margin-bottom: 30px; }
.module-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.module-title span { font-size: 12px; color: var(--muted); }
.mod-label {
  font-size: 12px; color: var(--muted); margin: 14px 0 8px;
  letter-spacing: .02em;
}
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.unit-card {
  text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 15px 16px; transition: .18s;
  box-shadow: var(--shadow-sm);
}
.unit-card:hover { border-color: #c9d8f9; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(59, 110, 245, .1); }
.unit-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.unit-pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.unit-card h4 { font-size: 14.5px; margin-bottom: 2px; }
.unit-card p { font-size: 12px; margin-bottom: 10px; }

/* ---------- 分段控件 ---------- */
.seg { display: inline-flex; background: #eaeff8; border-radius: 11px; padding: 3px; gap: 2px; }
.seg button {
  padding: 6px 15px; border-radius: 9px; font-size: 13px; color: var(--muted); font-weight: 600;
  transition: .15s;
}
.seg button.on { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.tag {
  font-size: 11.5px; background: var(--primary-soft); color: var(--primary);
  padding: 3px 9px; border-radius: 999px; font-weight: 600;
}
.tag.soft { background: #f1f4fa; color: var(--muted); }

/* ---------- 闪卡 ---------- */
.flash-wrap { display: grid; place-items: center; margin: 8px 0 20px; perspective: 1200px; }
.flash {
  position: relative; width: min(100%, 460px); height: 250px;
  transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2, .7, .3, 1);
  cursor: pointer;
}
.flash.flipped { transform: rotateY(180deg); }
.flash-front, .flash-back {
  position: absolute; inset: 0; backface-visibility: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  display: grid; place-content: center; text-align: center;
  padding: 24px; box-shadow: var(--shadow);
}
.flash-back { transform: rotateY(180deg); background: linear-gradient(150deg, #f8fbff, #eef4ff); }
.flash h2 { font-size: 34px; margin: 6px 0 4px; letter-spacing: -.02em; }
.flash .en { font-size: 16px; color: var(--muted); margin-top: 2px; }
.flash .pos { font-size: 12px; color: var(--primary); letter-spacing: .08em; text-transform: uppercase; }
.flash .muted { margin-top: 14px; font-size: 12px; }
.speak {
  margin-top: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-soft); font-size: 15px;
  display: inline-grid; place-items: center;
}
.speak:hover { background: #dde7ff; }
.flash-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.tipbox {
  margin-top: 18px; background: var(--amber-soft); border: 1px solid #f7e3c2;
  border-radius: 14px; padding: 14px 16px;
}
.tipbox b { font-size: 12.5px; color: #a56612; }
.tipbox p { font-size: 13px; color: #6f5432; margin-top: 4px; }

/* ---------- 答题卡 ---------- */
.quiz-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 26px 28px; box-shadow: var(--shadow); max-width: 760px;
  margin: 0 auto;
}
.quiz-card h2 { margin: 4px 0 10px; }
.quiz-card .stem { font-size: 19px; line-height: 1.7; font-weight: 600; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fbfcfe; outline: none;
  transition: .15s;
}
.input:focus { border-color: #9db6f7; background: #fff; box-shadow: 0 0 0 3px rgba(59, 110, 245, .12); }
.input.big { padding: 14px 16px; font-size: 17px; margin-top: 14px; letter-spacing: .01em; }
.input:disabled { background: #f6f8fc; color: var(--muted); }

.options { display: grid; gap: 10px; margin-top: 18px; }
.options.compact { gap: 7px; margin-top: 10px; }
.option {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: #fbfcfe; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 14.5px; transition: .15s;
}
.option:hover { border-color: #bccdf5; background: #f7faff; }
.option.picked { border-color: var(--primary); background: var(--primary-soft); }
.option.correct { border-color: #8fd9be; background: var(--green-soft); }
.option.wrong { border-color: #f3b8b3; background: var(--red-soft); }
.option:disabled { cursor: default; }
.opt-letter {
  width: 24px; height: 24px; border-radius: 8px; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: #eef2fa; color: #5a6a82;
}
.option.picked .opt-letter { background: var(--primary); color: #fff; }
.option.correct .opt-letter { background: var(--green); color: #fff; }
.option.wrong .opt-letter { background: var(--red); color: #fff; }

.quiz-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.feedback { margin-top: 16px; border-radius: 12px; padding: 14px 16px; font-size: 13.5px; }
.feedback b { display: block; margin-bottom: 4px; font-size: 14px; }
.feedback.ok { background: var(--green-soft); color: #146c52; }
.feedback.bad { background: var(--red-soft); color: #9e332d; }
.feedback p { color: inherit; opacity: .88; }

.pager { display: flex; justify-content: space-between; align-items: center; max-width: 760px; margin: 16px auto 0; }

/* ---------- 结果页 ---------- */
.result-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: 26px 28px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.result-hero h2 { margin-bottom: 4px; }

/* ---------- 设置页 ---------- */
.setup-grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: 16px; }
.select {
  width: 100%; padding: 11px 12px; border-radius: 11px;
  border: 1px solid var(--line); background: #fbfcfe; margin-top: 8px;
  outline: none;
}
.select:focus { border-color: #9db6f7; }
.field-label { font-size: 13px; font-weight: 600; color: #47546a; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  padding: 8px 14px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line); background: #fff; color: #52607a;
  transition: .15s;
}
.chip:hover { border-color: #bccdf5; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.chip.small { padding: 6px 11px; font-size: 12.5px; }
.setup-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.side h3 { margin-bottom: 8px; }
.steps { font-size: 13.5px; color: #4b5a70; }
.steps b { color: var(--text); }

/* ---------- 试卷 ---------- */
.paper-sec { padding: 22px 24px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.passage {
  background: #fbfaf6; border: 1px solid #ece7d9; border-radius: 12px;
  padding: 16px 18px; font-size: 14px; line-height: 1.85; margin: 12px 0 6px;
  color: #3d3a32; font-family: Georgia, "Times New Roman", serif;
}
.paper-q { padding: 14px 0; border-bottom: 1px dashed #eef1f7; }
.paper-q:last-child { border-bottom: none; }
.paper-q .stem { font-size: 14.5px; margin-bottom: 8px; }
.qno { color: var(--primary); font-weight: 700; margin-right: 4px; }
.submit-bar { display: flex; justify-content: center; padding: 6px 0 30px; }

/* ---------- 错题本 ---------- */
.wrong-list { display: grid; gap: 10px; }
.wrong-item {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden;
}
.wrong-item summary {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; cursor: pointer; list-style: none;
  font-size: 13.5px;
}
.wrong-item summary::-webkit-details-marker { display: none; }
.wkind {
  flex: none; font-size: 11px; background: var(--amber-soft); color: #9a6413;
  padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.wstem { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3c4a5f; }
.wtimes { font-size: 11.5px; color: var(--muted); }
.wbody { padding: 4px 16px 16px; border-top: 1px solid #f3f5fa; }
.stem-small { font-size: 14px; margin: 10px 0 8px; }
.explain { font-size: 13px; color: #4a5a72; background: #f7f9fd; border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.opts-static { display: grid; gap: 6px; margin: 6px 0; }
.opt-static {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px;
  padding: 7px 10px; border-radius: 9px; background: #f8fafd;
}
.opt-static.ok { background: var(--green-soft); color: #146c52; font-weight: 600; }

.wrong-mini { padding: 12px 0; border-bottom: 1px dashed #eef1f7; }
.wrong-mini:last-child { border-bottom: none; }

/* ---------- 语法速查 ---------- */
.know-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.know-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.know-card summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer; list-style: none;
}
.know-card summary::-webkit-details-marker { display: none; }
.know-card h3 { font-size: 15.5px; margin-top: 4px; }
.chev { color: var(--muted); font-size: 16px; transition: .2s; }
.know-card[open] .chev { transform: rotate(45deg); }
.know-body { margin-top: 12px; border-top: 1px solid #f1f4fa; padding-top: 12px; }
.know-body .lead { font-size: 13.5px; color: #44536b; }
.know-body h4 { font-size: 12.5px; color: var(--muted); margin: 14px 0 4px; letter-spacing: .04em; }
.know-body ul { font-size: 13px; color: #44536b; }
.ex { margin: 8px 0; padding-left: 10px; border-left: 2px solid #dbe4f8; }
.ex .en { font-size: 13.5px; font-family: Georgia, serif; }
.ex .muted { font-size: 12.5px; }
.trap { background: var(--red-soft); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.trap b { font-size: 12px; color: #a13a33; }
.trap p { font-size: 12.5px; color: #8c423c; margin-top: 2px; }

/* ---------- 空状态 ---------- */
.empty {
  background: #fff; border: 1px dashed #d8e0ef; border-radius: 18px;
  padding: 44px 24px; text-align: center;
}
.empty-ico { font-size: 30px; color: #c3cee3; }
.empty h3 { margin: 8px 0 4px; }
.empty p { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1080px; margin: 20px auto 0; padding: 24px 20px 40px;
  color: var(--muted); font-size: 12px; text-align: center;
}
.foot .tiny { font-size: 11px; opacity: .75; margin-top: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cols, .setup-grid { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .hero .ring { justify-self: start; }
  .hero h2 { font-size: 25px; }
}

@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .topbar { padding: 16px 14px 8px; }
  .brand-text p { display: none; }
  .app { padding: 14px; }
  .page-head h2 { font-size: 20px; }
  .hero { padding: 20px; border-radius: 18px; }
  .hero h2 { font-size: 22px; }
  .ring { width: 108px; height: 108px; }
  .ring-inner { width: 86px; height: 86px; }
  .ring-inner strong { font-size: 18px; }
  .quiz-card { padding: 20px 18px; }
  .quiz-card .stem { font-size: 17px; }
  .flash { height: 220px; }
  .flash h2 { font-size: 28px; }
  .result-hero { grid-template-columns: 1fr; gap: 16px; }
  .know-grid { grid-template-columns: 1fr; }
  .unit-grid { grid-template-columns: 1fr 1fr; }
  .unit-card { padding: 12px; }
  .unit-card h4 { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 打印（把单元检测当纸质卷） ---------- */
@media print {
  body { background: #fff; }
  .topbar, .tabs, .foot, .submit-bar, .page-head .btn, .head-actions { display: none !important; }
  .app { max-width: 100%; padding: 0; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; page-break-inside: avoid; }
  .paper-q { break-inside: avoid; }
  .option { border-color: #ddd; }
  .paper-sec { padding: 12px 0; border: none; }
  .passage { background: #fff; border-color: #ddd; }
}

/* ---------- 6A–9A 词汇表 ---------- */
.book-chips { margin-bottom: 18px; }
.passage-title {
  display: block; margin-bottom: 8px; color: var(--primary);
  font-size: 13px; font-family: inherit; letter-spacing: .01em;
}
.wordlist {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px; margin-top: 10px;
}
.worditem {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed var(--line);
}
.worditem b { min-width: 92px; color: var(--text); }
.worditem .pos { color: var(--muted); font-size: 12px; min-width: 38px; }
.worditem span:last-child { color: var(--muted); }
details.card > summary { list-style: none; cursor: pointer; }
details.card > summary::-webkit-details-marker { display: none; }
.wordlist-sum { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 640px) {
  .wordlist { grid-template-columns: 1fr; }
}

/* ---------- 上海中考 / 区统考 试卷版式 ---------- */
.paper-sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px 8px;
  margin-bottom: 18px;
}
.paper-sub {
  margin: 0 0 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .02em;
}
.paper-idbar {
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center;
  padding: 8px 0 14px; margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  color: var(--muted); font-size: 13px;
}
.paper-note {
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 6px;
  font-size: 13px;
}
.paper-note b { color: var(--primary); }
.paper-note ol { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.paper-note li { margin: 3px 0; }
.paper-sheet .paper-sec {
  background: transparent; border: none; border-top: 1px solid var(--line);
  border-radius: 0; box-shadow: none; padding: 20px 0 6px; margin: 0;
}
.part-head {
  margin: 28px 0 4px;
  padding: 8px 12px;
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 10px;
}
.group-head {
  margin: 20px 0 8px;
  font-size: 14px;
  color: var(--primary);
  font-weight: 650;
}
.passage-words { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 400; }
.word-box {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px; margin: 0 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.word-chip {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(59, 110, 245, .08);
  color: var(--primary);
  font-size: 13px;
}
.paper-q .qno { color: var(--primary); font-weight: 700; margin-right: 2px; }
.answer-line {
  height: 26px;
  margin: 6px 0 0;
  border-bottom: 1px dashed var(--line);
}
.paper-q + .paper-q { margin-top: 14px; }
@media (max-width: 640px) {
  .paper-sheet { padding: 18px 14px 4px; }
  .paper-idbar { gap: 6px 16px; }
  .part-head { font-size: 14px; }
}

/* ---------- 分项训练 / 题库总览 / 单元知识点 ---------- */
.sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.sec-card { margin: 0; }
.sec-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sec-label {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 24px; padding: 0 8px;
  border-radius: 8px; background: var(--primary-soft); color: var(--primary);
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.sec-card h3 { font-size: 16px; margin-bottom: 6px; }
.sec-card .setup-actions { margin-top: 12px; }
.sec-card .tiny { margin-top: 2px; line-height: 1.5; }

.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.bank-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff;
}
.bank-label { font-size: 13px; color: var(--muted); }
.bank-item b { font-size: 18px; color: var(--text); }

.unit-know .wordlist { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.unit-know .know-body h4 { margin: 14px 0 6px; font-size: 13.5px; color: var(--muted); letter-spacing: .02em; }
.unit-know .know-body ul { margin: 0; padding-left: 18px; }
.unit-know .know-body li { margin: 4px 0; font-size: 13.5px; }
.gram-item { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.gram-item b { color: var(--primary-dark); font-size: 14px; }
.gram-item p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.trap-line { color: var(--red) !important; }
.tips-card .steps { margin: 0; padding-left: 20px; }
.tips-card .steps li { margin: 6px 0; }

@media (max-width: 640px) {
  .sec-grid { grid-template-columns: 1fr; }
  .bank-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 单元知识点：详细考点 ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.unit-know .know-body .lead { font-size: 14px; color: var(--text); margin: 6px 0; }
.unit-know .rules { margin: 6px 0 8px; padding-left: 18px; }
.unit-know .rules li { margin: 3px 0; font-size: 13.5px; color: var(--muted); }
.ex-list { margin: 6px 0 4px; }
.ex-list .ex { padding: 6px 0; border-bottom: 1px dotted var(--line); }
.ex-list .ex:last-child { border-bottom: none; }
.unit-know .ex .en { font-size: 13.5px; }
.unit-know .ex .muted { font-size: 12.5px; }
.ph-list { list-style: none; margin: 4px 0 0; padding: 0; }
.ph-list li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px;
}
.ph-list li b { min-width: 170px; }
.ph-list li span { color: var(--muted); }
.all-words { max-height: 320px; overflow-y: auto; padding-right: 6px; }
@media (max-width: 640px) {
  .ph-list li { flex-direction: column; gap: 2px; }
  .ph-list li b { min-width: 0; }
}

/* ---------- 题库三档分布 ---------- */
.tier-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: #eef1f7; margin: 7px 0 4px; }
.tier-bar i { display: block; height: 100%; }
.tier-bar .t1 { background: #7fc4a0; }
.tier-bar .t2 { background: #6d9bea; }
.tier-bar .t3 { background: #e08a5b; }

.warn-text { color: #c2703a; }
.bank-item.off { opacity: .55; }

/* ---------- 单词打卡：范围选择、例句、复习 ---------- */
.tag.warn { background: var(--amber-soft); color: #a76a12; }
.chip[disabled], .btn[disabled] { opacity: .45; cursor: not-allowed; }
.unit-pick { margin: 8px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.pick-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pick-row:last-child { border-bottom: none; }
.pick-book {
  min-width: 34px; font-size: 12px; font-weight: 700; color: var(--muted);
  background: #f3f6fc; border-radius: 6px; text-align: center; padding: 3px 6px;
}
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.pick-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line);
  background: #fff; font-size: 13px; color: var(--text);
}
.pick-chip i { font-style: normal; font-size: 11px; color: var(--muted); }
.pick-chip.on { background: var(--primary-soft); border-color: #b9caf7; color: var(--primary-dark); font-weight: 600; }
.pick-chip.on i { color: var(--primary-dark); }
.pick-chip.static { background: #f6f8fc; color: var(--muted); }
.pick-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 10px 0 4px; padding: 8px 12px; border-radius: 12px;
  background: #f7f9fe; font-size: 13px; color: var(--muted);
}
.pick-summary b { color: var(--primary-dark); font-size: 15px; }
.review-card { border: 1px solid #f3dfbe; background: linear-gradient(180deg, #fffdf8, #fff); }
.sent-box {
  margin: 10px 0 2px; padding: 10px 12px; border-radius: 12px;
  background: #f7f9fe; border-left: 3px solid var(--primary);
}
.sent-en { font-size: 13.5px; color: var(--text); }
.sent-cn { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.feedback .sent-box { background: rgba(255, 255, 255, .7); }
.wrong-word { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.wrong-word:last-child { border-bottom: none; }
.wrong-word > div { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .pick-summary { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ---------- 写作板块 ---------- */
.write-card {
  border: 1px dashed #c7d4ec; border-radius: 14px; padding: 14px 16px;
  background: #fbfcff; margin-top: 8px;
}
.write-cn { font-size: 13.5px; color: var(--text); }
.write-points { margin: 8px 0 6px; padding-left: 20px; }
.write-points li { font-size: 13px; color: var(--muted); margin: 3px 0; }
.write-area {
  width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; font-size: 14px; line-height: 1.9;
  resize: vertical; outline: none;
}
.write-area:focus { border-color: #b9caf7; box-shadow: 0 0 0 3px rgba(59, 110, 245, .08); }
.write-result { border: 1px solid #dbe6f7; }
.write-review { margin-top: 8px; }
.write-review summary { cursor: pointer; font-size: 13px; color: var(--primary); }
.write-text {
  margin-top: 8px; padding: 12px; border-radius: 12px; background: #f7f9fe;
  font-size: 13.5px; line-height: 1.9; white-space: normal;
}
@media (max-width: 640px) {
  .write-card { padding: 10px 12px; }
}

/* ---------- 雅思写作 ---------- */
.iw-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.iw-card { text-align: left; align-items: stretch; }
.iw-card h4 { margin: 2px 0 4px; }
.iw-question .iw-prompt { font-size: 16.5px; font-weight: 600; line-height: 1.7; margin: 10px 0 6px; }
.iw-points { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; line-height: 1.85; }
.iw-text {
  width: 100%; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; font: inherit; font-size: 14.5px; line-height: 1.85;
  resize: vertical; outline: none;
}
.iw-text:focus { border-color: #b9caf7; box-shadow: 0 0 0 3px rgba(59, 110, 245, .08); }
.iw-essay p, .iw-model > p { margin: 0 0 12px; line-height: 1.9; text-align: justify; }
.iw-essay p:last-child { margin-bottom: 0; }
.iw-model { border-left: 3px solid var(--primary); }
.iw-notes { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.iw-notes h4 { margin-bottom: 6px; font-size: 14px; color: var(--primary-dark); }
.iw-notes ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; line-height: 1.9; }

/* ---------- 雅思语法 ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.ig-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 10px; margin-top: 8px; }
.ig-type {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; box-shadow: var(--shadow-sm); transition: .15s;
}
.ig-type:hover { border-color: #b9caf7; transform: translateY(-1px); }
.ig-type b { font-size: 14px; color: #22304d; }
.ig-type span { font-size: 11.5px; color: var(--primary); font-weight: 600; }
.ig-type p { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.ig-ielts { background: var(--primary-soft); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.ig-ielts b { font-size: 12px; color: var(--primary-dark); }
.ig-ielts p { font-size: 12.5px; color: #4a5a7a; margin-top: 2px; line-height: 1.75; }
.ig-tags { margin-top: 12px; line-height: 2; }
.ig-mix { margin-top: 18px; }

/* ---------- 雅思语法汇总讲义 ---------- */
.ig-sum summary h3 { font-size: 15px; }
.ig-table-wrap { overflow-x: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; }
.ig-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ig-table th {
  text-align: left; padding: 8px 10px; background: #f1f4fa; color: #4a5a7a;
  font-size: 11.5px; white-space: nowrap;
}
.ig-table td { padding: 8px 10px; border-top: 1px solid var(--line); line-height: 1.7; vertical-align: top; }
.ig-tips { background: var(--primary-soft); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.ig-tips b { font-size: 12px; color: var(--primary-dark); }
.ig-tips ul { margin: 4px 0 0; padding-left: 18px; color: #4a5a7a; font-size: 12.5px; line-height: 1.8; }
.ig-sum .know-body ol { padding-left: 20px; color: #33415e; font-size: 13px; line-height: 1.9; }

