:root {
  --sky: #f4fbff;
  --sky-deep: #b9ecff;
  --sun: #ffd56a;
  --teal: #49b9c7;
  --teal-deep: #178395;
  --coral: #ff8f70;
  --berry: #ff5f87;
  --leaf: #83c86b;
  --ink: #21425b;
  --paper: rgba(255, 255, 255, 0.82);
  --paper-strong: #ffffff;
  --shadow: 0 18px 40px rgba(33, 66, 91, 0.14);
  --radius-lg: 28px;
  --radius-md: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 213, 106, 0.4), transparent 26%),
    radial-gradient(circle at 85% 20%, rgba(73, 185, 199, 0.24), transparent 20%),
    linear-gradient(180deg, #dff7ff 0%, #eefcff 38%, #f5fbf1 100%);
}

button {
  font: inherit;
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar,
.progress-panel,
.panel,
.hero-card,
.lyric-card,
.practice-card,
.recall-card,
.recall-sidebar,
.results-card {
  backdrop-filter: blur(8px);
}

.topbar,
.progress-panel,
.panel {
  background: var(--paper);
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
}

.eyebrow,
.badge,
.mini-label,
.activity-type,
.lyric-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  font-weight: 800;
}

.eyebrow,
.activity-type,
.mini-label,
.lyric-title {
  color: var(--teal-deep);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Baloo 2", cursive;
  line-height: 1;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.7rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.05;
}

p {
  line-height: 1.5;
}

.progress-panel {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 24px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 800;
}

.progress-track {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: rgba(33, 66, 91, 0.1);
  overflow: hidden;
}

.progress-fill {
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf), var(--teal));
  transition: width 0.35s ease;
}

main {
  margin-top: 18px;
}

.panel {
  display: none;
  padding: 28px;
  border-radius: 32px;
  animation: float-in 0.45s ease;
}

.panel.active {
  display: block;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.hero-copy,
.hero-visual,
.lyric-card,
.practice-card,
.recall-card,
.recall-sidebar,
.results-card {
  background: var(--paper-strong);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 2px rgba(185, 236, 255, 0.45);
}

.hero-copy {
  padding: 28px;
}

.hero-copy p:last-of-type {
  max-width: 56ch;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 213, 106, 0.3);
  color: #a25b00;
  margin-bottom: 14px;
}

.hero-visual {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(180deg, #dff8ff 0%, #f5fcff 64%, #caeff7 64%, #a5dfe8 100%);
}

.hero-visual.water-cycle-hero {
  background: linear-gradient(180deg, #dff8ff 0%, #f5fcff 64%, #caeff7 64%, #a5dfe8 100%);
}

.hero-visual.states-hero {
  background: linear-gradient(180deg, #efe9ff 0%, #fbf8ff 54%, #dff6ff 100%);
}

.hero-visual.weather-hero {
  background: linear-gradient(180deg, #e3f7ff 0%, #f8fcff 56%, #d8f0ff 100%);
}

.sun,
.cloud,
.pond,
.raindrops span,
.hero-badge,
.ice-cube,
.liquid-drop,
.gas-cloud,
.gas-puff,
.weather-wind span,
.weather-rain span,
.weather-hill,
.sparkle {
  position: absolute;
}

.sun {
  width: 110px;
  height: 110px;
  right: 28px;
  top: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff5b6, var(--sun));
  box-shadow: 0 0 0 16px rgba(255, 213, 106, 0.18);
}

.cloud {
  background: #ffffff;
  border-radius: 999px;
  filter: drop-shadow(0 10px 18px rgba(33, 66, 91, 0.12));
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
}

.cloud-one {
  width: 124px;
  height: 42px;
  left: 42px;
  top: 72px;
}

.cloud-one::before {
  width: 48px;
  height: 48px;
  left: 16px;
  top: -18px;
}

.cloud-one::after {
  width: 54px;
  height: 54px;
  right: 18px;
  top: -24px;
}

.cloud-two {
  width: 140px;
  height: 48px;
  left: 120px;
  top: 138px;
}

.cloud-two::before {
  width: 50px;
  height: 50px;
  left: 18px;
  top: -18px;
}

.cloud-two::after {
  width: 58px;
  height: 58px;
  right: 18px;
  top: -26px;
}

.raindrops span {
  width: 12px;
  height: 24px;
  border-radius: 999px 999px 999px 999px;
  background: linear-gradient(180deg, #91e4ff, #25a6cb);
  top: 192px;
  animation: drip 1.8s infinite ease-in;
}

.raindrops span:nth-child(1) {
  left: 174px;
}

.raindrops span:nth-child(2) {
  left: 214px;
  animation-delay: 0.3s;
}

.raindrops span:nth-child(3) {
  left: 254px;
  animation-delay: 0.6s;
}

.pond {
  bottom: 26px;
  left: 40px;
  right: 40px;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5fd5e0, #2389ac);
}

.hero-badge {
  top: 18px;
  left: 20px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.states-hero .hero-badge {
  background: rgba(255, 255, 255, 0.82);
}

.states-row {
  position: absolute;
  inset: 64px 24px 20px;
  display: flex;
  align-items: end;
  justify-content: space-around;
  gap: 16px;
}

.state-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  width: 31%;
  min-height: 210px;
}

.state-label {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  font-weight: 800;
  position: relative;
  z-index: 3;
}

.ice-cube {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: linear-gradient(145deg, #d9f7ff, #8fdfff);
  box-shadow: inset -10px -10px 0 rgba(255, 255, 255, 0.35), 0 18px 28px rgba(64, 153, 217, 0.18);
  transform: rotate(-8deg);
}

.ice-cube::before,
.ice-cube::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.36);
  border-radius: 999px;
}

.ice-cube::before {
  width: 18px;
  height: 54px;
  left: 18px;
  top: 14px;
}

.ice-cube::after {
  width: 50px;
  height: 16px;
  left: 18px;
  top: 18px;
}

.liquid-drop {
  width: 86px;
  height: 96px;
  background: linear-gradient(180deg, #a9edff, #28b7dc);
  border-radius: 56% 56% 60% 60% / 76% 76% 34% 34%;
  transform: rotate(8deg);
  box-shadow: 0 16px 26px rgba(40, 183, 220, 0.18);
  position: relative;
  z-index: 1;
}

.liquid-drop::before {
  content: "";
  position: absolute;
  width: 28px;
  height: 42px;
  top: 14px;
  left: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
}

.gas-cloud {
  position: relative;
  width: 126px;
  height: 70px;
  z-index: 1;
}

.gas-puff {
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #dbcfff);
  box-shadow: 0 12px 22px rgba(134, 109, 205, 0.14);
  z-index: 1;
}

.gas-puff.one {
  width: 62px;
  height: 62px;
  left: 0;
  bottom: 0;
}

.gas-puff.two {
  width: 72px;
  height: 72px;
  left: 34px;
  bottom: 8px;
}

.gas-puff.three {
  width: 58px;
  height: 58px;
  right: 0;
  bottom: 0;
}

.sparkle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  z-index: 0;
}

.sparkle.one {
  top: 40px;
  right: 86px;
}

.sparkle.two {
  top: 78px;
  right: 54px;
}

.sparkle.three {
  top: 52px;
  right: 18px;
}

.weather-hero .sun {
  top: 32px;
  right: 30px;
  width: 96px;
  height: 96px;
}

.weather-cloud-main {
  position: absolute;
  top: 86px;
  left: 46px;
  width: 168px;
  height: 56px;
}

.weather-rain span {
  width: 10px;
  height: 24px;
  top: 154px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8de4ff, #24a2cb);
  animation: drip 1.5s infinite ease-in;
}

.weather-rain span:nth-child(1) {
  left: 88px;
}

.weather-rain span:nth-child(2) {
  left: 118px;
  animation-delay: 0.22s;
}

.weather-rain span:nth-child(3) {
  left: 148px;
  animation-delay: 0.44s;
}

.weather-wind span {
  height: 12px;
  border-radius: 999px;
  border: 4px solid rgba(48, 161, 203, 0.55);
  border-left-color: transparent;
  border-bottom-color: transparent;
}

.weather-wind span:nth-child(1) {
  width: 84px;
  right: 72px;
  top: 154px;
  transform: rotate(8deg);
}

.weather-wind span:nth-child(2) {
  width: 110px;
  right: 28px;
  top: 192px;
  transform: rotate(-2deg);
}

.weather-hill {
  left: 24px;
  right: 24px;
  bottom: 20px;
  height: 72px;
  border-radius: 60% 40% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, #a8df8c, #6cb557);
}

.section-heading {
  margin-bottom: 22px;
}

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

.stage-card {
  padding: 20px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fdff 100%);
  border: 2px solid rgba(73, 185, 199, 0.15);
  box-shadow: 0 12px 24px rgba(33, 66, 91, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stage-card.active {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(255, 95, 135, 0.7);
  box-shadow: 0 18px 30px rgba(255, 95, 135, 0.18);
}

.stage-icon {
  font-size: 2rem;
}

.stage-step {
  display: inline-block;
  margin-top: 10px;
  color: var(--teal-deep);
  font-weight: 800;
}

.lyric-card,
.practice-card,
.results-card {
  margin-top: 22px;
  padding: 24px;
}

.lyric-line {
  margin: 8px 0 18px;
  font-size: 1.15rem;
  font-weight: 800;
}

.lyric-word {
  display: inline-block;
  padding: 4px 6px;
  margin: 0 2px;
  border-radius: 10px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.lyric-word.active {
  background: rgba(255, 213, 106, 0.52);
  color: #8f4a00;
  transform: scale(1.08);
}

.lyric-sub {
  display: inline-block;
  margin-top: 10px;
  color: var(--teal-deep);
  font-size: 1rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lesson-picker {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.lesson-card {
  text-align: left;
  padding: 16px 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(33, 66, 91, 0.12);
  border: 2px solid transparent;
}

.lesson-card.active {
  border-color: rgba(255, 95, 135, 0.55);
  background: linear-gradient(180deg, #fff8fb 0%, #ffffff 100%);
  box-shadow: 0 14px 28px rgba(255, 95, 135, 0.16);
}

.lesson-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  font-family: "Baloo 2", cursive;
  font-size: 1.35rem;
}

.lesson-card p {
  margin: 0;
}

.primary-button,
.secondary-button,
.ghost-button,
.tap-button,
.choice-button,
.nav-chip,
.order-chip {
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.primary-button,
.tap-button {
  color: #ffffff;
  background: linear-gradient(180deg, var(--berry), #ff7c55);
  box-shadow: 0 10px 24px rgba(255, 95, 135, 0.28);
}

.secondary-button,
.choice-button,
.order-chip {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(33, 66, 91, 0.12);
}

.ghost-button,
.nav-chip {
  color: var(--teal-deep);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 2px rgba(73, 185, 199, 0.25);
}

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

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.beat-track {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.beat-dot {
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(73, 185, 199, 0.18);
  box-shadow: inset 0 0 0 2px rgba(73, 185, 199, 0.14);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.beat-dot.active {
  background: rgba(255, 143, 112, 0.9);
  transform: scale(1.1);
  box-shadow: 0 0 0 8px rgba(255, 143, 112, 0.18);
}

.tap-button {
  min-width: 170px;
  font-size: 1.15rem;
}

.practice-status,
.activity-feedback,
.results-message {
  font-size: 1.05rem;
  font-weight: 700;
}

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

.recall-sidebar,
.recall-card {
  padding: 20px;
}

.recall-nav {
  display: grid;
  gap: 10px;
}

.nav-chip.active {
  background: rgba(255, 213, 106, 0.44);
  color: #9d5a00;
}

.nav-chip.done {
  box-shadow: inset 0 0 0 2px rgba(131, 200, 107, 0.55);
}

.activity-body {
  margin: 18px 0;
}

.choice-grid,
.order-bank,
.answer-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.choice-button.selected,
.order-chip.selected,
.answer-slot.filled {
  background: rgba(73, 185, 199, 0.16);
  box-shadow: inset 0 0 0 2px rgba(23, 131, 149, 0.45);
}

.answer-slot {
  min-width: 170px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(73, 185, 199, 0.1);
  font-weight: 800;
}

.results-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.score-bubble {
  display: grid;
  place-items: center;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff7c8, #ffd56a);
  box-shadow: 0 16px 32px rgba(255, 213, 106, 0.3);
  margin-bottom: 18px;
}

.score-bubble span {
  font-family: "Baloo 2", cursive;
  font-size: 4rem;
  line-height: 1;
}

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

@keyframes drip {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(12px);
  }
}

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

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

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 1100px);
    padding-top: 12px;
  }

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

  .panel,
  .hero-copy,
  .hero-visual,
  .lyric-card,
  .practice-card,
  .results-card,
  .recall-card,
  .recall-sidebar {
    padding: 18px;
  }

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

  .beat-track {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .button-row {
    flex-direction: column;
  }

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