:root {
  --cream: #fff9ed;
  --paper: #fffefd;
  --ink: #403b55;
  --muted: #777086;
  --coral: #ff8c7d;
  --coral-dark: #e96f63;
  --yellow: #ffd66b;
  --yellow-dark: #e7ae36;
  --mint: #73d4be;
  --mint-dark: #3cae96;
  --blue: #84c9f4;
  --purple: #b7a1ec;
  --pink: #ffc3d5;
  --success: #4dbb91;
  --danger: #ee7b75;
  --shadow: 0 8px 0 rgba(101, 80, 73, 0.07), 0 16px 36px rgba(101, 80, 73, 0.08);
  --small-shadow: 0 5px 0 rgba(101, 80, 73, 0.08);
  --radius-lg: 32px;
  --radius-md: 22px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 214, 107, 0.18) 0 5px, transparent 6px),
    radial-gradient(circle at 92% 36%, rgba(115, 212, 190, 0.18) 0 6px, transparent 7px),
    linear-gradient(180deg, #fff8e8 0%, #fffdf6 58%, #f3fbf4 100%);
  background-size: 120px 120px, 150px 150px, auto;
  font-family: ui-rounded, "SF Pro Rounded", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
audio:focus-visible {
  outline: 4px solid rgba(80, 152, 230, 0.4);
  outline-offset: 4px;
}

.button-reset {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.sky-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.cloud {
  position: absolute;
  width: 110px;
  height: 34px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.78);
}

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

.cloud::before {
  width: 48px;
  height: 48px;
  left: 18px;
  bottom: 5px;
}

.cloud::after {
  width: 58px;
  height: 58px;
  right: 13px;
  bottom: 2px;
}

.cloud-one {
  top: 145px;
  left: -26px;
  transform: scale(0.9);
}

.cloud-two {
  top: 230px;
  right: -20px;
  transform: scale(0.7);
}

.little-star {
  position: absolute;
  color: rgba(238, 183, 63, 0.32);
  font-size: 24px;
  animation: twinkle 3s ease-in-out infinite;
}

.star-one { top: 16%; right: 11%; }
.star-two { top: 55%; left: 4%; animation-delay: 0.8s; }
.star-three { bottom: 12%; right: 5%; animation-delay: 1.6s; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 10px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 18px;
  background: var(--yellow);
  box-shadow: var(--small-shadow);
  font-size: 28px;
  transform: rotate(-4deg);
}

.brand strong {
  display: block;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.unit-directory-nav {
  width: min(1080px, calc(100% - 36px));
  margin: 4px auto 0;
}

.units-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  gap: 7px;
  border: 2px solid #e9dfd6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 0 rgba(101, 80, 73, 0.06);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.units-home-link:hover {
  border-color: #b7a1ec;
  transform: translateY(-1px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.star-pill {
  display: flex;
  align-items: center;
  min-width: 76px;
  height: 46px;
  padding: 0 15px;
  gap: 7px;
  border: 2px solid #f6e2a5;
  border-radius: 999px;
  background: #fff9dc;
  box-shadow: 0 3px 0 rgba(194, 152, 54, 0.1);
  font-size: 19px;
}

.star-pill strong {
  min-width: 20px;
  text-align: center;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 2px solid #eee5dc;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 3px 0 rgba(101, 80, 73, 0.06);
  color: inherit;
  cursor: pointer;
  font-size: 21px;
  text-decoration: none;
  transition: transform 0.18s ease;
}

.icon-button:hover {
  transform: translateY(-2px) rotate(3deg);
}

.app-shell {
  width: min(1080px, calc(100% - 36px));
  min-height: calc(100vh - 190px);
  margin: 18px auto 0;
  padding-bottom: 34px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 20px 24px;
  gap: 10px;
  color: #93899a;
  font-size: 13px;
  font-weight: 700;
}

.footer-paw {
  color: var(--coral);
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 355px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fff3cb 0%, #fff9e9 55%, #e7f8ef 100%);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 42px 10px 42px 46px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 7px 13px;
  gap: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: #a16a32;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  max-width: 480px;
  margin: 0;
  font-size: clamp(30px, 4.2vw, 49px);
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.hero-copy h1 span {
  color: var(--coral-dark);
}

.hero-copy > p:not(.eyebrow) {
  max-width: 430px;
  margin: 16px 0 24px;
  color: #746578;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-button,
.secondary-button,
.soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 22px;
  gap: 9px;
  border-radius: 17px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.primary-button {
  border: 2px solid #eb7e70;
  background: var(--coral);
  box-shadow: 0 6px 0 #d96e62;
  color: #fff;
  font-size: 17px;
}

.primary-button:hover,
.secondary-button:hover,
.soft-button:hover {
  transform: translateY(-2px);
}

.primary-button:active,
.secondary-button:active,
.soft-button:active {
  transform: translateY(3px);
  box-shadow: none;
}

.secondary-button {
  border: 2px solid #e5ddd7;
  background: #fff;
  box-shadow: 0 5px 0 #e4ddd6;
  color: var(--ink);
}

.soft-button {
  min-height: 44px;
  border: 2px solid #e4e0f2;
  background: #f6f2ff;
  box-shadow: 0 4px 0 #dfd8ec;
  color: #655879;
  font-size: 14px;
}

.soft-button.mint {
  border-color: #b9e6d9;
  background: #eafaf5;
  box-shadow: 0 4px 0 #c9e7dd;
  color: #347d6b;
}

.soft-button.yellow {
  border-color: #f0d78b;
  background: #fff8d9;
  box-shadow: 0 4px 0 #e9d9a6;
  color: #88652a;
}

.button-icon {
  font-size: 21px;
}

.hero-note {
  color: #8f7d7c;
  font-size: 12px;
  font-weight: 700;
}

.pet-scene {
  position: relative;
  min-height: 340px;
}

.scene-sun {
  position: absolute;
  top: 35px;
  right: 42px;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 12px rgba(255, 214, 107, 0.18);
  font-size: 30px;
}

.scene-ground {
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 480px;
  height: 230px;
  border-radius: 50%;
  background: #bfe7c1;
  transform: rotate(-5deg);
}

.house {
  position: absolute;
  right: 105px;
  bottom: 69px;
  width: 205px;
  height: 158px;
  border: 5px solid #a87568;
  border-radius: 15px 15px 25px 25px;
  background: #fff0c7;
  box-shadow: inset 0 -12px 0 rgba(222, 174, 121, 0.15);
}

.house-roof {
  position: absolute;
  z-index: 2;
  top: -82px;
  left: -29px;
  width: 0;
  height: 0;
  border-right: 132px solid transparent;
  border-bottom: 91px solid var(--coral);
  border-left: 132px solid transparent;
  filter: drop-shadow(0 -4px 0 #b96764);
}

.house-roof::after {
  position: absolute;
  top: 71px;
  left: -115px;
  width: 230px;
  height: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.24);
  content: "";
}

.house-door {
  position: absolute;
  right: 24px;
  bottom: 0;
  display: grid;
  width: 70px;
  height: 100px;
  place-items: center;
  border: 4px solid #a87568;
  border-bottom: 0;
  border-radius: 38px 38px 0 0;
  background: #b5ded1;
  font-size: 37px;
}

.house-window {
  position: absolute;
  top: 32px;
  left: 24px;
  display: grid;
  width: 55px;
  height: 55px;
  place-items: center;
  border: 4px solid #a87568;
  border-radius: 18px;
  background: #c8eafb;
  font-size: 23px;
}

.house-sign {
  position: absolute;
  top: -14px;
  left: 39px;
  padding: 4px 10px;
  border: 2px solid #d7ac75;
  border-radius: 8px;
  background: #fffaf0;
  color: #966c51;
  font-size: 11px;
  font-weight: 900;
  transform: rotate(-3deg);
}

.scene-animal {
  position: absolute;
  z-index: 4;
  filter: drop-shadow(0 5px 0 rgba(82, 91, 66, 0.12));
  user-select: none;
}

.scene-dog {
  right: 47px;
  bottom: 36px;
  font-size: 74px;
  animation: happy-hop 2.4s ease-in-out infinite;
}

.scene-bee {
  top: 92px;
  left: 25px;
  font-size: 43px;
  animation: bee-float 3s ease-in-out infinite;
}

.scene-ball {
  position: absolute;
  right: 265px;
  bottom: 25px;
  z-index: 4;
  font-size: 38px;
  transform: rotate(-12deg);
}

.scene-cat {
  right: 330px;
  bottom: 55px;
  font-size: 54px;
  animation: happy-hop 2.8s ease-in-out infinite;
}

.scene-honey {
  position: absolute;
  right: 55px;
  bottom: 119px;
  z-index: 4;
  font-size: 30px;
  transform: rotate(8deg);
}

.home-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0 27px;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.home-progress strong {
  color: var(--ink);
}

.progress-track {
  width: 115px;
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee7df;
}

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

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 0 4px 16px;
  gap: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 950;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.text-button {
  padding: 6px;
  border: 0;
  background: transparent;
  color: #8a6b9d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 292px;
  overflow: hidden;
  padding: 22px 20px 19px;
  border: 3px solid #fff;
  border-radius: 26px;
  box-shadow: var(--small-shadow);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mode-card:hover {
  z-index: 2;
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: var(--shadow);
}

.mode-card.listen { background: #e8f7ff; }
.mode-card.match { background: #fff6d9; }
.mode-card.speak { background: #fff0f4; }
.mode-card.read { background: #f2edff; }
.mode-card.write { background: #ebf8ee; }

.mode-emoji {
  display: grid;
  width: 57px;
  height: 57px;
  margin-bottom: 14px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.66);
  font-size: 30px;
}

.mode-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 950;
}

.mode-card p {
  margin: 0 0 15px;
  color: #766e7d;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
}

.mode-result {
  margin-top: auto;
  padding-top: 12px;
  border-top: 2px solid rgba(255, 255, 255, 0.75);
}

.mode-result-heading,
.mode-result-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mode-result-heading {
  margin-bottom: 11px;
  color: var(--ink);
  font-size: 13px;
}

.mode-result-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mode-result-heading strong {
  font-size: 13px;
  font-weight: 950;
}

.mode-result-label {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.mode-result-label b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.mode-result-track {
  width: 100%;
  height: 8px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.85);
}

.mode-go {
  position: absolute;
  top: 23px;
  right: 18px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  font-weight: 900;
}

.extra-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  margin-top: 17px;
  gap: 16px;
}

.extra-card {
  display: flex;
  align-items: center;
  min-height: 100px;
  padding: 18px 22px;
  gap: 16px;
  border: 3px solid #fff;
  border-radius: 24px;
  box-shadow: var(--small-shadow);
  cursor: pointer;
  text-align: left;
}

.extra-card.rhyme { background: #fff6d9; }
.extra-card.library { background: #eaf8f2; }

.extra-card > span:first-child {
  font-size: 38px;
}

.extra-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 950;
}

.extra-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.extra-arrow {
  margin-left: auto;
  font-size: 22px;
  font-weight: 900;
}

.game-header {
  display: flex;
  align-items: center;
  margin-bottom: 19px;
  gap: 15px;
}

.back-button {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 2px solid #e8dfd7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 0 #e5ded5;
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
}

.game-title {
  min-width: 160px;
}

.game-title h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
}

.game-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.game-progress {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.game-progress .progress-track {
  width: min(220px, 24vw);
  height: 13px;
  background: #eae4de;
}

.round-label {
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.game-card {
  position: relative;
  max-width: 850px;
  min-height: 510px;
  margin: 0 auto;
  padding: 30px;
  border: 3px solid #fff;
  border-radius: var(--radius-lg);
  background: rgba(255, 254, 253, 0.96);
  box-shadow: var(--shadow);
}

.prompt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  gap: 10px;
  text-align: center;
}

.prompt-mascot {
  font-size: 30px;
}

.prompt-row h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
}

.listen-orb {
  display: grid;
  width: 148px;
  height: 148px;
  margin: 12px auto 20px;
  place-items: center;
  border: 7px solid #d6effc;
  border-radius: 50%;
  background: #e9f8ff;
  box-shadow: 0 7px 0 #c5e3f0;
  cursor: pointer;
  font-size: 60px;
  transition: transform 0.18s ease;
}

.listen-orb:hover {
  transform: scale(1.04);
}

.listen-orb.playing {
  animation: sound-pulse 0.8s ease-in-out infinite;
}

.listen-hint {
  margin: 0 0 22px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.picture-prompt {
  margin: -8px 0 16px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 650px;
  margin: 0 auto;
  gap: 13px;
}

.option-grid.three-options {
  grid-template-columns: 1fr;
  max-width: 610px;
}

.option-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  padding: 14px 18px;
  gap: 12px;
  border: 3px solid #eee6df;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 5px 0 #e8e1da;
  cursor: pointer;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.45;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.option-button:hover:not(:disabled) {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.option-button:disabled {
  cursor: default;
}

.option-button .option-emoji {
  font-size: 36px;
}

.picture-option {
  min-height: 96px;
}

.option-button.waiting {
  border-color: #e5ddd7;
  background: #f7f4f1;
  box-shadow: none;
  opacity: 0.68;
  cursor: wait;
  filter: saturate(0.75);
}

.picture-option .option-emoji {
  font-size: 43px;
  letter-spacing: 4px;
}

.option-grid.three-options .picture-option {
  min-height: 72px;
}

.sound-match-option {
  min-height: 76px;
}

.sound-match-option .english-option {
  font-size: 19px;
  font-weight: 900;
}

.sound-match-option.sentence-option {
  justify-content: flex-start;
  text-align: left;
}

.sound-match-option.sentence-option .english-option {
  font-size: 17px;
}

.option-button.correct {
  border-color: var(--success);
  background: #eafaf3;
  box-shadow: 0 5px 0 #b8decf;
  animation: correct-pop 0.35s ease;
}

.option-button.wrong {
  border-color: var(--danger);
  background: #fff1f0;
  animation: shake 0.35s ease;
}

.option-button.dimmed {
  opacity: 0.55;
}

.answer-badge {
  position: absolute;
  top: -10px;
  right: -7px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-size: 17px;
}

.reading-card {
  max-width: 640px;
  margin: 24px auto 28px;
  padding: 28px 24px;
  border: 3px solid #e6ddf8;
  border-radius: 26px;
  background: #f7f3ff;
  text-align: center;
}

.reading-emoji {
  display: block;
  margin-bottom: 12px;
  font-size: 48px;
}

.english-text {
  margin: 0;
  font-family: ui-rounded, "SF Pro Rounded", "Comic Sans MS", system-ui, sans-serif;
  font-size: clamp(25px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.reading-card.sentence .english-text {
  font-size: clamp(21px, 3.2vw, 30px);
}

.inline-sound {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-top: 15px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 19px;
}

.feedback-panel {
  display: flex;
  align-items: center;
  max-width: 650px;
  margin: 23px auto 0;
  padding: 16px 18px;
  gap: 14px;
  border: 2px solid #bde5d5;
  border-radius: 20px;
  background: #eefaf5;
}

.feedback-emoji {
  flex: 0 0 auto;
  font-size: 32px;
}

.feedback-copy {
  flex: 1;
  min-width: 0;
}

.feedback-copy strong {
  display: block;
  margin-bottom: 3px;
  color: #328367;
  font-size: 16px;
  font-weight: 950;
}

.feedback-copy p {
  margin: 0;
  color: #5f766e;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.feedback-panel .primary-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 14px;
}

.speak-card {
  max-width: 670px;
  margin: 0 auto;
  text-align: center;
}

.speak-target {
  position: relative;
  padding: 25px 25px 22px;
  border: 3px solid #f7d8df;
  border-radius: 26px;
  background: #fff5f7;
}

.speak-target .reading-emoji {
  margin-bottom: 8px;
}

.chinese-text {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
}

.speak-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 23px 0 13px;
  gap: 12px;
}

.mic-button.listening {
  border-color: #e47980;
  background: #ffe9eb;
  animation: sound-pulse 0.9s ease-in-out infinite;
}

.privacy-note {
  margin: 0;
  color: #948a96;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.6;
}

.speech-result,
.recording-result {
  margin: 16px auto 0;
  padding: 15px;
  border-radius: 18px;
  background: #f6f2ff;
  color: #695c7b;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.6;
}

.recording-result audio {
  display: block;
  width: min(100%, 360px);
  height: 42px;
  margin: 9px auto 0;
}

.writing-target {
  max-width: 650px;
  margin: 0 auto 20px;
  text-align: center;
}

.target-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 17px;
  gap: 9px;
  border-radius: 16px;
  background: #edf8ef;
  color: #4a7155;
  font-size: 15px;
  font-weight: 850;
}

.target-chip span {
  font-size: 25px;
}

.answer-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 700px;
  min-height: 91px;
  margin: 0 auto 18px;
  padding: 14px;
  flex-wrap: wrap;
  gap: 8px;
  border: 3px dashed #d9cdec;
  border-radius: 22px;
  background: #fbf9ff;
}

.answer-zone.wrong {
  border-color: var(--danger);
  background: #fff4f2;
  animation: shake 0.35s ease;
}

.answer-placeholder {
  margin: 0;
  color: #aaa0b5;
  font-size: 13px;
  font-weight: 700;
}

.tile-pool {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 700px;
  min-height: 66px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 9px;
}

.letter-tile,
.word-tile {
  display: inline-grid;
  min-width: 43px;
  height: 48px;
  padding: 0 10px;
  place-items: center;
  border: 2px solid #d9c9ed;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 0 #ded3e9;
  cursor: pointer;
  font-family: ui-rounded, "SF Pro Rounded", "Comic Sans MS", system-ui, sans-serif;
  font-size: 21px;
  font-weight: 900;
  text-transform: none;
  transition: transform 0.13s ease;
}

.word-tile {
  min-width: 55px;
  padding: 0 14px;
  font-size: 17px;
}

.letter-tile:hover,
.word-tile:hover {
  transform: translateY(-2px);
}

.answer-zone .letter-tile,
.answer-zone .word-tile {
  border-color: #a98dce;
  background: #f1eaff;
}

.tile-pool .used {
  visibility: hidden;
  pointer-events: none;
}

.writing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 23px;
  gap: 11px;
}

.writing-example {
  margin: 17px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.complete-card {
  max-width: 620px;
  margin: 38px auto 0;
  padding: 42px 32px;
  border: 3px solid #fff;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fff7d7, #fff 55%, #ecf9f2);
  box-shadow: var(--shadow);
  text-align: center;
}

.complete-animals {
  margin-bottom: 8px;
  font-size: 48px;
  letter-spacing: 4px;
  animation: happy-hop 1.8s ease-in-out infinite;
}

.complete-card h1 {
  margin: 8px 0 9px;
  font-size: 31px;
  font-weight: 950;
}

.complete-card > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.7;
}

.star-rating {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px 2px 0;
}

.star-rating .star-row {
  display: flex;
  gap: 7px;
}

.star {
  display: block;
  width: 38px;
  height: 38px;
}

.star.lit {
  filter: drop-shadow(0 2.5px 0 rgba(163, 111, 20, 0.3));
  animation: star-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.star.dim {
  opacity: 0.92;
}

.star-row .star.lit:nth-child(2) {
  animation-delay: 0.12s;
}

.star-row .star.lit:nth-child(3) {
  animation-delay: 0.24s;
}

.star-caption {
  color: #8a7f9c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.earned-stars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 560px;
  margin: 15px auto 24px;
}

.earned-stars .star {
  width: 27px;
  height: 27px;
}

@keyframes star-pop {
  from {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  70% {
    transform: scale(1.18) rotate(6deg);
  }
  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 13px;
}

.student-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 640px;
  margin: 0 auto 16px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.student-bar .text-button {
  font-size: 13px;
}

.login-card {
  max-width: 520px;
  margin: 38px auto 0;
  padding: 36px 30px;
  border: 3px solid #fff;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #fff7d7, #fff 55%, #ecf9f2);
  box-shadow: var(--shadow);
  text-align: center;
}

.login-mascot {
  margin-bottom: 4px;
  font-size: 56px;
  line-height: 1;
}

.login-card h1 {
  margin: 4px 0 8px;
  font-size: 28px;
  font-weight: 950;
}

.login-card > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.6;
}

.student-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.student-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 17px 12px;
  border: 2px solid #eadcf5;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 0 #efe6f7;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  transition: transform 0.13s ease, box-shadow 0.13s ease;
}

.student-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #efe6f7;
}

.student-button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #efe6f7;
}

.student-avatar {
  font-size: 42px;
  line-height: 1;
}

.new-student {
  display: flex;
  gap: 10px;
}

.new-student input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 2px solid #eadcf5;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.new-student input:focus {
  outline: none;
  border-color: #b7a1ec;
}

.new-student .primary-button {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 10px 16px;
  font-size: 14px;
}

.rhyme-stage {
  position: relative;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
  padding: 35px;
  border: 3px solid #fff;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #fff4c8, #fff9e9 45%, #f1eaff);
  box-shadow: var(--shadow);
  text-align: center;
}

.rhyme-stage h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 950;
}

.rhyme-stage > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-weight: 650;
}

.rhyme-animals {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 90px;
  margin: 8px 0 20px;
  gap: clamp(8px, 4vw, 34px);
  font-size: clamp(40px, 8vw, 66px);
}

.rhyme-animals.playing span {
  animation: dance 0.65s ease-in-out infinite alternate;
}

.rhyme-animals span:nth-child(2) { animation-delay: 0.12s; }
.rhyme-animals span:nth-child(3) { animation-delay: 0.24s; }
.rhyme-animals span:nth-child(4) { animation-delay: 0.36s; }
.rhyme-animals span:nth-child(5) { animation-delay: 0.48s; }

.rhyme-audio {
  width: min(100%, 480px);
  height: 48px;
  margin: 0 auto 18px;
}

.rhyme-lines {
  display: grid;
  max-width: 510px;
  margin: 0 auto 18px;
  gap: 8px;
}

.rhyme-lines button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 9px 14px;
  gap: 12px;
  border: 2px solid rgba(221, 199, 137, 0.55);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-family: ui-rounded, "SF Pro Rounded", "Comic Sans MS", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 850;
  text-align: left;
}

.rhyme-lines button:hover {
  border-color: #d8b75e;
  background: #fff;
}

.rhyme-tip {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
  color: #826b54;
  font-size: 13px;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(64, 54, 72, 0.35);
  backdrop-filter: blur(5px);
  animation: fade-in 0.18s ease;
}

.modal-card {
  width: min(570px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow-y: auto;
  padding: 27px;
  border: 3px solid #fff;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 24px 80px rgba(48, 39, 57, 0.24);
}

.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.modal-heading h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 950;
}

.close-button {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f2ede8;
  cursor: pointer;
  font-size: 20px;
}

.recording-list {
  display: grid;
  gap: 13px;
}

.recording-item {
  padding: 16px;
  border: 2px solid #eee6de;
  border-radius: 19px;
  background: #fffaf2;
}

.recording-item h3 {
  display: flex;
  align-items: center;
  margin: 0 0 4px;
  gap: 8px;
  font-size: 16px;
}

.recording-item p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.recording-item audio {
  width: 100%;
  height: 42px;
}

.modal-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 20px;
  gap: 10px;
}

.report-stat {
  padding: 15px 8px;
  border-radius: 18px;
  background: #f8f3ff;
  text-align: center;
}

.report-stat strong {
  display: block;
  margin-bottom: 3px;
  font-size: 25px;
}

.report-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.chapter-report-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 4px;
}

.chapter-report-item {
  padding: 13px 14px;
  border: 2px solid #eee6f4;
  border-radius: 16px;
  background: #fcfafd;
}

.chapter-report-item.listen { background: #f3faff; }
.chapter-report-item.speak { background: #fff7f9; }
.chapter-report-item.read { background: #f9f6ff; }
.chapter-report-item.write { background: #f4fbf5; }

.chapter-report-heading,
.chapter-report-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chapter-report-heading {
  font-size: 13px;
}

.chapter-report-heading > b {
  flex: 0 0 auto;
  font-size: 12px;
}

.chapter-report-metrics {
  margin-top: 11px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.chapter-report-metrics b {
  color: var(--ink);
}

.chapter-report-track {
  width: 100%;
  height: 8px;
  margin-top: 7px;
  background: #eae4ee;
}

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

.review-item {
  display: flex;
  align-items: center;
  padding: 10px 13px;
  gap: 10px;
  border-radius: 14px;
  background: #fff7e4;
  font-size: 13px;
  font-weight: 750;
}

.review-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.empty-report {
  padding: 24px;
  border-radius: 18px;
  background: #eef9f3;
  color: #577365;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 40;
  max-width: calc(100% - 40px);
  padding: 13px 20px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: #4d455c;
  box-shadow: 0 10px 35px rgba(50, 42, 59, 0.22);
  color: white;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.star-burst {
  position: fixed;
  top: 75px;
  right: 115px;
  z-index: 30;
  color: #efb838;
  font-size: 25px;
  pointer-events: none;
  animation: star-fly 0.75s ease-out forwards;
}

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

@keyframes bee-float {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  50% { transform: translate(10px, -12px) rotate(8deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.45; transform: scale(0.85) rotate(0); }
  50% { opacity: 1; transform: scale(1.15) rotate(15deg); }
}

@keyframes sound-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

@keyframes correct-pop {
  0% { transform: scale(0.95); }
  65% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

@keyframes dance {
  from { transform: translateY(0) rotate(-7deg); }
  to { transform: translateY(-15px) rotate(7deg); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes star-fly {
  0% { opacity: 0; transform: translateY(15px) scale(0.5) rotate(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-50px) scale(1.5) rotate(30deg); }
}

@media (max-width: 1100px) {
  .mode-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 850px) {
  .hero-card {
    grid-template-columns: 1fr 0.85fr;
  }

  .hero-copy {
    padding-left: 30px;
  }

  .house {
    right: 45px;
    transform: scale(0.85);
    transform-origin: bottom right;
  }

  .scene-dog {
    right: 12px;
    font-size: 62px;
  }

  .scene-ball {
    right: 210px;
  }

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

  .mode-card {
    min-height: 280px;
  }
}

@media (max-width: 620px) {
  .topbar {
    width: calc(100% - 24px);
    padding-top: 14px;
  }

  .brand-mark {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    font-size: 23px;
  }

  .brand strong {
    max-width: 145px;
    font-size: 15px;
  }

  .brand small {
    font-size: 9px;
  }

  .star-pill {
    min-width: 61px;
    height: 42px;
    padding: 0 10px;
    font-size: 16px;
  }

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

  #report-button {
    display: none;
  }

  .app-shell {
    width: calc(100% - 24px);
    margin-top: 11px;
  }

  .hero-card {
    display: block;
    min-height: 0;
  }

  .hero-copy {
    padding: 28px 24px 12px;
    text-align: center;
  }

  .hero-copy h1 {
    font-size: 31px;
  }

  .hero-copy > p:not(.eyebrow) {
    margin: 12px auto 18px;
    font-size: 14px;
  }

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

  .hero-note {
    display: none;
  }

  .pet-scene {
    min-height: 240px;
    transform: scale(0.88);
    transform-origin: center top;
    margin-bottom: -25px;
  }

  .scene-ground {
    right: 50%;
    width: 430px;
    transform: translateX(50%) rotate(-5deg);
  }

  .house {
    right: 50%;
    bottom: 40px;
    transform: translateX(50%) scale(0.72);
    transform-origin: bottom center;
  }

  .scene-sun {
    top: 10px;
    right: 30px;
    width: 50px;
    height: 50px;
  }

  .scene-dog {
    right: calc(50% - 145px);
    bottom: 20px;
    font-size: 57px;
  }

  .scene-bee {
    top: 35px;
    left: calc(50% - 150px);
  }

  .scene-ball {
    right: calc(50% + 62px);
    bottom: 21px;
  }

  .scene-cat {
    right: calc(50% + 105px);
    bottom: 48px;
    font-size: 40px;
  }

  .scene-honey {
    right: calc(50% - 142px);
    bottom: 90px;
    font-size: 25px;
  }

  .home-progress {
    margin: 14px 0 23px;
    flex-wrap: wrap;
  }

  .section-heading h2 {
    font-size: 20px;
  }

  .section-heading p {
    font-size: 12px;
  }

  .mode-grid {
    gap: 12px;
  }

  .mode-card {
    min-height: 258px;
    padding: 17px 15px;
    border-radius: 22px;
  }

  .mode-emoji {
    width: 48px;
    height: 48px;
    margin-bottom: 11px;
    font-size: 25px;
  }

  .mode-card h3 {
    font-size: 17px;
  }

  .mode-card p {
    font-size: 11px;
  }

  .mode-go {
    top: 17px;
    right: 13px;
    width: 25px;
    height: 25px;
  }

  .extra-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .game-header {
    gap: 10px;
  }

  .game-title {
    min-width: 0;
    flex: 1;
  }

  .game-title h1 {
    font-size: 18px;
  }

  .game-title p,
  .game-progress .progress-track {
    display: none;
  }

  .game-progress {
    flex: 0 0 auto;
  }

  .game-card {
    min-height: 490px;
    padding: 22px 15px;
    border-radius: 26px;
  }

  .prompt-row h2 {
    font-size: 17px;
  }

  .listen-orb {
    width: 125px;
    height: 125px;
    font-size: 50px;
  }

  .option-grid {
    gap: 10px;
  }

  .option-button {
    min-height: 80px;
    padding: 11px 8px;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
  }

  .option-grid.three-options .option-button {
    min-height: 66px;
    flex-direction: row;
    padding: 12px 15px;
  }

  .option-button .option-emoji {
    font-size: 31px;
  }

  .picture-option .option-emoji {
    font-size: 38px;
  }

  .reading-card {
    margin-top: 15px;
    padding: 22px 15px;
  }

  .feedback-panel {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 13px;
    gap: 9px;
  }

  .feedback-copy {
    padding-top: 4px;
  }

  .feedback-panel .primary-button {
    width: 100%;
  }

  .speak-controls .soft-button,
  .speak-controls .primary-button {
    padding: 10px 14px;
    font-size: 13px;
  }

  .game-card:has(.speak-card) {
    min-height: 540px;
  }

  .letter-tile {
    min-width: 38px;
    height: 44px;
    padding: 0 8px;
  }

  .word-tile {
    height: 43px;
    padding: 0 10px;
    font-size: 15px;
  }

  .answer-zone {
    padding: 10px;
    gap: 6px;
  }

  .tile-pool {
    gap: 7px;
  }

  .complete-card {
    padding: 32px 20px;
  }

  .login-card {
    padding: 28px 18px;
  }

  .new-student {
    flex-direction: column;
  }

  .complete-animals {
    font-size: 38px;
  }

  .earned-stars {
    gap: 6px;
    max-width: 100%;
  }

  .earned-stars .star {
    width: 22px;
    height: 22px;
  }

  .star {
    width: 32px;
    height: 32px;
  }

  .rhyme-stage {
    padding: 28px 16px;
  }

  .modal-backdrop {
    padding: 13px;
  }

  .modal-card {
    max-height: calc(100vh - 26px);
    padding: 21px 16px;
  }

  .chapter-report-list {
    grid-template-columns: 1fr;
  }

  .star-burst {
    right: 76px;
  }
}

@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;
  }
}

/* ===== 两段式进阶 · 阶段徽章 ===== */
.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 5px 11px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.mode-card .stage-badge {
  align-self: flex-start;
  margin-top: 2px;
  margin-bottom: 8px;
}

.stage-badge.stage-words {
  background: #fff3d6;
  color: #8a6d1e;
}

.stage-badge.stage-sentences {
  background: #e6f7ea;
  color: #2e7d4f;
}

/* ===== 自然拼读 · Sound parts ===== */
.phonics-button {
  display: flex;
  width: fit-content;
  margin: 12px auto 0;
}

.phonics-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
  gap: 7px;
}

.phonics-part {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 7px 12px;
  border: 2px solid #b7d8f5;
  border-radius: 14px;
  background: #eef7ff;
  color: #2e5e82;
  font-size: 17px;
  font-weight: 900;
}

.phonics-plus {
  color: var(--muted);
  font-weight: 900;
}

.phonics-modal .phonics-word {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 2px;
}

.phonics-modal .phonics-emoji {
  font-size: 34px;
}

.phonics-modal .phonics-word strong {
  font-size: 28px;
  font-weight: 900;
}

.phonics-modal .phonics-tip {
  margin: 12px 0 0;
  color: #5f6f7d;
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.phonics-modal .phonics-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
