.reading-main, .read-page, .rmb-main {
  --rd-ink: #1a1916;
  --rd-paper: #f4f1ec;
  --rd-surface: #fffcf7;
}
/* === Reading module === */

.reading-main { max-width: 1240px; }

/* Feature cards */
.rd-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.rd-feature {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 20px;
  transition: all .15s;
}
.rd-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(15,23,42,.12);
  border-color: #cfc8bc;
}
.rd-feat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 10px;
}
.rd-feature h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #111827;
}
.rd-feature p {
  font-size: 12.5px;
  color: #4b5563;
  line-height: 1.55;
  margin: 0;
}
.rd-feature strong { color: #1a1916; }

.rd-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 14px;
}

/* Passage list */
.rd-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.rd-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all .18s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.rd-card:hover {
  border-color: #1a1916;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(15,23,42,.14);
}
.rd-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.rd-topic {
  background: #1a1916;
  color: #fff;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}
.rd-difficulty {
  background: #f3f4f6;
  color: #4b5563;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}
.rd-difficulty.d-easy { background: #dcfce7; color: #166534; }
.rd-difficulty.d-mid { background: #fef3c7; color: #92400e; }
.rd-difficulty.d-hard { background: #fee2e2; color: #991b1b; }
.rd-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
}
.rd-card-title-cn {
  font-size: 12.5px;
  color: #6b7280;
  margin-top: -4px;
}
.rd-card-intro {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.55;
  flex: 1;
}
.rd-card-meta {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  color: #6b7280;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}
.rd-card-meta strong { color: #1a1916; font-weight: 800; margin-right: 3px; }
.rd-card-done {
  position: absolute;
  top: 14px; right: 14px;
  background: #16a34a;
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

/* === Reading practice page === */
.read-page {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 18px 18px 60px;
}

.read-loading { padding: 80px; text-align: center; color: #999; }

/* Passage column */
.read-passage {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 28px 32px 32px;
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}
.read-passage-head {
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 2px solid #1a1916;
}
.read-passage-title {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 4px;
}
.read-passage-title-cn {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}
.read-passage-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  gap: 14px;
}

.read-passage-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 8px;
  padding: 10px 0 12px;
  margin: -2px 0 18px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e5e7eb;
}

.read-passage-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.read-passage-tab:hover {
  border-color: #1a1916;
  color: #1a1916;
}

.read-passage-tab.active {
  background: #1a1916;
  border-color: #1a1916;
  color: #ffffff;
}

.read-para {
  margin-bottom: 18px;
  position: relative;
  padding-left: 36px;
  scroll-margin-top: 64px;
}
.read-para-letter {
  position: absolute;
  left: 0; top: 1px;
  background: #1a1916;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  cursor: help;
  transition: transform .12s;
}
.read-para-letter:hover { transform: scale(1.1); }
.read-para-letter[data-active="true"] {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
}
.read-para-text {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 17.5px;
  line-height: 1.85;
  color: #1f2937;
}
.read-para-text .sent {
  position: relative;
  transition: background .25s;
  padding: 0 2px;
  border-radius: 3px;
}
.read-para-text .sent.is-topic {
  background: linear-gradient(180deg, transparent 70%, #fef3c7 70%);
}
.read-para-text .sent.is-answer {
  background: #dcfce7;
  outline: 2px solid #16a34a;
  outline-offset: 0;
  box-shadow: 0 0 0 4px rgba(22,163,74,0.15);
  scroll-margin-top: 120px;
}
.read-para-text .sent.is-current-answer {
  animation: pulseAns 1.4s ease-out 2;
}
@keyframes pulseAns {
  0% { box-shadow: 0 0 0 4px rgba(22,163,74,0.45); }
  50% { box-shadow: 0 0 0 12px rgba(22,163,74,0.1); }
  100% { box-shadow: 0 0 0 4px rgba(22,163,74,0.15); }
}
/* Paraphrase highlights */
.ph-hl {
  background: #fed7aa;
  color: #9a3412;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
}

/* Tooltip for para topic */
.read-tooltip {
  position: absolute;
  background: #111827;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  max-width: 280px;
  z-index: 50;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.read-tooltip::after {
  content: "";
  position: absolute;
  top: -6px; left: 16px;
  border: 6px solid transparent;
  border-bottom-color: #111827;
  border-top: 0;
}
.read-tooltip strong { color: #fbbf24; }

/* Questions column */
.read-questions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.read-toolbar {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 18px;
  z-index: 10;
}
.read-toolbar-stats {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: #4b5563;
}
.read-toolbar-stats strong { color: #1a1916; font-weight: 800; margin-right: 3px; font-size: 14px; }
.read-toolbar-actions { display: flex; gap: 8px; }
.rd-btn {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #4b5563;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .12s;
}
.rd-btn:hover { border-color: #1a1916; color: #1a1916; }
.rd-btn-primary {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  border: none;
  padding: 7px 18px;
  font-size: 13px;
}

/* Question card */
.rq {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  transition: all .15s;
}
.rq:hover { border-color: #cfc8bc; }
.rq.active {
  border-color: #1a1916;
  box-shadow: 0 6px 18px -6px rgba(26, 25, 22, 0.12);
}
.rq.answered { background: #fafafa; }
.rq.correct { border-color: #16a34a; background: #f0fdf4; }
.rq.wrong { border-color: #ef4444; background: #fef2f2; }

.rq-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.rq-num {
  background: #1a1916;
  color: #fff;
  width: 26px; height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}
.rq-type {
  font-size: 10.5px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.rq-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.rq-mini-btn {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  font-family: inherit;
  font-size: 11px;
  color: #4b5563;
  padding: 3px 8px;
  cursor: pointer;
  transition: all .12s;
}
.rq-mini-btn:hover { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.rq-mini-btn.btn-answer:hover { background: #dcfce7; border-color: #16a34a; color: #166534; }
.rq-mini-btn.btn-explain:hover { background: #ede9fe; border-color: #8b5cf6; color: #5b21b6; }

.rq-stem {
  font-size: 14px;
  line-height: 1.6;
  color: #111827;
  margin-bottom: 10px;
}
.rq-stem .ph-hl { background: #fed7aa; color: #9a3412; padding: 1px 4px; border-radius: 3px; font-weight: 600; }

.rq-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rq-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: all .12s;
}
.rq-opt:hover { background: #f3efe8; border-color: #cfc8bc; }
.rq-opt.selected { background: #efeae2; border-color: #1a1916; font-weight: 600; color: #1a1916; }
.rq-opt.opt-correct { background: #dcfce7; border-color: #16a34a; color: #166534; }
.rq-opt.opt-wrong { background: #fee2e2; border-color: #ef4444; }
.rq-opt-letter {
  font-weight: 800;
  font-size: 12px;
  width: 22px; height: 22px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rq-tfng {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rq-tfng-btn {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  color: #4b5563;
  padding: 6px 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: all .12s;
  letter-spacing: 0.5px;
}
.rq-tfng-btn:hover { border-color: #1a1916; color: #1a1916; }
.rq-tfng-btn.selected { background: #1a1916; color: #fff; border-color: #1a1916; }

.rq-input {
  width: 100%;
  border: none;
  border-bottom: 2px solid #1a1916;
  padding: 6px 4px;
  font-family: inherit;
  font-size: 14px;
  background: transparent;
  outline: none;
  color: #1a1916;
  font-weight: 600;
}
.rq-input:focus { background: #f3efe8; }

.rq-explanation {
  background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.65;
  color: #4c1d95;
}
.rq-explanation strong { color: #5b21b6; }
.rq-paraphrase-list {
  margin-top: 8px;
  padding: 0;
  list-style: none;
}
.rq-paraphrase-list li {
  background: #fff;
  border-radius: 5px;
  padding: 5px 10px;
  margin: 4px 0;
  font-size: 12px;
  color: #374151;
  border-left: 3px solid #f59e0b;
}
.rq-paraphrase-list li .pp-q { color: #1a1916; font-weight: 600; }
.rq-paraphrase-list li .pp-arrow { color: #f59e0b; margin: 0 6px; }
.rq-paraphrase-list li .pp-p { color: #9a3412; font-weight: 600; }

/* Summary group */
.rq-summary-block { display: flex; flex-direction: column; gap: 12px; }

/* Result floating button */
.rd-submit-bar {
  position: sticky;
  bottom: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rd-result-summary {
  background: #1a1916;
  color: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rd-result-summary .rs-score { font-size: 32px; font-weight: 800; }
.rd-result-summary .rs-band { font-size: 14px; opacity: 0.92; }

@media (max-width: 980px) {
  .read-page { grid-template-columns: 1fr; }
  .read-passage { position: static; max-height: none; }
  .read-toolbar { position: static; }
}

/* Difficulty filter */
.rd-diff-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.rd-diff-btn {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.rd-diff-btn:hover { border-color: #cfc8bc; color: #1a1916; }
.rd-diff-btn.active { background: #1a1916; color: #fff; border-color: #1a1916; }
.rd-diff-count {
  display: inline-block;
  margin-left: 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 0 7px;
  font-size: 11px;
}
.rd-diff-btn.active .rd-diff-count { background: rgba(255,255,255,0.25); }

/* === Apple-inspired glass treatment for Reading module === */
:root {
  --rd-glass-alpha: 0.44;
  --rd-glass-strong: 0.54;
  --rd-glass-extra: 0.60;
  --rd-glass-soft: 0.28;
  --rd-glass-stroke: rgba(255, 255, 255, 0.38);
  --rd-glass-shadow: 0 24px 70px rgba(9, 15, 29, 0.24);
  --rd-glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.58), inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  background: #05070b;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(5, 7, 11, 0.28);
  backdrop-filter: blur(6px) saturate(92%) brightness(0.62);
  -webkit-backdrop-filter: blur(6px) saturate(92%) brightness(0.62);
}

.app-header {
  background: rgba(255, 255, 255, 0.52);
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 14px 50px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
}
.brand-logo,
.pn-btn,
.user-chip {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.top-link { color: rgba(31, 41, 55, 0.72); }
.top-link.active { color: #0f172a; }
.top-link.active::after { background: rgba(37, 99, 235, 0.82); }

.reading-main {
  padding-top: 36px;
}
.reading-main .page-head {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rd-glass-stroke);
  border-radius: 26px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, var(--rd-glass-strong)), rgba(255, 255, 255, var(--rd-glass-soft))),
    rgba(255, 255, 255, var(--rd-glass-alpha));
  box-shadow: var(--rd-glass-shadow), var(--rd-glass-inner);
  backdrop-filter: blur(28px) saturate(185%) contrast(1.04);
  -webkit-backdrop-filter: blur(28px) saturate(185%) contrast(1.04);
}
.reading-main .page-head::before,
.rd-feature::before,
.rd-card::before,
.read-passage::before,
.rq::before,
.rd-synonym-entry::before,
.rd-glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.34), transparent 34%, rgba(255, 255, 255, 0.12)),
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.42), transparent 30%);
  mix-blend-mode: screen;
}
.page-title {
  color: #f8fafc;
  text-shadow: 0 2px 14px rgba(15, 23, 42, 0.35);
}
.page-sub {
  color: rgba(248, 250, 252, 0.86);
}
.page-head-stats {
  align-self: stretch;
}
.stat-pill {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, var(--rd-glass-extra)), rgba(255, 255, 255, var(--rd-glass-soft)));
  border-color: rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54), 0 16px 34px rgba(15, 23, 42, 0.13);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
}
.sp-num { color: #0f172a; }
.sp-label { color: rgba(15, 23, 42, 0.62); }

.rd-synonym-entry {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f8fafc;
  text-decoration: none;
  padding: 20px 26px;
  border-radius: 22px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.38), rgba(14, 165, 233, 0.18)),
    rgba(255, 255, 255, var(--rd-glass-alpha));
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.22), var(--rd-glass-inner);
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.rd-synonym-entry:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.28), var(--rd-glass-inner);
}
.rd-synonym-kicker {
  position: relative;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 7px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.rd-synonym-title {
  position: relative;
  font-size: 20px;
  font-weight: 850;
  margin-bottom: 4px;
  text-shadow: 0 2px 16px rgba(15, 23, 42, 0.26);
}
.rd-synonym-copy {
  position: relative;
  font-size: 13px;
  opacity: 0.92;
  line-height: 1.6;
}
.rd-synonym-action {
  position: relative;
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  margin-left: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.rd-section-title {
  color: #f8fafc;
  text-shadow: 0 2px 16px rgba(15, 23, 42, 0.35);
}
.rd-feature,
.rd-card,
.read-passage,
.read-toolbar,
.rq,
.rd-submit-bar {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, var(--rd-glass-strong)), rgba(255, 255, 255, var(--rd-glass-soft))),
    rgba(255, 255, 255, var(--rd-glass-alpha));
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18), var(--rd-glass-inner);
  backdrop-filter: blur(26px) saturate(180%) contrast(1.03);
  -webkit-backdrop-filter: blur(26px) saturate(180%) contrast(1.03);
}
.rd-feature {
  border-radius: 20px;
}
.rd-feature:hover,
.rd-card:hover {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.26), var(--rd-glass-inner);
}
.rd-card {
  border-radius: 22px;
  padding: 20px;
}
.rd-feature h3,
.rd-card-title,
.rq-stem,
.read-passage-title { color: #0f172a; }
.rd-feature p,
.rd-card-intro,
.rd-card-title-cn,
.read-passage-title-cn,
.read-passage-meta,
.read-toolbar-stats,
.rq-type { color: rgba(15, 23, 42, 0.66); }
.rd-topic,
.rq-num,
.rq-tfng-btn.selected {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(14, 165, 233, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.rd-difficulty,
.rq-type,
.rq-mini-btn,
.rq-opt,
.rq-tfng-btn,
.rd-btn {
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}
.rd-difficulty.d-easy { background: rgba(220, 252, 231, 0.68); }
.rd-difficulty.d-mid { background: rgba(254, 243, 199, 0.72); }
.rd-difficulty.d-hard { background: rgba(254, 226, 226, 0.72); }
.rd-card-meta {
  border-top-color: rgba(255, 255, 255, 0.46);
  color: rgba(15, 23, 42, 0.62);
}
.rd-card-done {
  background: rgba(22, 163, 74, 0.86);
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.26);
}

.rd-diff-btn {
  background: rgba(255, 255, 255, var(--rd-glass-alpha));
  border-color: rgba(255, 255, 255, 0.42);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 34px rgba(15, 23, 42, 0.13);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
}
.rd-diff-btn:hover {
  border-color: rgba(255, 255, 255, 0.68);
  color: #ffffff;
  transform: translateY(-1px);
}
.rd-diff-btn.active {
  background: rgba(37, 99, 235, 0.72);
  border-color: rgba(255, 255, 255, 0.52);
  color: #fff;
}

.read-page {
  padding-top: 28px;
}
.read-passage {
  border-radius: 24px;
}
.read-passage-head {
  border-bottom-color: rgba(37, 99, 235, 0.36);
}
.read-para-text {
  color: #172033;
}
.read-para-letter {
  background: rgba(37, 99, 235, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 8px 24px rgba(37, 99, 235, 0.18);
}
.read-toolbar {
  border-radius: 18px;
}
.rd-btn-primary {
  background: rgba(22, 163, 74, 0.86);
  color: #fff;
}
.rq {
  border-radius: 18px;
}
.rq.active {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.2), var(--rd-glass-inner);
}
.rq.answered { background: rgba(255, 255, 255, var(--rd-glass-alpha)); }
.rq.correct { border-color: rgba(22, 163, 74, 0.6); background: rgba(240, 253, 244, 0.7); }
.rq.wrong { border-color: rgba(239, 68, 68, 0.62); background: rgba(254, 242, 242, 0.72); }
.rq-input:focus {
  background: rgba(239, 246, 255, 0.72);
}
.rq-explanation,
.rd-result-summary {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.26), rgba(14, 165, 233, 0.16)),
    rgba(255, 255, 255, var(--rd-glass-alpha));
  box-shadow: var(--rd-glass-inner), 0 18px 42px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
}
.rq-explanation,
.rq-explanation strong {
  color: #172033;
}
.rq-paraphrase-list li {
  background: rgba(255, 255, 255, 0.56);
  border-left-color: rgba(37, 99, 235, 0.72);
}
.rd-submit-bar {
  border-radius: 18px;
}

.rd-glass-control {
  position: fixed;
  right: 22px;
  top: 94px;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.rd-glass-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  background: rgba(255, 255, 255, var(--rd-glass-alpha));
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  box-shadow: var(--rd-glass-shadow), var(--rd-glass-inner);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  transition: transform .16s ease, background .16s ease;
}
.rd-glass-toggle:hover {
  transform: translateY(-1px) scale(1.03);
}
.rd-glass-panel {
  position: relative;
  overflow: hidden;
  width: 210px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  padding: 14px 16px 13px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, var(--rd-glass-strong)), rgba(255, 255, 255, var(--rd-glass-soft))),
    rgba(255, 255, 255, var(--rd-glass-alpha));
  box-shadow: var(--rd-glass-shadow), var(--rd-glass-inner);
  backdrop-filter: blur(26px) saturate(185%);
  -webkit-backdrop-filter: blur(26px) saturate(185%);
  transition: opacity .18s ease, transform .18s ease, width .18s ease, padding .18s ease;
}
.rd-glass-control.is-collapsed .rd-glass-panel {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
}
.rd-glass-panel-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}
.rd-glass-value {
  font-size: 12px;
  color: #1a1916;
}
.rd-glass-range {
  position: relative;
  width: 100%;
  accent-color: #1a1916;
}
.rd-glass-scale {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: rgba(15, 23, 42, 0.58);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .reading-main {
    padding: 22px 16px 60px;
  }
  .reading-main .page-head {
    padding: 22px;
    border-radius: 22px;
  }
  .page-head-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-pill {
    justify-content: center;
  }
  .rd-synonym-entry {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .rd-synonym-action {
    margin-left: 0;
  }
  .rd-list {
    grid-template-columns: 1fr;
  }
  .rd-glass-control {
    top: auto;
    right: 14px;
    bottom: 18px;
  }
  .rd-glass-panel {
    width: min(210px, calc(100vw - 86px));
  }
}

@media (prefers-reduced-transparency: reduce) {
  .app-header,
  .reading-main .page-head,
  .stat-pill,
  .rd-synonym-entry,
  .rd-feature,
  .rd-card,
  .read-passage,
  .read-toolbar,
  .rq,
  .rd-submit-bar,
  .rd-glass-toggle,
  .rd-glass-panel {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .page-title,
  .page-sub,
  .rd-section-title,
  .rd-diff-btn {
    color: #0f172a;
    text-shadow: none;
  }
}

/* === Dark glass refinement: uniform background, darker panes, white reading text === */
body {
  background: #04060a !important;
}
body::before {
  background: #04060a !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html,
body,
.page-main,
.reading-main,
.read-page {
  background-color: #04060a !important;
}

.app-header {
  background: rgba(67, 72, 80, 0.54) !important;
  border-bottom-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}
.brand-name,
.top-link,
.top-link.active,
.user-name {
  color: #ffffff !important;
}
.brand-logo,
.pn-btn,
.user-chip {
  background: rgba(122, 128, 137, 0.42) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

.reading-main .page-head,
.rd-synonym-entry,
.rd-feature,
.rd-card,
.read-passage,
.read-toolbar,
.rq,
.rd-submit-bar,
.rd-glass-toggle,
.rd-glass-panel {
  border-color: rgba(255, 255, 255, 0.2) !important;
  background:
    linear-gradient(135deg, rgba(116, 122, 132, calc(var(--rd-glass-alpha) + 0.08)), rgba(52, 58, 68, calc(var(--rd-glass-alpha) - 0.08))),
    rgba(58, 64, 74, var(--rd-glass-alpha)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 24px 70px rgba(0, 0, 0, 0.32) !important;
  backdrop-filter: blur(28px) saturate(118%) contrast(1.03) !important;
  -webkit-backdrop-filter: blur(28px) saturate(118%) contrast(1.03) !important;
}

.reading-main .page-head::before,
.rd-feature::before,
.rd-card::before,
.read-passage::before,
.rq::before,
.rd-synonym-entry::before,
.rd-glass-panel::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 34%, rgba(255, 255, 255, 0.07)),
    radial-gradient(circle at 24% 0%, rgba(255, 255, 255, 0.18), transparent 30%) !important;
  mix-blend-mode: screen;
}

.page-title,
.page-sub,
.rd-section-title,
.rd-feature h3,
.rd-feature p,
.rd-feature strong,
.rd-card-title,
.rd-card-title-cn,
.rd-card-intro,
.rd-card-meta,
.rd-card-meta strong,
.read-passage-title,
.read-passage-title-cn,
.read-passage-meta,
.read-toolbar-stats,
.read-toolbar-stats strong,
.read-para-text,
.rq-stem,
.rq-type,
.rq-opt,
.rq-tfng-btn,
.rq-mini-btn,
.rd-btn,
.rd-glass-panel-head,
.rd-glass-scale,
.rd-glass-value {
  color: #ffffff !important;
}
.page-sub,
.rd-feature p,
.rd-card-title-cn,
.rd-card-intro,
.rd-card-meta,
.read-passage-title-cn,
.read-passage-meta,
.read-toolbar-stats,
.rq-type,
.rd-glass-scale {
  opacity: 0.84;
}

.stat-pill,
.rd-difficulty,
.rq-type,
.rq-mini-btn,
.rq-opt,
.rq-tfng-btn,
.rd-btn,
.rd-synonym-action {
  background: rgba(255, 255, 255, 0.13) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
.sp-num,
.sp-label {
  color: #ffffff !important;
}

.rd-diff-btn {
  background: rgba(90, 96, 108, 0.42) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}
.rd-diff-btn.active,
.rq-tfng-btn.selected,
.rd-topic,
.rq-num {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
  color: #ffffff !important;
}

.rq-opt:hover,
.rq-opt.selected,
.rq-input:focus {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
}
.rq-input {
  color: #ffffff !important;
  border-bottom-color: rgba(255, 255, 255, 0.55) !important;
}

.rq-explanation,
.rq-paraphrase-list li,
.rd-result-summary {
  background: rgba(66, 72, 82, 0.62) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
.rq-explanation strong,
.rq-paraphrase-list li,
.rq-paraphrase-list li .pp-q,
.rq-paraphrase-list li .pp-arrow,
.rq-paraphrase-list li .pp-p {
  color: #ffffff !important;
}

/* === Computer-delivered reading layout: flat dark glass, no gradients === */
.reading-main .page-head,
.rd-synonym-entry,
.rd-feature,
.rd-card,
.read-passage,
.read-toolbar,
.rq,
.rd-submit-bar,
.rd-glass-toggle,
.rd-glass-panel {
  background: rgba(54, 60, 70, var(--rd-glass-alpha)) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 22px 62px rgba(0, 0, 0, 0.34) !important;
}

.reading-main .page-head::before,
.rd-feature::before,
.rd-card::before,
.read-passage::before,
.rq::before,
.rd-synonym-entry::before,
.rd-glass-panel::before {
  background: transparent !important;
}

.read-page {
  width: 100%;
  max-width: none;
  height: calc(100vh - 64px);
  min-height: 680px;
  margin: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(410px, 0.82fr);
  gap: 14px;
  overflow: hidden;
  background: #04060a !important;
}

.read-passage,
.read-questions {
  height: calc(100vh - 92px);
  max-height: none;
  min-height: 0;
  overflow: auto;
}

.read-passage {
  position: relative;
  top: auto;
  padding: 22px 24px;
}

.read-questions {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.read-toolbar {
  position: relative;
  top: auto;
  z-index: 3;
  flex-wrap: wrap;
  gap: 10px;
}

.read-toolbar-stats {
  flex-wrap: wrap;
}

.read-toolbar-actions {
  flex-wrap: wrap;
}

#questionPageMount {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
  position: relative;
  z-index: 1;
}

.read-question-page-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  z-index: 5;
}

.read-passage-tabs {
  top: 0;
  padding: 8px 0 10px;
  margin: 0 0 16px;
  background: rgba(54, 60, 70, 0.86) !important;
  border-bottom-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.read-passage-tab {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.82) !important;
}

.read-passage-tab:hover,
.read-passage-tab.active {
  background: rgba(255, 255, 255, 0.24) !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
  color: #ffffff !important;
}

.read-qpage-btn {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.read-qpage-btn span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
}

.read-qpage-btn.active {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.38);
}

.rd-glass-control {
  top: auto !important;
  right: 18px !important;
  bottom: 18px !important;
}

.read-para-letter {
  cursor: default !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.read-para-letter:hover {
  transform: none !important;
}

.read-para-text .sent,
.read-para-text .sent.is-topic,
.read-para-text .sent.is-answer,
.read-para-text .sent.is-current-answer {
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  animation: none !important;
}

.rq-actions,
.rq-mini-btn,
.read-tooltip {
  display: none !important;
}

.read-para-text,
.read-para-text .sent,
.rq-stem,
.rq-opt,
.rq-tfng-btn,
.rq-input,
.rq-explanation,
.rd-result-summary {
  color: #0b0f14 !important;
}

.stat-pill,
.rd-difficulty,
.rq-type,
.rq-mini-btn,
.rq-opt,
.rq-tfng-btn,
.rd-btn,
.rd-synonym-action,
.rd-diff-btn,
.rq-explanation,
.rq-paraphrase-list li,
.rd-result-summary,
.read-passage-tab,
.read-qpage-btn {
  background-image: none !important;
}

/* Reading content: black text on light glass for maximum readability. */
.read-passage,
.rq,
.rq-explanation,
.rd-result-summary {
  background: rgba(245, 247, 250, 0.82) !important;
  border-color: rgba(255, 255, 255, 0.56) !important;
  color: #0b0f14 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 22px 62px rgba(0, 0, 0, 0.24) !important;
}

.read-para-text,
.read-para-text .sent,
.rq-stem,
.rq-opt,
.rq-tfng-btn,
.rq-input,
.rq-explanation,
.rq-explanation strong,
.rq-paraphrase-list li,
.rq-paraphrase-list li .pp-q,
.rq-paraphrase-list li .pp-arrow,
.rq-paraphrase-list li .pp-p,
.rd-result-summary,
.read-question-range,
.read-toolbar-stats,
.read-toolbar-stats strong {
  color: #0b0f14 !important;
}

.rq-type,
.read-para-letter,
.rq-opt,
.rq-tfng-btn,
.rq-input {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  color: #0b0f14 !important;
}

.rq-opt:hover,
.rq-opt.selected,
.rq-tfng-btn:hover,
.rq-tfng-btn.selected,
.rq-input:focus {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(15, 23, 42, 0.32) !important;
  color: #0b0f14 !important;
}

.rq-input::placeholder {
  color: rgba(15, 23, 42, 0.48) !important;
}

.read-title,
.read-sub,
.read-passage-title,
.read-passage-title-cn,
.read-passage-meta,
.read-passage-meta span,
.rd-meta,
.rd-meta span,
.rd-difficulty,
.read-toolbar,
.read-toolbar *,
.read-question-range,
.read-passage-tab,
.read-qpage-btn,
.read-qpage-btn span,
.rd-btn,
.rd-submit-bar,
.rd-submit-bar *,
.rq-num {
  color: #0b0f14 !important;
}

.read-passage-tabs,
.read-toolbar,
.rd-submit-bar {
  background: rgba(245, 247, 250, 0.82) !important;
  border-color: rgba(255, 255, 255, 0.56) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 18px 48px rgba(0, 0, 0, 0.2) !important;
}

.read-passage-tab,
.read-passage-tab:hover,
.read-passage-tab.active,
.read-qpage-btn,
.read-qpage-btn.active,
.rd-btn {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  color: #0b0f14 !important;
}

@media (max-width: 980px) {
  .read-page {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 12px;
  }

  .read-passage,
  .read-questions,
  #questionPageMount {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .read-question-page-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* Paper palette — matches listening */
body:has(.reading-main),
body:has(.read-page),
body:has(.rmb-main) {
  background: #f4f1ec !important;
  color: #1a1916;
}
html:has(.reading-main),
html:has(.read-page),
html:has(.rmb-main),
body:has(.reading-main),
body:has(.read-page),
body:has(.rmb-main),
body:has(.reading-main)::before,
body:has(.read-page)::before,
body:has(.rmb-main)::before,
.page-main.reading-main,
.page-main.rmb-main,
.read-page {
  background: #f4f1ec !important;
  background-color: #f4f1ec !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body:has(.reading-main)::before,
body:has(.read-page)::before,
body:has(.rmb-main)::before {
  display: none !important;
  content: none !important;
}

body:has(.reading-main) .app-header,
body:has(.read-page) .app-header,
body:has(.rmb-main) .app-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body:has(.reading-main) .brand-name,
body:has(.read-page) .brand-name,
body:has(.rmb-main) .brand-name,
body:has(.reading-main) .top-link,
body:has(.read-page) .top-link,
body:has(.rmb-main) .top-link,
body:has(.reading-main) .user-name,
body:has(.read-page) .user-name,
body:has(.rmb-main) .user-name {
  color: #111827 !important;
  opacity: 1;
}
body:has(.reading-main) .top-link.active,
body:has(.read-page) .top-link.active,
body:has(.rmb-main) .top-link.active {
  color: #2c6cf6 !important;
}
body:has(.reading-main) .brand-logo,
body:has(.read-page) .brand-logo,
body:has(.rmb-main) .brand-logo,
body:has(.reading-main) .pn-btn,
body:has(.read-page) .pn-btn,
body:has(.rmb-main) .pn-btn,
body:has(.reading-main) .user-chip,
body:has(.read-page) .user-chip,
body:has(.rmb-main) .user-chip {
  background: #f3f4f6 !important;
  border-color: #e5e7eb !important;
  color: #111827 !important;
}

.rd-glass-control { display: none !important; }

.reading-main .page-head,
.rd-synonym-entry,
.rd-feature,
.rd-card,
.read-passage,
.read-toolbar,
.rq,
.rd-submit-bar,
.rd-glass-toggle,
.rd-glass-panel,
.rd-result-summary,
.read-passage-tabs,
.review-panel {
  background: #fffcf7 !important;
  background-image: none !important;
  border-color: #e4dfd6 !important;
  box-shadow: 0 1px 2px rgba(26, 25, 22, 0.04), 0 10px 28px rgba(26, 25, 22, 0.05) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: #1a1916 !important;
}
.reading-main .page-head::before,
.rd-feature::before,
.rd-card::before,
.read-passage::before,
.rq::before,
.rd-synonym-entry::before,
.rd-glass-panel::before {
  display: none !important;
  background: none !important;
}

.page-title,
.rd-section-title,
.rd-feature h3,
.rd-feature strong,
.rd-card-title,
.read-passage-title,
.rq-stem,
.read-para-text,
.read-para-text .sent,
.rq-opt,
.rq-tfng-btn,
.rq-input,
.rd-btn,
.sp-num,
.rd-card-meta strong,
.read-toolbar-stats strong,
.read-question-range,
.rq-num,
.rd-submit-bar,
.rd-submit-bar * {
  color: #1a1916 !important;
  opacity: 1;
}
.page-sub,
.rd-feature p,
.rd-card-title-cn,
.rd-card-intro,
.rd-card-meta,
.read-passage-title-cn,
.read-passage-meta,
.read-toolbar-stats,
.rq-type,
.sp-label {
  color: #6f6b64 !important;
  opacity: 1;
}

.stat-pill,
.rd-difficulty,
.rq-type,
.rq-mini-btn,
.rq-opt,
.rq-tfng-btn,
.rd-btn,
.rd-synonym-action,
.rd-diff-btn,
.read-passage-tab,
.read-qpage-btn {
  background: #fffcf7 !important;
  background-image: none !important;
  border-color: #e4dfd6 !important;
  color: #2c2a26 !important;
  box-shadow: none !important;
}
.rd-diff-btn.active,
.read-passage-tab.active,
.read-passage-tab:hover,
.read-qpage-btn.active,
.rq-tfng-btn.selected,
.rq-opt.selected,
.rd-topic,
.rq-num {
  background: #1a1916 !important;
  border-color: #1a1916 !important;
  color: #fffcf7 !important;
}
.rq-opt:hover,
.rq-tfng-btn:hover,
.rd-btn:hover,
.rd-diff-btn:hover,
.read-passage-tab:hover,
.read-qpage-btn:hover {
  background: #f3efe8 !important;
  border-color: #cfc8bc !important;
  color: #1a1916 !important;
}
.rq-opt.selected,
.rq-tfng-btn.selected,
.rd-diff-btn.active,
.read-passage-tab.active,
.read-qpage-btn.active {
  background: #1a1916 !important;
  border-color: #1a1916 !important;
  color: #fffcf7 !important;
}
.rq-input {
  color: #1a1916 !important;
  border-bottom-color: #1a1916 !important;
  background: transparent !important;
}
.rq-input:focus {
  background: #f3efe8 !important;
}
.rq-input::placeholder {
  color: #9a958c !important;
}

.read-para-letter {
  background: #1a1916 !important;
  border: 1px solid #1a1916 !important;
  color: #fffcf7 !important;
  box-shadow: none !important;
  cursor: help !important;
}
.read-para-letter[data-active="true"] {
  background: #166534 !important;
  border-color: #166534 !important;
}

.read-para-text .sent.is-topic {
  background: linear-gradient(180deg, transparent 70%, #fef3c7 70%) !important;
  outline: none !important;
  box-shadow: none !important;
}
.read-para-text .sent.is-answer {
  background: #dcfce7 !important;
  outline: 2px solid #16a34a !important;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15) !important;
  animation: none !important;
}
.read-para-text .sent.is-current-answer {
  background: #dcfce7 !important;
  outline: 2px solid #16a34a !important;
  animation: pulseAns 1.4s ease-out 2 !important;
}

.rq-explanation,
.rq-paraphrase-list li,
.rd-result-summary {
  background: #f3efe8 !important;
  border-color: #e4dfd6 !important;
  color: #2c2a26 !important;
}
.rq-explanation strong,
.rq-paraphrase-list li,
.rq-paraphrase-list li .pp-q,
.rq-paraphrase-list li .pp-arrow,
.rq-paraphrase-list li .pp-p,
.rd-result-summary {
  color: #1a1916 !important;
}
.rq-paraphrase-list li .pp-q { color: #1a1916 !important; }
.rq-paraphrase-list li .pp-arrow { color: #b45309 !important; }
.rq-paraphrase-list li .pp-p { color: #9a3412 !important; }

.rd-result-summary .rs-score,
.rd-result-summary .rs-band {
  color: #1a1916 !important;
  opacity: 1;
}

.rd-btn-primary {
  background: #166534 !important;
  color: #fffcf7 !important;
  border-color: #166534 !important;
}

.rq.correct { border-color: #16a34a !important; background: #f0fdf4 !important; }
.rq.wrong { border-color: #ef4444 !important; background: #fef2f2 !important; }
.rq-opt.opt-correct { background: #dcfce7 !important; border-color: #16a34a !important; color: #166534 !important; }
.rq-opt.opt-wrong { background: #fee2e2 !important; border-color: #ef4444 !important; color: #991b1b !important; }

.read-qpage-btn span {
  color: #6f6b64 !important;
}
.read-qpage-btn.active span {
  color: #fffcf7 !important;
}

.read-passage-head {
  border-bottom: 1px solid #e4dfd6 !important;
}
.rq.active {
  border-color: #1a1916 !important;
  box-shadow: none !important;
}

.rd-translate-feature {
  display: grid;
  min-height: 224px;
  grid-template-columns:
    minmax(340px, 1.25fr)
    minmax(310px, 0.88fr);
  align-items: center;
  gap: clamp(20px, 2.2vw, 34px);
  margin-bottom: 24px;
  padding: 28px clamp(28px, 3vw, 40px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background:
    linear-gradient(136deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.04) 44%, rgba(226, 234, 251, 0.12) 100%),
    rgba(255, 255, 255, 0.46);
  box-shadow:
    0 22px 60px rgba(67, 85, 125, 0.13),
    0 4px 14px rgba(67, 85, 125, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(255, 255, 255, 0.24);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rd-translate-feature:active {
  transform: scale(0.998);
}
.rd-tf-copy {
  min-width: 0;
}
.rd-tf-kicker {
  display: block;
  width: fit-content;
  margin-bottom: 6px;
  color: #0878ed;
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.01em;
}
.rd-translate-feature h2 {
  color: #1d1d1f;
  font-size: clamp(36px, 3vw, 46px);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 0;
}
.rd-tf-copy p {
  max-width: 33rem;
  margin-top: 8px;
  color: #5d616a;
  font-size: 15px;
  line-height: 1.55;
}
.rd-tf-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 13px;
  background: #0878ed;
  color: #f7fbff;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  box-shadow:
    0 8px 18px rgba(0, 113, 227, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition:
    background-color 180ms ease,
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rd-tf-action span {
  font-size: 18px;
  line-height: 0.8;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.rd-tf-visual {
  display: flex;
  min-width: 0;
  min-height: 132px;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12)),
    rgba(255, 255, 255, 0.16);
  box-shadow:
    0 12px 30px rgba(67, 85, 125, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    inset 0 -1px 0 rgba(103, 119, 151, 0.08);
}
.rd-tf-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}
.rd-tf-heading span,
.rd-tf-heading strong {
  color: #1d1d1f;
  font-size: 16px;
  font-weight: 670;
  letter-spacing: -0.015em;
}
.rd-tf-heading strong {
  color: #0878ed;
}
.rd-tf-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.rd-tf-flow span {
  min-width: 0;
  padding: 10px 6px;
  border: 1px solid rgba(98, 111, 140, 0.16);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.34);
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 620;
  text-align: center;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 4px 14px rgba(67, 85, 125, 0.04);
}
.rd-tf-flow b {
  color: #767b86;
  font-size: 14px;
  font-weight: 560;
}

@media (hover: hover) and (pointer: fine) {
  .rd-translate-feature:hover {
    border-color: rgba(255, 255, 255, 0.92);
    box-shadow:
      0 26px 64px rgba(67, 85, 125, 0.15),
      0 5px 16px rgba(67, 85, 125, 0.09),
      inset 0 1px 0 rgba(255, 255, 255, 0.96),
      inset 0 -1px 0 rgba(255, 255, 255, 0.28);
  }
  .rd-translate-feature:hover .rd-tf-action {
    background: #006edb;
  }
  .rd-translate-feature:hover .rd-tf-action span {
    transform: translateX(2px);
  }
}

@media (max-width: 1100px) {
  .rd-translate-feature {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px 24px;
  }
  .rd-tf-visual {
    min-height: 116px;
  }
}

@media (max-width: 767px) {
  .rd-translate-feature {
    padding: 22px 18px;
    border-radius: 22px;
  }
  .rd-translate-feature h2 {
    font-size: 30px;
  }
  .rd-tf-copy p {
    font-size: 14px;
  }
  .rd-tf-visual {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rd-translate-feature,
  .rd-tf-action,
  .rd-tf-action span {
    transition-duration: 0.01ms;
  }
  .rd-translate-feature:hover,
  .rd-translate-feature:active,
  .rd-translate-feature:hover .rd-tf-action span {
    transform: none;
  }
}
