:root {
  --bg: #dcebf8;
  --bg-2: #eaf4fc;
  --card: #ffffff;
  --ink: #3f6aa8;
  --text: #4a5d78;
  --muted: #7f95b2;
  --line: #cfe2f5;
  --edge: #bcd7f0;
  --blue: #4a78b8;
  --blue-soft: #e8f1fb;
  --green: #8aab6e;
  --yellow: #f2c85b;
  --item: 48px;
  --round: 'Fredoka', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; margin: 0; }
body {
  background: radial-gradient(120% 70% at 50% 0%, var(--bg-2), var(--bg) 70%) fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.4;
  overscroll-behavior: none;
}
#app {
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding: max(118px, calc(env(safe-area-inset-top) + 106px)) 16px max(34px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.screen { flex: 1; position: relative; display: flex; flex-direction: column; animation: in .35s ease both; }
.screen.back { animation-name: inBack; }
@keyframes in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes inBack { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

/* cloud card */
.card {
  position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column;
  background: var(--card); border: 2px solid var(--edge); border-radius: 36px; padding: 24px 22px 62px;
  box-shadow: 0 8px 24px rgba(111, 155, 209, .18);
}
.card::before {
  content: ''; position: absolute; inset: 7px; border: 2px dashed var(--line); border-radius: 29px; pointer-events: none;
}
.card > * { position: relative; }

/* bear */
.bear, .paws {
  position: absolute; left: 50%; top: 0; width: 270px; height: auto;
  transform: translate(-50%, -100%) translateY(9px); pointer-events: none;
  animation: peek .7s cubic-bezier(.3, 1.5, .5, 1) .15s both;
}
.bear { z-index: 0; }
@keyframes peek { from { transform: translate(-50%, -100%) translateY(70px); } to { transform: translate(-50%, -100%) translateY(9px); } }
.paws { z-index: 2; }
/* bottom strip: dino, flowers, dragon */
.strip { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 9px; height: 44px; display: flex; align-items: flex-end; justify-content: space-between; pointer-events: none; }
.strip .critter { height: 42px; width: auto; }
.strip .bloom { height: 28px; width: auto; }
.friends { display: flex; justify-content: center; gap: 14px; margin-top: 22px; }
.friends .critter { height: 84px; width: auto; animation: hop 2.4s ease-in-out infinite; }
.friends .critter:last-child { animation-delay: 1.2s; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.top { display: flex; align-items: center; justify-content: space-between; height: 36px; margin-bottom: 6px; }
.back-btn { background: var(--blue-soft); border: 0; border-radius: 999px; color: var(--ink); font: 600 15px var(--sans); padding: 8px 16px; cursor: pointer; }
.back-btn:active { transform: scale(.96); }
.count { color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .06em; }
.bar { display: flex; gap: 6px; margin-bottom: 26px; }
.bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--blue-soft); }
.bar i.on { background: var(--yellow); }

h1, h2 { font-family: var(--round); font-weight: 600; margin: 0; color: var(--ink); }
h1 { font-size: 66px; line-height: 1; letter-spacing: -.01em; }
h2 { font-size: 30px; line-height: 1.12; margin-bottom: 8px; }
.sub { color: var(--muted); margin: 0 0 22px; font-weight: 500; }
.body { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.hero { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 8px; padding: 8px 0 10px; }
.hero .eyebrow { font: 600 38px var(--round); color: var(--ink); }
.hero p { margin: 14px 0 0; color: var(--text); font-size: 18px; font-weight: 600; }
.c1 { color: #6f9bd1; } .c2 { color: #8fb4e0; } .c3 { color: var(--yellow); } .c4 { color: #7aa6d8; } .c5 { color: var(--green); }

.btn {
  width: 100%; min-height: 56px; border: 0; border-radius: 999px; background: var(--blue); color: #fff;
  font: 600 18px var(--round); cursor: pointer; transition: transform .1s ease, opacity .2s;
  box-shadow: 0 4px 0 #35609c;
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #35609c; }
.btn:disabled { opacity: .4; cursor: default; }
.footer { padding-top: 20px; }

/* wheel */
.wheels { display: flex; gap: 8px; justify-content: center; position: relative; }
.wheel-wrap { position: relative; flex: 1; height: calc(var(--item) * 5); }
.wheel-wrap.narrow { flex: 0 0 82px; }
.wheel-wrap::before {
  content: ''; position: absolute; left: 0; right: 0; top: calc(var(--item) * 2); height: var(--item);
  border: 2px solid var(--yellow); background: #fff8e0; border-radius: 16px; pointer-events: none;
}
.wheel {
  position: relative; height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: calc(var(--item) * 2) 0;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}
.wheel::-webkit-scrollbar { display: none; }
.wheel div {
  height: var(--item); line-height: 1; padding-top: 7px; display: flex; align-items: center; justify-content: center;
  scroll-snap-align: center;
  font: 500 22px var(--round); color: #a9bdd6; white-space: nowrap; cursor: pointer; transition: color .15s;
}
.wheel div.sel { color: var(--ink); font-weight: 600; }
.colon { align-self: center; font: 600 26px var(--round); color: var(--muted); }

/* choices */
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  text-align: left; min-height: 54px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--line);
  background: #fff; color: var(--ink); font: 500 18px var(--round); text-transform: capitalize; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.choice:active { transform: scale(.98); }
.choice.sel { background: var(--blue); border-color: var(--blue); color: #fff; }
.choices.two { flex-direction: row; }
.choices.two .choice { flex: 1; min-height: 96px; border-radius: 28px; text-align: center; font-size: 24px; }

/* final */
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font: 600 13px var(--sans); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
input[type=text], input[type=email] {
  width: 100%; min-height: 54px; border-radius: 18px; border: 2px solid var(--line); background: #fff;
  color: var(--ink); font: 600 18px var(--sans); padding: 0 16px;
}
input[type=text]:focus, input[type=email]:focus { outline: 0; border-color: var(--yellow); }
.photo {
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; border: 2px dashed var(--edge);
  background: var(--blue-soft); color: var(--muted); font-weight: 600; cursor: pointer; margin-bottom: 14px;
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo input { display: none; }
.error { color: #c0584a; min-height: 22px; margin: 8px 0 0; font-size: 15px; font-weight: 600; }

.field em { font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 600; }
