:root {
  --ink: #24332f;
  --muted: #66766f;
  --paper: #fffaf2;
  --panel: #ffffff;
  --leaf: #2f8f63;
  --leaf-dark: #1f6d4a;
  --sky: #d9f0ff;
  --gold: #d99c24;
  --rose: #df6f75;
  --violet: #6a5bd7;
  --line: #d9dfd5;
  --shadow: 0 18px 50px rgba(34, 48, 42, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(255, 209, 105, 0.25), transparent 28rem),
    linear-gradient(180deg, #e7f6ff 0%, #fff8ea 48%, #f3eadb 100%);
  background-size: 34px 34px, 34px 34px, auto, auto;
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.topbar,
.lesson-head,
.garden-status,
.dash-head,
.top-actions,
.shop-row,
.mode-tabs {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}

.eyebrow,
.lesson-kicker,
.speaker {
  margin: 0;
  color: var(--leaf-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 2px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.05;
}

h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

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

.icon-button,
.text-button,
.tab,
.primary-button,
.shop-item,
.answer-button,
.short-answer button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
  border-radius: 8px;
  min-height: 42px;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.icon-button {
  width: 44px;
  font-size: 1.05rem;
  font-weight: 800;
}

.text-button {
  padding: 0 14px;
  font-weight: 700;
}

.mode-tabs {
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.tab {
  flex: 1 0 112px;
  padding: 0 14px;
  font-weight: 800;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  text-align: left;
}

.tab.active,
.primary-button,
.short-answer button {
  background: var(--leaf);
  border-color: var(--leaf);
  color: white;
}

.tab span {
  width: 34px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f1f7ec;
  color: var(--leaf-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.tab.active span {
  background: rgba(255, 255, 255, 0.22);
  color: white;
}

.mission-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(47, 143, 99, 0.12), rgba(217, 156, 36, 0.16)),
    #fffdf7;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.mission-band h2 {
  max-width: 680px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.mission-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mission-step {
  min-width: 76px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: white;
  border: 1px solid #e6dabd;
  color: #6a4a14;
  font-weight: 900;
}

.mission-step.active {
  background: var(--leaf);
  border-color: var(--leaf);
  color: white;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 14px;
  margin-top: 14px;
}

.lesson-panel,
.tutor-panel,
.garden-panel,
.dashboard-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.lesson-panel {
  min-height: 560px;
  padding: 22px;
}

.lesson-head,
.garden-status,
.dash-head {
  justify-content: space-between;
  gap: 12px;
}

.progress-chip,
.level-badge,
.seed-counter,
.accuracy-ring {
  border-radius: 999px;
  background: #fff3cf;
  border: 1px solid #efd28b;
  color: #745017;
  font-weight: 900;
  padding: 9px 12px;
  white-space: nowrap;
}

.passage {
  margin-top: 18px;
  padding: 16px;
  border-left: 5px solid var(--violet);
  background: #f3f0ff;
  border-radius: 8px;
  line-height: 1.6;
}

.passage mark {
  background: #ffe38c;
  border-radius: 4px;
  padding: 1px 3px;
}

.story-library {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #e6dabd;
  background: #fffaf0;
  border-radius: 8px;
}

.story-library-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.story-library h3,
.story-reader h3 {
  margin: 4px 0 0;
  font-size: 1.25rem;
}

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

.story-card {
  min-height: 142px;
  padding: 12px;
  border: 1px solid #ead9bd;
  background: #ffffff;
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  display: grid;
  gap: 8px;
  align-content: start;
}

.story-card.active {
  border-color: var(--leaf);
  box-shadow: inset 0 0 0 2px rgba(59, 142, 93, 0.22);
  background: #f0fbf3;
}

.story-cover {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #fee3a2, #dff2ff);
  color: #3d5132;
  font-size: 0.95rem;
  font-weight: 900;
}

.story-card strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.story-card small {
  color: #6f6658;
  font-weight: 800;
  line-height: 1.25;
}

.story-reader {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d8e8d5;
  border-radius: 8px;
  background: #ffffff;
}

.story-reader-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.story-reader-head span {
  border-radius: 999px;
  background: #edf8f1;
  color: #2f6f46;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}

.story-text {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  color: #273329;
  font-size: 1.06rem;
  line-height: 1.65;
}

.story-text p {
  margin: 0;
}

.story-text mark {
  background: #ffe38c;
  border-radius: 4px;
  padding: 1px 3px;
}

.story-question-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.story-question {
  padding: 12px;
  border-radius: 8px;
  background: #f7f3ea;
  border: 1px solid #e8dcc7;
}

.story-question strong {
  color: #5c441c;
}

.story-question p {
  margin: 6px 0 0;
  font-weight: 850;
}

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

.story-answer {
  min-height: 48px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 8px;
  font-weight: 850;
  text-align: left;
  padding: 10px;
}

.story-answer.correct {
  border-color: var(--leaf);
  background: #e6f6ec;
}

.story-answer.wrong {
  border-color: var(--rose);
  background: #fff0f1;
}

.story-feedback {
  margin-top: 10px;
  padding: 10px;
  border-left: 4px solid var(--violet);
  background: #f3f0ff;
  border-radius: 8px;
  line-height: 1.45;
  font-weight: 750;
}

.visual-model {
  min-height: 112px;
  margin-top: 20px;
  display: grid;
  place-items: center;
}

.fraction-row,
.mango-row,
.array-model {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fraction-bar {
  display: grid;
  grid-template-columns: repeat(4, 34px);
  gap: 4px;
  padding: 6px;
  background: #f7efe0;
  border-radius: 8px;
  border: 1px solid #ead9bd;
}

.piece {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #f0e5d2;
}

.piece.fill {
  background: #f3bd3a;
}

.operator {
  font-weight: 900;
  font-size: 1.6rem;
}

.mango {
  width: 26px;
  height: 26px;
  border-radius: 50% 44% 50% 44%;
  background: #f4b337;
  border: 2px solid #d8841b;
  position: relative;
}

.mango.crossed::after {
  content: "";
  position: absolute;
  inset: 10px -3px;
  height: 3px;
  background: var(--rose);
  transform: rotate(-28deg);
}

.array-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--violet);
}

.array-model {
  max-width: 260px;
}

.question-text {
  margin: 22px 0 0;
  font-size: clamp(1.55rem, 4vw, 2.4rem);
  font-weight: 850;
  line-height: 1.15;
}

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

.answer-button {
  min-height: 76px;
  padding: 14px;
  font-size: 1.2rem;
  font-weight: 850;
  text-align: left;
}

.answer-button.correct {
  border-color: var(--leaf);
  background: #e6f6ec;
}

.answer-button.wrong {
  border-color: var(--rose);
  background: #fff0f1;
}

.short-answer {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
}

.short-answer input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  min-height: 50px;
  font-size: 1.2rem;
}

.tutor-panel,
.garden-panel,
.dashboard-panel {
  padding: 18px;
}

.tutor-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

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

.avatar-choice {
  min-height: 74px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  font-weight: 850;
  color: var(--ink);
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 8px;
}

.avatar-choice.active {
  background: #fff0c7;
  border-color: #dca634;
  box-shadow: inset 0 0 0 2px rgba(217, 156, 36, 0.25);
}

.avatar-choice span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: url("assets/grandma-sylvie-clean.png") center 28% / cover no-repeat;
  box-shadow: 0 4px 10px rgba(64, 44, 28, 0.2);
}

.teddy-choice span {
  background: url("assets/teddy-buddy.png") center / cover no-repeat;
  box-shadow: 0 4px 10px rgba(64, 44, 28, 0.2);
}

.pip-choice span {
  width: 42px;
  border-radius: 56% 44% 48% 52%;
  background: url("assets/pip-buddy.png") center / cover no-repeat;
  box-shadow: 0 4px 10px rgba(36, 68, 54, 0.22);
}

.grandma-scene {
  min-height: 145px;
  background: linear-gradient(180deg, var(--sky), #e9f7e4);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.buddy {
  width: 110px;
  height: 130px;
  position: absolute;
  left: 24px;
  bottom: 0;
}

.grandma {
  width: 124px;
  height: 138px;
  background: url("assets/grandma-sylvie-clean.png") center 24% / cover no-repeat;
  border-radius: 50%;
  filter: drop-shadow(0 12px 14px rgba(64, 44, 28, 0.24));
  overflow: hidden;
}

.grandma .head,
.grandma .glasses,
.grandma .body {
  display: none;
}

.head {
  width: 76px;
  height: 76px;
  background: #8b5a3c;
  border-radius: 50%;
  position: absolute;
  left: 16px;
  top: 4px;
  box-shadow: 0 -10px 0 6px #f0f0ec;
}

.head::before,
.head::after {
  content: "";
  width: 7px;
  height: 7px;
  background: #212121;
  border-radius: 50%;
  position: absolute;
  top: 35px;
}

.head::before {
  left: 23px;
}

.head::after {
  right: 23px;
}

.glasses {
  width: 52px;
  height: 18px;
  border-top: 3px solid #26322f;
  position: absolute;
  left: 28px;
  top: 34px;
}

.body {
  width: 96px;
  height: 62px;
  background: var(--rose);
  border-radius: 38px 38px 0 0;
  position: absolute;
  left: 7px;
  bottom: 0;
}

.teddy {
  width: 122px;
  height: 128px;
  background: url("assets/teddy-buddy.png") center bottom / contain no-repeat;
  filter: drop-shadow(0 12px 14px rgba(64, 44, 28, 0.22));
}

.teddy .head,
.teddy .glasses,
.teddy .body {
  display: none;
}

.teddy .head {
  width: 84px;
  height: 78px;
  left: 18px;
  top: 6px;
  background: #b9794b;
  border-radius: 46% 46% 44% 44%;
  box-shadow: none;
}

.teddy .head::before,
.teddy .head::after {
  width: 8px;
  height: 8px;
  top: 34px;
  background: #1f1a17;
}

.teddy .head::before {
  left: 24px;
}

.teddy .head::after {
  right: 24px;
}

.teddy .glasses {
  width: 22px;
  height: 16px;
  left: 50px;
  top: 44px;
  border: 0;
  border-radius: 50%;
  background: #4a2f20;
}

.teddy .glasses::before,
.teddy .glasses::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #b9794b;
  border: 6px solid #8b5938;
  top: -48px;
}

.teddy .glasses::before {
  left: -45px;
}

.teddy .glasses::after {
  right: -45px;
}

.teddy .body {
  width: 100px;
  height: 64px;
  left: 10px;
  bottom: 0;
  background: #9e633f;
  border-radius: 44px 44px 0 0;
}

.teddy .body::before {
  content: "";
  position: absolute;
  width: 52px;
  height: 36px;
  left: 24px;
  top: 16px;
  border-radius: 50%;
  background: #d8a879;
}

.pip {
  width: 122px;
  height: 126px;
  background: url("assets/pip-buddy.png") center / contain no-repeat;
  filter: drop-shadow(0 12px 12px rgba(28, 62, 46, 0.22));
}

.pip .head,
.pip .glasses,
.pip .body {
  display: none;
}

.pip .head {
  width: 72px;
  height: 58px;
  left: 20px;
  top: 34px;
  background: #35a878;
  border-radius: 54% 46% 48% 52%;
  box-shadow: none;
}

.pip .head::before {
  width: 7px;
  height: 7px;
  left: 44px;
  top: 20px;
  background: #171d1a;
}

.pip .head::after {
  width: 30px;
  height: 12px;
  right: -20px;
  top: 23px;
  background: #dd6f37;
  border-radius: 0 999px 999px 0;
}

.pip .glasses {
  width: 60px;
  height: 30px;
  left: 0;
  top: 42px;
  border: 0;
  background: #2b8061;
  border-radius: 100% 0 100% 0;
  transform: rotate(-20deg);
}

.pip .body {
  width: 54px;
  height: 58px;
  left: 34px;
  bottom: 0;
  background: #f0c442;
  border-radius: 50% 50% 40% 40%;
}

.seed-counter {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: #fff7dc;
}

.speech {
  background: #fff8e8;
  border: 1px solid #eed9ad;
  border-radius: 8px;
  padding: 14px;
  line-height: 1.55;
  min-height: 120px;
  position: relative;
}

.speech::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 34px;
  width: 18px;
  height: 18px;
  background: #fff8e8;
  border-left: 1px solid #eed9ad;
  border-top: 1px solid #eed9ad;
  transform: rotate(45deg);
}

.speaker {
  margin-bottom: 5px;
}

.hint-steps {
  display: grid;
  gap: 8px;
}

.hint-step {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef8f1;
  border: 1px solid #cfe8d7;
  line-height: 1.4;
}

.primary-button {
  width: 100%;
  min-height: 50px;
  font-weight: 900;
}

.garden-panel {
  grid-column: 1 / -1;
}

.garden-stage {
  margin-top: 14px;
  min-height: 260px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent 0 58%, rgba(78, 111, 40, 0.16) 58% 100%),
    linear-gradient(180deg, #bdeaff 0 58%, #76bd71 58% 100%);
  position: relative;
  overflow: hidden;
  border: 1px solid #9ad39f;
}

.sun {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #ffd04f;
  position: absolute;
  right: 36px;
  top: 24px;
  box-shadow: 0 0 0 12px rgba(255, 208, 79, 0.18);
}

.cloud {
  position: absolute;
  width: 88px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
}

.cloud::before {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: inherit;
  left: 16px;
  top: -18px;
}

.cloud-one {
  left: 50px;
  top: 36px;
}

.cloud-two {
  left: 210px;
  top: 64px;
  transform: scale(0.72);
}

.tree {
  width: 110px;
  height: 150px;
  position: absolute;
  left: 70px;
  bottom: 36px;
}

.tree::before {
  content: "";
  width: 28px;
  height: 92px;
  background: #8a5b30;
  position: absolute;
  left: 41px;
  bottom: 0;
  border-radius: 10px;
}

.tree::after {
  content: "";
  width: 108px;
  height: 108px;
  background: var(--leaf);
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  transform: scale(var(--tree-scale, 0.72));
  transform-origin: bottom center;
  transition: transform 240ms ease;
}

.tree span::before,
.tree span::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dd4b45;
  position: absolute;
  z-index: 2;
  opacity: var(--fruit-opacity, 0);
}

.tree span::before {
  left: 34px;
  top: 52px;
}

.tree span::after {
  left: 64px;
  top: 35px;
}

.flower-row {
  position: absolute;
  left: 230px;
  right: 30px;
  bottom: 34px;
  min-height: 78px;
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.flower {
  width: 28px;
  height: 62px;
  position: relative;
}

.flower::before {
  content: "";
  position: absolute;
  left: 13px;
  bottom: 0;
  width: 4px;
  height: 44px;
  background: var(--leaf-dark);
}

.flower::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 14px 7px 0 #ffd05a, -10px 8px 0 #7d67d9;
}

.garden-bed {
  position: absolute;
  left: 260px;
  bottom: 12px;
  width: 280px;
  max-width: calc(100% - 300px);
  height: 28px;
  border-radius: 50%;
  background: rgba(101, 62, 28, 0.35);
}

.birdhouse {
  position: absolute;
  left: 185px;
  bottom: 112px;
  width: 34px;
  height: 38px;
  background: #f4d55c;
  border: 2px solid #88592d;
}

.birdhouse::before {
  content: "";
  position: absolute;
  left: -6px;
  top: -15px;
  width: 42px;
  height: 26px;
  background: #c35d4b;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.bench {
  position: absolute;
  right: 55px;
  bottom: 58px;
  width: 105px;
  height: 48px;
  border-top: 12px solid #9c6332;
  border-bottom: 12px solid #9c6332;
}

.bench::before,
.bench::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 35px;
  background: #68421f;
  bottom: -28px;
}

.bench::before {
  left: 18px;
}

.bench::after {
  right: 18px;
}

.shop-row {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.shop-item {
  padding: 0 12px;
  font-weight: 800;
  display: inline-grid;
  grid-template-columns: 24px auto;
  align-items: center;
  gap: 7px;
}

.shop-item span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 8px 4px 0 #ffd05a, -6px 5px 0 #7d67d9;
}

.birdhouse-shop span {
  border-radius: 3px;
  background: #f4d55c;
  border: 2px solid #88592d;
  box-shadow: none;
  position: relative;
}

.birdhouse-shop span::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -9px;
  width: 26px;
  height: 16px;
  background: #c35d4b;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.bench-shop span {
  border-radius: 0;
  background: #9c6332;
  height: 6px;
  box-shadow: 0 8px 0 #9c6332;
}

.dashboard-panel {
  grid-column: 1 / -1;
}

.accuracy-ring {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.05rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.metric {
  background: #f5fbf7;
  border: 1px solid #d7eadc;
  border-radius: 8px;
  padding: 14px;
}

.metric span {
  font-size: 1.7rem;
  font-weight: 900;
}

.metric p {
  margin: 4px 0 0;
  color: var(--muted);
}

.skill-list,
.curriculum-map {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.coverage-heading {
  margin-top: 18px;
}

.coverage-heading h3 {
  margin: 0 0 5px;
  font-size: 1.08rem;
}

.coverage-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.skill-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.skill-bar {
  height: 12px;
  border-radius: 999px;
  background: #e6ece7;
  overflow: hidden;
}

.skill-bar span {
  display: block;
  height: 100%;
  background: var(--leaf);
}

.recommendation {
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: #fff2d8;
  border: 1px solid #ead19b;
  font-weight: 750;
}

.curriculum-map {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.curriculum-card {
  border: 1px solid #d7eadc;
  background: #f7fbf3;
  border-radius: 8px;
  padding: 12px;
}

.curriculum-card strong {
  display: block;
  margin-bottom: 7px;
}

.curriculum-card ul {
  margin: 0;
  padding: 0;
  color: var(--muted);
  line-height: 1.45;
  list-style: none;
}

.curriculum-card li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
}

.curriculum-card em {
  color: #6a4a14;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

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

.coverage-dot.ready {
  background: #d99c24;
}

.coverage-dot.deep {
  background: #4f78d8;
}

.coverage-dot.practised {
  background: var(--leaf);
}

.coverage-dot.planned {
  background: #aeb9b1;
}

.hidden {
  display: none !important;
}

.focus .garden-panel,
.focus .topbar .eyebrow {
  display: none;
}

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

button:focus-visible,
input:focus-visible {
  outline: 3px solid #ffd05a;
  outline-offset: 2px;
}

@media (max-width: 860px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .mission-band {
    grid-template-columns: 1fr;
  }

  .mission-steps {
    justify-content: flex-start;
  }

  .lesson-panel {
    min-height: 480px;
  }

  .answer-grid,
  .story-answer-grid,
  .metric-grid,
  .curriculum-map {
    grid-template-columns: 1fr;
  }

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .flower-row {
    left: 190px;
  }

  .garden-bed {
    left: 180px;
    max-width: calc(100% - 210px);
  }

  .skill-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .app-shell {
    width: min(100% - 16px, 1180px);
    padding-top: 10px;
  }

  .lesson-panel,
  .tutor-panel,
  .garden-panel,
  .dashboard-panel {
    padding: 14px;
  }

  .fraction-bar {
    grid-template-columns: repeat(4, 26px);
  }

  .piece {
    width: 26px;
    height: 26px;
  }

  .short-answer {
    grid-template-columns: 1fr;
  }

  .story-grid,
  .story-answer-grid {
    grid-template-columns: 1fr;
  }

  .tree {
    left: 20px;
  }

  .flower-row {
    left: 140px;
    gap: 9px;
  }

  .garden-bed {
    left: 130px;
    max-width: calc(100% - 150px);
  }
}
