:root {
  --bg: #fff8e7;
  --ink: #2b2d42;
  --card: #ffffff;
  --shadow: 0 6px 0 rgba(0,0,0,.12);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: linear-gradient(180deg, #fff8e7 0%, #f6f1ff 100%) fixed;
  color: var(--ink);
  font-family: "Nunito", ui-rounded, "SF Pro Rounded", "Quicksand", system-ui, sans-serif;
  font-size: 20px;
  user-select: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:focus-visible { outline: 4px solid #3a86ff; outline-offset: 3px; }

.bar {
  position: sticky; top: 0; z-index: 5; pointer-events: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  max-width: 900px; margin: 0 auto; padding: 12px 16px 0;
}
.bar > * { pointer-events: auto; }
.bar h1 { display: none; margin: 0; font-size: clamp(18px, 4.5vw, 24px); font-weight: 800; flex: 1; text-align: center; letter-spacing: .2px; }
.bar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.icon { width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(60,50,110,.14); font-size: 22px; transition: transform .12s, background .12s; }
.icon:hover { background: #e6e1f8; transform: scale(1.06); }
.icon[hidden] { display: block; visibility: hidden; }
.pill { background: #fff; box-shadow: 0 3px 10px rgba(60,50,110,.14); border-radius: 99px; padding: 8px 14px; font-weight: 800; font-size: 18px; }

main { max-width: 900px; margin: 0 auto; padding: 20px 16px 48px; }

.hello { text-align: center; font-size: clamp(22px, 5vw, 30px); margin: 4px 0 16px; }
.ages { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.ages button {
  background: #fff; border-radius: 99px; padding: 10px 20px; box-shadow: var(--shadow); font-weight: bold;
}
.ages button.on { background: #06d6a0; color: #fff; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.tile {
  border-radius: 28px; padding: 22px 10px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 26px; font-weight: bold; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.2);
  transition: transform .12s;
}
.tile:hover, .tile:active { transform: scale(1.05) rotate(-1deg); }
.tile .big { font-size: 64px; line-height: 1; text-shadow: none; }
.tile small { font-size: 16px; opacity: .95; }

.progress { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.dot { width: 18px; height: 18px; border-radius: 50%; background: #e0d8c0; }
.dot.done { background: #06d6a0; }
.dot.now { background: #ffd166; transform: scale(1.3); }

.prompt {
  background: var(--card); border-radius: 28px; padding: 20px; text-align: center;
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.prompt p { margin: 0 0 10px; font-size: clamp(20px, 4.5vw, 28px); font-weight: bold; }
.stage { font-size: clamp(64px, 18vw, 120px); line-height: 1.1; min-height: 1.1em; word-break: break-word; }
.stage.emoji-row { font-size: clamp(36px, 9vw, 56px); letter-spacing: 4px; }
.stage svg { width: clamp(120px, 34vw, 190px); height: auto; }
.say { margin-top: 6px; background: #3a86ff; color: #fff; border-radius: 99px; padding: 8px 18px; box-shadow: var(--shadow); }

.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
.opt {
  background: #fff; border-radius: 24px; min-height: 100px; padding: 12px;
  box-shadow: var(--shadow); font-size: clamp(32px, 8vw, 52px); font-weight: bold;
  display: flex; align-items: center; justify-content: center; border: 5px solid transparent;
  transition: transform .1s;
}
.opt { min-width: 0; }
.opt.word { font-size: clamp(16px, 4vw, 26px); overflow-wrap: break-word; hyphens: manual; }
.opt:hover { transform: translateY(-3px); }
.opt.swatch { border: 5px solid rgba(0,0,0,.15); min-height: 110px; }
.opt.right { border-color: #06d6a0; background: #d8f9ee; animation: pop .4s; }
.opt.wrong { border-color: #ef476f; animation: shake .4s; }
.opt:disabled { cursor: default; }

.msg { text-align: center; min-height: 1.6em; margin-top: 18px; font-size: 24px; font-weight: bold; }

.end { text-align: center; background: #fff; border-radius: 32px; padding: 30px 16px; box-shadow: var(--shadow); }
.end .trophy { width: 150px; margin: 0 auto; animation: pop .6s; }
.end .earned { font-size: 56px; letter-spacing: 6px; margin: 8px 0 16px; }
.end .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { background: #06d6a0; color: #fff; border-radius: 99px; padding: 14px 28px; font-weight: bold; box-shadow: var(--shadow); font-size: 22px; }
.btn.alt { background: #3a86ff; }

.memory { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); max-width: 520px; margin: 0 auto; }
.card {
  aspect-ratio: 1; border-radius: 20px; background: #8338ec; color: #fff; font-size: clamp(30px, 9vw, 54px);
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
.card.up { background: #fff; color: inherit; }
.card.matched { background: #d8f9ee; animation: pop .4s; }

@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }


.kikobox { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.kikobox .kslot { width: 110px; flex: none; }
.kiko { width: 100%; height: auto; overflow: visible; }
.kiko.cheer { animation: hop .5s 2; }
.kiko.hmm { animation: tilt .6s; transform-origin: 50% 90%; }
.kiko .tail { transform-origin: 85% 90%; animation: wag 2s ease-in-out infinite; }
.bubble { position: relative; background: #fff; border-radius: 20px; padding: 12px 16px; box-shadow: var(--shadow); font-weight: bold; font-size: 22px; max-width: 340px; }
.bubble:empty { visibility: hidden; }
.bubble::before { content: ""; position: absolute; left: -8px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-right-color: #fff; border-left: 0; }
.hello-box { margin: 0 0 20px; }
.hello-box .bubble { font-size: clamp(20px, 4.5vw, 26px); }
@keyframes hop { 40% { transform: translateY(-14px); } }
@keyframes tilt { 30% { transform: rotate(-8deg); } 70% { transform: rotate(6deg); } }
@keyframes wag { 50% { transform: rotate(8deg); } }

.foot { text-align: center; margin-top: 36px; font-size: 14px; color: #6b6f8a; }
.foot a { color: inherit; text-decoration: underline; }

.langwrap { position: relative; }
.langmenu {
  position: absolute; right: 0; top: 52px; z-index: 10; min-width: 190px; padding: 8px;
  background: #fff; border-radius: 20px; box-shadow: 0 12px 30px rgba(60,50,110,.22), 0 0 0 1px rgba(60,50,110,.06);
  display: flex; flex-direction: column; gap: 2px;
}
.langmenu[hidden] { display: none; }
.langmenu button { text-align: left; padding: 10px 14px; border-radius: 14px; background: none; font-weight: 800; font-size: 18px; }
.langmenu button:hover { background: #f1eefb; }
.langmenu button.on { background: #06d6a0; color: #fff; }

.opt.event { flex-direction: column; gap: 4px; font-size: 16px; }
.opt.event .evi { font-size: 46px; line-height: 1.1; }
.opt.event .evt { font-size: 18px; font-weight: 800; text-align: center; line-height: 1.2; overflow-wrap: anywhere; }

/* landing + sections */
.sec { font-size: 22px; font-weight: 900; margin: 26px 4px 12px; }
.tile.soon { opacity: .88; position: relative; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.12) 0 12px, transparent 12px 24px); }
.tile.soon small { background: rgba(255,255,255,.28); border-radius: 99px; padding: 2px 10px; }
.land { max-width: 820px; margin: 0 auto; }
.hero { text-align: center; padding: 18px 0 8px; }
.hero-kiko { width: 150px; margin: 0 auto 4px; }
.hero h1 { font-size: clamp(30px, 7vw, 46px); line-height: 1.1; margin: 8px 0 12px; font-weight: 900; }
.hero .lead { font-size: clamp(18px, 3.6vw, 22px); line-height: 1.5; max-width: 640px; margin: 0 auto 22px; color: #3d4060; }
.btn.start { font-size: 24px; padding: 16px 36px; }
.land .lcard { background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 22px 22px 18px; margin: 26px 0 0; }
.land .lcard h2 { margin: 0 0 8px; font-size: 24px; font-weight: 900; }
.land .lcard p { margin: 0; font-size: 19px; line-height: 1.6; color: #3d4060; }
.pts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.pt { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 18px; }
.pt-i { font-size: 34px; }
.pt h3 { margin: 4px 0 4px; font-size: 20px; font-weight: 900; }
.pt p { margin: 0; font-size: 17px; line-height: 1.5; color: #3d4060; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.land .skills ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.land .skills li { font-size: 17px; line-height: 1.45; color: #3d4060; }
.land .skills li b { font-size: 18px; color: var(--ink); }
.chip { font-size: 14px; font-weight: 800; background: #fff3cf; border-radius: 99px; padding: 3px 10px; vertical-align: middle; }
.center { text-align: center; margin: 30px 0 0; }

.mixrow .tile { flex-direction: row; justify-content: center; gap: 14px; padding: 16px 10px; grid-column: 1 / -1; }
.mixrow .tile .big { font-size: 48px; }
.mixrow .tile small { display: none; }

.linkbtn { background: none; color: #3a64d8; font-weight: 800; font-size: 17px; text-decoration: underline; padding: 10px; margin-top: 14px; }

.tile { position: relative; }
.badge { align-self: center; margin-bottom: 2px; background: #fff; color: #7a4a00; font-size: 13px; font-weight: 900; border-radius: 99px; padding: 3px 10px; text-shadow: none; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.secsub { margin: -6px 4px 12px; font-size: 17px; color: #5b5f7a; }
