:root {
  --sky: #e8f3fb; --card: #ffffff; --ink: #1f3347; --muted: #5d7287;
  --leaf: #3c9d6b; --leaf-soft: #dff2e7; --plum: #6b5bd2; --plum-soft: #ecebfb;
  --sun: #f2c94c; --line: #cfe0ee;
  --round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  --letters: "Andika", ui-rounded, system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--sky); color: var(--ink); font-family: var(--round); font-size: 20px; }
body { min-height: 100vh; padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); -webkit-user-select: none; user-select: none; }
#app { max-width: 760px; margin: 0 auto; }
h1 { font-size: 34px; margin: 8px 0 16px; }
h2 { font-size: 22px; margin: 0 0 8px; }
.muted { color: var(--muted); }
button { font-family: inherit; color: inherit; cursor: pointer; border: 0; }
.card { background: var(--card); border-radius: 24px; padding: 20px; margin: 16px 0; box-shadow: 0 2px 0 var(--line); }

.title { text-align: center; margin-top: 32px; }
.kids { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 24px 0; }
.kid { background: var(--card); border-radius: 32px; padding: 32px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: 0 4px 0 var(--line); }
.kid:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.kid-face { font-size: 96px; line-height: 1; }
.kid-name { font-size: 32px; font-weight: 700; }
.tick { color: var(--leaf); font-weight: 700; }
.grownups { display: block; margin: 40px auto 0; background: none; color: var(--muted); font-size: 15px; padding: 10px 16px; border-radius: 12px; }
.grownups.holding { background: var(--plum-soft); transition: background 1.5s; }

.back { background: none; font-size: 20px; padding: 8px 4px; color: var(--muted); }
.hello { display: flex; align-items: center; gap: 16px; }
.hello-face { font-size: 72px; }
.play-tile { width: 100%; background: var(--leaf); color: #fff; border-radius: 32px; padding: 32px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 20px; text-align: left; box-shadow: 0 6px 0 #2c7a52; margin: 16px 0; }
.play-tile:active { transform: translateY(4px); box-shadow: 0 2px 0 #2c7a52; }
.play-tile.done { background: var(--plum); box-shadow: 0 6px 0 #5243b0; }
.tile-icon { font-size: 64px; grid-row: span 2; align-self: center; }
.tile-label { font-size: 32px; font-weight: 700; }
.tile-sub { font-size: 20px; opacity: .9; }
.sticker-grid { display: flex; flex-wrap: wrap; gap: 8px; font-size: 40px; }
.streak { text-align: center; font-size: 20px; color: var(--leaf); }

.dots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0 16px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--leaf); }
.stage { background: var(--card); border-radius: 32px; padding: 24px; text-align: center; transition: background .2s; position: relative; }
.stage.right { background: var(--leaf-soft); }
.stage.learn { background: var(--plum-soft); }
.question { font-size: 64px; font-weight: 700; margin: 12px 0 4px; letter-spacing: 1px; }
.answer { font-size: 64px; font-weight: 700; min-height: 84px; color: var(--plum); border-bottom: 4px solid var(--line); width: 200px; margin: 0 auto; }
.feedback { min-height: 36px; font-size: 24px; margin: 10px 0; color: var(--leaf); font-weight: 700; }
.stage.learn .feedback { color: var(--plum); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 420px; margin: 8px auto 0; }
.key { background: var(--sky); font-size: 36px; font-weight: 700; padding: 18px 0; border-radius: 20px; box-shadow: 0 4px 0 var(--line); touch-action: manipulation; }
.key:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.key.go { background: var(--leaf); color: #fff; box-shadow: 0 4px 0 #2c7a52; }

.hear { position: absolute; top: 16px; right: 16px; font-size: 32px; background: var(--sky); border-radius: 50%; width: 64px; height: 64px; }
.picture { font-size: 160px; line-height: 1.1; margin: 24px 0; }
.count-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; font-size: 64px; max-width: 560px; margin: 32px auto; }
.count-grid.small { font-size: 44px; }
.choices { display: flex; justify-content: center; gap: 20px; margin-top: 16px; }
.choice { background: var(--sky); font-size: 72px; font-weight: 700; width: 150px; height: 150px; border-radius: 32px; box-shadow: 0 5px 0 var(--line); touch-action: manipulation; }
.choice.letter { font-family: var(--letters); }
.choice.right { background: var(--leaf); color: #fff; box-shadow: 0 5px 0 #2c7a52; }
.choice.nope { opacity: .35; }
.choice.hint { outline: 6px solid var(--sun); animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }

.finish { text-align: center; padding: 40px 20px; }
.big-sticker { font-size: 140px; animation: pop .6s ease-out; }
@keyframes pop { 0% { transform: scale(.2) rotate(-20deg); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.big-btn { background: var(--leaf); color: #fff; font-size: 26px; font-weight: 700; padding: 18px 36px; border-radius: 24px; box-shadow: 0 5px 0 #2c7a52; margin-top: 16px; }
.small-btn { display: inline-block; background: var(--sky); font-size: 17px; padding: 12px 16px; border-radius: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.report ul { margin: 6px 0 0; padding-left: 20px; font-size: 18px; }

.setup-row { border-top: 2px solid var(--sky); padding: 16px 0; }
.name { width: 100%; font: inherit; font-size: 24px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; -webkit-user-select: text; user-select: text; }
.avatars { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.avatar { font-size: 36px; background: var(--sky); border-radius: 16px; width: 60px; height: 60px; }
.avatar.on { outline: 4px solid var(--plum); }
.tracks { display: flex; gap: 20px; font-size: 19px; flex-wrap: wrap; }

@media (max-width: 520px) {
  .question, .answer { font-size: 48px; }
  .choice { width: 96px; height: 96px; font-size: 52px; }
  .picture { font-size: 110px; }
}
