:root {
  --bg: #fff8ec;
  --paper: #fffdf8;
  --ink: #342b26;
  --muted: #89796e;
  --line: #eddfcd;
  --orange: #eb8a49;
  --deep: #9d4d24;
  --green: #397f68;
  --shadow: 0 4px 0 #ecdecb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.55 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
  color: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #dc8d45;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button {
  border: 0;
}
#app {
  max-width: 720px;
  margin: auto;
  min-height: 100dvh;
  padding: 18px 18px 105px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 22px;
}
.brand {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--deep);
}
.brand span {
  color: var(--orange);
}
.stats {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--paper);
  padding: 6px 10px;
  white-space: nowrap;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(135px, 230px);
  gap: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff4dd 0%, #ffeecf 100%);
  border: 1px solid #efdaad;
  border-radius: 30px;
  align-items: center;
  min-height: 210px;
  position: relative;
  isolation: isolate;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0) 70%
  );
  pointer-events: none;
}
.hero > div {
  padding: 20px 20px 20px 22px;
  z-index: 1;
}
.hero .speech {
  display: inline-block;
  background: #fffdf8;
  border: 1px solid #efddc4;
  border-radius: 18px 18px 18px 7px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  color: #705744;
  box-shadow: 0 3px 0 #ecdecb;
  margin-top: 8px;
}
.hero .mascot-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 180px;
  padding: 8px 10px 0 0;
}
.hero .mascot-stage::before {
  content: "";
  position: absolute;
  bottom: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 68%;
  height: 20px;
  background: rgba(97, 70, 43, 0.13);
  filter: blur(8px);
  border-radius: 50%;
}
.hero img,
.mascot-inline {
  display: block;
  position: relative;
  z-index: 1;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(74, 45, 24, 0.18));
}
.hero img {
  width: min(100%, 220px);
  max-height: 185px;
  align-self: end;
  animation: none;
}
.hero h1 {
  font-size: 23px;
  line-height: 1.25;
  margin: 6px 0 8px;
  letter-spacing: -0.8px;
}
.mascot-inline {
  width: 136px;
  height: auto;
  margin-inline: auto;
  animation: none;
}
.mascot-inline.small {
  width: 120px;
}
.mascot-inline.cool {
  animation: none;
}
.mascot-inline.listen {
  animation: none;
}
.mascot-inline.read {
  animation: none;
}
.mascot-inline.cheer {
  animation: none;
}
.mascot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fffaf2;
  border: 1px solid #ecd9be;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #8e5c2e;
}
.mascot-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.mascot-callout .speech {
  flex: 1;
  min-width: 0;
}
.mascot-mini-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-width: 140px;
}
.mascot-mini-stage::before {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 92px;
  height: 16px;
  border-radius: 50%;
  background: rgba(97, 70, 43, 0.12);
  filter: blur(7px);
}
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes bouncey {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  30% {
    transform: translateY(-10px) scale(1.02);
  }
  55% {
    transform: translateY(0) scale(0.98);
  }
}
@keyframes sway {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-4px) rotate(-2deg);
  }
  75% {
    transform: translateY(-4px) rotate(2deg);
  }
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 900;
  color: var(--deep);
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.hero .muted {
  color: #7b6347;
}
.progress {
  height: 9px;
  border-radius: 99px;
  background: #e9d6b8;
  overflow: hidden;
  margin: 12px 0 4px;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--orange);
  border-radius: inherit;
  transition: width 0.3s;
}
.sectionhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 12px;
}
.sectionhead h2,
h2 {
  font-size: 20px;
  letter-spacing: -0.5px;
  margin: 0;
}
h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 21px;
  padding: 15px;
  min-height: 125px;
  box-shadow: var(--shadow);
  background: var(--paper);
  position: relative;
}
.tile:last-child {
  grid-column: 1/-1;
  min-height: 100px;
}
.tile .emoji {
  font-size: 26px;
  margin-bottom: 4px;
}
.tile strong {
  font-size: 18px;
  letter-spacing: -0.4px;
}
.tile small {
  color: #6f625a;
}
.tile .xp {
  position: absolute;
  right: 12px;
  top: 14px;
  font-size: 11px;
  font-weight: 800;
  color: #755b42;
}
.tile.done {
  border-color: #92c5a8;
}
.card {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin: 12px 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 10px;
}
.btn {
  padding: 13px 16px;
  background: var(--orange);
  color: #fff;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 3px 0 #bd622c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #bd622c;
}
.btn.secondary {
  background: #f4e8d8;
  color: #65432f;
  box-shadow: none;
}
.btn.ghost {
  background: transparent;
  color: var(--deep);
  box-shadow: none;
  border: 1px solid var(--line);
}
.wide {
  width: 100%;
  margin-top: 10px;
}
.back {
  background: transparent;
  color: var(--deep);
  padding: 4px 0;
  font-weight: 800;
  margin-bottom: 8px;
}
input,
textarea,
select {
  width: 100%;
  border: 1.5px solid #e6d6c1;
  border-radius: 13px;
  padding: 12px;
  background: #fffefa;
  color: var(--ink);
  outline: none;
}
input:focus,
textarea:focus {
  border-color: var(--orange);
}
textarea {
  min-height: 135px;
  resize: vertical;
}
.question {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 800;
  margin: 14px 0;
}
.feedback {
  background: #f0f7ed;
  border: 1px solid #d0e4cb;
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
  color: #326749;
}
.feedback.bad {
  background: #fff1e6;
  border-color: #eed7bf;
  color: #934b26;
}
.choice {
  width: 100%;
  padding: 12px;
  text-align: left;
  background: #fffefa;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  margin: 5px 0;
}
.choice.selected {
  border-color: var(--orange);
  background: #fff0db;
}
.nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 720px);
  background: #fffdf8f5;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 9px 5px calc(9px + env(safe-area-inset-bottom));
  z-index: 10;
  backdrop-filter: blur(12px);
}
.nav button {
  background: none;
  display: grid;
  justify-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--muted);
  padding: 4px;
}
.nav button span {
  font-size: 22px;
  line-height: 1.2;
}
.nav button.active {
  color: var(--deep);
  font-weight: 900;
}
.nav button.active span {
  background: #ffebcf;
  border-radius: 12px;
  padding: 2px 13px;
}
.notice {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0;
  line-height: 1.5;
}
.levelbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.levelbar button,
.chip {
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}
.levelbar button.active,
.chip.active {
  background: #f6d6aa;
  border-color: #e2b477;
  color: #85461f;
}
.rank {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 8px;
  border-bottom: 1px solid #f2e9dd;
}
.rank.me {
  background: #fff0d7;
  border-radius: 12px;
  border: 0;
}
.rank .pos {
  width: 26px;
  text-align: center;
  font-weight: 900;
  color: #94714b;
}
.rank .score {
  margin-left: auto;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.skin img {
  width: 100%;
  max-height: 145px;
  object-fit: contain;
  display: block;
  background: radial-gradient(
    circle at 50% 38%,
    #fff7ec 0%,
    #fffaf4 48%,
    #fff3dd 100%
  );
  border-radius: 18px;
  padding: 10px;
  filter: drop-shadow(0 8px 14px rgba(79, 50, 28, 0.12));
}
.skin {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 18px;
  text-align: center;
}
.skin .btn {
  font-size: 13px;
  padding: 9px;
  width: 100%;
  margin-top: 8px;
}
.passage {
  font:
    18px/1.8 Georgia,
    serif;
  white-space: pre-line;
}
.passage span {
  cursor: pointer;
  border-bottom: 1px dotted #d18b50;
}
.bubble {
  background: #f7eddf;
  padding: 13px;
  border-radius: 17px 17px 17px 4px;
  margin: 10px 0;
  max-width: 93%;
}
.bubble.mine {
  margin-left: auto;
  background: #ffe2bd;
  border-radius: 17px 17px 4px 17px;
}
.chatlog {
  max-height: 370px;
  overflow: auto;
}
.center {
  text-align: center;
}
.big {
  font-size: 38px;
  font-weight: 900;
  color: var(--deep);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: #392e26;
  color: white;
  padding: 11px 18px;
  border-radius: 99px;
  z-index: 50;
  box-shadow: 0 4px 16px #0002;
  font-weight: 700;
  white-space: nowrap;
}
.link {
  background: none;
  color: var(--deep);
  font-weight: 800;
  text-decoration: underline;
}
.tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.tabs button {
  flex: 1;
}
.mini {
  font-size: 12px;
}
.badge {
  display: inline-block;
  background: #f8e7cc;
  border-radius: 8px;
  color: #8c5327;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 8px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}
.book {
  display: flex;
  align-items: center;
  gap: 12px;
}
.book img {
  width: 86px;
  border-radius: 15px;
}
.empty {
  padding: 15px;
  text-align: center;
  color: var(--muted);
}
@media (min-width: 550px) {
  #app {
    padding: 24px 24px 110px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .hero {
    min-height: 245px;
  }
  .tile {
    min-height: 140px;
  }
  .hero > div {
    padding: 26px;
  }
  .hero img {
    max-height: 205px;
  }
}
@media (max-width: 430px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero .mascot-stage {
    padding: 0 10px 10px;
    min-height: 145px;
    order: -1;
  }
  .hero > div {
    padding-top: 8px;
  }
  .hero .speech {
    font-size: 12px;
  }
  .mascot-callout {
    justify-content: center;
  }
}
@media (max-width: 355px) {
  #app {
    padding: 12px 12px 105px;
  }
  .stats {
    gap: 3px;
  }
  .pill {
    padding: 5px 6px;
  }
  .brand {
    font-size: 22px;
  }
  .hero h1 {
    font-size: 20px;
  }
  .hero > div {
    padding: 13px;
  }
}
.hero img,
.mascot-inline,
.skin img,
.avatar {
  background: transparent !important;
  mix-blend-mode: normal !important;
  border-radius: 0 !important;
  object-fit: contain !important;
}
.hero .mascot-stage {
  background: transparent !important;
}
.hero img,
.mascot-inline,
.aePreview img,
.skinCard img {
  object-fit: contain;
}
</style > <style > .mooncoin {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.22em;
  flex-shrink: 0;
}
.moonBalance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.aeCategory {
  display: flex;
  width: 100%;
  align-items: center;
  text-align: left;
  gap: 14px;
  background: #fff5e5;
  border: 1.5px solid #ecd4b5;
  border-radius: 22px;
  padding: 12px;
  color: var(--ink);
  margin: 12px 0;
}
.aeCategory img {
  width: 86px;
  height: 84px;
  object-fit: contain;
}
.aeCategory div {
  flex: 1;
}
.aeCategory strong {
  font-size: 19px;
  color: var(--deep);
}
.aeCategory p {
  margin: 3px 0;
}
.aeCategory span {
  font-size: 25px;
  color: var(--deep);
}
.aeSection {
  background: #f7e6ce;
  color: #754d32;
  border-radius: 12px;
  padding: 9px 13px;
  margin: 22px 0 10px;
}
.aeGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.aeSkin {
  background: #fffdf8;
  border: 1.5px solid #edddc9;
  border-radius: 18px;
  padding: 10px 5px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  box-shadow: 0 3px 0 #ecdecb;
}
.aeSkin.equipped {
  border: 2px solid #dca45e;
  background: #fff3df;
}
.aeSkin img {
  height: 135px;
  width: 100%;
  object-fit: contain;
}
.aeSkin strong {
  font-size: 14px;
}
.skinPrice {
  font-size: 12px;
  font-weight: 800;
  color: #9b6836;
  display: flex;
  align-items: center;
  gap: 3px;
}
.aePreview img {
  height: 300px;
  max-width: 100%;
  object-fit: contain;
}
.aePreview .btn {
  gap: 5px;
}
@media (min-width: 560px) {
  .aeGrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .aeGrid.paid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 360px) {
  .aeSkin img {
    height: 110px;
  }
}
</style > <style > #rewardV14 {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(75, 48, 33, 0.42);
  overflow: auto;
  overscroll-behavior: contain;
}
#rewardV14 .rewardPanel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(100%, 440px);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 24px 18px 18px;
  text-align: center;
  border: 2px solid #eec7a5;
  border-radius: 30px;
  background: radial-gradient(
    ellipse at 50% 35%,
    #fff8d7 0%,
    #fff1df 40%,
    #fff9f4 80%
  );
  box-shadow: 0 16px 60px #53332155;
  color: #633b29;
}
#rewardV14 .rewardClose {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 34px;
  height: 34px;
  border: 1px solid #d8b499;
  border-radius: 50%;
  background: #fffaf4;
  font-size: 22px;
  z-index: 3;
}
#rewardV14 .rewardRibbon {
  display: inline-block;
  background: #ffe0a9;
  border: 2px solid #a7734d;
  border-radius: 16px 16px 24px 24px;
  padding: 6px 22px;
  font-size: 25px;
  font-weight: 900;
  box-shadow: 0 4px 0 #e6b77e;
  margin: 4px 0 6px;
}
#rewardV14 .rewardLabel {
  font-size: 13px;
  font-weight: 800;
  color: #a17351;
}
#rewardV14 .rewardCat {
  display: block;
  width: 100%;
  height: clamp(135px, 29dvh, 240px);
  object-fit: contain;
  margin: 5px auto;
  animation: none !important;
  filter: drop-shadow(0 5px 5px #9c673525);
}
#rewardV14 .rewardSpeech {
  display: inline-block;
  position: relative;
  background: #fffdf8;
  border: 1.5px solid #d9ae8a;
  border-radius: 18px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 750;
  margin: 3px 0 8px;
}
#rewardV14 .rewardSpeech:before {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  width: 10px;
  height: 10px;
  background: #fffdf8;
  border-top: 1.5px solid #d9ae8a;
  border-left: 1.5px solid #d9ae8a;
  transform: rotate(45deg);
}
#rewardV14 .rewardBox {
  border: 1.5px solid #f2d1b6;
  background: #fffaf4d9;
  border-radius: 22px;
  padding: 12px;
  margin-top: 4px;
}
#rewardV14 .rewardGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}
#rewardV14 .rewardItem {
  border: 1px solid #eed5be;
  border-radius: 15px;
  background: #fffdf9;
  padding: 10px 4px;
}
#rewardV14 .rewardItem strong {
  display: block;
  font-size: clamp(19px, 5vw, 28px);
  font-weight: 900;
  color: #754728;
  white-space: nowrap;
}
#rewardV14 .rewardItem small {
  font-size: 12px;
  color: #97714e;
}
#rewardV14 .rewardButton {
  display: block;
  width: 100%;
  border-radius: 18px;
  padding: 13px;
  background: #ed9397;
  color: white;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 4px 0 #cb7176;
  margin-top: 13px;
}
#rewardV14 .rewardConfetti {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
#rewardV14 .rewardConfetti i {
  position: absolute;
  top: -16px;
  width: 8px;
  height: 13px;
  border-radius: 3px;
  animation: rewardFallV14 2.5s ease-in both;
  opacity: 0.85;
}
@keyframes rewardFallV14 {
  to {
    transform: translateY(620px) rotate(270deg);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  #rewardV14 .rewardConfetti i {
    animation: none;
    display: none;
  }
}
