:root {
  color-scheme: light;
  --ink: #18231f;
  --muted: #66716c;
  --paper: #f7f3eb;
  --surface: #fffdf8;
  --surface-2: #efe9dc;
  --green: #15392f;
  --green-2: #245c4c;
  --mint: #cfe6d9;
  --coral: #e96b54;
  --peach: #f9d8c9;
  --gold: #f4bd71;
  --blue: #a9ced8;
  --line: #ded8ca;
  --success: #277a55;
  --danger: #b94a3a;
  --shadow: 0 18px 50px rgba(25, 47, 39, 0.1);
  --shadow-sm: 0 8px 24px rgba(25, 47, 39, 0.08);
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 13px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(233, 107, 84, 0.38);
  outline-offset: 3px;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 244px;
  display: flex;
  flex-direction: column;
  padding: calc(28px + var(--safe-top)) 22px calc(22px + var(--safe-bottom));
  overflow-y: auto;
  background: var(--green);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 7px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: var(--gold);
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 800;
  box-shadow: inset 0 -3px 0 rgba(21, 57, 47, 0.12);
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.05;
}

.brand-copy small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 7px;
  margin-top: 48px;
}

.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.nav-button:hover,
.nav-button.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.nav-button.is-active::after {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.nav-icon {
  width: 26px;
  text-align: center;
  font-size: 18px;
}

.sidebar-progress {
  margin-top: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-progress__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 750;
}

.sidebar-progress__top span:last-child {
  color: var(--gold);
}

.progress-track {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 350ms ease;
}

.sidebar-progress p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.57);
  font-size: 11px;
  line-height: 1.45;
}

.main-area {
  grid-column: 2;
  min-width: 0;
  padding: calc(30px + var(--safe-top)) clamp(24px, 5vw, 72px) calc(48px + var(--safe-bottom));
}

.topbar {
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 34px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.offline-pill,
.xp-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(25, 47, 39, 0.06);
  font-size: 12px;
  font-weight: 800;
}

.offline-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  content: "";
}

.offline-pill.is-offline::before {
  background: var(--coral);
}

.offline-pill.is-offline {
  background: var(--peach);
}

.xp-pill {
  background: var(--green);
  color: #fff;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  animation: page-in 280ms ease both;
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  max-width: 780px;
  margin-bottom: 15px;
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 24px;
  align-items: stretch;
}

.welcome-card {
  position: relative;
  min-height: 360px;
  padding: clamp(30px, 5vw, 58px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.welcome-card::before,
.welcome-card::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.welcome-card::before {
  width: 280px;
  height: 280px;
  right: -90px;
  top: -110px;
  background: var(--mint);
}

.welcome-card::after {
  width: 160px;
  height: 160px;
  right: 92px;
  bottom: -70px;
  background: var(--peach);
}

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

.hero-actions,
.lesson-actions,
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 28px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

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

.button--primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 25px rgba(21, 57, 47, 0.19);
}

.button--primary:hover {
  background: var(--green-2);
}

.button--secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button--danger {
  border-color: #efc0b7;
  background: #fff4f1;
  color: var(--danger);
}

.button--wide {
  width: 100%;
}

.button[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}

.daily-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow);
}

.daily-card .eyebrow {
  color: var(--gold);
}

.daily-card h2 {
  font-size: 32px;
}

.daily-card p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.6;
}

.daily-ring {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  margin: auto;
  border: 12px solid rgba(255, 255, 255, 0.11);
  border-top-color: var(--gold);
  border-right-color: var(--gold);
  border-radius: 50%;
  transform: rotate(45deg);
}

.daily-ring span {
  display: grid;
  place-items: center;
  transform: rotate(-45deg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 48px 0 20px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.lesson-card {
  min-height: 215px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  padding: 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, border 180ms ease;
}

.lesson-card:hover:not([disabled]) {
  transform: translateY(-4px);
  border-color: var(--mint);
  box-shadow: var(--shadow);
}

.lesson-card[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
}

.lesson-card.is-complete {
  background: #f0f7f3;
}

.lesson-number {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--surface-2);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
}

.lesson-card.is-current .lesson-number {
  background: var(--gold);
}

.lesson-card.is-complete .lesson-number {
  background: var(--green);
  color: #fff;
}

.lesson-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lesson-card__tag {
  color: var(--coral);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-card__state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.lesson-card h3 {
  margin: 14px 0 7px;
}

.lesson-card p {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.lesson-meta {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.lesson-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 26px;
  padding: clamp(28px, 5vw, 54px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow);
}

.lesson-hero h1 {
  font-size: clamp(40px, 5vw, 62px);
}

.lesson-hero .lead {
  color: rgba(255, 255, 255, 0.68);
}

.lesson-hero .button--primary {
  background: var(--gold);
  color: var(--green);
}

.mission-card {
  align-self: center;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
}

.mission-card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  border-radius: 16px;
  background: var(--coral);
  font-size: 25px;
}

.mission-card span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mission-card p {
  margin: 8px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.35;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 26px;
  margin-top: 26px;
}

.panel {
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.panel-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.word-card {
  position: relative;
  min-height: 150px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border 160ms ease, background 160ms ease, transform 160ms ease;
}

.word-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
}

.word-card.is-flipped {
  border-color: var(--mint);
  background: #f0f7f3;
}

.word-card__en {
  display: block;
  padding-right: 36px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 700;
}

.word-card__pronunciation {
  display: block;
  margin-top: 6px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 750;
}

.word-card__translation {
  display: block;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  transition: 180ms ease;
}

.word-card.is-flipped .word-card__translation {
  max-height: 80px;
  margin-top: 14px;
  opacity: 1;
}

.speak-button {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  cursor: pointer;
}

.side-stack {
  display: grid;
  align-content: start;
  gap: 16px;
}

.tip-card,
.phrase-card,
.stat-card {
  padding: 25px;
  border-radius: var(--radius-md);
}

.tip-card {
  background: var(--peach);
}

.phrase-card {
  background: var(--blue);
}

.tip-card span,
.phrase-card span,
.stat-card span {
  display: block;
  margin-bottom: 12px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tip-card p,
.phrase-card p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.6;
}

.phrase-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.quiz-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.quiz-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.quiz-progress {
  flex: 1;
}

.quiz-progress__labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.quiz-progress .progress-track {
  margin: 0;
  background: var(--surface-2);
}

.quiz-progress .progress-fill {
  background: var(--coral);
}

.quiz-card {
  min-height: 510px;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 5vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.question-type {
  color: var(--coral);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.quiz-card h2 {
  max-width: 620px;
  margin: 18px 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.question-help {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
}

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

.answer-button {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: 150ms ease;
}

.answer-button:hover:not([disabled]) {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.answer-button.is-selected {
  border-color: var(--green);
  background: #edf6f1;
}

.answer-button.is-correct {
  border-color: var(--success);
  background: #e8f6ee;
}

.answer-button.is-wrong {
  border-color: var(--danger);
  background: #fff0ed;
}

.answer-letter {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 850;
}

.input-answer {
  width: 100%;
  min-height: 62px;
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
}

.input-answer:focus {
  border-color: var(--green);
}

.input-answer.is-correct {
  border-color: var(--success);
  background: #e8f6ee;
}

.input-answer.is-wrong {
  border-color: var(--danger);
  background: #fff0ed;
}

.reorder-zone {
  min-height: 74px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  background: #fbf8f2;
}

.reorder-zone.is-correct {
  border-color: var(--success);
  background: #e8f6ee;
}

.reorder-zone.is-wrong {
  border-color: var(--danger);
  background: #fff0ed;
}

.reorder-placeholder {
  color: #969b98;
  font-size: 13px;
}

.token-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.word-token {
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 750;
}

.word-token[disabled] {
  opacity: 0.35;
  cursor: default;
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
  padding-top: 32px;
}

.feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.feedback__icon {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
}

.feedback.is-correct {
  color: var(--success);
}

.feedback.is-correct .feedback__icon {
  background: #dcefe4;
}

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

.feedback.is-wrong .feedback__icon {
  background: #f8ddd7;
}

.completion-card {
  max-width: 720px;
  margin: 30px auto 0;
  padding: clamp(34px, 7vw, 70px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.completion-badge {
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  margin: 0 auto 28px;
  border: 10px solid #f8d69e;
  border-radius: 50%;
  background: var(--gold);
  font-size: 44px;
  box-shadow: 0 12px 26px rgba(244, 189, 113, 0.35);
}

.completion-card h1 {
  margin-inline: auto;
  font-size: clamp(40px, 7vw, 64px);
}

.completion-card .lead {
  margin-inline: auto;
}

.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 34px 0;
}

.score-stat {
  padding: 19px 10px;
  border-radius: 16px;
  background: var(--surface-2);
}

.score-stat strong,
.score-stat span {
  display: block;
}

.score-stat strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
}

.score-stat span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-card {
  max-width: 760px;
  padding: clamp(28px, 5vw, 46px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.settings-row:last-of-type {
  border-bottom: 0;
}

.settings-row strong {
  display: block;
  margin-bottom: 5px;
}

.settings-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.toggle {
  width: 50px;
  height: 30px;
  position: relative;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: #c9cbc8;
  cursor: pointer;
}

.toggle::after {
  position: absolute;
  width: 22px;
  height: 22px;
  top: 4px;
  left: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  content: "";
  transition: 180ms ease;
}

.toggle.is-on {
  background: var(--green);
}

.toggle.is-on::after {
  transform: translateX(20px);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 24px;
  bottom: calc(24px + var(--safe-bottom));
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 17px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 700;
  animation: toast-in 220ms ease both;
}

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

.mobile-nav {
  display: none;
}

.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;
}

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

  .sidebar {
    display: none;
  }

  .main-area {
    padding: calc(22px + var(--safe-top)) 22px calc(94px + var(--safe-bottom));
  }

  .dashboard-hero,
  .lesson-hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .daily-card {
    min-height: 250px;
  }

  .lesson-hero .mission-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 17px;
    align-items: center;
  }

  .mission-card__icon {
    margin: 0;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    right: 14px;
    bottom: calc(12px + var(--safe-bottom));
    left: 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    background: rgba(21, 57, 47, 0.96);
    box-shadow: 0 14px 35px rgba(21, 57, 47, 0.27);
    backdrop-filter: blur(16px);
  }

  .mobile-nav .nav-button {
    justify-content: center;
    padding: 10px 6px;
    font-size: 11px;
  }

  .mobile-nav .nav-button.is-active::after {
    display: none;
  }

  .mobile-nav .nav-icon {
    width: auto;
  }
}

@media (max-width: 680px) {
  .main-area {
    padding-inline: 15px;
  }

  .topbar {
    margin-bottom: 23px;
  }

  .breadcrumb {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .offline-pill {
    width: 34px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .welcome-card {
    min-height: 405px;
    padding: 30px 25px;
  }

  .welcome-card::before {
    width: 190px;
    height: 190px;
  }

  .lesson-grid,
  .vocab-grid,
  .answer-list {
    grid-template-columns: 1fr;
  }

  .lesson-card {
    min-height: 190px;
    grid-template-columns: 47px 1fr;
    padding: 20px;
  }

  .lesson-number {
    width: 47px;
    height: 47px;
    border-radius: 15px;
    font-size: 18px;
  }

  .lesson-hero {
    padding: 31px 24px;
  }

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

  .quiz-card {
    min-height: calc(100vh - 185px);
    padding: 27px 20px;
  }

  .quiz-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .quiz-footer .button {
    width: 100%;
  }

  .score-row {
    gap: 7px;
  }

  .score-stat {
    padding: 15px 5px;
  }

  .score-stat strong {
    font-size: 22px;
  }
}

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