:root {
  color-scheme: light;
  --ink: #19191f;
  --muted: #72717a;
  --line: #eee8f6;
  --paper: #ffffff;
  --wash: #ffffff;
  --app-bg: #ffffff;
  --border: #d4d4d8;
  --border-strong: #a1a1aa;
  --outline: 1px solid var(--border);
  --blue: #39ace3;
  --green: #65d394;
  --amber: #f5a64d;
  --violet: #c47be8;
  --purple: #c599ff;
  --purple-deep: #a87ae8;
  --pastel-blue: #dff3ff;
  --pastel-peach: #ffe8d6;
  --pastel-lavender: #f2e5fb;
  --pastel-mint: #e8f8ef;
  --pastel-pink: #fce7f3;
  --pastel-coral: #ffe8dc;
  --pastel-sun: #ffd4b8;
  --pastel-teal: #d9f5f0;
  --shell-bg: #ebe2f8;
  --shell-bg-image: url("../assets/backgrounds/shell-background.png");
  --phone-width: 412px;
  --phone-ratio-w: 9;
  --phone-ratio-h: 19.5;
  --phone-height: calc(var(--phone-width) * var(--phone-ratio-h) / var(--phone-ratio-w));
  --phone-preview-max-width: 430px;
  --phone-preview-max-height: 900px;
  --phone-preview-vh-inset: 48px;
  --shadow: none;
  --shadow-soft: none;
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-section: 28px;
  font-family: "Inter", "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: hidden;
  background: var(--shell-bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding-block: 16px;
  box-sizing: border-box;
  background: transparent;
}

.phone-frame {
  grid-column: 2;
  width: 100%;
  margin-inline: auto;
  background: var(--paper);
  border-radius: 42px;
  padding: 0;
  border: var(--outline);
  box-shadow: 0 24px 64px rgba(88, 56, 140, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--app-bg);
  border-radius: 42px;
}

.screen-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-md) 22px var(--space-lg);
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 122, 232, 0.45) transparent;
}

.screen-top {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  padding: 24px 22px var(--space-md);
}

.screen-top .page-header,
.screen-top .page-header-stack,
.screen-top .page-header-inline,
.screen-top .app-header,
.screen-top .top-bar,
.screen-top .journey-header {
  margin: 0;
}

.screen-body::-webkit-scrollbar {
  width: 6px;
}

.screen-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(168, 122, 232, 0.45);
}

@media (min-width: 521px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  body {
    min-height: 100dvh;
    position: relative;
    isolation: isolate;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      linear-gradient(180deg, rgba(235, 226, 248, 0.18) 0%, rgba(250, 247, 255, 0.08) 100%),
      var(--shell-bg-image) center center / cover no-repeat,
      var(--shell-bg);
  }

  .app-shell {
    position: relative;
    z-index: 1;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    padding-block: 16px;
  }

  .phone-frame {
    --preview-h: min(
      calc(100dvh - var(--phone-preview-vh-inset)),
      var(--phone-preview-max-height)
    );
    --preview-w: min(
      calc(var(--preview-h) * var(--phone-ratio-w) / var(--phone-ratio-h)),
      var(--phone-preview-max-width),
      100%
    );
    width: var(--preview-w);
    height: min(var(--preview-h), calc(var(--preview-w) * var(--phone-ratio-h) / var(--phone-ratio-w)));
    min-height: 0;
    max-height: var(--phone-preview-max-height);
  }

  .screen,
  .splash-screen {
    height: 100%;
    min-height: 0;
  }
}

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

.screen::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 260px;
  background: linear-gradient(180deg, var(--purple) 0%, #b888f8 72%, var(--app-bg) 100%);
  border-radius: 0 0 36px 36px;
  z-index: 0;
  pointer-events: none;
}

.center-screen::after {
  display: none;
}

.splash-frame {
  background: transparent;
}

.splash-screen {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(96px, 24vh) auto auto;
  align-content: stretch;
  gap: 0;
  padding: 36px 24px 24px;
  border-radius: 42px;
  color: var(--purple-deep);
  text-align: center;
  box-shadow: 0 32px 80px rgba(82, 60, 130, 0.24);
  overflow: hidden;
  overscroll-behavior: contain;
  background:
    linear-gradient(180deg, rgba(253, 251, 255, 0.55) 0%, rgba(253, 251, 255, 0.08) 28%, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, 0) 58%, rgba(232, 248, 239, 0.35) 78%, rgba(232, 248, 239, 0.72) 100%),
    url("../assets/illustrations/splash-full.png") center center / cover no-repeat,
    linear-gradient(180deg, #dff3ff 0%, #f6effc 32%, #ede4ff 52%, #e8f8ef 72%, #d4f0e0 100%);
}

.splash-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  mix-blend-mode: soft-light;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.splash-glow {
  display: none;
}

.splash-brand,
.splash-middle,
.splash-headline,
.splash-footer {
  position: relative;
  z-index: 1;
}

.splash-brand {
  padding-top: 4px;
  padding-bottom: var(--space-sm);
}

.splash-middle {
  min-height: 0;
  pointer-events: none;
}

.splash-art-wrap {
  display: none;
}

.splash-brand h1 {
  margin: 0 0 4px;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--purple-deep);
}

.splash-art-wrap {
  display: grid;
  gap: var(--space-md);
  justify-items: center;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.splash-illustration {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 36px rgba(55, 20, 90, 0.16));
}

.splash-feature-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
}

.splash-brand p {
  margin: 0;
  color: #8b6cb8;
  font-size: 15px;
  font-weight: 600;
}

.splash-tagline {
  margin-top: 2px;
}

.splash-dual {
  display: grid;
  gap: 3px;
  justify-items: center;
}

.splash-line-ar,
.splash-headline .splash-dual .splash-line-ar {
  color: var(--purple-deep);
  font-weight: 800;
}

.splash-line-en,
.splash-headline span .splash-line-en {
  color: #8b6cb8;
  font-weight: 600;
  font-size: 0.92em;
}

.splash-headline .splash-dual {
  justify-items: center;
}

.splash-headline strong .splash-line-ar {
  font-size: 24px;
  line-height: 1.15;
}

.splash-headline strong .splash-line-en {
  font-size: 17px;
}

.splash-headline span .splash-line-ar {
  font-size: 15px;
  font-weight: 700;
}

.splash-headline span .splash-line-en {
  font-size: 13px;
}

.splash-feature-strip li {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(186, 154, 230, 0.32);
  background: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-deep);
  backdrop-filter: blur(6px);
}

.splash-pill-ar {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--purple-deep);
}

.splash-pill-en {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #8b6cb8;
}

.splash-cta-text {
  display: grid;
  gap: 1px;
  line-height: 1.15;
  text-align: start;
}

.splash-cta-ar {
  font-size: 16px;
  font-weight: 800;
  color: var(--purple-deep);
}

.splash-cta-en {
  font-size: 12px;
  font-weight: 700;
  color: #8b6cb8;
}

.splash-lang-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.splash-headline {
  display: grid;
  gap: 6px;
  padding: var(--space-sm) 0;
}

.splash-headline strong {
  display: block;
  font-weight: 800;
  line-height: 1.15;
}

.splash-headline > span {
  display: block;
}

.splash-footer {
  display: grid;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-sm);
}

.splash-cta {
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--purple-deep);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(55, 20, 90, 0.22);
  cursor: pointer;
}

.splash-cta .ui-icon {
  width: 18px;
  height: 18px;
}

.splash-cta:active {
  transform: scale(0.99);
}

.splash-lang {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(186, 154, 230, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--purple-deep);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.splash-lang .ui-icon {
  width: 18px;
  height: 18px;
}

.top-bar,
.page-header,
.journey-header,
.action-row,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.top-bar,
.page-header,
.journey-header {
  margin-top: 22px;
}

.section-heading {
  margin: var(--space-section) 0 var(--space-md);
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.icon-button {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  line-height: 0;
  border: var(--outline);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 0;
  box-shadow: none;
  flex-shrink: 0;
}

.icon-button .ui-icon {
  width: 22px;
  height: 22px;
  display: block;
  margin: 0;
}

.profile-avatar-button {
  overflow: hidden;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.88);
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 100%);
  box-shadow: 0 6px 16px rgba(168, 122, 232, 0.14);
}

.profile-avatar-thumb,
.profile-avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-avatar-button .profile-avatar-thumb {
  border-radius: 50%;
}

.status-pill {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: var(--outline);
  background: var(--paper);
  color: var(--purple-deep);
  font-weight: 700;
  font-size: 13px;
  box-shadow: none;
}

.language-button {
  min-height: 40px;
  border: var(--outline);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 14px;
  font-weight: 700;
  box-shadow: none;
}

.greeting {
  margin: var(--space-md) 0 var(--space-lg);
}

.greeting h1,
.page-header h1,
.top-bar h1 {
  color: #fff;
  font-weight: 800;
}

.greeting p {
  margin-top: var(--space-xs);
  color: rgba(255, 255, 255, 0.85);
}

.eyebrow,
.subject-row p,
.lesson-row p,
.journey-item p {
  margin: 0;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 800;
}

h2 {
  margin: 0 0 var(--space-sm);
  font-size: 22px;
  font-weight: 700;
}

h3 {
  margin: 0 0 var(--space-xs);
  font-size: 17px;
  font-weight: 700;
}

.hero-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: var(--space-md);
  min-height: 128px;
  padding: 20px;
  margin-bottom: var(--space-md);
  border: var(--outline);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: none;
}

.hero-text {
  display: grid;
  gap: var(--space-xs);
}

.hero-text .eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-card .primary-button {
  margin-top: 0;
}

.hero-meta {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.hero-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.hero-actions .primary-button,
.hero-actions .secondary-button {
  flex: 1 1 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  font-size: 14px;
}

.lesson-art {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: white;
  font-size: 28px;
  font-weight: 800;
}

.math-art {
  background: linear-gradient(145deg, var(--blue), var(--violet));
}

.meter {
  height: 8px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  overflow: hidden;
  margin-top: var(--space-xs);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.hero-card .meter {
  background: rgba(255, 255, 255, 0.9);
}

.subject-row .meter,
.lesson-row .meter,
.gap-row .meter {
  background: #edf0f5;
  box-shadow: none;
}

.subject-bar-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.meter span,
.subject-bar-track span {
  display: block;
  height: 100%;
  background: var(--purple);
  border-radius: inherit;
}

.meter.small,
.meter.tiny {
  width: 126px;
}

.meter.tiny {
  height: 7px;
  margin-top: 8px;
}

.primary-button,
.secondary-button,
.text-button {
  border: 0;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: #1b1b1d;
  box-shadow: none;
}

.secondary-button {
  color: var(--ink);
  background: var(--paper);
  border: var(--outline);
  box-shadow: none;
}

.text-button {
  background: transparent;
  color: var(--purple-deep);
  box-shadow: none;
  font-weight: 700;
  min-height: auto;
  padding: var(--space-xs) var(--space-sm);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin: var(--space-lg) 0 var(--space-section);
}

.stat-card {
  min-height: 112px;
  border: var(--outline);
  border-radius: 24px;
  background: var(--paper);
  display: grid;
  place-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  text-align: center;
  box-shadow: none;
}

.stat-card strong {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.stat-card span {
  font-size: 13px;
  color: var(--muted);
}

.subject-list,
.lesson-list,
.journey-list {
  display: grid;
  gap: var(--space-md);
}

.subject-row,
.lesson-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: var(--space-md);
  min-height: 78px;
  padding: 14px 16px;
  border: var(--outline);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: none;
}

.subject-row > div,
.lesson-row > div {
  display: grid;
  gap: var(--space-xs);
}

.subject-row h3,
.lesson-row h3 {
  margin: 0;
}

.subject-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
}

.blue {
  background: var(--pastel-blue);
  color: var(--blue);
}

.green {
  background: var(--pastel-mint);
  color: #2ea86a;
}

.violet {
  background: var(--pastel-lavender);
  color: var(--purple-deep);
}

.amber {
  background: var(--pastel-peach);
  color: #e08a2e;
}

.teal {
  background: #e0f7fa;
  color: #159a9c;
}

.emerald {
  background: var(--pastel-mint);
  color: #0f8f63;
}

.wide {
  flex: 1;
  width: 100%;
}

.action-row {
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.split-view {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.lesson-detail,
.quiz-card,
.chat-panel {
  border: var(--outline);
  border-radius: 30px;
  background: var(--paper);
  padding: 22px;
  box-shadow: none;
}

.lead {
  color: var(--ink);
  line-height: 1.75;
  font-size: 17px;
  margin: var(--space-sm) 0 var(--space-md);
}

.curriculum-text {
  text-align: start;
  display: grid;
  gap: var(--space-md);
}

.soft-list {
  margin: var(--space-sm) 0 0;
  padding: 0 20px 0 0;
  line-height: 1.75;
}

.example-box {
  margin-top: var(--space-sm);
  padding: var(--space-md);
  border: var(--outline);
  border-radius: 20px;
  background: var(--paper);
  line-height: 1.7;
}

.question-block {
  border: 0;
  padding: 0;
  margin: var(--space-lg) 0;
}

.question-block legend {
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.6;
  font-size: 16px;
}

.question-block label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 52px;
  padding: 12px 16px;
  margin-top: var(--space-sm);
  border: var(--outline);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: none;
}

.question-block input {
  width: 22px;
  height: 22px;
}

.result-box {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: 20px;
  background: var(--pastel-mint);
  color: #126b44;
}

.journey-list {
  margin-top: var(--space-lg);
}

.progress-tabs,
.filter-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.filter-pills {
  grid-template-columns: repeat(4, 1fr);
}

.progress-tabs button,
.filter-pills button {
  min-height: 46px;
  border: var(--outline);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-weight: 700;
  box-shadow: none;
}

.progress-tabs .active,
.filter-pills .active {
  background: var(--pastel-lavender);
  color: var(--purple-deep);
}

.overall-card,
.achievement-hero,
.parent-card,
.ngo-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  padding: 22px;
  border: var(--outline);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: none;
}

.ring-progress {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--purple) calc(var(--value) * 1%), #edf0f5 0);
  color: var(--ink);
  font-weight: 800;
  position: relative;
  flex-shrink: 0;
}

.ring-progress::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
  z-index: 1;
}

.ring-progress-label {
  position: relative;
  z-index: 2;
  line-height: 1;
}

.ring-progress {
  isolation: isolate;
}

.ring-progress::after {
  content: attr(style);
  display: none;
}

.ring-progress {
  font-size: 18px;
}

.ring-progress > * {
  z-index: 1;
}

.journey-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: var(--space-md);
  min-height: 88px;
  padding: 14px 16px;
  border: var(--outline);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: none;
}

.journey-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 3px solid #ddd6e8;
  color: #9890a8;
  font-weight: 800;
}

.journey-item.done .journey-dot {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.journey-item.active {
  padding: 14px 16px;
  border: var(--outline);
  border-radius: 24px;
  background: var(--pastel-lavender);
  box-shadow: none;
}

.journey-item.active .journey-dot {
  border-color: var(--purple);
  color: var(--purple);
}

.journey-item h2 {
  margin: 0 0 var(--space-xs);
  font-size: 18px;
}

.chat-panel {
  min-height: 650px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--space-md);
}

.page-tutor .chat-panel,
.page-tutor .chat-panel-full {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  overflow: auto;
  padding-bottom: var(--space-md);
}

.bubble {
  max-width: 82%;
  padding: 16px 18px;
  border-radius: 24px;
  line-height: 1.65;
}

.bubble p {
  margin: 0 0 14px;
}

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

.option-block {
  display: grid;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
  padding: var(--space-md);
  border-radius: 22px;
  background: var(--pastel-lavender);
}

.option-chip {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: var(--space-sm);
  min-height: 52px;
  padding: 10px 12px;
  border: var(--outline);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-align: start;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option-chip:hover,
.option-chip:focus-visible {
  background: #fafafa;
  border-color: var(--border-strong);
  box-shadow: none;
  transform: none;
}

.option-chip:active {
  transform: none;
  box-shadow: none;
}

.option-chip b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.option-block strong {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.bubble.assistant {
  align-self: flex-start;
  background: var(--paper);
  border: var(--outline);
  box-shadow: none;
}

.bubble.user {
  align-self: flex-end;
  background: var(--violet);
  color: #fff;
  border: 0;
}

.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  opacity: 0.35;
  animation: typingPulse 1s infinite ease-in-out;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-sm);
}

.chat-form input {
  min-height: 52px;
  border: var(--outline);
  border-radius: 999px;
  padding: 0 18px;
  background: var(--paper);
  box-shadow: none;
}

.voice-lesson-card {
  display: grid;
  justify-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  padding: 28px 22px;
  border: var(--outline);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: none;
  text-align: center;
}

.voice-visual {
  width: 100%;
  min-height: 170px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--pastel-peach);
  color: #d97706;
  font-size: 38px;
  font-weight: 800;
}

.mic-button {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 8px solid var(--pastel-lavender);
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 42px;
}

.badge-grid,
.locker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.badge-card,
.locker-item {
  min-height: 138px;
  display: grid;
  align-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: var(--outline);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: none;
}

.avatar {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--pastel-lavender);
  font-size: 44px;
  flex-shrink: 0;
}

.ngo-header {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: var(--space-sm);
  margin: -38px -22px var(--space-lg);
  padding: 52px 24px 24px;
  background: linear-gradient(180deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: #fff;
  border-radius: 0 0 36px 36px;
  position: relative;
  z-index: 2;
}

.ngo-header h1 {
  font-size: 22px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  margin: 0;
}

.ngo-panel {
  background: var(--paper);
  color: var(--ink);
  border: var(--outline);
  box-shadow: none;
}

.profile-actions {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding: var(--space-md);
  border: var(--outline);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: none;
}

.bottom-nav {
  position: relative;
  flex-shrink: 0;
  left: auto;
  right: auto;
  bottom: auto;
  min-height: 90px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--paper);
  border-top: var(--outline);
  border-radius: 0 0 42px 42px;
  box-shadow: none;
  z-index: 3;
}

.nav-item {
  border: 0;
  background: transparent;
  color: #7c7b84;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  min-width: 0;
  padding: var(--space-sm) 0;
}

.profile-card {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding: 22px;
  border: var(--outline);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: none;
}

.profile-card input,
.profile-card select {
  min-height: 52px;
  width: 100%;
  border: var(--outline);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 0 18px;
  font: inherit;
  box-shadow: none;
}

.current-curriculum,
.tutor-curriculum {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md) 18px;
  border-radius: 24px;
  border: var(--outline);
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
}

.tutor-curriculum {
  margin: var(--space-md) 0;
}

.home-curriculum {
  margin: var(--space-md) 0 var(--space-lg);
}

.nav-item.active {
  background: transparent;
  color: var(--ink);
  font-weight: 900;
}

.nav-icon {
  font-size: 23px;
  line-height: 1;
}

.lesson-row strong {
  color: var(--purple);
  font-size: 18px;
  font-weight: 700;
}

.subject-row .meter span,
.lesson-row .meter span,
.gap-row .meter span {
  background: var(--purple);
}

.center-screen {
  display: grid;
  place-items: center;
  text-align: center;
}

.math-inline {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--pastel-lavender);
  border: 0;
  font-weight: 700;
}

.bubble.loading {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--muted);
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typingPulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chat-form input:disabled,
.chat-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.badge-card > span {
  font-size: 42px;
}

.gap-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
}

.need-tags {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.need-tags span {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--pastel-peach);
  font-weight: 700;
}

.profile-actions h2 {
  margin: 0 0 var(--space-xs);
  font-size: 18px;
}

.profile-card label {
  display: grid;
  gap: var(--space-xs);
  color: var(--muted);
  font-weight: 700;
}

.profile-card h2 {
  margin: var(--space-sm) 0 0;
  color: var(--ink);
}

.current-curriculum span,
.tutor-curriculum span {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.save-note {
  margin: var(--space-sm) 0 0;
  color: #168451;
  font-weight: 700;
  text-align: center;
}

.quick-grid .stat-card:nth-child(1),
.stat-row .stat-card:nth-child(1),
.parent-stat:nth-child(1) {
  background: var(--pastel-blue);
}

.quick-grid .stat-card:nth-child(2),
.stat-row .stat-card:nth-child(2),
.parent-stat:nth-child(2) {
  background: var(--pastel-peach);
}

.quick-grid .stat-card:nth-child(3),
.stat-row .stat-card:nth-child(3),
.parent-stat:nth-child(3) {
  background: var(--pastel-lavender);
}

.quick-grid .stat-card:nth-child(4) {
  background: var(--pastel-mint);
}

@media (max-width: 520px) {
  .app-shell {
    display: block;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding: 0;
    background: var(--app-bg);
  }

  .phone-frame {
    grid-column: auto;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    border-radius: 0;
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .screen {
    min-height: 100dvh;
    height: auto;
    border-radius: 0;
  }

  .screen-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .screen-top {
    padding: 24px 16px var(--space-md);
  }

  .splash-screen {
    min-height: 100dvh;
    height: auto;
  }

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

  .chat-form {
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    border-radius: 0;
  }

  .lessons-layout {
    grid-template-columns: 1fr;
  }
}

/* Icons */
.ui-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.nav-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.subject-icon .ui-icon {
  width: 26px;
  height: 26px;
}

.stat-icon .ui-icon,
.bot-avatar .ui-icon,
.msg-avatar .ui-icon,
.achievement-icon .ui-icon,
.locker-icon .ui-icon,
.badge-icon .ui-icon {
  width: 28px;
  height: 28px;
}

.book-logo .ui-icon {
  width: 44px;
  height: 44px;
}

.voice-visual .ui-icon,
.mic-button .ui-icon {
  width: 36px;
  height: 36px;
}

.mic-button .ui-icon {
  width: 42px;
  height: 42px;
}

.status-pill,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button.icon-only {
  width: 52px;
  min-width: 52px;
  padding: 0;
}

.journey-dot .ui-icon,
.row-status .ui-icon {
  width: 18px;
  height: 18px;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 var(--space-xs);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.page-kicker .ui-icon {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.95);
}

.panel-card .page-kicker,
.ngo-panel .page-kicker,
.current-curriculum .panel-label {
  color: var(--muted);
}

.panel-card .page-kicker .ui-icon,
.current-curriculum .panel-label .ui-icon {
  color: var(--purple-deep);
}

.page-title-block {
  display: grid;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
}

.page-title-block .page-kicker {
  margin: 0;
}

.page-title-block h1 {
  margin: 0;
  line-height: 1.15;
}

.header-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lesson-chapter-label {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple-deep);
}

.page-header-stack {
  align-items: flex-start;
}

.page-header-inline {
  align-items: center;
}

.screen-top .page-header.page-header-inline.app-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.screen-top .page-header-inline .page-title-block {
  flex: unset;
  min-width: 0;
  overflow: hidden;
}

.screen-top .page-header-inline .page-kicker {
  display: block;
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-top .page-header-inline h1,
.screen-top .page-header-inline .header-title-link,
.screen-top .page-header-inline .tutor-lesson-link {
  font-size: clamp(18px, 4.8vw, 24px);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-top .page-header-inline .icon-button,
.screen-top .page-header-inline .profile-avatar-button {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.screen-top .top-actions {
  flex-wrap: nowrap;
  gap: 6px;
  flex-shrink: 0;
  justify-content: flex-end;
}

.screen-top .language-button-compact,
.screen-top .status-pill {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.screen-top .language-button-compact {
  min-width: 36px;
  font-weight: 800;
}

.screen-top .status-pill-icon-only {
  width: 36px;
  min-width: 36px;
  padding: 0;
  position: relative;
}

.screen-top .status-pill-step {
  min-width: 0;
  padding: 0 8px;
  font-size: 11px;
}

.screen-top .status-pill-icon-only .status-pill-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-top .status-pill .ui-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.page-header-inline .page-title-block {
  flex: 1;
  min-width: 0;
}

.page-header-inline .icon-button,
.page-header-inline .top-actions {
  flex-shrink: 0;
}

.panel-card {
  border: var(--outline);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: none;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.panel-count {
  min-width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--pastel-lavender);
  color: var(--purple-deep);
  font-weight: 800;
  font-size: 13px;
}

.panel-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}

.stat-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  margin-bottom: var(--space-xs);
}

.stat-icon-purple {
  background: var(--pastel-lavender);
  color: var(--purple-deep);
}

.stat-icon-gold {
  background: var(--pastel-peach);
  color: #d97706;
}

.stat-icon-blue {
  background: var(--pastel-blue);
  color: var(--blue);
}

.stat-icon-mint {
  background: var(--pastel-mint);
  color: #2ea86a;
}

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

.row-status {
  color: var(--purple-deep);
  display: grid;
  place-items: center;
}

.lesson-row.is-selected {
  background: var(--pastel-lavender);
  box-shadow: 0 0 0 2px rgba(197, 153, 255, 0.35);
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.subject-tile {
  position: relative;
  overflow: hidden;
  padding: var(--space-md);
  padding-top: calc(var(--space-md) + 8px);
  border: var(--outline);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: none;
  display: grid;
  gap: var(--space-xs);
}

.subject-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
}

.subject-tile.blue::before {
  background: var(--pastel-blue);
}

.subject-tile.green::before,
.subject-tile.emerald::before {
  background: var(--pastel-mint);
}

.subject-tile.violet::before {
  background: var(--pastel-lavender);
}

.subject-tile.amber::before {
  background: var(--pastel-peach);
}

.subject-tile.teal::before {
  background: #e4f5f5;
}

.subject-tile .meter {
  background: #edf0f5;
  box-shadow: none;
}

.subject-tile-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f5f6f8;
  color: var(--purple-deep);
}

.subject-tile.blue h3 {
  color: var(--blue);
}

.subject-tile.green h3,
.subject-tile.emerald h3 {
  color: #2ea86a;
}

.subject-tile.violet h3 {
  color: var(--purple-deep);
}

.subject-tile.amber h3 {
  color: #e08a2e;
}

.subject-tile.teal h3 {
  color: #159a9c;
}

.subject-tile.blue .subject-tile-icon {
  background: var(--pastel-blue);
  color: var(--blue);
}

.subject-tile.green .subject-tile-icon,
.subject-tile.emerald .subject-tile-icon {
  background: var(--pastel-mint);
  color: #2ea86a;
}

.subject-tile.violet .subject-tile-icon {
  background: var(--pastel-lavender);
  color: var(--purple-deep);
}

.subject-tile.amber .subject-tile-icon {
  background: var(--pastel-peach);
  color: #e08a2e;
}

.subject-tile.teal .subject-tile-icon {
  background: #e4f5f5;
  color: #159a9c;
}

.subject-tile h3 {
  margin: 0;
  font-size: 15px;
}

.subject-tile p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Page: Home */
.page-home::after {
  height: 280px;
}

.page-home .home-continue {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 1px solid rgba(186, 154, 230, 0.22);
  border-radius: 28px;
  background: linear-gradient(165deg, #fdfbff 0%, #f6effc 52%, #faf6ff 100%);
  box-shadow: 0 10px 28px rgba(168, 122, 232, 0.08);
}

.home-continue-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #a78bdb;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-continue-kicker .ui-icon {
  width: 14px;
  height: 14px;
  color: #b794f6;
}

.home-continue-banner {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(186, 154, 230, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.home-continue-banner-image {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: cover;
  object-position: center;
}

.page-home .home-continue h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
}

.page-home .home-continue .hero-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.page-home .home-continue .subject-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.page-home .home-continue .ring-progress {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  font-size: 13px;
  background: conic-gradient(#c599ff calc(var(--value) * 1%), #e9dff5 0);
}

.page-home .home-continue .ring-progress::before {
  inset: 9px;
  background: #fff;
}

.page-home .home-continue .ring-progress-label {
  color: var(--ink);
  font-weight: 800;
}

.home-continue-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.home-continue-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.home-continue-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  align-items: stretch;
}

.page-home .home-continue .primary-button {
  min-height: 48px;
  color: #fff;
  background: linear-gradient(135deg, #c599ff 0%, #a87ae8 100%);
  box-shadow: 0 8px 18px rgba(168, 122, 232, 0.22);
}

.page-home .home-continue .secondary-button {
  min-height: 48px;
  color: #8b6cc7;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(186, 154, 230, 0.35);
}

.page-home .home-continue .primary-button,
.page-home .home-continue .secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.page-home .home-continue .primary-button .ui-icon,
.page-home .home-continue .secondary-button .ui-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.home-action-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: var(--space-xs);
  place-items: center;
  min-height: 96px;
  padding: var(--space-md) var(--space-sm);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(150, 130, 190, 0.08);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.home-action-card.tone-blue {
  background: linear-gradient(155deg, #f3f5ff 0%, #e8eeff 52%, #fafbff 100%);
}

.home-action-card.tone-amber {
  background: linear-gradient(155deg, #fff5f0 0%, #ffe4d4 52%, #fff8f4 100%);
}

.home-action-card.tone-violet {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.home-action-card.tone-blue::after,
.stat-chip.tone-blue::after,
.page-home .tool-tile.tone-blue::after {
  background:
    radial-gradient(circle at 18% 84%, rgba(255, 255, 255, 0.88) 0%, transparent 50%),
    radial-gradient(circle at 86% 14%, rgba(186, 198, 255, 0.55) 0%, transparent 44%);
}

.home-action-card.tone-amber::after,
.stat-chip.tone-amber::after,
.page-home .tool-tile.tone-amber::after {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9) 0%, transparent 48%),
    radial-gradient(circle at 82% 78%, rgba(255, 168, 112, 0.48) 0%, transparent 46%);
}

.home-action-card.tone-violet::after,
.stat-chip.tone-lavender::after,
.page-home .tool-tile.tone-violet::after {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.88) 0%, transparent 46%),
    radial-gradient(circle at 14% 86%, rgba(214, 188, 255, 0.5) 0%, transparent 48%);
}

.stat-chip.tone-mint::after,
.page-home .tool-tile.tone-emerald::after {
  background:
    radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.9) 0%, transparent 46%),
    radial-gradient(circle at 80% 78%, rgba(186, 236, 214, 0.48) 0%, transparent 48%);
}

.home-action-card svg {
  width: 28px;
  height: 28px;
  color: var(--purple-deep);
}

.home-action-card.tone-blue svg {
  color: #6b7fd7;
}

.home-action-card.tone-amber svg {
  color: #e07a3a;
}

.home-action-card.tone-violet svg {
  color: #9b7fd9;
}

.home-action-card > *,
.stat-chip > *,
.page-home .tool-tile > * {
  position: relative;
  z-index: 1;
}

.home-summary {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: var(--space-md);
}

.home-summary div {
  display: grid;
  gap: 2px;
}

.home-summary strong {
  font-size: 22px;
  font-weight: 800;
}

.home-summary span {
  font-size: 13px;
  color: var(--muted);
}

.home-stats-strip {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.stat-chip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 2px;
  padding: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(150, 130, 190, 0.08);
}

.stat-chip.tone-mint {
  background: linear-gradient(155deg, #f2fbf6 0%, #e7f6ef 52%, #f8fffb 100%);
}

.stat-chip.tone-blue {
  background: linear-gradient(155deg, #f3f5ff 0%, #e8eeff 52%, #fafbff 100%);
}

.stat-chip.tone-lavender {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.stat-chip.tone-amber {
  background: linear-gradient(155deg, #fff5f0 0%, #ffe4d4 52%, #fff8f4 100%);
}

.stat-chip strong {
  font-size: 20px;
  font-weight: 800;
}

.stat-chip span {
  font-size: 12px;
  color: var(--muted);
}

.stat-chip-link {
  cursor: pointer;
  font: inherit;
  color: inherit;
  place-items: center;
  text-align: center;
}

.page-home .section-heading h2,
.page-home .learning-tools h2 {
  color: var(--purple-deep);
}

.page-home .subject-scroll-row {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 0 var(--space-lg);
  padding: 2px 0 var(--space-xs);
  max-width: 100%;
  min-width: 0;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.page-home .subject-scroll-row::-webkit-scrollbar {
  display: none;
}

.page-home .subject-scroll-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 0 0 110px;
  scroll-snap-align: start;
  display: grid;
  gap: 5px;
  place-items: center;
  text-align: center;
  padding: 12px 8px;
  border: 0;
  border-radius: 20px;
  min-height: 158px;
}

.page-home .subject-scroll-card[data-open-subject] {
  cursor: pointer;
}

.page-home .subject-scroll-card[data-open-subject]:active {
  transform: scale(0.98);
}

.page-home .subject-scroll-card-art {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.14));
}

.page-home .subject-scroll-card strong {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  line-height: 1.2;
}

.page-home .subject-scroll-meta {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.page-home .subject-scroll-card .ring-on-gradient {
  position: relative;
  z-index: 1;
  margin-top: 2px;
  width: 48px;
  height: 48px;
  background: conic-gradient(rgba(255, 255, 255, 0.96) calc(var(--value) * 1%), rgba(255, 255, 255, 0.22) 0);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.page-home .subject-scroll-card .ring-on-gradient::before {
  inset: 6px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}

.page-home .subject-progress-grid {
  margin-bottom: var(--space-lg);
}

.page-home .subject-progress-card[data-open-subject] {
  cursor: pointer;
}

.page-home .subject-progress-card[data-open-subject]:active {
  transform: scale(0.99);
}

.page-home .tool-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(150, 130, 190, 0.08);
  font-family: inherit;
  width: 100%;
}

.page-home .tool-tile.tone-blue {
  background: linear-gradient(155deg, #f3f5ff 0%, #e8eeff 52%, #fafbff 100%);
}

.page-home .tool-tile.tone-amber {
  background: linear-gradient(155deg, #fff5f0 0%, #ffe4d4 52%, #fff8f4 100%);
}

.page-home .tool-tile.tone-emerald {
  background: linear-gradient(155deg, #f2fbf6 0%, #e7f6ef 52%, #f8fffb 100%);
}

.page-home .tool-tile.tone-violet {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.page-home .tool-tile.tone-blue svg {
  color: #6b7fd7;
}

.page-home .tool-tile.tone-amber svg {
  color: #e07a3a;
}

.page-home .tool-tile.tone-emerald svg {
  color: #5cb894;
}

.page-home .tool-tile.tone-violet svg {
  color: #9b7fd9;
}

.stat-chip-link svg {
  width: 24px;
  height: 24px;
  color: var(--purple-deep);
}

button.stat-chip,
button.activity-pill,
button.locker-item,
button.locker-featured,
button.badge-showcase-item,
button.need-tag {
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: inherit;
}

button.stat-chip {
  width: 100%;
}

button.locker-item,
button.locker-featured {
  width: 100%;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: inherit;
}

button.locker-featured {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-md);
  text-align: start;
}

button.badge-showcase-item {
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: inherit;
}

button.need-tag {
  border: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--pastel-peach);
  font-weight: 600;
}

button.activity-pill {
  width: 100%;
  border: 0;
  text-align: start;
}

.screen-top .header-title-link,
.screen-top .tutor-lesson-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  max-width: 100%;
}

.screen-top .header-title-link:hover,
.screen-top .tutor-lesson-link:hover {
  color: #fff;
}

.header-title-link {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  text-align: start;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tutor-lesson-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tutor-lesson-link:hover {
  color: var(--purple-deep);
}

.profile-quick-actions {
  display: grid;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
}

.empty-state {
  display: grid;
  gap: var(--space-md);
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.empty-state-action {
  justify-self: center;
  min-width: 180px;
}

.filter-pills button {
  cursor: pointer;
  font: inherit;
}

.subject-carousel {
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.subject-carousel-track {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
  scrollbar-width: none;
}

.subject-carousel-track::-webkit-scrollbar {
  display: none;
}

.subject-chip {
  flex: 0 0 132px;
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md);
  padding-top: calc(var(--space-md) + 6px);
  border: var(--outline);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: none;
  text-align: start;
  cursor: pointer;
  font: inherit;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.subject-chip::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
}

.subject-chip.blue::before { background: var(--pastel-blue); }
.subject-chip.green::before,
.subject-chip.emerald::before { background: var(--pastel-mint); }
.subject-chip.violet::before { background: var(--pastel-lavender); }
.subject-chip.amber::before { background: var(--pastel-peach); }
.subject-chip.teal::before { background: #e4f5f5; }

.subject-chip-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f5f6f8;
  color: var(--purple-deep);
}

.subject-chip strong {
  font-size: 14px;
}

.subject-chip > span:not(.subject-chip-icon) {
  font-size: 12px;
  color: var(--muted);
}

.segment-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--space-xs);
  padding: 5px;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-lg);
  border-radius: 999px;
  border: var(--outline);
  background: var(--paper);
  box-shadow: none;
}

.segment-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.segment-tabs button.active {
  background: var(--pastel-lavender);
  color: var(--purple-deep);
  box-shadow: none;
}

.ring-progress-sm {
  width: 56px;
  height: 56px;
  font-size: 13px;
  z-index: 0;
}

.ring-progress-sm::before {
  inset: 7px;
}

.subject-progress-card .ring-on-gradient .ring-progress-label {
  color: #fff;
}

.subject-progress-card .ring-on-gradient.is-complete::before,
.page-home .subject-scroll-card .ring-on-gradient.is-complete::before {
  background: rgba(255, 255, 255, 0.94);
}

.subject-progress-card .ring-on-gradient.is-complete .ring-progress-label,
.page-home .subject-scroll-card .ring-on-gradient.is-complete .ring-progress-label {
  color: var(--purple-deep);
  font-size: 11px;
}

.subject-progress-card .ring-on-gradient.is-complete .ring-progress-label .ui-icon,
.page-home .subject-scroll-card .ring-on-gradient.is-complete .ring-progress-label .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--purple-deep);
}

.ring-progress > *,
.ring-progress {
  position: relative;
  z-index: 1;
}

.ring-progress-lg {
  width: 96px;
  height: 96px;
  font-size: 20px;
}

.ring-progress-lg::before {
  inset: 12px;
}

button.subject-tile {
  border: var(--outline);
  text-align: start;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
}

button.subject-tile:active {
  transform: scale(0.98);
}

/* Page: Lessons */
.page-lessons::after {
  height: 200px;
}

.lessons-learn-banner {
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-bottom: var(--space-md);
  border: 1px solid rgba(186, 154, 230, 0.2);
  border-radius: 24px;
  background: linear-gradient(165deg, #fdfbff 0%, #f6effc 52%, #faf6ff 100%);
  box-shadow: 0 10px 28px rgba(168, 122, 232, 0.08);
}

.lessons-learn-banner-art {
  position: relative;
  overflow: hidden;
  border-radius: inherit;
}

.lessons-learn-banner-image {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: cover;
  object-position: center;
}

.lessons-learn-banner-copy {
  position: absolute;
  inset: auto 0 0;
  margin: 0;
  padding: 28px 16px 14px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  text-align: start;
  text-shadow: 0 2px 12px rgba(55, 20, 90, 0.35);
  background: linear-gradient(180deg, transparent 0%, rgba(88, 40, 160, 0.72) 100%);
}

.subject-filters {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 3px 4px;
  overflow: visible;
  margin-bottom: var(--space-md);
}

.subject-filters .filter-chip {
  flex: 0 1 auto;
  width: auto;
  min-height: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: var(--outline);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
}

.filter-chip.active {
  background: var(--purple-deep);
  color: #fff;
  border-color: var(--purple-deep);
}

.lesson-catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.lesson-catalog-header h2 {
  margin: 0;
  font-size: 18px;
}

.lesson-catalog {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.lesson-catalog-blocks {
  display: grid;
  gap: var(--space-xl);
}

.subject-block {
  border: var(--outline);
  border-radius: 28px;
  overflow: hidden;
  background: var(--paper);
}

.subject-block-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-bottom: 0;
}

.subject-block-hero::before,
.subject-progress-card::before,
.subject-scroll-card::before,
.progress-subject-row::before,
.page-progress .week-chart::before,
.home-action-card::before,
.stat-chip::before,
.page-home .tool-tile::before,
.page-achievements .achievement-showcase::before,
.page-achievements .badge-showcase-item::before,
.page-achievements .badge-card::before,
.page-parent .parent-ring-card::before,
.page-parent .week-chart::before,
.page-ngo .ngo-camp-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.38;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.home-action-card::before,
.stat-chip::before,
.page-home .tool-tile::before,
.page-achievements .achievement-showcase::before,
.page-achievements .badge-showcase-item::before,
.page-achievements .badge-card::before,
.progress-subject-row::before,
.page-progress .week-chart::before,
.page-parent .parent-ring-card::before,
.page-parent .week-chart::before,
.page-ngo .ngo-camp-banner::before {
  opacity: 0.36;
  mix-blend-mode: soft-light;
  background-size: 140px 140px;
}

.subject-block-hero::after,
.subject-progress-card::after,
.subject-scroll-card::after,
.home-action-card::after,
.stat-chip::after,
.page-home .tool-tile::after,
.page-achievements .achievement-showcase::after,
.page-achievements .badge-showcase-item::after,
.page-achievements .badge-card:not(.locked)::after,
.page-parent .parent-ring-card::after,
.page-parent .week-chart::after,
.page-ngo .ngo-camp-banner::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: soft-light;
}

.home-action-card::after,
.stat-chip::after,
.page-home .tool-tile::after,
.page-achievements .achievement-showcase::after,
.page-achievements .badge-showcase-item::after,
.page-achievements .badge-card:not(.locked)::after,
.page-parent .parent-ring-card::after,
.page-parent .week-chart::after,
.page-ngo .ngo-camp-banner::after {
  opacity: 0.32;
}

.subject-block.blue .subject-block-hero,
.subject-progress-card.blue,
.subject-scroll-card.blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #39ace3 38%, #818cf8 72%, #c599ff 100%);
}

.subject-block.blue .subject-block-hero::after,
.subject-progress-card.blue::after,
.subject-scroll-card.blue::after {
  background:
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.45) 0%, transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(197, 153, 255, 0.65) 0%, transparent 38%);
}

.subject-block.green .subject-block-hero,
.subject-block.emerald .subject-block-hero,
.subject-progress-card.green,
.subject-progress-card.emerald,
.subject-scroll-card.green,
.subject-scroll-card.emerald {
  background: linear-gradient(135deg, #059669 0%, #34d399 42%, #2dd4bf 78%, #a7f3d0 100%);
}

.subject-block.green .subject-block-hero::after,
.subject-block.emerald .subject-block-hero::after,
.subject-progress-card.green::after,
.subject-progress-card.emerald::after,
.subject-scroll-card.green::after,
.subject-scroll-card.emerald::after {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(16, 185, 129, 0.55) 0%, transparent 45%);
}

.subject-block.violet .subject-block-hero,
.subject-progress-card.violet,
.subject-scroll-card.violet {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 40%, #c47be8 72%, #f0abfc 100%);
}

.subject-block.violet .subject-block-hero::after,
.subject-progress-card.violet::after,
.subject-scroll-card.violet::after {
  background:
    radial-gradient(circle at 75% 15%, rgba(255, 255, 255, 0.42) 0%, transparent 38%),
    radial-gradient(circle at 10% 90%, rgba(124, 58, 237, 0.5) 0%, transparent 44%);
}

.subject-block.amber .subject-block-hero,
.subject-progress-card.amber,
.subject-scroll-card.amber {
  background: linear-gradient(135deg, #ea580c 0%, #f59e0b 38%, #fb923c 70%, #fcd34d 100%);
}

.subject-block.amber .subject-block-hero::after,
.subject-progress-card.amber::after,
.subject-scroll-card.amber::after {
  background:
    radial-gradient(circle at 88% 22%, rgba(255, 255, 255, 0.45) 0%, transparent 36%),
    radial-gradient(circle at 15% 85%, rgba(234, 88, 12, 0.45) 0%, transparent 42%);
}

.subject-block.teal .subject-block-hero,
.subject-progress-card.teal,
.subject-scroll-card.teal {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 40%, #22d3ee 72%, #99f6e4 100%);
}

.subject-block.teal .subject-block-hero::after,
.subject-progress-card.teal::after,
.subject-scroll-card.teal::after {
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(15, 118, 110, 0.5) 0%, transparent 44%);
}

.subject-block-art {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.12));
}

.subject-illustration {
  display: block;
  width: 100%;
  height: 100%;
}

.subject-block-info {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-xs);
  min-width: 0;
}

.subject-block-info h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.15);
}

.subject-block-info p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.subject-block-info .meter {
  max-width: 180px;
  height: 9px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.subject-block-info .meter span {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.subject-block-lessons {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-md);
}

.lesson-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: 12px 14px;
  border: var(--outline);
  border-radius: 18px;
  background: var(--paper);
  text-align: start;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.lesson-list-item:active {
  background: #fafafa;
}

.lesson-list-item-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lesson-list-item-body strong {
  font-size: 15px;
  font-weight: 700;
}

.lesson-list-item-body span {
  font-size: 12px;
  color: var(--muted);
}

.lesson-list-item-body .meter {
  max-width: 140px;
  margin-top: 2px;
}

.lesson-list-item-pct {
  font-size: 14px;
  font-weight: 800;
  color: var(--purple-deep);
  flex-shrink: 0;
}

.lesson-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.lesson-group-head h2 {
  margin: 0;
  font-size: 16px;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.lesson-tile {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md);
  padding-top: calc(var(--space-md) + 6px);
  border: var(--outline);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: none;
  text-align: start;
  cursor: pointer;
  font: inherit;
  color: inherit;
  position: relative;
  overflow: hidden;
  min-height: 118px;
}

.lesson-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
}

.lesson-tile.blue::before { background: var(--pastel-blue); }
.lesson-tile.green::before,
.lesson-tile.emerald::before { background: var(--pastel-mint); }
.lesson-tile.violet::before { background: var(--pastel-lavender); }
.lesson-tile.amber::before { background: var(--pastel-peach); }
.lesson-tile.teal::before { background: #e4f5f5; }

.lesson-tile-top {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lesson-tile h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

.lesson-tile-pct {
  font-size: 12px;
  font-weight: 800;
  color: var(--purple-deep);
}

.lesson-detail-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
}

.lesson-detail-hero h2 {
  margin: var(--space-xs) 0;
}

.lesson-progress-label {
  margin: var(--space-xs) 0 0;
  font-size: 13px;
  color: var(--muted);
}

.lesson-content h3 {
  margin-top: var(--space-md);
}

.lesson-content h3:first-child {
  margin-top: 0;
}

.lesson-action-bar {
  display: grid;
  gap: 10px;
}

.lesson-action-bar .primary-button {
  min-height: 48px;
}

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

.lesson-action-chip {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 0;
  padding: 10px 6px;
  border: var(--outline);
  border-radius: 18px;
  background: var(--paper);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}

.lesson-action-chip:active {
  transform: scale(0.98);
}

.lesson-action-chip-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.lesson-action-chip-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.lesson-action-chip.tone-mint .lesson-action-chip-icon {
  background: var(--pastel-mint);
  color: #0f8f63;
}

.lesson-action-chip.tone-lavender .lesson-action-chip-icon {
  background: var(--pastel-lavender);
  color: var(--purple-deep);
}

.lesson-action-chip.tone-blue .lesson-action-chip-icon {
  background: var(--pastel-blue);
  color: #4a7fd4;
}

.reading-panel {
  display: grid;
  gap: var(--space-md);
}

.reading-page-head {
  display: grid;
  gap: 6px;
}

.reading-page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-deep);
}

.reading-page-kicker .ui-icon {
  width: 16px;
  height: 16px;
}

.reading-page-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.reading-page-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.reading-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.reading-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: var(--outline);
  background: var(--pastel-lavender);
  color: var(--purple-deep);
  font-size: 12px;
  font-weight: 700;
}

.study-material-teaser {
  display: grid;
  gap: var(--space-md);
}

.study-teaser-head {
  display: grid;
  gap: 4px;
}

.study-teaser-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 100%);
  color: var(--purple-deep);
}

.study-teaser-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.study-teaser-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.study-teaser-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.study-teaser-excerpt {
  margin: 0;
  line-height: 1.75;
  color: var(--ink);
}

.app-scene-illustration {
  display: block;
  width: 100%;
  height: auto;
}

.app-scene-picture {
  display: block;
  margin: 0;
  width: 100%;
}

.app-scene-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.app-scene-picture.is-fallback .app-scene-image {
  display: none;
}

.app-scene-picture.is-fallback .app-scene-fallback {
  display: block;
}

.app-scene-fallback {
  display: none;
}

.app-scene-splash {
  max-height: 220px;
}

.study-teaser-art,
.study-material-art,
.chat-scene-art {
  overflow: hidden;
  border-radius: 20px;
}

.study-material-art {
  margin-bottom: var(--space-sm);
}

.study-teaser-art .app-scene-illustration,
.study-material-art .app-scene-illustration {
  display: block;
}

.empty-state.panel-card {
  display: grid;
  gap: var(--space-md);
  justify-items: center;
  text-align: center;
  padding: var(--space-lg);
}

.empty-state.panel-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.empty-state.panel-card .app-scene-illustration {
  max-width: 240px;
}

.study-material {
  display: grid;
  gap: var(--space-lg);
}

.study-material-hero {
  display: grid;
  gap: var(--space-sm);
}

.study-material-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.study-material-lead {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.study-section {
  padding: var(--space-lg);
  border: var(--outline);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(140, 120, 190, 0.06);
}

.study-section h2 {
  margin: 0 0 var(--space-md);
  font-size: 20px;
  color: var(--purple-deep);
}

.study-section p {
  margin: 0 0 var(--space-sm);
  line-height: 1.85;
  font-size: 16px;
  color: var(--ink);
}

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

.study-section-example {
  background: linear-gradient(155deg, #fff5f0 0%, #fff 100%);
  border-color: rgba(255, 168, 112, 0.25);
}

.study-section-practice {
  background: linear-gradient(155deg, #f3f5ff 0%, #fff 100%);
}

.study-goal-list,
.study-rule-list,
.study-question-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}

.study-goal-list li,
.study-question-list li {
  padding: var(--space-sm) var(--space-md);
  border-radius: 16px;
  background: var(--pastel-lavender);
  line-height: 1.65;
}

.study-rule-list {
  counter-reset: study-rule;
}

.study-rule-list li {
  position: relative;
  padding: var(--space-sm) var(--space-md) var(--space-sm) 44px;
  border-radius: 16px;
  background: #faf8ff;
  line-height: 1.65;
}

.study-rule-list li::before {
  counter-increment: study-rule;
  content: counter(study-rule);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--purple-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.guided-practice-list {
  display: grid;
  gap: var(--space-md);
}

.guided-practice-card {
  position: relative;
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-md);
  padding-inline-start: 58px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(86, 58, 135, 0.08);
}

.guided-practice-step {
  position: absolute;
  inset-inline-start: 16px;
  top: 16px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.guided-practice-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
}

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

.study-material.is-text-lesson .guided-choice-list {
  grid-template-columns: 1fr;
}

.guided-choice-list span {
  min-height: 42px;
  display: grid;
  align-items: center;
  padding: 8px 12px;
  border-radius: 14px;
  background: #f7efff;
  font-weight: 800;
}

.study-material.is-text-lesson .guided-choice-list span {
  min-height: 48px;
  justify-items: start;
  padding: 12px 14px;
  line-height: 1.45;
  text-align: start;
}

.guided-practice-hint {
  padding: 10px 12px;
  border-radius: 14px;
  background: #eefbf4;
  color: #237450 !important;
  font-weight: 700;
}

.study-material-footer {
  display: grid;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
}

.reading-passage {
  line-height: 1.85;
  font-size: 16px;
  color: var(--ink);
}

.reading-passage p {
  margin: 0;
}

.reading-goal-list,
.reading-rule-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}

.reading-goal-list li,
.reading-rule-list li {
  padding: var(--space-sm) var(--space-md);
  border-radius: 18px;
  border: var(--outline);
  background: #faf8ff;
  line-height: 1.65;
  text-align: start;
}

.reading-rule-list {
  counter-reset: rule;
}

.reading-rule-list li {
  position: relative;
  padding-inline-start: 42px;
}

.reading-rule-list li::before {
  counter-increment: rule;
  content: counter(rule);
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--purple-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.reading-example-card {
  padding: var(--space-md);
  border-radius: 20px;
  border: var(--outline);
  background: linear-gradient(145deg, #faf7ff 0%, #fff 100%);
  text-align: start;
}

.reading-example-card h3,
.reading-example-card h4 {
  margin: 0 0 var(--space-xs);
  font-size: 16px;
  color: var(--purple-deep);
}

.reading-example-card p {
  margin: 0;
  line-height: 1.75;
}

.reading-preview-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}

.reading-preview-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-sm);
  align-items: start;
  padding: var(--space-sm);
  border-radius: 16px;
  border: var(--outline);
  background: #fff;
}

.reading-preview-list li span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--pastel-lavender);
  color: var(--purple-deep);
  font-size: 12px;
  font-weight: 800;
}

.reading-preview-list p {
  margin: 0;
  line-height: 1.6;
  font-size: 14px;
}

.reading-page-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.reading-page-nav .secondary-button,
.reading-page-nav .primary-button {
  min-height: 44px;
  font-size: 13px;
}

.reading-page-nav .secondary-button {
  justify-self: start;
}

.reading-page-nav .primary-button {
  justify-self: end;
}

.reading-dots {
  display: inline-flex;
  gap: 6px;
  justify-self: center;
}

.reading-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.22);
}

.reading-dot.active {
  width: 22px;
  background: var(--purple-deep);
}


.empty-state {
  margin: var(--space-lg) 0;
  text-align: center;
  color: var(--muted);
}

/* Page: Quiz */
.page-quizzes::after {
  height: 210px;
}

.quiz-meta-bar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

.quiz-score-pill {
  grid-row: span 2;
  min-width: 64px;
  min-height: 64px;
  display: grid;
  place-items: center;
  border: var(--outline);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: none;
  font-weight: 800;
  color: var(--purple-deep);
}

.quiz-score-pill-icon {
  background: linear-gradient(165deg, #fdfbff 0%, #f3ebff 100%);
  border-color: rgba(186, 154, 230, 0.28);
}

.quiz-score-pill-icon .ui-icon {
  width: 28px;
  height: 28px;
  color: var(--purple-deep);
}

.quiz-step-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.quiz-progress-track {
  grid-column: 2;
  height: 8px;
  border-radius: 999px;
  background: #edf0f5;
  overflow: hidden;
}

.quiz-progress-track span {
  display: block;
  height: 100%;
  background: var(--purple);
  border-radius: inherit;
}

.quiz-stage {
  min-height: 380px;
  display: grid;
  align-content: start;
  gap: var(--space-md);
}

.question-block-single legend {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.quiz-options {
  display: grid;
  gap: var(--space-sm);
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 52px;
  padding: 0 var(--space-md);
  border: var(--outline);
  border-radius: 18px;
  background: var(--paper);
  cursor: pointer;
}

.quiz-option:has(input:checked) {
  background: var(--pastel-lavender);
  border-color: var(--purple-deep);
  box-shadow: none;
}

.quiz-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.quiz-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd6e8;
}

.quiz-dot.active {
  background: var(--purple-deep);
  transform: scale(1.2);
}

.quiz-dot.answered {
  background: var(--purple);
}

.quiz-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.quiz-nav button[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.quiz-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
}

.quiz-score-badge {
  min-width: 64px;
  min-height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pastel-lavender);
  color: var(--purple-deep);
  font-size: 18px;
  font-weight: 800;
}

.quiz-card-body {
  border: var(--outline);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: none;
  padding: var(--space-md);
}

.q-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-inline-end: 6px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* Page: Progress */
.page-progress::after {
  height: 280px;
}

.page-progress .segment-tabs {
  margin-bottom: var(--space-xl);
  background: var(--pastel-lavender);
  border-color: rgba(168, 122, 232, 0.18);
}

.page-progress .segment-tabs button.active {
  background: #fff;
  color: var(--purple-deep);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.12);
}

.page-progress .progress-summary {
  flex-direction: row-reverse;
  text-align: start;
}

.progress-dashboard {
  display: grid;
  gap: var(--space-md);
}

.page-progress .week-chart {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: var(--space-md);
  border: 1px solid rgba(186, 154, 230, 0.18);
  border-radius: 24px;
  background: linear-gradient(155deg, #fbf8ff 0%, #f3ecfb 45%, #ffffff 100%);
  box-shadow: 0 10px 28px rgba(150, 130, 190, 0.1);
}

.page-progress .week-chart h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 var(--space-md);
  font-size: 18px;
  font-weight: 800;
  color: var(--purple-deep);
}

.page-progress .week-bars {
  position: relative;
  z-index: 1;
}

.page-progress .week-bars span {
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #a87ae8 0%, rgba(197, 153, 255, 0.42) 58%, rgba(255, 255, 255, 0) 100%);
}

.progress-subject-list {
  display: grid;
  gap: var(--space-sm);
}

.progress-subject-row {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-md);
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(150, 130, 190, 0.12);
}

.progress-subject-row[data-open-subject] {
  cursor: pointer;
}

.progress-subject-row[data-open-subject]:active {
  transform: scale(0.99);
}

.page-progress .progress-subject-row::before {
  opacity: 0.46;
  mix-blend-mode: soft-light;
  background-size: 128px 128px;
}

.progress-subject-row.blue {
  background: linear-gradient(135deg, #93c5fd 0%, #bfdbfe 38%, #dbeafe 72%, #eff6ff 100%);
}

.progress-subject-row.green,
.progress-subject-row.emerald {
  background: linear-gradient(135deg, #6ee7b7 0%, #a7f3d0 40%, #d1fae5 74%, #ecfdf5 100%);
}

.progress-subject-row.violet,
.progress-subject-row.lavender {
  background: linear-gradient(135deg, #c4b5fd 0%, #ddd6fe 42%, #ede9fe 76%, #f5f3ff 100%);
}

.progress-subject-row.amber {
  background: linear-gradient(135deg, #fdba74 0%, #fed7aa 40%, #ffedd5 74%, #fff7ed 100%);
}

.progress-subject-row.teal {
  background: linear-gradient(135deg, #5eead4 0%, #99f6e4 40%, #ccfbf1 74%, #f0fdfa 100%);
}

.progress-subject-row.blue::after,
.progress-subject-row.green::after,
.progress-subject-row.emerald::after,
.progress-subject-row.violet::after,
.progress-subject-row.lavender::after,
.progress-subject-row.amber::after,
.progress-subject-row.teal::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.78) 0%, transparent 44%),
    radial-gradient(circle at 12% 88%, rgba(124, 86, 184, 0.22) 0%, transparent 48%);
}

.progress-subject-row.blue::after {
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.78) 0%, transparent 44%),
    radial-gradient(circle at 12% 88%, rgba(59, 130, 246, 0.24) 0%, transparent 48%);
}

.progress-subject-row.green::after,
.progress-subject-row.emerald::after {
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.78) 0%, transparent 44%),
    radial-gradient(circle at 12% 88%, rgba(16, 185, 129, 0.24) 0%, transparent 48%);
}

.progress-subject-row.violet::after,
.progress-subject-row.lavender::after {
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.78) 0%, transparent 44%),
    radial-gradient(circle at 12% 88%, rgba(139, 92, 246, 0.26) 0%, transparent 48%);
}

.progress-subject-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.progress-subject-copy strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.progress-subject-copy span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.ring-progress-row {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  background: conic-gradient(var(--purple-deep) calc(var(--value) * 1%), rgba(197, 153, 255, 0.28) 0);
  box-shadow: none;
}

.ring-progress-row::before {
  display: none;
}

.ring-progress-inner {
  position: absolute;
  inset: 5px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--purple-deep);
  color: #fff;
  line-height: 0;
}

.ring-progress-inner .ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
}

.progress-banner {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(186, 154, 230, 0.2);
  border-radius: 24px;
  background: linear-gradient(165deg, #fdfbff 0%, #f6effc 52%, #faf6ff 100%);
  box-shadow: 0 10px 28px rgba(168, 122, 232, 0.08);
}

.progress-banner-art {
  position: relative;
  overflow: hidden;
  min-height: 156px;
}

.progress-banner-image {
  display: block;
  width: 100%;
  height: 156px;
  object-fit: cover;
  object-position: center;
}

.progress-banner-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-md);
  padding: 16px 18px;
  background: linear-gradient(
    90deg,
    rgba(253, 251, 255, 0.94) 0%,
    rgba(253, 251, 255, 0.82) 42%,
    rgba(253, 251, 255, 0.28) 100%
  );
}

.progress-banner-copy h2 {
  margin: 0 0 4px;
  color: var(--purple-deep);
  font-size: 20px;
  font-weight: 800;
}

.progress-banner-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.page-progress .progress-banner .ring-on-banner {
  width: 72px;
  height: 72px;
  background: conic-gradient(var(--purple-deep) calc(var(--value) * 1%), rgba(255, 255, 255, 0.92) 0);
  box-shadow: 0 8px 20px rgba(168, 122, 232, 0.16);
}

.page-progress .progress-banner .ring-on-banner::before {
  background: #fff;
}

.page-progress .progress-banner .ring-on-banner .ring-progress-label {
  color: var(--ink);
  font-weight: 800;
  font-size: 16px;
}

.page-progress .progress-hero {
  background: linear-gradient(135deg, #faf7ff 0%, #f5effb 100%);
  border: 0;
}

.page-progress .progress-hero .ring-progress {
  background: conic-gradient(var(--purple-deep) calc(var(--value) * 1%), rgba(255, 255, 255, 0.85) 0);
}

.page-progress .progress-hero .ring-progress::before {
  background: #fff;
}

.page-progress .progress-hero .ring-progress-label {
  color: var(--ink);
  font-weight: 800;
}

.page-progress .progress-hero h2 {
  color: var(--purple-deep);
}

.progress-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-md);
}

.progress-hero h2 {
  margin: 0 0 var(--space-xs);
}

.progress-hero p {
  margin: 0;
  color: var(--muted);
}

.subject-progress-heading {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.page-progress .subject-progress-heading h2 {
  color: var(--purple-deep);
}

.subject-progress-grid {
  display: grid;
  gap: var(--space-sm);
}

.page-progress .subject-progress-card[data-open-subject] {
  cursor: pointer;
}

.page-progress .subject-progress-card[data-open-subject]:active {
  transform: scale(0.99);
}

.subject-progress-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: 22px;
  border: 0;
  min-height: 104px;
}

.subject-progress-card-art {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.14));
}

.subject-progress-card-info {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.subject-progress-card-info strong {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.12);
}

.lesson-progress-card .subject-progress-card-info strong {
  font-size: 14px;
  line-height: 1.3;
}

.subject-progress-card-info span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.subject-progress-card .ring-on-gradient {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  background: conic-gradient(rgba(255, 255, 255, 0.96) calc(var(--value) * 1%), rgba(255, 255, 255, 0.22) 0);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.subject-progress-card .ring-on-gradient::before {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}

.subject-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.subject-stat-card {
  display: grid;
  justify-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  border: var(--outline);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: none;
  text-align: center;
}

.subject-stat-card strong {
  font-size: 13px;
}

.focus-card-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-sm);
}

.page-progress .focus-card {
  border: 0;
}

.page-progress .focus-card.tone-blue {
  background: linear-gradient(135deg, var(--pastel-blue) 0%, #eef4ff 100%);
}

.page-progress .focus-card.tone-emerald,
.page-progress .focus-card.tone-green {
  background: linear-gradient(135deg, var(--pastel-mint) 0%, var(--pastel-teal) 100%);
}

.page-progress .focus-card.tone-violet {
  background: linear-gradient(135deg, var(--pastel-lavender) 0%, var(--pastel-pink) 100%);
}

.page-progress .focus-card.tone-amber {
  background: linear-gradient(135deg, var(--pastel-peach) 0%, var(--pastel-sun) 100%);
}

.page-progress .focus-card.tone-teal {
  background: linear-gradient(135deg, var(--pastel-teal) 0%, var(--pastel-blue) 100%);
}

.page-progress .focus-card .eyebrow {
  color: var(--purple-deep);
  font-weight: 700;
}

.page-progress .focus-card .meter {
  background: rgba(255, 255, 255, 0.55);
}

.page-progress .focus-card .meter span {
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-deep) 100%);
}

.focus-card-body .primary-button {
  grid-column: 1 / -1;
}

.activity-feed {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.activity-pill {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md);
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: none;
}

.activity-pill.tone-blue {
  background: var(--pastel-blue);
}

.activity-pill.tone-emerald,
.activity-pill.tone-green {
  background: var(--pastel-mint);
}

.activity-pill.tone-violet {
  background: var(--pastel-lavender);
}

.activity-pill.tone-amber {
  background: var(--pastel-peach);
}

.activity-pill.tone-teal {
  background: var(--pastel-teal);
}

.activity-pill.done {
  opacity: 0.94;
}

.activity-dot {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--purple-deep);
}

.activity-pill.tone-blue .activity-dot {
  color: #2563eb;
}

.activity-pill.tone-emerald .activity-dot,
.activity-pill.tone-green .activity-dot {
  color: #059669;
}

.activity-pill.tone-violet .activity-dot {
  color: #7c3aed;
}

.activity-pill.tone-amber .activity-dot {
  color: #ea580c;
}

.activity-pill.tone-teal .activity-dot {
  color: #0f766e;
}

.activity-pill.done .activity-dot {
  background: var(--purple-deep);
  color: #fff;
}

.activity-pill strong {
  display: block;
  font-size: 14px;
}

.activity-pill span {
  font-size: 12px;
  color: var(--muted);
}

.subject-bars {
  display: grid;
  gap: var(--space-md);
}

.subject-bar-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: var(--space-md);
}

.journey-timeline {
  position: relative;
  padding-inline-start: 8px;
}

.journey-timeline::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  inset-inline-start: 31px;
  width: 2px;
  background: var(--line);
  z-index: 0;
}

.journey-timeline .journey-item {
  position: relative;
  z-index: 1;
}

/* Page: Tutor */
.page-tutor::after {
  height: 220px;
  background: linear-gradient(180deg, var(--purple) 0%, #b888f8 52%, #d4bdf6 82%, var(--app-bg) 100%);
}

.page-tutor .screen-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: var(--space-md);
}

.page-tutor.screen,
.page-tutor .screen {
  min-height: 0;
}

.page-tutor .chat-panel-full {
  flex: 1;
  min-height: 0;
  margin-top: 0;
  padding: var(--space-md);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow: hidden;
}

.page-tutor .chat-scene-art {
  flex-shrink: 0;
  margin-bottom: 0;
  max-height: 112px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(165deg, #fdfbff 0%, #f6effc 100%);
}

.page-tutor .chat-scene-art .app-scene-picture,
.page-tutor .chat-scene-art .app-scene-image {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
  object-position: center 18%;
  border-radius: inherit;
}

.page-tutor .chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  justify-content: flex-start;
  padding-bottom: var(--space-sm);
  scrollbar-width: thin;
}

.page-tutor .message-row.assistant {
  justify-content: flex-start;
  align-self: stretch;
  width: 100%;
}

.page-tutor .message-row.user {
  justify-content: flex-end;
  align-self: stretch;
  width: 100%;
}

.page-tutor .bubble {
  padding: 10px 12px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.32;
}

.page-tutor .bubble p {
  margin: 0 0 6px;
}

.page-tutor .bubble p:last-child {
  margin-bottom: 0;
}

.page-tutor .msg-avatar {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(168, 122, 232, 0.12);
}

.page-tutor .chat-form {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.page-tutor .chat-form input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  font-size: 13px;
  padding: 0 14px;
}

.page-tutor .chat-form .primary-button.icon-only {
  flex-shrink: 0;
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
}

.tutor-compact-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.tutor-compact-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tutor-compact-text strong {
  font-size: 16px;
}

.tutor-compact-text span {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tutor-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-md);
}

.bot-avatar,
.msg-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pastel-lavender);
  color: var(--purple-deep);
  flex-shrink: 0;
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  max-width: 100%;
}

.message-row.user {
  justify-content: flex-end;
}

.message-row .bubble {
  max-width: 78%;
}

.message-row.user .bubble {
  margin-inline-start: auto;
}

/* Page: Profile */
.page-profile::after {
  height: 210px;
}

.page-profile .screen-top {
  padding-bottom: 8px;
}

.page-profile .screen-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: hidden;
  overflow-x: hidden;
  padding-top: 0;
  padding-bottom: 8px;
  gap: 8px;
}

.page-profile .profile-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  flex-shrink: 0;
  margin-bottom: 0;
  padding: 12px 14px;
  gap: 12px;
}

.page-profile .profile-hero h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.page-profile .profile-hero p {
  margin: 2px 0 0;
  font-size: 12px;
}

.page-profile .profile-avatar {
  width: 52px;
  height: 52px;
}

.page-profile .profile-hero .ring-progress-sm {
  width: 46px;
  height: 46px;
  font-size: 11px;
}

.page-profile .profile-hero .ring-progress-sm::before {
  inset: 6px;
}

.page-profile .profile-card.profile-form-compact {
  flex: 1;
  min-height: 0;
  margin-top: 0;
  padding: 12px 14px;
  gap: 8px;
  overflow: hidden;
}

.profile-form-compact {
  margin-top: var(--space-md);
  gap: 10px;
  padding: var(--space-md);
}

.profile-form-compact label {
  gap: 4px;
  font-size: 12px;
}

.profile-form-compact h2 {
  margin: 2px 0 0;
  font-size: 17px;
  line-height: 1.2;
}

.page-profile .profile-form-compact h2 {
  margin: 0;
  font-size: 15px;
}

.profile-form-compact input,
.profile-form-compact select {
  min-height: 42px;
  padding: 0 14px;
  font-size: 14px;
}

.page-profile .profile-form-compact label {
  gap: 3px;
  font-size: 11px;
}

.page-profile .profile-form-compact input,
.page-profile .profile-form-compact select {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.profile-form-compact .current-curriculum {
  gap: 4px;
  padding: 10px 14px;
  margin-top: 2px;
}

.page-profile .profile-form-compact .current-curriculum {
  padding: 8px 12px;
  gap: 2px;
  margin-top: 0;
}

.profile-form-compact .current-curriculum strong {
  font-size: 13px;
}

.page-profile .profile-form-compact .current-curriculum strong {
  font-size: 12px;
}

.profile-form-compact .current-curriculum span {
  font-size: 12px;
  line-height: 1.35;
}

.page-profile .profile-form-compact .current-curriculum span {
  font-size: 11px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.profile-form-compact .primary-button {
  margin-top: 2px;
}

.profile-save-button[hidden] {
  display: none;
}

.profile-save-button:not([hidden]) {
  animation: profileSavePop 0.22s ease;
}

@keyframes profileSavePop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-form-compact.is-dirty .save-note[hidden] {
  display: none;
}

.learning-tools {
  margin-top: var(--space-lg);
}

.learning-tools h2 {
  margin: 0 0 var(--space-md);
  font-size: 18px;
}

.tool-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.tool-tile {
  display: grid;
  gap: var(--space-xs);
  place-items: center;
  min-height: 96px;
  padding: var(--space-md);
  border: var(--outline);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.tool-tile svg {
  width: 28px;
  height: 28px;
  color: var(--purple-deep);
}

.page-home .learning-tools .tool-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(150, 130, 190, 0.08);
  font-family: inherit;
  width: 100%;
}

.page-home .learning-tools .tool-tile.tone-blue {
  background: linear-gradient(155deg, #f3f5ff 0%, #e8eeff 52%, #fafbff 100%);
}

.page-home .learning-tools .tool-tile.tone-amber {
  background: linear-gradient(155deg, #fff5f0 0%, #ffe4d4 52%, #fff8f4 100%);
}

.page-home .learning-tools .tool-tile.tone-emerald {
  background: linear-gradient(155deg, #f2fbf6 0%, #e7f6ef 52%, #f8fffb 100%);
}

.page-home .learning-tools .tool-tile.tone-violet {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.page-home .learning-tools .tool-tile.tone-blue svg {
  color: #6b7fd7;
}

.page-home .learning-tools .tool-tile.tone-amber svg {
  color: #e07a3a;
}

.page-home .learning-tools .tool-tile.tone-emerald svg {
  color: #5cb894;
}

.page-home .learning-tools .tool-tile.tone-violet svg {
  color: #9b7fd9;
}

.page-home .learning-tools .tool-tile > * {
  position: relative;
  z-index: 1;
}

.page-profile .profile-card {
  margin-top: 0;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.88);
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 100%);
  box-shadow: 0 8px 20px rgba(168, 122, 232, 0.12);
}

/* Page: Achievements */
.page-achievements::after {
  height: 240px;
}

.achievements-page {
  display: grid;
  gap: var(--space-md);
}

.achievements-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: var(--space-sm);
  border: 0;
  border-radius: 24px;
  padding: var(--space-lg);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.18);
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 40%, #c47be8 72%, #f0abfc 100%);
}

.achievements-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.34;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.achievements-hero::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(circle at 75% 15%, rgba(255, 255, 255, 0.42) 0%, transparent 38%),
    radial-gradient(circle at 10% 90%, rgba(124, 58, 237, 0.5) 0%, transparent 44%);
}

.achievements-lead {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.achievements-summary {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
}

.achievements-summary strong {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 12px rgba(55, 20, 90, 0.18);
}

.achievements-summary span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.84);
}

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

.achievement-stamp {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.achievement-stamp.is-locked {
  cursor: default;
}

.achievement-stamp-frame {
  position: relative;
  width: 100%;
  max-width: 168px;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
  background: transparent;
}

.achievement-stamp.tone-mint .achievement-stamp-frame,
.achievement-stamp.tone-amber .achievement-stamp-frame,
.achievement-stamp.tone-blue .achievement-stamp-frame,
.achievement-stamp.tone-violet .achievement-stamp-frame,
.achievement-stamp.tone-lavender .achievement-stamp-frame {
  background: transparent;
}

.achievement-stamp-image {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  border-radius: 22px;
  box-shadow: none;
  background: transparent;
}

.achievement-stamp.is-locked .achievement-stamp-image {
  filter: grayscale(0.75) saturate(0.65) brightness(0.94);
}

.achievement-stamp-badge,
.achievement-stamp-lock {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(55, 20, 90, 0.14);
}

.achievement-stamp-badge {
  color: #059669;
}

.achievement-stamp-lock {
  color: var(--muted);
}

.achievement-stamp-badge .ui-icon,
.achievement-stamp-lock .ui-icon {
  width: 14px;
  height: 14px;
}

.achievement-stamp strong {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}

.achievement-stamp.is-locked strong {
  color: var(--muted);
}

.achievement-stamp.is-earned:active {
  transform: scale(0.98);
}

.page-achievements .section-heading h2 {
  color: var(--purple-deep);
}

.page-achievements .achievement-showcase {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(150, 130, 190, 0.1);
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.page-achievements .achievement-showcase.tone-violet {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.achievement-showcase-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.achievement-showcase-head strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
}

.achievement-showcase-head span {
  font-size: 13px;
  color: var(--muted);
}

.badge-showcase-track {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
  scrollbar-width: none;
}

.badge-showcase-track::-webkit-scrollbar {
  display: none;
}

.page-achievements .badge-showcase-item {
  flex: 0 0 108px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: var(--space-xs);
  place-items: center;
  padding: var(--space-md) var(--space-sm);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(150, 130, 190, 0.08);
  text-align: center;
}

.page-achievements .badge-showcase-item.tone-mint {
  background: linear-gradient(155deg, #f2fbf6 0%, #e7f6ef 52%, #f8fffb 100%);
}

.page-achievements .badge-showcase-item.tone-amber {
  background: linear-gradient(155deg, #fff5f0 0%, #ffe4d4 52%, #fff8f4 100%);
}

.page-achievements .badge-showcase-item.tone-blue {
  background: linear-gradient(155deg, #f3f5ff 0%, #e8eeff 52%, #fafbff 100%);
}

.page-achievements .badge-showcase-item.tone-violet,
.page-achievements .badge-showcase-item.tone-lavender {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.badge-showcase-item strong {
  font-size: 11px;
  font-weight: 800;
}

.badge-grid-compact .badge-card {
  min-height: 118px;
}

.page-achievements .badge-grid-compact {
  margin-top: 0;
}

.page-achievements .badge-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(150, 130, 190, 0.08);
  text-align: center;
}

.page-achievements .badge-card.tone-mint {
  background: linear-gradient(155deg, #f2fbf6 0%, #e7f6ef 52%, #f8fffb 100%);
}

.page-achievements .badge-card.tone-amber {
  background: linear-gradient(155deg, #fff5f0 0%, #ffe4d4 52%, #fff8f4 100%);
}

.page-achievements .badge-card.tone-blue {
  background: linear-gradient(155deg, #f3f5ff 0%, #e8eeff 52%, #fafbff 100%);
}

.page-achievements .badge-card.tone-violet,
.page-achievements .badge-card.tone-lavender {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.achievement-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: #9b7fd9;
  box-shadow: 0 4px 14px rgba(168, 122, 232, 0.12);
}

.badge-card {
  text-align: center;
}

.page-achievements .badge-card.locked {
  opacity: 0.68;
}

.page-achievements .badge-card.locked .badge-icon {
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.page-achievements .badge-lock {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
}

.badge-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--purple-deep);
}

.page-achievements .badge-card strong {
  font-size: 13px;
  font-weight: 800;
}

/* Page: Locker */
.page-locker::after {
  height: 220px;
}

.page-locker .filter-pills button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  padding: 0 10px;
}

.locker-filters {
  margin: 0 0 var(--space-md);
}

.page-locker .locker-featured {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(150, 130, 190, 0.12);
  text-align: start;
}

.page-locker .locker-featured::after,
.page-locker .locker-item::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.26;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.72) 0%, transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(168, 122, 232, 0.16) 0%, transparent 46%);
}

.locker-featured-art {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 132px;
  overflow: hidden;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(150, 130, 190, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.locker-certificate-image {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
  object-position: center;
}

.locker-item-preview {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 16px rgba(150, 130, 190, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.locker-item-preview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.locker-preview-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-locker .locker-featured.tone-lavender {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.page-locker .locker-featured.tone-blue {
  background: linear-gradient(155deg, #f3f5ff 0%, #e8eeff 52%, #fafbff 100%);
}

.page-locker .locker-featured.tone-mint {
  background: linear-gradient(155deg, #f2fbf6 0%, #e7f6ef 52%, #f8fffb 100%);
}

.page-locker .locker-featured.tone-amber {
  background: linear-gradient(155deg, #fff5f0 0%, #ffe4d4 52%, #fff8f4 100%);
}

.page-locker .locker-featured.tone-violet {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.page-locker .locker-featured::before,
.page-locker .locker-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.34;
  mix-blend-mode: soft-light;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

.page-locker .locker-grid-compact {
  gap: var(--space-sm);
  margin-top: 0;
}

.page-locker .locker-grid-compact .locker-item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 148px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(150, 130, 190, 0.1);
  text-align: center;
}

.page-locker .locker-item .locker-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.page-locker .locker-item .locker-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.page-locker .locker-item.tone-lavender {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.page-locker .locker-item.tone-blue {
  background: linear-gradient(155deg, #f3f5ff 0%, #e8eeff 52%, #fafbff 100%);
}

.page-locker .locker-item.tone-mint {
  background: linear-gradient(155deg, #f2fbf6 0%, #e7f6ef 52%, #f8fffb 100%);
}

.page-locker .locker-item.tone-amber {
  background: linear-gradient(155deg, #fff5f0 0%, #ffe4d4 52%, #fff8f4 100%);
}

.page-locker .locker-item.tone-violet {
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.page-locker .locker-item > *,
.page-locker .locker-featured > * {
  position: relative;
  z-index: 1;
}

.page-locker .locker-item strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.page-locker .locker-item p,
.page-locker .locker-item-copy p {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.page-locker .locker-item-copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.page-locker .locker-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  line-height: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.95), 0 6px 14px rgba(150, 130, 190, 0.1);
  color: var(--purple-deep);
}

.page-locker .locker-icon-lg {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}

.page-locker .locker-icon .ui-icon {
  display: block;
  width: 26px;
  height: 26px;
  margin: 0;
}

.page-locker .locker-icon-lg .ui-icon {
  width: 30px;
  height: 30px;
}

.page-locker .locker-item.tone-blue .locker-icon {
  color: #6b7fd7;
}

.page-locker .locker-item.tone-mint .locker-icon {
  color: #5cb894;
}

.page-locker .locker-item.tone-amber .locker-icon {
  color: #e07a3a;
}

.page-locker .locker-item.tone-violet .locker-icon,
.page-locker .locker-item.tone-lavender .locker-icon {
  color: #9b7fd9;
}

.page-locker .locker-item:active,
.page-locker .locker-featured:active {
  transform: scale(0.98);
}

/* Page: Practice */
.page-practice::after {
  height: 170px;
}

.page-practice .practice-stage {
  margin-top: var(--space-xl);
}

.practice-hint {
  color: var(--muted);
  font-size: 14px;
}

.page-practice .voice-visual {
  background: var(--pastel-lavender);
  color: var(--purple-deep);
}

/* Page: NGO */
.page-ngo::after {
  height: 260px;
}

.page-ngo .screen-body {
  padding-bottom: var(--space-xl);
}

.ngo-dashboard {
  display: grid;
  gap: var(--space-lg);
}

.page-ngo .ngo-header .icon-button {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: none;
}

.page-ngo .ngo-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin: 0;
}

.page-ngo .ngo-stat {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  min-height: 108px;
  padding: 14px 10px;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(88, 56, 140, 0.14);
}

.page-ngo .ngo-stat::before,
.page-ngo .ngo-insight::before,
.page-ngo .ngo-camp-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.38;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.page-ngo .ngo-stat::after,
.page-ngo .ngo-insight::after,
.page-ngo .ngo-camp-banner::after {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: soft-light;
}

.page-ngo .ngo-stat.tone-blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #39ace3 38%, #818cf8 72%, #c599ff 100%);
  color: #fff;
}

.page-ngo .ngo-stat.tone-blue::after {
  background:
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.45) 0%, transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(197, 153, 255, 0.65) 0%, transparent 38%);
}

.page-ngo .ngo-stat.tone-mint {
  background: linear-gradient(135deg, #059669 0%, #34d399 42%, #2dd4bf 78%, #a7f3d0 100%);
  color: #fff;
}

.page-ngo .ngo-stat.tone-mint::after {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(16, 185, 129, 0.55) 0%, transparent 45%);
}

.page-ngo .ngo-stat.tone-lavender {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 40%, #c47be8 72%, #f0abfc 100%);
  color: #fff;
}

.page-ngo .ngo-stat.tone-lavender::after {
  background:
    radial-gradient(circle at 75% 15%, rgba(255, 255, 255, 0.42) 0%, transparent 38%),
    radial-gradient(circle at 10% 90%, rgba(124, 58, 237, 0.5) 0%, transparent 44%);
}

.ngo-stat-icon {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.page-ngo .ngo-stat .ngo-stat-icon .ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.page-ngo .ngo-stat strong {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
}

.page-ngo .ngo-stat span:last-child {
  position: relative;
  z-index: 1;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.page-ngo .gap-chart {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 0;
  padding: var(--space-md);
  border: var(--outline);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(150, 130, 190, 0.08);
  background: var(--paper);
}

.page-ngo .ngo-camp-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: block;
  margin: calc(var(--space-md) * -1) calc(var(--space-md) * -1) var(--space-md);
  padding: 0;
  border-radius: 20px 20px 24px 24px;
  background: #ebe2f8;
  box-shadow: 0 10px 24px rgba(150, 130, 190, 0.12);
}

.page-ngo .ngo-camp-banner::after {
  inset: 0;
  z-index: 2;
  opacity: 1;
  mix-blend-mode: normal;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.72) 34%,
    rgba(255, 255, 255, 0.18) 62%,
    rgba(255, 255, 255, 0) 100%
  );
}

.ngo-camp-banner-image {
  display: block;
  width: 100%;
  height: 148px;
  object-fit: cover;
  object-position: center 42%;
}

.ngo-camp-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  pointer-events: none;
}

.ngo-camp-copy {
  position: relative;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ngo-camp-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(90, 78, 110, 0.72);
}

.ngo-camp-copy h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #7c56b8;
}

.ngo-sync-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: rgba(90, 78, 110, 0.78);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(150, 130, 190, 0.14);
  pointer-events: auto;
}

.ngo-sync-pill .ui-icon {
  width: 14px;
  height: 14px;
}

.page-ngo .gap-chart .panel-head {
  position: relative;
  z-index: 1;
  margin-bottom: var(--space-md);
}

.page-ngo .gap-chart .panel-head h2,
.page-ngo .gap-chart h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--purple-deep);
  font-size: 18px;
}

.page-ngo .gap-bars {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-md);
}

.gap-bar-item {
  display: grid;
  gap: 8px;
}

.gap-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 13px;
  font-weight: 700;
}

.gap-bar-label strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--purple-deep);
}

.page-ngo .gap-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #f0ebf8;
  overflow: hidden;
}

.page-ngo .gap-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c56b8 0%, #a87ae8 52%, #c599ff 100%);
  box-shadow: 0 2px 8px rgba(88, 56, 140, 0.12);
}

.page-ngo .gap-bar-item.tone-blue .gap-bar-track span,
.page-ngo .gap-bar-item.tone-amber .gap-bar-track span,
.page-ngo .gap-bar-item.tone-mint .gap-bar-track span {
  background: linear-gradient(90deg, #7c56b8 0%, #a87ae8 52%, #c599ff 100%);
}

.ngo-topics-block {
  position: relative;
  z-index: 1;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.ngo-topics-block h3 {
  margin: 0 0 var(--space-md);
  font-size: 15px;
  font-weight: 800;
}

.page-ngo .need-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.page-ngo .need-tag {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(88, 56, 140, 0.12);
}

.page-ngo .need-tag.tone-blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #818cf8 100%);
}

.page-ngo .need-tag.tone-emerald {
  background: linear-gradient(135deg, #059669 0%, #34d399 100%);
}

.page-ngo .need-tag.tone-violet {
  background: linear-gradient(135deg, #7c3aed 0%, #c47be8 100%);
}

.ngo-insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.page-ngo .ngo-insight {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 0;
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(88, 56, 140, 0.14);
}

.page-ngo .ngo-insight.tone-mint {
  background: linear-gradient(135deg, #059669 0%, #34d399 42%, #2dd4bf 78%, #a7f3d0 100%);
}

.page-ngo .ngo-insight.tone-mint::after {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(16, 185, 129, 0.55) 0%, transparent 45%);
}

.page-ngo .ngo-insight.tone-blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #39ace3 38%, #818cf8 72%, #c599ff 100%);
}

.page-ngo .ngo-insight.tone-blue::after {
  background:
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, 0.45) 0%, transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(197, 153, 255, 0.65) 0%, transparent 38%);
}

.page-ngo .ngo-insight-icon {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.page-ngo .ngo-insight-icon .ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.page-ngo .ngo-insight > div span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.3;
}

.page-ngo .ngo-insight > div {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.page-ngo .ngo-insight strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
}

.ngo-stats {
  grid-template-columns: repeat(3, 1fr);
}

.ngo-stats .stat-card {
  min-height: 96px;
  padding: var(--space-sm);
}

.ngo-stats .stat-card strong {
  font-size: 18px;
}

.ngo-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.ngo-kpi {
  display: grid;
  gap: 4px;
  padding: var(--space-md) var(--space-sm);
  border: var(--outline);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: none;
  text-align: center;
}

.ngo-kpi strong {
  font-size: 18px;
  font-weight: 800;
}

.ngo-kpi span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.gap-bars {
  display: grid;
  gap: var(--space-md);
}

.gap-bar-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
}

.gap-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #edf0f5;
  overflow: hidden;
}

.gap-bar-track span {
  display: block;
  height: 100%;
  background: var(--purple);
  border-radius: inherit;
}

.parent-dashboard {
  display: grid;
  gap: var(--space-md);
}

.page-parent::after {
  height: 240px;
}

.page-parent .parent-ring-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(150, 130, 190, 0.1);
  background: linear-gradient(155deg, #f6f0ff 0%, #ede4ff 52%, #fbf7ff 100%);
}

.page-parent .parent-ring-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--purple-deep);
}

.page-parent .parent-ring-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.page-parent .parent-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.page-parent .week-chart {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: var(--space-md);
  border: 1px solid rgba(186, 154, 230, 0.18);
  border-radius: 24px;
  background: linear-gradient(155deg, #fbf8ff 0%, #f3ecfb 45%, #ffffff 100%);
  box-shadow: 0 10px 28px rgba(150, 130, 190, 0.1);
}

.page-parent .week-chart h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 var(--space-md);
  font-size: 18px;
  font-weight: 800;
  color: var(--purple-deep);
}

.page-parent .week-bars {
  position: relative;
  z-index: 1;
}

.page-parent .week-bars span {
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #a87ae8 0%, rgba(197, 153, 255, 0.42) 58%, rgba(255, 255, 255, 0) 100%);
}

.page-parent .subject-progress-heading h2 {
  color: var(--purple-deep);
}

.page-parent .subject-progress-card[data-open-subject],
.page-parent .subject-progress-card[data-select-lesson],
.page-parent button.subject-progress-card {
  cursor: pointer;
  border: 0;
  font: inherit;
  text-align: start;
  width: 100%;
}

.page-parent .subject-progress-card[data-open-subject]:active,
.page-parent .subject-progress-card[data-select-lesson]:active,
.page-parent button.subject-progress-card:active {
  transform: scale(0.99);
}

.page-parent .activity-feed-compact {
  margin-top: 0;
}

.page-parent .activity-pill {
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 18px rgba(150, 130, 190, 0.08);
}

.parent-ring-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-md);
}

.parent-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.parent-stat {
  display: grid;
  gap: 2px;
  padding: var(--space-md);
  border: var(--outline);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: none;
  text-align: center;
}

.parent-stat strong {
  font-size: 20px;
  font-weight: 800;
}

.parent-stat span {
  font-size: 12px;
  color: var(--muted);
}

.week-chart h3 {
  margin: 0 0 var(--space-md);
  font-size: 16px;
}

.week-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 6px;
  height: 100px;
}

.week-bars span {
  display: block;
  height: var(--h);
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--purple), var(--pastel-lavender));
}

.gap-panel h3 {
  margin-top: var(--space-md);
}

@media (max-width: 520px) {
  .home-actions {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .quiz-nav {
    grid-template-columns: 1fr;
  }

  .home-stats-strip {
    grid-template-columns: 1fr 1fr;
  }

  .stat-chip-link {
    grid-column: 1 / -1;
  }

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

  .ngo-kpi-row,
  .page-ngo .ngo-kpi-row,
  .page-parent .parent-stat-row {
    grid-template-columns: 1fr;
  }

  .ngo-insights {
    grid-template-columns: 1fr;
  }

  .page-ngo .ngo-camp-banner {
    min-height: 0;
  }

  .ngo-camp-overlay {
    grid-template-columns: 1fr;
    align-items: end;
    align-content: end;
    gap: 8px;
  }

  .ngo-sync-pill {
    justify-self: start;
  }

  .home-summary {
    grid-template-columns: 1fr 1fr;
  }

  .home-summary .text-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

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

  .ngo-stats {
    grid-template-columns: 1fr;
  }

  .quick-grid-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-grid-stats .stat-card {
    min-height: 96px;
    padding: var(--space-sm);
  }

  .quick-grid-stats .stat-card strong {
    font-size: 18px;
  }
}
