:root {
  --bg: #FFF4EA;
  --bg-2: #FFFAF5;
  --card: #FFFFFF;
  --ink: #4A3F55;
  --muted: #8E8399;
  --line: #F0E6EE;
  --pink: #FFB5C2;
  --peach: #FFD6A5;
  --butter: #FDF5B0;
  --mint: #CAFFBF;
  --aqua: #A0E7E5;
  --sky: #BDE0FE;
  --lav: #BDB2FF;
  --lilac: #FFC6FF;
  --primary: #8B7CF6;
  --primary-2: #A99CFF;
  --good: #5CC78A;
  --bad: #FF8A80;
  --gold: #FFC93C;
  --radius: 26px;
  --shadow: 0 6px 0 rgba(74, 63, 85, 0.08), 0 14px 30px rgba(74, 63, 85, 0.08);
  --shadow-sm: 0 3px 0 rgba(74, 63, 85, 0.08), 0 6px 14px rgba(74, 63, 85, 0.06);
  --font: "Nunito", "Varela Round", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; overscroll-behavior: none; }
html.no-pull, html.no-pull body { overflow: hidden; touch-action: none; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 600 16px/1.4 var(--font);
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}
input, select, textarea { -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; font-weight: 900; }
h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

/* fundo com bolhas suaves */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blobs i { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.bg-blobs i:nth-child(1) { width: 46vmax; height: 46vmax; background: var(--pink); left: -14vmax; top: -16vmax; }
.bg-blobs i:nth-child(2) { width: 38vmax; height: 38vmax; background: var(--aqua); right: -14vmax; top: 10vmax; animation-delay: -6s; }
.bg-blobs i:nth-child(3) { width: 34vmax; height: 34vmax; background: var(--butter); left: 10vmax; bottom: -18vmax; animation-delay: -10s; }
.bg-blobs i:nth-child(4) { width: 26vmax; height: 26vmax; background: var(--lav); right: 8vmax; bottom: -10vmax; opacity: .4; animation-delay: -3s; }
@keyframes drift { to { transform: translate(3vmax, 2vmax) scale(1.06); } }

.app { min-height: 100dvh; }
.splash { min-height: 100dvh; display: grid; place-items: center; }
.splash-logo { font-size: 4rem; animation: bounce 1s ease-in-out infinite; }

.screen { min-height: 100dvh; padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; animation: fade-in .3s ease; }
.screen.narrow { max-width: 620px; }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------------- botões ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: 999px; padding: .8rem 1.4rem; cursor: pointer;
  background: var(--card); color: var(--ink); font-weight: 800; font-size: 1rem;
  box-shadow: var(--shadow-sm); transition: transform .12s ease, filter .12s ease; text-decoration: none;
}
.btn:active { transform: translateY(2px) scale(.98); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 4px 0 #6E5FD8, 0 10px 20px rgba(139, 124, 246, .3); }
.btn.good { background: var(--good); color: #fff; box-shadow: 0 4px 0 #44A870; }
.btn.danger { color: #D9534F; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.lg { font-size: 1.2rem; padding: 1rem 1.8rem; }
.btn.sm { font-size: .85rem; padding: .45rem .9rem; }
.btn.block { width: 100%; }
.icon-btn { width: 56px; height: 56px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow-sm); cursor: pointer; font-size: 1.6rem; flex: none; }
.icon-btn:active { transform: scale(.94); }
.link { background: none; border: 0; color: var(--primary); font-weight: 800; cursor: pointer; padding: .3rem; text-decoration: underline; text-underline-offset: 3px; }

.card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; }

/* ---------------- topo ---------------- */
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar .title { flex: 1; font-size: 1.3rem; font-weight: 900; }
.chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--card); border-radius: 999px; padding: .4rem .9rem .4rem .4rem; box-shadow: var(--shadow-sm); font-weight: 900; border: 0; cursor: pointer; }
.chip .avatar { width: 44px; height: 44px; }
.stars-chip { padding: .55rem 1rem; font-size: 1.1rem; cursor: default; }
.parents-btn { font-size: .85rem; padding: .55rem 1rem; }

.avatar { width: 96px; height: 96px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; overflow: hidden; flex: none; }
.avatar svg { width: 100%; height: 100%; }
.art { width: 100%; height: 100%; display: block; }

/* ---------------- boas-vindas e perfis ---------------- */
.hero { text-align: center; padding: 24px 8px 8px; }
.hero .logo { width: 120px; height: 120px; margin: 0 auto 12px; animation: float 4s ease-in-out infinite; }
.hero-animals { display: flex; justify-content: center; gap: 4px; margin: 10px 0 18px; }
.hero-animals .art { width: 72px; height: 72px; animation: float 3s ease-in-out infinite; }
.hero-animals .art:nth-child(2n) { animation-delay: -1.2s; }
.hero-animals .art:nth-child(3n) { animation-delay: -2s; }
@keyframes float { 50% { transform: translateY(-8px); } }

.profiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; padding: 10px 0; }
.profile { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 900; font-size: 1.2rem; }
.profile .avatar { width: 130px; height: 130px; box-shadow: var(--shadow); background: var(--card); border: 6px solid var(--card); transition: transform .15s; }
.profile:active .avatar { transform: scale(.95); }
.profile.add .avatar { background: var(--bg-2); font-size: 3rem; color: var(--muted); border: 4px dashed var(--line); box-shadow: none; }

/* ---------------- início da criança ---------------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 3vw, 16px); }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile {
  position: relative; border: 0; border-radius: 32px; aspect-ratio: 1; padding: 14px; cursor: pointer; min-width: 0; overflow-wrap: anywhere; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-size: clamp(1.1rem, 3.6vw, 1.5rem); font-weight: 900; box-shadow: var(--shadow); transition: transform .15s;
}
.tile:active { transform: scale(.96); }
.tile .art, .tile .tile-icon { width: 62%; height: auto; flex: none; }
.tile-icon { font-size: clamp(2.6rem, 11vw, 4.2rem); line-height: 1; }
.tile.t1 { background: var(--pink); }
.tile.t2 { background: var(--aqua); }
.tile.t3 { background: var(--peach); }
.tile.t4 { background: var(--lav); }
.tile.big { grid-column: span 2; aspect-ratio: 2 / 1; flex-direction: row; gap: 18px; font-size: clamp(1.5rem, 5vw, 2.2rem); }
@media (min-width: 760px) { .tile.big { grid-column: span 2; aspect-ratio: auto; } }
.tile.big .art { width: 38%; }

/* trilha */
.trail { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 16px; padding: 6px 0 18px; }
@media (min-width: 760px) { .trail { grid-template-columns: repeat(4, 1fr); } }
.trail-step { position: relative; }
.trail-step:nth-child(odd) { transform: translateY(14px); }

.act-card {
  position: relative; width: 100%; border: 0; border-radius: 28px; padding: 14px 12px 12px; background: var(--card); cursor: pointer;
  box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transition: transform .15s;
}
.act-card:active { transform: scale(.96); }
.act-card .icon { width: 74%; aspect-ratio: 1; border-radius: 24px; display: grid; place-items: center; padding: 8%; }
.act-card .icon .art { width: 100%; height: 100%; }
.act-card .name { font-size: .95rem; font-weight: 900; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; }
.act-card .stars { font-size: .9rem; letter-spacing: 1px; min-height: 1.2em; }
.act-card .stars .off { opacity: .25; filter: grayscale(1); }
.act-card .badge { position: absolute; top: 8px; right: 8px; background: var(--gold); color: #5A4300; border-radius: 999px; font-size: .72rem; padding: .15rem .55rem; font-weight: 900; }
.act-card .lvl { position: absolute; top: 8px; left: 10px; font-size: .72rem; color: var(--muted); font-weight: 900; }
.act-card.locked { opacity: .55; }
.act-card.locked .icon { filter: grayscale(.8); }
.act-card.premium .icon { filter: saturate(.7); }

.section-title { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 900; margin-top: 6px; }
.section-title .dot { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; padding: 4px; }
.acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }

.area-tabs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.area-tab { flex: none; border: 0; border-radius: 999px; padding: .55rem 1rem .55rem .55rem; display: flex; align-items: center; gap: .5rem; cursor: pointer; font-weight: 900; box-shadow: var(--shadow-sm); background: var(--card); }
.area-tab .dot { width: 34px; height: 34px; border-radius: 50%; padding: 4px; display: grid; place-items: center; }
.area-tab.active { outline: 4px solid var(--primary-2); }

/* ---------------- tela de jogo ---------------- */
.game { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); z-index: 10; padding: max(10px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.game::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 15% 10%, #FFE3EA 0, transparent 40%), radial-gradient(circle at 90% 20%, #DDF6F5 0, transparent 40%), radial-gradient(circle at 50% 100%, #FFF3C9 0, transparent 50%); }
.game { touch-action: none; overscroll-behavior: contain; }
.game-top { display: flex; align-items: center; gap: 8px; }
.game-top .swap { background: var(--lilac, #E7DDFF); }
@media (max-width: 380px) { .game-top { gap: 5px; } .game-top .icon-btn { width: 46px; height: 46px; font-size: 1.3rem; } }
.game-top .dots { flex: 1; display: flex; justify-content: center; gap: 8px; }
.game-top .dots i { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--line); transition: background .3s; }
.game-top .dots i.done { background: var(--good); box-shadow: none; }
.game-top .dots i.now { background: var(--peach); box-shadow: none; transform: scale(1.2); }
.hold-btn { position: relative; overflow: hidden; }
.hold-btn::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--pink) calc(var(--p, 0) * 1%), transparent 0); opacity: .9; z-index: 0; transform: scale(0); }
.hold-btn.holding::after { animation: hold var(--hold, 900ms) linear forwards; }
.hold-btn > * { position: relative; z-index: 1; }
@keyframes hold { from { transform: scale(0); } to { transform: scale(1); } }
.hold-hint { position: absolute; top: calc(100% + 6px); left: 0; white-space: nowrap; font-size: .75rem; background: var(--card); padding: .2rem .5rem; border-radius: 8px; box-shadow: var(--shadow-sm); opacity: 0; transition: opacity .2s; pointer-events: none; }
.hold-btn.holding .hold-hint { opacity: 1; }

.game-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px, 3vh, 26px); padding: 8px 0; position: relative; }
.prompt-text { font-size: clamp(1.1rem, 4vw, 1.6rem); font-weight: 900; text-align: center; background: var(--card); padding: .5rem 1.2rem; border-radius: 999px; box-shadow: var(--shadow-sm); max-width: 92%; }
.scene-box { width: min(92vw, 560px, 58vh * 1.33); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); background: #E6F6FF; }
.scene-box .scene { display: block; width: 100%; height: auto; }
.scene-box.pop-in { animation: pop-in .4s ease; }
.focus-art { width: min(44vw, 36vh); aspect-ratio: 1; background: var(--card); border-radius: 30px; box-shadow: var(--shadow); padding: 14px; display: grid; place-items: center; animation: pop-in .4s ease; }
.row-art { display: flex; gap: clamp(6px, 2vw, 14px); align-items: center; justify-content: center; flex-wrap: wrap; background: var(--card); border-radius: 26px; padding: 12px; box-shadow: var(--shadow); max-width: 96vw; }
.row-art .cell { width: clamp(52px, 14vw, 100px); aspect-ratio: 1; }
.row-art .cell.q { display: grid; place-items: center; font-size: clamp(2rem, 8vw, 3.5rem); font-weight: 900; color: var(--primary); border: 4px dashed var(--lav); border-radius: 20px; }

.options { display: grid; gap: clamp(10px, 2.5vw, 20px); width: 100%; max-width: 760px; justify-content: center; }
.options.n2 { grid-template-columns: repeat(2, minmax(0, min(38vw, 30vh, 240px))); }
.options.n3 { grid-template-columns: repeat(3, minmax(0, min(28vw, 26vh, 210px))); }
.options.n4 { grid-template-columns: repeat(4, minmax(0, min(22vw, 24vh, 190px))); }
@media (max-width: 560px) and (orientation: portrait) {
  .options.n4 { grid-template-columns: repeat(2, minmax(0, min(40vw, 22vh))); }
}
.opt {
  aspect-ratio: 1; border: 0; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); cursor: pointer;
  padding: 0; display: grid; place-items: center; transition: transform .15s, opacity .3s, box-shadow .2s;
}
.opt:active { transform: scale(.95); }
.opt .art { pointer-events: none; width: 80%; height: 80%; }
.opt.good { box-shadow: 0 0 0 6px var(--good), var(--shadow); animation: bounce .6s ease; }
.opt.bad { animation: shake .45s ease; }
.opt.faded { opacity: .35; pointer-events: none; }
.opt.hint { animation: pulse 1s ease-in-out infinite; }
.opt.num { font-size: clamp(2.4rem, 9vw, 4.5rem); font-weight: 900; color: var(--primary); }

@keyframes bounce { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.12) rotate(-3deg); } 60% { transform: scale(.96) rotate(2deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
@keyframes pulse { 50% { transform: scale(1.07); box-shadow: 0 0 0 8px rgba(255, 201, 60, .6), var(--shadow); } }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.05); } }
.wiggle { animation: bounce .6s ease; }

/* tocar e descobrir */
.tap-grid { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: clamp(10px, 3vw, 22px); width: min(96vw, 900px); max-height: 100%; }
.tap-item { aspect-ratio: 1; border: 0; border-radius: 34px; cursor: pointer; padding: 0; display: grid; place-items: center; box-shadow: var(--shadow); position: relative; max-height: 34vh; justify-self: center; width: 100%; max-width: 34vh; }
.tap-item > .art { width: 84%; height: 84%; }
.tap-item.seen::after { content: "⭐"; position: absolute; top: 6px; right: 10px; font-size: 1.4rem; animation: pop-in .4s ease; }
.tap-item.go { animation: bounce .7s ease; }

/* balões */
.sky { position: relative; width: 100%; flex: 1; overflow: hidden; border-radius: 26px; touch-action: none; }
.balloon { position: absolute; left: 0; top: 0; width: clamp(80px, 18vw, 130px); aspect-ratio: .8; border: 0; background: none; padding: 0; cursor: pointer; will-change: transform; }
.balloon .art { width: 100%; height: 100%; }
.balloon.popped { animation: popped .3s ease forwards; pointer-events: none; }
@keyframes popped { to { transform: var(--t) scale(1.6); opacity: 0; } }
.counter { font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 900; color: var(--primary); background: var(--card); border-radius: 22px; padding: .1rem 1.1rem; box-shadow: var(--shadow-sm); min-width: 2.2em; text-align: center; }

/* memória */
.mem-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, var(--size))); gap: clamp(8px, 2vw, 16px); justify-content: center; }
.mem-card { aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; }
.mem-card .inner { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mem-card.open .inner, .mem-card.done .inner { transform: rotateY(180deg); }
.mem-card .face { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow); display: grid; place-items: center; }
.mem-card .back { background: repeating-linear-gradient(45deg, var(--lav), var(--lav) 12px, #CFC7FF 12px, #CFC7FF 24px); font-size: 2rem; }
.mem-card .front { background: var(--card); transform: rotateY(180deg); padding: 10%; }
.mem-card.done .front { box-shadow: 0 0 0 5px var(--good), var(--shadow); }

/* arrastar e soltar */
.drop-row { display: flex; gap: clamp(10px, 3vw, 24px); justify-content: center; flex-wrap: wrap; width: 100%; }
.drop {
  width: clamp(110px, 24vw, 200px); min-height: clamp(110px, 22vw, 180px); border-radius: 30px; position: relative;
  display: flex; flex-wrap: wrap; align-content: flex-end; justify-content: center; gap: 4px; padding: 10px; transition: transform .2s, box-shadow .2s;
}
.drop.basket { background: var(--c); box-shadow: inset 0 -14px 0 rgba(0, 0, 0, .08), var(--shadow); }
.drop.basket::before { content: ""; position: absolute; left: 12%; right: 12%; top: -26px; height: 40px; border: 7px solid var(--c); border-bottom: 0; border-radius: 60px 60px 0 0; filter: brightness(.92); }
.drop.hole { background: rgba(255, 255, 255, .6); box-shadow: inset 0 4px 12px rgba(74, 63, 85, .12); align-content: center; padding: 12px; }
.drop.hole .art { opacity: .9; }
.drop.over { transform: scale(1.06); box-shadow: 0 0 0 6px var(--gold), var(--shadow); }
.drop .placed { width: clamp(36px, 8vw, 60px); aspect-ratio: 1; animation: pop-in .3s ease; }
.drop.hole .placed { position: absolute; inset: 8%; width: auto; }
.drag-tray { display: flex; flex-wrap: wrap; gap: clamp(10px, 3vw, 20px); justify-content: center; min-height: 110px; width: 100%; max-width: 820px; }
.drag-item { width: clamp(76px, 16vw, 120px); aspect-ratio: 1; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); padding: 0; display: grid; place-items: center; touch-action: none; cursor: grab; position: relative; border: 0; }
.drag-item > .art { width: 80%; height: 80%; pointer-events: none; }
.drag-item.selected { box-shadow: 0 0 0 5px var(--gold), var(--shadow); transform: scale(1.06); }
.drag-item.dragging { z-index: 50; cursor: grabbing; box-shadow: 0 20px 40px rgba(74, 63, 85, .25); transition: none; }
.drag-item.returning { transition: transform .3s ease; }

/* quebra-cabeça */
.puzzle-board { position: relative; display: grid; background: rgba(255, 255, 255, .7); border-radius: 22px; box-shadow: var(--shadow); padding: 6px; gap: 4px; }
.puzzle-board .ghost { position: absolute; inset: 6px; opacity: .14; pointer-events: none; }
.puzzle-slot { border-radius: 10px; background: rgba(189, 178, 255, .15); outline: 3px dashed rgba(189, 178, 255, .6); outline-offset: -3px; position: relative; overflow: hidden; }
.puzzle-slot.over { background: rgba(255, 201, 60, .3); }
.puzzle-slot .piece-svg, .drag-item .piece-svg { width: 100%; height: 100%; display: block; }
.puzzle-slot.filled { outline: 0; animation: pop-in .3s ease; }
.drag-item.piece { padding: 4px; }

/* traçado */
.trace-wrap { position: relative; width: min(94vw, 70vh); aspect-ratio: 1; background: var(--card); border-radius: 30px; box-shadow: var(--shadow); overflow: hidden; touch-action: none; }
.trace-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* escute e repita */
.simon { display: grid; grid-template-columns: repeat(2, minmax(0, min(36vw, 28vh))); gap: clamp(14px, 4vw, 28px); }
.simon.p3 { grid-template-columns: repeat(3, minmax(0, min(28vw, 26vh))); }
.pad { aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .1), var(--shadow); transition: transform .12s, filter .12s; display: grid; place-items: center; padding: 0; }
.pad .art { pointer-events: none; opacity: .9; width: 64%; height: 64%; }
.pad.lit { transform: scale(1.1); filter: brightness(1.15) saturate(1.2); box-shadow: 0 0 0 10px rgba(255, 255, 255, .9), 0 0 40px var(--c); }
.simon.wait .pad { pointer-events: none; }

/* ---------------- comemoração ---------------- */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(74, 63, 85, .35); display: grid; place-items: center; padding: 16px; animation: fade-in .2s ease; }
.celebrate { background: var(--card); border-radius: 36px; padding: 26px 22px 22px; width: min(440px, 100%); text-align: center; box-shadow: var(--shadow); animation: pop-in .45s ease; }
.big-stars { display: flex; justify-content: center; gap: 6px; font-size: clamp(3rem, 14vw, 4.4rem); margin: 4px 0 8px; }
.big-stars span { display: inline-block; animation: star-in .6s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.big-stars .off { filter: grayscale(1); opacity: .25; }
@keyframes star-in { from { transform: scale(0) rotate(-180deg); opacity: 0; } }
.celebrate { position: relative; overflow: hidden; max-height: calc(100dvh - 32px); overflow-y: auto; }
.cele-hero { position: relative; width: 128px; height: 128px; margin: 0 auto; display: grid; place-items: center; }
.cele-ray { position: absolute; inset: -18px; border-radius: 50%; background: repeating-conic-gradient(#FFE8A3 0 12deg, #FFF6D6 12deg 24deg); animation: spin 8s linear infinite; mask: radial-gradient(circle, #000 55%, transparent 71%); -webkit-mask: radial-gradient(circle, #000 55%, transparent 71%); }
.cele-avatar { position: relative; width: 104px; height: 104px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; animation: hop .8s ease-in-out infinite; }
.cele-avatar .art { width: 82%; height: 82%; }
.cele-title { margin: 10px 0 0; font-size: clamp(1.5rem, 7vw, 2.1rem); color: var(--primary); animation: pop-in .5s ease .15s backwards; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes hop { 50% { transform: translateY(-12px) scale(1.04); } }
.celebrate .actions { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.celebrate .actions .icon-btn { width: 64px; height: 64px; font-size: 1.8rem; }
.celebrate .actions .btn.go { background: var(--good); color: #fff; font-size: 1.3rem; padding: .8rem 1.4rem; border-radius: 999px; gap: 8px; animation: pulse 1.6s ease-in-out 1.6s infinite; }
.celebrate .actions .btn.go span { font-size: 1.6rem; line-height: 1; }
.level-up { background: var(--butter); border-radius: 18px; padding: .5rem .8rem; font-weight: 900; margin-top: 8px; animation: pulse 1.4s ease-in-out 2; }
.sticker-new { display: flex; align-items: center; gap: 10px; justify-content: center; background: var(--mint); border-radius: 18px; padding: .4rem .8rem; margin-top: 8px; font-weight: 900; }
.sticker-new .art { width: 54px; height: 54px; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 16px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 40px); background: var(--ink); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; z-index: 80; opacity: 0; transition: .3s; font-weight: 800; max-width: 92vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- portão dos pais / modais ---------------- */
.modal { background: var(--card); border-radius: 30px; padding: 24px; width: min(460px, 100%); box-shadow: var(--shadow); animation: pop-in .3s ease; max-height: 92dvh; overflow: auto; }
.gate-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 8px; }
.gate-nums button { aspect-ratio: 1; border: 0; border-radius: 20px; background: var(--bg-2); font-size: 1.8rem; font-weight: 900; cursor: pointer; box-shadow: var(--shadow-sm); }
.gate-nums button:active { transform: scale(.95); }
.error { color: #D9534F; min-height: 1.2em; font-weight: 800; }

/* ---------------- formulários ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 800; }
input[type="text"], input[type="email"], input[type="number"], select {
  font: inherit; font-weight: 700; border: 3px solid var(--line); border-radius: 18px; padding: .8rem 1rem; background: var(--bg-2); color: var(--ink); width: 100%; outline: none;
}
input:focus, select:focus { border-color: var(--primary-2); }
input.code { letter-spacing: .5em; text-align: center; font-size: 1.4rem; }
.choices { display: grid; gap: 10px; }
.choices.cols2 { grid-template-columns: repeat(2, 1fr); }
.choice { border: 3px solid var(--line); background: var(--card); border-radius: 20px; padding: .9rem 1rem; text-align: left; cursor: pointer; font-weight: 800; display: flex; align-items: center; gap: .7rem; }
.choice.on { border-color: var(--primary); background: #F2F0FF; }
.choice .emoji { font-size: 1.6rem; }
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.avatar-pick button { border: 4px solid transparent; border-radius: 50%; background: var(--bg-2); padding: 4px; cursor: pointer; aspect-ratio: 1; }
.avatar-pick button.on { border-color: var(--primary); background: #F2F0FF; }
.skill-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: .6rem 0; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--bg-2); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: .45rem .8rem; cursor: pointer; font-weight: 800; font-size: .85rem; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.steps { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.steps i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--lav)); border-radius: 99px; transition: width .3s; }
.form-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: .5rem 0; }
.switch input { width: 52px; height: 30px; appearance: none; background: var(--line); border-radius: 99px; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }
.switch input:checked { background: var(--good); }
.switch input:checked::after { transform: translateX(22px); }

/* ---------------- área dos pais ---------------- */
.kid-row { display: flex; gap: 14px; align-items: center; }
.kid-row .avatar { width: 72px; height: 72px; background: var(--bg-2); }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 130px 1fr 60px; gap: 10px; align-items: center; font-size: .9rem; }
.bar .track { height: 14px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar .track i { display: block; height: 100%; border-radius: 99px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.plan { border: 3px solid var(--line); border-radius: 24px; padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 8px; }
.plan .price { font-size: 1.8rem; font-weight: 900; }
.plan.best { border-color: var(--gold); background: #FFFBEA; }
.benefits { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; }
.benefits li::before { content: "✔"; color: var(--good); margin-right: .5rem; }
.tag { display: inline-block; border-radius: 999px; padding: .15rem .6rem; font-size: .78rem; font-weight: 900; background: var(--bg-2); }
.tag.gold { background: var(--gold); color: #5A4300; }
.tag.ok { background: var(--mint); }
.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.history li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 2px solid var(--line); padding: .35rem 0; }

/* ---------------- desenho ---------------- */
.draw-screen { position: fixed; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom)); background: var(--bg); z-index: 10; }
.draw-main { flex: 1; min-height: 0; display: flex; gap: 10px; }
.canvas-box { flex: 1; min-width: 0; display: grid; place-items: center; }
.canvas-frame { position: relative; background: #fff; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; touch-action: none; }
.canvas-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.canvas-frame canvas.line { pointer-events: none; }
.toolbar { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 2px; scrollbar-width: none; }
.tool { width: 62px; height: 62px; border-radius: 20px; border: 0; background: var(--card); box-shadow: var(--shadow-sm); font-size: 1.9rem; cursor: pointer; flex: none; display: grid; place-items: center; }
.tool.on { background: var(--butter); box-shadow: 0 0 0 4px var(--gold); }
.tool.size i { display: block; border-radius: 50%; background: var(--ink); }
.palette { display: flex; gap: 8px; overflow-x: auto; padding: 6px 4px; scrollbar-width: none; justify-content: safe center; }
.swatch { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #fff; box-shadow: var(--shadow-sm); cursor: pointer; flex: none; }
.swatch.on { transform: scale(1.18); box-shadow: 0 0 0 4px var(--ink); }
.stamps { display: flex; gap: 6px; overflow-x: auto; padding: 4px; justify-content: safe center; }
.stamps button { width: 52px; height: 52px; border: 3px solid transparent; border-radius: 16px; background: var(--card); padding: 3px; cursor: pointer; flex: none; }
.stamps button.on { border-color: var(--gold); }
@media (orientation: portrait) {
  .draw-main { flex-direction: column; }
  .toolbar { flex-direction: row; overflow-x: auto; justify-content: safe center; }
  .tool { width: 54px; height: 54px; font-size: 1.6rem; }
}
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(120px, 40vw), 1fr)); gap: 12px; }
.page-card { border: 0; background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 10px; cursor: pointer; position: relative; aspect-ratio: 4 / 3; }
.page-card svg, .page-card img { width: 100%; height: 100%; display: block; object-fit: contain; }
.page-card .badge { position: absolute; top: 8px; right: 8px; background: var(--gold); color: #5A4300; border-radius: 999px; font-size: .72rem; padding: .15rem .55rem; font-weight: 900; }
.page-card.blank { display: grid; place-items: center; font-size: 3rem; border: 4px dashed var(--line); box-shadow: none; background: var(--bg-2); }
.gallery-item { position: relative; }
.gallery-item .del { position: absolute; top: 6px; left: 6px; width: 36px; height: 36px; font-size: 1rem; }

/* álbum */
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; }
.sticker { background: var(--card); border-radius: 26px; box-shadow: var(--shadow); padding: 12px; aspect-ratio: 1; display: grid; place-items: center; }
.sticker.got { background: radial-gradient(circle, #FFF8D6, #fff 70%); animation: pop-in .4s ease backwards; }
.sticker.no .art { opacity: .35; }
.progress-line { height: 18px; background: var(--card); border-radius: 99px; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .06); overflow: hidden; }
.progress-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--peach)); border-radius: 99px; }

/* ---------------- histórias ---------------- */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 44vw), 1fr)); gap: 14px; }
.book-card { position: relative; border: 0; cursor: pointer; text-align: left; padding: 8px 8px 10px; border-radius: 22px 26px 26px 22px; background: var(--c); box-shadow: inset 10px 0 0 rgba(0, 0, 0, .07), var(--shadow); display: flex; flex-direction: column; gap: 6px; transition: transform .15s; }
.book-card:active { transform: scale(.96) rotate(-1deg); }
.book-cover { display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 400 / 250; background: #fff; }
.cover-scene { width: 100%; height: 100%; display: block; pointer-events: none; }
.book-title { font-weight: 900; font-size: clamp(.95rem, 3.4vw, 1.15rem); line-height: 1.15; padding: 0 4px; }
.book-card .stars { font-size: .9rem; min-height: 1.1em; padding: 0 4px; }
.book-card .stars .off { filter: grayscale(1); opacity: .3; }
.book-card .badge { position: absolute; top: 14px; right: 14px; background: var(--gold); color: #5A4300; border-radius: 999px; font-size: .72rem; padding: .15rem .55rem; font-weight: 900; }
.book-card.locked .book-cover { filter: saturate(.7); }

.reader { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom)); background: radial-gradient(circle at 20% 0, color-mix(in srgb, var(--c) 55%, #fff), var(--bg) 60%); touch-action: none; overscroll-behavior: contain; }
.reader .music.muted { opacity: .6; }
.book { position: relative; flex: 1; min-height: 0; display: flex; perspective: 1600px; }
.page-holder { position: relative; flex: 1; min-height: 0; }
.page { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #FFFDF8; border-radius: 18px 28px 28px 18px; box-shadow: inset 14px 0 18px -12px rgba(74, 63, 85, .25), var(--shadow); transform-origin: left center; backface-visibility: hidden; }
.page.enter-next { animation: page-in-next .6s ease backwards; }
.page.enter-prev { animation: page-in-prev .6s ease backwards; }
.page.leave-next { animation: page-out-next .6s ease forwards; z-index: 2; pointer-events: none; }
.page.leave-prev { animation: page-out-prev .6s ease forwards; z-index: 2; pointer-events: none; }
@keyframes page-in-next { from { opacity: 0; transform: translateX(6%) scale(.97); } }
@keyframes page-in-prev { from { opacity: 0; transform: translateX(-6%) scale(.97); } }
@keyframes page-out-next { to { transform: rotateY(-100deg); opacity: .2; } }
@keyframes page-out-prev { to { transform: translateX(10%) scale(.95); opacity: 0; } }

.scene-wrap { position: relative; flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; }
.story-scene { width: min(100cqw, 160cqh); height: auto; aspect-ratio: 400 / 250; display: block; border-radius: 16px; touch-action: none; }
.bubble { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); max-width: 92%; background: #fff; border-radius: 20px; padding: .45rem 1rem; font-weight: 900; font-size: clamp(1rem, 3.4vw, 1.35rem); box-shadow: var(--shadow); text-align: center; color: var(--primary); pointer-events: none; }
.bubble::after { content: ""; position: absolute; bottom: -10px; left: 50%; margin-left: -10px; border: 10px solid transparent; border-bottom: 0; border-top-color: #fff; }
.page-text { margin: 0; font-size: clamp(1.05rem, 3.3vw, 1.55rem); line-height: 1.45; font-weight: 800; text-align: center; padding: 0 44px; cursor: pointer; }
.page-text .sen { border-radius: 10px; padding: 0 .1em; transition: background .3s, color .3s; }
.page-text .sen.on { background: var(--butter); color: #3D3448; box-shadow: 0 0 0 3px var(--butter); }
.page-opts { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.story-opt { width: clamp(70px, 17vw, 112px); aspect-ratio: 1; border: 0; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; padding: 6px; animation: pop-in .4s ease backwards; }
.story-opt .art { width: 88%; height: 88%; }
.story-opt.bad { animation: shake .45s ease; }
.bubble.pop-in { animation: bubble-in .45s ease; }
@keyframes bubble-in { from { transform: translateX(-50%) scale(.6); opacity: 0; } }
.story-opt.good { box-shadow: 0 0 0 5px var(--good), var(--shadow); }
.story-opt.hint { animation: pulse 1s ease-in-out infinite; }
.opt-emoji { font-size: clamp(2.2rem, 9vw, 3.6rem); line-height: 1; }
.opt-num { font-size: clamp(2.2rem, 9vw, 3.4rem); font-weight: 900; color: var(--primary); line-height: 1; }
.nav { position: absolute; top: 50%; z-index: 3; width: 58px; height: 58px; margin-top: -29px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--shadow); font-size: 1.5rem; cursor: pointer; color: var(--primary); transition: opacity .25s, transform .2s; }
.nav.prev { left: -6px; }
.nav.next { right: -6px; background: var(--good); color: #fff; }
.nav.off { opacity: 0; pointer-events: none; transform: scale(.6); }
.nav.pulse { animation: pulse 1.3s ease-in-out infinite; }
@media (orientation: landscape) and (max-height: 520px) {
  .page { flex-direction: row; align-items: center; }
  .scene-wrap { height: 100%; }
  .page-text { flex: 0 0 34%; padding: 0 10px 0 0; text-align: left; font-size: clamp(.95rem, 2.4vw, 1.25rem); }
  .page-opts { position: absolute; bottom: 14px; left: 10px; right: 36%; }
  .nav { width: 50px; height: 50px; margin-top: -25px; }
}

/* elementos animados das cenas */
.story-scene .el { cursor: pointer; }
.story-scene .el.gone { display: none; }
.story-scene .el.counted .fx { opacity: .55; }
.story-scene .fx, .cover-scene .fx { transform-box: fill-box; transform-origin: 50% 100%; }
.story-scene .el.hint .fx { animation: hint-glow 1s ease-in-out infinite; }
.fx.idle { animation: idle 2.6s ease-in-out infinite; }
.fx.breathe { animation: breathe 3s ease-in-out infinite; }
.fx.float { animation: floaty 3s ease-in-out infinite; }
.fx.spin-slow, .spin-slow { animation: spin 30s linear infinite; transform-box: fill-box; transform-origin: center; }
.fx.twinkle, .twinkle { animation: twinkle 1.8s ease-in-out infinite; }
.fx.shiver { animation: shiver .25s linear infinite; }
.drift { animation: drift-x 14s ease-in-out infinite alternate; }
.snowfall { animation: snow 6s linear infinite; }
.story-scene .fx.wiggle { animation: bounce .6s ease; }
.story-scene .fx.jump { animation: hop-up .7s ease; }
.story-scene .fx.shake { animation: shake .5s ease; }
.story-scene .fx.appear { animation: pop-grow .6s cubic-bezier(.2, 1.6, .4, 1); }
.story-scene .fx.pop-out { animation: pop-out .45s ease forwards; }
.story-scene .fx.blow { animation: blow .8s ease; }
.story-scene .fx.roar { animation: roar .9s ease; }
.story-scene .fx.sweep { animation: sweep .6s ease; transform-origin: 20% 10%; }
.story-scene .fx.gust { animation: gust .7s ease forwards; transform-origin: 0 50%; }
.story-scene .fx.dash { animation: dash 1s ease-in forwards; }
.story-scene .fx.walk { animation: walk 2.6s ease-in-out forwards; }
.story-scene .fx.tired { animation: tired 1.2s ease forwards; }
.story-scene .fx.blown { animation: blown 1.2s ease-out forwards; }
@keyframes idle { 50% { transform: translateY(-3%) scale(1.01, .99); } }
@keyframes breathe { 50% { transform: scale(1.03, .97); } }
@keyframes floaty { 50% { transform: translateY(-8%); } }
@keyframes twinkle { 50% { opacity: .35; } }
@keyframes shiver { 25% { transform: translateX(-1.5%); } 75% { transform: translateX(1.5%); } }
@keyframes drift-x { to { transform: translateX(40px); } }
@keyframes snow { from { transform: translateY(-20px); } to { transform: translateY(30px); } }
@keyframes hint-glow { 50% { transform: scale(1.1); filter: drop-shadow(0 0 10px #FFC93C); } }
@keyframes hop-up { 40% { transform: translateY(-28%) scale(1.04); } 70% { transform: translateY(0) scale(1.06, .94); } }
@keyframes pop-grow { from { transform: scale(0); opacity: 0; } }
@keyframes pop-out { 40% { transform: scale(1.3); } to { transform: scale(0); opacity: 0; } }
@keyframes blow { 30% { transform: scale(1.12, .92); } 60% { transform: scale(.94, 1.08) translateX(4%); } }
@keyframes roar { 20%, 60% { transform: scale(1.15) rotate(-3deg); } 40%, 80% { transform: scale(1.15) rotate(3deg); } }
@keyframes sweep { 30% { transform: rotate(-25deg); } 70% { transform: rotate(20deg); } }
@keyframes gust { from { transform: scaleX(.2); opacity: 0; } 40% { opacity: 1; } to { transform: scaleX(1.4) translateX(20%); opacity: 0; } }
@keyframes dash { 15% { transform: translateX(-6%) scale(1.05, .95); } to { transform: translateX(900px); opacity: 0; } }
@keyframes walk { to { transform: translateX(420px); } }
@keyframes tired { 50% { transform: rotate(-6deg) translateY(4%); } to { transform: rotate(-4deg) translateY(6%) scale(.96); } }
@keyframes blown { to { transform: translate(260px, -120px) rotate(40deg); opacity: 0; } }

.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 10px; }
.footer a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
