:root {
  --ink: #17231f;
  --ink-2: #2b3a35;
  --muted: #6c7a75;
  --muted-2: #96a29d;
  --line: #e4e9e6;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #fbfcfa;
  --brand: #176b57;
  --brand-2: #2a9d7b;
  --brand-soft: #e7f5ef;
  --accent: #f47b55;
  --accent-soft: #fff0ea;
  --gold: #d99a2b;
  --chinese: #3b6ef6;
  --math: #e18a18;
  --english: #129b72;
  --danger: #d9534f;
  --success: #1d9a6c;
  --shadow-sm: 0 4px 14px rgba(23, 35, 31, 0.05);
  --shadow: 0 18px 45px rgba(23, 35, 31, 0.08);
  --shadow-lg: 0 28px 70px rgba(23, 35, 31, 0.12);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --sidebar: 248px;
  --font: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(42, 157, 123, 0.09), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(244, 123, 85, 0.07), transparent 26%),
    var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------------- Sidebar ---------------- */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px 18px 20px;
  color: #e7f2ed;
  background:
    radial-gradient(circle at 10% 0%, rgba(65, 196, 151, 0.18), transparent 32%),
    linear-gradient(180deg, #142a23 0%, #10221d 60%, #0d1b17 100%);
  overflow: hidden;
}

.sidebar::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -110px;
  bottom: 60px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.025), 0 0 0 56px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 6px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #10221d;
  background: linear-gradient(135deg, #b8f0d9, #53caa2);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -1px;
  box-shadow: 0 8px 22px rgba(56, 196, 150, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 17px;
  letter-spacing: 0.4px;
}

.brand-text span {
  display: block;
  margin-top: 2px;
  color: #8fb5a7;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.region-pill {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px;
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid rgba(181, 232, 213, 0.16);
  background: rgba(255, 255, 255, 0.055);
  color: #c8e6da;
  font-size: 11px;
  line-height: 1.45;
}

.region-pill .dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #64d6ad;
  box-shadow: 0 0 0 4px rgba(100, 214, 173, 0.12);
}

.side-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  scrollbar-width: none;
}

.side-nav::-webkit-scrollbar {
  display: none;
}

.nav-label {
  padding: 10px 12px 6px;
  color: #63897c;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 12px;
  color: #a9c6bb;
  font-size: 13px;
  font-weight: 550;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item:hover {
  color: #eafff7;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.nav-item.active {
  color: #0f211b;
  background: linear-gradient(135deg, #d9f7e9, #a9e8d0);
  box-shadow: 0 8px 20px rgba(53, 188, 144, 0.18);
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.075);
  color: #c8e6da;
  font-size: 11px;
  font-weight: 800;
  flex: none;
}

.nav-item.active .nav-icon {
  background: rgba(16, 34, 29, 0.1);
  color: #0f211b;
}

.nav-item small {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #659b88;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 3px 6px;
}

.nav-item.active small {
  color: #176b57;
  background: rgba(23, 107, 87, 0.1);
}

.sidebar-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 13px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer strong {
  display: block;
  color: #d9f7e9;
  font-size: 11px;
  margin-bottom: 5px;
}

.sidebar-footer p {
  color: #7fa395;
  font-size: 10px;
  line-height: 1.65;
}

/* ---------------- Main / topbar ---------------- */

.main {
  min-width: 0;
  padding: 0 28px 52px;
}

.topbar {
  max-width: 1260px;
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(23, 35, 31, 0.07);
}

.page-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.page-title {
  font-size: 22px;
  letter-spacing: -0.4px;
  font-weight: 800;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.region-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #dce8e2;
  background: rgba(255, 255, 255, 0.72);
  color: #527065;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.region-badge b {
  color: var(--brand);
}

.network-badge .net-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: #d99a2b;
  box-shadow: 0 0 0 3px rgba(217, 154, 43, 0.12);
}

.network-badge.online {
  color: #176b57;
  border-color: #cfe9dd;
  background: #f0faf5;
}

.network-badge.online .net-dot {
  background: #1d9a6c;
  box-shadow: 0 0 0 3px rgba(29, 154, 108, 0.12);
}

.network-badge.reconnecting .net-dot {
  background: #e18a18;
  animation: pulse-dot 1.2s ease infinite;
}

@keyframes pulse-dot {
  50% {
    opacity: 0.35;
  }
}

.grade-select-wrap {
  position: relative;
}

.grade-select {
  appearance: none;
  border: 1px solid #dce8e2;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 32px 8px 13px;
  font-size: 11px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.grade-select-wrap::after {
  content: "âŒ„";
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-54%);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}

.page {
  max-width: 1260px;
  margin: 0 auto;
  padding-top: 24px;
  animation: page-in 0.35s ease both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------- Generic ---------------- */

.card {
  background: var(--surface);
  border: 1px solid rgba(23, 35, 31, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 14px;
}

.section-head h2 {
  font-size: 17px;
  letter-spacing: -0.2px;
  font-weight: 800;
}

.section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.section-link {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
  padding: 6px 0;
}

.section-link:hover {
  color: var(--brand-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #1c7c63, #2aa37f);
  box-shadow: 0 8px 20px rgba(27, 124, 99, 0.2);
}

.btn-soft {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #d7efe5;
}

.btn-ghost {
  color: var(--ink-2);
  background: #fff;
  border-color: var(--line);
}

.btn-accent {
  color: #fff;
  background: linear-gradient(135deg, #f47b55, #ef9a55);
  box-shadow: 0 8px 20px rgba(244, 123, 85, 0.2);
}

.btn-sm {
  padding: 8px 11px;
  font-size: 10.5px;
  border-radius: 9px;
}

.btn-block {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f2;
  color: #60736b;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
}

.badge.green {
  background: var(--brand-soft);
  color: var(--brand);
}

.badge.orange {
  background: var(--accent-soft);
  color: #c25b37;
}

.badge.blue {
  background: #edf2ff;
  color: #3b6ef6;
}

.badge.gold {
  background: #fff6e4;
  color: #a56a11;
}

.badge.red {
  background: #fff0ee;
  color: #b8473f;
}

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

.small {
  font-size: 10.5px;
}

/* ---------------- Dashboard hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr);
  gap: 24px;
  padding: 28px 30px;
  border-radius: var(--radius-lg);
  color: #edfaf4;
  background:
    radial-gradient(circle at 86% 16%, rgba(109, 228, 180, 0.24), transparent 28%),
    radial-gradient(circle at 20% 110%, rgba(244, 123, 85, 0.18), transparent 32%),
    linear-gradient(128deg, #14362b 0%, #0f2921 54%, #173a30 100%);
  box-shadow: var(--shadow-lg);
}

.hero::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  right: -95px;
  top: -150px;
  border-radius: 50%;
  border: 1px solid rgba(194, 246, 224, 0.14);
  box-shadow: 0 0 0 34px rgba(194, 246, 224, 0.04), 0 0 0 68px rgba(194, 246, 224, 0.028);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  color: #a8d8c5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-kicker .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.14);
}

.hero h1 {
  max-width: 580px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 850;
}

.hero h1 em {
  color: #8ee8c2;
  font-style: normal;
}

.hero-sub {
  max-width: 560px;
  margin-top: 12px;
  color: #a9c9bc;
  font-size: 12px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 19px;
}

.hero-actions .btn-primary {
  color: #0f211b;
  background: linear-gradient(135deg, #c8f6e4, #73d8b2);
  box-shadow: 0 10px 24px rgba(87, 215, 167, 0.2);
}

.hero-actions .btn-ghost {
  color: #d9f7e9;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.hero-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.hero-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
}

.hero-stat span {
  color: #9fc6b7;
  font-size: 10px;
}

.hero-stat strong {
  color: #f0fff9;
  font-size: 17px;
  letter-spacing: -0.4px;
}

.hero-stat strong small {
  color: #8ab7a5;
  font-size: 9px;
  font-weight: 500;
  margin-left: 2px;
}

/* ---------------- Subject cards ---------------- */

.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.subject-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(23, 35, 31, 0.06);
  background:
    radial-gradient(circle at 100% 0%, var(--subject-soft), transparent 48%),
    #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.subject-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.subject-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subject-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--subject);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -0.5px;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--subject) 28%, transparent);
}

.subject-progress-ring {
  --p: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--subject) calc(var(--p) * 1%), #eef2ef 0);
  position: relative;
}

.subject-progress-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #fff;
}

.subject-progress-ring b {
  position: relative;
  z-index: 1;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 800;
}

.subject-card h3 {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.3px;
}

.subject-card .subject-focus {
  margin-top: 3px;
  color: var(--subject);
  font-size: 10px;
  font-weight: 750;
}

.subject-card .subject-desc {
  margin-top: 8px;
  min-height: 31px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.subject-card .subject-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.subject-card .subject-foot span {
  color: var(--muted-2);
  font-size: 9.5px;
}

.subject-arrow {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--subject);
  background: var(--subject-soft);
  font-size: 13px;
  font-weight: 800;
}

/* ---------------- Dashboard lower ---------------- */

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}

.tasks {
  display: flex;
  flex-direction: column;
}

.task {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 2px;
  border-bottom: 1px solid #edf1ee;
}

.task:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.task-check {
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 8px;
  border: 1.5px solid #dbe4df;
  background: #fff;
  color: transparent;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  transition: all 0.16s ease;
}

.task-check:hover {
  border-color: var(--brand-2);
}

.task.done .task-check {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.task.done .task-title {
  color: var(--muted-2);
  text-decoration: line-through;
}

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

.task-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.task-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.task-tag {
  flex: none;
}

.update-feed {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.feed-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1ee;
}

.feed-item:last-child {
  border-bottom: 0;
}

.feed-dot {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f1f6f3;
  color: var(--brand);
  font-size: 9px;
  font-weight: 800;
}

.feed-item strong {
  display: block;
  font-size: 11px;
  line-height: 1.45;
}

.feed-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

/* ---------------- Unit list ---------------- */

.unit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.unit-card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(23, 35, 31, 0.06);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.unit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.unit-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.unit-overline {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.unit-card h3 {
  margin-top: 5px;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.3px;
}

.unit-card .unit-desc {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.unit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.unit-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
}

.unit-foot span {
  color: var(--muted);
  font-size: 10px;
}

/* ---------------- Question bank ---------------- */

.bank-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.bank-toolbar select,
.bank-toolbar input {
  height: 36px;
  border: 1px solid #dfe8e3;
  border-radius: 9px;
  background: #fbfcfb;
  color: var(--ink);
  padding: 0 10px;
  font-size: 11px;
  outline: none;
}

.bank-toolbar select {
  min-width: 104px;
  cursor: pointer;
}

.bank-toolbar input {
  flex: 1;
  min-width: 180px;
}

.bank-toolbar select:focus,
.bank-toolbar input:focus {
  border-color: #9dcdb9;
  background: #fff;
}

.bank-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  padding: 2px 2px 4px;
}

.bank-result-head b {
  color: var(--brand);
  font-size: 12px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 0 2px;
}

.pagination span {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

/* ---------------- Reading ---------------- */

.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
  align-items: start;
}

.passage-card {
  position: sticky;
  top: 18px;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(23, 35, 31, 0.06);
  box-shadow: var(--shadow-sm);
}

.passage-card .passage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.passage-card h2 {
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.3px;
}

.passage-text {
  color: #33423c;
  font-size: 13.5px;
  line-height: 2.05;
  letter-spacing: 0.2px;
  text-align: justify;
}

.passage-text::first-letter {
  font-size: 1.1em;
  font-weight: 800;
  color: var(--brand);
}

.tip-box {
  display: flex;
  gap: 9px;
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #f5faf7;
  border: 1px solid #e4f0e9;
  color: #4f6a5f;
  font-size: 10.5px;
  line-height: 1.65;
}

.tip-box b {
  color: var(--brand);
}

.question-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question-card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(23, 35, 31, 0.06);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.q-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.q-index {
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
}

.q-stem {
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.65;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.option {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  text-align: left;
  border: 1px solid #e4eae6;
  border-radius: 11px;
  background: #fbfcfb;
  color: #33423c;
  font-size: 11.5px;
  line-height: 1.5;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.option:hover {
  border-color: #b9d9ca;
  background: #f5faf7;
  transform: translateX(2px);
}

.option:disabled {
  cursor: default;
  transform: none;
}

.opt-letter {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #edf2ef;
  color: #6b7d75;
  font-size: 9px;
  font-weight: 850;
}

.option.selected {
  border-color: #9dcdb9;
  background: #f0faf5;
}

.option.correct {
  border-color: #6fc9a3;
  background: #eafaf2;
}

.option.correct .opt-letter {
  color: #fff;
  background: var(--success);
}

.option.wrong {
  border-color: #eaa7a4;
  background: #fff3f2;
}

.option.wrong .opt-letter {
  color: #fff;
  background: var(--danger);
}

.feedback {
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 10.5px;
  line-height: 1.65;
}

.feedback.correct {
  color: #146c4d;
  background: #eafaf2;
  border: 1px solid #d3f2e4;
}

.feedback.wrong {
  color: #9e3d39;
  background: #fff3f2;
  border: 1px solid #f6dedc;
}

.solution {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f9f8;
  color: #52645c;
  font-size: 10.5px;
  line-height: 1.7;
  border: 1px dashed #e1e8e4;
}

.solution b {
  color: var(--ink-2);
}

/* ---------------- Voice picker ---------------- */

.voice-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.voice-picker-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.4px;
}

.voice-options {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.voice-chip {
  border: 1px solid #dfe8e3;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f8faf9;
  color: #52645c;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.voice-chip:hover {
  border-color: #9dcdb9;
  background: #f1faf5;
}

.voice-chip.active {
  color: #0f211b;
  background: #d9f7e9;
  border-color: #9ee0c4;
}

.voice-chip.voice-preview {
  color: var(--english);
  background: #f0faf5;
  border-color: #cfe9dd;
}

/* ---------------- Word cards ---------------- */

.word-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
  grid-template-areas:
    "intro challenge"
    "words challenge";
  gap: 16px;
  align-items: start;
}

.word-intro {
  grid-area: intro;
}

.word-main {
  grid-area: words;
  min-width: 0;
}

.challenge-card {
  grid-area: challenge;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.word-card {
  padding: 13px;
  border-radius: 14px;
  border: 1px solid #e6ece8;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.word-card:hover {
  transform: translateY(-1px);
  border-color: #b9ddcd;
}

.word-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.word-card strong {
  font-size: 16px;
  letter-spacing: -0.2px;
}

.word-card .phonetic {
  margin-top: 2px;
  color: var(--english);
  font-size: 10px;
  font-weight: 650;
}

.word-card .meaning {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 650;
}

.word-card .example {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.example-speak {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-left: 3px;
  padding: 0;
  border: 1px solid #d8eee4;
  border-radius: 5px;
  background: #f0faf5;
  color: var(--english);
  font-size: 7px;
  line-height: 1;
  vertical-align: 1px;
}

.example-speak:hover {
  background: #e3f8ee;
}

.speak-btn {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid #d8eee4;
  border-radius: 9px;
  background: #f0faf5;
  color: var(--english);
  font-size: 12px;
}

.speak-btn:hover {
  background: #e3f8ee;
}

.challenge-card {
  position: sticky;
  top: 18px;
  padding: 20px;
  border-radius: var(--radius);
  color: #eafff7;
  background:
    radial-gradient(circle at 100% 0%, rgba(108, 231, 183, 0.2), transparent 36%),
    linear-gradient(145deg, #12352a, #0d241d);
  box-shadow: var(--shadow-lg);
}

.challenge-card h2 {
  margin-top: 4px;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.challenge-card .challenge-sub {
  margin-top: 6px;
  color: #9dc8b8;
  font-size: 10.5px;
  line-height: 1.6;
}

.challenge-target {
  margin-top: 15px;
  padding: 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f2fff9;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 650;
}

.challenge-tip {
  margin-top: 9px;
  color: #8fb9a8;
  font-size: 10px;
  line-height: 1.6;
}

.challenge-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.challenge-actions .btn-primary {
  color: #0f211b;
  background: linear-gradient(135deg, #c8f6e4, #73d8b2);
}

.challenge-actions .btn-ghost {
  color: #d9f7e9;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.voice-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 10.5px;
  line-height: 1.65;
}

.voice-score {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.voice-score strong {
  font-size: 25px;
  letter-spacing: -1px;
  color: #8ee8c2;
}

.voice-score span {
  color: #a8cbbd;
  font-size: 10px;
}

.voice-transcript {
  color: #c3e2d5;
  font-style: italic;
}

.voice-fallback {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(244, 123, 85, 0.12);
  border: 1px solid rgba(244, 123, 85, 0.2);
  color: #ffd9cc;
  font-size: 10px;
  line-height: 1.65;
}

/* ---------------- Exam ---------------- */

.exam-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.exam-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(23, 35, 31, 0.06);
  background:
    radial-gradient(circle at 100% 0%, #fff4e8, transparent 42%),
    #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.exam-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.exam-card .exam-flag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 5px 12px;
  border-bottom-right-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f47b55, #eb9a4f);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.exam-card h3 {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.3px;
}

.exam-card .exam-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10.5px;
}

.exam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.exam-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.exam-foot span {
  color: var(--muted);
  font-size: 10px;
}

.exam-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(23, 35, 31, 0.06);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 10px;
  z-index: 10;
}

.exam-topbar h1 {
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.3px;
}

.exam-topbar p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #f6e2c8;
  color: #a96512;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.timer.warning {
  background: #fff0ee;
  border-color: #f5d2ce;
  color: #b8473f;
}

.exam-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.exam-section {
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(23, 35, 31, 0.06);
  box-shadow: var(--shadow-sm);
}

.exam-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.exam-section-head h2 {
  font-size: 14px;
  font-weight: 850;
}

.exam-section-head span {
  color: var(--muted);
  font-size: 9.5px;
}

.exam-passage {
  margin-bottom: 12px;
  padding: 12px 13px;
  border-radius: 11px;
  background: #f8faf9;
  color: #42524b;
  font-size: 11.5px;
  line-height: 1.85;
  text-align: justify;
}

.exam-answer-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.exam-result-hero {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: var(--radius-lg);
  color: #eafff7;
  background:
    radial-gradient(circle at 90% 0%, rgba(108, 231, 183, 0.2), transparent 32%),
    linear-gradient(135deg, #12352a, #0d241d);
  box-shadow: var(--shadow-lg);
}

.score-ring {
  --score: 0;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#72dfb7 calc(var(--score) * 1%), rgba(255, 255, 255, 0.09) 0);
  position: relative;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #10261f;
}

.score-ring div {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-ring strong {
  display: block;
  color: #f2fff9;
  font-size: 36px;
  letter-spacing: -1.5px;
  line-height: 1;
}

.score-ring span {
  display: block;
  margin-top: 4px;
  color: #8eb9a8;
  font-size: 9px;
  letter-spacing: 1px;
}

.result-copy h1 {
  font-size: 24px;
  letter-spacing: -0.6px;
}

.result-copy p {
  margin-top: 8px;
  max-width: 620px;
  color: #a9cbbd;
  font-size: 11px;
  line-height: 1.75;
}

.result-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.result-pill {
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #cceadd;
  font-size: 10px;
}

.result-pill b {
  color: #fff;
  margin-left: 3px;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.review-item {
  padding: 15px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(23, 35, 31, 0.06);
  box-shadow: var(--shadow-sm);
}

.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.review-item h3 {
  font-size: 12px;
  line-height: 1.55;
  font-weight: 750;
}

.review-answer {
  margin-top: 7px;
  font-size: 10.5px;
  line-height: 1.65;
}

.review-answer .ok {
  color: var(--success);
  font-weight: 750;
}

.review-answer .no {
  color: var(--danger);
  font-weight: 750;
}

/* ---------------- Wrong book / report ---------------- */

.wrong-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wrong-card {
  padding: 17px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(23, 35, 31, 0.06);
  box-shadow: var(--shadow-sm);
}

.wrong-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.wrong-card h3 {
  font-size: 12.5px;
  line-height: 1.55;
  font-weight: 750;
}

.wrong-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.mastery-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 5px;
}

.mastery-row .mastery-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.mastery-row .mastery-top strong {
  font-size: 12px;
  font-weight: 750;
}

.mastery-row .mastery-top span {
  color: var(--muted);
  font-size: 10px;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: #eef2ef;
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-2), #6fd7b0);
  transition: width 0.6s ease;
}

.bar.chinese > i {
  background: linear-gradient(90deg, #5b83f7, #8fa9ff);
}

.bar.math > i {
  background: linear-gradient(90deg, #e9a23b, #f4c46f);
}

.bar.english > i {
  background: linear-gradient(90deg, #1aa87c, #65d5b2);
}

.radar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.radar-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f7f9f8;
  border: 1px solid #e8eeea;
  color: #52645c;
  font-size: 10px;
}

.radar-tag b {
  color: var(--accent);
  font-size: 9px;
}

.advice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 5px;
}

.advice {
  display: flex;
  gap: 10px;
  padding: 11px;
  border-radius: 11px;
  background: #f8faf9;
  border: 1px solid #e9efeb;
}

.advice-num {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 9px;
  font-weight: 850;
}

.advice strong {
  display: block;
  font-size: 10.5px;
  line-height: 1.45;
}

.advice p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

.empty-state {
  padding: 42px 20px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px dashed #d9e4de;
  background: rgba(255, 255, 255, 0.6);
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 18px;
  font-weight: 850;
}

.empty-state h3 {
  font-size: 14px;
  font-weight: 800;
}

.empty-state p {
  max-width: 360px;
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

/* ---------------- Source audit ---------------- */

.source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.source-card {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(23, 35, 31, 0.06);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.source-type {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.source-card h3 {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.source-publisher {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.source-facts {
  margin: 9px 0 0;
  padding-left: 15px;
  color: #52645c;
  font-size: 10px;
  line-height: 1.65;
  list-style: disc;
}

.source-facts li + li {
  margin-top: 3px;
}

.source-note {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.source-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 750;
}

.source-link:hover {
  color: var(--brand-2);
}

@media (max-width: 900px) {
  .source-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------- Updates ---------------- */

.update-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.timeline {
  position: relative;
  padding-left: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: #dfe9e3;
}

.timeline-item {
  position: relative;
  padding: 0 0 20px 0;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -21px;
  top: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-2);
  box-shadow: 0 0 0 3px #eef8f3;
}

.timeline-date {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.timeline-item h3 {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.5;
}

.timeline-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1ee;
}

.info-row:last-child {
  border-bottom: 0;
}

.info-row span {
  color: var(--muted);
  font-size: 10px;
}

.info-row strong {
  text-align: right;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.5;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.coverage-item {
  padding: 11px;
  border-radius: 10px;
  background: #f8faf9;
  border: 1px solid #e9efeb;
}

.coverage-item strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.5px;
}

.coverage-item span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

/* ---------------- Toast / modal ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 100;
  transform: translate(-50%, 16px);
  padding: 11px 16px;
  border-radius: 12px;
  background: #142a23;
  color: #eafff7;
  font-size: 11px;
  font-weight: 650;
  box-shadow: 0 18px 45px rgba(20, 42, 35, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(90vw, 460px);
  text-align: center;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 28, 23, 0.48);
  backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-card {
  width: min(560px, 100%);
  max-height: 84vh;
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 30px 80px rgba(12, 28, 23, 0.3);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  font-size: 17px;
  font-weight: 850;
}

.modal-close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-size: 15px;
}

/* ---------------- Bottom nav ---------------- */

.bottom-nav {
  display: none;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1120px) {
  :root {
    --sidebar: 216px;
  }

  .main {
    padding: 0 20px 46px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-side {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .reading-layout,
  .word-layout,
  .report-grid,
  .update-layout {
    grid-template-columns: 1fr;
  }

  .word-layout {
    grid-template-areas:
      "intro"
      "words"
      "challenge";
  }

  .passage-card,
  .challenge-card {
    position: static;
  }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 0 14px 82px;
  }

  .topbar {
    min-height: 64px;
  }

  .page-title {
    font-size: 18px;
  }

  .region-badge {
    display: none;
  }

  .subject-grid {
    grid-template-columns: 1fr;
  }

  .dash-grid,
  .unit-grid,
  .exam-grid {
    grid-template-columns: 1fr;
  }

  .word-grid {
    grid-template-columns: 1fr;
  }

  .word-layout {
    grid-template-areas:
      "challenge"
      "intro"
      "words";
  }

  .challenge-card {
    position: static;
  }

  .bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 9px;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(16, 34, 29, 0.94);
    box-shadow: 0 18px 45px rgba(16, 34, 29, 0.28);
    backdrop-filter: blur(12px);
  }

  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 5px 2px;
    border-radius: 10px;
    color: #8fb5a7;
    font-size: 8px;
    font-weight: 650;
  }

  .bottom-nav a b {
    width: 24px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    font-size: 9px;
    background: rgba(255, 255, 255, 0.06);
  }

  .bottom-nav a.active {
    color: #eafff7;
  }

  .bottom-nav a.active b {
    color: #10221d;
    background: #a9e8d0;
  }

  .exam-topbar {
    flex-direction: column;
    align-items: flex-start;
    position: static;
  }

  .exam-result-hero {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .result-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .result-stats {
    justify-content: center;
  }

  .hero {
    padding: 22px 20px;
    border-radius: 22px;
  }

  .hero-side {
    grid-template-columns: 1fr;
  }

  .hero-stat {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 520px) {
  .topbar-right .grade-select {
    padding-right: 28px;
  }

  .page {
    padding-top: 18px;
  }

  .section-head {
    margin-top: 22px;
  }

  .card-pad,
  .unit-card,
  .exam-card,
  .question-card,
  .passage-card {
    padding: 15px;
  }

  .hero h1 {
    font-size: 23px;
  }

  .hero-sub {
    font-size: 11px;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .coverage-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bank-toolbar select {
    flex: 1;
    min-width: 0;
  }

  .bank-toolbar input {
    flex-basis: 100%;
    min-width: 0;
  }

  .exam-topbar h1 {
    font-size: 15px;
  }

  .score-ring {
    width: 128px;
    height: 128px;
  }

  .score-ring strong {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.answer-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #d7e3dd;
  border-radius: 9px;
  font: inherit;
  line-height: 1.6;
  background: #fff;
  color: var(--ink);
}
.answer-input:focus {
  outline: 2px solid rgba(24, 160, 108, .18);
  border-color: #55b98a;
}
.answer-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.sidebar-reset {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .72);
  border-radius: 8px;
  padding: 6px 9px;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.sidebar-reset:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--green, #178a5f);
  font: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.word-voice-row {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #e4eee8;
}
.word-voice-btn {
  border: 1px solid #cfe6da;
  background: #f2fbf6;
  color: #178a5f;
  border-radius: 7px;
  padding: 5px 9px;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.word-voice-btn:hover {
  background: #e3f7ec;
}
.word-voice-btn:disabled {
  opacity: .55;
  cursor: wait;
}
.word-voice-result:empty {
  display: none;
}
.word-voice-result {
  margin-top: 8px;
}
.word-voice-result .voice-result {
  padding: 9px 10px;
  font-size: 10.5px;
}
.word-voice-result .voice-score strong {
  font-size: 20px;
}

/* ---------- Éú¶¯»¯ÊÓ¾õÔöÇ¿ ---------- */
body {
  background:
    radial-gradient(900px 500px at 8% -5%, rgba(80, 200, 150, .16), transparent 60%),
    radial-gradient(800px 420px at 100% 0%, rgba(255, 186, 92, .13), transparent 58%),
    radial-gradient(700px 500px at 50% 110%, rgba(116, 170, 255, .10), transparent 60%),
    #f4f6f1;
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(500px 220px at 88% 10%, rgba(104, 231, 173, .32), transparent 65%),
    linear-gradient(125deg, #0b3527 0%, #0d5a3e 58%, #16855b 100%);
  box-shadow: 0 22px 55px rgba(9, 68, 45, .20);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(1px);
  animation: heroFloat 8s ease-in-out infinite;
}
.hero::before {
  width: 220px;
  height: 220px;
  right: 30%;
  top: -110px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.24), rgba(120, 255, 195, .04) 65%);
}
.hero::after {
  width: 150px;
  height: 150px;
  right: 6%;
  bottom: -80px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 209, 120, .35), rgba(255, 209, 120, .02) 70%);
  animation-delay: -3s;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 em {
  background: linear-gradient(90deg, #b7ffd9, #ffe9a8 55%, #ffd08a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
.hero .pulse {
  box-shadow: 0 0 0 0 rgba(120, 255, 190, .55);
  animation: pulseDot 2.2s infinite;
}
.hero-stat {
  transition: transform .2s ease, background .2s ease;
}
.hero-stat:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, .12);
}

.section-head h2 {
  position: relative;
  display: inline-block;
}
.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 18%;
  bottom: -5px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(48, 190, 130, .55), rgba(48, 190, 130, 0));
}

.subject-card {
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.subject-card::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -65px;
  top: -65px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--subject-soft), transparent 68%);
  opacity: .85;
  pointer-events: none;
  transition: transform .3s ease;
}
.subject-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(28, 68, 49, .13);
  border-color: color-mix(in srgb, var(--subject) 28%, #fff);
}
.subject-card:hover::before {
  transform: scale(1.2);
}
.subject-icon {
  transition: transform .25s ease;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--subject) 22%, transparent);
}
.subject-card:hover .subject-icon {
  transform: rotate(-6deg) scale(1.06);
}
.subject-arrow {
  transition: transform .2s ease;
}
.subject-card:hover .subject-arrow {
  transform: translateX(4px);
}

.card,
.word-card,
.question-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.word-card:hover {
  transform: translateY(-4px) rotate(-.25deg);
  box-shadow: 0 16px 32px rgba(24, 96, 66, .12);
  border-color: #bfe8d4;
}
.word-card:hover .speak-btn {
  transform: scale(1.1);
  background: #e9fff3;
}
.speak-btn, .example-speak {
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.speak-btn:hover, .example-speak:hover {
  transform: scale(1.14);
  color: #08784f;
}

.btn-primary {
  background: linear-gradient(135deg, #0b7a52, #2cbb80);
  box-shadow: 0 8px 18px rgba(20, 140, 92, .22);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 12px 24px rgba(20, 140, 92, .28);
}
.word-voice-btn {
  background: linear-gradient(135deg, #effdf5, #dff8ea);
  transition: transform .18s ease, box-shadow .18s ease;
}
.word-voice-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(24, 160, 108, .14);
}

.subject-grid,
.dash-grid {
  animation: softRise .55s ease both;
}
.subject-card:nth-child(2) { animation-delay: .06s; }
.subject-card:nth-child(3) { animation-delay: .12s; }

@keyframes heroFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-10px, 12px, 0) scale(1.04); }
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(120, 255, 190, .55); }
  70% { box-shadow: 0 0 0 9px rgba(120, 255, 190, 0); }
  100% { box-shadow: 0 0 0 0 rgba(120, 255, 190, 0); }
}
@keyframes softRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after, .hero .pulse, .subject-grid, .dash-grid { animation: none !important; }
  .subject-card, .word-card, .btn-primary, .subject-icon, .subject-arrow { transition: none !important; }
}

/* ¸ü»îÆÃµÄ¿ÆÄ¿¿¨Æ¬ÓëÈÎÎñ·´À¡ */
.subject-card {
  background: linear-gradient(150deg, #ffffff 38%, var(--subject-soft) 100%);
  border: 1px solid color-mix(in srgb, var(--subject) 12%, #fff);
}
.subject-card::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 48px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--subject) 10%, transparent);
  transform: rotate(12deg);
  pointer-events: none;
}
.subject-card:hover::after {
  transform: rotate(6deg) scale(1.08);
}
.subject-progress-ring {
  filter: drop-shadow(0 4px 8px rgba(24, 96, 66, .10));
}
.task {
  transition: transform .18s ease, background .18s ease;
}
.task:hover {
  transform: translateX(3px);
  background: #f7fffb;
}
.task.done {
  background: linear-gradient(90deg, #f1fbf5, #ffffff);
}
.update-item,
.update-row {
  transition: background .18s ease, transform .18s ease;
}
.update-item:hover,
.update-row:hover {
  background: #f8fffb;
  transform: translateX(2px);
}

/* ½ñÈÕÑ§Ï°Â·¾¶ */
.path-card {
  margin-top: 18px;
  background:
    radial-gradient(420px 180px at 100% 0%, rgba(255, 219, 143, .30), transparent 70%),
    linear-gradient(145deg, #ffffff 0%, #f7fdf9 100%);
  border: 1px solid #dceee4;
}
.path-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.path-head h2 {
  margin-top: 5px;
  font-size: 20px;
  letter-spacing: -.4px;
}
.path-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
}
.path-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.path-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 12px;
  border-radius: 12px;
  border: 1px solid #dceee5;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.path-step:hover {
  transform: translateY(-3px);
  border-color: #9ad9ba;
  box-shadow: 0 10px 22px rgba(26, 115, 77, .10);
}
.path-step-button {
  width: 100%;
  font: inherit;
  text-align: left;
}
.path-num {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #139364, #41c88b);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(30, 160, 108, .22);
}
.path-step b {
  display: block;
  font-size: 12.5px;
}
.path-step small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.path-arrow {
  margin-left: auto;
  color: #83bca2;
  font-size: 15px;
}
.achievement-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed #dceee4;
}
.achievement-strip span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f2fbf6;
  color: #35725a;
  font-size: 10.5px;
}
.achievement-strip b {
  color: #0d7a51;
}
.micro-points {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}
.micro-point {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 11px;
  border-radius: 10px;
  background: #f5fbf7;
  border: 1px solid #e0f0e7;
}
.micro-point span {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dff6e9;
  color: #178a5f;
  font-size: 10px;
  font-weight: 800;
}
.micro-point p {
  margin: 0;
  color: #335b49;
  font-size: 11.5px;
  line-height: 1.65;
}
.micro-example {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #fff8e8;
  color: #7b5a1f;
  font-size: 11.5px;
  line-height: 1.65;
}
@media (max-width: 900px) {
  .path-steps { grid-template-columns: 1fr; }
  .path-head { flex-direction: column; }
}

.voice-recording {
  width: 100%;
  height: 32px;
  margin-top: 9px;
}
.voice-word-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}
.voice-word-chip {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eaf8f0;
  color: #267a58;
  font-size: 10px;
}
.voice-word-chip small {
  opacity: .7;
  font-size: 9px;
}
.voice-word-chip.low {
  background: #fff1df;
  color: #a25d16;
}

.word-unit {
  margin-top: 14px;
  border: 1px solid #dceee5;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.word-unit > summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, #f2fbf6, #ffffff);
  color: #216b4e;
  font-size: 12px;
  font-weight: 700;
}
.word-unit > summary::-webkit-details-marker { display: none; }
.word-unit > summary::before {
  content: "?";
  color: #3fb783;
  margin-right: 2px;
  transition: transform .18s ease;
}
.word-unit[open] > summary::before { transform: rotate(90deg); }
.word-unit > summary span {
  margin-left: auto;
  color: #6c9b85;
  font-size: 10px;
  font-weight: 500;
}
.word-unit .word-grid { padding: 12px; }

.daily-hero {
  background:
    radial-gradient(520px 220px at 100% 0%, rgba(97, 224, 164, .28), transparent 68%),
    linear-gradient(145deg, #ffffff 0%, #f2fbf6 100%);
  border: 1px solid #d7eee2;
}
.daily-hero h1 {
  margin-top: 8px;
  font-size: 24px;
  letter-spacing: -.5px;
}
.daily-hero p {
  margin-top: 8px;
  color: #4b6f5e;
  font-size: 12px;
  line-height: 1.75;
}
.daily-section {
  margin-top: 16px;
}
.daily-passage {
  margin: 4px 0 14px;
  padding: 14px 16px;
  border-radius: 11px;
  background: #f6fbf8;
  border-left: 4px solid #55c18c;
  color: #315746;
  font-size: 12.5px;
  line-height: 1.9;
  white-space: pre-wrap;
}
@media (max-width: 720px) {
  .daily-hero h1 { font-size: 20px; }
}
