@font-face {
  font-family: "ZCOOL KuaiLe";
  src: url("./assets/fonts/ZCOOLKuaiLe-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("./assets/fonts/Nunito-VariableFont_wght.ttf") format("truetype");
  font-display: swap;
}

:root {
  color: #35545a;
  background: #dce9e5;
  font-family: "ZCOOL KuaiLe", system-ui, sans-serif;
  line-height: 1.4;
  --ink: #35545a;
  --teal: #4aa5a2;
  --teal-dark: #347e7d;
  --sky: #bce7e7;
  --cream: #fff8dc;
  --yellow: #f7ca62;
  --coral: #ee8776;
  --green: #85bd7a;
  --white: #fffdf4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-width: 320px; background: #dce9e5; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: #dce9e5;
}

button, select, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.app-shell {
  position: relative;
  width: min(100%, 460px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
}

.app-header {
  position: absolute;
  z-index: 20;
  top: max(10px, env(safe-area-inset-top));
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  min-height: 48px;
  gap: 8px;
  pointer-events: none;
}

.app-header > * { pointer-events: auto; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-right: auto;
  padding: 3px 7px 3px 3px;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand-lockup small,
.brand-lockup strong { display: block; letter-spacing: 0; }
.brand-lockup small { font-size: 9px; opacity: .74; }
.brand-lockup strong { font-size: 17px; line-height: 1.05; }

.brand-mark {
  display: grid;
  width: 34px;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(53, 84, 90, .28);
  border-radius: 48% 52% 44% 56%;
  background: rgba(255, 253, 244, .8);
  transform: rotate(-6deg);
}
.brand-mark img { width: 25px; height: 25px; object-fit: contain; }
.brand-logo { display: block; object-fit: contain; }
.role-asset { display: block; object-fit: contain; }
.welcome-logo { width: 62px; height: 62px; margin: 0 auto -5px; }

.app-shell[data-screen="sky"] .brand-lockup { color: #f7fff8; }

.round-icon-button,
.language-control {
  display: inline-flex;
  min-width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(53, 84, 90, .22);
  border-radius: 48% 52% 46% 54%;
  background: rgba(255, 253, 244, .88);
  box-shadow: 0 2px 0 rgba(53, 84, 90, .12);
}

.round-icon-button { border-radius: 54% 46% 51% 49%; }
.round-icon-button .icon { font-size: 21px; }

.language-control { position: relative; gap: 1px; padding: 0 6px; }
.language-control .ph { font-size: 17px; }
.language-control select {
  width: 31px;
  min-height: 38px;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

#app { min-height: 100dvh; }

.screen {
  position: relative;
  min-height: 100dvh;
  padding: 82px 20px calc(112px + env(safe-area-inset-bottom));
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(81, 150, 133, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(81, 150, 133, .07) 1px, transparent 1px);
  background-size: 44px 44px;
}

.screen::after,
.interaction-zone::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: auto 0 92px;
  height: 132px;
  pointer-events: none;
  opacity: .17;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='56' viewBox='0 0 120 56'%3E%3Cpath d='M10 42c5-9 10-9 15 0 5-12 10-12 15 0M75 22c5-8 10-8 15 0 5-11 10-11 15 0' fill='none' stroke='%235d9d78' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
}

h2, h3, p { margin: 0; }
h2 { font-size: clamp(25px, 8vw, 34px); line-height: 1.12; }
h3 { font-size: 19px; line-height: 1.2; }
.muted { opacity: .68; }
.eyebrow { font-size: 13px; color: var(--teal-dark); }
.number { font-family: "Nunito", sans-serif; font-weight: 850; }
.icon { display: inline-block; flex: none; font-size: 1.3em; line-height: 1; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.notice {
  position: fixed;
  z-index: 40;
  top: 68px;
  left: 50%;
  width: min(calc(100% - 32px), 420px);
  padding: 10px 14px;
  transform: translateX(-50%);
  border: 2px solid rgba(53, 84, 90, .25);
  border-radius: 18px 13px 20px 14px;
  background: #fff5bb;
  box-shadow: 0 3px 0 rgba(53, 84, 90, .12);
  font-size: 13px;
  text-align: center;
}

.image-sticker {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 5px solid var(--white);
  border-radius: 22px;
  outline: 2px solid rgba(53, 84, 90, .2);
  background: var(--white);
}
.image-sticker img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-image { aspect-ratio: 1.2; }
.task-image { aspect-ratio: 1.45; }
.map-image { aspect-ratio: .72; }

.primary-button,
.secondary-button,
.sticker-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 2px solid rgba(53, 84, 90, .25);
  background: var(--yellow);
  box-shadow: 0 3px 0 rgba(53, 84, 90, .13);
  font-weight: 700;
}
.primary-button {
  width: min(100%, 290px);
  margin: 0 auto;
  padding: 12px 22px;
  border-radius: 45% 55% 48% 52% / 55% 48% 52% 45%;
}
.secondary-button {
  padding: 10px 17px;
  border-radius: 20px 16px 19px 15px;
  background: var(--white);
}
.primary-button:active,
.secondary-button:active,
.sticker-button:active { transform: translateY(2px); box-shadow: none; }
.subtle-demo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px auto 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-dark, #2b6c73);
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px dashed var(--teal-dark, #2b6c73);
  border-radius: 20px;
  opacity: 0.85;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
}
.subtle-demo-button:active {
  opacity: 1;
  transform: scale(0.96);
}
.subtle-demo-button .icon {
  font-size: 15px;
}
.actions { display: flex; flex-wrap: wrap; gap: 11px; justify-content: center; }

.welcome-screen .content { align-content: center; min-height: calc(100dvh - 180px); text-align: center; }
.welcome-title {
  margin: 0;
  color: var(--ink);
  font: 900 clamp(30px, 9vw, 42px)/1.05 "Nunito", sans-serif;
}
.welcome-screen h2 { color: var(--teal-dark); }
.welcome-sun {
  display: grid;
  width: min(68vw, 285px);
  aspect-ratio: 1;
  margin: -2px auto;
  place-items: center;
}
.welcome-sun-art {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 0 rgba(53, 84, 90, .12));
  transform: rotate(-4deg);
}

.nfc-orbit {
  position: relative;
  display: grid;
  width: min(64vw, 250px);
  aspect-ratio: 1;
  margin: 18px auto 4px;
  place-items: center;
  border: 3px dashed rgba(74, 165, 162, .38);
  border-radius: 49% 51% 54% 46%;
  background: rgba(255, 253, 244, .8);
}
.pairing-moon {
  width: 76%;
  height: 76%;
  filter: drop-shadow(0 4px 0 rgba(53, 84, 90, .12));
}
.nfc-orbit > span {
  position: absolute;
  right: 9%;
  bottom: 8%;
  display: grid;
  width: 66px;
  aspect-ratio: 1;
  place-items: center;
  border: 4px solid var(--white);
  border-radius: 54% 46% 50% 50%;
  background: var(--yellow);
  color: var(--teal-dark);
  font-size: 34px;
  transform: rotate(-4deg);
}

.ritual-overlay {
  position: fixed;
  z-index: 100;
  inset: 0 auto 0 50%;
  width: min(100%, 460px);
  min-height: 100dvh;
  transform: translateX(-50%);
  overflow: hidden;
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(81, 150, 133, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(81, 150, 133, .07) 1px, transparent 1px);
  background-size: 44px 44px;
}
.ritual-overlay.is-leaving {
  pointer-events: none;
  animation: ritual-overlay-leave var(--ritual-exit-duration, 650ms) ease-in forwards;
}

.ritual-stage { position: relative; width: 100%; height: 100dvh; min-height: 620px; }
.ritual-asset { position: absolute; display: block; object-fit: contain; }
.ritual-waves { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ritual-waves i {
  position: absolute;
  width: 100px;
  aspect-ratio: 1;
  border: 4px solid var(--teal);
  border-radius: 50%;
  opacity: 0;
}
.ritual-reader {
  position: absolute;
  z-index: 3;
  top: 47%;
  left: 50%;
  display: grid;
  width: 106px;
  aspect-ratio: 1;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 3px dashed rgba(74, 165, 162, .48);
  border-radius: 50%;
  background: rgba(255, 253, 244, .88);
  color: var(--teal-dark);
  font-size: 46px;
}
.ritual-scanning strong {
  position: absolute;
  z-index: 4;
  top: calc(47% + 82px);
  left: 0;
  right: 0;
  text-align: center;
}
.ritual-scanning .ritual-waves i { animation: ritual-scan-wave 1.8s ease-out infinite; }
.ritual-scanning .ritual-waves i:nth-child(2) { animation-delay: .6s; }
.ritual-scanning .ritual-waves i:nth-child(3) { animation-delay: 1.2s; }

.ritual-pair .ritual-waves,
.ritual-star .ritual-waves { top: 7%; }
.ritual-pair .ritual-waves i,
.ritual-star .ritual-waves i { animation: ritual-success-wave 1.15s ease-out forwards; }
.ritual-pair .ritual-waves i:nth-child(2),
.ritual-star .ritual-waves i:nth-child(2) { animation-delay: .15s; }
.ritual-pair .ritual-waves i:nth-child(3),
.ritual-star .ritual-waves i:nth-child(3) { animation-delay: .3s; }

.ritual-pair .ritual-sun,
.ritual-pair .ritual-moon {
  z-index: 5;
  top: 37%;
  width: 142px;
  opacity: 0;
  filter: drop-shadow(0 4px 0 rgba(53, 84, 90, .12));
}
.ritual-pair .ritual-sun { left: -110px; animation: ritual-sun-meet 1.25s cubic-bezier(.2, .85, .2, 1) .7s forwards; }
.ritual-pair .ritual-moon { right: -110px; animation: ritual-moon-meet 1.25s cubic-bezier(.2, .85, .2, 1) .7s forwards; }
.ritual-connection {
  position: absolute;
  z-index: 6;
  top: 48%;
  left: 50%;
  width: 18px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.2);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(238, 135, 118, .35);
  opacity: 0;
  animation: ritual-connect .65s ease 1.65s forwards;
}
.ritual-partner-sticker {
  position: absolute;
  z-index: 8;
  top: 45%;
  left: 50%;
  width: min(70vw, 270px);
  aspect-ratio: 1.28;
  transform: translate(-50%, -50%) scale(.2) rotate(-8deg);
  overflow: hidden;
  border: 7px solid var(--white);
  border-radius: 47% 53% 45% 55% / 52% 45% 55% 48%;
  outline: 2px solid rgba(53, 84, 90, .16);
  background: var(--sky);
  opacity: 0;
  animation: ritual-sticker-reveal .78s cubic-bezier(.18, 1.42, .35, 1) 2.05s forwards;
}
.ritual-partner-sticker .ritual-asset {
  top: 19%;
  width: 54%;
  filter: drop-shadow(0 3px 0 rgba(53, 84, 90, .1));
}
.ritual-sticker-sun { left: 4%; transform: rotate(-7deg); }
.ritual-sticker-moon { right: 3%; transform: rotate(7deg); }

.ritual-arrival .ritual-stage {
  background:
    linear-gradient(to bottom, var(--sky) 0 48%, transparent 48%),
    var(--cream);
}
.arrival-sky {
  position: absolute;
  inset: 0 0 52%;
  overflow: hidden;
  border-radius: 0 0 52% 10% / 0 0 16% 7%;
}
.arrival-sky i {
  position: absolute;
  width: 56px;
  height: 18px;
  border-top: 3px solid rgba(52, 126, 125, .18);
  border-radius: 50%;
}
.arrival-sky i:nth-child(1) { top: 20%; left: 8%; transform: rotate(-6deg); }
.arrival-sky i:nth-child(2) { top: 34%; right: 7%; width: 78px; transform: rotate(5deg); }
.arrival-sky i:nth-child(3) { bottom: 17%; left: 28%; width: 92px; }
.arrival-beacon {
  position: absolute;
  z-index: 5;
  top: 15%;
  left: 50%;
  width: 178px;
  height: 178px;
  transform: translateX(-50%);
}
.arrival-moon {
  z-index: 3;
  inset: 9px;
  width: 160px;
  filter: drop-shadow(0 4px 0 rgba(53, 84, 90, .12));
  animation: arrival-moon-beacon .8s cubic-bezier(.2, 1.35, .35, 1) .28s both;
}
.arrival-beacon-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.arrival-beacon-rings i {
  position: absolute;
  width: 88px;
  aspect-ratio: 1;
  border: 3px solid rgba(74, 165, 162, .5);
  border-radius: 50%;
  opacity: 0;
  animation: arrival-beacon-wave 1.5s ease-out .75s forwards;
}
.arrival-beacon-rings i:nth-child(2) { animation-delay: 1.05s; }
.arrival-sun {
  z-index: 6;
  top: 63%;
  left: 50%;
  width: 154px;
  transform: translate(-50%, 120px) rotate(-8deg);
  opacity: 0;
  filter: drop-shadow(0 4px 0 rgba(53, 84, 90, .12));
  animation: arrival-sun-approach 1.15s cubic-bezier(.25, .8, .3, 1) .85s forwards;
}
.arrival-map-ripple {
  position: absolute;
  z-index: 4;
  top: 51%;
  left: 50%;
  display: grid;
  width: 220px;
  height: 100px;
  place-items: center;
  transform: translate(-50%, -50%);
}
.arrival-map-ripple i {
  position: absolute;
  width: 70px;
  height: 28px;
  border: 3px dashed var(--teal);
  border-radius: 50%;
  opacity: 0;
  animation: arrival-map-wave .9s ease-out 1.65s forwards;
}
.arrival-map-ripple i:nth-child(2) { animation-delay: 1.82s; }
.arrival-map-ripple i:nth-child(3) { animation-delay: 1.99s; }
.arrival-stamp,
.arrival-task {
  position: absolute;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 4px solid var(--white);
  outline: 2px solid rgba(53, 84, 90, .16);
  opacity: 0;
}
.arrival-stamp {
  top: 53%;
  left: 12%;
  padding: 10px 15px;
  transform: rotate(-7deg) scale(.3);
  border-radius: 20px 15px 19px 14px;
  background: var(--yellow);
  animation: arrival-stamp-pop .55s cubic-bezier(.2, 1.4, .4, 1) 2.05s forwards;
}
.arrival-stamp span { color: var(--coral); font-size: 23px; }
.arrival-task {
  top: 61%;
  right: 9%;
  max-width: 62%;
  padding: 12px 15px;
  transform: rotate(6deg) scale(.3);
  border-radius: 47% 53% 46% 54% / 54% 46% 55% 45%;
  background: #a8d5a0;
  animation: arrival-task-pop .55s cubic-bezier(.2, 1.4, .4, 1) 2.28s forwards;
}
.arrival-task > .icon,
.arrival-task-icon .icon { color: var(--teal-dark); font-size: 30px; }
.arrival-region-tasks { max-width: 68%; }
.region-discovery-icons { display: inline-flex; gap: 4px; color: var(--teal-dark); font-size: 26px; }
.ritual-arrival .ritual-result { animation-delay: 2.7s; }

.ritual-sparks i {
  position: absolute;
  z-index: 10;
  color: var(--coral);
  font-style: normal;
  font-size: 28px;
  opacity: 0;
  animation: ritual-spark .65s ease 2.3s forwards;
}
.ritual-sparks i:nth-child(1) { left: 18%; top: 25%; }
.ritual-sparks i:nth-child(2) { right: 17%; top: 34%; animation-delay: 2.4s; }
.ritual-sparks i:nth-child(3) { left: 26%; top: 64%; color: var(--yellow); animation-delay: 2.5s; }
.ritual-sparks i:nth-child(4) { right: 25%; top: 62%; color: var(--teal); animation-delay: 2.45s; }

.ritual-result {
  position: absolute;
  z-index: 12;
  left: 20px;
  right: 20px;
  bottom: max(72px, calc(48px + env(safe-area-inset-bottom)));
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  animation: ritual-result-in .45s ease 2.72s forwards;
}
.ritual-result strong { display: block; font-size: 27px; }
.ritual-result small { display: block; margin-top: 5px; color: var(--teal-dark); font-size: 14px; }

.ritual-star .ritual-sky {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 48%;
  transform: scaleY(.08);
  transform-origin: top;
  overflow: hidden;
  border-radius: 0 0 52% 10% / 0 0 13% 6%;
  background: #477f8a;
  color: #fff;
  opacity: 0;
  animation: ritual-sky-open .6s ease 2.05s forwards;
}
.ritual-sky > strong { position: absolute; top: max(24px, env(safe-area-inset-top)); left: 20px; font-size: 18px; }
.ritual-sky > i { position: absolute; color: rgba(255,255,255,.42); font-style: normal; font-size: 24px; }
.ritual-sky > i:nth-of-type(1) { left: 12%; top: 33%; }
.ritual-sky > i:nth-of-type(2) { right: 13%; top: 24%; }
.ritual-sky > i:nth-of-type(3) { right: 24%; bottom: 16%; }
.ritual-star-collected {
  z-index: 2;
  top: 22%;
  left: 50%;
  width: 132px;
  transform: translate(-50%, -50%) scale(.2) rotate(-16deg);
  opacity: 0;
  animation: ritual-collected-pop .6s cubic-bezier(.2, 1.4, .4, 1) 3.02s forwards;
}
.ritual-star .ritual-new-star {
  z-index: 9;
  top: 47%;
  left: 50%;
  width: 152px;
  transform: translate(-50%, -50%) scale(.2) rotate(-20deg);
  opacity: 0;
  filter: drop-shadow(0 4px 0 rgba(53, 84, 90, .13));
  animation:
    ritual-star-arrive 1.05s cubic-bezier(.18, 1.35, .35, 1) .55s forwards,
    ritual-star-to-sky .9s cubic-bezier(.4, 0, .2, 1) 2.35s forwards;
}
.ritual-partners {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 18%;
  width: 330px;
  height: 145px;
  transform: translateX(-50%);
}
.ritual-partners .ritual-asset { top: 0; width: 142px; filter: drop-shadow(0 4px 0 rgba(53, 84, 90, .12)); }
.ritual-partners .ritual-sun { left: 0; animation: ritual-catch-sun 1s ease 1.08s forwards; }
.ritual-partners .ritual-moon { right: 0; animation: ritual-catch-moon 1s ease 1.08s forwards; }
.ritual-star .ritual-result { animation-delay: 3.25s; }
.ritual-star .ritual-result small { color: var(--teal-dark); }

@keyframes ritual-scan-wave {
  0% { opacity: .55; transform: scale(.4); }
  100% { opacity: 0; transform: scale(3.1); }
}
@keyframes ritual-success-wave {
  0% { opacity: .6; transform: scale(.35); }
  100% { opacity: 0; transform: scale(3.4); }
}
@keyframes ritual-sun-meet {
  0% { left: -110px; opacity: 0; transform: rotate(-22deg); }
  60% { left: 22%; opacity: 1; transform: translateX(-50%) rotate(7deg); }
  80% { left: 39%; opacity: 1; transform: translateX(-50%) rotate(-3deg); }
  100% { left: 43%; opacity: 0; transform: translateX(-50%) scale(.65); }
}
@keyframes ritual-moon-meet {
  0% { right: -110px; opacity: 0; transform: rotate(22deg); }
  60% { right: 22%; opacity: 1; transform: translateX(50%) rotate(-7deg); }
  80% { right: 39%; opacity: 1; transform: translateX(50%) rotate(3deg); }
  100% { right: 43%; opacity: 0; transform: translateX(50%) scale(.65); }
}
@keyframes ritual-connect {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  55% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 0 20px rgba(238, 135, 118, .2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.7); box-shadow: 0 0 0 38px rgba(238, 135, 118, 0); }
}
@keyframes ritual-sticker-reveal {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-8deg); }
  72% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(3deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
}
@keyframes arrival-moon-beacon {
  0% { opacity: 0; transform: translateY(-30px) scale(.55) rotate(-8deg); }
  75% { opacity: 1; transform: translateY(4px) scale(1.08) rotate(3deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes arrival-beacon-wave {
  0% { opacity: .65; transform: scale(.45); }
  100% { opacity: 0; transform: scale(2); }
}
@keyframes arrival-sun-approach {
  0% { opacity: 0; transform: translate(-50%, 120px) rotate(-8deg); }
  70% { opacity: 1; transform: translate(-50%, -60px) rotate(4deg); }
  100% { opacity: 1; transform: translate(-50%, -42px); }
}
@keyframes arrival-map-wave {
  0% { opacity: .7; transform: scale(.35); }
  100% { opacity: 0; transform: scale(2.8); }
}
@keyframes arrival-stamp-pop {
  0% { opacity: 0; transform: rotate(-12deg) scale(.3); }
  75% { opacity: 1; transform: rotate(-4deg) scale(1.1); }
  100% { opacity: 1; transform: rotate(-7deg) scale(1); }
}
@keyframes arrival-task-pop {
  0% { opacity: 0; transform: rotate(12deg) scale(.3); }
  75% { opacity: 1; transform: rotate(3deg) scale(1.08); }
  100% { opacity: 1; transform: rotate(6deg) scale(1); }
}
@keyframes ritual-spark {
  0% { opacity: 0; transform: scale(.2) rotate(0); }
  65% { opacity: 1; transform: scale(1.25) rotate(18deg); }
  100% { opacity: .78; transform: scale(1) rotate(8deg); }
}
@keyframes ritual-result-in { to { opacity: 1; transform: none; } }
@keyframes ritual-overlay-leave {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes ritual-sky-open { to { opacity: 1; transform: scaleY(1); } }
@keyframes ritual-star-arrive {
  0% { opacity: 0; transform: translate(-50%, -75%) scale(.2) rotate(-20deg); }
  72% { opacity: 1; transform: translate(-50%, -50%) scale(1.16) rotate(8deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes ritual-catch-sun { 65% { left: 53px; transform: translateY(-12px) rotate(5deg); } 100% { left: 42px; transform: none; } }
@keyframes ritual-catch-moon { 65% { right: 53px; transform: translateY(-12px) rotate(-5deg); } 100% { right: 42px; transform: none; } }
@keyframes ritual-star-to-sky {
  0% { top: 47%; opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75% { top: 22%; opacity: 1; transform: translate(-50%, -50%) scale(.55) rotate(24deg); }
  100% { top: 22%; opacity: 0; transform: translate(-50%, -50%) scale(.22); }
}
@keyframes ritual-collected-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-16deg); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1.16) rotate(7deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.profile-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.profile-name h2 { min-width: 0; overflow-wrap: anywhere; }
.speech-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  border: 2px dashed rgba(53, 84, 90, .25);
  border-radius: 21px 14px 19px 16px;
  background: rgba(255, 253, 244, .65);
}
.speech-strip .icon { font-size: 30px; color: var(--coral); }
.mini-facts { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-fact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 17px 13px 16px 14px;
  background: var(--sky);
}

.home-screen { padding: 0 0 calc(92px + env(safe-area-inset-bottom)); background: var(--cream); }
.home-screen::after { display: none; }

.info-zone {
  position: relative;
  z-index: 1;
  min-height: 300px;
  padding: 84px 23px 55px;
  overflow: hidden;
  border-radius: 0 0 53% 9% / 0 0 14% 7%;
  background-color: var(--sky);
  background-image:
    radial-gradient(ellipse at 18% 25%, transparent 0 17px, rgba(66, 140, 148, .11) 18px 20px, transparent 21px),
    radial-gradient(ellipse at 82% 58%, transparent 0 25px, rgba(66, 140, 148, .1) 26px 28px, transparent 29px);
}
.area-line { display: flex; align-items: center; gap: 8px; color: var(--teal-dark); }
.home-sun { width: 37px; height: 37px; margin-right: 1px; filter: drop-shadow(0 2px 0 rgba(53, 84, 90, .1)); }
.area-line .icon { font-size: 22px; }
.area-title { margin: 5px 0 0; font-size: 38px; color: var(--ink); }
.area-title-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.region-title-arrow { font-size: 22px; opacity: .5; transition: transform .2s ease; }
.area-title-button[aria-expanded="true"] .region-title-arrow { transform: rotate(90deg); }
.region-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.region-picker-button {
  min-height: 34px;
  padding: 6px 12px;
  border: 2px solid rgba(53, 84, 90, .18);
  border-radius: 16px 13px 15px 14px;
  background: rgba(255, 253, 244, .76);
  font-size: 13px;
}
.region-picker-button:nth-child(2) { transform: rotate(1deg); }
.region-picker-button:nth-child(3) { transform: rotate(-1deg); }
.region-picker-button.active { background: var(--yellow); }
.update-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 4px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .48);
  font: 750 11px "Nunito", sans-serif;
}
.status-row { display: flex; margin-top: 25px; gap: 11px; }
.status-blob {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 2px solid rgba(53, 84, 90, .15);
  background: rgba(255, 253, 244, .75);
}
.status-blob:nth-child(1) { border-radius: 19px 13px 18px 14px; transform: rotate(-1deg); }
.status-blob:nth-child(2) { border-radius: 14px 20px 13px 19px; transform: translateY(6px) rotate(1deg); }
.status-blob:nth-child(3) { border-radius: 20px 15px 18px 13px; transform: translateY(-3px) rotate(-2deg); }
.status-blob .icon { color: var(--teal-dark); font-size: 25px; }
.status-star { width: 30px; height: 30px; flex: none; }
.status-blob strong { display: block; font: 850 20px/1 "Nunito", sans-serif; white-space: nowrap; }
.status-blob small { display: block; margin-top: 3px; font-size: 10px; opacity: .65; }

.interaction-zone {
  position: relative;
  min-height: 430px;
  padding: 26px 22px 150px;
  background-color: var(--cream);
  background-image:
    linear-gradient(rgba(81, 150, 133, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(81, 150, 133, .06) 1px, transparent 1px);
  background-size: 46px 46px;
}
.interaction-zone::after { bottom: 60px; }
.nearby-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
}
.nearby-title .icon { color: var(--coral); }
.task-scatter {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 13px;
  margin-top: 14px;
  padding: 2px 3px 18px;
  max-height: none;
  overflow: visible;
}
.region-unlock {
  display: flex;
  width: min(100%, 315px);
  min-height: 220px;
  margin: 18px auto 0;
  padding: 24px 24px 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 3px solid rgba(53, 84, 90, .2);
  border-radius: 48% 52% 46% 54% / 54% 45% 55% 46%;
  background: #a8d5a0;
  box-shadow: 0 4px 0 rgba(53, 84, 90, .12);
  transform: rotate(-1deg);
}
.region-unlock:active { transform: translateY(2px) rotate(-1deg); box-shadow: none; }
.region-unlock strong { max-width: 230px; font-size: 22px; line-height: 1.15; }
.region-unlock small { font-size: 13px; opacity: .68; }
.region-unlock-roles {
  position: relative;
  display: block;
  width: 190px;
  height: 102px;
}
.region-unlock-roles .role-asset {
  position: absolute;
  top: 0;
  width: 105px;
  height: 105px;
  filter: drop-shadow(0 3px 0 rgba(53, 84, 90, .1));
}
.unlock-sun { left: 3px; transform: rotate(-6deg); }
.unlock-moon { right: 3px; transform: rotate(6deg); }
.sticker-button {
  position: relative;
  width: auto;
  min-height: 90px;
  flex-direction: column;
  padding: 6px 8px;
  color: var(--ink);
  transform: rotate(-2deg);
}
.sticker-button .task-card-icon { display: grid; width: 38px; height: 38px; margin-bottom: 2px; place-items: center; border: 3px solid var(--white); border-radius: 48% 52% 46% 54%; background: rgba(255, 253, 244, .45); }
.sticker-button .icon { font-size: 24px; }
.sticker-button strong { max-width: 150px; font-size: 13px; line-height: 1.1; }
.sticker-button small { font: 800 9px "Nunito", sans-serif; }
.sticker-button.task-dog {
  border-radius: 45% 55% 48% 52% / 54% 47% 53% 46%;
  background: #f9d99b;
}
.sticker-button.task-flowers {
  border-radius: 55% 45% 53% 47% / 45% 54% 46% 55%;
  background: #a8d5a0;
}
.sticker-button.task-task {
  border-radius: 48% 52% 46% 54% / 52% 46% 54% 48%;
  background: #f7ca62;
}
.sticker-button.task-task:nth-child(3n) {
  border-radius: 52% 48% 45% 55% / 48% 54% 46% 52%;
  background: #f3b7a7;
}
.sticker-button.task-task:nth-child(3n + 1) {
  border-radius: 45% 55% 52% 48% / 53% 46% 54% 47%;
  background: #f7ca62;
}
.sticker-button.task-egg {
  border: 3px dashed rgba(53, 84, 90, .32);
  border-radius: 50% 46% 54% 48% / 47% 55% 45% 53%;
  background: #bce7e7;
}
.sticker-button.task-egg .task-card-icon {
  background: var(--yellow);
}
.sticker-button:nth-child(2n) { transform: rotate(2deg) translateY(2px); }
.sticker-button:nth-child(3n) { transform: rotate(-1deg) translateY(-2px); }
.sticker-button[disabled] { filter: saturate(.55); opacity: .58; cursor: default; }

.demo-region-picker {
  display: flex;
  width: min(100%, 240px);
  margin: 6px auto 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(53, 84, 90, .72);
  font-size: 13px;
}
.demo-region-picker select {
  min-width: 140px;
  padding: 7px 10px;
  border: 2px solid rgba(53, 84, 90, .16);
  border-radius: 13px 10px 12px 11px;
  background: var(--white);
  color: var(--ink);
  font-family: "ZCOOL KuaiLe", system-ui, sans-serif;
}

.bottom-dock {
  position: fixed;
  z-index: 30;
  bottom: 0;
  left: 50%;
  display: flex;
  width: min(100%, 460px);
  height: calc(82px + env(safe-area-inset-bottom));
  align-items: start;
  justify-content: space-around;
  padding: 13px 45px env(safe-area-inset-bottom);
  transform: translateX(-50%);
  border-radius: 48% 48% 0 0 / 24% 24% 0 0;
  background: var(--teal);
  box-shadow: 0 -2px 0 rgba(53, 84, 90, .12);
}
.dock-button {
  display: grid;
  width: 51px;
  height: 51px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #eaf9f2;
  font-size: 26px;
}
.dock-button.active { transform: translateY(-13px); background: var(--yellow); color: var(--ink); box-shadow: 0 3px 0 rgba(53, 84, 90, .18); }
.dock-logo { width: 31px; height: 31px; filter: brightness(0) invert(1); }
.dock-home.active .dock-logo { filter: none; }
.dock-star { width: 39px; height: 39px; filter: saturate(.75) brightness(1.1); }
.dock-sky.active .dock-star { filter: none; }

.paper-prompt {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 2px dashed rgba(53, 84, 90, .28);
  border-radius: 24px 17px 23px 18px;
  background: rgba(255, 253, 244, .76);
  text-align: center;
}
.map-role {
  position: relative;
  width: 170px;
  height: 128px;
  margin: 0 auto;
}
.moon-scan-panel {
  position: relative;
  width: 100%;
  min-height: 300px;
  overflow: hidden;
  border: 5px solid var(--white);
  border-radius: 22px;
  outline: 2px solid rgba(53, 84, 90, .2);
  background: var(--sky);
}
.moon-scan-panel .scan-sun,
.moon-scan-panel .scan-moon {
  position: absolute;
  top: 64px;
  width: 155px;
  height: 155px;
  filter: drop-shadow(0 4px 0 rgba(53, 84, 90, .12));
}
.moon-scan-panel .scan-sun { left: 7px; transform: rotate(-6deg); }
.moon-scan-panel .scan-moon { right: 7px; transform: rotate(6deg); }
.scan-link {
  position: absolute;
  z-index: 3;
  top: 122px;
  left: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  transform: translateX(-50%) rotate(-4deg);
  border: 4px solid var(--white);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--teal-dark);
  font-size: 29px;
}
.task-scan-panel .task-chip {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  white-space: nowrap;
}
.task-scan-panel .task-icon-only {
  display: grid;
  width: 68px;
  height: 68px;
  padding: 10px;
  place-items: center;
  border-radius: 48% 52% 46% 54%;
  background: var(--yellow);
}
.task-scan-panel .task-icon-only .icon { font-size: 38px; color: var(--teal-dark); }
.egg-scan-screen .content { gap: 16px; }
.egg-scan-panel {
  display: grid;
  min-height: 330px;
  place-items: center;
  background-color: #bce7e7;
  background-image:
    radial-gradient(circle at 22% 24%, rgba(255, 253, 244, .62) 0 4px, transparent 5px),
    radial-gradient(circle at 78% 71%, rgba(255, 253, 244, .58) 0 3px, transparent 4px);
}
.egg-art {
  width: min(66vw, 235px);
  aspect-ratio: 1;
  border-radius: 50% 45% 54% 47% / 47% 55% 44% 53%;
  background: rgba(255, 253, 244, .54);
  transform: rotate(-3deg);
}
.egg-art img { object-fit: contain; }
.egg-scan-panel .scan-link {
  top: auto;
  left: auto;
  right: 38px;
  bottom: 34px;
  width: 70px;
  height: 70px;
  transform: rotate(5deg);
}
.egg-scan-star { width: 48px; height: 48px; }
.egg-hint { max-width: 300px; margin: 0 auto; text-align: center; opacity: .72; }
.map-moon { width: 126px; height: 126px; margin-left: 4px; filter: drop-shadow(0 3px 0 rgba(53, 84, 90, .1)); }
.map-role > .icon {
  position: absolute;
  right: 0;
  bottom: 2px;
  display: grid;
  width: 57px;
  height: 57px;
  place-items: center;
  border: 4px solid var(--white);
  border-radius: 48% 52% 46% 54%;
  background: var(--yellow);
  color: var(--teal-dark);
  font-size: 30px;
}
.task-chip {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 16px 13px 17px 12px;
  background: var(--yellow);
}

.task-screen .content { gap: 16px; }
.task-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.points-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 3px;
  padding: 7px 10px;
  border-radius: 16px 13px 15px 14px;
  background: var(--yellow);
  font: 850 14px "Nunito", sans-serif;
}
.points-star { width: 25px; height: 25px; }
.detector-entry .icon { font-size: 28px; }
.button-star { width: 40px; height: 40px; }

.detector-screen .content { text-align: center; }
.detector {
  position: relative;
  display: grid;
  width: min(78vw, 320px);
  aspect-ratio: 1;
  margin: 5px auto;
  place-items: center;
  overflow: hidden;
  border: 4px solid var(--white);
  border-radius: 48% 52% 46% 54%;
  outline: 2px solid rgba(53, 84, 90, .18);
  background-color: var(--sky);
  background-image:
    radial-gradient(circle at center, rgba(255, 253, 244, .8) 0 18%, transparent 18.5%),
    linear-gradient(rgba(74, 165, 162, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 165, 162, .07) 1px, transparent 1px);
  background-size: auto, 38px 38px, 38px 38px;
}
.signal-rings { position: absolute; inset: 0; display: grid; place-items: center; }
.signal-rings i {
  position: absolute;
  width: 36%;
  aspect-ratio: 1;
  border: 3px dashed var(--teal);
  border-radius: 50%;
  opacity: calc(.12 + var(--signal) * .78);
  transition: opacity .25s ease, border-color .25s ease;
}
.signal-rings i:nth-child(2) { width: 62%; opacity: calc(.08 + var(--signal) * .56); }
.signal-rings i:nth-child(3) { width: 86%; opacity: calc(.05 + var(--signal) * .34); }
.target-track {
  position: absolute;
  z-index: 4;
  inset: 9%;
  transform: rotate(var(--target-angle));
  transition: transform .2s ease;
}
.detector-task-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: -16px auto 0;
  place-items: center;
  transform: rotate(var(--counter-angle)) scale(var(--star-scale));
  border: 4px solid var(--white);
  border-radius: 48% 52% 46% 54%;
  background: var(--yellow);
  color: var(--teal-dark);
  font-size: 38px;
  transition: transform .2s ease, filter .25s ease;
  filter: drop-shadow(0 3px 0 rgba(53, 84, 90, .12));
}
.detector-sun {
  position: relative;
  z-index: 6;
  width: 128px;
  height: 128px;
  filter: drop-shadow(0 4px 0 rgba(53, 84, 90, .12));
}
.detector-status {
  position: absolute;
  z-index: 7;
  bottom: 12%;
  left: 50%;
  min-width: 108px;
  padding: 5px 10px;
  transform: translateX(-50%) rotate(-1deg);
  border-radius: 14px 11px 13px 12px;
  background: rgba(255, 253, 244, .82);
  font-size: 16px;
}
.detector.is-ready .signal-rings i { border-color: var(--coral); }
.detector.is-ready .detector-task-icon {
  filter: drop-shadow(0 0 13px rgba(247, 202, 98, .9)) drop-shadow(0 3px 0 rgba(53, 84, 90, .12));
  animation: detector-target-ready .75s ease-in-out infinite alternate;
}
.detector-next-button { background: var(--yellow); }
@keyframes detector-target-ready {
  to { transform: rotate(var(--counter-angle)) scale(1.16); }
}

.sky-screen { background-color: #477f8a; color: #f7fff8; }
.sky-screen::after { display: none; }
.sky-screen .eyebrow { color: #d7f4ef; }
.sky-score { display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.sky-score strong { display: flex; align-items: center; gap: 3px; color: var(--yellow); font: 900 50px/1 "Nunito", sans-serif; }
.sky-score-star { width: 46px; height: 46px; }
.star-field {
  position: relative;
  min-height: 230px;
  border: 2px dashed rgba(255, 255, 255, .28);
  border-radius: 22px 17px 24px 18px;
}
.star-field > i { position: absolute; color: rgba(255,255,255,.38); font-style: normal; font-size: 27px; }
.star-field > i:nth-of-type(1) { left: 12%; top: 18%; }
.star-field > i:nth-of-type(2) { right: 18%; top: 12%; font-size: 18px; }
.star-field > i:nth-of-type(3) { left: 22%; bottom: 14%; font-size: 19px; }
.star-field > i:nth-of-type(4) { right: 9%; bottom: 25%; }
.collected-star { position: absolute; width: 82px; height: 82px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.12)); }
.collected-star:nth-child(1) { left: 27%; top: 24%; transform: rotate(-7deg); }
.collected-star:nth-child(2) { right: 24%; bottom: 18%; transform: rotate(8deg); }
.community-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.community-strip span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 7px 10px;
  border-radius: 13px;
  background: rgba(255,255,255,.13);
  font: 800 12px "Nunito", sans-serif;
}
.community-star { width: 20px; height: 20px; }
.sky-screen .secondary-button { color: var(--ink); }

.demo-panel {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 2px dashed var(--coral);
  border-radius: 14px;
  background: rgba(255, 247, 235, .92);
  color: var(--ink);
}
.demo-panel summary { cursor: pointer; font-size: 13px; }
.demo-panel label { display: grid; gap: 6px; font-size: 12px; }
.demo-panel select, .demo-panel input { width: 100%; min-height: 42px; }

@media (max-width: 350px) {
  .app-header { left: 9px; right: 9px; gap: 4px; }
  .brand-lockup { padding-right: 2px; }
  .brand-lockup strong { font-size: 15px; }
  .brand-mark { width: 30px; }
  .screen { padding-left: 15px; padding-right: 15px; }
  .info-zone { padding-left: 17px; padding-right: 17px; }
  .interaction-zone { padding-left: 16px; padding-right: 16px; }
  .status-row { gap: 6px; }
  .status-blob { padding: 9px 7px; gap: 5px; }
  .status-blob .icon { font-size: 20px; }
  .status-blob strong { font-size: 17px; }
  .bottom-dock { padding-left: 38px; padding-right: 38px; }
}

@media (max-height: 760px) {
  .sticker-button { min-height: 72px; padding: 4px 6px; }
  .sticker-button .task-card-icon { width: 30px; height: 30px; margin-bottom: 1px; }
  .sticker-button .icon { font-size: 20px; }
  .sticker-button strong { font-size: 11px; }
  .sticker-button small { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .ritual-overlay *,
  .ritual-overlay *::before,
  .ritual-overlay *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
  }
  .detector-task-icon { animation: none !important; }
}
