*{box-sizing:border-box}
:root{--accent:#38875b;--accent-dark:#276643;--accent-soft:#e6f5ec;--ink:#382d24;--bg:#fff8ec;--good:#3e933c;--good-bg:#d6f5c9}
html,body{margin:0;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent}
body{font-family:Fredoka,system-ui,sans-serif;background:var(--bg);color:var(--ink);display:flex;flex-direction:column;height:100dvh}
header{display:flex;align-items:center;gap:6px;padding:4px 8px;background:#fff;border-bottom:2px solid var(--accent-soft);flex:none}
header strong{margin:auto;text-align:center;font-size:clamp(14px,3.8vw,17px);color:var(--accent-dark);line-height:1.15}
header a{color:var(--accent);font-weight:700;text-decoration:none;white-space:nowrap;padding:4px 8px;border-radius:12px;background:var(--accent-soft);font-size:clamp(12px,3.2vw,14px)}
button{cursor:pointer;font:inherit;font-weight:700;color:var(--ink);background:#fff;border:2px solid var(--accent);border-radius:16px;min-height:48px;padding:6px 10px;box-shadow:0 3px 0 color-mix(in srgb,var(--accent) 22%,transparent);transition:transform .14s cubic-bezier(.34,1.56,.64,1),box-shadow .14s ease,background-color .15s ease}
button:active{transform:scale(.95) translateY(2px);box-shadow:0 1px 0 color-mix(in srgb,var(--accent) 18%,transparent)}
button.cta{background:var(--accent);color:#fff;border-color:var(--accent-dark);box-shadow:0 4px 0 var(--accent-dark)}
header button{min-height:38px;min-width:38px;padding:4px 6px;border-radius:12px;box-shadow:0 2px 0 color-mix(in srgb,var(--accent) 20%,transparent)}
main{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px;padding:6px 8px;max-width:760px;width:100%;margin:auto;overflow:hidden;position:relative}
h1,h2,p{margin:0;text-align:center}
h1,h2{color:var(--accent);font-family:"Titan One",Fredoka,system-ui,sans-serif;line-height:1.15}
h1{font-size:clamp(20px,5.2vw,26px)}
h2{font-size:clamp(16px,4.2vw,20px)}
img{object-fit:contain;min-height:0;max-width:100%;display:block}
.hero{flex:none;height:min(34dvh,250px);min-height:0;width:100%;background:#fff;border:2.5px solid var(--accent-soft);border-radius:20px;padding:8px;animation:popIn .42s cubic-bezier(.34,1.56,.64,1) both}
.age{flex:1;display:flex;flex-direction:column;justify-content:center;gap:8px;min-height:0}
.age p{font-size:clamp(13px,3.4vw,15px);color:#5c4d40}
.grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:6px}
.grid.single{grid-template-columns:minmax(0,1fr)}
.card{display:flex;flex-direction:column;align-items:center;justify-content:space-between;min-height:0;border:2.5px solid var(--accent-soft);box-shadow:0 3px 0 color-mix(in srgb,var(--accent) 18%,transparent);background:#fff;padding:5px 6px;border-radius:18px;gap:3px;animation:popIn .38s cubic-bezier(.34,1.56,.64,1) both}
.card:nth-child(2){animation-delay:.04s}.card:nth-child(3){animation-delay:.08s}.card:nth-child(4){animation-delay:.12s}.card:nth-child(5){animation-delay:.16s}
.card .art-wrap{flex:1;min-height:0;width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}
.card img{max-height:100%;max-width:100%;object-fit:contain}
.card .lbl{flex:none;display:flex;flex-direction:column;align-items:center;gap:1px;width:100%;padding-top:2px;border-top:1px solid var(--accent-soft)}
.card span{font-size:clamp(11px,3vw,13.5px);line-height:1.15;text-align:center}
.card small{font-size:clamp(10px,2.6vw,11.5px);line-height:1.1;color:var(--accent)}
.daily{background:#fff;border:2px solid var(--accent-soft);border-radius:14px;padding:4px 8px;font-size:clamp(10.5px,2.8vw,12px);flex:none}
.daily b{color:var(--accent-dark)}
.daily-rows{display:flex;flex-wrap:wrap;gap:2px 10px;justify-content:space-between}
.daily-rows div{display:flex;gap:5px;align-items:center}
.strip{display:flex;align-items:center;gap:6px;background:#fff;border:2px solid var(--accent-soft);border-radius:16px;padding:5px 7px;flex:none}
.strip img{width:44px;height:44px;flex:none}
.strip p{flex:1;text-align:left;font-weight:600;font-size:clamp(13px,3.4vw,15px);line-height:1.2}
.strip button{min-width:44px;min-height:40px;padding:4px 8px;background:var(--accent-soft);border-color:var(--accent)}
.bar{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none}
.bar h2{flex:1;font-size:clamp(14px,3.8vw,18px)}
.bar b{color:var(--accent-dark);background:var(--accent-soft);padding:3px 8px;border-radius:99px;font-size:clamp(11px,3vw,13px);white-space:nowrap}
.bar button{min-height:38px;padding:4px 10px;font-size:clamp(12px,3vw,14px)}
.dots{color:var(--accent);text-align:center;letter-spacing:3px;font-size:13px;line-height:1;flex:none}
.stage{flex:1;min-height:0;display:flex;flex-direction:column;gap:5px;justify-content:space-between;align-items:center;background:#fff;border:2.5px solid var(--accent-soft);border-radius:20px;padding:6px 8px;overflow:hidden}
.stage>*{width:100%}
.options{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;flex:none}
.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:56px;max-width:47%;flex:1 1 38%;min-height:48px;padding:5px 6px;animation:popIn .34s cubic-bezier(.34,1.56,.64,1) both}
.tile:nth-child(2){animation-delay:.04s}.tile:nth-child(3){animation-delay:.08s}.tile:nth-child(4){animation-delay:.12s}.tile:nth-child(5){animation-delay:.16s}.tile:nth-child(6){animation-delay:.2s}
.tile img{height:38px;width:44px;flex:none}
.tile span:last-child{font-size:clamp(12px,3.2vw,14px);line-height:1.15;text-align:center}
.tile:disabled{opacity:.48;transform:none}
.tile.selected{background:var(--accent-soft);border-color:var(--accent-dark);box-shadow:0 0 0 2px var(--accent)}
.good{background:var(--good-bg)!important;border-color:var(--good)!important;color:#1e561d!important;animation:goodPop .36s cubic-bezier(.34,1.56,.64,1) both!important}
.preview{display:flex;justify-content:center;align-items:center;gap:5px;flex-wrap:wrap;font-size:clamp(16px,4.4vw,21px);font-weight:700;line-height:1.2;color:var(--accent-dark);flex:none}
.preview img{height:40px;width:40px}
.preview span{padding:2px 6px;border-radius:8px;background:var(--accent-soft)}
.prompt-art{flex:none;height:min(24dvh,190px);min-height:0;margin:auto;animation:popIn .36s cubic-bezier(.34,1.56,.64,1) both}
.hint{font-size:clamp(12px,3vw,13.5px);font-weight:600;color:var(--accent-dark);text-align:center;min-height:16px;line-height:1.2;flex:none}
.bubbleTile{border-radius:24px;background:var(--accent-soft);animation:popIn .34s cubic-bezier(.34,1.56,.64,1) both,float 3.4s ease-in-out .35s infinite}
.bubbleTile:nth-child(2n){animation-delay:.05s,-1.3s}
.shake{animation:shake .32s ease-in-out!important}
.celebrate{font-size:clamp(34px,9vw,44px);color:#f0a500;text-align:center;line-height:1.1;animation:popIn .48s cubic-bezier(.34,1.56,.64,1) both}
.shape{font-size:clamp(24px,6.5vw,32px);line-height:1}
.story-art{flex:1;min-height:0;width:100%;animation:popIn .38s cubic-bezier(.34,1.56,.64,1) both}
.compact .tile{max-width:31.5%;flex:1 1 28%;min-height:44px;padding:3px 4px}
.compact .tile img{height:28px;width:34px}
.compact .tile span:last-child{font-size:clamp(11px,2.8vw,12.5px)}
.done{color:var(--good)}
.finish-wrap{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:7px;align-items:center}
.finish-wrap button{width:100%}
.confetti-layer{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:50}
.confetti-piece{position:absolute;top:-14px;width:9px;height:14px;border-radius:3px;will-change:transform,opacity}
@keyframes popIn{0%{opacity:0;transform:scale(.84) translateY(8px)}100%{opacity:1;transform:scale(1) translateY(0)}}
@keyframes goodPop{0%{transform:scale(1)}45%{transform:scale(1.09)}100%{transform:scale(1)}}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes shake{20%,60%{transform:translateX(-4px)}40%,80%{transform:translateX(4px)}}
@media(max-height:620px){
  main{gap:4px;padding:4px 7px}
  button{min-height:42px;padding:4px 8px}
  .hero{max-height:110px}
  .strip{padding:4px 6px}
  .strip img{width:36px;height:36px}
  .strip p{font-size:13px}
  .prompt-art{max-height:84px}
  .daily{padding:3px 7px;font-size:10.5px}
  .card{padding:3px 4px;gap:2px}
  .card span{font-size:11px}
  .card small{font-size:10px}
  .tile{min-height:42px;padding:3px 5px}
  .tile img{height:30px;width:36px}
  .preview{font-size:16px}
  .preview img{height:30px;width:30px}
  .shape{font-size:24px}
}
@media(prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
