/* WORD UP! child-facing unified UI layer.
   Keeps existing learning logic intact while replacing older dark shells. */

:root {
  --child-green: #58cc02;
  --child-green-dark: #46a302;
  --child-blue: #1cb0f6;
  --child-sky: #eaf8ff;
  --child-yellow: #ffc800;
  --child-orange: #ff9600;
  --child-red: #ff4b4b;
  --child-purple: #8b5cf6;
  --child-ink: #13241b;
  --child-muted: #5d7067;
  --child-line: #d9edcf;
  --child-soft: #f4ffef;
}

body:has(#page-learn),
body:has(#page-sentence),
body:has(#page-listening),
body:has(#page-listening-player),
body:has(#page-writing),
body:has(#page-writing-lesson),
body:has(#page-speaking-library),
body:has(#page-speaking),
body:has(#page-ket-mock-library),
body:has(#page-ket-mock),
body:has(#page-ket-mock-result),
body:has(#page-part5-cloze),
body:has(#page-part5-cloze-result) {
  min-height: 100vh;
  margin: 0;
  color: var(--child-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 34%),
    linear-gradient(135deg, #fbfff7 0%, #effbe8 52%, #eafbff 100%);
  font-family: "Nunito", "Inter", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

body:has(#page-learn) #app,
body:has(#page-sentence) #app,
body:has(#page-listening) #app,
body:has(#page-listening-player) #app,
body:has(#page-writing) #app,
body:has(#page-writing-lesson) #app,
body:has(#page-speaking-library) #app,
body:has(#page-speaking) #app,
body:has(#page-ket-mock-library) #app,
body:has(#page-ket-mock) #app,
body:has(#page-ket-mock-result) #app,
body:has(#page-part5-cloze) #app,
body:has(#page-part5-cloze-result) #app {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

#page-learn,
#page-sentence,
#page-listening,
#page-listening-player,
#page-writing,
#page-writing-lesson,
#page-speaking-library,
#page-speaking,
#page-ket-mock-library,
#page-ket-mock,
#page-ket-mock-result,
#page-part5-cloze,
#page-part5-cloze-result {
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  padding: clamp(12px, 1.8vw, 24px);
  overflow-x: hidden;
  color: var(--child-ink);
  background: transparent;
}

#page-listening > *,
#page-listening-player > *,
#page-writing > *,
#page-writing-lesson > *,
#page-speaking-library > *,
#page-speaking > *,
#page-ket-mock-library > *,
#page-ket-mock > *,
#page-ket-mock-result > *,
#page-part5-cloze > *,
#page-part5-cloze-result > * {
  width: min(100%, 1180px);
  margin-left: auto;
  margin-right: auto;
}

#page-learn .header-bar,
#page-sentence .header-bar,
#page-listening .header-bar,
#page-listening-player .header-bar,
#page-writing .header-bar,
#page-writing-lesson .header-bar,
#page-speaking-library .header-bar,
#page-speaking .header-bar,
#page-ket-mock-library .header-bar,
#page-ket-mock .header-bar,
#page-ket-mock-result .header-bar,
#page-part5-cloze .header-bar,
#page-part5-cloze-result .header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 10px 14px;
  border: 1px solid rgba(88, 204, 2, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(56, 123, 39, 0.12);
}

#page-learn .back-btn,
#page-sentence .back-btn,
#page-listening .back-btn,
#page-listening-player .back-btn,
#page-writing .back-btn,
#page-writing-lesson .back-btn,
#page-speaking-library .back-btn,
#page-speaking .back-btn,
#page-ket-mock-library .back-btn,
#page-ket-mock .back-btn,
#page-ket-mock-result .back-btn,
#page-part5-cloze .back-btn,
#page-part5-cloze-result .back-btn {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  color: #168bd0;
  background: var(--child-sky);
  box-shadow: 0 5px 0 #bde6fb;
  font-size: 16px;
  font-weight: 1000;
}

#page-learn .progress-bar,
#page-sentence .progress-bar,
#page-speaking .progress-bar,
#page-part5-cloze .progress-bar {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce9d7;
}

#page-learn .progress-bar .fill,
#page-sentence .progress-bar .fill,
#page-speaking .progress-bar .fill,
#page-part5-cloze .progress-bar .fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--child-green), var(--child-blue));
}

.learn-flow-v2 {
  padding: clamp(12px, 1.8vw, 24px);
}

.learn-shell {
  display: grid;
  gap: 16px;
  width: min(100%, 1220px);
  margin: 0 auto;
}

.learn-topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 420px) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 10px 14px;
  border: 1px solid rgba(88, 204, 2, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 24px rgba(56, 123, 39, 0.12);
}

.learn-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.learn-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(180deg, #69df14, var(--child-green));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.36), 0 5px 0 var(--child-green-dark);
  font-size: 22px;
  font-weight: 1000;
}

.learn-brand strong,
.learn-brand small,
.learn-progress-meta span,
.learn-progress-meta strong {
  display: block;
}

.learn-brand strong {
  color: var(--child-ink);
  font-size: clamp(22px, 1.7vw, 28px);
  line-height: 1;
  font-weight: 1000;
}

.learn-brand small {
  margin-top: 4px;
  color: var(--child-green-dark);
  font-size: 13px;
  font-weight: 900;
}

.learn-progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--child-muted);
  font-size: 13px;
  font-weight: 900;
}

.learn-track {
  height: 13px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce9d7;
}

.learn-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--child-green), var(--child-blue));
}

.learn-exit,
.learn-primary,
.learn-secondary {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  font-weight: 1000;
  cursor: pointer;
}

.learn-exit,
.learn-secondary {
  color: #168bd0;
  background: var(--child-sky);
  box-shadow: 0 5px 0 #bde6fb;
}

.learn-exit {
  padding: 0 18px;
}

.learn-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.learn-card,
.learn-side-card {
  border: 1px solid rgba(88, 204, 2, 0.22);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 34px rgba(32, 112, 52, 0.14);
}

.learn-card {
  min-height: 520px;
  padding: clamp(20px, 3vw, 42px);
}

.learn-kicker {
  margin: 0 0 8px;
  color: #168bd0;
  font-size: 16px;
  font-weight: 1000;
  text-transform: uppercase;
}

.learn-word-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.learn-word-stack {
  container-type: inline-size;
  display: grid;
  align-content: start;
  gap: 12px;
  width: min(100%, 760px);
  min-width: 0;
}

.learn-word {
  margin: 0;
  color: var(--child-ink);
  max-width: 100%;
  font-size: clamp(54px, 17cqw, 88px);
  line-height: 1.12;
  font-weight: 1000;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.learn-emoji {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(88px, 12vw, 150px);
  height: clamp(88px, 12vw, 150px);
  border-radius: 50%;
  background: linear-gradient(180deg, #fff5d7, #ffe16d);
  box-shadow: inset 0 7px 0 rgba(255, 255, 255, 0.55), 0 12px 0 #e5b300;
  font-size: clamp(42px, 6vw, 76px);
}

.learn-phonetic {
  display: block;
  min-height: 1.35em;
  color: var(--child-muted);
  font-size: 24px;
  line-height: 1.35;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.learn-meaning-panel {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding: 22px;
  border: 2px solid #cfeac5;
  border-radius: 22px;
  background: #f7fff2;
}

.learn-meaning-panel strong {
  color: var(--child-green-dark);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
  font-weight: 1000;
}

.learn-meaning-panel p {
  margin: 0;
  color: var(--child-ink);
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.55;
  font-weight: 800;
}

.learn-example-cn {
  color: var(--child-muted);
}

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

.learn-primary {
  color: #fff;
  background: var(--child-green);
  box-shadow: 0 7px 0 var(--child-green-dark);
  font-size: 20px;
}

.learn-secondary {
  padding: 0 16px;
  font-size: 17px;
}

.learn-side {
  display: grid;
  gap: 16px;
}

.learn-side-card {
  padding: 20px;
}

.learn-side-card h2 {
  margin: 0 0 12px;
  color: var(--child-ink);
  font-size: 24px;
  font-weight: 1000;
}

.learn-side-card p,
.learn-side-card li {
  color: var(--child-muted);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 800;
}

.learn-side-card ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.learn-sound {
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: var(--child-blue);
  box-shadow: 0 6px 0 #168bd0;
  font-size: 18px;
  font-weight: 1000;
}

.learn-sound.speaking {
  filter: brightness(1.06);
  transform: translateY(3px);
  box-shadow: 0 3px 0 #168bd0;
}

.sentence-flow-v2 {
  padding: clamp(12px, 1.8vw, 24px);
}

.sentence-shell {
  width: min(100%, 1220px);
  margin: 0 auto;
}

.sentence-logo {
  background: linear-gradient(180deg, #a78bfa, var(--child-purple));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.36), 0 5px 0 #6d46d8;
}

.sentence-card {
  display: flex;
  flex-direction: column;
}

.sentence-main-text {
  margin: 12px 0 10px;
  color: var(--child-ink);
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 1.12;
  font-weight: 1000;
  letter-spacing: 0;
}

.sentence-cn-text {
  margin: 0;
  color: var(--child-muted);
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.45;
  font-weight: 900;
}

.sentence-sound {
  width: min(100%, 260px);
  margin-top: 22px;
}

.sentence-focus-panel {
  margin-top: auto;
}

.sentence-focus-panel strong {
  overflow-wrap: anywhere;
}

.sentence-focus-panel p {
  overflow-wrap: anywhere;
}

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

#page-listening .listening-summary,
#page-writing .listening-summary,
#page-speaking-library .speaking-summary,
#page-ket-mock-library .exam-hero,
#page-part5-cloze .exam-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid rgba(88, 204, 2, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 34px rgba(32, 112, 52, 0.14);
}

.listening-kicker,
.speaking-kicker {
  color: #168bd0;
  font-size: 14px;
  font-weight: 1000;
  text-transform: uppercase;
}

.listening-title,
.speaking-title {
  margin-top: 4px;
  color: var(--child-ink);
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.05;
  font-weight: 1000;
}

.listening-sub,
.speaking-sub,
.mock-note {
  color: var(--child-muted);
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.65;
  font-weight: 800;
}

.listening-ring,
.speaking-ring {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 9px solid #b8edff;
  color: #168bd0;
  background: #fff;
  box-shadow: 0 8px 0 #dff4ff;
  font-weight: 1000;
}

.listening-ring strong,
.speaking-ring strong {
  font-size: 30px;
  line-height: 1;
}

#page-listening .dash-section,
#page-writing .dash-section,
#page-speaking-library .dash-section {
  margin-top: 16px;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(88, 204, 2, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(32, 112, 52, 0.11);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--child-ink);
  font-size: 22px;
  font-weight: 1000;
}

.section-num,
.task-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(180deg, #48c6ff, var(--child-blue));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.32);
  font-weight: 1000;
}

.library-focus-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #d9edcf;
  border-radius: 20px;
  background: #f7fff2;
}

.library-focus-note strong,
.task-name {
  color: var(--child-ink);
  font-size: 18px;
  font-weight: 1000;
}

.library-focus-note span,
.task-desc {
  color: var(--child-muted);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
}

#page-listening .task-desc,
#page-writing .task-desc,
#page-speaking-library .task-desc,
#page-ket-mock-library .mock-card span {
  color: #50645b !important;
}

.library-focus-note .btn {
  grid-row: span 2;
}

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

.task-card,
.mock-card,
.writing-level-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 16px;
  border: 2px solid #d9edcf;
  border-radius: 22px;
  color: var(--child-ink);
  background: #fff;
  box-shadow: 0 6px 0 #dcefd3;
  cursor: pointer;
}

.task-card:hover,
.mock-card:hover,
.writing-level-card:hover {
  transform: translateY(-1px);
  border-color: rgba(88, 204, 2, 0.55);
}

.listening-route-page .header-bar span {
  color: #6c7f75 !important;
  font-weight: 900;
}

.listening-route-page .listening-summary {
  min-height: 148px;
}

.listening-route-page .listening-title {
  font-size: clamp(34px, 4vw, 56px);
}

.route-meter {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 108px;
  min-height: 82px;
  padding: 12px 18px;
  border: 2px solid #ccefc0;
  border-radius: 20px;
  color: var(--child-green-dark);
  background: #f7fff2;
  box-shadow: 0 6px 0 #dcefd3;
  font-weight: 1000;
}

.route-meter strong {
  font-size: 24px;
  line-height: 1;
}

.route-meter span {
  margin-top: 6px;
  color: #607469;
  font-size: 13px;
}

.listening-route-page .dash-section {
  padding: clamp(18px, 2vw, 26px);
}

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

.route-listening-card {
  width: 100%;
  min-height: 132px;
  text-align: left;
  font: inherit;
}

.route-listening-card .task-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #168bd0;
  background: #eaf8ff;
  box-shadow: inset 0 0 0 2px #b8edff, 0 4px 0 #dff4ff;
  font-size: 24px;
}

.route-listening-card .task-name {
  font-size: 22px;
}

.route-listening-card .task-desc {
  margin-top: 4px;
  color: #607469 !important;
  font-size: 16px;
}

.route-listening-quiz {
  width: min(920px, 100%);
  margin: clamp(16px, 3vw, 28px) auto 0;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid rgba(88, 204, 2, 0.22);
  border-radius: 24px;
  color: var(--child-ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(32, 112, 52, 0.12);
}

.route-player-progress {
  color: #8aa0b8;
  font-size: 18px;
  font-weight: 900;
}

.route-question-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(18px, 3vw, 30px);
}

.route-question-top span {
  color: var(--child-ink);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  font-weight: 1000;
}

.route-question-top strong {
  display: inline-grid;
  place-items: center;
  min-width: 72px;
  height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  color: #168bd0;
  background: #eaf8ff;
  font-size: 20px;
  font-weight: 1000;
}

.route-play-title {
  margin-bottom: 18px;
  color: var(--child-ink);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.2;
  font-weight: 1000;
}

.route-play-round {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 10px;
  padding: 0 16px;
  border: 2px solid #b9e7ff;
  border-radius: 999px;
  color: #116fa7;
  background: #eaf8ff;
  font-size: 18px;
  font-weight: 1000;
}

.route-play-hint {
  margin-bottom: 16px;
  color: #4b6354;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 800;
}

.route-play-button,
.route-replay-button {
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-height: 94px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  background: var(--child-green);
  box-shadow: 0 7px 0 var(--child-green-dark);
  font: inherit;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 1000;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.route-replay-button {
  min-height: 62px;
  width: auto;
  min-width: 132px;
  margin-bottom: 8px;
  padding: 0 28px;
  font-size: 22px;
}

.route-play-button:hover,
.route-replay-button:hover {
  transform: translateY(-2px);
}

.route-play-button:active,
.route-replay-button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 var(--child-green-dark);
}

.route-play-button:disabled,
.route-replay-button:disabled {
  cursor: progress;
  opacity: 0.72;
  transform: none;
}

.route-play-count {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.route-play-count span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #ccefc0;
  border-radius: 50%;
  color: #607469;
  background: #f7fff2;
  font-weight: 1000;
}

.route-play-count span.done {
  border-color: var(--child-green);
  color: #fff;
  background: var(--child-green);
}

.route-play-count span.active {
  border-color: #168bd0;
  color: #168bd0;
  background: #eaf8ff;
}

.route-play-count span.waiting {
  border-color: #ffb02e;
  color: #8a5400;
  background: #fff4d7;
}

.route-listening-options {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.route-listening-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 14px 16px;
  border: 2px solid #d9edcf;
  border-radius: 18px;
  color: var(--child-ink);
  background: #fff;
  box-shadow: 0 5px 0 #dcefd3;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.route-listening-option span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #168bd0;
  background: #eaf8ff;
  font-weight: 1000;
}

.route-listening-option strong {
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.35;
  font-weight: 1000;
}

.route-listening-option:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  border-color: #d9edcf !important;
  color: var(--child-ink);
  background: #fff !important;
  box-shadow: 0 5px 0 #dcefd3 !important;
  outline: 0;
}

.route-listening-option:disabled:hover,
.route-listening-option:disabled:focus,
.route-listening-option:disabled:focus-visible {
  border-color: #d9edcf !important;
  background: #fff !important;
  box-shadow: 0 5px 0 #dcefd3 !important;
  outline: 0;
}

.route-listening-option.correct:disabled,
.route-listening-option.correct:disabled:hover,
.route-listening-option.correct:disabled:focus,
.route-listening-option.correct:disabled:focus-visible {
  border-color: var(--child-green) !important;
  background: #f2ffec !important;
  box-shadow: 0 5px 0 #cdeec3 !important;
}

.route-listening-option.wrong:disabled,
.route-listening-option.wrong:disabled:hover,
.route-listening-option.wrong:disabled:focus,
.route-listening-option.wrong:disabled:focus-visible {
  border-color: #ff6b6b !important;
  background: #fff4f4 !important;
  box-shadow: 0 5px 0 #ffd7d7 !important;
}

.route-listening-option.selected {
  border-color: var(--child-blue);
}

.route-listening-option.correct {
  border-color: var(--child-green);
  background: #f2ffec;
}

.route-listening-option.wrong {
  border-color: #ff6b6b;
  background: #fff4f4;
}

.route-listening-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 1000;
}

.route-listening-feedback.correct {
  color: var(--child-green-dark);
  background: #e8fbdf;
}

.route-listening-feedback.wrong {
  color: #d64545;
  background: #fff1f1;
}

.route-answer-review {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: clamp(16px, 2.2vw, 24px);
  border: 2px solid #d7e8f5;
  border-radius: 20px;
  color: var(--child-ink);
  background: #f8fbff;
}

.route-answer-review.correct {
  border-color: #bee8b1;
  background: #f5fff0;
}

.route-answer-review.wrong {
  border-color: #ffd0d0;
  background: #fff8f8;
}

.route-answer-review-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.route-answer-review-top strong {
  display: block;
  color: var(--child-ink);
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.25;
  font-weight: 1000;
}

.route-answer-review-top p {
  margin: 6px 0 0;
  color: #6d7f73;
  font-size: 15px;
  font-weight: 900;
}

.route-answer-status {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: #168bd0;
  font-size: 13px;
  font-weight: 1000;
  white-space: nowrap;
}

.route-answer-review.correct .route-answer-status {
  background: var(--child-green);
}

.route-answer-review.wrong .route-answer-status {
  background: #ff6b6b;
}

.route-answer-note,
.route-answer-tip {
  padding: 12px 14px;
  border-radius: 14px;
  color: #344237;
  background: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.65;
  font-weight: 800;
}

.route-answer-block {
  display: grid;
  gap: 10px;
}

.route-answer-heading {
  color: #607469;
  font-size: 14px;
  font-weight: 1000;
}

.route-answer-transcript {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dbe8f3;
  border-radius: 14px;
  background: #fff;
}

.route-answer-transcript p {
  margin: 0;
  color: #243126;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.55;
  font-weight: 800;
}

.route-answer-transcript b {
  color: #168bd0;
}

.route-answer-options-review {
  display: grid;
  gap: 10px;
}

.route-answer-option-review {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #dfe8d8;
  border-radius: 14px;
  background: #fff;
}

.route-answer-option-review.correct {
  border-color: #b8e9aa;
  background: #f7fff2;
}

.route-answer-option-review.wrong.selected {
  border-color: #ffc1c1;
  background: #fff3f3;
}

.route-answer-option-letter {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #168bd0;
  background: #eaf8ff;
  font-weight: 1000;
}

.route-answer-option-review.correct .route-answer-option-letter {
  color: #fff;
  background: var(--child-green);
}

.route-answer-option-review.wrong.selected .route-answer-option-letter {
  color: #fff;
  background: #ff6b6b;
}

.route-answer-option-copy {
  min-width: 0;
}

.route-answer-option-copy strong {
  display: block;
  color: var(--child-ink);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 1000;
}

.route-answer-option-copy p {
  margin: 5px 0 0;
  color: #526357;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 800;
}

.task-info {
  min-width: 0;
}

.task-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--child-green-dark);
  background: #e8fbdf;
  font-size: 13px;
  font-weight: 1000;
}

.badge-done {
  color: #fff;
  background: var(--child-green);
}

.badge-review {
  color: #168bd0;
  background: #eaf8ff;
}

.listening-player-head,
.listening-audio-panel,
.listening-practice-card,
.speaking-topic-head,
.speaking-question-card,
.speaking-timer-card,
.speaking-recorder-card,
.speaking-answer-card,
.speaking-ai-card,
.speaking-score-card,
.exam-text-card,
.exam-feedback-card,
.mock-section,
.rank-display,
.result-summary {
  margin-top: 16px;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(88, 204, 2, 0.22);
  border-radius: 22px;
  color: var(--child-ink);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 28px rgba(32, 112, 52, 0.11);
}

.listening-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.listening-steps div {
  min-height: 86px;
  padding: 14px;
  border-radius: 20px;
  background: #f7fff2;
  border: 1px solid #d9edcf;
}

.listening-steps strong {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 8px;
  border-radius: 50%;
  color: #fff;
  background: var(--child-green);
}

.listening-steps span,
.listening-practice-title,
.speaking-card-label,
.mock-section-title {
  color: var(--child-ink);
  font-size: 18px;
  font-weight: 1000;
}

.listening-speed-row,
.speaking-actions,
.speaking-score-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.btn,
.mock-option,
.placement-option {
  min-height: 44px;
  border-radius: 16px;
  font-weight: 1000;
}

.btn-primary {
  border: 0;
  color: #fff;
  background: var(--child-green);
  box-shadow: 0 5px 0 var(--child-green-dark);
}

.btn-success {
  border: 0;
  color: #fff;
  background: var(--child-green);
  box-shadow: 0 5px 0 var(--child-green-dark);
}

.btn-ghost {
  border: 0;
  color: #168bd0;
  background: var(--child-sky);
  box-shadow: 0 5px 0 #bde6fb;
}

audio,
.listening-input,
.listening-textarea,
.writing-draft,
.speaking-draft,
.cloze-input {
  width: 100%;
  border: 2px solid #d9edcf;
  border-radius: 18px;
  color: var(--child-ink);
  background: #fff;
  font: inherit;
  font-weight: 800;
}

textarea,
.listening-textarea,
.writing-draft,
.speaking-draft {
  min-height: 120px;
  padding: 14px;
  line-height: 1.6;
}

.mock-card {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
}

.mock-card strong {
  color: var(--child-ink);
  font-size: 20px;
  font-weight: 1000;
}

.mock-card span {
  color: var(--child-muted);
  line-height: 1.45;
  font-weight: 800;
}

.mock-question {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d9edcf;
  border-radius: 18px;
  background: #f7fff2;
}

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

.mock-option {
  border: 2px solid #d9edcf;
  color: var(--child-ink);
  background: #fff;
}

.mock-option.selected {
  border-color: var(--child-blue);
  background: #eaf8ff;
}

@media (max-width: 900px) {
  .learn-topbar,
  .learn-grid {
    grid-template-columns: 1fr;
  }

  .learn-exit {
    width: 100%;
  }

  .task-grid,
  .mock-grid,
  .mock-options {
    grid-template-columns: 1fr;
  }

  .route-task-grid {
    grid-template-columns: 1fr;
  }

  .route-question-top {
    align-items: flex-start;
  }

  .route-question-top span {
    font-size: 36px;
  }

  .route-play-button {
    min-height: 78px;
  }

  .library-focus-note {
    grid-template-columns: 1fr;
  }

  .library-focus-note .btn {
    grid-row: auto;
  }

  .listening-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  #page-learn,
  #page-sentence,
  #page-listening,
  #page-listening-player,
  #page-writing,
  #page-writing-lesson,
  #page-speaking-library,
  #page-speaking,
  #page-ket-mock-library,
  #page-ket-mock,
  #page-ket-mock-result,
  #page-part5-cloze,
  #page-part5-cloze-result,
  .learn-flow-v2 {
    padding: 10px;
  }

  .learn-card {
    min-height: auto;
  }

  .learn-word-row {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .learn-word-stack {
    width: 100%;
  }

  .learn-word {
    font-size: clamp(44px, 18cqw, 64px);
    line-height: 1.12;
  }

  .learn-phonetic {
    font-size: 20px;
  }

  .learn-actions {
    grid-template-columns: 1fr;
  }

  .sentence-main-text {
    font-size: clamp(30px, 10vw, 42px);
  }

  .task-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .task-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  #page-listening .listening-summary,
  #page-writing .listening-summary,
  #page-speaking-library .speaking-summary,
  #page-ket-mock-library .exam-hero,
  #page-part5-cloze .exam-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-meter {
    width: 100%;
    min-height: 64px;
  }
  #page-learn .header-bar,
  #page-sentence .header-bar,
  #page-listening .header-bar,
  #page-listening-player .header-bar,
  #page-writing .header-bar,
  #page-writing-lesson .header-bar,
  #page-speaking-library .header-bar,
  #page-speaking .header-bar,
  #page-ket-mock-library .header-bar,
  #page-ket-mock .header-bar,
  #page-ket-mock-result .header-bar,
  #page-part5-cloze .header-bar,
  #page-part5-cloze-result .header-bar {
    min-height: 58px;
    padding: 8px 10px;
    border-radius: 18px;
  }
  .listening-title,
  .speaking-title {
    font-size: 30px;
  }
  .task-card,
  .mock-card,
  .writing-level-card {
    min-height: 92px;
    border-radius: 18px;
  }
}
