:root {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #344b3a;
  background: #173526;
  font-synthesis: none;
  --ink: #344b3a;
  --muted: #839077;
  --cream: #fffaf0;
  --green: #548057;
  --gold: #edb757;
  --shadow: 0 8px 26px #17322029;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 15%, #42724e, #142c24 75%);
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button {
  color: inherit;
  border: 0;
}
button:disabled {
  cursor: default;
}
button:not(:disabled) {
  transition:
    transform 0.16s,
    box-shadow 0.16s,
    background 0.16s;
}
button:not(:disabled):hover {
  transform: translateY(-2px);
}
button:not(:disabled):active {
  transform: translateY(2px) scale(0.98);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #df9330;
  outline-offset: 4px;
}
button svg {
  flex-shrink: 0;
}
.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
}
.world {
  position: relative;
  isolation: isolate;
  width: min(100vw, 177.7778dvh);
  aspect-ratio: 16/9;
  max-width: 1920px;
  overflow: hidden;
  container-type: inline-size;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 90px #061f15;
  animation: pageIn 0.35s ease-out;
}
.world:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.map-world {
  background-image: url("../public/assets/forest-map.png");
}
.map-world:before {
  background: linear-gradient(#243d1b66, transparent 45%, #1a402742);
}
.topbar {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 3.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #fff7df;
  text-shadow: 0 2px 5px #17382080;
}
.brand strong {
  font-size: clamp(18px, 2cqw, 32px);
  letter-spacing: 0.07em;
}
.brand small {
  display: block;
  font-size: clamp(10px, 0.86cqw, 14px);
  margin-top: 3px;
  opacity: 0.85;
  letter-spacing: 0.13em;
}
.brand-mark {
  width: 48px;
  height: 48px;
  background: #fff3d9e8;
  color: #5a8055;
  display: grid;
  place-items: center;
  border-radius: 17px;
  box-shadow: 0 3px 0 #fff9ef35;
  transform: rotate(-6deg);
}
.brand-mark svg {
  width: 30px;
  height: 30px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.round {
  color: var(--ink);
  height: 48px;
  width: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: #fffaf0eb;
  box-shadow: 0 3px 0 #cedacaaa;
  flex-shrink: 0;
}
.parent-button {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 24px;
  background: #fffaf0ed;
  padding: 0 17px;
  box-shadow: 0 3px 0 #cedacaaa;
  font-size: 14px;
}
.collection-count {
  height: 46px;
  padding: 0 18px;
  background: #264d38bd;
  backdrop-filter: blur(10px);
  border: 1px solid #ffffff4d;
  border-radius: 30px;
  color: #fff7df;
  display: flex;
  align-items: center;
  gap: 9px;
}
.collection-count b {
  font-size: 23px;
}
.collection-count span {
  font-size: 13px;
  opacity: 0.7;
}
.collection-count svg {
  color: #d3e488;
  width: 21px;
}
.map-intro {
  position: absolute;
  left: 5%;
  top: 17%;
  color: #fff6d8;
  text-shadow: 0 3px 12px #183e28;
}
.eyebrow {
  display: block;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 600;
}
.map-intro h1 {
  font-size: clamp(26px, 3.6cqw, 65px);
  line-height: 1.3;
  margin: 12px 0 12px;
  font-weight: 800;
  letter-spacing: 0.035em;
}
.map-intro p {
  font-size: clamp(12px, 1.2cqw, 21px);
  margin: 0;
  opacity: 0.9;
}
.map-pin {
  position: absolute;
  background: none;
  display: flex;
  align-items: center;
  flex-direction: column;
  filter: drop-shadow(0 7px 8px #142d3066);
  min-width: 120px;
  padding: 0;
}
.pin-0 {
  left: 31%;
  top: 34%;
}
.pin-1 {
  left: 62%;
  top: 23%;
}
.pin-2 {
  left: 78%;
  top: 52%;
}
.pin-3 {
  left: 48%;
  top: 57%;
}
.pin-medallion {
  display: grid;
  place-items: center;
  width: clamp(50px, 6.3cqw, 115px);
  aspect-ratio: 1;
  border: 4px solid #fff3ce;
  border-radius: 50%;
  background: linear-gradient(140deg, #93ac62, #4a784c);
  box-shadow:
    inset 0 0 0 3px #afc183,
    inset 0 -5px 9px #304d3b33;
  font-family: "Kaiti SC", STKaiti, "Songti SC", serif;
  color: #fff9de;
  font-size: clamp(28px, 3.7cqw, 66px);
  font-weight: 700;
  position: relative;
}
.orange .pin-medallion {
  background: linear-gradient(140deg, #deb86d, #a8763b);
  box-shadow: inset 0 0 0 3px #edce97;
}
.blue .pin-medallion {
  background: linear-gradient(140deg, #8fbabd, #547f87);
  box-shadow: inset 0 0 0 3px #c0dada;
}
.pink .pin-medallion {
  background: linear-gradient(140deg, #d2a599, #ac786a);
  box-shadow: inset 0 0 0 3px #eac3af;
}
.pin-medallion i {
  position: absolute;
  width: 25px;
  height: 25px;
  right: -7px;
  bottom: 0;
  background: #fbf2d7;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #9b8b66;
}
.pin-medallion i svg {
  width: 15px;
  height: 15px;
}
.pin-sign {
  margin-top: -2px;
  position: relative;
  padding: 9px 22px 10px;
  background: #fff6de;
  border: 2px solid #d4b77c;
  border-radius: 12px;
  min-width: 140px;
  box-shadow: inset 0 -3px 0 #e8d7ad;
}
.pin-sign strong {
  display: block;
  font-size: clamp(14px, 1.45cqw, 26px);
  letter-spacing: 0.05em;
}
.pin-sign small {
  font-size: clamp(9px, 0.85cqw, 14px);
  color: #90866b;
  display: block;
  margin-top: 3px;
}
.later {
  filter: drop-shadow(0 7px 8px #142d3055) saturate(0.75);
}
.rabbit-greeting {
  position: absolute;
  left: 18%;
  top: 72%;
  border-radius: 18px 18px 18px 0;
  background: #fff8e8ef;
  padding: 12px 20px;
  font-size: clamp(12px, 1cqw, 17px);
  line-height: 1.65;
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
}
.dock {
  position: absolute;
  bottom: 4.2%;
  left: 3%;
  display: flex;
  gap: 4px;
  background: #fff9eaf2;
  backdrop-filter: blur(12px);
  border: 1px solid #ffffffe6;
  border-radius: 25px;
  box-shadow: var(--shadow);
  padding: 7px;
  z-index: 3;
}
.dock-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 19px;
  border-radius: 19px;
  background: transparent;
  color: #849079;
  font-size: 14px;
  min-height: 48px;
}
.dock-item.active {
  color: #527c4d;
  background: #e6edce;
}
.dock-item.active svg {
  fill: #8cb27633;
}
.continue-card {
  position: absolute;
  bottom: 4.2%;
  right: 3%;
  display: flex;
  gap: 22px;
  align-items: center;
  background: #fff9eaf2;
  border: 1px solid #fffce8;
  border-radius: 24px;
  padding: 13px 15px 13px 24px;
  box-shadow: var(--shadow);
  z-index: 3;
}
.continue-card small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #8b937b;
  margin-bottom: 4px;
}
.continue-card strong {
  font-size: 18px;
}
.continue-card em {
  display: inline-block;
  font-family: STKaiti, "Kaiti SC", serif;
  font-size: 23px;
  font-style: normal;
  margin-left: 4px;
  color: #9b783b;
}
.primary,
.soft,
.word-pill {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 23px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 16px;
}
.primary {
  background: linear-gradient(#f5c774, #e9ad46);
  color: #64471d;
  box-shadow:
    0 4px 0 #c58c37,
    0 7px 15px #a5722624;
  border: 1px solid #f9df9c;
}
.primary:hover {
  box-shadow:
    0 5px 0 #c58c37,
    0 9px 16px #a5722633;
}
.soft {
  background: #eaf0dd;
  border: 1px solid #d7e0c4;
  color: #52744b;
  box-shadow: 0 2px 0 #cbd7b9;
}
.text-button {
  background: none;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  color: #73876b;
  padding: 10px 14px;
  font-size: 14px;
}
.storage-note {
  position: absolute;
  bottom: 0.8%;
  right: 4%;
  font-size: 10px;
  color: #fffad4bd;
  letter-spacing: 0.08em;
}
.ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambient i {
  position: absolute;
  width: 5px;
  height: 5px;
  left: calc(13% + var(--i) * 11%);
  top: 110%;
  border-radius: 50%;
  background: #fff5bd;
  box-shadow: 0 0 13px #ffe8a3;
  animation: firefly calc(8s + var(--i) * 1s) linear infinite;
  animation-delay: calc(var(--i) * -2.1s);
  opacity: 0;
}
.loading {
  display: grid;
  height: 100%;
  place-content: center;
  text-align: center;
  color: #fff1d2;
  font-size: 36px;
}
.loading p {
  font-size: 18px;
}
.background-nature {
  background-image: url("../public/assets/forest-nature.png");
}
.background-town {
  background-image: url("../public/assets/forest-town.png");
}
.background-workshop {
  background-image: url("../public/assets/forest-workshop.png");
}
.background-station {
  background-image: url("../public/assets/forest-station.png");
}
.lesson-world:before {
  background: linear-gradient(
    #1d3e2459,
    transparent 30%,
    #25412418 75%,
    #214b36a6
  );
}
.stepper {
  position: absolute;
  top: 15%;
  left: 30%;
  right: 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  background: #fff9eaee;
  border-radius: 40px;
  box-shadow: var(--shadow);
}
.stepper span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #929b83;
  font-size: clamp(11px, 1.15cqw, 19px);
  white-space: nowrap;
}
.stepper i {
  font-size: 0.8em;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #e8e9d9;
  display: grid;
  place-items: center;
  font-style: normal;
}
.stepper .current {
  color: #426e43;
  font-weight: 700;
}
.stepper .current i {
  background: #6b955c;
  color: #fff9d8;
}
.stepper .done {
  color: #7d9a68;
}
.lesson-title {
  position: absolute;
  left: 31%;
  right: 5%;
  top: 25%;
  text-align: center;
  color: #fff7df;
  text-shadow: 0 2px 7px #283e26b3;
}
.lesson-title p {
  font-size: clamp(11px, 1cqw, 17px);
  margin: 0 0 7px;
}
.lesson-title p span {
  opacity: 0.8;
}
.lesson-title h1 {
  font-size: clamp(18px, 2cqw, 34px);
  margin: 0;
  line-height: 1.3;
}
.lesson-content {
  position: absolute;
  left: 29%;
  right: 4%;
  top: 36%;
  bottom: 17%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lesson-footer {
  position: absolute;
  bottom: 4%;
  left: 29%;
  right: 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 12px 22px;
  background: #fff9edee;
  border-radius: 22px;
  box-shadow: var(--shadow);
  min-height: 73px;
}
.lesson-feedback {
  font-size: clamp(11px, 1.05cqw, 17px);
  line-height: 1.5;
  flex: 1;
}
.lesson-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lesson-rabbit-caption {
  position: absolute;
  left: 6%;
  bottom: 7%;
  font-size: clamp(12px, 1.1cqw, 18px);
  color: #fff8dd;
  background: #38694b99;
  border: 1px solid #ffffff40;
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}
.recognize-layout,
.writing-layout,
.speak-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5%;
  width: 100%;
  height: 100%;
}
.character-grid {
  background-color: #fffbef;
  background-image:
    linear-gradient(
      90deg,
      transparent 49.65%,
      #d2c7b166 49.7%,
      #d2c7b166 50.3%,
      transparent 50.35%
    ),
    linear-gradient(
      transparent 49.65%,
      #d2c7b166 49.7%,
      #d2c7b166 50.3%,
      transparent 50.35%
    );
  border: 1px solid #e6d8b5;
  border-radius: 24px;
}
.big-character {
  width: 39%;
  height: 100%;
  max-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 7px 0 #ddd1aa,
    0 13px 28px #254c3333;
  position: relative;
}
.big-character:before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #ded4b966;
  border-radius: 15px;
  pointer-events: none;
}
.big-character small {
  font-size: clamp(18px, 2.2cqw, 32px);
  color: #819478;
  letter-spacing: 0.15em;
  z-index: 1;
  background: #fffbef;
}
.big-character b {
  font-family: "Kaiti SC", STKaiti, "Songti SC", serif;
  font-size: clamp(72px, 10.5cqw, 175px);
  font-weight: 500;
  line-height: 1.18;
  color: #3c6647;
}
.big-character > span {
  color: #9a9e87;
  font-size: 12px;
  background: #fffbef;
  display: flex;
  gap: 5px;
  align-items: center;
}
.big-character > span svg {
  width: 17px;
}
.meaning-card {
  width: 48%;
  height: 100%;
  border-radius: 24px;
  background: #fff9edeb;
  padding: 15px;
  text-align: center;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.meaning-picture {
  font-size: clamp(40px, 5.2cqw, 90px);
  line-height: 1.1;
  filter: drop-shadow(0 5px 6px #42583c22);
}
.word-pills {
  display: flex;
  gap: 8px;
  margin: 14px 0 0;
}
.word-pill {
  font-size: clamp(14px, 1.55cqw, 25px);
  padding: 9px 14px;
  min-height: 44px;
  background: #eceddc;
  color: #54764d;
}
.word-pill svg {
  width: 17px;
}
.meaning-card p {
  font-size: clamp(12px, 1.2cqw, 20px);
  margin: 12px 0 0;
  line-height: 1.5;
}
.meaning-card .text-button {
  font-size: 12px;
  min-height: 32px;
}
.quiz-scene {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9%;
}
.quiz-listen {
  display: flex;
  align-items: center;
  gap: 15px;
}
.listen-orb {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 13px 24px;
  border-radius: 40px;
  background: #fffae8;
  box-shadow: 0 4px 0 #d7dfc2;
  color: #5e8757;
  font-size: clamp(13px, 1.3cqw, 21px);
  min-height: 48px;
}
.listen-orb svg {
  width: 28px;
  height: 28px;
}
.quiz-round {
  color: #fffce5;
  text-shadow: 0 2px 7px #254323;
  font-size: 13px;
}
.quiz-options {
  display: flex;
  gap: 25px;
  justify-content: center;
  width: 100%;
  height: 60%;
}
.quiz-tile {
  width: 24%;
  border-radius: 25px;
  background: linear-gradient(#fffaf0, #f6ebcf);
  border: 3px solid #fff9e8;
  box-shadow:
    0 7px 0 #c7b583,
    0 10px 20px #2e4b4030;
  font-family: "Kaiti SC", STKaiti, serif;
  font-size: clamp(48px, 7.4cqw, 128px);
  color: #466447;
}
.quiz-tile.correct {
  background: #e9f0c9;
  border-color: #98ba71;
  color: #598751;
  box-shadow: 0 7px 0 #819f5c;
}
.quiz-tile.incorrect {
  animation: wiggle 0.3s;
  background: #f7e1cb;
}
.quiz-tile.hinted {
  outline: 5px solid #f7d37e;
  box-shadow: 0 0 30px #fdf3a9;
}
.writing-card {
  width: 38%;
  aspect-ratio: 1;
  flex-shrink: 0;
  max-height: 100%;
}
.writing-card > div {
  width: 100%;
  aspect-ratio: 1;
  box-shadow:
    0 6px 0 #d8d1b4,
    0 13px 28px #24493633;
  touch-action: none;
}
.writing-card svg {
  display: block;
  width: 100%;
  height: 100%;
}
.writing-guide {
  width: 51%;
  background: #fff9eeed;
  border-radius: 23px;
  padding: 18px 24px;
  box-shadow: var(--shadow);
  position: relative;
}
.writing-ref {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 45px;
  font-family: STKaiti, serif;
  color: #72905a66;
}
.writing-guide h2 {
  font-size: clamp(16px, 1.5cqw, 26px);
  margin: 0 0 15px;
}
.writing-guide p {
  font-size: clamp(12px, 1.1cqw, 18px);
  line-height: 1.8;
  max-width: 85%;
}
.writing-guide > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.writing-guide .soft {
  font-size: 14px;
  padding: 10px 17px;
}
.writing-guide small {
  font-size: 10px;
  color: #99a08a;
  display: block;
  margin-top: 5px;
}
.speak-picture {
  width: 29%;
  font-size: clamp(54px, 8.5cqw, 135px);
  text-align: center;
  position: relative;
  filter: drop-shadow(0 10px 8px #23412b44);
}
.speak-picture > span {
  position: absolute;
  right: 0;
  bottom: -20px;
  background: #fff8e8;
  color: #537949;
  font-family: STKaiti, serif;
  font-size: clamp(32px, 4cqw, 65px);
  border-radius: 20px;
  padding: 5px 18px;
  border: 2px solid #e5d9b7;
}
.speak-copy {
  width: 65%;
  background: #fff9ecef;
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.speak-copy h2 {
  font-size: clamp(17px, 2cqw, 32px);
  margin: 12px 0;
}
.speak-copy p {
  font-size: clamp(17px, 1.7cqw, 28px);
  line-height: 1.65;
  margin: 8px 0 20px;
}
.speak-copy mark {
  color: #ca8c31;
  background: #f6e7bf;
  padding: 0 3px;
  border-radius: 4px;
}
.speak-copy small {
  display: block;
  font-size: 10px;
  color: #8e9880;
  margin-top: 17px;
}
.speak-copy .primary {
  font-size: 14px;
}
.nature-scene {
  width: 87%;
  height: 100%;
  border-radius: 50% 50% 25% 25%;
  position: relative;
  background: linear-gradient(#c9eaf2bf 5%, #e6f5d2a3 72%, #92b65677);
  box-shadow: inset 0 -10px 30px #5a842a35;
}
.little-cloud {
  position: absolute;
  width: 16%;
  height: 10%;
  background: #fff9e9df;
  border-radius: 30px;
  top: 13%;
}
.little-cloud:before {
  content: "";
  position: absolute;
  left: 22%;
  width: 45%;
  height: 180%;
  border-radius: 50%;
  bottom: 0;
  background: inherit;
}
.cloud-one {
  left: 8%;
}
.cloud-two {
  right: 8%;
  top: 24%;
  transform: scale(0.65);
}
.nature-ground {
  position: absolute;
  left: 5%;
  right: 5%;
  height: 26%;
  bottom: 0;
  border-radius: 50%;
  background: linear-gradient(#a4c766aa, #75a649bb);
  box-shadow: 0 20px 18px #35532033;
}
.scene-object {
  position: absolute;
  left: 42%;
  top: 22%;
  background: none;
  width: 24%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 7px 4px #375d2935);
}
.scene-object > span {
  font-size: clamp(55px, 8cqw, 135px);
  line-height: 1;
}
.scene-object em {
  position: absolute;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  height: 35px;
  width: 35px;
  background: #fff8de;
  border: 2px solid #e2c475;
  display: grid;
  place-items: center;
  font-style: normal;
  color: #557946;
}
.scene-action-caption {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 8%;
  text-align: center;
  color: #476347;
  background: #fffce9eb;
  padding: 9px 16px;
  border-radius: 20px;
  font-size: clamp(12px, 1.1cqw, 19px);
  box-shadow: var(--shadow);
}
.scene-action-caption span {
  padding-left: 8px;
  color: #ae8b46;
}
.tap-indicator {
  position: absolute;
  left: 60%;
  top: 54%;
  font-size: 40px;
  pointer-events: none;
  animation: tap 1.5s infinite;
}
.sprouts {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 16%;
  display: flex;
  justify-content: center;
  gap: 15px;
}
.sprout {
  font-size: clamp(25px, 3.4cqw, 60px);
  opacity: 0;
  transform: scale(0.2);
  transition: 0.6s;
}
.sprout.planted {
  opacity: 1;
  transform: scale(1);
}
.sun .sprouts,
.moon .sprouts,
.tree .sprouts,
.earth .sprouts,
.fire .sprouts {
  display: none;
}
.sun.completed .scene-object {
  transform: translateY(-25%);
}
.moon {
  background: linear-gradient(#5f6f98cf, #91a4afb3);
}
.floating-glyph {
  position: absolute;
  left: 18%;
  top: 15%;
  font-size: clamp(50px, 7cqw, 120px);
  font-family: STKaiti, "Kaiti SC", serif;
  color: #fff8dd;
  text-shadow:
    0 3px 0 #739762,
    0 5px 20px #3d7239;
  animation: pageIn 0.6s;
}
.delivery-scene {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8%;
  justify-content: center;
  position: relative;
  padding-bottom: 20px;
}
.delivery-house {
  width: 37%;
  height: 90%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(100deg, #efc98a, #ffe5b8, #e6bb7b);
  border: 5px solid #b99257;
  border-radius: 18px 18px 25px 25px;
  box-shadow:
    0 7px 0 #7e8958,
    0 15px 26px #28412944;
}
.house-roof {
  position: absolute;
  left: -7%;
  right: -7%;
  top: -9%;
  height: 17%;
  background: linear-gradient(#96b364, #719146);
  border-radius: 80% 80% 6px 6px;
  box-shadow: 0 4px 0 #627a3e;
}
.picture-window {
  width: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6%;
  background: #fff4d9;
  padding: 8px;
  border-radius: 17px;
  border: 3px solid #d6b681;
}
.picture-window > span {
  font-size: clamp(28px, 3.9cqw, 64px);
}
.picture-window strong {
  font-size: clamp(16px, 1.8cqw, 29px);
  font-weight: 600;
}
.delivery-target {
  height: 40%;
  width: 44%;
  border: 3px dashed #b5935a;
  background: #e4bd80;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #9b7740;
}
.delivery-target small {
  font-size: 10px;
  margin-top: 5px;
}
.delivery-target b {
  font-family: STKaiti, serif;
  font-size: clamp(30px, 4cqw, 66px);
}
.letter-tray {
  width: 47%;
  display: flex;
  gap: 13px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.letter-token {
  width: 42%;
  aspect-ratio: 1;
  background: #fff7e2;
  border: 3px solid #fef5d9;
  border-radius: 20px;
  box-shadow:
    0 6px 0 #c3ac79,
    0 9px 10px #33552d29;
  font-family: STKaiti, serif;
  font-size: clamp(32px, 4.5cqw, 75px);
  color: #59764d;
  touch-action: none;
}
.letter-token.selected {
  border-color: #eeb244;
  background: #fff4ba;
  transform: translateY(-5px);
}
.scene-caption {
  position: absolute;
  bottom: -8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #fffad9;
  text-shadow: 0 1px 4px #263f1b;
}
.completed .letter-tray {
  opacity: 0.45;
}
.celebration-world {
  background-image:
    linear-gradient(#28452366, #334a21aa),
    url("../public/assets/forest-nature.png");
}
.celebration {
  position: absolute;
  inset: 13% 12% 4%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff9e8;
}
.celebrate-stars {
  font-size: 40px;
  color: #f0cc73;
  letter-spacing: 12px;
  margin-bottom: 12px;
  animation: bob 3s infinite;
}
.celebration h1 {
  font-size: clamp(24px, 3cqw, 48px);
  margin: 12px 0 18px;
}
.earned-card {
  background: #fff8e2;
  color: #527348;
  width: clamp(115px, 15cqw, 260px);
  aspect-ratio: 0.85;
  border: 5px solid #efd589;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow:
    0 8px 0 #c6a653,
    0 0 80px #ffe8a06b;
  transform: rotate(-5deg);
}
.earned-card small {
  font-size: clamp(16px, 1.4cqw, 24px);
  color: #94a37a;
}
.earned-card strong {
  font:
    clamp(58px, 8cqw, 145px) / 1.2 STKaiti,
    "Kaiti SC",
    serif;
}
.earned-card span {
  font-size: clamp(13px, 1.3cqw, 22px);
}
.celebration > p {
  font-size: clamp(12px, 1.1cqw, 18px);
  margin: 23px 0 18px;
}
.celebrate-buttons {
  display: flex;
  gap: 15px;
}
.earned-total {
  font-size: 11px;
  margin-top: 18px;
  color: #ffffffb3;
  letter-spacing: 0.1em;
}
.collection-world {
  background: #f4f2e3;
  background-image:
    radial-gradient(ellipse at 95% 0, #d4dfb188, transparent 40%),
    radial-gradient(ellipse at 0 100%, #dde8cd, transparent 40%);
}
.collection-world .brand {
  color: #426646;
  text-shadow: none;
}
.collection-world .collection-count {
  background: #dce7c7;
  color: #527449;
  border-color: #c3d3ad;
}
.collection-page {
  position: absolute;
  top: 17%;
  bottom: 17%;
  left: 5%;
  right: 5%;
  display: flex;
  flex-direction: column;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading .eyebrow {
  color: #98a186;
  font-size: 11px;
}
.page-heading h1 {
  font-size: clamp(25px, 2.6cqw, 43px);
  margin: 8px 0 0;
  color: #4a6c47;
}
.collection-tools {
  display: flex;
  gap: 10px;
}
.collection-tools input,
.collection-tools select {
  border: 1px solid #dce1c9;
  border-radius: 14px;
  background: #fffdf4;
  min-height: 48px;
  padding: 10px 16px;
  color: #5a7051;
  font-size: 13px;
}
.collection-tools input {
  width: 220px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 13px;
  overflow-y: auto;
  align-content: start;
  padding: 5px 8px 12px 2px;
  scrollbar-color: #c6cdb6 transparent;
  scrollbar-width: thin;
}
.collection-tile {
  aspect-ratio: 0.78;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #fffcf2;
  border: 1px solid #e1dfcc;
  border-radius: 17px;
  color: #8d987e;
  box-shadow: 0 3px 0 #e3e2d1;
  flex-shrink: 0;
}
.collection-tile small {
  font-size: clamp(10px, 1cqw, 16px);
  min-height: 14px;
  color: #9ba58d;
}
.collection-tile b {
  font:
    clamp(30px, 3.7cqw, 59px) / 1.2 STKaiti,
    "Kaiti SC",
    serif;
  margin: 3px 0;
  color: #708065;
}
.collection-tile > span {
  font-size: clamp(10px, 0.95cqw, 15px);
}
.collection-tile i {
  position: absolute;
  right: 8px;
  top: 4px;
  font-size: 13px;
  font-style: normal;
}
.collection-tile.learned {
  background: #edf1d8;
  border-color: #c6d7a4;
  color: #54824f;
}
.collection-tile.learned b {
  color: #456e44;
}
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 45px;
  font-size: 35px;
}
.empty-state p {
  font-size: 16px;
}
.review-page {
  position: absolute;
  inset: 14% 10% 17%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}
.rabbit {
  width: 115px;
  height: 135px;
  flex-shrink: 0;
}
.review-page > .eyebrow {
  font-size: 11px;
  color: #92a27e;
  margin-top: 6px;
}
.review-page h1 {
  font-size: clamp(22px, 2.6cqw, 42px);
  margin: 13px 0;
}
.review-page p {
  font-size: clamp(12px, 1.2cqw, 20px);
  color: #8c987c;
  margin: 5px 0 18px;
}
.review-preview {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}
.review-preview > span {
  width: 62px;
  height: 68px;
  display: grid;
  place-items: center;
  background: #fff9e8;
  border: 1px solid #e0d7b8;
  border-radius: 12px;
  font:
    38px STKaiti,
    serif;
  box-shadow: 0 3px 0 #e2d7b3;
}
.panel {
  border: 0;
  max-height: min(86dvh, 760px);
  width: min(720px, 88vw);
  padding: 0;
  border-radius: 30px;
  background: #fcf8ec;
  color: #496044;
  box-shadow: 0 25px 100px #102f3866;
  overflow: hidden;
}
.panel.wide {
  width: min(940px, 90vw);
}
.panel::backdrop {
  background: #1a362977;
  backdrop-filter: blur(7px);
}
.panel-head {
  padding: 27px 32px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #e6e7d6;
  background: linear-gradient(120deg, #f5f2dd, #fcf8ec);
}
.panel-head .eyebrow {
  font-size: 10px;
  color: #9aa48b;
  letter-spacing: 0.15em;
}
.panel-head h2 {
  font-size: 28px;
  margin: 7px 0 6px;
}
.panel-head p {
  font-size: 13px;
  color: #8f9b81;
  margin: 0;
}
.panel-head .round {
  box-shadow: none;
  border: 1px solid #e1e5d1;
  width: 44px;
  height: 44px;
}
.panel-body {
  padding: 20px 30px 27px;
  max-height: calc(86dvh - 145px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #c8d3b7 transparent;
}
.theme-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.theme-row {
  display: flex;
  align-items: center;
  gap: 17px;
  background: #fffdf5;
  border: 1px solid #e4e6d1;
  border-radius: 18px;
  padding: 15px 18px;
}
.theme-symbol {
  width: 58px;
  height: 65px;
  display: grid;
  place-items: center;
  background: #eff0d9;
  border-radius: 17px;
  font-size: 33px;
  flex-shrink: 0;
}
.theme-copy {
  flex: 1;
}
.theme-copy h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  margin: 0 0 10px;
}
.theme-copy h3 small {
  font-size: 11px;
  color: #a2ac8b;
}
.theme-copy h3 > span {
  font-size: 11px;
  font-weight: 400;
  color: #9ca687;
  margin-left: auto;
}
.mini-chars {
  display: flex;
  gap: 5px;
}
.mini-chars > span {
  width: 27px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #f5f3e7;
  color: #969c87;
  font-family: STKaiti, serif;
  font-size: 21px;
}
.mini-chars > .collected {
  background: #deebc6;
  color: #65854e;
}
.theme-actions {
  width: 122px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.theme-actions .soft {
  font-size: 12px;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 11px;
  width: 100%;
  gap: 6px;
}
.theme-actions svg {
  width: 17px;
  height: 17px;
}
.theme-actions > small {
  font-size: 10px;
  text-align: center;
  color: #b0b299;
}
.theme-row.locked {
  background: #f8f6eb;
}
.theme-row.locked .theme-symbol {
  filter: grayscale(0.4);
  opacity: 0.7;
}
.card-detail {
  text-align: center;
  padding: 0 0 10px;
}
.detail-glyph {
  font:
    95px/1.1 STKaiti,
    "Kaiti SC",
    serif;
  color: #63844f;
}
.detail-glyph small {
  display: block;
  font: 18px system-ui;
  margin-top: 10px;
  color: #8b9b76;
}
.card-detail h3 {
  margin: 18px 0 12px;
  font-size: 22px;
}
.card-detail p {
  font-size: 17px;
  margin: 15px 0;
  line-height: 1.7;
}
.card-detail > div:not(.detail-glyph) {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.card-detail .record-line {
  font-size: 12px;
  color: #9aa186;
}
.card-detail > small {
  display: block;
  font-size: 12px;
  color: #919b81;
}
.parent-stats {
  display: flex;
  justify-content: space-around;
  text-align: center;
  background: #edf0db;
  border-radius: 19px;
  padding: 17px;
  margin-bottom: 17px;
}
.parent-stats b {
  display: block;
  font-size: 32px;
  color: #5b814f;
}
.parent-stats span {
  font-size: 11px;
  color: #8a9878;
  display: block;
  margin-top: 5px;
}
.settings-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 22px;
  margin-bottom: 20px;
}
.setting {
  display: flex;
  align-items: center;
  position: relative;
  border-bottom: 1px solid #e4e5d4;
  padding: 14px 0;
  cursor: pointer;
  gap: 10px;
}
.setting > span:first-child {
  flex: 1;
}
.setting strong {
  font-size: 14px;
  font-weight: 600;
  display: block;
}
.setting small {
  font-size: 10px;
  display: block;
  color: #97a087;
  margin-top: 5px;
}
.setting input {
  position: absolute;
  right: 0;
  opacity: 0;
  width: 44px;
  height: 28px;
}
.switch {
  width: 42px;
  height: 25px;
  border-radius: 20px;
  background: #daddcb;
  position: relative;
  flex-shrink: 0;
}
.switch:before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 3px;
  top: 3px;
  background: #fffdf2;
  border-radius: 50%;
  transition: 0.2s;
}
.setting input:checked + .switch {
  background: #88a968;
}
.setting input:checked + .switch:before {
  left: 20px;
}
.setting input:focus-visible + .switch {
  outline: 3px solid #d7a557;
  outline-offset: 3px;
}
.parent-note {
  font-size: 11px;
  color: #9ba58a;
  line-height: 1.8;
  margin: 20px 0 10px;
}
.record-table {
  max-height: 260px;
  overflow: auto;
  margin-top: 12px;
}
.record-table > div {
  display: grid;
  grid-template-columns: 40px 80px 1fr;
  align-items: center;
  border-bottom: 1px solid #e8e8da;
  padding: 7px 5px;
  font-size: 12px;
  gap: 10px;
}
.record-table b {
  font:
    24px STKaiti,
    serif;
}
.record-table small {
  color: #99a188;
  font-size: 11px;
}
summary {
  cursor: pointer;
  font-size: 13px;
  color: #788e62;
  min-height: 35px;
}
.danger-link {
  background: none;
  color: #b97e64;
  text-decoration: underline;
  font-size: 12px;
  min-height: 44px;
  padding: 10px;
}
.help-content {
  text-align: center;
}
.help-content p {
  font-size: 17px;
  line-height: 1.9;
  padding: 0 20px;
}
.reset-box {
  text-align: center;
  padding: 12px;
}
.reset-box p {
  line-height: 1.8;
}
.reset-box .danger-link {
  margin-left: 15px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 9%;
  transform: translate(-50%, 10px);
  max-width: 85%;
  padding: 13px 23px;
  background: #314e39ed;
  color: #fff8df;
  border: 1px solid #c6d8b05c;
  border-radius: 18px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 100;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.rotate {
  display: none;
}
.paused .ambient *,
.backgrounded .ambient *,
.paused .tap-indicator {
  animation-play-state: paused;
}
.rotate > span {
  font-size: 70px;
}
.rotate h2 {
  font-size: 24px;
}
.rotate p {
  color: #c9d6b7;
  font-size: 14px;
}
.rotate button {
  margin-top: 15px;
  border: 1px solid #becba36b;
  background: #ffffff13;
  border-radius: 20px;
  color: #e0e9d6;
  padding: 12px 25px;
}
.unsaved .storage-note {
  color: #ffdc9b;
}
@keyframes pageIn {
  from {
    opacity: 0;
    filter: brightness(0.95);
  }
  to {
    opacity: 1;
    filter: brightness(1);
  }
}
@keyframes firefly {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  20% {
    opacity: 0.7;
  }
  80% {
    opacity: 0.5;
  }
  100% {
    transform: translate(45px, -720px);
    opacity: 0;
  }
}
@keyframes tap {
  50% {
    transform: translateY(-10px) rotate(-10deg);
  }
}
@keyframes bob {
  50% {
    transform: translateY(-8px);
  }
}
@keyframes wiggle {
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
@media (max-width: 1100px) {
  .topbar {
    top: 3%;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
  }
  .brand {
    gap: 9px;
  }
  .brand small {
    font-size: 9px;
  }
  .round,
  .parent-button {
    height: 42px;
    min-width: 42px;
  }
  .round {
    width: 42px;
  }
  .collection-count {
    height: 40px;
    padding: 0 12px;
  }
  .header-actions {
    gap: 7px;
  }
  .continue-card {
    padding: 10px 12px 10px 18px;
    gap: 15px;
  }
  .continue-card strong {
    font-size: 15px;
  }
  .continue-card .primary {
    font-size: 13px;
    padding: 12px 16px;
  }
  .dock-item {
    font-size: 12px;
    padding: 9px 14px;
    gap: 6px;
  }
  .dock {
    padding: 5px;
    gap: 1px;
  }
  .pin-sign {
    padding: 7px 14px;
    min-width: 120px;
  }
  .rabbit-greeting {
    top: 70%;
    left: 18%;
    padding: 8px 15px;
  }
  .lesson-footer {
    padding: 8px 12px;
    min-height: 60px;
  }
  .lesson-controls .primary,
  .lesson-controls .soft {
    font-size: 13px;
    padding: 11px 16px;
  }
  .stepper {
    padding: 6px 12px;
  }
  .stepper i {
    width: 24px;
    height: 24px;
  }
  .meaning-card {
    padding: 10px;
  }
  .word-pills {
    margin-top: 8px;
    gap: 5px;
  }
  .word-pill {
    padding: 6px 8px;
    min-height: 35px;
  }
  .word-pill svg {
    width: 14px;
  }
  .meaning-card p {
    margin-top: 8px;
  }
  .writing-guide {
    padding: 15px;
  }
  .writing-guide h2 {
    margin-bottom: 8px;
  }
  .writing-guide p {
    margin: 8px 0;
  }
  .writing-guide .soft {
    font-size: 12px;
    min-height: 40px;
    padding: 8px 12px;
  }
  .writing-guide .text-button {
    min-height: 34px;
    font-size: 12px;
  }
  .speak-copy {
    padding: 20px;
  }
  .speak-copy p {
    margin-bottom: 13px;
  }
  .speak-copy .primary {
    min-height: 40px;
    font-size: 12px;
    padding: 10px 15px;
  }
  .speak-copy small {
    margin-top: 10px;
  }
  .speak-copy .eyebrow {
    font-size: 10px;
  }
  .celebrate-stars {
    font-size: 25px;
    margin-bottom: 8px;
  }
  .celebration h1 {
    margin: 8px 0 13px;
  }
  .celebration > p {
    margin: 18px 0 12px;
  }
  .earned-total {
    margin-top: 14px;
  }
  .collection-tools input {
    width: 185px;
  }
  .collection-tools input,
  .collection-tools select {
    font-size: 11px;
    min-height: 42px;
    padding: 9px 11px;
  }
  .card-grid {
    gap: 9px;
  }
  .page-heading {
    margin-bottom: 15px;
  }
  .review-page .rabbit {
    width: 88px;
    height: 100px;
  }
  .review-preview {
    margin-bottom: 12px;
  }
  .review-preview > span {
    width: 48px;
    height: 52px;
    font-size: 30px;
  }
  .review-page h1 {
    margin: 8px 0;
  }
  .review-page p {
    margin-bottom: 12px;
  }
  .panel-head {
    padding: 20px 26px;
  }
  .panel-head h2 {
    font-size: 24px;
  }
  .panel-body {
    padding: 16px 23px 22px;
  }
  .theme-row {
    padding: 12px;
    gap: 12px;
  }
  .theme-symbol {
    width: 46px;
    height: 58px;
    font-size: 26px;
  }
  .theme-copy h3 {
    font-size: 15px;
  }
  .mini-chars > span {
    width: 23px;
    height: 27px;
    font-size: 18px;
  }
  .mini-chars {
    gap: 4px;
  }
  .theme-actions {
    width: 107px;
  }
}
@media (max-width: 740px) {
  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
  .brand-mark svg {
    width: 23px;
  }
  .brand small {
    display: none;
  }
  .brand strong {
    font-size: 16px;
  }
  .topbar {
    left: 3%;
    right: 3%;
    top: 3%;
  }
  .round,
  .parent-button {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }
  .parent-button {
    padding: 0;
    justify-content: center;
  }
  .parent-button > span {
    display: none;
  }
  .icon {
    width: 20px;
    height: 20px;
  }
  .fullscreen {
    display: none;
  }
  .collection-count {
    height: 35px;
    padding: 0 10px;
    gap: 5px;
  }
  .collection-count b {
    font-size: 17px;
  }
  .collection-count span {
    font-size: 10px;
  }
  .header-actions {
    gap: 6px;
  }
  .map-intro {
    top: 18%;
  }
  .map-intro h1 {
    font-size: 27px;
    margin: 6px 0;
  }
  .map-intro .eyebrow {
    font-size: 8px;
  }
  .map-intro p {
    font-size: 9px;
  }
  .pin-medallion {
    border-width: 3px;
    width: 46px;
    font-size: 28px;
  }
  .pin-sign {
    padding: 5px 10px;
    border-radius: 8px;
    min-width: 100px;
  }
  .pin-sign strong {
    font-size: 12px;
  }
  .pin-sign small {
    font-size: 8px;
    margin-top: 1px;
  }
  .map-pin {
    min-width: 100px;
  }
  .pin-0 {
    left: 30%;
    top: 34%;
  }
  .pin-1 {
    left: 62%;
    top: 24%;
  }
  .pin-2 {
    left: 78%;
    top: 53%;
  }
  .pin-3 {
    left: 49%;
    top: 58%;
  }
  .pin-medallion i {
    width: 20px;
    height: 20px;
  }
  .pin-medallion i svg {
    width: 12px;
    height: 12px;
  }
  .rabbit-greeting {
    font-size: 9px;
    padding: 6px 10px;
    top: 69%;
    left: 18%;
    border-radius: 10px 10px 10px 0;
  }
  .dock {
    border-radius: 17px;
    bottom: 5%;
    left: 2%;
    padding: 4px;
  }
  .dock-item {
    font-size: 10px;
    gap: 5px;
    min-height: 40px;
    padding: 7px 9px;
    border-radius: 12px;
  }
  .dock-item .icon {
    width: 17px;
    height: 17px;
  }
  .continue-card {
    padding: 7px 9px 8px 13px;
    border-radius: 17px;
    gap: 12px;
    bottom: 5%;
    right: 2%;
  }
  .continue-card small {
    font-size: 8px;
    margin-bottom: 2px;
  }
  .continue-card strong {
    font-size: 12px;
  }
  .continue-card em {
    font-size: 18px;
  }
  .continue-card .primary {
    min-height: 38px;
    font-size: 11px;
    padding: 8px 11px;
    border-radius: 11px;
    gap: 5px;
  }
  .storage-note {
    font-size: 8px;
    bottom: 0.6%;
  }
  .stepper {
    left: 28%;
    right: 3%;
    top: 16%;
    padding: 5px 8px;
  }
  .stepper span {
    font-size: 10px;
    gap: 3px;
  }
  .stepper i {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  .lesson-title {
    top: 27%;
    left: 29%;
    right: 3%;
  }
  .lesson-title p {
    font-size: 9px;
    margin-bottom: 4px;
  }
  .lesson-title h1 {
    font-size: 15px;
  }
  .lesson-content {
    left: 28%;
    right: 3%;
    top: 38%;
    bottom: 21%;
  }
  .lesson-footer {
    left: 28%;
    right: 3%;
    bottom: 4%;
    padding: 6px 8px;
    min-height: 47px;
    border-radius: 14px;
    gap: 6px;
  }
  .lesson-feedback {
    font-size: 9px;
  }
  .lesson-controls {
    gap: 5px;
  }
  .lesson-controls .round {
    height: 33px;
    width: 33px;
    min-width: 33px;
  }
  .lesson-controls .primary,
  .lesson-controls .soft {
    min-height: 34px;
    font-size: 10px;
    padding: 8px 10px;
    border-radius: 11px;
    gap: 4px;
  }
  .lesson-rabbit-caption {
    font-size: 9px;
    padding: 5px 10px;
    bottom: 6%;
  }
  .recognize-layout {
    gap: 4%;
  }
  .big-character {
    border-radius: 15px;
  }
  .big-character:before {
    inset: 6px;
    border-radius: 9px;
  }
  .big-character b {
    font-size: 64px;
  }
  .big-character small {
    font-size: 15px;
  }
  .big-character > span {
    font-size: 8px;
  }
  .big-character > span svg {
    width: 12px;
    height: 12px;
  }
  .meaning-card {
    border-radius: 16px;
    padding: 6px;
    width: 52%;
  }
  .meaning-picture {
    font-size: 30px;
  }
  .word-pills {
    gap: 4px;
    margin-top: 4px;
  }
  .word-pill {
    font-size: 12px;
    padding: 4px 6px;
    min-height: 26px;
    border-radius: 8px;
    gap: 4px;
  }
  .word-pill svg {
    width: 11px;
    height: 11px;
  }
  .meaning-card p {
    font-size: 10px;
    margin: 5px 0 0;
  }
  .meaning-card .text-button {
    font-size: 8px;
    min-height: 22px;
    padding: 3px;
  }
  .meaning-card .text-button svg {
    width: 12px;
    height: 12px;
  }
  .quiz-options {
    gap: 15px;
    height: 59%;
  }
  .quiz-tile {
    font-size: 48px;
    border-radius: 16px;
    box-shadow: 0 4px 0 #c7b583;
  }
  .listen-orb {
    min-height: 34px;
    padding: 8px 16px;
    font-size: 11px;
    gap: 8px;
  }
  .listen-orb svg {
    width: 21px;
    height: 21px;
  }
  .quiz-round {
    font-size: 10px;
  }
  .writing-card {
    width: 34%;
  }
  .writing-card > div {
    border-radius: 15px;
  }
  .writing-guide {
    width: 59%;
    padding: 10px 12px;
    border-radius: 16px;
  }
  .writing-guide h2 {
    font-size: 13px;
    margin: 0 0 5px;
  }
  .writing-guide p {
    font-size: 10px;
    margin: 4px 0;
    line-height: 1.5;
  }
  .writing-guide .soft {
    min-height: 30px;
    font-size: 10px;
    padding: 6px 9px;
    border-radius: 10px;
    gap: 4px;
  }
  .writing-guide .text-button {
    min-height: 26px;
    padding: 5px;
    font-size: 10px;
    gap: 4px;
  }
  .writing-guide small {
    font-size: 8px;
    margin-top: 0;
  }
  .writing-ref {
    font-size: 30px;
    right: 12px;
    top: 8px;
  }
  .speak-copy {
    padding: 14px;
    border-radius: 17px;
  }
  .speak-copy h2 {
    font-size: 15px;
    margin: 6px 0;
  }
  .speak-copy p {
    font-size: 14px;
    line-height: 1.5;
    margin: 5px 0 10px;
  }
  .speak-copy .primary {
    font-size: 10px;
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 11px;
    gap: 5px;
  }
  .speak-copy small {
    font-size: 8px;
    margin-top: 8px;
  }
  .speak-copy .eyebrow {
    font-size: 8px;
  }
  .speak-picture {
    font-size: 55px;
  }
  .speak-picture > span {
    font-size: 30px;
    padding: 2px 10px;
    border-radius: 12px;
    bottom: -15px;
  }
  .scene-object > span {
    font-size: 57px;
  }
  .scene-object em {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }
  .scene-object em .icon {
    width: 17px;
    height: 17px;
  }
  .scene-action-caption {
    font-size: 10px;
    padding: 6px 10px;
    bottom: 3%;
    border-radius: 12px;
  }
  .floating-glyph {
    font-size: 44px;
  }
  .tap-indicator {
    font-size: 28px;
  }
  .picture-window {
    padding: 5px;
    gap: 7px;
    border-width: 2px;
    border-radius: 12px;
  }
  .picture-window > span {
    font-size: 26px;
  }
  .picture-window strong {
    font-size: 14px;
  }
  .delivery-house {
    gap: 6px;
    border-width: 3px;
    border-radius: 15px;
    width: 38%;
  }
  .delivery-target {
    border-width: 2px;
    border-radius: 12px;
  }
  .delivery-target small {
    font-size: 8px;
    margin: 2px 0;
  }
  .letter-tray {
    gap: 9px;
  }
  .letter-token {
    border-width: 2px;
    border-radius: 13px;
    font-size: 30px;
    box-shadow: 0 4px 0 #c3ac79;
  }
  .scene-caption {
    font-size: 8px;
    bottom: -10px;
  }
  .celebration {
    inset: 15% 10% 4%;
  }
  .celebrate-stars {
    font-size: 17px;
    margin-bottom: 5px;
  }
  .celebration .eyebrow {
    font-size: 8px;
  }
  .celebration h1 {
    font-size: 21px;
    margin: 5px 0 10px;
  }
  .earned-card {
    width: 91px;
    border-width: 3px;
    border-radius: 17px;
    box-shadow:
      0 5px 0 #c6a653,
      0 0 50px #ffe8a06b;
  }
  .earned-card strong {
    font-size: 55px;
  }
  .earned-card small {
    font-size: 12px;
  }
  .earned-card > span {
    font-size: 10px;
  }
  .celebration > p {
    font-size: 10px;
    margin: 15px 0 10px;
  }
  .celebrate-buttons {
    gap: 10px;
  }
  .celebrate-buttons button {
    min-height: 35px;
    font-size: 11px;
    padding: 8px 15px;
    border-radius: 12px;
  }
  .earned-total {
    font-size: 8px;
    margin-top: 11px;
  }
  .collection-page {
    top: 19%;
    bottom: 20%;
  }
  .page-heading {
    margin-bottom: 10px;
    gap: 10px;
  }
  .page-heading .eyebrow {
    font-size: 8px;
  }
  .page-heading h1 {
    font-size: 21px;
    margin-top: 4px;
  }
  .collection-tools {
    gap: 6px;
  }
  .collection-tools input {
    width: 145px;
  }
  .collection-tools input,
  .collection-tools select {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 9px;
    border-radius: 10px;
  }
  .card-grid {
    grid-template-columns: repeat(10, 1fr);
    gap: 7px;
  }
  .collection-tile {
    border-radius: 10px;
  }
  .collection-tile b {
    font-size: 27px;
  }
  .collection-tile small {
    font-size: 8px;
    min-height: 10px;
  }
  .collection-tile > span {
    font-size: 8px;
  }
  .collection-tile i {
    font-size: 9px;
    right: 4px;
    top: 1px;
  }
  .review-page .rabbit {
    width: 62px;
    height: 72px;
  }
  .review-page .eyebrow {
    font-size: 8px;
  }
  .review-page h1 {
    font-size: 20px;
    margin: 7px 0;
  }
  .review-page p {
    font-size: 10px;
    margin: 3px 0 10px;
  }
  .review-page .primary {
    font-size: 11px;
    min-height: 35px;
    padding: 8px 16px;
    border-radius: 12px;
  }
  .review-preview {
    gap: 9px;
    margin-bottom: 12px;
  }
  .review-preview > span {
    width: 38px;
    height: 42px;
    font-size: 24px;
    border-radius: 8px;
  }
  .panel {
    border-radius: 20px;
    width: 90vw;
    max-height: 90dvh;
  }
  .panel-head {
    padding: 15px 20px 12px;
  }
  .panel-head .eyebrow {
    font-size: 8px;
  }
  .panel-head h2 {
    font-size: 21px;
    margin: 5px 0;
  }
  .panel-head p {
    font-size: 10px;
  }
  .panel-head .round {
    width: 35px;
    height: 35px;
  }
  .panel-body {
    max-height: calc(90dvh - 110px);
    padding: 12px 18px 20px;
  }
  .theme-row {
    padding: 10px;
    gap: 10px;
    border-radius: 13px;
  }
  .theme-symbol {
    width: 36px;
    height: 44px;
    font-size: 23px;
    border-radius: 10px;
  }
  .theme-copy h3 {
    font-size: 12px;
    margin-bottom: 6px;
    gap: 7px;
  }
  .theme-copy h3 small,
  .theme-copy h3 > span {
    font-size: 9px;
  }
  .mini-chars {
    gap: 3px;
  }
  .mini-chars > span {
    width: 21px;
    height: 24px;
    font-size: 17px;
  }
  .theme-actions {
    width: 94px;
    gap: 5px;
  }
  .theme-actions .soft {
    font-size: 10px;
    min-height: 30px;
    padding: 5px 7px;
    gap: 4px;
  }
  .theme-actions > small {
    font-size: 8px;
  }
  .settings-list {
    gap: 0 17px;
  }
  .setting {
    padding: 10px 0;
  }
  .setting strong {
    font-size: 12px;
  }
  .setting small {
    font-size: 9px;
  }
  .parent-stats {
    padding: 12px;
    margin-bottom: 9px;
  }
  .parent-stats b {
    font-size: 24px;
  }
  .parent-stats span {
    font-size: 9px;
  }
  .parent-note {
    font-size: 9px;
  }
  .detail-glyph {
    font-size: 65px;
  }
  .card-detail h3 {
    font-size: 18px;
    margin: 12px 0 7px;
  }
  .card-detail p {
    font-size: 14px;
    margin: 10px 0;
  }
  .card-detail .soft,
  .card-detail .primary {
    font-size: 12px;
    min-height: 38px;
    padding: 9px 15px;
  }
  .card-detail .record-line {
    font-size: 10px;
  }
  .help-content .rabbit {
    width: 65px;
    height: 75px;
  }
  .help-content p {
    font-size: 13px;
  }
  .help-content .primary {
    font-size: 12px;
    min-height: 36px;
  }
  #toast {
    font-size: 11px;
    padding: 10px 18px;
  }
}
@media (orientation: portrait) and (max-width: 1000px) {
  .rotate {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: radial-gradient(ellipse at 50% 20%, #42694d, #203e32);
    color: #fff4d8;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .allow-portrait .rotate {
    display: none;
  }
  .allow-portrait .world {
    width: 100vw;
  }
  .allow-portrait body {
    overflow: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .ambient {
    display: none;
  }
}

/* Keep primary controls comfortably tappable on small landscape screens. */
@media (max-width: 740px) {
  .topbar .round,
  .parent-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
  .dock-item {
    min-height: 44px;
  }
  .continue-card .primary {
    min-height: 44px;
  }
  .lesson-footer {
    min-height: 56px;
  }
  .lesson-controls .round {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
  .lesson-controls .primary,
  .lesson-controls .soft {
    min-height: 44px;
  }
  .meaning-card .meaning-picture {
    display: none;
  }
  .word-pill {
    min-height: 40px;
  }
  .meaning-card .text-button {
    min-height: 36px;
  }
  .listen-orb {
    min-height: 44px;
  }
  .pin-3 {
    top: 52%;
  }
  .celebrate-buttons button {
    min-height: 40px;
  }
  .writing-guide .soft {
    min-height: 34px;
  }
  .theme-actions .soft {
    min-height: 35px;
  }
}
