:root {
  --ink: #342919;
  --muted: #756952;
  --cream: #fffaf0;
  --sun: #ffca3a;
  --sun-deep: #f2a900;
  --orange: #ff8a3d;
  --green: #55bd7b;
  --blue: #69b8ee;
  --pink: #ff8ba7;
  --paper: rgba(255, 255, 255, 0.91);
  --shadow: 0 18px 45px rgba(96, 69, 19, 0.15);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: #fff7df;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.95) 0 5%, transparent 17%),
    linear-gradient(180deg, #dff5ff 0%, #fff7df 48%, #ffedc7 100%);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    conic-gradient(from 140deg at 18% 22%, rgba(255, 220, 85, 0.18), transparent 22%, rgba(105, 184, 238, 0.16), transparent 48%, rgba(255, 139, 167, 0.18), transparent 72%),
    radial-gradient(circle at 82% 14%, rgba(255, 202, 58, 0.28), transparent 20%),
    radial-gradient(circle at 18% 88%, rgba(105, 184, 238, 0.24), transparent 24%);
  animation: aurora-spin 16s ease-in-out infinite alternate;
}

body.modal-open {
  overflow: hidden;
}

button {
  font: inherit;
}

button,
.word-card,
.answer-card {
  touch-action: manipulation;
}

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

.cloud {
  position: absolute;
  width: 140px;
  height: 46px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.72);
  filter: blur(0.2px);
  animation: cloud-drift 18s ease-in-out infinite alternate;
}

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

.cloud::before {
  width: 68px;
  height: 68px;
  left: 22px;
  top: -30px;
}

.cloud::after {
  width: 88px;
  height: 88px;
  right: 16px;
  top: -46px;
}

.cloud-a {
  left: -30px;
  top: 120px;
}

.cloud-b {
  right: -55px;
  top: 310px;
  transform: scale(0.76);
  animation-delay: -6s;
}

.spark {
  position: absolute;
  color: rgba(255, 184, 0, 0.62);
  font-size: 30px;
  animation: twinkle 2.2s ease-in-out infinite;
}

.spark-a {
  left: 12%;
  top: 38%;
}

.spark-b {
  right: 10%;
  top: 17%;
  animation-delay: -1s;
}

.topbar {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.main-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 8px 22px rgba(67, 97, 106, 0.1);
}

.main-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: rgba(52, 41, 25, 0.7);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.main-tab:active {
  transform: translateY(2px) scale(0.97);
}

.main-tab.is-active {
  color: #33240c;
  background: linear-gradient(135deg, #ffda53, #ffbd38);
  box-shadow: 0 5px 0 rgba(201, 126, 0, 0.3);
  animation: tab-pop 0.28s ease both;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 15px 6px 7px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(67, 97, 106, 0.1);
  cursor: pointer;
}

.profile-chip img {
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
}

.profile-chip span {
  display: grid;
  text-align: left;
  line-height: 1.1;
}

.profile-chip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.profile-chip strong {
  margin-top: 3px;
  font-size: 15px;
}

.star-pill,
.mini-star {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 76px;
  min-height: 48px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 22px rgba(67, 97, 106, 0.1);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 19px;
}

.star-icon,
.mini-star {
  color: #ffb400;
}

main {
  width: min(100%, 760px);
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 75px);
  padding: 24px 20px 40px;
}

.speech-bubble {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  margin: 0 auto -22px;
  padding: 22px 25px 24px;
  border: 3px solid #fff;
  border-radius: 30px 30px 30px 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
  animation: enter-down 0.65s cubic-bezier(0.2, 0.85, 0.3, 1.2) both;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 42px;
  bottom: -18px;
  border-width: 20px 20px 0 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent;
}

.bubble-kicker,
.eyebrow {
  color: #d56f22;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.speech-bubble h1 {
  margin: 8px 0 7px;
  font-size: clamp(27px, 7vw, 38px);
  line-height: 1.24;
  letter-spacing: -0.04em;
}

.speech-bubble p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.mascot-stage {
  position: relative;
  width: min(100%, 500px);
  height: 330px;
  margin: 0 auto;
}

.mascot {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 0;
  width: min(92%, 440px);
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 14px rgba(100, 66, 13, 0.17));
  animation: mascot-bob 3s ease-in-out infinite;
}

.ground-shadow {
  position: absolute;
  bottom: 1px;
  left: 50%;
  width: 66%;
  height: 36px;
  border-radius: 50%;
  background: rgba(130, 83, 25, 0.18);
  filter: blur(9px);
  transform: translateX(-50%);
}

.floating-word {
  position: absolute;
  z-index: 2;
  padding: 8px 13px;
  border: 3px solid white;
  border-radius: 14px;
  color: white;
  box-shadow: 0 8px 18px rgba(66, 52, 21, 0.15);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 13px;
  transform: rotate(-6deg);
  animation: float-tag 2.2s ease-in-out infinite;
}

.word-one {
  left: 4%;
  top: 80px;
  background: var(--pink);
}

.word-two {
  right: 3%;
  top: 140px;
  background: var(--green);
  transform: rotate(5deg);
  animation-delay: -1.1s;
}

.mission-card {
  position: relative;
  z-index: 3;
  margin-top: -4px;
  padding: 22px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: game-panel-in 0.7s 0.08s cubic-bezier(0.2, 0.9, 0.2, 1.18) both;
}

.mission-card::before,
.course-hub::before,
.chinese-challenge-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 34%, rgba(255, 255, 255, 0.48) 43%, transparent 53% 100%);
  transform: translateX(-120%);
  animation: panel-shine 5.8s ease-in-out infinite;
}

.mission-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.mission-top h2 {
  margin: 3px 0 0;
  font-size: 21px;
}

.time-badge {
  flex: none;
  padding: 7px 11px;
  border-radius: 999px;
  color: #8a6416;
  background: #fff0b9;
  font-size: 11px;
  font-weight: 900;
}

.mission-steps {
  display: flex;
  align-items: center;
  margin: 22px 2px 20px;
}

.mission-step {
  display: grid;
  flex: none;
  justify-items: center;
  gap: 5px;
  color: #988e7a;
  font-size: 10px;
  font-weight: 800;
}

.mission-step span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #ded8ca;
  border-radius: 50%;
  background: #f7f4ed;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 15px;
}

.mission-step.is-active {
  color: #9c6e00;
}

.mission-step.is-active span {
  border-color: var(--sun);
  background: var(--sun);
  color: #584000;
  box-shadow: 0 5px 13px rgba(255, 190, 20, 0.33);
  animation: step-pulse 1.8s ease-in-out infinite;
}

.step-line {
  flex: 1;
  height: 4px;
  margin: 0 8px 20px;
  border-radius: 999px;
  background: #e8e3d7;
}

.primary-button,
.secondary-button {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 21px;
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border-bottom: 7px solid #d98600;
  color: #5b3d00;
  background: linear-gradient(180deg, #ffd966, #ffbd25);
  box-shadow: 0 12px 25px rgba(244, 161, 0, 0.25);
  font-size: 20px;
  transition: transform 0.15s ease, border-bottom-width 0.15s ease;
}

.primary-button::after,
.chinese-listen-button::after,
.chinese-next-button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.55), transparent 38%);
  opacity: 0;
  transform: scale(0.3);
}

.primary-button.feedback-burst::after,
.chinese-listen-button.feedback-burst::after,
.chinese-next-button.feedback-burst::after {
  animation: button-burst 0.45s ease-out;
}

.primary-button:active {
  transform: translateY(4px);
  border-bottom-width: 3px;
}

.button-arrow {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  color: #fff8dd;
  background: #805b00;
  animation: arrow-nudge 1.3s ease-in-out infinite;
}

.parent-link {
  display: none;
  align-items: center;
  gap: 7px;
  margin: 18px auto 0;
  padding: 9px 14px;
  border: 0;
  color: rgba(70, 58, 38, 0.6);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.course-hub {
  position: relative;
  margin-top: 24px;
  padding: 24px 20px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: game-panel-in 0.72s 0.18s cubic-bezier(0.2, 0.9, 0.2, 1.18) both;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2,
.video-heading h2 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.25;
}

.course-count {
  flex: none;
  padding: 7px 10px;
  border-radius: 999px;
  color: #866316;
  background: #fff0bd;
  font-size: 10px;
  font-weight: 900;
}

.course-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.course-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.course-tab {
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: rgba(52, 41, 25, 0.72);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 9px 14px;
  box-shadow: 0 6px 14px rgba(75, 57, 21, 0.08);
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.course-tab:active {
  transform: translateY(2px) scale(0.97);
}

.course-tab.is-active {
  background: linear-gradient(135deg, #ffda53, #ffbd38);
  color: #3b2e1b;
  box-shadow: 0 9px 16px rgba(213, 135, 0, 0.18);
  animation: tab-pop 0.28s ease both;
}

.course-card,
.video-entry {
  border: 3px solid white;
  color: var(--ink);
  box-shadow: 0 8px 19px rgba(75, 57, 21, 0.1);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.course-card:active,
.video-entry:active {
  transform: scale(0.97);
}

.course-card:hover,
.video-entry:hover {
  box-shadow: 0 14px 28px rgba(75, 57, 21, 0.15);
  filter: saturate(1.08);
}

.course-card {
  position: relative;
  display: grid;
  min-height: 145px;
  align-content: center;
  justify-items: start;
  padding: 15px;
  overflow: hidden;
  border-radius: 24px;
  text-align: left;
  animation: card-rise 0.42s cubic-bezier(0.2, 0.9, 0.2, 1.18) both;
}

.course-card:nth-child(2) { animation-delay: 0.03s; }
.course-card:nth-child(3) { animation-delay: 0.06s; }
.course-card:nth-child(4) { animation-delay: 0.09s; }
.course-card:nth-child(5) { animation-delay: 0.12s; }
.course-card:nth-child(6) { animation-delay: 0.15s; }
.course-card:nth-child(7) { animation-delay: 0.18s; }
.course-card:nth-child(8) { animation-delay: 0.21s; }
.course-card:nth-child(9) { animation-delay: 0.24s; }
.course-card:nth-child(10) { animation-delay: 0.27s; }
.course-card:nth-child(11) { animation-delay: 0.3s; }
.course-card:nth-child(12) { animation-delay: 0.33s; }
.course-card:nth-child(13) { animation-delay: 0.36s; }

.course-card::before {
  content: "";
  position: absolute;
  inset: 10px auto auto 10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  filter: blur(1px);
}

.course-card[hidden] {
  display: none;
}

.course-card > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.course-card strong,
.video-entry strong {
  font-size: 15px;
}

.course-card small,
.video-entry small {
  color: rgba(52, 41, 25, 0.64);
  font-size: 10px;
  font-weight: 800;
}

.course-emoji {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-size: 42px;
  filter: drop-shadow(0 7px 0 rgba(105, 80, 21, 0.08));
  transition: transform 0.16s ease;
}

.course-card:active .course-emoji {
  transform: rotate(-7deg) scale(1.12);
}

.course-arrow {
  font-family: Arial, sans-serif;
  font-size: 28px;
  font-weight: 900;
}

.course-card .course-arrow {
  position: absolute;
  right: 13px;
  bottom: 9px;
  color: rgba(52, 41, 25, 0.35);
}

.course-family { background: #e5f5ff; }
.course-food { background: #fff0d4; }
.course-shapes { background: #f3e9ff; }
.course-actions { background: #e5f8e9; }
.course-clothes { background: #ffe8f0; }
.course-lemonade { background: #fff7b8; }
.course-u6l4 { background: #e8f1ff; }
.course-u6l5 { background: #f7e8ff; }
.course-community { background: #e4f7f4; }

.video-entry {
  display: grid;
  width: 100%;
  min-height: 82px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffdce5, #ffecc7);
  text-align: left;
}

.video-entry > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.video-entry-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 17px;
  color: white;
  background: var(--pink);
  box-shadow: 0 6px 0 #d65e79;
  font-size: 20px;
}

.lesson-screen {
  min-height: calc(100vh - 75px);
  padding: 20px 20px 40px;
}

.video-screen {
  min-height: calc(100vh - 75px);
  padding: 20px 20px 50px;
}

.chinese-screen {
  min-height: calc(100vh - 75px);
  padding: 20px 20px 50px;
}

.video-heading {
  flex: 1;
}

.chinese-hero-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 22px;
  padding: 24px 22px;
  border: 3px solid #fff;
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, #4a356f, #8f5e9f);
  box-shadow: var(--shadow);
}

.chinese-hero-card h2 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1.2;
}

.chinese-hero-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

.chinese-feibao-reader {
  position: relative;
  display: grid;
  width: 150px;
  height: 128px;
  place-items: center;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.chinese-feibao-reader img {
  position: absolute;
  right: 10px;
  bottom: -4px;
  z-index: 2;
  width: 84px;
  transform: scaleX(-1);
  filter: drop-shadow(0 10px 16px rgba(35, 22, 10, 0.22));
  animation: reader-bob 2.2s ease-in-out infinite;
}

.reader-book {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 245, 179, 0.92);
  box-shadow: 0 8px 0 rgba(152, 105, 18, 0.16);
  font-size: 28px;
}

.reader-word {
  position: absolute;
  z-index: 4;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 218, 82, 0.94);
  color: #5b3900;
  font-weight: 950;
  box-shadow: 0 6px 0 rgba(152, 105, 18, 0.18);
}

.reader-word-a {
  top: 16px;
  left: 16px;
}

.reader-word-b {
  top: 56px;
  left: 16px;
  animation: word-float 2.4s ease-in-out infinite;
}

.chinese-game {
  margin-top: 20px;
  padding: 20px;
  border: 3px solid #fff;
  border-radius: 30px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.92), transparent 30%),
    linear-gradient(145deg, #fff6cb, #ffe1ec 52%, #e8f7ff);
  box-shadow: var(--shadow);
}

.chinese-game-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.chinese-game-top h2 {
  margin: 4px 0 0;
  font-size: 23px;
}

.chinese-progress-track {
  height: 13px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.chinese-game-content {
  display: grid;
  gap: 14px;
}

.chinese-route-switcher {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.chinese-daily-route-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border: 3px solid #fff;
  border-radius: 22px;
  color: #45371f;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 7px 16px rgba(75, 57, 21, 0.08);
  cursor: pointer;
  text-align: left;
}

.chinese-daily-route-button > span:first-child {
  font-size: 30px;
}

.chinese-daily-route-button > span:last-child {
  display: grid;
  gap: 3px;
}

.chinese-daily-route-button strong {
  font-size: 16px;
}

.chinese-daily-route-button small,
.chinese-explore-panel summary small {
  color: rgba(69, 55, 31, 0.64);
  font-size: 12px;
  font-weight: 800;
}

.chinese-daily-route-button.is-active {
  background: linear-gradient(135deg, #ffdc65, #ffc23f);
  box-shadow: 0 7px 0 #d78600;
}

.chinese-explore-panel {
  position: relative;
  padding: 0 12px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
}

.chinese-explore-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 2px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 950;
  list-style: none;
}

.chinese-explore-panel summary::-webkit-details-marker {
  display: none;
}

.chinese-explore-panel summary::after {
  content: "＋";
  margin-left: auto;
  font-size: 20px;
}

.chinese-explore-panel[open] summary::after {
  content: "－";
}

.chinese-chapter-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 12px;
}

.chinese-chapter-tab {
  display: grid;
  gap: 3px;
  min-height: 64px;
  place-items: center;
  padding: 8px 6px;
  border: 3px solid #fff;
  border-radius: 19px;
  color: rgba(52, 41, 25, 0.72);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 6px 14px rgba(75, 57, 21, 0.08);
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}

.chinese-chapter-tab span {
  font-size: 24px;
  line-height: 1;
}

.chinese-chapter-tab.is-active {
  color: #35270d;
  background: linear-gradient(135deg, #ffda53, #ffbd38);
  box-shadow: 0 7px 0 #d78600;
}

.chinese-challenge-card {
  position: relative;
  padding: 18px;
  border: 3px solid rgba(255, 255, 255, 0.95);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(75, 57, 21, 0.08);
  overflow: hidden;
  text-align: center;
  animation: game-panel-in 0.48s cubic-bezier(0.2, 0.9, 0.2, 1.18) both;
}

.chinese-level-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #835810;
  background: #fff0bd;
  font-size: 12px;
  font-weight: 950;
}

.chinese-challenge-emoji {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  margin: 18px auto 26px;
  border: 5px solid #fff;
  border-radius: 30px;
  background: linear-gradient(145deg, #ffdc5d, #ff8fab);
  box-shadow: 0 8px 0 rgba(197, 124, 0, 0.18);
  font-size: 42px;
  line-height: 1;
  overflow: hidden;
  animation: emoji-float 2.4s ease-in-out infinite;
}

.chinese-challenge-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1.2;
}

.chinese-challenge-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.65;
}

.chinese-listen-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  margin: 16px auto 4px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #68b9f1, #4f9cdf);
  box-shadow: 0 7px 0 #2d79b9;
  cursor: pointer;
  font-size: 16px;
  font-weight: 950;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chinese-listen-button:active,
.chinese-next-button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #2d79b9;
}

.chinese-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.chinese-option {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 56px;
  padding: 14px 10px;
  border: 3px solid #fff;
  border-radius: 20px;
  color: var(--ink);
  background: #fffaf2;
  box-shadow: 0 6px 14px rgba(75, 57, 21, 0.08);
  cursor: pointer;
  font-size: 15px;
  font-weight: 950;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.chinese-option::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(255, 218, 83, 0.35), transparent 42%);
  opacity: 0;
  transform: scale(0.45);
}

.chinese-option.feedback-burst::after {
  animation: option-burst 0.42s ease-out;
}

.chinese-option:active {
  transform: scale(0.96);
}

.chinese-option-emoji {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 218, 83, 0.35);
  font-size: 32px;
  line-height: 1;
  overflow: hidden;
}

.chinese-option strong {
  font-size: 14px;
  line-height: 1.2;
}

.chinese-word-option {
  min-height: 96px;
  padding: 16px 8px;
}

.chinese-word-choice {
  display: grid;
  min-width: 72px;
  min-height: 72px;
  place-items: center;
  padding: 8px 12px;
  border-radius: 20px;
  background: rgba(255, 218, 83, 0.35);
  color: var(--ink);
  font-size: clamp(30px, 8vw, 48px);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.chinese-option.is-correct {
  color: #155a32;
  background: #dff8e9;
  animation: correct-bounce 0.5s ease;
}

.chinese-option.is-wrong {
  color: #8a2c24;
  background: #ffe1df;
  animation: gentle-shake 0.4s ease;
}

.chinese-feedback {
  min-height: 32px;
  color: #835810;
  font-size: 15px;
  font-weight: 950;
}

.chinese-next-button {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 20px;
  color: #35270d;
  background: linear-gradient(135deg, #ffda53, #ffbd38);
  box-shadow: 0 7px 0 #d78600;
  cursor: pointer;
  font-size: 17px;
  font-weight: 950;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chinese-say-box {
  margin-top: 16px;
  padding: 15px;
  border-radius: 20px;
  background: rgba(255, 240, 189, 0.75);
  text-align: left;
}

.chinese-say-box strong {
  display: block;
  margin-bottom: 6px;
}

.chinese-picture-expression-card .chinese-challenge-emoji {
  display: none;
}

.chinese-picture-scene {
  display: grid;
  width: min(100%, 520px);
  min-height: 150px;
  place-items: center;
  margin: 8px auto 18px;
  padding: 10px;
  border: 5px solid #fff;
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.96), transparent 30%),
    linear-gradient(145deg, #e6f7ff, #fff2c0 58%, #ffe1ec);
  box-shadow: 0 14px 28px rgba(75, 57, 21, 0.12);
  font-size: clamp(54px, 16vw, 98px);
  line-height: 1.1;
}

.chinese-picture-scene img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 26px;
}

.chinese-story-question-scene {
  width: min(100%, 460px);
  margin-top: 18px;
}

.chinese-story-question-scene img {
  aspect-ratio: 1 / 1;
}

.chinese-picture-scene-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  min-height: 124px;
}

.chinese-sentence-frame {
  margin: 14px auto;
  padding: 16px;
  border: 3px dashed rgba(222, 137, 0, 0.35);
  border-radius: 22px;
  background: rgba(255, 247, 205, 0.82);
  text-align: left;
}

.chinese-sentence-frame strong {
  display: block;
  margin-bottom: 8px;
  color: #a55e00;
  font-size: 15px;
}

.chinese-sentence-frame span {
  color: #3b2d1b;
  font-size: clamp(18px, 4.6vw, 25px);
  font-weight: 950;
  line-height: 1.5;
}

.chinese-section {
  margin-top: 24px;
  padding: 22px 18px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

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

.chinese-card {
  padding: 18px;
  border: 3px solid #fff;
  border-radius: 26px;
  background: #fffaf0;
  box-shadow: 0 8px 18px rgba(75, 57, 21, 0.08);
}

.chinese-card:nth-child(2n) {
  background: #eef8ff;
}

.chinese-card:nth-child(3n) {
  background: #fff0f7;
}

.chinese-card-emoji {
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 20px;
  background: rgba(255, 207, 62, 0.3);
  font-size: 29px;
  line-height: 1;
  overflow: hidden;
}

.chinese-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.28;
}

.chinese-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.poem-text {
  margin: 14px 0;
  color: #4a3a22;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.9;
}

.poem-meaning {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 216, 85, 0.28);
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.65;
}

.idiom-card p,
.picture-prompt {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.7;
}

.picture-prompt {
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 216, 85, 0.32);
}

.speak-button {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 18px;
  color: #35270d;
  background: linear-gradient(135deg, #ffda53, #ffbd38);
  box-shadow: 0 6px 0 #d78600;
  cursor: pointer;
  font-size: 15px;
  font-weight: 950;
}

.speak-button:active {
  transform: translateY(2px);
  box-shadow: 0 4px 0 #d78600;
}

.cinema-hero {
  display: grid;
  min-height: 220px;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  margin-top: 22px;
  padding: 23px 20px;
  overflow: hidden;
  border: 3px solid white;
  border-radius: 30px;
  background: linear-gradient(135deg, #342957, #68488a);
  box-shadow: var(--shadow);
  color: white;
}

.cinema-hero h2 {
  margin: 10px 0 8px;
  font-size: clamp(23px, 6vw, 32px);
  line-height: 1.25;
}

.cinema-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.cinema-hero img {
  width: 165%;
  max-width: none;
  margin-left: -45%;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.25));
}

.cinema-badge {
  padding: 6px 9px;
  border-radius: 999px;
  color: #33294c;
  background: #ffd75d;
  font-size: 10px;
  font-weight: 900;
}

.cinema-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 16px;
  padding: 14px 18px;
  border: 3px solid white;
  border-radius: 24px;
  background: linear-gradient(135deg, #564074, #33294c);
  color: white;
  box-shadow: var(--shadow);
}

.cinema-intro img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.cinema-intro h2 {
  margin: 8px 0 0;
  font-size: clamp(18px, 4vw, 24px);
}

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

.video-tab {
  display: grid;
  min-height: 82px;
  place-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 3px solid white;
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 7px 16px rgba(75, 57, 21, 0.09);
  cursor: pointer;
}

.video-tab span {
  font-size: 28px;
}

.video-tab strong {
  font-size: 12px;
}

.video-tab.is-active {
  border-color: #ffbf32;
  background: linear-gradient(145deg, #ffe77c, #ffc84c);
  box-shadow: 0 7px 0 #e99400;
  transform: translateY(-3px);
}

.video-tabs-loading {
  grid-column: 1 / -1;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.video-player-card {
  margin: 18px 0 14px;
  overflow: hidden;
  border: 4px solid white;
  border-radius: 28px;
  background: #1f1c28;
  box-shadow: var(--shadow);
}

.video-now-playing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: white;
  background: #302a3c;
}

.video-now-playing span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #382a00;
  background: #ffd75d;
  font-size: 9px;
  font-weight: 950;
}

.video-now-playing strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-placeholder {
  display: grid;
  min-height: 230px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: white;
  text-align: center;
}

.video-placeholder span {
  font-size: 55px;
}

.video-placeholder strong {
  font-size: 19px;
}

.video-placeholder small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}

#videoPlayer {
  display: block;
  width: 100%;
  min-height: 220px;
  max-height: 65vh;
  background: #000;
}

.video-choices {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.video-choices:empty {
  display: none;
}

.video-choice {
  display: flex;
  min-width: 180px;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: 3px solid white;
  border-radius: 18px;
  color: var(--ink);
  background: #fffaf0;
  box-shadow: 0 6px 14px rgba(75, 57, 21, 0.08);
  cursor: pointer;
}

.video-choice span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: #795494;
}

.video-choice strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-choice.is-active {
  border-color: #ffbf32;
  background: #fff0bd;
}

.video-parent-tools {
  margin-top: 20px;
  padding: 14px 16px;
  border: 2px dashed rgba(83, 68, 45, 0.2);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
}

.video-parent-tools summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.video-manage-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.video-picker {
  cursor: pointer;
}

.video-upload-tools {
  margin: 16px 0 10px;
}

.video-upload-tools label {
  display: grid;
  gap: 7px;
  color: #6f6047;
  font-size: 13px;
  font-weight: 900;
}

.video-upload-tools select {
  width: 100%;
  padding: 14px 16px;
  border: 3px solid white;
  border-radius: 18px;
  color: var(--ink);
  background: #fffaf0;
  box-shadow: 0 7px 18px rgba(75, 57, 21, 0.08);
  font: inherit;
  font-size: 16px;
}

.upload-progress {
  margin-top: 14px;
  padding: 15px;
  border: 3px solid white;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.upload-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.video-library {
  margin-top: 20px;
  padding: 20px;
  border: 3px solid white;
  border-radius: 27px;
  background: rgba(255, 255, 255, 0.8);
}

.refresh-videos {
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  color: #745818;
  background: #fff0bd;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.video-list {
  display: grid;
  gap: 11px;
}

.video-category {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.video-category h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 3px 4px;
  color: var(--ink);
  font-size: 17px;
}

.video-category h3 span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff0bd;
  color: #866316;
  font-size: 11px;
}

.video-list-state {
  padding: 24px 12px;
  border-radius: 18px;
  color: var(--muted);
  background: #f7f2e8;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.video-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  background: #f8f2e6;
}

.video-item-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: white;
  background: linear-gradient(145deg, #8762a3, #57406f);
  font-size: 20px;
}

.video-item-info {
  min-width: 0;
}

.video-item-info strong,
.video-item-info small {
  display: block;
}

.video-item-info strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-item-info small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.video-item-actions {
  display: flex;
  gap: 6px;
}

.video-item-actions button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.play-saved-video {
  color: white;
  background: var(--green);
}

.delete-saved-video {
  color: #a44a58;
  background: #ffe2e7;
}

.watch-tips {
  margin-top: 20px;
  padding: 20px;
  border: 3px solid white;
  border-radius: 27px;
  background: rgba(255, 255, 255, 0.78);
}

.watch-tips h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.watch-tips div {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 10px;
}

.watch-tips div span {
  display: grid;
  flex: none;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #664700;
  background: var(--sun);
  font-size: 12px;
  font-weight: 900;
}

.watch-tips p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.lesson-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.round-button {
  display: grid;
  flex: none;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 7px 20px rgba(65, 54, 28, 0.1);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

.lesson-progress-wrap {
  flex: 1;
}

.lesson-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 900;
}

.progress-track {
  height: 11px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.progress-fill {
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--sun));
  transition: width 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.mini-star {
  min-width: 58px;
  min-height: 44px;
  font-size: 16px;
}

.lesson-content {
  display: grid;
  min-height: calc(100vh - 170px);
  align-content: center;
  padding: 22px 0;
}

.lesson-title {
  margin: 0;
  text-align: center;
  font-size: clamp(27px, 7vw, 38px);
  line-height: 1.25;
}

.lesson-title-en {
  margin: 5px 0 12px;
  color: #d56f22;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(16px, 4.5vw, 21px);
  font-weight: 900;
  text-align: center;
}

.lesson-subtitle {
  display: grid;
  gap: 3px;
  margin: 0 auto 24px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.lesson-subtitle small {
  color: rgba(117, 105, 82, 0.72);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.word-stage {
  display: grid;
  justify-items: center;
  min-height: 330px;
  align-content: center;
  margin-bottom: 22px;
  padding: 20px;
  border: 3px solid #fff;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.sentence-stage {
  display: grid;
  justify-items: center;
  min-height: 350px;
  align-content: center;
  margin-bottom: 22px;
  padding: 26px 20px;
  border: 3px solid white;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  text-align: center;
}

.sentence-scene {
  display: flex;
  min-height: 115px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 70px;
}

.sentence-english {
  margin: 12px 0 7px;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.25;
}

.sentence-chinese {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.sentence-question {
  display: inline-block;
  margin-bottom: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff0b8;
  color: #755000;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 800;
}

.phonics-stage {
  position: relative;
}

.phonics-letter {
  display: inline-grid;
  min-width: 148px;
  min-height: 96px;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 28px;
  background: linear-gradient(145deg, #ffe36e, #ffb62e);
  color: #5b3900;
  font-size: clamp(2.7rem, 7vw, 4.6rem);
  font-weight: 950;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 0 #e98b00;
}

.listening-stage .sentence-scene {
  animation: mascotBob 1.8s ease-in-out infinite;
}

.word-emoji {
  display: grid;
  width: 170px;
  height: 170px;
  place-items: center;
  border: 6px solid white;
  border-radius: 44px;
  background: linear-gradient(145deg, #fff3c3, #ffd975);
  box-shadow: 0 14px 28px rgba(152, 105, 18, 0.16);
  overflow: hidden;
  contain: paint;
  font-size: 0;
  animation: item-pop 0.45s cubic-bezier(0.2, 0.9, 0.2, 1.25) both;
}

.word-emoji-glyph {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: clamp(68px, 15vw, 92px);
  line-height: 1;
  white-space: nowrap;
}

.word-emoji-glyph--wide {
  font-size: clamp(46px, 11vw, 62px);
  letter-spacing: -0.08em;
}

.word-english {
  margin: 18px 0 2px;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 38px;
  line-height: 1;
}

.word-chinese {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.listen-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 51px;
  margin-top: 16px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  box-shadow: 0 7px 0 #368dc6;
  font-weight: 900;
  cursor: pointer;
}

.listen-button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #368dc6;
}

.pronunciation-practice {
  display: grid;
  width: min(100%, 340px);
  justify-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 2px dashed #eadfca;
}

.speak-practice-button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(180deg, #ff91aa, #f36c8c);
  box-shadow: 0 7px 0 #c94d69;
  font-weight: 900;
  cursor: pointer;
}

.speak-practice-button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #c94d69;
}

.speak-practice-button:disabled {
  cursor: default;
  opacity: 0.88;
}

.speak-practice-button.is-listening {
  background: linear-gradient(180deg, #6bd59a, #42b979);
  box-shadow: 0 7px 0 #268c59;
  animation: listening-pulse 1s ease-in-out infinite;
}

.practice-mic {
  font-size: 21px;
}

.practice-feedback {
  min-height: 44px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.practice-hint {
  display: inline-block;
  max-width: 230px;
  line-height: 1.5;
}

.practice-result {
  display: grid;
  gap: 4px;
  min-width: 230px;
  padding: 11px 14px;
  border-radius: 17px;
}

.practice-result strong {
  color: #ffad00;
  font-size: 20px;
  letter-spacing: 2px;
}

.practice-result span {
  font-size: 12px;
}

.practice-result small {
  color: rgba(52, 41, 25, 0.55);
  font-size: 10px;
}

.practice-result audio {
  width: min(100%, 260px);
  margin-top: 5px;
}

.practice-result.is-great {
  background: #dcf8e5;
}

.practice-result.is-good {
  background: #fff1c8;
}

.practice-result.is-try {
  background: #f5ecff;
}

.listening-wave {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 4px;
}

.listening-wave i {
  width: 5px;
  height: 12px;
  border-radius: 999px;
  background: var(--green);
  animation: listening-wave 0.7s ease-in-out infinite alternate;
}

.listening-wave i:nth-child(2) { animation-delay: -0.2s; }
.listening-wave i:nth-child(3) { animation-delay: -0.4s; }
.listening-wave i:nth-child(4) { animation-delay: -0.6s; }

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

.answer-card {
  min-height: 154px;
  padding: 12px 8px;
  border: 4px solid white;
  border-radius: 28px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 9px 22px rgba(71, 61, 40, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.answer-card:active {
  transform: scale(0.94);
}

.answer-card .emoji {
  display: block;
  font-size: clamp(50px, 15vw, 76px);
}

.answer-card strong {
  display: block;
  margin-top: 6px;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: clamp(14px, 4vw, 18px);
}

.answer-card.is-right {
  background: #dff8e6;
  animation: correct-bounce 0.5s ease;
}

.answer-card.is-wrong {
  background: #fff1d4;
  animation: gentle-shake 0.4s ease;
}

.game-prompt {
  display: grid;
  justify-items: center;
  margin: 6px 0 18px;
}

.big-sound-button {
  display: grid;
  width: 100px;
  height: 100px;
  place-items: center;
  border: 7px solid white;
  border-radius: 50%;
  color: white;
  background: var(--pink);
  box-shadow: 0 11px 0 #d85e7a, 0 18px 35px rgba(161, 58, 90, 0.22);
  font-size: 41px;
  cursor: pointer;
  animation: sound-pulse 1.8s ease-in-out infinite;
}

.result-card {
  display: grid;
  justify-items: center;
  padding: 30px 20px 25px;
  border: 4px solid white;
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.egg {
  position: relative;
  display: grid;
  width: 150px;
  height: 190px;
  place-items: center;
  border: 6px solid #fff;
  border-radius: 50% 50% 46% 46%;
  color: white;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.8), transparent 15%),
    linear-gradient(145deg, #ff98b0, #ff6688);
  box-shadow: 0 18px 33px rgba(177, 52, 87, 0.22);
  font-size: 70px;
  cursor: pointer;
  animation: egg-wiggle 1.3s ease-in-out infinite;
}

.reward-mascot-wrap {
  position: relative;
  width: min(100%, 330px);
  margin: 0 auto;
}

.reward-mascot {
  width: 100%;
  filter: drop-shadow(0 13px 14px rgba(97, 66, 19, 0.16));
}

.reward-hat {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 13%;
  font-size: 72px;
  transform: translateX(-15%) rotate(7deg);
  animation: item-pop 0.6s cubic-bezier(0.2, 0.9, 0.2, 1.25) both;
}

.reward-stars {
  margin: 3px 0 5px;
  color: #ffb000;
  font-size: 44px;
  letter-spacing: 4px;
  animation: star-pop 0.7s ease both;
}

.result-card h2 {
  margin: 6px 0 5px;
  font-size: 29px;
}

.result-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-weight: 700;
}

.result-card p small {
  color: rgba(117, 105, 82, 0.72);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 11px;
}

.result-card .result-en {
  margin: -1px 0 9px;
  color: #d56f22;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 15px;
  font-weight: 900;
}

.parent-dialog {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 15px max(16px, env(safe-area-inset-bottom));
  color: var(--ink);
  background: rgba(42, 34, 20, 0.55);
  backdrop-filter: blur(4px);
  overflow: auto;
}

.parent-dialog[hidden] {
  display: none;
}

.account-form[hidden],
.account-actions[hidden] {
  display: none !important;
}

.parent-panel {
  width: min(100%, 620px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 25px;
  border-radius: 30px;
  background: #fffaf0;
  box-shadow: 0 30px 100px rgba(35, 29, 17, 0.3);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-header h2 {
  margin: 3px 0 0;
}

.parent-account-card {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 16px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: #fff5d6;
}

.account-kicker {
  color: #d46f21;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.parent-account-card h3 {
  margin: 4px 0 4px;
  font-size: 18px;
}

.parent-account-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.account-form {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}

.account-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.account-form label:nth-child(3),
.account-form .compact-button {
  grid-column: 1 / -1;
}

.account-form input {
  min-height: 44px;
  padding: 0 13px;
  border: 2px solid #f1dfb9;
  border-radius: 16px;
  color: var(--ink);
  background: #fffdfa;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  outline: none;
}

.account-form input:focus {
  border-color: #ffc83d;
  box-shadow: 0 0 0 4px rgba(255, 200, 61, 0.2);
}

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

.compact-button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 18px;
  font-size: 14px;
}

.ghost-button {
  border: 0;
  color: #765d2f;
  background: rgba(255, 255, 255, 0.65);
  font-weight: 900;
}

.parent-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0 15px;
}

.parent-stats div {
  display: grid;
  gap: 7px;
  min-height: 90px;
  align-content: center;
  padding: 10px;
  border-radius: 20px;
  background: #fff0c5;
  text-align: center;
}

.parent-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.parent-stats strong {
  font-size: 18px;
}

.parent-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 15px 0 20px;
  padding: 15px;
  border-radius: 20px;
  background: #e8f7ff;
}

.parent-note p {
  margin: 0;
  color: #526a74;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}

.secondary-button {
  color: #64522f;
  background: #f0e8d7;
  font-size: 15px;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  max-width: calc(100% - 40px);
  padding: 13px 20px;
  border-radius: 999px;
  color: white;
  background: #3d3323;
  box-shadow: 0 9px 28px rgba(34, 28, 19, 0.25);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.confetti-layer {
  position: fixed;
  z-index: 30;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 18px;
  border-radius: 4px;
  animation: confetti-fall 1.8s linear forwards;
}

@keyframes mascot-bob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-1deg); }
  50% { transform: translateX(-50%) translateY(-9px) rotate(1deg); }
}

@keyframes reader-bob {
  0%, 100% { transform: scaleX(-1) translateY(0) rotate(-1deg); }
  50% { transform: scaleX(-1) translateY(-7px) rotate(1deg); }
}

@keyframes word-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(5deg); }
}

@keyframes aurora-spin {
  0% { transform: rotate(0deg) scale(1); opacity: 0.85; }
  100% { transform: rotate(8deg) scale(1.06); opacity: 1; }
}

@keyframes cloud-drift {
  to { transform: translateX(35px); }
}

@keyframes twinkle {
  50% { opacity: 0.3; transform: scale(0.65) rotate(30deg); }
}

@keyframes float-tag {
  50% { translate: 0 -8px; }
}

@keyframes enter-down {
  from { opacity: 0; transform: translateY(-25px) scale(0.96); }
}

@keyframes game-panel-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
}

@keyframes tab-pop {
  0% { transform: scale(0.92); }
  70% { transform: scale(1.04); }
}

@keyframes panel-shine {
  0%, 58% { transform: translateX(-120%); }
  76%, 100% { transform: translateX(120%); }
}

@keyframes step-pulse {
  50% { box-shadow: 0 0 0 8px rgba(255, 202, 58, 0.18), 0 5px 13px rgba(255, 190, 20, 0.33); }
}

@keyframes arrow-nudge {
  50% { transform: translateX(4px); }
}

@keyframes button-burst {
  0% { opacity: 0.85; transform: scale(0.18); }
  100% { opacity: 0; transform: scale(2.2); }
}

@keyframes option-burst {
  0% { opacity: 1; transform: scale(0.25); }
  100% { opacity: 0; transform: scale(2.1); }
}

@keyframes emoji-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

@keyframes item-pop {
  from { opacity: 0; transform: scale(0.55) rotate(-7deg); }
}

@keyframes correct-bounce {
  40% { transform: scale(1.09); }
}

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

@keyframes sound-pulse {
  50% { transform: scale(1.06); }
}

@keyframes listening-pulse {
  50% { transform: scale(1.04); }
}

@keyframes listening-wave {
  to { height: 30px; }
}

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

@keyframes star-pop {
  0% { opacity: 0; transform: scale(0.3); }
  65% { transform: scale(1.25); }
}

@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); }
}

@media (min-width: 640px) {
  .chinese-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    padding-top: 34px;
  }

  .mascot-stage {
    height: 390px;
  }

  .mission-card {
    max-width: 590px;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 639px) {
  .main-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .main-tab {
    flex: 1 0 auto;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 12px;
  }

  .topbar .star-pill {
    min-width: 62px;
  }

  .chinese-hero-card {
    grid-template-columns: 1fr;
  }

  .chinese-feibao-reader {
    width: 112px;
    height: 98px;
  }

  .chinese-feibao-reader img {
    width: 78px;
  }

  .reader-book {
    width: 42px;
    height: 34px;
    font-size: 24px;
  }

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

  .chinese-explore-panel summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .chinese-explore-panel summary::after {
    position: absolute;
    right: 22px;
  }

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

  .chinese-option {
    min-height: 116px;
    padding: 10px 6px;
  }

  .chinese-option-emoji {
    width: 50px;
    height: 50px;
    font-size: 29px;
  }

  .account-form,
  .account-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero,
  .lesson-screen,
  .chinese-screen {
    padding-right: 14px;
    padding-left: 14px;
  }

  .speech-bubble {
    padding: 18px 16px 20px;
  }

  .mascot-stage {
    height: 285px;
  }

  .mission-card {
    padding: 18px;
  }

  .answer-grid {
    gap: 8px;
  }

  .answer-card {
    min-height: 137px;
    border-radius: 23px;
  }

  .course-hub {
    padding: 19px 14px;
  }

  .course-card {
    min-height: 137px;
    padding: 13px;
  }
}

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