:root {
  --ink: #4a2d22;
  --sky: #7fd4ff;
  --sea: #2ec4b6;
  --cream: #fff8ee;
  --lemon: #ffd23f;
  --coral: #ff7b54;
  --mint: #5ed69a;
  --pink: #ff8fb8;
  --blue: #5eb7ff;
  --leaf: #3cba6a;
  --apple: #ff6b4a;
  --ear: #4aa3e8;
  --shadow: #e08a2c;
  font-family: "ZCOOL KuaiLe", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

button { font: inherit; color: inherit; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 72% 8%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 88% 22%, #fff7c2 0 18px, transparent 20px),
    linear-gradient(180deg, #8fd8ff 0%, #d9f4ff 34%, #7fe0d8 70%, #2eb8b0 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  background: #fff;
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
}

body::before {
  width: 140px;
  height: 46px;
  top: 18vh;
  left: -20px;
  box-shadow: 46px 10px 0 8px #fff, 96px -6px 0 -4px #fff;
  animation: drift 9s ease-in-out infinite;
}

body::after {
  width: 120px;
  height: 40px;
  top: 8vh;
  right: 6vw;
  box-shadow: 40px 8px 0 6px #fff;
  animation: drift 11s ease-in-out infinite reverse;
}

#app { position: relative; z-index: 1; min-height: 100vh; }

body:not([data-screen="home"]) {
  background: var(--cover, #d9ffe8);
}

body:not([data-screen="home"])::before,
body:not([data-screen="home"])::after {
  display: none;
}

body[data-island="word"] { --cover: #d7ffe8; }
body[data-island="number"] { --cover: #ffe6da; }
body[data-island="english"] { --cover: #d9efff; }

body:not([data-screen="home"]) #app,
body:not([data-screen="home"]) .screen {
  min-height: 100vh;
  background: var(--cover, #d7ffe8);
}

.screen {
  width: min(520px, calc(100% - 20px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

body:not([data-screen="home"]) .screen {
  width: 100%;
  max-width: 520px;
  padding: 18px 16px 48px;
}

h1, h2 { margin: 0; }

h1 {
  font-size: clamp(40px, 10vw, 58px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 3px 0 #fff;
}

.kicker {
  margin: 0 0 2px;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 2px 0 #2a8fbf;
}

body:not([data-screen="home"]) .kicker {
  color: #1c8a4a;
  text-shadow: none;
}

body[data-island="number"]:not([data-screen="home"]) .kicker { color: #d24122; }
body[data-island="english"]:not([data-screen="home"]) .kicker { color: #1d6fbf; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}

.star-jar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  box-shadow: 0 6px 0 #f0b429;
  transform: rotate(4deg);
}

.star-glyph {
  color: var(--lemon);
  font-size: 28px;
  text-shadow: 0 2px 0 #e09a12;
}

.star-jar b {
  font-size: 32px;
  line-height: 1;
  color: #e07a12;
}

.stage { margin-top: 8px; }

.speech {
  display: inline-block;
  margin: 8px 0 0 8px;
  padding: 10px 16px;
  background: #fff;
  border-radius: 22px 22px 22px 6px;
  box-shadow: 0 6px 0 rgba(42, 143, 191, 0.25);
  font-size: 18px;
}

.boat {
  position: relative;
  width: min(240px, 62%);
  margin: -6px auto 0;
  animation: bob 2.8s ease-in-out infinite;
  z-index: 2;
}

.boat-pic {
  width: 100%;
  display: block;
  filter: drop-shadow(0 12px 0 rgba(20, 120, 130, 0.18));
}

.captain {
  position: absolute;
  width: 78px;
  height: 78px;
  left: 34%;
  top: -28px;
  animation: wiggle 2.2s ease-in-out infinite;
}

.islands {
  display: grid;
  gap: 14px;
  margin-top: -8px;
}

.island-btn {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 108px;
  padding: 10px 14px 10px 10px;
  border: 0;
  border-radius: 36px;
  text-align: left;
  cursor: pointer;
  color: #fff;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.12);
  animation: pop 0.45s both;
}

.island-btn strong { display: block; font-size: 30px; line-height: 1.1; }
.island-btn small { display: block; opacity: 0.92; font-size: 15px; }

.island-leaf { background: linear-gradient(180deg, #7eeb9a, #2fb85f); box-shadow: 0 8px 0 #1f8a46; }
.island-apple { background: linear-gradient(180deg, #ffb199, #ff6a45); box-shadow: 0 8px 0 #d24122; animation-delay: 0.08s; }
.island-ear { background: linear-gradient(180deg, #9fd4ff, #3d98ee); box-shadow: 0 8px 0 #1f6fbf; animation-delay: 0.16s; }

.island-btn:active { transform: translateY(6px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); }

.toy-pic {
  width: 84px;
  height: 84px;
  object-fit: contain;
  background: #fff;
  border-radius: 28px;
  padding: 4px;
}

.go {
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 16px;
}

.island-btn .medal { display: none; }
.island-btn .medal.on {
  display: block;
  position: absolute;
  top: 10px;
  right: 86px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lemon);
  box-shadow: 0 0 0 3px #fff;
}

.note, .credit {
  margin: 16px 8px 0;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #145e66;
}

.back {
  border: 0;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 4px 0 #f0b429;
  margin-bottom: 12px;
}

.trail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
  padding-bottom: 8px;
}

.trail::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 16px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: repeating-linear-gradient(#ffe27a 0 14px, transparent 14px 24px);
  opacity: 0.9;
}

.step {
  position: relative;
  z-index: 1;
  width: min(320px, 88%);
  display: grid;
  grid-template-columns: 54px 52px 1fr;
  gap: 8px;
  align-items: center;
  text-align: left;
  min-height: 78px;
  padding: 8px 12px 8px 8px;
  border: 0;
  border-radius: 28px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 6px 0 #f0c36a;
}

.step:nth-child(odd) { align-self: flex-start; }
.step:nth-child(even) { align-self: flex-end; }

.step.now {
  width: min(400px, 100%);
  align-self: center;
  min-height: 96px;
  background: #fff7d6;
  box-shadow: 0 8px 0 #f0a202;
  animation: pulse 1.5s ease-in-out infinite;
}

.step.done { background: #e9fff1; box-shadow: 0 6px 0 #8ed9a8; }
.step.boss { background: #fff0ea; }
.step.locked {
  background: #f3eee6;
  color: #8a7d72;
  box-shadow: none;
  cursor: default;
  filter: grayscale(0.35);
}

.step strong { display: block; font-size: 18px; line-height: 1.2; }
.step small, .play-tag { display: block; font-style: normal; font-size: 13px; color: #c2410c; }

.ord {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lemon);
  font-size: 22px;
}

.step.done .ord { background: var(--mint); color: #fff; }
.step.now .ord { background: var(--coral); color: #fff; font-size: 18px; }

.node-pic { width: 48px; height: 48px; object-fit: contain; }

.chest {
  margin-top: 28px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 24px;
}

.later-title { font-size: 22px; margin-bottom: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  border: 0;
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 3px 0 #d7c4a4;
}

.quiz .board, .soon, .party {
  background: #fffdf8;
  border-radius: 36px;
  padding: 16px 14px 18px;
  box-shadow: 0 12px 0 rgba(42, 120, 140, 0.18);
}

.progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  color: var(--ink);
}

.pips { display: flex; gap: 8px; justify-content: center; margin: 4px 0 10px; }

.pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.pip.now { background: var(--lemon); transform: scale(1.25); }
.pip.done { background: var(--mint); }

.hero-wrap {
  width: 132px;
  height: 132px;
  margin: 0 auto 8px;
  border-radius: 40px;
  background: linear-gradient(180deg, #fff4c8, #ffe08a);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 0 #f0b429;
}

.hero { width: 104px; height: 104px; object-fit: contain; }

.stem {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 4.6vw, 26px);
  line-height: 1.45;
  text-align: center;
  margin: 8px 0 12px;
}

.choices { display: grid; gap: 12px; }

.choice {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 92px;
  padding: 8px 14px 8px 8px;
  text-align: left;
  font-size: 22px;
  background: #fff;
  border: 0;
  border-radius: 28px;
  cursor: pointer;
  box-shadow: 0 7px 0 #f0c36a;
}

.choice:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 #f0c36a; }

.choice-pic {
  width: 76px;
  height: 76px;
  object-fit: contain;
  background: #fff6df;
  border-radius: 22px;
}

.choice-label {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-weight: 700;
  line-height: 1.3;
}

.choice.right { background: #d9ffe6; box-shadow: 0 7px 0 #3cba6a; }
.choice.wrong { background: #ffe4dc; box-shadow: 0 7px 0 #e25b45; }
.choice:disabled { cursor: default; }

.feedback {
  margin: 14px 4px 0;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
}

.next, .again {
  margin-top: 14px;
  width: 100%;
  min-height: 64px;
  border: 0;
  border-radius: 22px;
  background: var(--lemon);
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 7px 0 #e09a12;
}

.next:active, .again:active { transform: translateY(5px); box-shadow: 0 2px 0 #e09a12; }

.party .kicker, .soon .kicker {
  color: #e07a12;
  text-shadow: none;
}

.party { text-align: center; }
.party .reward {
  width: 120px;
  height: 120px;
  margin: 4px auto 8px;
  display: block;
  animation: wiggle 1.4s ease-in-out infinite;
}
.party h1 { font-size: 36px; }
.party .stem { margin-top: 8px; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(8deg); }
}

@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(18px); }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes pulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.03); }
}
