:root {
  --teal: #16b6c4;
  --teal-dark: #087f8d;
  --orange: #f39a34;
  --cream: #fff1d6;
  --navy: #0e1f3d;
  --coral: #ff6b6b;
  --mint: #21b98a;
  --ink: #17213b;
  --muted: #66728a;
  --line: rgba(14, 31, 61, 0.12);
  --paper: #fffaf0;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(14, 31, 61, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 16% 0%, rgba(22, 182, 196, 0.18), transparent 30rem),
    radial-gradient(circle at 90% 14%, rgba(243, 154, 52, 0.16), transparent 28rem),
    linear-gradient(180deg, #fffdf7 0%, #fff1d6 46%, #ebfbfb 100%);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
}

.screen {
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 92px;
}

.welcome-screen {
  display: grid;
  grid-template-rows: auto 1fr;
}

.brand-row,
.app-topbar,
.onboarding-top,
.lesson-top,
.lesson-actions {
  display: flex;
  align-items: center;
}

.brand-row {
  justify-content: flex-start;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 2rem;
  font-weight: 950;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.brand .en {
  color: var(--navy);
}

.brand .game {
  color: var(--orange);
}

.plain-button,
.ghost-button,
.primary-button,
.secondary-button,
.path-node,
.choice-card,
.time-card,
.bottom-nav button,
.activity-card {
  border-radius: 8px;
}

.plain-button {
  min-height: 44px;
  border: 1px solid var(--line);
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--navy);
  font-weight: 900;
}

.welcome-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.9fr);
  gap: 26px;
  align-items: center;
}

.welcome-copy h1 {
  max-width: 12ch;
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.04;
  font-weight: 950;
}

.welcome-copy p {
  max-width: 34rem;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.1rem;
}

.welcome-actions {
  display: grid;
  width: min(390px, 100%);
  gap: 12px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 0 18px;
  font-weight: 950;
  text-decoration: none;
}

.primary-button {
  border-color: #cc741d;
  background: linear-gradient(180deg, #ffb743, var(--orange));
  color: var(--navy);
  box-shadow: 0 8px 0 #c46c18, 0 18px 28px rgba(243, 154, 52, 0.2);
}

.primary-button:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 #c46c18, 0 12px 18px rgba(243, 154, 52, 0.16);
}

.secondary-button,
.ghost-button {
  background: var(--white);
  color: var(--navy);
}

.hero-art {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
}

.hero-art::before {
  position: absolute;
  inset: 36px 0;
  content: "";
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 182, 196, 0.14), rgba(255, 255, 255, 0.4));
  box-shadow: var(--shadow);
}

.fox-main {
  position: relative;
  width: min(420px, 92%);
  border: 8px solid var(--white);
  border-radius: 26px;
  box-shadow: var(--shadow);
  animation: floaty 3.8s ease-in-out infinite;
}

.speech {
  position: absolute;
  top: 70px;
  right: 20px;
  max-width: 245px;
  border: 1px solid rgba(22, 182, 196, 0.24);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--white);
  color: var(--navy);
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(14, 31, 61, 0.12);
}

.mascot-character {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  isolation: isolate;
  cursor: pointer;
}

.mascot-character:focus-visible {
  outline: 3px solid rgba(22, 182, 196, 0.55);
  outline-offset: 6px;
  border-radius: 8px;
}

.fox-svg {
  width: min(300px, 100%);
  filter: drop-shadow(0 18px 28px rgba(14, 31, 61, 0.16));
  overflow: visible;
}

.hero-mascot .fox-svg {
  width: min(360px, 88vw);
}

.question-mascot .fox-svg {
  width: 176px;
}

.side-mascot .fox-svg {
  width: min(230px, 100%);
}

.lesson-coach {
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  border: 1px solid rgba(22, 182, 196, 0.22);
  border-radius: 8px;
  padding: 10px;
  background: rgba(233, 251, 252, 0.72);
}

.lesson-coach .fox-svg {
  width: 92px;
}

.intro-mascot-row {
  min-height: 310px;
  align-content: end;
  overflow: hidden;
}

.study-mascot-row {
  margin-bottom: -4px;
}

.study-mascot {
  grid-template-columns: 138px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  width: min(560px, 100%);
  margin: 0 auto;
}

.study-mascot .fox-svg {
  width: 138px;
}

.mascot-bubble {
  max-width: min(420px, 100%);
  border: 1px solid rgba(22, 182, 196, 0.28);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  font-weight: 950;
  text-align: center;
  box-shadow: 0 12px 24px rgba(14, 31, 61, 0.1);
}

.hero-mascot .mascot-bubble {
  position: absolute;
  top: 32px;
  right: 0;
  width: min(260px, 68vw);
}

.peek-mascot .mascot-bubble {
  order: -1;
  z-index: 3;
}

.peek-mascot .fox-svg {
  transform: translateY(54px);
}

.hero-mascot.peek-mascot .fox-svg {
  transform: translateY(78px);
}

.lesson-coach .mascot-bubble {
  text-align: start;
}

.head,
.body,
.body-group,
.tail,
.arm,
.notebook,
.pencil,
.sparkles,
.mouth,
.brow,
.eye,
.normal-eyes,
.curious-eyes,
.excited-eyes {
  transform-box: fill-box;
  transform-origin: center;
}

.mascot-character .head {
  animation: head-idle 3.2s ease-in-out infinite;
}

.mascot-character .tail {
  transform-origin: 82% 68%;
  animation: tail-sway 2.6s ease-in-out infinite;
}

.mascot-character .eye {
  animation: blink 4.2s ease-in-out infinite;
}

.mascot-character .sparkles {
  opacity: 0;
  transform: scale(0.84);
}

.mascot-character .curious-eyes,
.mascot-character .excited-eyes {
  opacity: 0;
}

.mascot-character .pencil,
.mascot-character .notebook {
  opacity: 0;
  transform: translateY(8px) scale(0.92);
}

.mascot-character[data-mood="study"] .pencil,
.mascot-character[data-mood="study"] .notebook,
.mascot-character[data-mood="write"] .pencil,
.mascot-character[data-mood="write"] .notebook {
  opacity: 1;
  transform: none;
}

.mascot-character[data-mood="wave"] .right-arm,
.mascot-character[data-mood="point"] .right-arm,
.mascot-character[data-mood="peek"] .right-arm {
  transform-origin: 18% 86%;
  animation: wave-arm 900ms ease-in-out infinite alternate;
}

.mascot-character[data-mood="peek"] .body-group {
  animation: peek-rise 2.4s ease-in-out infinite;
}

.mascot-character[data-mood="talk"] .mouth {
  transform-origin: 50% 50%;
  animation: talk-mouth 320ms ease-in-out infinite;
}

.mascot-character[data-mood="talk"] .body {
  animation: body-bob 900ms ease-in-out infinite;
}

.mascot-character[data-mood="happy"] .body,
.mascot-character[data-mood="celebrate"] .body {
  animation: happy-hop 680ms ease-in-out infinite;
}

.mascot-character[data-mood="happy"] .head {
  animation: happy-head 680ms ease-in-out infinite;
}

.mascot-character[data-mood="study"] .normal-eyes {
  opacity: 0;
}

.mascot-character[data-mood="study"] .curious-eyes {
  opacity: 1;
}

.mascot-character[data-mood="study"] .head {
  animation: curious-lean 2.1s ease-in-out infinite;
}

.mascot-character[data-mood="write"] .normal-eyes {
  opacity: 0;
}

.mascot-character[data-mood="write"] .curious-eyes {
  opacity: 1;
}

.mascot-character[data-mood="write"] .pencil {
  animation: pencil-write 420ms ease-in-out infinite alternate;
}

.mascot-character[data-mood="write"] .right-arm {
  animation: writing-hand 420ms ease-in-out infinite alternate;
}

.mascot-character[data-mood="encourage"] .head {
  animation: encourage-nod 900ms ease-in-out infinite;
}

.mascot-character[data-mood="tired"] .head {
  transform: rotate(8deg) translateY(7px);
  animation: none;
}

.mascot-character[data-mood="tired"] .eye {
  transform: scaleY(0.35);
  animation: none;
}

.mascot-character[data-mood="celebrate"] .sparkles {
  opacity: 1;
  animation: sparkle-pop 720ms ease-in-out infinite alternate;
}

.mascot-character[data-mood="celebrate"] .normal-eyes {
  opacity: 0;
}

.mascot-character[data-mood="celebrate"] .excited-eyes {
  opacity: 1;
  animation: excited-pop 520ms ease-in-out infinite alternate;
}

.mascot-character[data-mood="celebrate"] .right-arm,
.mascot-character[data-mood="celebrate"] .left-arm {
  transform-origin: 50% 90%;
  animation: celebrate-arms 520ms ease-in-out infinite alternate;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}

@keyframes head-idle {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-4px) rotate(-1deg);
  }
}

@keyframes peek-rise {
  0%,
  100% {
    transform: translateY(4px);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes tail-sway {
  0%,
  100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(8deg);
  }
}

@keyframes blink {
  0%,
  88%,
  100% {
    transform: scaleY(1);
  }
  92%,
  94% {
    transform: scaleY(0.08);
  }
}

@keyframes wave-arm {
  from {
    transform: rotate(-10deg) translateY(0);
  }
  to {
    transform: rotate(18deg) translateY(-5px);
  }
}

@keyframes talk-mouth {
  0%,
  100% {
    transform: scaleY(0.55);
  }
  50% {
    transform: scaleY(1.35);
  }
}

@keyframes body-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes happy-hop {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-9px);
  }
}

@keyframes happy-head {
  0%,
  100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(3deg) translateY(-5px);
  }
}

@keyframes curious-lean {
  0%,
  100% {
    transform: rotate(-2deg) translateY(0);
  }
  50% {
    transform: rotate(3deg) translateY(-3px);
  }
}

@keyframes pencil-write {
  from {
    transform: translate(0, 0) rotate(-2deg);
  }
  to {
    transform: translate(-8px, 5px) rotate(6deg);
  }
}

@keyframes writing-hand {
  from {
    transform: rotate(-2deg);
  }
  to {
    transform: rotate(7deg) translateY(3px);
  }
}

@keyframes excited-pop {
  from {
    transform: scale(0.92);
  }
  to {
    transform: scale(1.08);
  }
}

@keyframes encourage-nod {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(6deg) translateY(3px);
  }
}

@keyframes sparkle-pop {
  from {
    transform: scale(0.74);
    opacity: 0.45;
  }
  to {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes celebrate-arms {
  from {
    transform: rotate(-8deg);
  }
  to {
    transform: rotate(12deg) translateY(-4px);
  }
}

.onboarding-screen {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  width: min(780px, 100%);
}

.onboarding-top {
  gap: 12px;
}

.back-button,
.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-size: 1.4rem;
  font-weight: 900;
}

.step-progress {
  height: 12px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(14, 31, 61, 0.1);
}

.step-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 220ms ease;
}

.onboarding-card {
  display: grid;
  align-content: center;
  gap: 20px;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.mascot-row {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.mascot {
  width: 170px;
  height: 170px;
  border: 6px solid var(--white);
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 18px 34px rgba(14, 31, 61, 0.16);
  animation: wave 2.6s ease-in-out infinite;
}

@keyframes wave {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  35% {
    transform: translateY(-8px) rotate(2deg);
  }
  70% {
    transform: translateY(0) rotate(-1deg);
  }
}

.bubble {
  max-width: 420px;
  border: 1px solid rgba(22, 182, 196, 0.24);
  border-radius: 8px;
  padding: 14px 16px;
  background: #effdfe;
  color: var(--navy);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 900;
}

.question-title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.18;
  text-align: center;
}

.question-subtitle {
  margin: -8px auto 0;
  max-width: 34rem;
  color: var(--muted);
  text-align: center;
}

.option-grid {
  display: grid;
  gap: 12px;
}

.option-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card,
.time-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 74px;
  border: 2px solid var(--line);
  padding: 12px;
  background: var(--white);
  color: var(--navy);
  text-align: start;
  box-shadow: 0 8px 18px rgba(14, 31, 61, 0.06);
}

.choice-card.selected,
.time-card.selected {
  border-color: var(--teal);
  background: #e9fbfc;
}

.choice-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: #fff6e5;
  font-size: 1.45rem;
}

.choice-card strong,
.time-card strong {
  display: block;
  font-size: 1rem;
}

.choice-card small,
.time-card small {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.month-plan {
  display: grid;
  gap: 12px;
}

.week-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--white);
}

.week-card span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  font-weight: 950;
}

.week-card h3,
.week-card p {
  margin: 0;
}

.week-card p {
  color: var(--muted);
}

.placement-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.placement-button {
  display: grid;
  min-height: 174px;
  gap: 8px;
  align-content: center;
  justify-items: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--white);
  color: var(--navy);
  text-align: center;
}

.placement-button strong {
  font-size: 1.18rem;
}

.placement-button span {
  font-size: 2.2rem;
}

.onboarding-bottom {
  position: sticky;
  bottom: 0;
  display: grid;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0), var(--paper) 42%);
}

.onboarding-bottom .primary-button {
  width: min(420px, 100%);
  justify-self: center;
}

.app-home {
  width: min(1060px, 100%);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0 14px;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(255, 250, 240, 0.78));
  backdrop-filter: blur(14px);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat {
  display: inline-flex;
  min-width: 70px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--navy);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(14, 31, 61, 0.06);
}

.path-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.path-panel,
.side-panel,
.activity-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.path-panel {
  min-height: 680px;
  padding: 24px;
}

.path-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 28px;
}

.kicker {
  margin: 0 0 4px;
  color: var(--teal-dark);
  font-size: 0.88rem;
  font-weight: 950;
}

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

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.18;
}

.path-header h1 {
  margin-bottom: 6px;
  font-size: clamp(2rem, 4.6vw, 3.7rem);
}

.path-header p,
.side-panel p,
.activity-card p {
  color: var(--muted);
}

.path-list {
  position: relative;
  display: grid;
  gap: 22px;
  justify-items: center;
}

.path-list::before {
  position: absolute;
  top: 36px;
  bottom: 36px;
  left: 50%;
  width: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(22, 182, 196, 0.55), rgba(243, 154, 52, 0.55));
  content: "";
}

.path-node {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(360px, 92%);
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 2px solid var(--line);
  padding: 14px;
  background: var(--white);
  color: var(--navy);
  text-align: start;
  box-shadow: 0 12px 24px rgba(14, 31, 61, 0.12);
}

.path-node:nth-child(odd) {
  margin-left: min(24%, 120px);
}

.path-node:nth-child(even) {
  margin-right: min(24%, 120px);
}

.path-node.current {
  border-color: var(--teal);
  background: #effdfe;
}

.path-node.done {
  border-color: rgba(33, 185, 138, 0.48);
}

.path-node.locked {
  cursor: not-allowed;
  opacity: 0.56;
}

.node-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  font-size: 2rem;
  font-weight: 950;
}

.path-node.done .node-icon {
  background: var(--mint);
}

.path-node.locked .node-icon {
  background: #b7bfcd;
}

.path-node h3,
.path-node p {
  margin: 0;
}

.stars {
  color: #f5b301;
  font-weight: 900;
}

.side-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.mini-mascot {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.goal-ring {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

.goal-ring svg {
  width: 150px;
  height: 150px;
  transform: rotate(-90deg);
}

.goal-ring circle {
  fill: none;
  stroke-width: 14;
}

.goal-ring .track {
  stroke: rgba(22, 182, 196, 0.16);
}

.goal-ring .fill {
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-dasharray: 302;
  stroke-dashoffset: 302;
}

.goal-ring strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-size: 1.9rem;
}

.activity-panel {
  margin-top: 18px;
  padding: 20px;
}

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

.activity-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  border: 1px solid var(--line);
  padding: 14px;
  background: var(--white);
  color: var(--navy);
  text-align: start;
}

.activity-card span {
  font-size: 1.8rem;
}

.bottom-nav {
  position: fixed;
  right: 50%;
  bottom: 12px;
  z-index: 30;
  display: grid;
  width: min(480px, calc(100% - 24px));
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  transform: translateX(50%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(14, 31, 61, 0.18);
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  display: grid;
  min-height: 56px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.bottom-nav button.active {
  background: var(--teal);
  color: var(--white);
}

.lesson-dialog {
  width: min(560px, calc(100% - 24px));
  padding: 0;
  border: 0;
  background: transparent;
}

.lesson-dialog::backdrop {
  background: rgba(14, 31, 61, 0.45);
  backdrop-filter: blur(8px);
}

.lesson-card {
  display: grid;
  min-height: min(690px, calc(100vh - 28px));
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.lesson-top {
  gap: 12px;
  padding: 12px;
}

.lesson-meter {
  flex: 1;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(14, 31, 61, 0.1);
}

.lesson-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
}

.lesson-body {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px 22px;
}

.lesson-body h2 {
  margin: 0;
  font-size: 1.7rem;
}

.lesson-body p {
  color: var(--muted);
}

.answer-area {
  display: grid;
  gap: 10px;
}

.answer-button,
.chip-button,
.match-button {
  min-height: 54px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--white);
  color: var(--navy);
  font-weight: 900;
  text-align: center;
}

.answer-button.selected,
.chip-button.selected,
.match-button.selected {
  border-color: var(--teal);
  background: #e9fbfc;
}

.typed-answer {
  width: 100%;
  min-height: 56px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  direction: ltr;
  text-align: left;
}

.selected-line {
  min-height: 56px;
  border: 1px dashed rgba(14, 31, 61, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.64);
  direction: ltr;
  text-align: left;
}

.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.listen-button {
  justify-self: start;
  min-height: 44px;
  border: 1px solid rgba(22, 182, 196, 0.34);
  border-radius: 8px;
  padding: 0 16px;
  background: #e9fbfc;
  color: var(--navy);
  font-weight: 900;
}

.lesson-actions {
  min-height: 92px;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px;
  background: var(--white);
}

.lesson-actions p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.lesson-actions p.good {
  color: var(--mint);
}

.lesson-actions p.bad {
  color: var(--coral);
}

.toast {
  position: fixed;
  right: 50%;
  bottom: 92px;
  z-index: 60;
  width: min(420px, calc(100% - 30px));
  padding: 12px 16px;
  transform: translate(50%, 30px);
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

@media (max-width: 900px) {
  .welcome-hero,
  .path-layout {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 390px;
  }

  .fox-main {
    width: min(340px, 92%);
  }

  .speech {
    top: 28px;
    right: 10px;
  }

  .path-node:nth-child(odd),
  .path-node:nth-child(even) {
    margin-left: 0;
    margin-right: 0;
  }

  .activity-grid,
  .option-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .screen {
    padding: 10px 8px 92px;
  }

  .brand {
    font-size: 1.55rem;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .welcome-hero {
    align-content: start;
    gap: 10px;
  }

  .welcome-copy {
    padding-top: 8px;
    text-align: center;
  }

  .welcome-copy h1,
  .welcome-copy p,
  .welcome-actions {
    margin-right: auto;
    margin-left: auto;
  }

  .welcome-copy h1 {
    max-width: 10ch;
    margin-bottom: 10px;
    font-size: 2.35rem;
  }

  .welcome-copy p {
    margin-bottom: 18px;
    font-size: 1rem;
  }

  .hero-art {
    min-height: 245px;
    margin-top: 12px;
  }

  .hero-art::before {
    inset: 0 8px 18px;
  }

  .fox-main {
    width: min(205px, 78%);
    border-width: 6px;
    border-radius: 22px;
  }

  .speech {
    display: none;
  }

  .hero-mascot .fox-svg {
    width: min(250px, 76vw);
  }

  .hero-mascot.peek-mascot .fox-svg {
    transform: translateY(48px);
  }

  .hero-mascot .mascot-bubble {
    top: 18px;
    right: 50%;
    transform: translateX(50%);
    width: min(260px, 88vw);
  }

  .onboarding-card {
    min-height: 550px;
    padding: 18px 14px;
  }

  .mascot {
    width: 138px;
    height: 138px;
  }

  .question-title {
    font-size: 2rem;
  }

  .choice-card,
  .time-card {
    min-height: 68px;
  }

  .placement-actions {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    align-items: start;
  }

  .stats {
    justify-content: end;
  }

  .stat {
    min-width: 58px;
  }

  .path-panel,
  .side-panel,
  .activity-panel {
    padding: 16px;
  }

  .path-header {
    display: grid;
  }

  .path-list::before {
    left: 38px;
    transform: none;
  }

  .path-node {
    width: 100%;
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .node-icon {
    width: 66px;
    height: 66px;
  }

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