@charset "UTF-8";
:root {
  --paper: #edf2e7;
  --ink: #324c3d;
  --muted: #686e5e;
  --green: #476b51;
  --green-dark: #34523e;
  --sage: #e4ebd9;
  --line: #dfdfce;
  --peach: #f2e1d1;
  --ochre: #c89c53;
  --white: #fffdf6;
  --shadow: 0 8px 24px #4d58300a;
  --body: 'Word Sprout Sans', 'Word Sprout Kai', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --book: 'Word Sprout Kai', 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a,
label {
  touch-action: manipulation;
}
button {
  color: inherit;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button,
a,
input {
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #b87935;
}
svg {
  display: block;
}
p,
h1,
h2,
h3 {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 650;
  line-height: 1.35;
}
h1 {
  font-size: 32px;
  letter-spacing: 1px;
}
h2 {
  font-size: 20px;
}
p {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.art {
  width: 100%;
  height: auto;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 16px;
  transform: translateY(-160%);
  z-index: 10;
  padding: 10px 20px;
  background: var(--green);
  color: white;
}
.skip-link:focus {
  transform: translateY(0);
}
.boot {
  padding: 80px;
  text-align: center;
}
.app-shell {
  max-width: 1440px;
  margin: auto;
  padding: 0 48px;
}
.site-header {
  height: 102px;
  display: flex;
  align-items: center;
  gap: 38px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand > span {
  font-family: var(--book);
  font-size: 27px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 2px;
}
.brand small {
  font-family: var(--body);
  display: block;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 7px;
  color: var(--muted);
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: auto;
}
.site-header nav a,
.site-header nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  padding: 11px 19px;
  border-radius: 12px;
  min-height: 48px;
  white-space: nowrap;
  font-size: 15px;
  color: #767d6d;
}
.site-header nav [aria-current='page'] {
  background: var(--sage);
  color: var(--green-dark);
  font-weight: 600;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-button {
  background: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--sage);
}
.parent-button {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid #cfd3c1;
  border-radius: 22px;
  min-height: 44px;
  padding: 8px 14px;
  white-space: nowrap;
  font-size: 13px;
}
.parent-button .icon {
  width: 17px;
  height: 17px;
}
.main {
  padding: 34px 0 25px;
  min-height: calc(100svh - 164px);
}
.main:focus {
  outline: none;
}
.main.narrow {
  max-width: 1060px;
  margin: auto;
}
.welcome-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  color: #7d896b;
  margin-bottom: 8px;
}
.welcome-row h1 {
  font-family: var(--book);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 2px;
}
.welcome-row p {
  margin-top: 7px;
  font-size: 13px;
}
.growing-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #757d66;
  font-size: 12px;
}
.growing-note .art {
  width: 47px;
  height: 47px;
}
.growing-note strong {
  font-size: 17px;
  color: var(--green);
}
.explore-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 20px;
}
.town-map {
  position: relative;
  overflow: hidden;
  border: 1px solid #cdd6be;
  border-radius: 24px;
  background: #d9e1be;
  min-height: 380px;
}
.town-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  object-position: center;
}
.map-note {
  position: absolute;
  left: 24px;
  top: 20px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #5b6d50;
}
.map-note > span {
  font-size: 11px;
  color: #77866b;
  letter-spacing: 0;
}
.map-stop {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid #cbd2b9;
  border-radius: 13px;
  box-shadow: 0 5px 0 #5e78551c;
  font-size: 15px;
  font-weight: 600;
  min-height: 47px;
  white-space: nowrap;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.map-stop .icon {
  width: 18px;
  height: 18px;
}
.map-stop > span {
  color: #a49f7b;
  margin-left: 3px;
}
.map-stop:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #5e78551c;
}
.shop-stop {
  left: 16%;
  top: 57%;
}
.post-stop {
  left: 57%;
  top: 43%;
}
.story-stop {
  right: 3%;
  bottom: 10%;
}
.map-caption {
  position: absolute;
  bottom: 15px;
  left: 20px;
  font-size: 10px;
  color: #718563;
  letter-spacing: 1px;
}
.today-note {
  position: relative;
  background: #f2eddc;
  border: 1px solid #dfd7bc;
  border-radius: 9px 22px 22px 9px;
  padding: 30px 24px 21px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.today-note:before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 9px;
  border-left: 1px dashed #d0c6aa;
}
.note-tab {
  font-size: 10px;
  letter-spacing: 2px;
  background: #e9dbb5;
  padding: 4px 11px;
  border-radius: 0 0 7px 7px;
  position: absolute;
  left: 24px;
  top: 0;
  color: #8b754a;
}
.note-bear {
  position: absolute;
  width: 83px;
  right: 3px;
  top: 43px;
  transform: rotate(7deg);
}
.today-note .eyebrow {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 1px;
  position: relative;
}
.today-note h2 {
  font-family: var(--book);
  font-size: 32px;
  line-height: 1.45;
  letter-spacing: 2px;
  position: relative;
}
.today-note p {
  font-size: 13px;
  line-height: 1.9;
  margin-top: 7px;
}
.mini-letters {
  display: flex;
  gap: 9px;
  margin: 17px 0 19px;
}
.mini-letters span {
  font-family: var(--book);
  font-size: 23px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 46px;
  border: 1px solid #d8ceb1;
  border-radius: 6px;
  background: #fcf8e9;
  box-shadow: 0 3px 0 #e0d8c1;
}
.today-note > .button {
  width: 100%;
  font-size: 13px;
  min-height: 47px;
  padding: 10px 8px;
  gap: 5px;
}
.today-note > small {
  display: block;
  font-size: 10px;
  color: #8b896f;
  text-align: center;
  margin-top: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 49px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.35;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button:hover:not(:disabled) {
  transform: translateY(-1px);
}
.button.primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 3px 0 #314b3a;
}
.button.primary:hover:not(:disabled) {
  background: var(--green-dark);
}
.button.quiet {
  background: #eeeddf;
  color: var(--ink);
  border-color: #dddecc;
}
.button.quiet:hover {
  background: #e4e8d7;
}
.button:disabled {
  box-shadow: none;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 14px;
}
.section-heading h2 {
  font-family: var(--book);
  font-size: 21px;
}
.section-heading > span {
  font-size: 11px;
  color: var(--muted);
}
.trail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.trail {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  min-height: 133px;
  padding: 17px 23px;
  border: 1px solid #d7ddc7;
  border-radius: 16px;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.trail:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.trail-green {
  background: #e9eddd;
}
.trail-peach {
  background: #f1e5d7;
  border-color: #e2d6c3;
}
.trail-icon {
  width: 86px;
  flex-shrink: 0;
}
.trail > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.trail small {
  font-size: 10px;
  letter-spacing: 2px;
  color: #6b7b5d;
}
.trail strong {
  font-family: var(--book);
  font-size: 23px;
  letter-spacing: 0.5px;
}
.trail > span > span {
  font-size: 11px;
  color: #787d69;
}
.trail > .icon {
  width: 19px;
  color: #808c71;
}
.home-footnote {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #8a8b75;
  margin-top: 25px;
}
.home-footnote > .icon {
  width: 15px;
  height: 15px;
}
.site-footer {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 22px;
  font-size: 10px;
  color: #929380;
  letter-spacing: 0.6px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 14px;
  color: #758067;
}
.lesson-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.lesson-top > span:nth-child(2) {
  text-align: center;
}
.lesson-top i {
  color: #b8baa5;
  margin: 0 9px;
}
.step-count {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.progress-track {
  height: 6px;
  border-radius: 6px;
  background: #e4e5d4;
  overflow: hidden;
  margin-bottom: 22px;
}
.progress-track > span {
  display: block;
  height: 100%;
  background: #94ab77;
  transition: width 0.25s;
}
.lesson-stage {
  background: var(--white);
  border: 1px solid #dfdfcb;
  border-radius: 24px;
  padding: 28px 40px 25px;
  box-shadow: var(--shadow);
}
.lesson-heading {
  text-align: center;
  position: relative;
  padding: 0 45px 24px;
}
.lesson-heading h1 {
  font-family: var(--book);
  font-size: 29px;
}
.lesson-heading p {
  font-size: 13px;
  margin-top: 7px;
}
.lesson-heading .eyebrow {
  font-size: 10px;
}
.read-prompt {
  position: absolute;
  right: 0;
  top: 11px;
  background: #edf0e4;
  color: #647e59;
}
.learning-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 34px;
  max-width: 730px;
  margin: 0 auto;
  min-height: 290px;
}
.character-board {
  position: relative;
  text-align: center;
  background: #f6f2e3;
  border: 1px solid #e0d9bf;
  border-radius: 18px;
  min-height: 285px;
  padding: 14px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.character-board:before,
.character-board:after {
  content: '';
  position: absolute;
  z-index: -1;
  opacity: 0.6;
  border-color: #d8cbaa;
}
.character-board:before {
  left: 50%;
  top: 15px;
  bottom: 70px;
  border-left: 1px dashed #d8cbaa;
}
.character-board:after {
  left: 20px;
  right: 20px;
  top: 40%;
  border-top: 1px dashed #d8cbaa;
}
.pinyin-label {
  font-family: var(--book);
  font-size: 25px;
  color: #827d62;
  letter-spacing: 2px;
  line-height: 1.5;
}
.big-character {
  font-family: var(--book);
  font-weight: 400;
  font-size: 140px;
  line-height: 1.25;
  color: #3d5743;
}
.audio-button {
  min-height: 43px;
  padding: 9px 16px;
  font-size: 13px;
  background: #e8e8d7;
  border: 1px solid #d7d6bc;
  color: #65794f;
}
.audio-button .icon {
  width: 17px;
  height: 17px;
}
.meaning-scene {
  text-align: center;
}
.meaning-scene .large-art {
  width: 185px;
  max-width: 100%;
  height: 185px;
  margin: auto;
}
.meaning-scene h3,
.meaning-scene h1 {
  font-family: var(--book);
  font-size: 26px;
  margin: 7px 0;
}
.meaning-scene p {
  font-size: 13px;
  max-width: 240px;
  margin: 0 auto;
}
.meaning-scene .button {
  margin-top: 20px;
}
.lesson-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 65px;
  border-top: 1px solid #e8e5d5;
  margin-top: 25px;
  padding-top: 20px;
}
.feedback {
  font-size: 13px;
  max-width: 70%;
}
.success-text {
  color: var(--green);
  font-weight: 600;
}
.next-button {
  flex-shrink: 0;
  min-width: 140px;
}
.order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  margin: 0 auto 20px;
  color: #8a8367;
  font-size: 12px;
}
.order-character {
  font-family: var(--book);
  font-size: 79px;
  line-height: 1.4;
  min-width: 110px;
  text-align: center;
  background: #f5efdb;
  border: 1px solid #e5d9b6;
  border-radius: 9px;
  color: var(--ink);
  font-weight: 400;
}
.options {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.option {
  background: #f3f2e8;
  border: 2px solid #dfdfce;
  border-radius: 16px;
  min-width: 130px;
  min-height: 120px;
  transition:
    background 0.15s,
    border-color 0.15s;
  position: relative;
}
.option:hover:not(:disabled) {
  background: #e7eddb;
  border-color: #839c72;
}
.option:disabled {
  opacity: 0.75;
}
.picture-option {
  padding: 8px 14px;
  flex: 1;
  max-width: 180px;
  aspect-ratio: 1.1;
}
.picture-option .art {
  width: 100%;
  height: auto;
}
.letter-option {
  font-family: var(--book);
  font-size: 67px;
  width: 160px;
  min-height: 140px;
}
.listen-orb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 170px;
  margin: 0 auto 25px;
  padding: 18px 20px;
  color: var(--green);
  background: #edf0e0;
  border: 1px solid #dae0c6;
  border-radius: 22px;
}
.listen-orb .icon {
  width: 42px;
  height: 42px;
}
.listen-orb > span {
  font-size: 13px;
}
.syllable-parts {
  display: flex;
  align-items: center;
  gap: 17px;
  font-family: var(--book);
  font-size: 56px;
  line-height: 1.5;
  color: #6c7f5a;
}
.plus {
  font-size: 25px;
  color: #a8a58a;
}
.syllable-full {
  font:
    75px/1.5 Georgia,
    serif;
  margin-bottom: 10px;
}
.pinyin-board:before,
.pinyin-board:after {
  display: none;
}
.syllable-options {
  max-width: 550px;
  margin: auto;
}
.syllable-option {
  flex: 1;
  min-height: 160px;
  max-width: 225px;
  font:
    53px/1.4 Georgia,
    serif;
  padding: 10px 20px 20px;
}
.syllable-option .art {
  width: 80px;
  height: 70px;
  margin: 0 auto;
}
.syllable-option > span {
  display: block;
}
.door-option {
  border-radius: 60px 60px 8px 8px;
  background: #efe3cc;
  border-color: #d5c5a1;
  min-height: 180px;
  padding-top: 28px;
}
.door-number {
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 3px;
  color: #938463;
  margin-bottom: 8px;
}
.story-scene {
  text-align: center;
  position: relative;
  min-height: 315px;
  background: #f0efdf;
  border-radius: 17px;
  padding: 18px;
}
.story-art {
  width: 180px;
  height: 180px;
  margin: auto;
}
.story-text {
  font-family: var(--book);
  font-size: 31px;
  margin-top: 5px;
  letter-spacing: 3px;
}
.story-text button {
  font-family: inherit;
  font-size: inherit;
  border-radius: 8px;
  background: #dde7cd;
  min-width: 48px;
  min-height: 48px;
  padding: 0 8px;
  border-bottom: 2px solid #9bb789;
}
.story-scene p {
  font-size: 12px;
  margin: 11px 0;
}
.story-scene > .button {
  font-size: 12px;
  min-height: 40px;
  padding: 7px 15px;
}
.story-scene .icon {
  width: 17px;
  height: 17px;
}
.story-page {
  position: absolute;
  bottom: 15px;
  right: 20px;
  font-size: 10px;
  color: #8f917b;
}
.completion {
  text-align: center;
  padding: 25px 25px 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  position: relative;
  margin: 25px auto;
  max-width: 700px;
}
.completion-art {
  width: 145px;
  height: 145px;
  margin: 0 auto 12px;
}
.completion-seal {
  position: absolute;
  right: 35px;
  top: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9edd7;
  color: #6c8556;
  transform: rotate(-12deg);
}
.completion h1 {
  font-family: var(--book);
  font-size: 32px;
}
.completion p {
  font-size: 13px;
  margin: 12px 0 20px;
}
.completion-letters {
  display: flex;
  justify-content: center;
  gap: 15px;
}
.completion-letters button {
  font-family: var(--book);
  font-size: 34px;
  background: #f1efdf;
  border: 1px solid #dcd6b9;
  border-radius: 10px;
  padding: 9px 17px;
  min-height: 65px;
}
.rest-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #85916e;
  padding: 24px 0;
}
.rest-note .icon {
  width: 18px;
  height: 18px;
}
.button-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.page-heading {
  margin: 18px 0 30px;
}
.page-heading h1 {
  font-family: var(--book);
  font-size: 32px;
}
.page-heading p {
  font-size: 13px;
  margin-top: 9px;
}
.word-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1000px;
  margin: 0 auto 30px;
}
.word-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px 20px 0;
  border: 1px solid #d9d8c2;
  background: #fffaf0;
  border-radius: 18px;
  box-shadow: 0 5px 0 #e4dfcc;
  transition: transform 0.15s;
}
.word-card:hover {
  transform: translateY(-4px);
}
.word-status {
  font-size: 10px;
  background: #e5ebd7;
  color: #70815b;
  border-radius: 5px;
  padding: 3px 8px;
  align-self: flex-start;
  letter-spacing: 1px;
}
.word-card strong {
  font-family: var(--book);
  font-size: 100px;
  line-height: 1.5;
  font-weight: 400;
}
.word-pinyin {
  font-family: var(--book);
  color: #898668;
  font-size: 22px;
  margin-bottom: 22px;
}
.word-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e6e0c9;
  width: 100%;
  padding: 14px 0;
  font-size: 13px;
  color: #7d8069;
}
.word-bottom .icon {
  width: 17px;
  height: 17px;
}
.empty-state {
  text-align: center;
  max-width: 650px;
  padding: 55px 25px;
  margin: auto;
}
.empty-state .art {
  width: 145px;
  height: 145px;
  margin: 0 auto 20px;
}
.empty-state h1,
.empty-state h2 {
  font-family: var(--book);
  font-size: 29px;
}
.empty-state p {
  margin: 12px 0 25px;
  font-size: 14px;
}
.single-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 38px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  margin: 20px 0;
}
.review-board {
  background: #fcf9ed;
  border: 1px solid #dfd9c1;
  border-radius: 20px;
  padding: 30px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.review-board .big-character {
  font-size: 135px;
}
.review-board .button {
  font-size: 12px;
  min-height: 42px;
}
.review-actions {
  margin-top: 25px;
}
.small-note {
  font-size: 12px;
  text-align: center;
  margin: 20px auto;
  max-width: 600px;
}
.revealed-answer {
  font-size: 18px;
  margin-bottom: 15px;
}
.parent-summary {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #eeefdf;
  margin: 20px 0 30px;
}
.parent-summary > div {
  flex: 1;
  text-align: center;
  padding: 22px 15px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.parent-summary > div + div {
  border-left: 1px solid var(--line);
}
.parent-summary strong {
  font:
    34px/1.3 Georgia,
    serif;
}
.parent-summary span {
  font-size: 12px;
  color: #7c8169;
}
.parent-section {
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}
.parent-section h2 {
  font-family: var(--book);
  font-size: 23px;
  margin-bottom: 14px;
}
.parent-section .section-heading {
  margin: 0 0 10px;
}
.parent-section .section-heading h2 {
  margin: 0;
}
.parent-section p {
  font-size: 13px;
  line-height: 1.95;
  margin: 10px 0 18px;
  max-width: 850px;
}
.text-button {
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 13px;
  min-height: 44px;
  padding: 5px;
}
.text-button .icon {
  width: 17px;
}
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 850px;
}
.progress-list > div {
  display: flex;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 12px 5px;
  font-size: 13px;
}
.progress-list strong {
  font-family: var(--book);
  font-size: 31px;
  min-width: 39px;
  text-align: center;
  font-weight: 400;
}
.progress-list > div > span:last-child {
  margin-left: auto;
  font-size: 12px;
  color: #768262;
  background: #e9eddc;
  border-radius: 5px;
  padding: 4px 9px;
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 850px;
  cursor: pointer;
}
.setting-row > span {
  flex: 1;
}
.setting-row strong {
  font-size: 14px;
  font-weight: 500;
}
.setting-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.9;
}
.setting-row input {
  accent-color: var(--green);
  width: 27px;
  height: 27px;
}
.parent-section > .button-row {
  justify-content: flex-start;
}
.file-button {
  cursor: pointer;
  position: relative;
}
.file-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-button:focus-within {
  outline: 3px solid #b87935;
  outline-offset: 4px;
}
.import-preview {
  margin-top: 20px;
  padding: 20px;
  background: #e9eddc;
  border: 1px solid #cdd8b7;
  border-radius: 12px;
}
.import-preview strong {
  font-size: 15px;
}
.import-preview p {
  margin-bottom: 15px;
}
.import-preview .button-row {
  justify-content: flex-start;
}
.about-section a {
  font-size: 12px;
  text-decoration: underline;
  color: #6f825e;
  margin-right: 20px;
}
.error-text {
  color: #a44732;
  font-size: 13px;
  min-height: 18px;
}
.storage-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  background: #f7e6cd;
  padding: 12px 15px;
  border-radius: 8px;
  margin-top: 16px;
}
.storage-warning button {
  background: #e7ceaa;
  border-radius: 7px;
  padding: 8px;
}
.site-footer a {
  text-decoration: underline;
}
dialog {
  border: 1px solid #d9d5bb;
  border-radius: 22px;
  max-width: 450px;
  width: calc(100% - 36px);
  padding: 30px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 30px 90px #263d3526;
}
dialog::backdrop {
  background: #30453855;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-family: var(--book);
  font-size: 27px;
}
dialog p {
  font-size: 13px;
  margin: 12px 0 18px;
}
dialog label {
  display: block;
  font-size: 13px;
  margin-bottom: 7px;
}
dialog input {
  width: 100%;
  height: 52px;
  padding: 10px 15px;
  border: 1px solid #cbcdb7;
  border-radius: 9px;
  background: #f7f4e8;
  color: var(--ink);
  font-size: 22px;
}
dialog .error-text {
  margin: 9px 0;
}
dialog .button-row {
  justify-content: flex-end;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  width: max-content;
  background: #3e5546;
  color: #fffdf3;
  border-radius: 13px;
  box-shadow: 0 10px 40px #2c463c22;
  padding: 13px 20px;
  font-size: 13px;
  z-index: 30;
}
@media (min-width: 1440px) {
  .town-map {
    min-height: 435px;
  }
  .town-image {
    min-height: 435px;
  }
  .today-note {
    padding-top: 43px;
  }
  .today-note h2 {
    font-size: 35px;
  }
  .today-note p {
    margin-top: 12px;
  }
  .mini-letters {
    margin: 22px 0 25px;
  }
  .note-bear {
    top: 67px;
  }
}
@media (max-width: 1100px) {
  .app-shell {
    padding: 0 28px;
  }
  .site-header {
    gap: 15px;
  }
  .site-header nav {
    gap: 0;
  }
  .site-header nav a,
  .site-header nav button {
    padding: 10px 13px;
    font-size: 13px;
  }
  .brand > span {
    font-size: 24px;
  }
  .header-tools {
    gap: 5px;
  }
  .explore-layout {
    grid-template-columns: minmax(0, 1fr) 215px;
    gap: 15px;
  }
  .today-note {
    padding: 30px 18px 20px;
  }
  .today-note h2 {
    font-size: 29px;
  }
  .town-map,
  .town-image {
    min-height: 375px;
  }
  .town-image {
    object-fit: cover;
  }
  .map-stop {
    font-size: 13px;
    padding: 10px;
  }
  .map-stop .icon {
    width: 16px;
    height: 16px;
  }
  .shop-stop {
    left: 8%;
    top: 58%;
  }
  .post-stop {
    left: 50%;
    top: 41%;
  }
  .story-stop {
    right: 2%;
    bottom: 11%;
  }
  .trail {
    padding: 16px;
    gap: 13px;
  }
  .trail-icon {
    width: 67px;
  }
  .trail strong {
    font-size: 20px;
  }
  .trail > span > span {
    font-size: 10px;
  }
  .welcome-row h1 {
    font-size: 32px;
  }
  .growing-note {
    max-width: 185px;
    font-size: 11px;
  }
}
@media (max-width: 800px) {
  .app-shell {
    padding: 0 22px;
  }
  .site-header {
    height: 92px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0;
    padding-top: 12px;
    padding-bottom: 0;
  }
  .brand {
    align-self: flex-start;
  }
  .brand img {
    width: 37px;
    height: 37px;
  }
  .brand > span {
    font-size: 24px;
  }
  .brand small {
    font-size: 9px;
    letter-spacing: 1px;
    margin-top: 5px;
  }
  .site-header nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 30px;
    height: 39px;
  }
  .site-header nav a,
  .site-header nav button {
    font-size: 12px;
    padding: 6px 12px;
    min-height: 33px;
    border-radius: 9px;
    gap: 7px;
  }
  .site-header nav .icon {
    width: 17px;
    height: 17px;
  }
  .header-tools {
    align-self: flex-start;
    margin-top: -2px;
  }
  .parent-button {
    min-height: 37px;
    font-size: 12px;
    padding: 7px 12px;
  }
  .icon-button {
    width: 40px;
    height: 40px;
  }
  .main {
    padding-top: 25px;
  }
  .welcome-row {
    margin-bottom: 20px;
  }
  .welcome-row h1 {
    font-size: 29px;
  }
  .welcome-row .eyebrow {
    font-size: 9px;
  }
  .growing-note {
    display: none;
  }
  .explore-layout {
    grid-template-columns: minmax(0, 1fr) 205px;
    gap: 13px;
  }
  .today-note {
    padding: 31px 15px 18px;
  }
  .today-note h2 {
    font-size: 28px;
  }
  .today-note p {
    font-size: 11px;
  }
  .note-bear {
    width: 65px;
    right: 0;
    top: 47px;
  }
  .mini-letters {
    gap: 7px;
    margin: 14px 0 19px;
  }
  .mini-letters span {
    width: 36px;
    height: 42px;
    font-size: 23px;
  }
  .today-note .button {
    font-size: 11px;
    padding: 10px 7px;
    gap: 5px;
  }
  .today-note .button > .icon {
    width: 17px;
    height: 17px;
  }
  .town-map,
  .town-image {
    min-height: 350px;
  }
  .town-image {
    object-position: 46%;
  }
  .map-note {
    left: 14px;
    top: 15px;
    font-size: 10px;
  }
  .map-note > span {
    display: none;
  }
  .map-stop {
    gap: 4px;
    font-size: 12px;
    padding: 10px 9px;
    min-height: 43px;
    border-radius: 9px;
  }
  .map-stop > .icon {
    display: none;
  }
  .shop-stop {
    left: 5%;
    top: 57%;
  }
  .post-stop {
    left: 49%;
    top: 40%;
  }
  .story-stop {
    right: 3%;
    bottom: 10%;
  }
  .map-caption {
    font-size: 9px;
    letter-spacing: 0;
    left: 13px;
    bottom: 12px;
  }
  .trail-grid {
    gap: 13px;
  }
  .trail {
    padding: 14px 10px;
    gap: 7px;
    min-height: 115px;
  }
  .trail-icon {
    width: 58px;
  }
  .trail strong {
    font-size: 19px;
  }
  .trail > span > span {
    font-size: 9px;
  }
  .trail small {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .trail > .icon {
    width: 15px;
  }
  .section-heading > span {
    font-size: 9px;
  }
  .lesson-stage {
    padding: 24px;
  }
  .learning-pair {
    gap: 22px;
  }
  .lesson-top > span:nth-child(2) {
    font-size: 10px;
  }
  .lesson-heading h1 {
    font-size: 26px;
  }
  .lesson-heading {
    padding: 0 32px 20px;
  }
  .character-board {
    min-height: 260px;
  }
  .big-character {
    font-size: 120px;
  }
  .meaning-scene .large-art {
    width: 155px;
    height: 155px;
  }
  .lesson-bottom {
    gap: 14px;
  }
  .feedback {
    font-size: 12px;
  }
  .button {
    font-size: 14px;
    padding: 11px 17px;
  }
  .parent-summary span {
    font-size: 11px;
  }
}
@media (max-width: 600px) {
  h1 {
    font-size: 27px;
  }
  .app-shell {
    padding: 0 17px;
  }
  .site-header {
    height: 105px;
    padding-top: 17px;
  }
  .brand > span {
    font-size: 23px;
  }
  .site-header nav {
    height: 43px;
    gap: 15px;
  }
  .site-header nav a,
  .site-header nav button {
    font-size: 12px;
    padding: 6px 10px;
  }
  .header-tools {
    gap: 0;
  }
  .parent-button {
    border: 0;
    padding: 6px 8px;
    min-width: 46px;
  }
  .parent-button .icon {
    display: none;
  }
  .main {
    padding-top: 25px;
    min-height: calc(100svh - 170px);
  }
  .welcome-row h1 {
    font-size: 27px;
    letter-spacing: 1px;
  }
  .welcome-row p {
    font-size: 11px;
    margin-top: 8px;
  }
  .welcome-row .eyebrow {
    font-size: 9px;
    margin-bottom: 8px;
  }
  .explore-layout {
    display: flex;
    flex-direction: column;
  }
  .town-map {
    min-height: 275px;
    border-radius: 18px;
  }
  .town-image {
    height: 275px;
    min-height: 275px;
    object-position: 50%;
    object-fit: cover;
  }
  .map-note > span {
    display: inline;
    font-size: 9px;
  }
  .map-stop {
    font-size: 12px;
    min-height: 44px;
    padding: 10px 11px;
  }
  .shop-stop {
    left: 8%;
    top: 57%;
  }
  .post-stop {
    left: 52%;
    top: 41%;
  }
  .story-stop {
    bottom: 11%;
    right: 3%;
  }
  .map-caption {
    font-size: 8px;
    left: 14px;
    bottom: 10px;
  }
  .today-note {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
    align-items: center;
    padding: 35px 20px 19px;
    border-radius: 14px;
    margin-top: 2px;
  }
  .today-note .eyebrow {
    grid-column: 1;
    margin-top: 0;
    font-size: 9px;
    margin-bottom: 4px;
  }
  .today-note h2 {
    grid-column: 1;
    font-size: 26px;
    line-height: 1.3;
  }
  .today-note h2 br {
    display: none;
  }
  .today-note p {
    grid-column: 1;
    font-size: 11px;
    margin-top: 7px;
    line-height: 1.6;
  }
  .today-note p br {
    display: none;
  }
  .note-bear {
    width: 65px;
    right: 16px;
    top: 25px;
  }
  .mini-letters {
    position: absolute;
    top: 25px;
    right: 75px;
    gap: 4px;
    margin: 0;
    flex-direction: column;
    transform: rotate(7deg);
  }
  .mini-letters span {
    width: 27px;
    height: 29px;
    font-size: 19px;
    border-radius: 4px;
  }
  .mini-letters span + span {
    margin-top: -12px;
    margin-left: 13px;
  }
  .today-note > .button {
    grid-column: 2;
    grid-row: 4;
    margin-top: 13px;
    font-size: 11px;
    width: 100%;
    min-height: 46px;
  }
  .today-note > small {
    grid-column: 1;
    grid-row: 4;
    font-size: 8px;
    text-align: left;
    letter-spacing: 0;
    margin-top: 17px;
  }
  .trail-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .trail {
    min-height: 101px;
    padding: 12px 18px;
    gap: 16px;
    border-radius: 14px;
  }
  .trail-icon {
    width: 65px;
  }
  .trail strong {
    font-size: 22px;
  }
  .trail > span > span {
    font-size: 10px;
  }
  .trail > .icon {
    width: 20px;
  }
  .section-heading {
    margin-top: 23px;
    margin-bottom: 13px;
  }
  .section-heading h2 {
    font-size: 20px;
  }
  .section-heading > span {
    display: none;
  }
  .home-footnote {
    font-size: 10px;
    gap: 5px;
    margin: 22px 0 5px;
    align-items: flex-start;
  }
  .home-footnote .icon {
    width: 14px;
    height: 14px;
    margin-top: 2px;
  }
  .site-footer {
    font-size: 8px;
    letter-spacing: 0;
    padding: 15px 0 20px;
    gap: 12px;
  }
  .lesson-top {
    margin-bottom: 8px;
    gap: 7px;
  }
  .lesson-top .back-link {
    font-size: 12px;
    gap: 4px;
  }
  .lesson-top .icon {
    width: 18px;
    height: 18px;
  }
  .lesson-top > span:nth-child(2) {
    font-size: 9px;
    max-width: 58%;
    line-height: 1.7;
  }
  .lesson-top i {
    margin: 0 2px;
  }
  .step-count {
    font-size: 10px;
  }
  .progress-track {
    margin-bottom: 17px;
  }
  .lesson-stage {
    border-radius: 17px;
    padding: 22px 15px 18px;
  }
  .lesson-heading {
    padding: 0 28px 21px;
  }
  .lesson-heading h1 {
    font-size: 24px;
    letter-spacing: 0;
  }
  .lesson-heading p {
    font-size: 11px;
    margin-top: 8px;
    line-height: 1.7;
  }
  .lesson-heading .eyebrow {
    font-size: 9px;
  }
  .read-prompt {
    width: 33px;
    height: 33px;
    right: -3px;
    top: 9px;
  }
  .read-prompt .icon {
    width: 18px;
    height: 18px;
  }
  .learning-pair {
    grid-template-columns: 1fr 1fr;
    gap: 13px;
    min-height: 245px;
    align-items: center;
  }
  .character-board {
    padding: 15px 6px;
    min-height: 225px;
    border-radius: 12px;
  }
  .pinyin-label {
    font-size: 22px;
  }
  .big-character {
    font-size: 100px;
    line-height: 1.3;
  }
  .audio-button {
    font-size: 10px;
    min-height: 41px;
    padding: 8px 10px;
    gap: 5px;
  }
  .audio-button .icon {
    width: 15px;
    height: 15px;
  }
  .meaning-scene .large-art {
    width: 115px;
    height: 115px;
  }
  .meaning-scene h3,
  .meaning-scene h1 {
    font-size: 23px;
  }
  .meaning-scene p {
    font-size: 11px;
    line-height: 1.9;
  }
  .lesson-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 20px;
    padding-top: 14px;
    min-height: 100px;
  }
  .feedback {
    max-width: none;
    text-align: center;
    font-size: 12px;
    min-height: 23px;
  }
  .next-button {
    width: 100%;
    font-size: 14px;
    min-height: 47px;
  }
  .options {
    gap: 9px;
  }
  .option {
    min-width: 0;
    min-height: 95px;
    border-radius: 11px;
  }
  .picture-option {
    padding: 5px;
    aspect-ratio: 1;
    flex: 1;
  }
  .order {
    gap: 15px;
    font-size: 10px;
    margin-bottom: 26px;
  }
  .order-character {
    font-size: 65px;
    min-width: 91px;
  }
  .letter-option {
    font-size: 58px;
    min-height: 110px;
    flex: 1;
  }
  .listen-orb {
    margin-bottom: 24px;
    padding: 20px 15px;
    min-width: 145px;
  }
  .listen-orb > span {
    font-size: 11px;
  }
  .syllable-parts {
    font-size: 40px;
    gap: 9px;
  }
  .plus {
    font-size: 17px;
  }
  .syllable-full {
    font-size: 56px;
    margin-bottom: 12px;
  }
  .pinyin-board {
    min-height: 235px;
  }
  .syllable-option {
    font-size: 43px;
    min-height: 150px;
  }
  .syllable-option .art {
    width: 75px;
    height: 70px;
  }
  .door-option {
    min-height: 165px;
    border-radius: 45px 45px 8px 8px;
  }
  .story-scene {
    padding: 13px 8px 22px;
  }
  .story-art {
    width: 155px;
    height: 155px;
  }
  .story-text {
    font-size: 25px;
    letter-spacing: 1px;
  }
  .story-scene p {
    font-size: 11px;
  }
  .story-page {
    font-size: 9px;
    bottom: 8px;
    right: 12px;
  }
  .completion {
    padding: 28px 15px;
    margin: 10px auto;
  }
  .completion h1 {
    font-size: 27px;
  }
  .completion p {
    font-size: 11px;
    line-height: 1.9;
  }
  .completion-seal {
    right: 20px;
    top: 20px;
    width: 36px;
    height: 36px;
  }
  .completion-letters button {
    font-size: 31px;
    min-height: 59px;
    padding: 7px 14px;
  }
  .rest-note {
    font-size: 11px;
    padding: 23px 0;
    align-items: flex-start;
  }
  .rest-note .icon {
    width: 16px;
    height: 16px;
    margin-top: 2px;
  }
  .completion .button-row {
    flex-direction: column;
    gap: 12px;
  }
  .completion .button {
    width: 100%;
  }
  .page-heading {
    margin-top: 8px;
    margin-bottom: 24px;
  }
  .page-heading h1 {
    font-size: 27px;
    letter-spacing: 0;
  }
  .page-heading p {
    font-size: 12px;
  }
  .word-grid {
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
  }
  .word-card {
    padding: 15px 14px 0;
    border-radius: 12px;
  }
  .word-card strong {
    font-size: 80px;
    line-height: 1.6;
  }
  .word-pinyin {
    font-size: 20px;
    margin-bottom: 15px;
  }
  .word-status {
    font-size: 9px;
    padding: 3px 7px;
  }
  .word-bottom {
    font-size: 12px;
    padding: 11px 0;
  }
  .empty-state {
    padding: 35px 10px;
  }
  .empty-state h1,
  .empty-state h2 {
    font-size: 25px;
  }
  .empty-state p {
    font-size: 12px;
  }
  .single-card {
    padding: 20px 12px;
    gap: 14px;
    border-radius: 17px;
  }
  .single-card .button {
    font-size: 10px;
    padding: 10px;
  }
  .review-board {
    min-height: 285px;
  }
  .review-actions {
    gap: 10px;
  }
  .review-actions > .button {
    font-size: 12px;
    padding: 12px;
    flex: 1;
  }
  .small-note {
    font-size: 11px;
    line-height: 1.9;
  }
  .parent-summary > div {
    padding: 20px 8px;
  }
  .parent-summary span {
    font-size: 10px;
  }
  .parent-summary strong {
    font-size: 30px;
  }
  .parent-section {
    padding: 22px 0;
  }
  .parent-section h2 {
    font-size: 21px;
  }
  .parent-section p {
    font-size: 12px;
    line-height: 1.95;
  }
  .parent-section .section-heading {
    flex-wrap: wrap;
    gap: 5px;
  }
  .parent-section .text-button {
    font-size: 12px;
  }
  .setting-row small {
    font-size: 11px;
  }
  .about-section .text-button {
    display: flex;
    margin-top: 14px;
  }
  .about-section a {
    font-size: 11px;
  }
  .button-row {
    gap: 10px;
  }
  .parent-section > .button-row > .button {
    font-size: 12px;
    padding: 11px 15px;
  }
  .import-preview {
    padding: 16px;
  }
  .import-preview > .button-row > .button {
    font-size: 12px;
  }
  #toast {
    bottom: 18px;
    font-size: 12px;
    padding: 12px 15px;
    max-width: calc(100% - 26px);
    width: max-content;
  }
  dialog {
    padding: 24px;
  }
  dialog h2 {
    font-size: 25px;
  }
  dialog .button {
    font-size: 12px;
    padding: 11px 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}
.eyebrow,
.growing-note,
.map-note,
.map-note > span,
.map-caption,
.today-note > small,
.section-heading > span,
.trail > span > span,
.home-footnote,
.site-footer,
.rest-note,
.small-note,
.parent-summary span,
.door-number,
.story-page,
.word-bottom {
  color: #626b57;
}
.trail small,
.word-status,
.progress-list > div > span:last-child {
  color: #4e6545;
}
.audio-button {
  color: #4c6543;
  min-height: 44px;
}
.word-pinyin {
  color: #686e55;
}
/* Child-led paths: a familiar guide, picture entrances and a single clear arrow. */
.bear-guide {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  width: min(100%, 1060px);
  margin: 18px auto 0;
  padding: 5px 18px 5px 10px;
  text-align: left;
  background: #eee9d7;
  border: 1px solid #d8ceb5;
  border-radius: 18px;
  color: var(--green-dark);
}
.bear-guide > .art {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}
.bear-guide > span:nth-child(2) {
  flex: 1;
}
.bear-guide strong {
  display: block;
  font-size: 15px;
}
.bear-guide small {
  display: block;
  font-size: 12px;
  color: #626b57;
}
.voice-waves {
  display: none;
  font-size: 28px;
  letter-spacing: 3px;
}
.speaking > .icon {
  display: none;
}
.speaking > .voice-waves {
  display: block;
  animation: bear-wave 0.7s ease-in-out infinite alternate;
}
@keyframes bear-wave {
  to {
    opacity: 0.45;
    transform: scaleY(0.7);
  }
}
.map-stop > .art {
  width: 38px;
  height: 38px;
}
.map-stop {
  min-height: 60px;
  padding: 5px 12px;
}
.map-stop > span {
  font-size: 23px;
}
.character-tap {
  display: block;
  background: none;
  padding: 0;
  width: 100%;
  border-radius: 12px;
  color: inherit;
  font-family: var(--book);
}
.picture-tap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border-radius: 16px;
  padding: 0;
  min-width: 48px;
  min-height: 48px;
}
.character-tap:hover,
.picture-tap:hover {
  background: #edf1e655;
}
.guide-cue {
  outline: 3px solid #a77a35;
  outline-offset: 5px;
  box-shadow: 0 0 0 8px #d8b76b33;
}
.next-button {
  min-height: 56px;
}
.next-button > .icon {
  width: 30px;
  height: 30px;
}
.read-prompt,
.audio-button {
  min-width: 48px;
  min-height: 48px;
}
.entry-scene {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(650px, 72svh);
  border: 1px solid #ccd5b9;
  border-radius: 26px;
  overflow: hidden;
  background: #dce4c4;
}
.entry-town {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}
.entry-invitation {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 25px 45px;
  background: #fcf8e9ed;
  border: 1px solid #d8ceb5;
  border-radius: 32px;
  box-shadow: 0 12px 30px #53694320;
}
.entry-bear {
  width: 140px;
  height: 140px;
}
.entry-invitation h1 {
  font-family: var(--book);
  font-size: 34px;
}
.entry-invitation p {
  font-size: 15px;
  margin: 6px 0 22px;
}
.start-listening {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-width: 220px;
  min-height: 84px;
  border-radius: 23px;
  background: var(--green);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  box-shadow: 0 6px 0 #254f3d;
}
.start-listening .icon {
  width: 40px;
  height: 40px;
  fill: currentColor;
  stroke: none;
}
.entry-invitation > .text-button {
  margin-top: 16px;
  min-height: 44px;
  font-size: 12px;
  color: #626b57;
}
@media (max-width: 600px) {
  .bear-guide {
    margin-top: 12px;
    min-height: 60px;
    padding: 3px 13px 3px 7px;
    border-radius: 14px;
    gap: 9px;
  }
  .bear-guide > .art {
    width: 48px;
    height: 48px;
  }
  .bear-guide strong {
    font-size: 14px;
  }
  .bear-guide small {
    font-size: 11px;
  }
  .bear-guide + .main {
    padding-top: 18px;
  }
  .entry-scene {
    min-height: 560px;
    border-radius: 20px;
  }
  .entry-invitation {
    padding: 24px 28px;
  }
  .entry-bear {
    width: 120px;
    height: 120px;
  }
  .entry-invitation h1 {
    font-size: 29px;
  }
  .start-listening {
    min-width: 208px;
    min-height: 86px;
  }
  .entry-scene .entry-town {
    object-position: 43% center;
  }
  .map-stop {
    gap: 4px;
    min-height: 55px;
    padding: 4px 7px;
    font-size: 12px;
  }
  .map-stop > .art {
    width: 31px;
    height: 35px;
  }
  .shop-stop {
    left: 7%;
    top: 54%;
  }
  .post-stop {
    left: 50%;
    top: 35%;
  }
  .story-stop {
    right: 4%;
    bottom: 12%;
  }
  .lesson-heading {
    padding-bottom: 14px;
  }
  .lesson-heading h1 {
    font-size: 23px;
  }
  .read-prompt {
    width: 46px;
    height: 46px;
    right: -8px;
    top: 3px;
  }
  .lesson-heading {
    padding-left: 20px;
    padding-right: 33px;
  }
  .lesson-bottom {
    margin-top: 14px;
    padding-top: 12px;
    gap: 8px;
  }
  .next-button {
    min-height: 56px;
    font-size: 17px;
  }
  .audio-button {
    font-size: 11px;
    padding: 8px;
    min-height: 48px;
  }
  .intro-entry {
    min-height: 48px;
    font-size: 11px;
    padding: 8px;
    gap: 5px;
  }
  .single-card .intro-entry {
    min-height: 48px;
  }
  .back-link {
    min-height: 44px;
  }
  .lesson-top .back-link .icon {
    width: 24px;
    height: 24px;
  }
  .story-scene .button {
    min-height: 48px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .speaking > .voice-waves {
    animation: none;
  }
}
/* A lesson is one continuous presentation; help, pronunciation and settings differ. */
.sound-setting-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: none;
  padding: 5px 7px;
  min-height: 44px;
  border-radius: 12px;
  color: #53634f;
  font-size: 12px;
  white-space: nowrap;
}
.sound-switch {
  display: block;
  width: 29px;
  height: 17px;
  background: #a4aa99;
  border-radius: 15px;
  padding: 3px;
  flex-shrink: 0;
}
.sound-switch:after {
  content: '';
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fffdf6;
  transition: transform 0.15s;
}
.sound-setting-button[aria-pressed='true'] .sound-switch {
  background: var(--green);
}
.sound-setting-button[aria-pressed='true'] .sound-switch:after {
  transform: translateX(12px);
}
.character-lesson .lesson-heading {
  padding-left: 0;
  padding-right: 0;
}
.character-lesson .learning-pair {
  gap: 36px;
}
.character-lesson .character-board {
  padding: 12px 18px;
  min-height: 270px;
}
.character-tap .big-character {
  display: block;
}
.character-tap:disabled {
  opacity: 1;
}
.character-lesson .character-tap {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.lesson-glyph {
  width: 190px;
  max-width: 100%;
  aspect-ratio: 1;
  display: block;
}
.lesson-glyph .intro-grid {
  opacity: 0.35;
}
.lesson-glyph .intro-ghost {
  fill: #e1ddcc;
}
.lesson-glyph .intro-ink {
  stroke: #b97743;
}
.glyph-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #536d49;
  font-size: 12px;
  line-height: 1.5;
  min-height: 30px;
  font-family: var(--body);
}
.glyph-label .icon {
  width: 17px;
  height: 17px;
}
.meaning-scene .intro-entry {
  background: #f1e6d2;
  border-color: #ddc9a2;
  color: #806239;
}
.presentation-caption {
  text-align: center;
  margin: 20px auto 14px;
  min-height: 80px;
  max-width: 620px;
}
.presentation-caption h3 {
  font-family: var(--book);
  font-size: 24px;
  line-height: 1.4;
}
.presentation-caption p {
  font-size: 13px;
  line-height: 1.8;
  margin-top: 8px;
}
.presentation-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 730px;
  margin: 0 auto;
  padding: 8px 12px;
  border-radius: 14px;
  background: #f0eddf;
  border: 1px solid #e1dac3;
}
.presentation-controls > .art {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.presentation-status {
  flex: 1;
  font-size: 12px;
  color: #59654e;
}
.presentation-controls > .button {
  min-width: 104px;
  min-height: 48px;
  padding: 8px 13px;
  font-size: 13px;
  background: #fffdf6;
  gap: 7px;
}
.presentation-symbol {
  font-family: system-ui, sans-serif;
  font-size: 22px;
  line-height: 1;
}
.character-lesson[data-playback='paused'] .intro-ink {
  animation-play-state: paused;
}
.character-lesson .lesson-bottom {
  margin-top: 18px;
}
.character-lesson[data-playback='done'] .character-tap:hover {
  background: #e6eddb88;
}
.character-lesson .character-board:before {
  bottom: 45px;
}
.single-card .character-tap {
  display: flex;
  align-items: center;
  flex-direction: column;
}
@media (max-width: 600px) {
  .header-tools {
    gap: 5px;
  }
  .sound-setting-button {
    font-size: 10px;
    padding: 5px 3px;
    gap: 4px;
  }
  .sound-switch {
    width: 25px;
    height: 15px;
    padding: 2px;
  }
  .sound-setting-button[aria-pressed='true'] .sound-switch:after {
    transform: translateX(10px);
  }
  .character-lesson .learning-pair {
    gap: 15px;
    min-height: 215px;
  }
  .character-lesson .character-board {
    min-height: 215px;
    padding: 8px;
  }
  .character-lesson .character-tap {
    min-height: 160px;
  }
  .character-lesson .big-character {
    font-size: 96px;
  }
  .lesson-glyph {
    width: 142px;
  }
  .character-lesson .meaning-scene .large-art {
    width: 112px;
    height: 112px;
  }
  .character-lesson .meaning-scene h3 {
    font-size: 24px;
  }
  .character-lesson .meaning-scene p {
    font-size: 11px;
  }
  .character-lesson .meaning-scene .intro-entry {
    min-height: 44px;
    margin-top: 9px;
    font-size: 12px;
    padding: 8px 12px;
  }
  .presentation-caption {
    margin: 15px 0 12px;
    min-height: 75px;
  }
  .presentation-caption h3 {
    font-size: 21px;
  }
  .presentation-caption p {
    font-size: 12px;
    line-height: 1.8;
    margin-top: 5px;
  }
  .presentation-controls {
    padding: 6px 8px;
    gap: 6px;
    border-radius: 12px;
  }
  .presentation-controls > .art {
    width: 32px;
    height: 32px;
  }
  .presentation-status {
    font-size: 10px;
    line-height: 1.6;
  }
  .presentation-controls > .button {
    font-size: 12px;
    min-width: 99px;
    padding: 8px;
    gap: 5px;
  }
  .character-lesson .lesson-bottom {
    margin-top: 14px;
  }
  .character-lesson .feedback {
    font-size: 11px;
  }
  .character-lesson .lesson-heading h1 {
    font-size: 25px;
  }
}
.character-lesson .feedback {
  display: none;
}
.character-lesson .lesson-bottom {
  min-height: 0;
  gap: 0;
}
.character-lesson .lesson-bottom {
  justify-content: flex-end;
}
/* Suppress native selection/callouts only while a tracing page is mounted. */
.handwriting-active,
.handwriting-active * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.writing-layout {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 600px);
  justify-content: space-between;
  gap: 40px;
  align-items: center;
}
.writing-coach .lesson-heading {
  padding: 0 0 24px;
}
.writing-paper {
  min-width: 0;
}
.writing-paper {
  text-align: center;
}
.writing-board {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  background: #f8f1df;
  border: 1px solid #dbcfad;
  border-radius: 18px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}
.writing-grid {
  fill: none;
  stroke: #d5c7a4;
  stroke-width: 3;
  stroke-dasharray: 13 10;
}
.writing-ghost {
  fill: #e3ddc9;
}
.writing-target {
  fill: #f1d4a6;
}
.writing-accepted {
  fill: #4b7351;
}
.writing-guide {
  fill: none;
  stroke: #b97743;
  stroke-width: 18;
  stroke-linecap: round;
  opacity: 0.7;
  stroke-dasharray: 25 20;
}
.writing-start {
  fill: #fff8dd;
  stroke: #ac783b;
  stroke-width: 10;
}
.writing-ink {
  fill: none;
  stroke: #47785c;
  stroke-width: 32;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}
.writing-status {
  display: block;
  color: var(--green-dark);
  font-size: 17px;
  margin-top: 10px;
}
.writing-coach {
  text-align: center;
}
.writing-coach > .art {
  width: 96px;
  margin: 0 auto 15px;
}
.writing-feedback {
  font-size: 15px;
  min-height: 58px;
}
.writing-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 15px auto 0;
  max-width: 320px;
}
.writing-tools .button {
  padding: 10px 14px;
}
.writing-tools .text-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 44px;
}
.writing-stage .lesson-bottom > .text-button {
  min-height: 48px;
}
.writing-guide.demonstrating {
  stroke-dasharray: 1600;
  animation: writing-demo 2s ease-out both;
}
@keyframes writing-demo {
  from {
    stroke-dashoffset: 1600;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@media (max-width: 899px) {
  .writing-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .writing-paper {
    max-width: 560px;
    margin: auto;
    width: 100%;
  }
  .writing-coach .lesson-heading {
    padding: 0 0 12px;
  }
  .writing-coach > .art {
    width: 64px;
    margin-bottom: 8px;
  }
  .writing-feedback {
    min-height: 0;
  }
  .writing-tools {
    margin-top: 10px;
  }
}
@media (max-width: 600px) {
  .writing-stage {
    padding: 18px 15px 15px;
  }
  .writing-stage .lesson-heading {
    grid-column: 1/-1;
    padding: 0 0 6px;
  }
  .writing-layout {
    gap: 12px;
  }
  .writing-paper {
    max-width: none;
    margin: auto;
    width: 100%;
  }
  .writing-status {
    font-size: 14px;
    margin-top: 6px;
  }
  .writing-coach {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 6px;
    align-items: center;
  }
  .writing-coach > .art {
    width: 42px;
    margin: 0;
  }
  .writing-feedback {
    font-size: 12px;
    min-height: 0;
    text-align: left;
  }
  .writing-tools {
    grid-column: 1/-1;
    margin-top: 2px;
    gap: 7px;
  }
  .writing-tools .button {
    font-size: 12px;
    min-height: 44px;
    padding: 8px 14px;
  }
  .writing-tools .text-button {
    width: auto;
    font-size: 11px;
    padding: 6px;
  }
  .writing-stage .lesson-bottom {
    flex-direction: row;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
  }
  .writing-stage .next-button {
    width: auto;
    flex: 1;
    font-size: 15px;
  }
  .writing-stage .lesson-bottom > .text-button {
    font-size: 11px;
    flex-shrink: 0;
  }
}
.character-extras {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}
.character-extras .button,
.meaning-scene .character-extras .intro-entry {
  margin: 0;
  min-height: 44px;
  padding: 8px 12px;
}
.recording-entry {
  color: #536f7f !important;
  background: #e4edf0 !important;
  border-color: #c9d9df !important;
}
.recording-entry .icon {
  width: 19px;
  height: 19px;
}
.record-dialog {
  width: min(480px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  padding: 25px 28px;
  overflow: auto;
}
.record-header {
  position: relative;
  padding-right: 37px;
}
.record-header h2 {
  font-family: var(--book);
  font-size: 29px;
}
.record-word {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 10px 0;
}
.record-word strong {
  font: 80px/1.2 var(--book);
}
.record-word > span {
  font-family: var(--book);
  font-size: 25px;
  color: #81785d;
}
.record-status {
  font-size: 13px;
  min-height: 50px;
  text-align: center;
  margin: 14px 0;
}
.record-main {
  display: flex;
  width: 100%;
  background: #ae684a;
  color: white;
  min-height: 58px;
  font-size: 18px;
}
.record-symbol {
  font-size: 23px;
  line-height: 1;
}
.record-dialog[data-state='recording'] .record-main {
  background: #8c4c3b;
}
.record-actions {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.record-actions .button {
  flex: 1;
}
.record-assess {
  width: 100%;
}
.record-result {
  text-align: center;
  background: #eef0e1;
  border: 1px solid #d9dfc7;
  border-radius: 17px;
  margin-top: 18px;
  padding: 17px;
}
.record-result > span {
  font-size: 13px;
}
.record-score {
  font-size: 46px;
  font-weight: 600;
}
.record-result p {
  font-size: 12px;
}
.record-result small {
  font-size: 11px;
  color: #647059;
}
.record-about {
  font-size: 11px;
  color: #647059;
  border-top: 1px solid #e1dfcd;
  padding-top: 12px;
  margin-top: 18px;
}
.record-about summary {
  cursor: pointer;
  min-height: 30px;
}
.record-about p {
  font-size: 11px;
  line-height: 1.8;
}
.record-dialog > .text-button {
  display: block;
  margin: 10px auto 0;
  min-height: 44px;
  font-size: 12px;
}
@media (max-width: 600px) {
  .character-extras {
    gap: 6px;
    flex-direction: column;
    margin-top: 8px;
  }
  .character-lesson .character-extras .button,
  .character-lesson .meaning-scene .character-extras .intro-entry {
    min-height: 40px;
    font-size: 11px;
    padding: 7px 9px;
    margin: 0;
  }
  .record-dialog {
    padding: 23px 20px;
  }
  .record-header h2 {
    font-size: 26px;
  }
  .record-actions {
    gap: 9px;
  }
  .record-actions .button {
    font-size: 12px;
    padding: 10px;
  }
}
@media (max-width: 600px) {
  .character-extras {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 5px;
  }
  .character-lesson .character-extras .button,
  .character-lesson .meaning-scene .character-extras .intro-entry {
    min-height: 44px;
    font-size: 11px;
    padding: 7px 6px;
    gap: 4px;
  }
  .character-extras .icon {
    width: 16px;
    height: 16px;
  }
}
.lesson-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.skip-button {
  min-height: 48px;
  min-width: 94px;
  font-size: 14px;
  white-space: nowrap;
}
.skip-button .icon {
  width: 20px;
  height: 20px;
}
.character-lesson .lesson-actions {
  width: 100%;
  justify-content: flex-end;
}
.review-skip {
  display: flex;
  margin: 18px auto 0;
  min-height: 44px;
}
.record-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.record-footer .text-button {
  min-height: 44px;
  font-size: 12px;
}
.writing-stage .skip-button {
  min-width: 90px;
}
@media (max-width: 600px) {
  .lesson-actions {
    width: 100%;
    gap: 10px;
  }
  .lesson-actions > .next-button {
    width: auto;
    flex: 1;
    min-width: 0;
  }
  .skip-button {
    padding: 10px 13px;
    font-size: 13px;
    min-width: 94px;
  }
  .writing-stage .skip-button {
    padding: 8px 11px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .writing-stage .lesson-bottom {
    align-items: center;
  }
  .record-footer .text-button {
    font-size: 11px;
  }
}
/* A clear, spoken-about restart action, distinct from green continue. */
.writing-tools .button.writing-restart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-basis: 100%;
  width: 100%;
  min-height: 60px;
  padding: 12px 18px;
  border: 2px solid #b5803f;
  border-radius: 14px;
  background: #f0d3a2;
  color: #62401e;
  box-shadow: 0 3px 0 #d1ac73;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.3;
}
.writing-tools .button.writing-restart:hover {
  background: #eac58c;
}
.writing-tools .writing-restart .icon {
  width: 28px;
  height: 28px;
}
@media (max-width: 600px) {
  .writing-tools .button.writing-restart {
    min-height: 54px;
    font-size: 17px;
    padding: 10px 16px;
  }
  .writing-tools .writing-restart .icon {
    width: 25px;
    height: 25px;
  }
}
/* A small choice of real town tasks, with a separate child review path. */
.trail-review {
  background: #e4eaf0;
  border-color: #cfdbe0;
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 12px 0 20px;
}
.course-choice {
  display: flex;
  align-items: center;
  gap: 22px;
  text-align: left;
  border: 1px solid #d9d9bf;
  border-radius: 24px;
  background: #f2eddc;
  padding: 26px;
  min-height: 280px;
}
.course-choice:hover {
  background: #e9eddd;
}
.course-sky {
  background: #e6edf0;
  border-color: #cbdade;
}
.course-sky:hover {
  background: #dee9e9;
}
.course-art {
  width: 130px;
  height: 130px;
  flex-shrink: 0;
}
.course-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.course-copy > small {
  font-size: 12px;
  color: var(--muted);
}
.course-copy > strong {
  font-family: var(--book);
  font-size: 28px;
  line-height: 1.4;
}
.course-copy > span {
  font-size: 12px;
  color: var(--muted);
}
.course-copy > .course-letters {
  font-family: var(--book);
  font-size: 25px;
  color: var(--ink);
  letter-spacing: 1px;
}
.course-copy > .course-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
}
.course-cta .icon {
  width: 20px;
}
.today-note h2 {
  max-width: 175px;
}
.trail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.trail-icon {
  width: 64px;
}
.trail {
  gap: 13px;
}
.trail strong {
  font-size: 21px;
}
@media (max-width: 899px) {
  .trail-grid {
    grid-template-columns: 1fr;
  }
  .course-grid {
    gap: 15px;
  }
  .course-choice {
    padding: 20px;
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .course-copy {
    align-items: center;
  }
  .course-copy > strong {
    font-size: 25px;
  }
  .course-art {
    width: 110px;
    height: 110px;
  }
}
@media (max-width: 600px) {
  .course-grid {
    grid-template-columns: 1fr;
  }
  .course-choice {
    flex-direction: row;
    text-align: left;
    min-height: 190px;
    padding: 20px 15px;
    gap: 16px;
  }
  .course-copy {
    align-items: flex-start;
    gap: 6px;
  }
  .course-copy > strong {
    font-size: 24px;
  }
  .course-art {
    width: 90px;
    height: 90px;
  }
  .trail {
    min-height: 100px;
  }
  .today-note h2 {
    max-width: none;
  }
}

/* Global native-fullscreen control; keep the document and its dialogs intact. */
.fullscreen-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  min-width: 104px;
  padding: 8px 12px;
  border: 1px solid #ccd3bf;
  border-radius: 12px;
  background: #fffdf6;
  color: var(--green-dark);
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}
.fullscreen-button:hover {
  background: #edf0e2;
}
.fullscreen-button[aria-pressed='true'] {
  background: var(--sage);
  border-color: #9cab89;
}
.fullscreen-icon {
  display: inline-flex;
}
.fullscreen-button .icon {
  width: 21px;
  height: 21px;
}
.header-tools .parent-button {
  min-height: 44px;
}
html:fullscreen {
  background: var(--paper);
  overflow: auto;
}
html:-webkit-full-screen {
  background: var(--paper);
  overflow: auto;
}
@media (max-width: 600px) {
  .fullscreen-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }
  .fullscreen-label {
    display: none;
  }
  .header-tools {
    gap: 3px;
  }
}
@media (max-width: 380px) {
  .header-tools .sound-label {
    display: none;
  }
  .header-tools .sound-setting-button {
    min-width: 44px;
  }
  .brand > span {
    font-size: 21px;
  }
}

/* A child's consistent exit lives in the top-left corner of every activity. */
.town-return {
  min-height: 52px;
  padding: 6px 12px;
  gap: 10px;
  border: 2px solid #9eaf8c;
  border-radius: 15px;
  background: var(--white);
  color: var(--green-dark);
  box-shadow: 0 3px 0 #ccd6bc;
}
.town-return:hover {
  background: #edf1e2;
}
.town-return:active {
  box-shadow: none;
  transform: translateY(2px);
}
.town-return .icon {
  width: 32px;
  height: 32px;
}
.brand.town-return > span {
  font-size: 21px;
  letter-spacing: 1px;
}
.town-return small {
  font-size: 9px;
  letter-spacing: 1px;
  margin-top: 3px;
}
.lesson-top.without-back {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.lesson-top.without-back > span {
  max-width: none;
  font-size: inherit;
  text-align: left;
}
.lesson-top.without-back > .step-count {
  text-align: right;
  white-space: nowrap;
}
.library-tools:empty {
  display: none;
}

.listen-orb .listen-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
}
.listen-orb .listen-label {
  white-space: nowrap;
}
.listen-orb[data-audio-state='loading'] {
  background: #f4efd9;
  border-color: #cdbb87;
}
.listen-orb[data-audio-state='playing'] {
  background: #dfeace;
  border-color: #87a472;
  box-shadow: 0 0 0 3px #d6e3c7;
}
.listen-orb[data-audio-state='ended'] {
  background: var(--white);
  border-color: #adbf9a;
}
.listen-orb[data-audio-state='error'] {
  background: #fff0d8;
  border-color: #c89e64;
  color: #805b2f;
}
.listen-waves {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
}
.listen-waves i {
  display: block;
  width: 5px;
  height: 12px;
  border-radius: 4px;
  background: currentColor;
  animation: listening-wave 1s ease-in-out infinite;
}
.listen-waves i:nth-child(2) {
  height: 24px;
  animation-delay: -0.25s;
}
.listen-waves i:nth-child(3) {
  height: 34px;
  animation-delay: -0.5s;
}
.listen-waves i:nth-child(4) {
  height: 20px;
  animation-delay: -0.75s;
}
.listen-loading {
  display: block;
  width: 27px;
  height: 27px;
  border: 3px solid #d7dcc8;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: listening-spin 0.9s linear infinite;
}
@keyframes listening-wave {
  0%,
  100% {
    transform: scaleY(0.45);
  }
  50% {
    transform: scaleY(1);
  }
}
@keyframes listening-spin {
  to {
    transform: rotate(360deg);
  }
}
.lesson-stage .option.is-selected {
  position: relative;
  overflow: visible;
  background: #e3edf0;
  border-color: #829fa6;
  box-shadow: 0 0 0 3px #c5d9dd;
  opacity: 1;
}
.lesson-stage .option.is-selected::after {
  content: '● 已选';
  position: absolute;
  right: 6px;
  top: -10px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #547780;
  color: #fffdf6;
  font: 600 11px/1.5 var(--body);
  white-space: nowrap;
  pointer-events: none;
}
.lesson-stage .option.is-selected[data-selection-state='correct'] {
  background: #e2edd7;
  border-color: #6f8e62;
  box-shadow: 0 0 0 3px #afc69d;
}
.lesson-stage .option.is-selected[data-selection-state='correct']::after {
  content: '✓ 已选';
  background: #476b51;
}
.lesson-stage .option.is-selected[data-selection-state='retry'] {
  background: #fff0ed;
  border-color: #c34b50;
  box-shadow: 0 0 0 3px #efb8ba;
}
.lesson-stage .option.is-selected[data-selection-state='retry']::after {
  content: '× 再试试';
  background: #a92f37;
}
@media (prefers-reduced-motion: reduce) {
  .listen-waves i,
  .listen-loading {
    animation: none;
  }
}
@media (max-width: 900px) {
  .with-town-return .site-header {
    height: 108px;
  }
  .town-return {
    align-self: flex-start;
  }
}
@media (min-width: 601px) and (max-width: 1100px) {
  .app-shell {
    padding-left: 24px;
    padding-right: 24px;
  }
  .site-header {
    gap: 14px;
  }
  .site-header nav {
    gap: 2px;
  }
  .site-header nav a,
  .site-header nav button {
    padding-left: 10px;
    padding-right: 10px;
  }
  .header-tools {
    gap: 6px;
  }
  .parent-button {
    padding-left: 10px;
    padding-right: 10px;
  }
}
@media (max-width: 600px) {
  .with-town-return .site-header {
    height: 116px;
  }
  .town-return {
    padding: 5px 10px;
    gap: 7px;
  }
  .brand.town-return > span {
    font-size: 20px;
  }
  .town-return small {
    margin-top: 2px;
  }
}

.step-navigation {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  justify-content: flex-end;
}
.step-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid #c7d0b8;
  border-radius: 12px;
  background: var(--white);
  color: var(--green-dark);
  font-size: 12px;
}
.step-arrow .icon {
  width: 20px;
  height: 20px;
}
.step-arrow:hover:not(:disabled) {
  background: var(--sage);
}
.step-picker {
  --step-complete-bg: #e4f1d8;
  --step-complete-border: #70955c;
  --step-complete-ink: #365839;
  --step-complete-halo: #b1cb9b50;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 44px;
  padding: 3px 9px;
  border: 1px solid #d9cfb1;
  border-radius: 12px;
  background: #fff9e8;
  line-height: 1.4;
}
.step-picker .step-count {
  font-size: 14px;
  font-weight: 700;
}
.step-picker small {
  font-size: 10px;
  color: #7b6b45;
  white-space: nowrap;
}
.step-picker.is-complete small {
  color: #476b51;
}
.step-picker.is-complete,
.step-completion-stamp {
  background: var(--step-complete-bg);
  border-color: var(--step-complete-border);
  color: var(--step-complete-ink);
  box-shadow: 0 0 0 4px var(--step-complete-halo);
}
.step-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.step-status-symbol {
  width: 12px;
  height: 12px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.is-complete .step-status-symbol circle {
  fill: #476b51;
  stroke: #476b51;
}
.is-complete .step-status-symbol path {
  stroke: #fffdf6;
}
.step-completion-stamp {
  position: absolute;
  inset: -1px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 2px solid var(--step-complete-border);
  border-radius: 12px;
  pointer-events: none;
  animation: step-stamp 1650ms both;
  transform-origin: center;
}
.step-completion-stamp > span {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.step-completion-stamp strong {
  font-size: 13px;
  white-space: nowrap;
  line-height: 1.5;
}
.step-picker .step-completion-stamp small {
  font-size: 9px;
  color: #476b51;
}
.step-stamp-check {
  width: 23px;
  height: 23px;
  flex: none;
  fill: #476b51;
}
.step-stamp-check path {
  fill: none;
  stroke: #fffdf6;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 17;
  animation: step-check-draw 0.45s 0.12s both;
}
.step-just-completed {
  animation: step-button-pulse 0.65s ease-out;
}
@keyframes step-stamp {
  0% {
    opacity: 0;
    transform: scale(0.7) rotate(-8deg);
  }
  18%,
  80% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.02);
  }
}
@keyframes step-button-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.025);
    box-shadow: 0 0 0 5px #afc69d60;
  }
}
@keyframes step-check-draw {
  from {
    stroke-dashoffset: 17;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .step-just-completed,
  .step-completion-stamp,
  .step-stamp-check path {
    animation: none;
  }
  .step-stamp-check path {
    stroke-dashoffset: 0;
  }
}
.step-dialog {
  width: calc(100% - 32px);
  max-width: 720px;
  max-height: calc(100dvh - 32px);
  padding: 24px;
  overflow: auto;
}
.step-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}
.step-dialog-heading p {
  margin: 8px 0 18px;
}
.step-dialog-heading > .intro-close {
  position: static;
  flex: none;
  min-width: 44px;
  min-height: 44px;
}
/* Keep normal scrolling, without elastic movement at vertical boundaries. */
html,
body,
dialog,
.py-step-panel {
  overscroll-behavior-y: none;
}
.step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.step-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  min-height: 68px;
  border: 1px solid #d8dac8;
  border-radius: 14px;
  background: var(--white);
  text-align: left;
}
.step-choice > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.step-choice strong {
  font-size: 14px;
}
.step-choice small {
  font-size: 12px;
  color: var(--muted);
}
.step-choice.is-complete {
  background: #edf3e6;
  border-color: #b4c6a3;
}
.step-choice[aria-current='step'] {
  outline: 2px solid #b87935;
  outline-offset: 1px;
}
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ecebdc;
  color: var(--green-dark);
  font-weight: 700;
}
.step-choice.is-complete .step-number {
  background: #476b51;
  color: white;
}
@media (max-width: 600px) {
  .step-navigation {
    gap: 4px;
  }
  .step-arrow {
    width: 44px;
    padding: 6px;
  }
  .step-arrow > span {
    display: none;
  }
  .step-picker {
    min-width: 92px;
    padding: 4px 6px;
  }
  .step-picker .step-count {
    font-size: 13px;
  }
  .step-dialog {
    padding: 18px;
  }
  .step-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared story playback: stable color and shape cues for children. */
.story-reading-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 14px;
}
.story-play-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #345a70;
}
.story-play-circle {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border: 2px solid #4c809d;
  border-radius: 50%;
  background: #d6eaf4;
  color: #284f66;
}
.story-play-circle .icon {
  width: 25px;
  height: 25px;
}
.story-restart {
  min-height: 48px;
  padding: 10px 17px;
  border: 2px solid #b5803f;
  border-radius: 14px;
  background: #f0d3a2;
  color: #62401e;
  font-size: 15px;
}
.story-reading-status {
  flex-basis: 100%;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #67705f;
}
.story-reading-letter {
  border-radius: 5px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.story-reading-letter.is-reading {
  background: #f3d791 !important;
  color: #4d3c1b !important;
  box-shadow: inset 0 -3px #b7832d !important;
}
.story-play-circle:focus-visible,
.story-restart:focus-visible {
  outline: 3px solid #a77a35;
  outline-offset: 4px;
}
@media (max-height: 760px) and (min-width: 900px) {
  .story-reading-controls {
    gap: 6px 14px;
    margin-top: 8px;
  }
  .story-play-circle {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
  }
  .story-reading-status {
    font-size: 12px;
  }
}
@media (max-height: 760px) and (min-width: 900px) {
  .story-reading-stage .lesson-bottom {
    margin-top: 8px;
    padding-top: 8px;
  }
}
.story-find-tools [data-action='story-find-replay'] {
  background: #d6eaf4;
  border: 2px solid #4c809d;
  border-radius: 14px;
  color: #284f66;
}
.writing-stage .lesson-bottom .next-button,
.py-step-footer .py-footer-actions {
  margin-left: auto;
}
@media (min-width: 900px) and (max-height: 760px) {
  .story-reading-stage .lesson-bottom {
    min-height: 0;
    margin-top: 4px;
    padding-top: 4px;
  }
  .story-reading-stage .beginner-story-copy {
    gap: 10px;
  }
}

.next-course-button {
  min-height: 64px;
  text-align: left;
  gap: 14px;
}
.next-course-button > span {
  display: grid;
  gap: 3px;
}
.next-course-button small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
@media (min-width: 900px) and (max-height: 760px) {
  .completion.has-next-course {
    padding: 16px 20px;
    margin: 8px auto;
  }
  .completion.has-next-course .completion-art {
    width: 100px;
    height: 100px;
    margin-bottom: 6px;
  }
  .completion.has-next-course .rest-note {
    padding: 13px 0;
  }
  .completion.has-next-course h1 {
    font-size: 27px;
  }
}
