:root {
  --paper: #fff8fa;
  --surface: #fffefe;
  --surface-soft: #fff0f4;
  --ink: #382a34;
  --muted: #766571;
  --line: #eadde3;
  --brand: #b94066;
  --brand-dark: #9f3658;
  --accent: #f2b8c8;
  --mint: #f6dce5;
  --danger: #c84040;
  --shadow: 0 18px 60px rgba(91, 48, 68, .10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0;
  color: var(--ink);
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 88% 4%, rgba(235, 154, 179, .22), transparent 25rem),
    radial-gradient(circle at 4% 24%, rgba(198, 79, 115, .10), transparent 28rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before,
body::after {
  position: fixed;
  z-index: -1;
  color: rgba(198, 79, 115, .065);
  font-family: Georgia, serif;
  line-height: 2.4;
  letter-spacing: .55em;
  white-space: pre-wrap;
  pointer-events: none;
  user-select: none;
}
body::before {
  content: "♥  ♡  ♥  ♡  ♥\A  ♡  ♥  ♡  ♥  ♡\A♥  ♡  ♥  ♡  ♥\A  ♡  ♥  ♡  ♥  ♡";
  top: 5vh;
  left: 3vw;
  font-size: clamp(22px, 3vw, 42px);
  transform: rotate(-8deg);
}
body::after {
  content: "♡  ♥  ♡  ♥\A♥  ♡  ♥  ♡\A  ♡  ♥  ♡  ♥";
  right: 2vw;
  bottom: 4vh;
  font-size: clamp(20px, 2.6vw, 38px);
  transform: rotate(9deg);
}
body.modal-open { overflow: hidden; }
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 8px 24px rgba(40,20,31,.12);
  backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--brand); transform: translateY(-1px); }
.welcome-modal[hidden] { display: none; }
.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}
.welcome-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 27, 45, .64);
  backdrop-filter: blur(12px);
  animation: welcome-fade .28s ease both;
}
.welcome-card {
  position: relative;
  width: min(540px, 100%);
  padding: clamp(34px, 7vw, 58px);
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 8%, rgba(255, 207, 87, .24), transparent 12rem),
    linear-gradient(145deg, #fff 0%, #fff9f5 100%);
  box-shadow: 0 34px 100px rgba(11,18,35,.30);
  text-align: center;
  animation: welcome-in .42s cubic-bezier(.2,.8,.2,1) both;
}
.welcome-kicker {
  margin-bottom: 14px;
  color: #d34f6a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.welcome-card h2 {
  max-width: 430px;
  margin: 0 auto 18px;
  color: #22283a;
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.welcome-card p {
  max-width: 410px;
  margin: 0 auto;
  color: #626b7c;
  font-size: clamp(17px, 3vw, 20px);
  line-height: 1.65;
}
.welcome-sign { margin: 18px 0; color: #e45c76; font-size: 26px; }
.welcome-button {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  color: white;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #e45c76, #c83f61);
  box-shadow: 0 12px 30px rgba(200,63,97,.24);
  font-weight: 800;
  cursor: pointer;
}
.welcome-button:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(200,63,97,.28); }
.heart-cloud span {
  position: absolute;
  color: #ef9cad;
  opacity: .6;
  font-size: 18px;
  animation: heart-float 3.2s ease-in-out infinite;
}
.heart-cloud span:nth-child(1) { top: 24px; left: 30px; }
.heart-cloud span:nth-child(2) { top: 50px; right: 36px; font-size: 25px; animation-delay: -.8s; }
.heart-cloud span:nth-child(3) { bottom: 104px; left: 36px; font-size: 13px; animation-delay: -1.6s; }
@keyframes welcome-fade { from { opacity: 0; } }
@keyframes welcome-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes heart-float { 50% { transform: translateY(-7px) rotate(5deg); opacity: 1; } }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible {
  outline: 3px solid rgba(198, 79, 115, .28);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  border-radius: 10px;
  background: var(--brand);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.app-frame {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 30px 20px;
  background: #452c3c;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  overflow: auto;
  z-index: 20;
}
.brand-icon {
  width: auto;
  height: auto;
  margin: 0 8px 28px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: white;
  display: flex;
  justify-content: flex-start;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.03em;
}
.brand-icon::after { content: " Easy English"; }
.nav-item {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  color: #b8c1d7;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  background: transparent;
}
.nav-item:hover, .nav-item.active {
  color: white;
  border-color: transparent;
  background: rgba(255, 255, 255, .10);
  box-shadow: none;
}
.nav-ico { width: 24px; font-size: 18px; text-align: center; }
.nav-label { font-size: 14px; }
.streak {
  margin: auto 0 0;
  padding: 16px;
  min-width: 0;
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  text-align: left;
}
.streak strong { font-size: 18px; }
.streak span { display: block; margin-top: 3px; color: #b8c1d7; }

.main { min-width: 0; padding: 44px clamp(24px, 4vw, 68px) 96px; }
.top-grid {
  min-height: 360px;
  margin: 0 0 48px;
  padding: clamp(28px, 5vw, 64px);
  align-items: center;
  gap: clamp(30px, 6vw, 90px);
  border: 1px solid rgba(198, 79, 115, .10);
  border-radius: 32px;
  background: linear-gradient(135deg, #fff 0%, #fff1f5 62%, #fff8fa 100%);
  box-shadow: var(--shadow);
}
.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
}
.title {
  margin: 14px 0 18px;
  color: var(--ink);
  font-size: clamp(52px, 7vw, 88px);
  line-height: .92;
  letter-spacing: -.075em;
  text-shadow: none;
}
.love-spark {
  display: inline-block;
  margin-left: 14px;
  color: #e45c76;
  font-size: .28em;
  vertical-align: top;
  animation: heart-float 3s ease-in-out infinite;
}
.spark { color: var(--brand); }
.subtitle {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
}
.hero-actions { flex-wrap: wrap; }
.pill-btn, .ghost-btn, .start-btn, .action-btn {
  min-height: 46px;
  border-radius: 13px;
  font-weight: 750;
}
.pill-btn, .start-btn, .action-btn.primary {
  color: white;
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 9px 24px rgba(198, 79, 115, .22);
}
.pill-btn:hover, .start-btn:hover, .action-btn.primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}
.student-input, .search {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
}
.student-input { min-width: 200px; }
.student-input::placeholder, .search::placeholder { color: #8b95a7; }

.progress-card {
  min-width: 0;
  padding: 28px;
  border: 0;
  border-radius: 24px;
  background: #5a3448;
  box-shadow: 0 18px 42px rgba(90, 52, 72, .20);
  transform: none;
}
.crystal { display: none; }
.progress-title { color: white; font-size: 19px; }
.progress-title::before { content: "Haftalık hedef · "; color: var(--accent); }
.progress-track { height: 10px; background: rgba(255,255,255,.12); }
.progress-fill { background: linear-gradient(90deg, #efa4ba, #ffdce6); box-shadow: none; }
.progress-meta { color: #bdc6d8; }
.progress-meta strong, .progress-meta b { color: white; }
.progress-reset {
  margin-top: 18px;
  padding: 0;
  color: #bdc6d8;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.25);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}
.progress-reset:hover { color: white; }

.layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.toolbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  margin-bottom: 28px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 12px 30px rgba(91,48,68,.08);
  backdrop-filter: blur(14px);
}
.search-wrap { min-width: 220px; }
.search { height: 44px; border: 0; background: transparent; }
.ghost-btn {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}
.ghost-btn:hover { color: var(--brand); border-color: rgba(198,79,115,.35); }
.section-head { margin: 30px 0 14px; }
.section-title { color: var(--ink); font-size: 14px; }
.section-line { background: var(--line); }
.section-count { color: var(--muted); }
.level-badge {
  color: var(--brand);
  border-color: rgba(198,79,115,.18);
  background: rgba(198,79,115,.08);
}
.cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.level-card {
  min-height: 158px;
  padding: 18px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: none;
}
.level-card:hover {
  border-color: rgba(198,79,115,.42);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(91,48,68,.09);
  transform: translateY(-2px);
}
.level-card.is-active {
  border-color: var(--brand);
  background: var(--surface-soft);
  box-shadow: 0 0 0 3px rgba(198,79,115,.10);
}
.level-card.is-locked { opacity: .54; filter: grayscale(.25); }
.level-card.is-done { border-color: #9fd9be; background: #f1fbf6; }
.card-num { color: var(--brand); font-size: 30px; }
.card-title { color: var(--ink); font-size: 16px; }
.card-sub { color: var(--muted); }
.stars { color: #d39a08; }

.lesson-panel {
  top: 16px;
  padding: 26px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.lesson-panel::before {
  content: "♡";
  float: right;
  color: rgba(198,79,115,.32);
  font-size: 28px;
  line-height: 1;
}
.lesson-panel h2 { color: var(--ink); font-size: 29px; }
.panel-label, .goal, .step p { color: var(--muted); }
.level-pill { color: var(--brand); border-color: rgba(198,79,115,.2); background: var(--surface-soft); }
.timeline::before { background: var(--line); }
.step-ico { color: var(--brand); border-color: var(--line); background: var(--surface-soft); }
.step h4 { color: var(--ink); }
.step-time { color: var(--muted); }

.workspace {
  margin-top: 64px;
  padding: clamp(24px, 4vw, 48px);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.workspace-head h2 { color: var(--ink); font-size: clamp(32px, 4vw, 52px); }
.workspace-head p, .small { color: var(--muted); }
.tag { color: #44506a; border-color: var(--line); background: #f8f9fb; }
.lesson-tabs {
  position: sticky;
  top: 14px;
  z-index: 12;
  display: flex;
  gap: 8px;
  margin: 28px 0;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 28px rgba(91,48,68,.08);
  backdrop-filter: blur(14px);
}
.lesson-tab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  color: var(--muted);
  border: 0;
  border-radius: 11px;
  background: transparent;
  font-weight: 750;
  cursor: pointer;
}
.lesson-tab:hover { color: var(--ink); background: #f3f5f8; }
.lesson-tab.active { color: white; background: var(--brand); }
.lesson-pane { display: none; }
.lesson-pane.active { display: block; animation: pane-in .22s ease both; }
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } }

.content-grid { gap: 16px; }
.content-card, .formula, .vocab, .drill, .question, .reading-box, .bubble {
  color: var(--ink);
  border-color: var(--line);
  background: #fbfcfe;
  box-shadow: none;
}
.content-card { border-radius: 20px; }
.content-card h3, .question h4, .vocab strong { color: var(--ink); }
.content-card h3::after {
  content: "  ♡";
  color: rgba(198,79,115,.28);
  font-size: .78em;
}
.content-card p, .vocab .tr, .vocab .ex, .goal { color: var(--muted); }
.objective-list li::marker { color: var(--brand); }
.formula:hover { color: var(--brand); border-color: rgba(198,79,115,.35); background: var(--surface-soft); }
.speak-btn { color: var(--brand); border-color: rgba(198,79,115,.18); background: var(--surface-soft); }
.word-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.word-actions button {
  min-height: 36px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  cursor: pointer;
}
.word-actions button:hover { color: var(--brand); border-color: rgba(198,79,115,.32); }
.word-actions button.active { color: white; border-color: var(--brand); background: var(--brand); }
.vocab.word-known { border-color: #9fd9be; background: #f1fbf6; }
.vocab.word-review { border-color: #eed181; background: #fffaf0; }
.speaker { color: #fff; background: var(--brand); }
.show-answer { color: var(--brand); }
.answer.show { color: var(--ink); border-color: #eed181; background: #fff9e5; }
.practice-input {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
}
.practice-input.is-correct { border-color: #69bd94; background: #f1fbf6; }
.practice-input.needs-review { border-color: #e1b94d; background: #fffaf0; }
.practice-feedback {
  min-height: 20px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.practice-feedback.correct { color: #176c44; }
.practice-feedback.model { color: #805b00; }
.practice-feedback.needs-answer { color: var(--danger); }
.practice-check { margin-top: 16px; }
.speaking-practice {
  min-height: 40px;
  margin: 12px 8px 0 0;
  padding: 0 13px;
  color: var(--brand);
  border: 1px solid rgba(198,79,115,.22);
  border-radius: 10px;
  background: var(--surface-soft);
  font-weight: 750;
  cursor: pointer;
}
.speaking-practice.done { color: var(--ink); border-color: var(--line); background: white; }
.speaking-practice.completed { color: #176c44; border-color: #9fd9be; background: #ecfaf3; }
.capstone {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(198,79,115,.2);
  border-radius: 16px;
  background: var(--surface-soft);
}
.capstone h4 { margin: 0 0 8px; }
.capstone p { color: var(--muted); line-height: 1.55; }
.capstone label { display: block; margin-bottom: 8px; font-weight: 750; }
.capstone textarea {
  width: 100%;
  resize: vertical;
  padding: 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  font: inherit;
  line-height: 1.55;
}
.capstone small { display: block; margin-top: 8px; color: var(--muted); }
.listening-reveal[hidden] { display: none; }
.listening-reveal {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.option { color: var(--ink); border-color: var(--line); background: white; }
.option:hover { border-color: rgba(198,79,115,.35); background: var(--surface-soft); }
.option.correct { border-color: #69bd94; background: #eaf9f1; }
.option.wrong { border-color: #e08d8d; background: #fff0f0; }
.question-feedback {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.question-feedback.show { display: block; }
.question-feedback.correct { color: #176c44; background: #ecfaf3; }
.question-feedback.wrong { color: #9b3030; background: #fff1f1; }
.question-feedback.unanswered { color: #805b00; background: #fff9e5; }
.result.ok { color: #176c44; border-color: #9fd9be; background: #ecfaf3; }
.result.bad { color: #9b3030; border-color: #edb1b1; background: #fff1f1; }
.sticky-actions {
  position: sticky;
  bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 36px rgba(91,48,68,.12);
  backdrop-filter: blur(12px);
}
.action-btn { color: var(--ink); border-color: var(--line); background: #fff; }
.toast { color: white; border: 0; background: #5a3448; }

@media (max-width: 1100px) {
  .app-frame { grid-template-columns: 92px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .brand-icon { justify-content: center; margin-inline: 0; font-size: 24px; }
  .brand-icon::after, .nav-label, .streak span { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-ico { width: auto; }
  .streak { padding: 12px 6px; text-align: center; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .lesson-panel { position: relative; top: auto; order: -1; }
}

@media (max-width: 720px) {
  body { padding-bottom: 76px; }
  .app-frame { display: block; }
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: 70px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    flex-direction: row;
    justify-content: space-around;
    overflow: visible;
    border-radius: 18px 18px 0 0;
  }
  .brand-icon, .streak, .nav-item:nth-of-type(5), .nav-item:nth-of-type(6) { display: none; }
  .nav-item {
    width: auto;
    min-width: 64px;
    min-height: 52px;
    flex-direction: column;
    gap: 2px;
  }
  .nav-item .nav-label { display: block; font-size: 10px; }
  .main { padding: 18px 14px 50px; }
  .top-grid { min-height: 0; padding: 28px 22px; border-radius: 24px; }
  .title { font-size: 52px; }
  .theme-toggle { top: 10px; right: 10px; min-width: 44px; padding: 0 12px; }
  .theme-toggle span:last-child { display: none; }
  .welcome-modal { padding: 14px; }
  .welcome-card { padding: 38px 24px 26px; border-radius: 24px; }
  .progress-card { padding: 22px; }
  .hero-actions, .hero-actions > * { width: 100%; }
  .student-input { min-width: 0; }
  .toolbar { top: 8px; display: block; }
  .mini-actions { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .level-card { min-height: 126px; }
  .lesson-panel { padding: 22px; }
  .workspace { margin-top: 36px; padding: 22px 16px; border-radius: 22px; }
  .workspace-head { display: block; }
  .workspace-head .pill-btn { width: 100%; margin-top: 14px; }
  .lesson-tabs { top: 8px; margin-inline: -4px; }
  .content-grid { display: block; }
  .lesson-pane .content-card { margin-bottom: 14px; }
  .vocab-grid, .formula-list, .drill-grid, .options { grid-template-columns: 1fr; }
  .sticky-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .sticky-actions .action-btn { width: 100%; }
}

html[data-theme="dark"] {
  --paper: #1b1118;
  --surface: #281a24;
  --surface-soft: #38202d;
  --ink: #fff2f6;
  --muted: #c8b2bd;
  --line: #503744;
  --brand: #f09ab4;
  --brand-dark: #e37e9d;
  --accent: #f2aec2;
  --mint: #49303c;
  --shadow: 0 18px 60px rgba(0,0,0,.28);
  color-scheme: dark;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 88% 4%, rgba(208, 91, 129, .16), transparent 25rem),
    radial-gradient(circle at 4% 24%, rgba(240, 154, 180, .09), transparent 28rem),
    var(--paper);
}
html[data-theme="dark"] body::before,
html[data-theme="dark"] body::after { color: rgba(240,154,180,.075); }
html[data-theme="dark"] .sidebar { background: #21141c; }
html[data-theme="dark"] .top-grid {
  border-color: #503744;
  background: linear-gradient(135deg, #2d1c28 0%, #351f2b 62%, #281820 100%);
}
html[data-theme="dark"] .progress-card { background: #4a2939; }
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .lesson-tabs,
html[data-theme="dark"] .sticky-actions {
  background: rgba(40,26,36,.92);
}
html[data-theme="dark"] .student-input,
html[data-theme="dark"] .level-card,
html[data-theme="dark"] .lesson-panel,
html[data-theme="dark"] .workspace,
html[data-theme="dark"] .ghost-btn,
html[data-theme="dark"] .action-btn,
html[data-theme="dark"] .word-actions button,
html[data-theme="dark"] .practice-input,
html[data-theme="dark"] .capstone textarea,
html[data-theme="dark"] .option {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}
html[data-theme="dark"] .level-card.is-active,
html[data-theme="dark"] .formula:hover,
html[data-theme="dark"] .option:hover { background: var(--surface-soft); }
html[data-theme="dark"] .level-card.is-done,
html[data-theme="dark"] .vocab.word-known { border-color: #765062; background: #32242b; }
html[data-theme="dark"] .vocab.word-review { border-color: #765062; background: #33232b; }
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .formula,
html[data-theme="dark"] .vocab,
html[data-theme="dark"] .drill,
html[data-theme="dark"] .question,
html[data-theme="dark"] .reading-box,
html[data-theme="dark"] .bubble { color: var(--ink); border-color: var(--line); background: #2c1d28; }
html[data-theme="dark"] .tag { color: #e6cfd9; border-color: var(--line); background: #34232d; }
html[data-theme="dark"] .pill-btn,
html[data-theme="dark"] .start-btn,
html[data-theme="dark"] .action-btn.primary,
html[data-theme="dark"] .lesson-tab.active,
html[data-theme="dark"] .word-actions button.active {
  color: #29151f;
  border-color: var(--brand);
  background: var(--brand);
}
html[data-theme="dark"] .answer.show { color: var(--ink); border-color: #735061; background: #392430; }
html[data-theme="dark"] .question-feedback.correct,
html[data-theme="dark"] .result.ok { color: #d8f7e7; background: #20382e; }
html[data-theme="dark"] .question-feedback.wrong,
html[data-theme="dark"] .result.bad { color: #ffd9df; background: #44232b; }
html[data-theme="dark"] .capstone { border-color: #654152; background: #35222d; }
html[data-theme="dark"] .welcome-card {
  color: var(--ink);
  border-color: #654152;
  background:
    radial-gradient(circle at 90% 8%, rgba(240,154,180,.15), transparent 12rem),
    linear-gradient(145deg, #2d1c28 0%, #24171f 100%);
  box-shadow: 0 34px 100px rgba(0,0,0,.46);
}
html[data-theme="dark"] .welcome-card h2 { color: var(--ink); }
html[data-theme="dark"] .welcome-card p { color: var(--muted); }
html[data-theme="dark"] .welcome-button { color: #fff; background: #b94066; }
html[data-theme="dark"] .question-feedback.unanswered { color: #ffe6ae; background: #3e3020; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .lesson-tabs { display: none !important; }
  .lesson-pane { display: grid !important; }
}
