:root {
  --green: #58b800;
  --green-dark: #367c00;
  --green-soft: #effbdc;
  --blue: #1769c2;
  --blue-dark: #0b4481;
  --blue-soft: #eaf4ff;
  --purple: #7758e8;
  --purple-soft: #f1edff;
  --orange: #ff9f1c;
  --orange-soft: #fff3df;
  --red: #dc4458;
  --red-soft: #fff0f2;
  --ink: #032f52;
  --muted: #66758a;
  --line: #dce4ec;
  --surface: #ffffff;
  --surface-alt: #f7fafc;
  --page: #f1f6f8;
  --shadow-sm: 0 4px 14px rgba(31, 55, 80, 0.08);
  --shadow-md: 0 16px 40px rgba(31, 55, 80, 0.12);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --header-height: 78px;
  --content-width: 1180px;
  --font: "Poppins", "Nunito", ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 22px);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 8%, rgba(88, 184, 0, 0.08), transparent 20rem),
    radial-gradient(circle at 94% 22%, rgba(23, 105, 194, 0.08), transparent 22rem),
    var(--page);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  transform: translateY(-150%);
  padding: 10px 16px;
  color: white;
  background: var(--ink);
  border-radius: 10px;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

:focus-visible {
  outline: 4px solid rgba(23, 105, 194, 0.22);
  outline-offset: 3px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  border-bottom: 1px solid rgba(220, 228, 236, 0.9);
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(var(--content-width), calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(260px, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.brand {
  width: 124px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}


.brand img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px 14px 14px 5px;
  color: white;
  background: linear-gradient(145deg, #78d80f, var(--green));
  box-shadow: 0 6px 0 #3d8a00;
  font-size: 1.25rem;
  font-weight: 900;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 0.98rem;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-progress {
  min-width: 0;
}

.progress-copy {
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.progress-copy strong {
  color: var(--green-dark);
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebef;
  box-shadow: inset 0 2px 3px rgba(31, 55, 80, 0.06);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #8ddd18);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
  transition: width 0.55s cubic-bezier(.2, .8, .2, 1);
}

.header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-chip,
.bonus-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border: 1px solid #ffe0ac;
  border-radius: 999px;
  padding: 9px 13px;
  color: #945600;
  background: var(--orange-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: white;
  font-weight: 900;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-button:hover {
  transform: translateY(-2px);
  border-color: #b8c5d2;
  background: var(--surface-alt);
}

main {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.quick-start {
  position: relative;
  z-index: 2;
  width: calc(100% - 64px);
  margin: -30px auto 30px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(420px, 1.45fr) auto;
  align-items: center;
  gap: 24px;
  border: 1px solid rgba(23, 105, 194, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 36px rgba(31, 55, 80, 0.13);
}

.quick-start-copy h2 {
  margin: 3px 0 4px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.2;
}

.quick-start-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.quick-start-steps {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  list-style: none;
}

.quick-start-steps li {
  min-width: 0;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 14px;
  background: var(--surface-alt);
}

.quick-start-steps li > span {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--blue);
  font-size:1rem;
  font-weight: 900;
}

.quick-start-steps li:nth-child(2) > span { background: var(--purple); }
.quick-start-steps li:nth-child(3) > span { background: var(--green-dark); }

.quick-start-steps div {
  min-width: 0;
  display: grid;
  line-height: 1.25;
}

.quick-start-steps strong { font-size: 0.92rem; }
.quick-start-steps small { color: var(--muted); font-size: 0.88rem; }

.quick-start-link {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  color: white;
  background: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease;
}

.quick-start-link:hover {
  transform: translateY(-2px);
  background: var(--blue-dark);
}

.hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: 38px;
  padding: clamp(36px, 6vw, 72px);
  border: 1px solid rgba(88, 184, 0, 0.15);
  border-radius: 38px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 255, 228, 0.96)),
    white;
  box-shadow: var(--shadow-md);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 310px;
  height: 310px;
  right: -90px;
  top: -90px;
  background: rgba(23, 105, 194, 0.08);
}

.hero::after {
  width: 220px;
  height: 220px;
  left: -90px;
  bottom: -120px;
  background: rgba(88, 184, 0, 0.12);
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker,
.mission-label,
.activity-tag {
  color: var(--green-dark);
  font-size: 1.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 650px;
  margin: 10px 0 14px;
  font-size: clamp(1.55rem, 5vw, 5.1rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.hero-lead {
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.hero-tags {
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span {
  border: 1px solid #dbe9ca;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--green-dark);
  background: white;
  font-size: 0.8rem;
  font-weight: 800;
}

.primary-button,
.secondary-button,
.check-button,
.ghost-button {
  min-height: 48px;
  border-radius: 14px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  text-decoration: none;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button,
.check-button {
  color: white;
  background: linear-gradient(180deg, #69c800, var(--green));
  box-shadow: 0 5px 0 #3e8700;
}

.primary-button:hover,
.check-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #3e8700;
}

.primary-button:active,
.check-button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #3e8700;
}

.secondary-button {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 1px solid #cce3fa;
}

.secondary-button:hover {
  transform: translateY(-2px);
  background: #dceeff;
}

.ghost-button {
  min-height: 42px;
  padding: 9px 14px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
}

.ghost-button:hover {
  transform: translateY(-1px);
  color: var(--ink);
  border-color: #b8c5d2;
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none !important;
  box-shadow: none !important;
}

.hero-cta {
  min-width: 190px;
}

.hero-visual {
  min-height: 315px;
  display: grid;
  place-items: center;
}

.hero-image-shell {
  position: relative;
  width: min(100%, 450px);
  padding: 16px;
  border-radius: 36% 24% 38% 28% / 28% 38% 25% 42%;
  background: linear-gradient(145deg, var(--green), #9be02f);
  box-shadow: 0 22px 50px rgba(55, 124, 0, 0.2);
  transform: rotate(2deg);
}

.hero-image-shell img {
  width: 100%;
  aspect-ratio: 411 / 293;
  object-fit: cover;
  border-radius: 31% 20% 34% 24% / 24% 34% 20% 38%;
  background: white;
}

.hero-bubble {
  position: absolute;
  z-index: 2;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 5px solid white;
  border-radius: 20px;
  background: var(--blue-soft);
  box-shadow: var(--shadow-sm);
  font-size: 1.75rem;
}

.bubble-one {
  top: 6%;
  left: 4%;
  transform: rotate(-8deg);
}

.bubble-two {
  right: 3%;
  bottom: 15%;
  transform: rotate(8deg);
  background: var(--orange-soft);
}

.hero-score-card {
  position: absolute;
  left: 5%;
  bottom: 2%;
  min-width: 150px;
  padding: 13px 16px;
  display: grid;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  transform: rotate(-3deg);
}

.hero-score-card span {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-score-card strong {
  color: var(--blue-dark);
  font-size: 1.2rem;
}

.quote-card,
.goal-panel {
  margin-top: 24px;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
}

.quote-card {
  padding: 24px 28px;
  display: grid;
  grid-template-columns: auto 1fr minmax(270px, 0.7fr);
  align-items: center;
  gap: 20px;
  border: 1px solid #e5eaf0;
}

.quote-mark {
  align-self: start;
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 4.4rem;
  line-height: 0.8;
}

blockquote {
  margin: 0 0 8px;
  font-size: 1.04rem;
  font-weight: 800;
}

.quote-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.mini-audios {
  display: grid;
  gap: 8px;
}

.mini-audios label,
.audio-grid label {
  display: grid;
  gap: 5px;
}

.mini-audios label span,
.audio-grid label span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

audio {
  width: 100%;
  height: 38px;
}

.goal-panel {
  padding: 34px;
  border: 1px solid #e5eaf0;
}

.goal-panel h2,
.games-heading h2,
.finish-panel h2 {
  margin: 5px 0 20px;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

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

.goal-grid article {
  min-width: 0;
  min-height: 140px;
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #e5eaf0;
  border-radius: 18px;
  background: var(--surface-alt);
}

.goal-icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-sm);
  font-size: 1.25rem;
}

.goal-grid strong {
  display: block;
  margin-bottom: 4px;
}

.goal-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.lesson-layout {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.path-panel {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  max-height: calc(100vh - var(--header-height) - 36px);
  overflow: auto;
  padding: 20px;
  border: 1px solid #e4eaf0;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}

.path-heading {
  display: grid;
  gap: 3px;
  margin-bottom: 13px;
}

.path-heading strong {
  font-size: 1rem;
}

.path-panel nav {
  display: grid;
  gap: 4px;
}

.path-panel nav a {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.path-panel nav a:hover,
.path-panel nav a.is-current {
  background: var(--green-soft);
  transform: translateX(2px);
}

.path-panel nav a > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: white;
  font-size: 0.87rem;
  font-weight: 900;
}

.path-panel nav a div {
  min-width: 0;
  display: grid;
  line-height: 1.18;
}

.path-panel nav a strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
}

.path-panel nav a small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

.path-panel nav a b {
  width: 19px;
  height: 19px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 0.88rem;
}

.path-panel nav a.is-complete > span {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.path-panel nav a.is-complete b {
  display: grid;
}

.lesson-content {
  min-width: 0;
  display: grid;
  gap: 24px;
}

.mission-card,
.games-section,
.finish-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #e2e9ef;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-sm);
}

.mission-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--green), #8ddd18);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
}

.mission-card.is-complete::before {
  transform: scaleX(1);
}

.mission-header {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin-bottom: 24px;
}

.mission-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 17px 17px 17px 6px;
  background: linear-gradient(145deg, var(--blue), #4697e8);
  box-shadow: 0 5px 0 #0b4c90;
  font-size: 1.25rem;
  font-weight: 900;
}

.mission-header h2 {
  margin: 4px 0 2px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.mission-header p {
  margin: 0;
  color: var(--muted);
}

.mission-status {
  align-self: center;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mission-card.is-complete .mission-status {
  color: var(--green-dark);
  border-color: #cbe8ac;
  background: var(--green-soft);
}

.mission-card.is-complete .mission-number {
  background: linear-gradient(145deg, var(--green), #8ddd18);
  box-shadow: 0 5px 0 #3f8700;
}

.media-panel,
.audio-strip,
.quick-check,
.builder-panel {
  border: 1px solid #d9e7f4;
  border-radius: 20px;
  background: var(--blue-soft);
}

.media-panel {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(300px, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.media-copy {
  display: flex;
  align-items: center;
  gap: 11px;
}

.media-copy p,
.audio-strip p,
.reference-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.media-icon {
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: white;
  font-size: 1.35rem;
}

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

.story-tabs {
  margin: 24px 0 12px;
  display: inline-flex;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-alt);
}

.story-tabs button {
  min-width: 110px;
  border: 0;
  border-radius: 10px;
  padding: 9px 15px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.story-tabs button[aria-selected="true"] {
  color: var(--blue-dark);
  background: white;
  box-shadow: var(--shadow-sm);
}

.story-text {
  max-height: 520px;
  overflow: auto;
  padding: 24px;
  border: 1px solid #e4eaf0;
  border-radius: 20px;
  background: #fbfcfd;
  scrollbar-width: thin;
}

.story-text h3 {
  margin: 0 0 16px;
  color: var(--green-dark);
  font-size: 1.35rem;
}

.story-text p {
  margin: 0 0 15px;
  color: #3e4d60;
}

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

.mission-footer,
.activity-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tip {
  margin: 0;
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.audio-strip {
  padding: 15px;
  display: grid;
  grid-template-columns: 52px minmax(170px, 0.8fr) repeat(2, minmax(190px, 1fr));
  align-items: center;
  gap: 12px;
}

.audio-strip img {
  width: 52px;
  height: 52px;
}

.reference-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 0.86fr;
  gap: 16px;
}

.reference-card {
  min-width: 0;
  padding: 20px;
  border-radius: 20px;
}

.frequency-card {
  border: 1px solid #d8eafc;
  background: #f3f9ff;
}

.prep-card {
  border: 1px solid #ded5ff;
  background: var(--purple-soft);
}

.reference-title {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reference-title > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: white;
  font-size: 1.25rem;
}

.reference-title h3 {
  margin: 0;
  font-size: 1.08rem;
}

.frequency-list {
  display: grid;
  gap: 9px;
}

.frequency-list > div {
  display: grid;
  grid-template-columns: 82px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
}

.frequency-list > div strong {
  font-size: 0.77rem;
}

.frequency-list > div > span {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8f4;
}

.frequency-list i {
  display: block;
  width: max(4px, var(--level));
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #65aff4);
}

.frequency-list b {
  text-align: right;
  color: var(--blue-dark);
}

.example-line {
  margin: 17px 0 0;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--muted);
  background: white;
  font-size: 0.8rem;
}

.example-line mark {
  color: var(--blue-dark);
  background: #dceeff;
}

.prep-rule {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.prep-rule > b {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--purple);
  font-size: 0.72rem;
}

.prep-rule p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.quick-check {
  margin-top: 18px;
  padding: 20px;
  background: var(--surface-alt);
  border-color: #e3e8ed;
}

.activity-heading,
.record-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.activity-heading h3,
.record-heading h3 {
  margin: 3px 0 0;
}

.score-pill {
  min-width: 62px;
  padding: 7px 10px;
  border-radius: 999px;
  text-align: center;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 0.8rem;
  font-weight: 900;
}

.inline-questions {
  margin-top: 15px;
  display: grid;
  gap: 10px;
}

.inline-questions label {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  font-size: 0.92rem;
}

select,
input,
textarea {
  border: 2px solid #d6dfe7;
  border-radius: 11px;
  color: var(--ink);
  background: white;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

select {
  min-height: 39px;
  padding: 6px 34px 6px 10px;
}

input {
  min-height: 42px;
  padding: 8px 11px;
}

textarea {
  width: 100%;
  padding: 14px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 105, 194, 0.1);
  outline: 0;
}

.is-correct,
input.is-correct,
select.is-correct {
  border-color: var(--green) !important;
  background: var(--green-soft) !important;
}

.is-incorrect,
input.is-incorrect,
select.is-incorrect {
  border-color: var(--red) !important;
  background: var(--red-soft) !important;
}

.feedback {
  min-height: 24px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.feedback.success {
  color: var(--green-dark);
}

.feedback.error {
  color: var(--red);
}

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

.tool {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: 15px;
  color: var(--muted);
  background: white;
  font-weight: 850;
}

.tool > span {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.tool[data-tool="verb"] > span {
  background: var(--green);
}

.tool[data-tool="adverb"] > span {
  background: var(--blue);
}

.tool[data-tool="preposition"] > span {
  background: var(--purple);
}

.tool.active {
  color: var(--ink);
  border-color: #bfd3e6;
  background: var(--surface-alt);
  box-shadow: var(--shadow-sm);
}

.tool b {
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: #edf1f4;
  font-size: 0.72rem;
}

.hunt-instruction {
  margin: 18px 0 10px;
  color: var(--muted);
  font-weight: 750;
}

.word-hunt {
  min-height: 164px;
  padding: 22px;
  border: 2px dashed #d8e1e8;
  border-radius: 18px;
  background: #fbfcfd;
  font-size: 1.06rem;
  line-height: 2.15;
}

.word-token {
  display: inline-block;
  border: 0;
  border-radius: 7px;
  padding: 1px 3px;
  color: inherit;
  background: transparent;
  line-height: 1.45;
}

.word-token[data-category] {
  cursor: pointer;
}

.word-token[data-category]:hover {
  background: #edf3f7;
}

.word-token.found-verb {
  color: #2c7100;
  background: #daf3bd;
  box-shadow: inset 0 -3px 0 var(--green);
}

.word-token.found-adverb {
  color: var(--blue-dark);
  background: #d8ebff;
  box-shadow: inset 0 -3px 0 var(--blue);
}

.word-token.found-preposition {
  color: #4e38a9;
  background: #e4ddff;
  box-shadow: inset 0 -3px 0 var(--purple);
}

.word-token.hint {
  animation: pulse-hint 1s ease 2;
}

.word-token.wrong {
  animation: shake 0.35s ease;
  background: var(--red-soft);
}

.tf-list,
.sentence-list,
.prep-quiz {
  display: grid;
  gap: 12px;
}

.tf-question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-alt);
}

.question-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.question-copy > span,
.sentence-list label > span {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 0.8rem;
  font-weight: 900;
}

.question-copy p {
  margin: 0;
  font-weight: 750;
}

.choice-buttons {
  display: flex;
  gap: 8px;
}

.choice-buttons button {
  min-width: 76px;
  min-height: 42px;
  border: 2px solid #d5dee6;
  border-radius: 12px;
  color: var(--muted);
  background: white;
  font-weight: 850;
}

.choice-buttons button:hover {
  border-color: #aebdca;
}

.choice-buttons button.selected {
  color: var(--blue-dark);
  border-color: var(--blue);
  background: var(--blue-soft);
}

.choice-buttons button.correct-choice {
  color: var(--green-dark);
  border-color: var(--green);
  background: var(--green-soft);
}

.choice-buttons button.wrong-choice {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-soft);
}

.correction-field {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.picture-card {
  position: relative;
  min-width: 0;
  padding: 11px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-alt);
}

.picture-card img {
  width: 100%;
  aspect-ratio: 411 / 293;
  object-fit: cover;
  border-radius: 14px;
  background: white;
}

.picture-card > span {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 3px solid white;
  border-radius: 10px;
  color: white;
  background: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
}

.picture-card input {
  width: 100%;
  text-align: center;
  font-weight: 800;
}

.picture-card:nth-child(4),
.picture-card:nth-child(5) {
  grid-column: span 1;
}

.grammar-example {
  margin-bottom: 15px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 15px;
  background: var(--green-soft);
}

.grammar-example span {
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--green-dark);
  background: white;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.grammar-example p {
  margin: 0;
}

.sentence-list label {
  min-width: 0;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-alt);
}

.sentence-list p {
  min-width: 0;
  margin: 0;
}

.sentence-list input {
  width: 82px;
  min-height: 38px;
  margin: 3px 4px;
  text-align: center;
  font-weight: 800;
}

.sentence-list em {
  color: var(--green-dark);
  white-space: nowrap;
}

.grammar-tip {
  margin-top: 15px;
  padding: 13px 15px;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #f8dbab;
  border-radius: 15px;
  background: var(--orange-soft);
}

.grammar-tip p {
  margin: 0;
  color: #755019;
  font-size: 0.86rem;
}

.grammar-tip ins {
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 900;
}

.grammar-tip del {
  color: var(--red);
}

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

.prep-quiz label {
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-alt);
}

.prep-quiz label > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: white;
  font-size: 1.25rem;
}

.prep-quiz p {
  margin: 0;
}

.prep-quiz select {
  min-width: 76px;
  margin: 0 4px;
  font-weight: 900;
}

.writing-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
}

.writing-character {
  align-self: start;
  padding: 14px;
  border: 1px solid #d6ebbd;
  border-radius: 20px;
  background: var(--green-soft);
}

.writing-character img {
  width: 100%;
  aspect-ratio: 267 / 190;
  object-fit: contain;
}

.speech-bubble {
  position: relative;
  margin-top: 10px;
  padding: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-radius: 15px;
  background: white;
}

.speech-bubble strong {
  width: 100%;
  font-size: 0.8rem;
}

.speech-bubble span {
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.88rem;
  font-weight: 800;
}

.writing-editor > label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

.writing-editor textarea {
  min-height: 225px;
  line-height: 1.7;
}

.editor-meta {
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

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

.writing-checklist span {
  position: relative;
  padding: 9px 10px 9px 32px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-alt);
  font-size: 0.73rem;
  font-weight: 750;
}

.writing-checklist span::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid #bdc8d2;
  border-radius: 50%;
  transform: translateY(-50%);
}

.writing-checklist span.passed {
  color: var(--green-dark);
  border-color: #cbe8ac;
  background: var(--green-soft);
}

.writing-checklist span.passed::before {
  content: "✓";
  display: grid;
  place-items: center;
  color: white;
  border-color: var(--green);
  background: var(--green);
  font-size: 0.6rem;
  font-weight: 900;
}

.builder-panel {
  padding: 18px;
  background: linear-gradient(135deg, var(--blue-soft), #f5fbff);
}

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

.builder-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.builder-controls select {
  width: 100%;
  color: var(--ink);
  font-weight: 750;
  text-transform: none;
  letter-spacing: 0;
}

.builder-controls button {
  grid-column: 1 / -1;
}

.sentence-preview {
  margin-top: 14px;
  padding: 16px;
  border: 2px dashed #bfd7ed;
  border-radius: 15px;
  text-align: center;
  color: var(--blue-dark);
  background: white;
  font-size: 1.05rem;
  font-weight: 850;
}

.record-heading {
  margin-top: 20px;
}

.sentence-record {
  min-height: 90px;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.sentence-record li {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-alt);
}

.sentence-record li > span:first-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.sentence-record li button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--red);
  background: var(--red-soft);
}

.sentence-record .empty-record {
  display: block;
  color: var(--muted);
  border-style: dashed;
  text-align: center;
}

.games-section {
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 159, 28, 0.12), transparent 11rem),
    white;
}

.games-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.games-heading h2 {
  margin-bottom: 4px;
}

.games-heading p {
  margin: 0;
  color: var(--muted);
}

.games-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.games-grid a {
  min-width: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: var(--surface-alt);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.games-grid a:hover {
  transform: translateY(-3px);
  border-color: #bdcad5;
  box-shadow: var(--shadow-sm);
}

.games-grid img {
  width: 90px;
  height: 66px;
  object-fit: contain;
  border-radius: 10px;
  background: #0a0a0a;
}

.games-grid a div {
  min-width: 0;
  display: grid;
}

.games-grid a strong {
  font-size: 0.9rem;
}

.games-grid a span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.games-grid a b {
  white-space: nowrap;
  color: var(--blue-dark);
  font-size: 0.74rem;
}

.finish-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-color: #d8e9c2;
  background: linear-gradient(135deg, #f5ffe8, white);
}

.finish-panel.is-done {
  border-color: #b8dd89;
  background: linear-gradient(135deg, #eaffce, #f9fff1);
}

.finish-badge {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 25px 25px 25px 8px;
  background: white;
  box-shadow: var(--shadow-md);
  font-size: 2.4rem;
}

.finish-panel h2 {
  margin-bottom: 4px;
}

.finish-panel p {
  margin: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  max-width: min(440px, calc(100% - 32px));
  padding: 13px 18px;
  border: 1px solid #cbe8ac;
  border-radius: 14px;
  color: var(--green-dark);
  background: rgba(244, 255, 230, 0.97);
  box-shadow: var(--shadow-md);
  font-weight: 850;
  transform: translate(-50%, 130%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 32, 48, 0.55);
  backdrop-filter: blur(6px);
}

.completion-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 36px;
  border-radius: 30px;
  text-align: center;
  background: white;
  box-shadow: 0 30px 90px rgba(17, 38, 58, 0.3);
  animation: modal-in 0.35s cubic-bezier(.2, .8, .2, 1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-alt);
  font-size: 1.4rem;
}

.completion-art {
  width: 100px;
  height: 100px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border: 8px solid #f8e3b3;
  border-radius: 34px 34px 34px 10px;
  background: var(--orange-soft);
  font-size: 3.3rem;
  transform: rotate(-4deg);
}

.completion-modal h2 {
  margin: 8px 0;
  font-size: 2.2rem;
  letter-spacing: -0.04em;
}

.completion-modal > p {
  margin: 0 auto;
  color: var(--muted);
}

.completion-stats {
  margin: 22px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.completion-stats div {
  padding: 13px 8px;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-alt);
}

.completion-stats strong {
  color: var(--green-dark);
  font-size: 1.1rem;
}

.completion-stats span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.confetti {
  position: fixed;
  z-index: 210;
  top: -20px;
  width: 10px;
  height: 18px;
  border-radius: 3px;
  pointer-events: none;
  animation: confetti-fall var(--duration, 2.5s) linear forwards;
}

.shake {
  animation: shake 0.35s ease;
}

@keyframes pulse-hint {
  50% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(255, 159, 28, 0.2); }
}

@keyframes shake {
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes confetti-fall {
  to { transform: translate(var(--drift, 0), 110vh) rotate(720deg); opacity: 0.9; }
}

@media (max-width: 1060px) {
  .quick-start {
    grid-template-columns: 1fr auto;
  }

  .quick-start-steps {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .header-inner {
    grid-template-columns: auto minmax(220px, 1fr) auto;
    gap: 16px;
  }

  .brand-copy {
    display: none;
  }

  .lesson-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .path-panel {
    padding: 14px;
  }

  .path-heading strong {
    font-size: 0.9rem;
  }

  .media-panel {
    grid-template-columns: 1fr;
  }

  .media-panel .secondary-button {
    justify-self: start;
  }

  .audio-strip {
    grid-template-columns: 46px 1fr;
  }

  .audio-strip audio {
    grid-column: span 1;
  }

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

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

@media (max-width: 820px) {
  :root {
    --header-height: 70px;
  }

  .header-inner {
    width: min(100% - 20px, var(--content-width));
    grid-template-columns: 108px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px 13px 13px 5px;
  }

  .header-stats .stat-chip {
    padding: 8px 10px;
  }

  .header-stats .icon-button:last-child {
    display: none;
  }

  main {
    width: min(100% - 20px, var(--content-width));
    padding-top: 16px;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    padding: 34px 26px;
    border-radius: 28px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-tags {
    justify-content: center;
  }

  .hero-visual {
    min-height: 270px;
  }

  .quick-start {
    width: calc(100% - 20px);
    margin-top: -18px;
    padding: 18px;
    grid-template-columns: 1fr;
  }

  .quick-start-copy,
  .quick-start-link {
    grid-column: 1;
  }

  .quick-start-steps {
    grid-column: 1;
    grid-row: auto;
  }

  .quick-start-link {
    width: 100%;
  }

  .quote-card {
    grid-template-columns: auto 1fr;
  }

  .mini-audios {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-layout {
    display: block;
  }

  .path-panel {
    position: sticky;
    top: var(--header-height);
    z-index: 40;
    max-height: none;
    margin-bottom: 18px;
    padding: 8px;
    overflow: auto hidden;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 18px rgba(31, 55, 80, 0.08);
  }

  .path-heading {
    display: none;
  }

  .path-panel nav {
    width: max-content;
    display: flex;
    gap: 6px;
  }

  .path-panel nav a {
    width: 47px;
    height: 47px;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 5px;
  }

  .path-panel nav a div,
  .path-panel nav a b {
    display: none !important;
  }

  .path-panel nav a > span {
    width: 35px;
    height: 35px;
  }

  .path-panel nav a:hover,
  .path-panel nav a.is-current {
    transform: none;
  }

  .reference-grid,
  .writing-layout {
    grid-template-columns: 1fr;
  }

  .writing-character {
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    gap: 12px;
  }

  .prep-quiz {
    grid-template-columns: 1fr;
  }

  .finish-panel {
    grid-template-columns: auto 1fr;
  }

  .finish-panel .primary-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .quick-start-steps {
    grid-template-columns: 1fr;
  }

  .quick-start-steps li {
    padding: 9px 10px;
  }
  .header-progress {
    min-width: 0;
  }

  .progress-copy span {
    display: none;
  }

  .header-stats .stat-chip {
    font-size: 0;
  }

  .header-stats .stat-chip strong,
  .header-stats .stat-chip span {
    font-size: 0.78rem;
  }

  .header-stats .icon-button {
    display: none;
  }

  .hero {
    padding: 30px 20px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 15vw, 3.8rem);
  }

  .hero-visual {
    min-height: 240px;
  }

  .hero-bubble {
    width: 52px;
    height: 52px;
    border-width: 4px;
    font-size: 1.4rem;
  }

  .hero-score-card {
    left: 0;
  }

  .quote-card,
  .goal-panel,
  .mission-card,
  .games-section,
  .finish-panel {
    border-radius: 22px;
  }

  .quote-card {
    padding: 20px;
    grid-template-columns: 1fr;
  }

  .quote-mark {
    display: none;
  }

  .mini-audios {
    grid-template-columns: 1fr;
  }

  .goal-panel {
    padding: 24px 18px;
  }

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

  .goal-grid article {
    min-height: 0;
  }

  .mission-card,
  .games-section,
  .finish-panel {
    padding: 20px 16px;
  }

  .mission-header {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
  }

  .mission-number {
    width: 44px;
    height: 44px;
    border-radius: 14px 14px 14px 5px;
  }

  .mission-status {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
  }

  .media-panel,
  .audio-strip,
  .quick-check,
  .builder-panel {
    padding: 14px;
    border-radius: 16px;
  }

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

  .story-tabs {
    width: 100%;
  }

  .story-tabs button {
    flex: 1;
    min-width: 0;
  }

  .story-text {
    max-height: 480px;
    padding: 17px;
  }

  .mission-footer,
  .activity-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .mission-footer .primary-button,
  .activity-actions .check-button,
  .activity-actions .ghost-button {
    width: 100%;
  }

  .audio-strip {
    grid-template-columns: 44px 1fr;
  }

  .audio-strip audio {
    grid-column: 1 / -1;
  }

  .tool-picker {
    grid-template-columns: 1fr;
  }

  .tool {
    justify-content: flex-start;
  }

  .word-hunt {
    padding: 16px;
    font-size: 1rem;
  }

  .tf-question {
    grid-template-columns: 1fr;
  }

  .choice-buttons {
    width: 100%;
  }

  .choice-buttons button {
    flex: 1;
  }

  .correction-field {
    grid-template-columns: 1fr;
  }

  .picture-grid,
  .games-grid,
  .builder-controls,
  .writing-checklist {
    grid-template-columns: 1fr;
  }

  .picture-card:nth-child(4),
  .picture-card:nth-child(5) {
    grid-column: auto;
  }

  .sentence-list label {
    align-items: flex-start;
  }

  .sentence-list p {
    line-height: 2.45;
  }

  .sentence-list input {
    width: 72px;
  }

  .writing-character {
    grid-template-columns: 1fr;
  }

  .writing-character img {
    max-width: 230px;
    margin: auto;
  }

  .games-grid a {
    grid-template-columns: 78px minmax(0, 1fr) auto;
  }

  .games-grid img {
    width: 78px;
    height: 58px;
  }

  .games-grid a b {
    font-size: 0;
  }

  .games-grid a b::after {
    content: "↗";
    font-size: 1rem;
  }

  .finish-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .finish-badge {
    margin: auto;
  }

  .completion-modal {
    padding: 30px 18px 24px;
  }

  .completion-stats {
    grid-template-columns: 1fr;
  }
}

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