:root {
  --night: #25135b;
  --deep: #3e2489;
  --violet: #7d55e7;
  --violet-soft: #b18cff;
  --pink: #ff8bbb;
  --rose: #ff5f91;
  --gold: #ffd86f;
  --mint: #72e1c8;
  --sky: #bdefff;
  --cream: #fff9df;
  --ink: #2f2866;
  --soft-ink: #6d66a8;
  --glass: rgba(255, 250, 225, 0.78);
  --line: rgba(255, 255, 255, 0.42);
  --shadow: 0 26px 80px rgba(55, 32, 126, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Nunito", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--night);
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 216, 111, 0.34) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 62%, rgba(114, 225, 200, 0.34) 0 2px, transparent 3px),
    radial-gradient(circle at 22% 76%, rgba(255, 139, 187, 0.28) 0 2px, transparent 3px),
    radial-gradient(circle at 50% 40%, rgba(125, 85, 231, 0.36), transparent 42%),
    linear-gradient(180deg, #28115f 0%, #5e37aa 54%, #fff1bd 100%);
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 216, 111, 0.72) 0 1px, transparent 1.8px);
  background-position:
    0 0,
    42px 58px;
  background-size:
    118px 118px,
    164px 164px;
  opacity: 0.55;
  animation: starDrift 18s linear infinite;
}

.app-shell::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -18%;
  height: 42%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.78), transparent 35%),
    linear-gradient(135deg, rgba(131, 221, 203, 0.92), rgba(255, 244, 181, 0.94));
  box-shadow: 0 -24px 80px rgba(255, 216, 111, 0.28);
}

.sky span {
  position: absolute;
  display: block;
  pointer-events: none;
  z-index: 1;
}

.star {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff8c7;
  box-shadow: 0 0 18px rgba(255, 248, 199, 0.95);
}

.star-a {
  left: 10%;
  top: 18%;
}

.star-b {
  left: 82%;
  top: 12%;
}

.star-c {
  left: 78%;
  top: 68%;
}

.star-d {
  left: 18%;
  top: 74%;
}

.spark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(1px);
  animation: twinkle 2.5s ease-in-out infinite;
}

.spark-a {
  left: 31%;
  top: 22%;
}

.spark-b {
  right: 20%;
  top: 43%;
  animation-delay: 400ms;
}

.spark-c {
  left: 49%;
  bottom: 17%;
  animation-delay: 800ms;
}

.screen {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  min-height: calc(100vh - 36px);
  margin: 0 auto;
  display: grid;
}

.page {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 36px);
  display: grid;
  align-items: center;
  gap: 24px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: #fff8c7;
  font-size: clamp(58px, 10vw, 128px);
  line-height: 0.85;
  text-shadow: 0 8px 0 rgba(56, 33, 130, 0.22), 0 0 38px rgba(255, 216, 111, 0.46);
}

h2 {
  color: #fff8c7;
  font-size: clamp(36px, 6vw, 78px);
  line-height: 0.95;
  text-shadow: 0 6px 22px rgba(43, 24, 98, 0.45);
}

h3 {
  font-size: clamp(22px, 3vw, 32px);
}

.subtitle {
  margin-top: 16px;
  color: #fffde9;
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: 850;
  text-shadow: 0 2px 12px rgba(45, 30, 98, 0.36);
}

.chapter-tag,
.time-pill,
.step-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.2);
  color: #fffdf0;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
  backdrop-filter: blur(14px);
}

.primary-btn,
.round-btn,
.mode-card,
.choice-btn {
  border: 0;
  cursor: pointer;
  font-weight: 950;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.primary-btn {
  min-height: 62px;
  margin-top: 22px;
  padding: 0 34px;
  border-radius: 999px;
  color: #3f246e;
  background:
    radial-gradient(circle at 28% 25%, #ffffff 0 8%, transparent 18%),
    linear-gradient(135deg, var(--gold), #ff94bc 55%, #c6a5ff);
  box-shadow: 0 16px 32px rgba(255, 95, 145, 0.34), 0 0 28px rgba(255, 216, 111, 0.38);
  font-size: 20px;
}

.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  filter: grayscale(0.3);
}

.primary-btn:hover:not(:disabled),
.round-btn:hover,
.mode-card:hover,
.choice-btn:hover {
  transform: translateY(-3px);
}

.primary-btn:focus-visible,
.round-btn:focus-visible,
.mode-card:focus-visible,
.choice-btn:focus-visible {
  outline: 4px solid rgba(255, 216, 111, 0.76);
  outline-offset: 4px;
}

.home-world {
  grid-template-columns: minmax(310px, 0.88fr) minmax(380px, 1.12fr);
}

.home-copy {
  position: relative;
  z-index: 3;
  align-self: center;
}

.mission-panel,
.status-strip,
.review-panel,
.task-panel,
.reward-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.mission-panel {
  width: min(460px, 100%);
  margin-top: 28px;
  padding: 24px;
  color: var(--ink);
}

.mission-panel strong {
  display: block;
  color: var(--deep);
  font-size: 26px;
}

.mission-panel span {
  display: block;
  margin-top: 8px;
  color: var(--soft-ink);
  font-size: 18px;
  font-weight: 900;
}

.mission-panel .hint {
  color: #8b3f8a;
}

.status-strip {
  width: min(460px, 100%);
  margin-top: 14px;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 950;
}

.locked,
.unlocked {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
}

.locked {
  color: #716a96;
  background: rgba(110, 101, 151, 0.12);
}

.unlocked {
  color: #207760;
  background: rgba(114, 225, 200, 0.28);
}

.home-stage,
.poster-scene,
.story-canvas,
.task-scene,
.reward-scene,
.companion-stage {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
}

.world-orbit {
  position: absolute;
  right: 8%;
  top: 7%;
  width: min(580px, 50vw);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(255, 248, 199, 0.28);
  transform: rotate(-12deg);
  animation: orbitSpin 28s linear infinite;
}

.planet {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 25%, rgba(255, 255, 255, 0.9) 0 8%, transparent 17%),
    radial-gradient(circle at 66% 70%, rgba(255, 216, 111, 0.45), transparent 22%),
    linear-gradient(145deg, #6ee0cd, #87b6ff 50%, #b68bff);
  box-shadow:
    inset -28px -34px 60px rgba(52, 34, 132, 0.28),
    0 28px 80px rgba(38, 20, 93, 0.38),
    0 0 70px rgba(114, 225, 200, 0.34);
}

.planet::before {
  content: "";
  position: absolute;
  inset: 30% -25%;
  height: 25%;
  border-radius: 50%;
  border: 20px solid rgba(255, 248, 199, 0.54);
  transform: rotate(-16deg);
}

.big-planet {
  width: min(470px, 76vw);
}

.story-planet {
  left: 5%;
  top: 10%;
  width: min(260px, 36vw);
  opacity: 0.72;
}

.floating-word {
  position: absolute;
  z-index: 4;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 999px;
  color: #fffdf0;
  background: rgba(125, 85, 231, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 12px 30px rgba(43, 24, 98, 0.28);
  font-weight: 950;
  animation: float 3.6s ease-in-out infinite;
}

.word-hello {
  left: 8%;
  top: 21%;
}

.word-welcome {
  right: 7%;
  bottom: 24%;
  animation-delay: 700ms;
}

.fuxiaoxian {
  position: relative;
  width: 230px;
  height: 365px;
  filter: drop-shadow(0 28px 28px rgba(31, 18, 74, 0.26));
  animation: float 3.2s ease-in-out infinite;
}

.hero-character {
  position: relative;
  z-index: 5;
  transform: scale(1.13);
}

.poster-character,
.story-character,
.task-character,
.reward-character,
.side-character {
  position: absolute;
  z-index: 5;
}

.poster-character {
  left: 5%;
  bottom: 7%;
  transform: scale(0.86);
}

.story-character {
  left: 10%;
  bottom: 3%;
  transform: scale(0.76);
}

.task-character {
  left: 4%;
  bottom: 0;
  transform: scale(0.75);
}

.reward-character {
  left: 8%;
  bottom: 0;
  transform: scale(0.8);
}

.side-character {
  transform: scale(0.92);
}

.head {
  position: absolute;
  left: 70px;
  top: 72px;
  width: 88px;
  height: 92px;
  border-radius: 44% 44% 48% 48%;
  background: #ffe2cf;
  z-index: 3;
}

.hair-back {
  position: absolute;
  left: 43px;
  top: 28px;
  width: 142px;
  height: 188px;
  border-radius: 74px 74px 54px 54px;
  background: linear-gradient(180deg, #6640c6 0%, #8959e2 55%, #b26fff 100%);
  box-shadow: inset 16px 0 0 rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.bang-left,
.bang-right {
  position: absolute;
  top: 52px;
  z-index: 4;
  background: #6b42cb;
}

.bang-left {
  left: 61px;
  width: 65px;
  height: 48px;
  border-radius: 70% 20% 60% 30%;
  transform: rotate(-18deg);
}

.bang-right {
  right: 58px;
  width: 54px;
  height: 43px;
  border-radius: 20% 70% 30% 60%;
  transform: rotate(18deg);
}

.eye {
  position: absolute;
  top: 42px;
  width: 10px;
  height: 13px;
  border-radius: 50%;
  background: #34305f;
}

.eye-left {
  left: 27px;
}

.eye-right {
  right: 27px;
}

.smile {
  position: absolute;
  left: 35px;
  top: 63px;
  width: 22px;
  height: 11px;
  border-bottom: 3px solid #d45b86;
  border-radius: 0 0 20px 20px;
}

.shirt {
  position: absolute;
  left: 61px;
  top: 158px;
  width: 108px;
  height: 72px;
  border-radius: 24px 24px 12px 12px;
  background: #ffffff;
  z-index: 2;
  box-shadow: inset 0 -8px 0 rgba(125, 85, 231, 0.08);
}

.shirt::before {
  content: "";
  position: absolute;
  left: 41px;
  top: 0;
  width: 26px;
  height: 28px;
  background: #ffe2cf;
  border-radius: 0 0 14px 14px;
}

.skirt {
  position: absolute;
  left: 42px;
  top: 210px;
  width: 146px;
  height: 94px;
  clip-path: polygon(28% 0, 72% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #ffa3cc, #f05a9a);
  z-index: 2;
  box-shadow: inset 0 -12px 0 rgba(139, 49, 122, 0.12);
}

.arm,
.leg,
.shoe {
  position: absolute;
  z-index: 1;
}

.arm {
  top: 174px;
  width: 25px;
  height: 86px;
  border-radius: 14px;
  background: #ffe2cf;
}

.arm-left {
  left: 43px;
  transform: rotate(22deg);
}

.arm-right {
  right: 43px;
  transform: rotate(-24deg);
}

.leg {
  top: 294px;
  width: 23px;
  height: 50px;
  border-radius: 12px;
  background: #ffe2cf;
}

.leg-left {
  left: 82px;
}

.leg-right {
  right: 82px;
}

.shoe {
  top: 336px;
  width: 44px;
  height: 20px;
  border-radius: 18px 18px 8px 8px;
  background: #e9435b;
  box-shadow: 0 5px 0 rgba(116, 36, 70, 0.12);
}

.shoe-left {
  left: 63px;
}

.shoe-right {
  right: 63px;
}

.magic-book {
  position: absolute;
  right: 0;
  top: 190px;
  width: 70px;
  height: 54px;
  border-radius: 7px;
  background: linear-gradient(90deg, #5332ae 48%, #7655d6 50%);
  border: 3px solid #fff3a6;
  transform: rotate(13deg);
  z-index: 5;
  box-shadow: 0 0 28px rgba(255, 216, 111, 0.52);
}

.magic-book span {
  position: absolute;
  left: 28px;
  top: 15px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 22px var(--gold), 0 0 38px rgba(255, 216, 111, 0.68);
}

.poster-world {
  grid-template-columns: minmax(420px, 1.2fr) minmax(300px, 0.8fr);
}

.poster-title {
  position: relative;
  z-index: 6;
  align-self: center;
}

.poster-scene,
.story-canvas,
.task-scene,
.reward-scene {
  overflow: hidden;
  border-radius: 8px;
}

.poster-scene {
  background:
    radial-gradient(circle at 50% 54%, rgba(255, 216, 111, 0.26), transparent 32%),
    linear-gradient(180deg, rgba(40, 17, 95, 0.24), rgba(255, 243, 188, 0.12));
}

.world-floor {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 5%;
  height: 28%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.45), transparent 34%),
    linear-gradient(90deg, rgba(114, 225, 200, 0.36), rgba(255, 216, 111, 0.34));
  filter: blur(1px);
}

.gate {
  position: relative;
  z-index: 3;
  width: min(430px, 78vw);
  height: 360px;
  display: grid;
  place-items: end center;
  filter: drop-shadow(0 24px 36px rgba(35, 18, 84, 0.28));
}

.gate::before,
.gate::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 78px;
  height: 292px;
  border-radius: 40px 40px 8px 8px;
  background: linear-gradient(180deg, #fff6bd, #93e6d1 70%, #79cbbf);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.42);
}

.gate::before {
  left: 52px;
}

.gate::after {
  right: 52px;
}

.gate-arch {
  position: absolute;
  bottom: 108px;
  width: 312px;
  height: 205px;
  border: 40px solid #fff6bd;
  border-bottom: 0;
  border-radius: 170px 170px 0 0;
  box-shadow: 0 0 34px rgba(255, 216, 111, 0.62);
}

.gate-door {
  position: absolute;
  bottom: 0;
  width: 194px;
  height: 205px;
  border-radius: 100px 100px 10px 10px;
  background: linear-gradient(180deg, #7046d1, #5bcfbd);
  border: 8px solid rgba(255, 255, 255, 0.58);
  transition: transform 500ms ease, opacity 500ms ease;
}

.gate-light {
  position: absolute;
  bottom: 28px;
  width: 150px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 216, 111, 0.34);
  filter: blur(16px);
  opacity: 0.25;
}

.gate-glow .gate-light,
.gate-open .gate-light {
  opacity: 0.9;
  animation: pulse 1.4s ease-in-out infinite;
}

.gate-open .gate-door {
  transform: scaleX(0.22);
  opacity: 0.28;
}

.sprite {
  position: absolute;
  right: 14%;
  top: 26%;
  z-index: 6;
  width: 62px;
  height: 62px;
  border-radius: 50% 50% 48% 52%;
  background: #fff4a0;
  box-shadow: 0 0 28px rgba(255, 216, 111, 0.92);
  animation: bob 2.2s ease-in-out infinite;
}

.sprite::before,
.sprite::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 38px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
}

.sprite::before {
  left: -16px;
  transform: rotate(-26deg);
}

.sprite::after {
  right: -16px;
  transform: rotate(26deg);
}

.story-world {
  grid-template-rows: auto 1fr auto;
}

.story-topbar,
.story-controls {
  position: relative;
  z-index: 7;
  align-items: center;
  gap: 18px;
}

.story-topbar {
  display: flex;
  justify-content: space-between;
}

.story-topbar h2 {
  margin-top: 8px;
  font-size: clamp(32px, 5vw, 62px);
}

.story-canvas {
  min-height: 560px;
  background:
    radial-gradient(circle at 50% 56%, rgba(255, 216, 111, 0.28), transparent 34%),
    radial-gradient(circle at 80% 26%, rgba(114, 225, 200, 0.2), transparent 24%),
    linear-gradient(180deg, rgba(39, 18, 94, 0.18), rgba(255, 247, 199, 0.2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.story-canvas.scene-book .magic-book,
.story-canvas.scene-magic .magic-book {
  animation: bookGlow 1.1s ease-in-out infinite;
}

.story-canvas.scene-open {
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 216, 111, 0.52), transparent 38%),
    linear-gradient(180deg, rgba(114, 225, 200, 0.24), rgba(255, 247, 199, 0.28));
}

.magic-caption {
  position: absolute;
  right: clamp(18px, 4vw, 56px);
  bottom: clamp(18px, 4vw, 46px);
  z-index: 8;
  width: min(460px, 88%);
  padding: 22px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 249, 223, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 18px 52px rgba(39, 18, 94, 0.24);
  backdrop-filter: blur(14px);
}

.magic-caption span {
  display: block;
  color: var(--deep);
  font-weight: 950;
}

.magic-caption strong {
  display: block;
  margin-top: 8px;
  color: #8b3f8a;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1;
}

.magic-caption p {
  margin-top: 12px;
  color: var(--soft-ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.55;
}

.story-controls {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  min-height: 74px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 250, 225, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
}

.round-btn {
  min-width: 96px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fffdf0;
  background: rgba(62, 36, 137, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 12px 28px rgba(32, 18, 74, 0.22);
}

.progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.26);
}

.progress-fill {
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--gold), var(--pink));
  box-shadow: 0 0 18px rgba(255, 216, 111, 0.52);
  transition: width 260ms linear;
}

.review-world,
.task-world,
.reward-world {
  grid-template-columns: minmax(300px, 0.85fr) minmax(340px, 1.15fr);
}

.review-panel,
.task-panel,
.reward-panel {
  position: relative;
  z-index: 6;
  padding: clamp(22px, 4vw, 40px);
}

.review-panel h2,
.task-panel h2,
.reward-panel h2 {
  color: var(--deep);
  text-shadow: none;
}

.review-panel .subtitle,
.task-panel .subtitle,
.reward-panel .subtitle {
  color: var(--soft-ink);
  text-shadow: none;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}

.mode-card {
  min-height: 84px;
  padding: 18px;
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(125, 85, 231, 0.16);
}

.mode-card strong,
.mode-card span {
  display: block;
}

.mode-card span {
  margin-top: 8px;
  color: var(--soft-ink);
}

.mode-card.done {
  background: rgba(114, 225, 200, 0.26);
}

.task-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.task-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.choice-btn {
  min-height: 150px;
  padding: 16px;
  display: grid;
  place-items: center;
  gap: 12px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(125, 85, 231, 0.16);
  box-shadow: 0 14px 34px rgba(55, 32, 126, 0.12);
}

.choice-btn.correct {
  background: rgba(114, 225, 200, 0.34);
}

.world-icon {
  position: relative;
  width: 72px;
  height: 72px;
  display: block;
}

.world-icon::before,
.world-icon::after {
  content: "";
  position: absolute;
}

.world-icon-portal,
.world-icon-gate,
.world-icon-open {
  border-radius: 50% 50% 8px 8px;
  border: 8px solid #fff3a6;
  background: linear-gradient(180deg, #7d55e7, #72e1c8);
  box-shadow: 0 0 22px rgba(255, 216, 111, 0.5);
}

.world-icon-open {
  background: linear-gradient(180deg, #fff3a6, #72e1c8);
}

.world-icon-book {
  border-radius: 8px;
  background: linear-gradient(90deg, #5332ae 48%, #7655d6 50%);
  border: 5px solid #fff3a6;
}

.world-icon-book::before {
  left: 26px;
  top: 24px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold);
}

.world-icon-candy {
  border-radius: 50%;
  background: linear-gradient(135deg, #ff94bc, #fff3a6);
}

.world-icon-candy::before,
.world-icon-candy::after {
  top: 24px;
  width: 26px;
  height: 24px;
  background: #fff3a6;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

.world-icon-candy::before {
  left: -18px;
}

.world-icon-candy::after {
  right: -18px;
  transform: rotate(180deg);
}

.world-icon-moon {
  border-radius: 50%;
  background: #fff3a6;
  box-shadow: inset -18px 0 0 #7d55e7;
}

.world-icon-path {
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 18%, #fff3a6 0 5px, transparent 6px),
    radial-gradient(circle at 40% 46%, #fff3a6 0 5px, transparent 6px),
    radial-gradient(circle at 58% 74%, #fff3a6 0 5px, transparent 6px),
    linear-gradient(180deg, #72e1c8, #7d55e7);
}

.world-icon-cloud {
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    -18px 12px 0 -2px #ffffff,
    18px 10px 0 -4px #ffffff,
    0 12px 22px rgba(125, 85, 231, 0.18);
}

.world-icon-star,
.world-icon-hello {
  clip-path: polygon(50% 0, 62% 35%, 98% 35%, 68% 56%, 80% 94%, 50% 70%, 20% 94%, 32% 56%, 2% 35%, 38% 35%);
  background: var(--gold);
  box-shadow: 0 0 24px rgba(255, 216, 111, 0.64);
}

.reward-panel {
  text-align: center;
}

.big-star {
  width: 124px;
  height: 124px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff9df;
  background: radial-gradient(circle, #fff6bd, #ffd86f);
  font-size: 80px;
  line-height: 1;
  box-shadow: 0 0 52px rgba(255, 216, 111, 0.82);
  animation: pop 850ms ease both;
}

.reward-row {
  margin: 24px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.reward-chip {
  min-height: 42px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(125, 85, 231, 0.16);
  font-weight: 950;
}

@keyframes starDrift {
  from {
    background-position:
      0 0,
      42px 58px;
  }
  to {
    background-position:
      118px 118px,
      206px 222px;
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.84);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.92);
  }
  50% {
    transform: scale(1.12);
  }
}

@keyframes bookGlow {
  0%,
  100% {
    box-shadow: 0 0 28px rgba(255, 216, 111, 0.5);
  }
  50% {
    box-shadow: 0 0 46px rgba(255, 216, 111, 0.86);
  }
}

@keyframes orbitSpin {
  from {
    transform: rotate(-12deg);
  }
  to {
    transform: rotate(348deg);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.78) rotate(-12deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 12px;
  }

  .screen,
  .page {
    min-height: calc(100vh - 24px);
  }

  .home-world,
  .poster-world,
  .review-world,
  .task-world,
  .reward-world {
    grid-template-columns: 1fr;
  }

  .home-stage,
  .poster-scene,
  .story-canvas,
  .task-scene,
  .reward-scene,
  .companion-stage {
    min-height: 430px;
  }

  .home-stage,
  .poster-scene,
  .task-scene,
  .reward-scene,
  .companion-stage {
    order: -1;
  }

  .home-copy,
  .poster-title {
    text-align: center;
  }

  .mission-panel,
  .status-strip {
    margin-left: auto;
    margin-right: auto;
  }

  .poster-character,
  .story-character,
  .task-character,
  .reward-character {
    left: 0;
    transform: scale(0.64);
  }

  .story-canvas {
    min-height: 500px;
  }

  .magic-caption {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }

  .story-topbar,
  .task-header {
    align-items: stretch;
    flex-direction: column;
  }

  .story-controls {
    grid-template-columns: 1fr 1fr;
  }

  .story-controls .progress-track {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .round-btn {
    width: 100%;
  }

  .task-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
