@charset "UTF-8";
:root {
  --ink: #334b3d;
  --muted: #68745e;
  --paper: #fff9ed;
  --orange: #ca5b32;
  --edge: #e6dbc0;
  --mint: #e3eddb;
  font-family: ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
  background: #d6dfd1;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
  touch-action: manipulation;
}
button:focus-visible {
  outline: 3px solid #276d67;
  outline-offset: 4px;
}
button:disabled {
  cursor: default;
}
#app {
  max-width: 480px;
  margin: auto;
  min-height: 100dvh;
  background: var(--paper);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 70px #53664a18;
}
header {
  padding: 14px 22px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  background: none;
  border: 0;
  padding: 0;
  color: #547055;
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand span {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.food {
  display: flex;
  gap: 7px;
  align-items: center;
  background: #f1e9d7;
  border: 1px solid #e3d9bf;
  border-radius: 24px;
  padding: 10px 13px;
  color: #855027;
}
.food b {
  font-size: 21px;
}
.food span {
  font-size: 12px;
  font-weight: 700;
}
h1 {
  font-size: clamp(29px, 8vw, 36px);
  line-height: 1.15;
  letter-spacing: -1.3px;
  margin: 7px 0 12px;
  font-weight: 850;
}
h2 {
  margin: 8px 0;
  font-size: 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.3px;
  font-weight: 800;
  color: #65775c;
}
.home > .eyebrow,
.home > h1,
.award > .eyebrow,
.award > h1 {
  text-align: center;
}
.home > .eyebrow,
.award > .eyebrow {
  margin-top: 16px;
}
.scene {
  height: 39dvh;
  min-height: 235px;
  max-height: 390px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(180deg, #e3f1e8 0%, #d8eee2 55%, #e9eed9 100%);
  margin-top: 18px;
  border-radius: 50% 50% 0 0 / 10% 10% 0 0;
}
.sun {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff3bf;
  top: 26px;
  right: 48px;
  box-shadow:
    0 0 0 13px #fff4ce55,
    0 0 0 27px #fff4ce22;
}
.cloud {
  position: absolute;
  background: #ffffeea8;
  height: 15px;
  width: 76px;
  border-radius: 50px;
  top: 55px;
  left: 25px;
}
.cloud:before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16px;
  width: 30px;
  height: 28px;
  background: inherit;
  border-radius: 50%;
}
.cloud-b {
  top: 102px;
  left: auto;
  right: -18px;
  transform: scale(0.8);
}
.hill {
  position: absolute;
  width: 100%;
  height: 125px;
  background: #bfd8b6;
  border-radius: 50% 50% 0 0;
  bottom: 10px;
  left: -35%;
  transform: rotate(8deg);
}
.hill-front {
  left: 50%;
  bottom: 0;
  background: #a7c7a7;
  transform: rotate(-15deg);
}
.garden-floor {
  position: absolute;
  bottom: -43px;
  left: -10%;
  width: 120%;
  height: 125px;
  background: #dce4b8;
  border-radius: 50%;
  box-shadow: inset 0 8px 0 #e7edc5;
}
.dragon {
  position: absolute;
  z-index: 3;
  width: 93%;
  height: 112%;
  object-fit: contain;
  left: 3.5%;
  bottom: -6%;
  filter: drop-shadow(0 9px 6px #64451f14);
  animation: breathe 4s ease-in-out infinite;
  transform-origin: 50% 80%;
}
.dragon-shadow {
  position: absolute;
  width: 46%;
  height: 25px;
  background: #6d734137;
  filter: blur(7px);
  bottom: 20px;
  left: 27%;
  border-radius: 50%;
}
.mood {
  position: absolute;
  right: 17px;
  top: 22px;
  z-index: 4;
  padding: 10px 13px;
  background: #fffdf2;
  border: 2px solid #fff;
  box-shadow: 0 3px 0 #c0d4bd;
  border-radius: 18px 18px 18px 4px;
  font-size: 13px;
  font-weight: 800;
  transform: rotate(5deg);
}
.spark {
  position: absolute;
  color: #a28a39;
  z-index: 4;
  font-size: 28px;
  animation: twinkle 3s ease-in-out infinite;
}
.s1 {
  left: 38px;
  top: 107px;
}
.s2 {
  right: 29px;
  bottom: 85px;
  animation-delay: 1s;
}
.flower {
  position: absolute;
  z-index: 4;
  color: #fcf2d2;
  text-shadow: 0 2px #b9bd79;
  font-size: 38px;
  bottom: 19px;
  left: 18px;
}
.f2 {
  left: auto;
  right: 29px;
  bottom: 8px;
  color: #eeb293;
  font-size: 30px;
}
.f3 {
  left: 49px;
  bottom: 3px;
  font-size: 20px;
}
.plant {
  position: absolute;
  background: #7ea780;
  width: 28px;
  height: 77px;
  border-radius: 100% 0 100% 0;
  z-index: 2;
  bottom: 20px;
  left: 2px;
  transform: rotate(-25deg);
}
.p2 {
  left: 22px;
  transform: rotate(20deg);
  height: 55px;
}
.p3 {
  left: auto;
  right: 3px;
  transform: rotate(15deg);
  height: 95px;
}
.home-actions {
  padding: 10px 24px 0;
}
.growth {
  margin: 0 0 18px;
}
.growth > span {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #607054;
}
.growth b {
  font-size: 12px;
}
.growth-track {
  height: 7px;
  background: #e8e4ce;
  border-radius: 5px;
  margin-top: 9px;
  overflow: hidden;
}
.growth-track i {
  display: block;
  height: 100%;
  background: #8cac74;
  border-radius: 5px;
}
.primary {
  width: 100%;
  border: 1px solid #c15b32;
  border-bottom: 5px solid #9c4227;
  background: linear-gradient(#e99458, #dc7744);
  color: #fff9e9;
  font-weight: 850;
  font-size: 23px;
  min-height: 64px;
  border-radius: 21px;
  text-shadow: 0 1px #a7522b;
  box-shadow: inset 0 2px 0 #ffc597;
  letter-spacing: -0.3px;
}
.primary:active,
.feed:active,
.tile:active {
  transform: translateY(2px);
}
.feed {
  margin-top: 11px;
  width: 100%;
  border: 2px solid #e6d9b8;
  border-bottom-width: 4px;
  background: #f7efd9;
  min-height: 54px;
  border-radius: 18px;
  color: #795539;
  font-size: 17px;
  font-weight: 800;
}
.feed:disabled {
  color: #80745e;
  background: #efeada;
  opacity: 0.7;
}
.tiny {
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: #707663;
  margin: 12px 0 15px;
}
nav {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid #e9e2ce;
  padding: 8px 20px 9px;
  margin-top: 4px;
  background: #fff9ed;
}
nav button {
  border: 0;
  background: none;
  color: #78836c;
  font-size: 25px;
  min-width: 75px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 61px;
}
nav span {
  font-size: 11px;
  font-weight: 800;
}
nav .active {
  background: #eaf0df;
  color: #486442;
}
.game,
.teaching,
.library {
  padding: 12px 22px 22px;
}
.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.back {
  border: 0;
  background: none;
  padding: 0 7px;
  font-size: 14px;
}
.round-count {
  font-size: 15px;
  font-weight: 800;
  background: #e7edd9;
  border-radius: 20px;
  padding: 9px 14px;
}
.game h1,
.game .sub,
.library h1,
.library .sub {
  text-align: center;
}
.sub {
  font-size: 14px;
  color: #68745e;
  margin: 0 0 19px;
}
.modes {
  display: flex;
  background: #ece8d9;
  border-radius: 15px;
  padding: 4px;
  gap: 3px;
  margin: 15px 0 23px;
}
.modes button {
  border: 0;
  flex: 1;
  border-radius: 12px;
  min-width: 0;
  font-size: 12px;
  font-weight: 800;
  background: none;
  min-height: 44px;
}
.modes button[aria-pressed="true"] {
  background: #fffaf0;
  box-shadow: 0 2px 3px #53442b18;
  color: #9a4e2c;
}
.tile-head {
  display: flex;
  justify-content: space-around;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 10px;
}
.board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.tile-column {
  display: grid;
  gap: 15px;
}
.tile {
  min-width: 0;
  height: 96px;
  border: 2px solid #e9dfc6;
  border-bottom: 6px solid #d9c9a5;
  border-radius: 21px;
  background: linear-gradient(135deg, #fffef6, #faf0db);
  box-shadow:
    0 4px 6px #70552d0b,
    inset 0 2px #fff;
  font-size: 21px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hanzi {
  font-size: 42px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
}
.tile.selected {
  border-color: #d47742;
  background: #fff0ce;
  box-shadow: 0 0 0 3px #edb87955;
}
.tile.matched {
  background: #e2edd7;
  border-color: #ccdbbc;
  color: #5d8451;
  font-size: 27px;
  opacity: 0.7;
}
.tile.hinted:not(.matched) {
  outline: 3px dashed #b58238;
  outline-offset: 3px;
}
.word-image {
  width: 65px;
  height: 65px;
  object-fit: contain;
}
.feedback {
  text-align: center;
  min-height: 22px;
  font-size: 15px;
  font-weight: 700;
  margin: 19px 0 12px;
}
.game-tools {
  display: flex;
  gap: 9px;
}
.game-tools button,
.sound {
  flex: 1;
  border: 1px solid #ded7bf;
  border-bottom: 3px solid #d5caae;
  background: #f4eddb;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 800;
  padding: 8px;
}
.mini-friend {
  height: 102px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 15px;
}
.mini-friend .dragon {
  width: 110px;
  height: 120px;
  left: -5px;
  bottom: -5px;
}
.mini-friend span {
  font-size: 12px;
  color: #728064;
  margin-right: 6px;
}
.hint-card {
  background: #e9efdd;
  border-radius: 17px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 14px;
  font-size: 16px;
}
.hint-card img {
  width: 47px;
  height: 47px;
}
.teaching {
  text-align: center;
  padding-top: 25px;
}
.learn-card {
  margin: 25px 0;
  background: #fffdf5;
  border: 2px solid #e5dbc1;
  border-bottom-width: 7px;
  border-radius: 30px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 25px #73673d0a;
}
.learn-card .word-image {
  width: 120px;
  height: 120px;
  margin: 5px 0 20px;
}
.learn-card strong {
  font-size: 65px;
  line-height: 1.2;
}
.pinyin {
  font-size: 20px;
  color: #75715d;
  margin: 9px;
}
.sound {
  margin-top: 10px;
  min-width: 170px;
}
.award {
  text-align: center;
}
.award .scene {
  height: 32dvh;
  min-height: 220px;
}
.award > .primary {
  width: calc(100% - 48px);
}
.reward {
  position: relative;
  margin: -20px auto 22px;
  z-index: 5;
  background: #fff6df;
  border: 2px solid #ecdbac;
  border-bottom: 6px solid #ddc79a;
  border-radius: 25px;
  width: 70%;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 9px 25px #6f512914;
}
.reward > span {
  color: #d79439;
  font-size: 35px;
}
.reward strong {
  font-size: 44px;
  color: #b7622f;
  line-height: 1;
}
.reward b {
  font-size: 15px;
  width: 100%;
}
.word-list {
  display: grid;
  gap: 12px;
}
.word-row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px;
  background: #fffdf5;
  border: 1px solid #e5dbc1;
  border-bottom: 4px solid #dfd2b6;
  border-radius: 19px;
  width: 100%;
}
.word-row .word-image {
  width: 52px;
  height: 52px;
}
.word-row b {
  font-size: 27px;
}
.word-row small {
  font-size: 12px;
  color: #6d7664;
}
.word-row > span > span {
  display: block;
  font-size: 14px;
  margin-top: 4px;
}
.word-evidence {
  margin-left: auto;
  text-align: right;
  color: #99784a;
}
.word-evidence small {
  display: block;
  max-width: 80px;
  font-size: 10px;
}
.warning {
  font-size: 13px;
  line-height: 1.5;
  background: #ffebc5;
  border: 1px solid #bf874b;
  padding: 12px;
  margin: 8px 16px;
  border-radius: 13px;
}
dialog {
  width: calc(100% - 30px);
  max-width: 440px;
  max-height: 85dvh;
  overflow: auto;
  border: 2px solid #e4d6b8;
  border-radius: 27px;
  padding: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 15px 100px #1f382e44;
}
dialog::backdrop {
  background: #2e463c88;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head button {
  border: 0;
  background: #eee5d0;
  border-radius: 50%;
  width: 48px;
}
.pet-list {
  display: grid;
  gap: 10px;
}
.pet-list button {
  display: flex;
  align-items: center;
  text-align: left;
  border: 2px solid #e7ddc7;
  border-radius: 20px;
  background: #fffdf5;
  font-weight: 800;
  min-height: 100px;
}
.pet-list button[aria-pressed="true"] {
  border-color: #cf7946;
  background: #fff0d7;
}
.pet-list img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}
.joy {
  animation: joy 1s ease-in-out !important;
}
@keyframes breathe {
  50% {
    transform: translateY(-5px) rotate(1deg);
  }
}
@keyframes twinkle {
  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}
@keyframes joy {
  25%,
  65% {
    transform: translateY(-16px) rotate(-3deg);
  }
  45%,
  85% {
    transform: translateY(0) rotate(3deg);
  }
}
@media (max-width: 350px) {
  header {
    padding-left: 17px;
    padding-right: 17px;
  }
  .home-actions,
  .game,
  .teaching,
  .library {
    padding-left: 17px;
    padding-right: 17px;
  }
  .tile {
    height: 86px;
    font-size: 18px;
  }
  .hanzi {
    font-size: 37px;
  }
  .scene {
    min-height: 225px;
  }
  .food span {
    display: none;
  }
  .game-tools button {
    font-size: 12px;
  }
  .mini-friend span {
    font-size: 11px;
  }
  .word-row {
    gap: 8px;
  }
  .word-row small {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
