:root {
  --primary: #2b62f6;
  --primary-2: #5b8cff;
  --primary-soft: #edf2ff;
  --ink: #141a2b;
  --sub: #6b7280;
  --mute: #9aa1b1;
  --line: #e9edf5;
  --bg: #f2f5fb;
  --card: #ffffff;
  --ok: #10a566;
  --ok-soft: #e8f7f0;
  --warn: #e08b00;
  --warn-soft: #fdf4e3;
  --danger: #e04a4a;
  --danger-soft: #fdecec;
  --radius: 16px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: #e8ecf4;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

@media (min-width: 560px) {
  #app {
    box-shadow: 0 0 0 1px rgba(20, 26, 43, 0.06), 0 18px 50px rgba(20, 26, 43, 0.1);
  }
  body {
    padding: 0;
  }
}

.loading {
  padding: 80px 0;
  text-align: center;
  color: var(--mute);
  font-size: 14px;
}

/* ------------------------------- 通用 ------------------------------- */

.page {
  padding-bottom: 40px;
  animation: fade 0.22s ease;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sec {
  position: relative;
  z-index: 1;
  margin: 16px 16px 0;
}

.sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.2px;
}

.sec-title .more {
  font-weight: 500;
  font-size: 12px;
  color: var(--primary);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 2px rgba(20, 26, 43, 0.04);
}

.muted {
  color: var(--sub);
}

.tiny {
  font-size: 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  background: #eef1f7;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.985);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(43, 98, 246, 0.28);
}

.btn.ghost {
  background: #fff;
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(43, 98, 246, 0.28);
}

.btn.line {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn.block {
  width: 100%;
}

.btn.sm {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.btn.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.btn.no {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
}

.pill.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.pill.gray {
  background: #f1f3f8;
  color: var(--sub);
}

/* ------------------------------- 首页 Hero ------------------------------- */

.hero {
  position: relative;
  padding: 26px 20px 54px;
  background: linear-gradient(135deg, #2b62f6 0%, #4f7dff 55%, #6f9bff 100%);
  color: #fff;
  border-radius: 0 0 26px 26px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.hero::before {
  content: "";
  position: absolute;
  right: 40px;
  bottom: -90px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero h1 {
  position: relative;
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.hero .sub {
  position: relative;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-stats {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-top: 18px;
  padding: 14px 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}

.hero-stat {
  flex: 1;
  text-align: center;
}

.hero-stat b {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.hero-stat span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

.hero-sep {
  flex: 0 0 1px;
  width: 1px;
  background: rgba(255, 255, 255, 0.26);
  margin: 4px 0;
}

.pull {
  margin-top: -40px;
}

/* ------------------------------- 作业卡片 ------------------------------- */

.hw {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(20, 26, 43, 0.05);
  cursor: pointer;
  transition: transform 0.1s ease;
  position: relative;
  overflow: hidden;
}

.hw:active {
  transform: scale(0.994);
}

.hw-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hw-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.hw-desc {
  margin-top: 6px;
  font-size: 13px;
  color: var(--sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hw-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--mute);
}

.hw-meta .grow {
  flex: 1;
}

.hw-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 700;
  color: var(--primary);
}

.hw-score b {
  font-size: 18px;
}

.hw-score i {
  font-style: normal;
  font-size: 11px;
  color: var(--mute);
  font-weight: 500;
}

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.9;
}

/* ------------------------------- 答题页 ------------------------------- */

.q-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.q-page .q-foot {
  margin-top: auto;
}

.q-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(242, 245, 251, 0.94);
  backdrop-filter: blur(10px);
  padding: 10px 16px 8px;
  border-bottom: 1px solid rgba(233, 237, 245, 0.9);
}

.q-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--sub);
}

.q-top-row .counter {
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
}

.q-top-row .grow {
  flex: 1;
}

.bar {
  height: 4px;
  border-radius: 99px;
  background: #e3e8f3;
  margin-top: 9px;
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width 0.25s ease;
}

.dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.dot {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--sub);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.dot:active {
  transform: scale(0.93);
}

/* 词汇检验：已判对 / 已判错 */
.dot.ok {
  background: #e7f8ee;
  color: #0f9950;
  box-shadow: inset 0 0 0 1px #b3e5c8;
}

.dot.bad {
  background: #fdeceb;
  color: #d8443d;
  box-shadow: inset 0 0 0 1px #f5c5c2;
}

.dot.done {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: none;
}

.dot.on {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 3px 8px rgba(43, 98, 246, 0.32);
}

.q-card {
  margin: 14px 16px 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: 0 1px 3px rgba(20, 26, 43, 0.05);
}

.q-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.q-tag .score {
  color: var(--sub);
  font-weight: 600;
}

.q-stem {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 13px 14px;
  border-radius: 12px;
  background: #fafbfe;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: all 0.14s ease;
  font-size: 14.5px;
  line-height: 1.55;
}

.opt:active {
  transform: scale(0.995);
}

.opt .key {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #eef1f7;
  color: var(--sub);
  margin-top: 1px;
}

.opt.on {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1.5px rgba(43, 98, 246, 0.55);
}

.opt.on .key {
  background: var(--primary);
  color: #fff;
}

.blank-wrap {
  margin-top: 14px;
}

.blank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.blank-no {
  flex: 0 0 46px;
  font-size: 12px;
  color: var(--mute);
}

input.blank,
textarea.essay,
input.txt,
textarea.txt {
  width: 100%;
  border: 0;
  outline: 0;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fafbfe;
  border-radius: 11px;
  padding: 12px 13px;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.15s ease;
}

input.blank:focus,
textarea.essay:focus,
input.txt:focus,
textarea.txt:focus {
  box-shadow: inset 0 0 0 1.5px rgba(43, 98, 246, 0.55);
  background: #fff;
}

textarea.txt {
  min-height: 62px;
  line-height: 1.7;
  resize: vertical;
  padding: 11px 13px;
}

textarea.essay {
  min-height: 130px;
  resize: vertical;
  line-height: 1.7;
  margin-top: 12px;
}

.q-foot {
  position: sticky;
  bottom: 0;
  z-index: 15;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  margin-top: 18px;
}

.q-foot .btn {
  flex: 1;
}

.q-foot .btn.wide {
  flex: 2;
}

/* ------------------------------- 结果页 ------------------------------- */

.score-head {
  text-align: center;
  padding: 28px 20px 22px;
  background: linear-gradient(135deg, #2b62f6 0%, #5b8cff 100%);
  color: #fff;
  border-radius: 0 0 26px 26px;
}

.score-ring {
  width: 118px;
  height: 118px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.22);
}

.score-ring b {
  font-size: 38px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -1px;
}

.score-ring span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
}

.score-word {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
}

.score-tip {
  margin-top: 4px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
}

.stat3 {
  display: flex;
  margin: 16px 16px 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 0;
  box-shadow: 0 1px 3px rgba(20, 26, 43, 0.05);
}

.stat3 > div {
  flex: 1;
  text-align: center;
  position: relative;
}

.stat3 > div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.stat3 b {
  display: block;
  font-size: 19px;
  font-weight: 700;
}

.stat3 span {
  font-size: 11.5px;
  color: var(--mute);
}

.res-q {
  margin: 12px 16px 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: 0 1px 3px rgba(20, 26, 43, 0.05);
  border-left: 3px solid var(--line);
}

.res-q.right {
  border-left-color: var(--ok);
}

.res-q.wrong {
  border-left-color: var(--danger);
}

.res-q.pending {
  border-left-color: var(--warn);
}

.res-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 8px;
}

.res-head .st {
  margin-left: auto;
  font-weight: 700;
  font-size: 12px;
}

.st.right {
  color: var(--ok);
}

.st.wrong {
  color: var(--danger);
}

.st.pending {
  color: var(--warn);
}

.res-stem {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  white-space: pre-wrap;
}

.ans-line {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.7;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fafbfe;
}

.ans-line .lb {
  color: var(--mute);
  font-size: 12px;
  margin-right: 6px;
}

.ans-line.mine b {
  color: var(--danger);
}

.ans-line.right b {
  color: var(--ok);
}

.ans-line.blank-ok b {
  color: var(--ok);
}

.ans-line.blank-no b {
  color: var(--danger);
  text-decoration: line-through;
}

.analysis {
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--warn-soft);
  font-size: 13px;
  line-height: 1.75;
  color: #7a5410;
  white-space: pre-wrap;
}

.analysis .lb {
  font-weight: 700;
  color: var(--warn);
  margin-right: 4px;
}

/* ------------------------------- 教师端 ------------------------------- */

.login-wrap {
  padding: 60px 26px;
  text-align: center;
}

.login-wrap .icon {
  font-size: 42px;
}

.login-wrap h2 {
  margin: 14px 0 6px;
  font-size: 19px;
}

.login-wrap p {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.8;
}

.login-wrap input {
  text-align: center;
  letter-spacing: 4px;
  font-size: 20px;
  padding: 14px;
  margin-bottom: 12px;
}

.toolbar {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.toolbar::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}

.chip.on {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(43, 98, 246, 0.25);
}

.hw-acts {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.hw-acts .btn {
  flex: 1;
}

.form-row {
  margin-bottom: 14px;
}

.form-row label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sub);
  margin-bottom: 6px;
}

.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 14px;
}

.switch .track {
  width: 46px;
  height: 26px;
  border-radius: 99px;
  background: #dfe4ef;
  position: relative;
  transition: background 0.18s ease;
  flex: 0 0 46px;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}

.switch.on .track {
  background: var(--primary);
}

.switch.on .track::after {
  transform: translateX(20px);
}

.q-edit {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(20, 26, 43, 0.05);
}

.q-edit-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.q-edit-head .idx {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

select {
  font-family: inherit;
  font-size: 13px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 0;
  background: #f1f4fa;
  color: var(--ink);
  outline: 0;
  box-shadow: inset 0 0 0 1px var(--line);
}

.opt-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.opt-edit .pick {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #f1f4fa;
  color: var(--sub);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line);
}

.opt-edit .pick.on {
  background: var(--ok);
  color: #fff;
  box-shadow: none;
}

/* 小图标按钮 */
.icon-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f3f5fa;
  color: #8b93a5;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn:active {
  background: #e8ecf6;
}

.icon-btn.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* 统计 */
.sum-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 16px 0;
}

.sum-cell {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(20, 26, 43, 0.05);
}

.sum-cell span {
  display: block;
  font-size: 11.5px;
  color: var(--mute);
}

.sum-cell b {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.sum-cell b small {
  font-size: 12px;
  font-weight: 500;
  color: var(--mute);
  margin-left: 2px;
}

.tabs {
  display: flex;
  gap: 4px;
  margin: 16px 16px 0;
  padding: 4px;
  background: #e7ebf4;
  border-radius: 12px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 9px 4px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  cursor: pointer;
  transition: all 0.16s ease;
}

.tab.on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 26, 43, 0.1);
}

.qbar {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.qbar:last-child {
  border-bottom: 0;
}

.qbar-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}

.qbar-top .no {
  font-weight: 700;
  color: var(--primary);
}

.qbar-top .stem {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.qbar-top .rate {
  font-weight: 700;
  font-size: 14px;
}

.qbar-track {
  height: 8px;
  border-radius: 99px;
  background: #eef1f7;
  overflow: hidden;
}

.qbar-track > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #34c38f, #10a566);
}

.qbar-track > i.low {
  background: linear-gradient(90deg, #ff9b8a, #e04a4a);
}

.qbar-track > i.mid {
  background: linear-gradient(90deg, #ffc670, #e08b00);
}

.qbar-sub {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--mute);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.stu:last-child {
  border-bottom: 0;
}

.stu:active {
  background: #f7f9fe;
}

.stu .rank {
  flex: 0 0 18px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--mute);
}

.stu .who {
  flex: 1;
  min-width: 0;
}

.stu .who b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stu .who span {
  display: block;
  font-size: 11px;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stu .score {
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

.stu .score b {
  font-size: 15px;
  font-weight: 700;
}

.stu .score i {
  font-style: normal;
  font-size: 11px;
  color: var(--mute);
}

.stu .marks {
  flex: 0 1 auto;
  display: flex;
  gap: 3px;
  max-width: 38vw;
  overflow-x: auto;
  scrollbar-width: none;
}

.stu .marks::-webkit-scrollbar {
  display: none;
}

.mk {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #f1f4fa;
  color: #c8cdd9;
}

.mk.y {
  background: var(--ok-soft);
  color: var(--ok);
}

.mk.n {
  background: var(--danger-soft);
  color: var(--danger);
}

.mk.p {
  background: var(--warn-soft);
  color: var(--warn);
}

table.tb {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 12.5px;
}

table.tb th,
table.tb td {
  padding: 10px 8px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

table.tb th {
  font-size: 11.5px;
  color: var(--mute);
  font-weight: 600;
  background: #fafbfe;
  position: sticky;
  top: 0;
}

table.tb td.mk {
  text-align: center;
  font-weight: 700;
  color: #c8cdd9;
  padding: 10px 5px;
}

td.mk.y {
  color: var(--ok);
}

td.mk.n {
  color: var(--danger);
}

td.mk.p {
  color: var(--warn);
}

tr.clickable {
  cursor: pointer;
}

tr.clickable:active {
  background: #f7f9fe;
}

.rev-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.rev-card:last-child {
  border-bottom: 0;
}

.rev-card .top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 6px;
}

.rev-card .top b {
  color: var(--ink);
  font-size: 13px;
}

.rev-card .top span {
  margin-left: auto;
  color: var(--warn);
  font-weight: 600;
}

.rev-card .stem {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}

.rev-card .given {
  margin-top: 8px;
  font-size: 13px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #fafbfe;
  white-space: pre-wrap;
  line-height: 1.7;
}

.rev-card .ref {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ok);
  line-height: 1.7;
}

.rev-card .acts {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.rev-card .acts .btn {
  flex: 1;
}

/* Toast / 弹层 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 12px);
  max-width: 80vw;
  padding: 11px 18px;
  background: rgba(20, 26, 43, 0.9);
  color: #fff;
  font-size: 13.5px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 999;
  backdrop-filter: blur(4px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mask {
  position: fixed;
  inset: 0;
  background: rgba(14, 19, 32, 0.45);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.18s ease;
}

.sheet {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 86vh;
  overflow-y: auto;
  animation: up 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes up {
  from {
    transform: translateY(30px);
  }
  to {
    transform: none;
  }
}

.sheet h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.sheet .hint {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--sub);
  line-height: 1.75;
}

.sheet textarea {
  min-height: 200px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.65;
}

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--warn-soft);
  font-size: 12.5px;
  color: #7a5410;
  line-height: 1.6;
}

.banner .grow {
  flex: 1;
}

.banner a {
  color: var(--warn);
  font-weight: 700;
  text-decoration: none;
  flex: 0 0 auto;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 16px 2px;
  padding: 8px 14px 8px 12px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07), inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-back::before {
  content: '\2039';
  font-size: 17px;
  line-height: 1;
  margin-top: -1px;
}

.nav-back:hover {
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07), inset 0 0 0 1px var(--primary);
}

.nav-back:active {
  transform: scale(0.96);
}

.nav-title {
  padding: 8px 16px 0;
  font-size: 19px;
  font-weight: 700;
}

.foot-note {
  margin: 22px 16px 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--mute);
  line-height: 1.9;
}

/* ------------------------------- 词汇检验 ------------------------------- */

.vchips {
  display: flex;
  gap: 10px;
}
.vchip {
  flex: 1;
  padding: 11px 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--sub);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.vchip.on {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.v-word {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.25;
  margin: 10px 0 2px;
  word-break: break-word;
}
.v-zh {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.45;
  margin: 10px 0 2px;
  word-break: break-word;
}
.v-pos {
  font-size: 13px;
  color: var(--mute);
  margin-bottom: 6px;
}
.vphrase {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 7px;
  background: #eef2ff;
  color: #2f5bea;
  font-size: 13px;
  font-weight: 600;
  vertical-align: middle;
  letter-spacing: 0;
}
.opt.multi .key {
  border-radius: 7px;
}
.vopts {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.v-input {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px 16px;
  font-size: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.v-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.vchart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding: 12px 10px 0;
  background: #fff;
  border-radius: 14px;
  overflow-x: auto;
}
.vletter {
  flex: 1 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 12px;
}
.vletter-bar {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.vletter-bar i {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #dfe6fb;
  border-radius: 4px 4px 0 0;
}
.vletter-bar u {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--primary);
  border-radius: 4px 4px 0 0;
}
.vletter span {
  margin-top: 4px;
  font-size: 9px;
  color: var(--mute);
  line-height: 1;
}

.vlist {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}
.vrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.vrow:last-child {
  border-bottom: 0;
}
.vrow > div:first-child {
  flex: 1;
  min-width: 0;
}
.vrow b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  word-break: break-word;
}
.vrow span {
  display: block;
  font-size: 12.5px;
  color: var(--sub);
  word-break: break-word;
}
.vrow .pill {
  flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .page {
    animation: none;
  }
}

/* 答题页左上角返回键（紧凑圆形，和底部按钮呼应） */
.q-back {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-left: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07), inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.q-back:hover {
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07), inset 0 0 0 1px var(--primary);
}

.q-back:active {
  transform: scale(0.92);
}

/* 词汇题号条：筛选行 */
.dots-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.dots-hint {
  font-size: 12px;
  color: var(--mute);
}

.dots-filter {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sub);
  background: #fff;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.dots-filter.on {
  color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.dots-filter.dim {
  opacity: 0.55;
}

.dots-empty {
  font-size: 12.5px;
  color: var(--mute);
  padding: 8px 0;
}

/* 答题即时反馈 */
.v-feedback {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.v-feedback.ok {
  color: #0d8043;
  background: #e7f8ee;
  box-shadow: inset 0 0 0 1px #bfe8cf;
}

.v-feedback.bad {
  color: #c93a34;
  background: #fdeceb;
  box-shadow: inset 0 0 0 1px #f5c5c2;
}

/* 选项：正确项绿、选错项红 */
.opt.right {
  border-color: #48c07d;
  background: #eefaf2;
}

.opt.right .key {
  background: #48c07d;
  color: #fff;
}

.opt.wrong {
  border-color: #f0938c;
  background: #fdf1f0;
}

.opt.wrong .key {
  background: #ef8078;
  color: #fff;
}

/* 词汇：分段选择网格 */
.vparts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
@media (min-width: 560px) {
  .vparts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .vparts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.vpart {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 104px;
  padding: 12px 12px 11px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}
.vpart:active {
  transform: scale(0.975);
}
@media (hover: hover) {
  .vpart:hover {
    border-color: #d7deea;
    box-shadow: 0 4px 14px rgba(20, 30, 60, 0.07);
  }
}

/* 左侧色条表示掌握等级 */
.vpart::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #e6eaf2;
}
.vpart.p-gray::before { background: #e6eaf2; }
.vpart.p-red::before { background: #f0a9a5; }
.vpart.p-blue::before { background: #aebff5; }
.vpart.p-green::before { background: #7fd3a4; }
.vpart.p-green-deep::before { background: #34a866; }

.vpart-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vpart-title {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.vpart-badge {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.vpart-range {
  margin-top: 7px;
  margin-bottom: auto;
  font-size: 11.5px;
  color: var(--sub);
  letter-spacing: 0.2px;
}
.vpart-bar {
  margin-top: 10px;
  height: 4px;
  border-radius: 4px;
  background: #eef1f6;
  overflow: hidden;
}
.vpart-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #cfd6e4;
  transition: width 0.3s ease;
}
.vpart.p-red .vpart-bar i { background: #e8837d; }
.vpart.p-blue .vpart-bar i { background: #7f9bf0; }
.vpart.p-green .vpart-bar i { background: #4fbf85; }
.vpart.p-green-deep .vpart-bar i { background: #1f9d57; }
.vpart-meta {
  margin-top: 0;
  font-size: 11px;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vpart-meta b {
  font-weight: 700;
  color: #5a6478;
}

/* 掌握等级徽章 / 图例 */
.vlegend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 2px;
}
.lv {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.lv-green-deep {
  color: #0a7d3c;
  background: #d6f5e2;
  box-shadow: inset 0 0 0 1px #9fe0bb;
}
.lv-green {
  color: #1f9d57;
  background: #e4f8ee;
  box-shadow: inset 0 0 0 1px #b6e9cd;
}
.lv-blue {
  color: #2f5bea;
  background: #eaf0ff;
  box-shadow: inset 0 0 0 1px #c5d4ff;
}
.lv-red {
  color: #d24a44;
  background: #fdeceb;
  box-shadow: inset 0 0 0 1px #f6cac7;
}
.lv-gray {
  color: #9aa1b1;
  background: #f1f3f7;
  box-shadow: inset 0 0 0 1px #e2e6ee;
}

/* 词汇：分段胶囊 + 等级筛选 */
.vftabs {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.vftabs::-webkit-scrollbar {
  display: none;
}
.vftab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sub);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.vftab i {
  font-style: normal;
  margin-left: 3px;
  font-size: 10.5px;
  opacity: 0.75;
}
.vftab.on {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(43, 98, 246, 0.25);
}
.vftab.on i {
  opacity: 0.9;
}
.vftab.dim {
  opacity: 0.5;
}

.vpills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.vpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: #cfd6e4;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(20, 30, 60, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.vpill:active {
  transform: scale(0.95);
}
@media (hover: hover) {
  .vpill:hover {
    box-shadow: 0 4px 12px rgba(20, 30, 60, 0.16);
  }
}
.vpill em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.88;
}
.vp-red { background: #e8837d; }
.vp-blue { background: #7f9bf0; }
.vp-green { background: #4fbf85; }
.vp-deep { background: #1f9d57; }
.vp-gray { background: #eef1f6; color: #aeb6c6; }
.vpills-empty {
  padding: 18px 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--mute);
}

/* 词汇：大目录（顺序 / 乱序 / 错题专练） */
.vmodes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vmode {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 80px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 30, 60, 0.06), inset 0 0 0 1px var(--line);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}
.vmode:active {
  transform: scale(0.985);
}
@media (hover: hover) {
  .vmode:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(20, 30, 60, 0.12), inset 0 0 0 1px var(--line);
  }
}
.vmode::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
}
.vmode-ic {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #5b8bff, #2b62f6);
  box-shadow: 0 4px 10px rgba(43, 98, 246, 0.28);
}
.vmode-main {
  flex: 1;
  min-width: 0;
}
.vmode-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.vmode-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--sub);
  background: #f1f4fa;
}
.vmode-tag.hot {
  color: #b2441a;
  background: #fff0e8;
}
.vmode-desc {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--mute);
}
.vmode-bar {
  margin-top: 8px;
  height: 4px;
  border-radius: 999px;
  background: #eef1f7;
  overflow: hidden;
}
.vmode-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7f9bf0, #2b62f6);
}
.vmode-right {
  flex: 0 0 auto;
  text-align: right;
}
.vmode-right b {
  font-size: 17px;
  color: var(--ink);
}
.vmode-right b span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mute);
}
.vmode-right em {
  display: block;
  margin-top: 1px;
  font-style: normal;
  font-size: 10.5px;
  color: var(--mute);
}
.vm-shuffle::before {
  background: #7c5cf0;
}
.vm-shuffle .vmode-ic {
  background: linear-gradient(135deg, #a58bff, #7c5cf0);
  box-shadow: 0 4px 10px rgba(124, 92, 240, 0.28);
}
.vm-shuffle .vmode-bar i {
  background: linear-gradient(90deg, #b9a6ff, #7c5cf0);
}
.vm-wrong::before {
  background: #f08a3c;
}
.vm-wrong .vmode-ic {
  background: linear-gradient(135deg, #ffb066, #f08a3c);
  box-shadow: 0 4px 10px rgba(240, 138, 60, 0.3);
}
.vm-wrong.dim {
  opacity: 0.62;
}
.vm-wrong.dim .vmode-ic {
  background: #c9d0dd;
  box-shadow: none;
}

/* 中译英填空：首字母提示 */
.v-hint-letter {
  margin-top: 12px;
  font-size: 13px;
  color: var(--sub);
}
.v-hint-letter b {
  font-size: 20px;
  color: var(--primary);
  letter-spacing: 1px;
  margin-left: 4px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* 英译中多空 */
.v-multi {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.v-blank-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.v-blank-row .v-blank-no {
  flex: 0 0 auto;
  width: 52px;
  font-size: 13px;
  color: var(--sub);
}
.v-blank-row .v-blank {
  margin-top: 0;
  flex: 1;
}
.v-blank-row.ok .v-blank {
  border-color: #48c07d;
  box-shadow: inset 0 0 0 1px #bfe8cf;
}
.v-blank-row.bad .v-blank {
  border-color: #f0938c;
  box-shadow: inset 0 0 0 1px #f5c5c2;
}
.v-blank-mark {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
}
.v-blank-mark.ok {
  color: #0d8043;
}
.v-blank-mark.bad {
  color: #c93a34;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 当前题永远是蓝色，优先级高于对错配色 */
.dots .dot.on,
.dots .dot.on.ok,
.dots .dot.on.bad {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(47, 91, 234, 0.3);
}

/* 教师端「学生链接」弹窗：大号作业码 + 链接框 */
.code-big {
  margin: 6px 0 4px;
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.link-box {
  padding: 11px 13px;
  border-radius: 12px;
  background: #f5f7fb;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-all;
  -webkit-user-select: all;
  user-select: all;
}

/* ============================== 原著阅读 ============================== */

.pill.hot {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ---------- 首页入口卡 ---------- */

.hw-read {
  background: linear-gradient(135deg, #fff 0%, #f6f8ff 100%);
  box-shadow: inset 3px 0 0 var(--primary), 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* ---------- 书籍详情页 ---------- */

.rd-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px 10px;
}

.rd-head-main {
  flex: 1;
  min-width: 0;
}

.rd-h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.rd-h1-en {
  font-size: 12px;
  color: var(--mute);
  margin-top: 3px;
  line-height: 1.35;
}

.rd-head-meta {
  font-size: 11.5px;
  color: var(--sub);
  margin-top: 7px;
}

.rd-intro {
  margin: 4px 16px 0;
  padding: 12px 14px;
  background: #fff;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.75;
  color: #495066;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.rd-progbar {
  height: 5px;
  border-radius: 999px;
  background: #eaeef6;
  margin: 10px 0 14px;
  overflow: hidden;
}

.rd-progbar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width 0.3s ease;
}

.rd-part {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--mute);
  letter-spacing: 0.6px;
  padding: 12px 2px 7px;
}

.rd-chs {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.rd-ch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.rd-ch:last-child {
  border-bottom: 0;
}

.rd-ch:active {
  background: #f7f9fd;
}

.rd-ch-no {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f2f5fb;
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rd-ch.done .rd-ch-no {
  background: var(--ok-soft);
  color: var(--ok);
}

.rd-ch-main {
  flex: 1;
  min-width: 0;
}

.rd-ch-zh {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}

.rd-ch-en {
  font-size: 10.5px;
  color: var(--mute);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rd-ch-w {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--mute);
}

/* ---------- 阅读页 ---------- */

.rd-reader {
  padding-bottom: 0;
  background: #fbfaf7;
}

.rd-top {
  position: sticky;
  top: 0;
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eae7e0;
}

.rd-top .q-back {
  flex: 0 0 auto;
}

.rd-top-mid {
  flex: 1;
  min-width: 0;
}

.rd-top-zh {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rd-top-sub {
  font-size: 10.5px;
  color: var(--mute);
  margin-top: 1px;
}

.rd-font {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: var(--sub);
  background: #fff;
  border-radius: 999px;
  padding: 3px 4px;
  box-shadow: inset 0 0 0 1px #e6e3dc;
}

.rd-font span {
  padding: 3px 7px;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.rd-font span:active {
  background: #f0eee8;
}

#rd-font-label {
  font-weight: 500;
  font-size: 10.5px;
  color: var(--mute);
  min-width: 30px;
  text-align: center;
}

.rd-article {
  padding: 6px 20px 26px;
}

.rd-ch-title {
  margin: 18px 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #1a1f2e;
}

.rd-ch-title-en {
  font-size: 11.5px;
  color: #9a938a;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

.rd-tip {
  font-size: 11.5px;
  color: #a49c92;
  background: #f4f1ea;
  border-radius: 9px;
  padding: 7px 11px;
  margin-bottom: 18px;
  line-height: 1.5;
}

#rd-body {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: var(--rd-size, 18px);
  line-height: 1.92;
  color: #23262e;
  letter-spacing: 0.1px;
  -webkit-user-select: text;
  user-select: text;
}

.rd-p {
  margin: 0 0 1.15em;
  text-align: left;
  word-break: normal;
  overflow-wrap: break-word;
}

.rd-p:last-child {
  margin-bottom: 0;
}

.rd-nav {
  position: sticky;
  bottom: 0;
  z-index: 15;
  display: flex;
  gap: 8px;
  padding: 11px 14px calc(11px + env(safe-area-inset-bottom));
  background: rgba(251, 250, 247, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid #eae7e0;
}

.rd-nav .btn {
  flex: 1;
  font-size: 13px;
  padding: 11px 8px;
}

.rd-nav .btn[disabled] {
  opacity: 0.4;
}

/* ---------- 划线翻译气泡 ---------- */

.rd-pop {
  position: fixed;
  z-index: 999;
  display: none;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  animation: rdPopIn 0.16s ease;
}

@keyframes rdPopIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
}

.rd-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f7f8fc;
  border-bottom: 1px solid #eef0f6;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.3px;
}

.rd-pop-x {
  font-size: 17px;
  line-height: 1;
  color: var(--mute);
  padding: 0 2px;
  cursor: pointer;
  font-weight: 400;
}

.rd-pop-body {
  padding: 11px 13px;
  max-height: 42vh;
  overflow-y: auto;
}

.rd-pop-load {
  font-size: 12.5px;
  color: var(--mute);
}

.rd-pop-err {
  font-size: 12.5px;
  color: var(--danger);
  line-height: 1.6;
}

.rd-tr {
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink);
}

.rd-w-en {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.rd-w-zh {
  font-size: 13.5px;
  color: #495066;
  margin-top: 4px;
  line-height: 1.6;
}

.rd-gl {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed #edeff5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.rd-gl-h {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--mute);
  letter-spacing: 0.4px;
  width: 100%;
}

.rd-gl-i {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  max-width: 100%;
  font-size: 11.5px;
  color: var(--sub);
  background: #f5f7fb;
  border-radius: 7px;
  padding: 4px 8px;
  line-height: 1.45;
}

.rd-gl-i b {
  color: var(--primary);
  font-weight: 600;
}

.rd-note {
  margin-top: 9px;
  font-size: 11px;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 8px;
  padding: 6px 9px;
  line-height: 1.5;
}

.rd-pop-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid #f0f2f7;
  background: #fcfdff;
}

.rd-copy {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.rd-pop-src {
  font-size: 10.5px;
  color: var(--mute);
}

/* 原文里的 _斜体_（书名、船名、强调）渲染为斜体，不露下划线 */
#rd-body em {
  font-style: italic;
  letter-spacing: 0;
}

/* ---------- 生词本 ---------- */

/* 阅读页顶部的「生词本 N」入口 */
.rd-wb {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
  color: #5a5650;
  background: #fff;
  border-radius: 999px;
  padding: 5px 9px;
  box-shadow: inset 0 0 0 1px #e6e3dc;
  user-select: none;
  white-space: nowrap;
}

.rd-wb:active {
  background: #f2efe8;
}

.rd-wb-n {
  display: inline-block;
  min-width: 15px;
  padding: 0 4px;
  height: 15px;
  line-height: 15px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.rd-wb-n.none {
  display: none;
}

/* 气泡底部「加入生词本」 */
.rd-add {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
}

.rd-add:active {
  opacity: 0.75;
}

.rd-add.on {
  color: var(--ok);
  background: var(--ok-soft);
}

.rd-pop-foot {
  gap: 8px;
}

.rd-pop-src {
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 生词本列表页 */
.wb-list {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.wb-i {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.wb-i:last-child {
  border-bottom: 0;
}

.wb-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.wb-en {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.wb-en i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--mute);
  background: #f1f3f9;
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: 2px;
}

.wb-zh {
  font-size: 12.5px;
  color: #495066;
  margin-top: 3px;
  line-height: 1.5;
}

.wb-src {
  font-size: 10.5px;
  color: var(--mute);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-del {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--mute);
  padding: 4px 2px 4px 8px;
  cursor: pointer;
  align-self: center;
}

.wb-del:active {
  color: var(--danger);
}

/* 词形还原提示：months → month */
.rd-w-lemma {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--mute);
  margin-left: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  vertical-align: 2px;
}

/* ==================================================================
   原著阅读 · 纸张版面
   阅读模块整体换成「纸 + 墨 + 朱」的书页气质，与蓝色功能页区分开：
   书架、目录、正文、生词本共用一套变量，去掉统计数字条。
   ================================================================== */

.rd-paper,
.rd-reader,
.rd-pop {
  --rd-paper: #fbf8f2;
  --rd-card: #fffdf8;
  --rd-ink: #1d1b18;
  --rd-ink2: #4c473f;
  --rd-mute: #6e675c;
  --rd-hair: #e7e0d3;
  --rd-soft: #f2ece0;
  --rd-accent: #b03d26;
  --rd-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --rd-latin: Georgia, "Times New Roman", serif;
}

.rd-paper {
  min-height: 100vh;
  background: var(--rd-paper);
  background-image: radial-gradient(120% 56% at 50% 0%, #fffefb 0%, rgba(255, 254, 251, 0) 64%);
  color: var(--rd-ink);
  padding-bottom: 24px;
  animation: rdhIn 0.34s ease both;
}

@keyframes rdhIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes rdhUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ---------- 顶栏：返回 + 生词本 ---------- */

.rdh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 0;
}

.rdh-back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 34px;
  padding-right: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--rd-ink2);
  cursor: pointer;
  user-select: none;
}

.rdh-back::before {
  content: "\2039";
  font-size: 19px;
  line-height: 1;
  margin-top: -2px;
  color: var(--rd-mute);
}

.rdh-back:active {
  opacity: 0.5;
}

/* 「我的 · 生词本」入口行 */
.rdh-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 20px;
  padding: 14px 15px;
  background: var(--rd-card);
  border: 1px solid var(--rd-hair);
  border-radius: 15px;
  box-shadow: 0 8px 20px -18px rgba(45, 38, 26, 0.9);
  cursor: pointer;
  animation: rdhUp 0.52s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.rdh-row:active {
  transform: scale(0.988);
}

@media (hover: hover) {
  .rdh-row:hover {
    border-color: #dcd3c0;
  }
}

.rdh-row-main {
  flex: 1;
  min-width: 0;
}

.rdh-row-tt {
  font-family: var(--rd-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--rd-ink);
}

.rdh-row-n {
  flex: 0 0 auto;
  font-family: var(--rd-latin);
  font-size: 13px;
  font-weight: 700;
  color: var(--rd-accent);
  font-variant-numeric: tabular-nums;
}

.rdh-row-n.idle {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--rd-mute);
}

.rdh-row-arrow {
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1;
  color: var(--rd-accent);
}

/* ---------- 报头 ---------- */

.rdh-mast {
  padding: 20px 20px 0;
}

.rdh-kicker {
  font-family: var(--rd-latin);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--rd-accent);
}

.rdh-title {
  margin: 10px 0 0;
  font-family: var(--rd-serif);
  font-size: 33px;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: 0.02em;
  color: var(--rd-ink);
}

.rdh-title::after {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  margin-top: 14px;
  background: var(--rd-accent);
}

.rdh-lede {
  margin: 14px 0 0;
  max-width: 26em;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--rd-mute);
}

.rdh-lede b {
  font-family: var(--rd-latin);
  font-weight: 700;
  color: var(--rd-accent);
}

/* ---------- 小节标题 ---------- */

.rdh-sec {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 20px 12px;
  font-family: var(--rd-serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--rd-ink2);
}

.rdh-sec::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rd-hair);
}

/* ---------- 书架 ---------- */

.rdh-shelf {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px;
}

.rdh-book {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--rd-card);
  border: 1px solid var(--rd-hair);
  border-radius: 15px;
  box-shadow: 0 8px 20px -18px rgba(45, 38, 26, 0.9);
  cursor: pointer;
  animation: rdhUp 0.52s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.rdh-book:active {
  transform: scale(0.988);
}

@media (hover: hover) {
  .rdh-book:hover {
    border-color: #dcd3c0;
    box-shadow: 0 14px 28px -20px rgba(45, 38, 26, 0.95);
  }
}

.rdh-book-main {
  flex: 1;
  min-width: 0;
}

.rdh-book-tt {
  margin: 2px 0 0;
  font-family: var(--rd-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.01em;
  color: var(--rd-ink);
}

.rdh-book-en {
  margin: 3px 0 0;
  font-family: var(--rd-latin);
  font-style: italic;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--rd-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rdh-book-meta {
  margin: 6px 0 0;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--rd-mute);
}

.rdh-track {
  height: 3px;
  margin-top: 11px;
  border-radius: 999px;
  background: var(--rd-soft);
  overflow: hidden;
}

.rdh-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--rd-accent);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rdh-track.idle i {
  background: transparent;
}

.rdh-book-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 11px;
}

.rdh-book-pct {
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--rd-accent);
}

.rdh-book-pct.idle {
  font-weight: 400;
  color: var(--rd-mute);
}

.rdh-book-go {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--rd-ink);
}

.rdh-book-go::after {
  content: " \203A";
  color: var(--rd-accent);
}

/* ---------- 页脚 ---------- */

.rdh-foot {
  margin: 26px 20px 0;
  padding-bottom: 30px;
  font-size: 10.5px;
  line-height: 1.9;
  text-align: center;
  color: var(--rd-mute);
}

/* ---------- 书封（书架 + 目录页共用） ---------- */

.rd-cover {
  flex: 0 0 auto;
  width: 62px;
  height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  border-radius: 3px 8px 8px 3px;
  background: linear-gradient(155deg, #35445f 0%, #1d2534 58%, #151b27 100%);
  box-shadow: 0 10px 20px -12px rgba(28, 24, 18, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  position: relative;
}

.rd-cover::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--rd-accent);
  opacity: 0.92;
}

.rd-cover b {
  font-family: var(--rd-latin);
  font-style: italic;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: #fdf8ee;
}

.rd-cover b::after {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  margin: 9px auto 0;
  background: rgba(253, 248, 238, 0.3);
}

.rd-cover i {
  margin-top: 8px;
  padding: 0 6px;
  font-size: 8.5px;
  font-style: normal;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(253, 248, 238, 0.62);
}

.rd-cover.big {
  width: 76px;
  height: 106px;
  border-radius: 4px 9px 9px 4px;
}

.rd-cover.big b {
  font-size: 34px;
}

/* ---------- 目录页（.rd-sheet） ---------- */

.rd-paper .nav-back {
  margin: 10px 20px 0;
  padding: 9px 6px 9px 0;
  background: none;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--rd-ink2);
}

.rd-paper .nav-back::before {
  color: var(--rd-mute);
}

.rd-paper .nav-back:hover,
.rd-paper .nav-back:active {
  color: var(--rd-accent);
  box-shadow: none;
}

.rd-paper .rd-head {
  padding: 16px 20px 4px;
  align-items: center;
}

.rd-paper .rd-h1 {
  font-family: var(--rd-serif);
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--rd-ink);
}

.rd-paper .rd-h1-en {
  font-family: var(--rd-latin);
  font-style: italic;
  font-size: 11.5px;
  color: var(--rd-mute);
  margin-top: 4px;
}

.rd-paper .rd-head-meta {
  font-size: 11px;
  color: var(--rd-mute);
  margin-top: 8px;
}

.rd-paper .rd-intro {
  margin: 12px 20px 0;
  padding: 13px 15px;
  background: var(--rd-card);
  border: 1px solid var(--rd-hair);
  border-radius: 14px;
  box-shadow: none;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--rd-ink2);
}

.rd-paper .sec {
  margin: 18px 20px 0;
}

.rd-paper .sec-title {
  margin: 0 2px 10px;
  font-family: var(--rd-serif);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--rd-ink2);
}

.rd-paper .sec-title .more {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--rd-mute);
}

.rd-paper .rd-progbar {
  height: 3px;
  background: var(--rd-soft);
  margin: 0 0 16px;
}

.rd-paper .rd-progbar i {
  background: var(--rd-accent);
}

.rd-paper .rd-part {
  padding: 14px 2px 8px;
  font-family: var(--rd-serif);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--rd-mute);
}

.rd-paper .rd-chs {
  background: var(--rd-card);
  border: 1px solid var(--rd-hair);
  border-radius: 15px;
  box-shadow: none;
}

.rd-paper .rd-ch {
  padding: 13px 14px;
  border-bottom-color: var(--rd-hair);
}

.rd-paper .rd-ch:active {
  background: #f7f2e6;
}

.rd-paper .rd-ch-no {
  background: var(--rd-soft);
  color: var(--rd-mute);
  font-family: var(--rd-latin);
  font-size: 12px;
  border-radius: 7px;
}

.rd-paper .rd-ch.done .rd-ch-no {
  background: rgba(176, 61, 38, 0.1);
  color: var(--rd-accent);
}

.rd-paper .rd-ch-zh {
  font-family: var(--rd-serif);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--rd-ink);
}

.rd-paper .rd-ch-w {
  font-family: var(--rd-latin);
  color: #8a8275;
}

.rd-paper .foot-note,
.rd-paper .empty {
  color: var(--rd-mute);
}

.rd-paper .btn.primary {
  background: var(--rd-ink);
  box-shadow: none;
}

/* ---------- 生词本页 ---------- */

.rdh-list {
  margin: 0 20px;
  background: var(--rd-card);
  border: 1px solid var(--rd-hair);
  border-radius: 15px;
  overflow: hidden;
}

.rdh-list .wb-i {
  padding: 13px 15px;
  border-bottom-color: var(--rd-hair);
}

.rdh-list .wb-en {
  color: var(--rd-ink);
}

.rdh-list .wb-en i {
  font-family: var(--rd-latin);
  background: var(--rd-soft);
  color: var(--rd-accent);
}

.rdh-list .wb-zh {
  color: var(--rd-ink2);
}

.rdh-list .wb-src {
  color: var(--rd-mute);
}

.rdh-list .wb-del {
  color: var(--rd-mute);
}

/* ---------- 阅读页与纸张版面统一 ---------- */

.rd-reader {
  background: var(--rd-paper);
}

.rd-top {
  background: rgba(251, 248, 242, 0.94);
  border-bottom-color: var(--rd-hair);
}

.rd-top-zh {
  font-family: var(--rd-serif);
  letter-spacing: 0.02em;
}

.rd-top-sub {
  color: var(--rd-mute);
}

.rd-font,
.rd-wb {
  background: var(--rd-card);
  box-shadow: inset 0 0 0 1px var(--rd-hair);
  color: var(--rd-ink2);
}

.rd-font span:active,
.rd-wb:active {
  background: var(--rd-soft);
}

.rd-wb-n {
  background: var(--rd-accent);
}

.rd-ch-title {
  font-family: var(--rd-serif);
  letter-spacing: 0.02em;
  color: var(--rd-ink);
}

.rd-tip {
  background: var(--rd-soft);
  color: var(--rd-mute);
}

.rd-nav {
  background: rgba(251, 248, 242, 0.96);
  border-top-color: var(--rd-hair);
}

.rd-nav .btn.primary {
  background: var(--rd-ink);
}

.rd-add {
  background: var(--rd-soft);
  color: var(--rd-accent);
}

.rd-add.on {
  background: var(--ok-soft);
  color: var(--ok);
}

.rd-w-en {
  color: var(--rd-ink);
}

/* 划词气泡跟着换成纸面，不抢正文 */
.rd-pop {
  background: var(--rd-card);
  box-shadow: 0 14px 38px rgba(40, 33, 22, 0.22), 0 0 0 1px var(--rd-hair);
}

.rd-pop-head {
  background: var(--rd-soft);
  border-bottom-color: var(--rd-hair);
  color: var(--rd-accent);
  letter-spacing: 0.12em;
}

.rd-pop-x {
  color: var(--rd-mute);
}

.rd-tr,
.rd-w-zh,
.rd-w-lemma {
  color: var(--rd-ink2);
}

.rd-gl {
  border-top-color: var(--rd-hair);
}

.rd-gl-i {
  background: var(--rd-soft);
  color: var(--rd-ink2);
}

.rd-gl-i b {
  color: var(--rd-accent);
}

.rd-pop-foot {
  background: transparent;
  border-top-color: var(--rd-hair);
}

.rd-copy {
  color: var(--rd-accent);
}

.rd-pop-src {
  color: var(--rd-mute);
}

/* 尊重系统的「减少动态效果」 */
@media (prefers-reduced-motion: reduce) {
  .rd-paper,
  .rdh-book {
    animation: none;
  }
  .rdh-track i {
    transition: none;
  }
}

/* ==================================================================
   主界面 · 报头 + 双列入口
   首页不再用蓝色大色块顶在头上，改成「小字栏目名 + 大标题 + 红线」
   的报头，作业卡保持原样，词汇与阅读并成两张方块，页面更短更好扫。
   ================================================================== */

.home {
  padding-bottom: 34px;
  background-image: radial-gradient(120% 42% at 50% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 62%);
}

.hm-head {
  padding: 24px 20px 2px;
}

.hm-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hm-kicker {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--primary);
}

.hm-date {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.hm-user {
  margin-left: auto;
  padding: 4px 11px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  max-width: 8em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-user:active {
  opacity: 0.55;
}

.hm-title {
  margin: 14px 0 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.hm-title::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-top: 14px;
  border-radius: 2px;
  background: var(--primary);
}

/* ---------- 小节：标签 + 细线 + 右侧状态 ---------- */

.hm-sec {
  margin: 24px 20px 0;
}

.hm-sec-t {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 2px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.hm-sec-t i {
  flex: 1;
  display: block;
  height: 1px;
  background: var(--line);
}

.hm-sec-t em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary);
}

.hm-sec-t em.ok {
  color: var(--ok);
}

.home .hw {
  margin-bottom: 10px;
}

.home .banner {
  margin: 14px 20px 0;
}

/* ---------- 双列入口方块 ---------- */

.hm-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hm-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 92px;
  padding: 16px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(20, 26, 43, 0.05);
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.hm-tile:active {
  transform: scale(0.985);
}

@media (hover: hover) {
  .hm-tile:hover {
    box-shadow: 0 8px 20px -14px rgba(20, 26, 43, 0.6);
  }
}

.hm-tile-t {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.hm-tile-a {
  align-self: flex-end;
  font-size: 17px;
  line-height: 1;
  color: var(--primary);
  opacity: 0.9;
}

.hm-tile.read .hm-tile-a {
  color: #b03d26;
}

@media (prefers-reduced-motion: reduce) {
  .hm-tile {
    transition: none;
  }
}
