/* Ecrãs da app. Cores, teclas, cartões e texturas vêm de kit.css (a única folha de componentes): aqui só há disposição
   e o desenho dos recursos do exercício (relógio, moedas, formas…), também a caneta. */
html, body { margin: 0; height: 100%; }
body { touch-action: manipulation; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
#app { height: 100dvh; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); }
.axslot { flex: none; display: flex; }

/* ---------- cabeçalho ---------- */
.top { display: flex; align-items: center; gap: 10px; padding: 10px 0 0; }
.top .k { flex: none; }
.wname { flex: 1; min-width: 0; }
.wname b { display: block; font: 700 30px/1 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wname small { font: 600 15px var(--font); color: var(--ink-2); }

/* ---------- mapa ---------- */
.worlds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 4px; }
.worlds .k { min-width: 0; width: 100%; min-height: 60px; padding: 2px 0; flex-direction: column; gap: 0; font-size: 15px; --d: 6px; --r: 20px; }
.worlds .k .emo { font-size: 24px; line-height: 1.15; }
.worlds .k.is-locked svg { width: 22px; height: 22px; margin: 3px 0 2px; }
.is-map .bar { margin: 0 2px; }
.is-map .bar .emo { font-size: 18px; }

.pathwrap { flex: 1; overflow-y: auto; margin: 6px -16px 0; isolation: isolate; -webkit-overflow-scrolling: touch; }
.path { position: relative; margin: 20px 16px 30px; }
.path svg.line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: -2; }
.path .node { position: absolute; width: 84px; height: 84px; margin: -42px 0 0 -42px; font-size: 36px; font-weight: 700; }
.path .st { position: absolute; transform: translate(-50%, 54px); font-size: 20px; pointer-events: none; }
.path .ring { position: absolute; width: 112px; height: 112px; margin: -56px 0 0 -56px; border: 3px dashed var(--ink); border-radius: 50%; animation: spin 12s linear infinite; z-index: -1; pointer-events: none; }
.path .me { position: absolute; font-size: 42px; transform: translate(26px, -88px); animation: bob 1.2s infinite alternate ease-in-out; pointer-events: none; }
.trophy { position: absolute; transform: translate(-50%, -50%); font-size: 52px; line-height: 1; background: none; border: 0; padding: 0; cursor: pointer; }
.trophy.off { filter: grayscale(1); opacity: .35; }
@keyframes spin { to { rotate: 360deg; } }
@keyframes bob { to { translate: 0 -6px; } }
.go { margin: 8px 0 calc(14px + var(--d)); min-height: 74px; font-size: 30px; }

/* ---------- exercício ---------- */
.prompt { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow-y: auto; padding: 12px 0 24px; }
.prompt > .card { flex: none; margin: auto 10px auto 0; }   /* sem overflow no cartão: senão corta a sombra */
.qcard { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 18px 12px 16px; }
.caption { font-size: 18px; color: var(--ink-2); }
.qtext { font: 700 46px/1.1 var(--font); }
.bigtext { font-size: 140px; line-height: 1.1; }
.word { font: 700 46px/1.1 var(--font); letter-spacing: 2px; }
.word u, .sentence u { text-decoration: none; border-bottom: 4px solid var(--ink); background: var(--tx-faint); padding: 0 2px; }
.sentence { font-size: 30px; }
.story { font-size: 22px; font-weight: 500; text-align: left; line-height: 1.45; }
.storyq { font-size: 24px; }
.objs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: 52px; line-height: 1.1; max-width: 350px; filter: saturate(.8); }
.sumvis { display: flex; align-items: center; gap: 10px; } .sumvis .objs { max-width: 140px; } .sumvis b { font-size: 46px; }
.groups { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.groups .objs, .seq span { background: var(--milk-2); border: solid var(--ink); border-width: 2px 2.5px 3.5px 2.5px; border-radius: var(--r-sm); }
.groups .objs { font-size: 30px; padding: 4px 8px; max-width: 150px; }
.seq { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.seq span { min-width: 60px; padding: 4px 10px; font-size: 38px; }
.money { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.coin { width: 78px; height: 78px; border-radius: 50%; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; font-size: 30px; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #fff8dc 0 12%, #f0cf73 40%, #d4a63c); border: solid var(--ink); border-width: 2.5px 3px 4px 3px; }
.coin small { font-size: 12px; } .coin.c1, .coin.c2 { background: radial-gradient(circle at 35% 30%, #fbe9dc 0 12%, #d9a37a 40%, #b77d52); }
.money .note { display: inline-block; padding: 16px 20px; border-radius: 10px; font-size: 26px; color: var(--ink); background: var(--tx-hatch), #d9ead9; border: solid var(--ink); border-width: 2.5px 3px 4px 3px; }
.money .note.n50 { background: var(--tx-hatch), #e3dcf0; } .money .note.n100 { background: var(--tx-hatch), #d8e4f3; }
.rectvis { background: var(--milk); border: 4px solid var(--ink); padding: 30px 24px; font-size: 24px; border-radius: 4px; }
.rectvis.sq { width: 150px; height: 150px; display: flex; align-items: center; justify-content: center; padding: 0; }
.grid { display: grid; gap: 3px; } .grid i { width: 28px; height: 28px; background: var(--tx-hatch), var(--milk-2); border: 2px solid var(--ink); }
/* desenhos do conteúdo a caneta; a cor das formas faz parte da pergunta, por isso fica */
.qcard svg *:not(text), .opt svg[width] *:not(text) { stroke: var(--ink); }
.qcard svg.shape *, .opt svg.shape * { stroke-width: 3.5; stroke-linejoin: round; }
.opt svg[width] { stroke-width: 2.5; max-width: 100%; height: auto; }

.opts { display: grid; gap: 12px; padding: 6px 0 calc(16px + var(--d)); grid-template-columns: 1fr 1fr; isolation: isolate; }
.opts.n3 { grid-template-columns: repeat(3, 1fr); }
.opts.long { grid-template-columns: 1fr; }
.opt { min-width: 0; min-height: 104px; padding: 8px; white-space: normal; word-break: break-word; }
.opt .em { font-size: 50px; letter-spacing: -4px; filter: saturate(.8); }
.opts.long .opt { min-height: 72px; font-size: 28px; }
.opts.n2 .opt { min-height: 130px; }
.opt.k-txt { font-size: 32px; }
.opt.k-num { font-size: 52px; }

/* ---------- resultado e mundo novo ---------- */
.result { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.result .top { align-self: stretch; text-align: left; }
.result .spacer { flex: 1; }
.result h1 { font: 700 46px/1 var(--font); margin: 0; }
.result .sub { font-size: 22px; color: var(--ink-2); }
.result > .k { width: 100%; max-width: 420px; }
.result .card { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 14px; margin-bottom: 26px; }
.bigstars { font-size: 84px; line-height: 1; display: flex; gap: 4px; -webkit-text-stroke: 2.5px var(--ink); }
.bigstars span { color: var(--gold); opacity: 0; scale: .2; animation: starin .5s var(--spring) forwards; }
.bigstars span.off { color: #e9dfcf; animation-name: starinoff; }
@keyframes starin { to { opacity: 1; scale: 1; } }
@keyframes starinoff { to { opacity: 1; scale: .85; } }
.newworld { font-size: 110px; line-height: 1.1; animation: bob .6s infinite alternate ease-in-out; }
.confetti { position: fixed; top: -60px; font-size: 34px; pointer-events: none; animation: fall linear forwards; z-index: 5; -webkit-text-stroke: 1.5px var(--ink); }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* ---------- porta dos pais ---------- */
.modal { position: fixed; inset: 0; background: rgba(29, 25, 22, .45); display: flex; align-items: center; justify-content: center; z-index: 10; padding: 16px; }
.modal .box { width: 100%; max-width: 380px; text-align: center; padding: 18px 18px 6px; margin: 0; background: var(--tx-paper), var(--cream); isolation: isolate; }
.modal .box::after { display: none; }
.box .q { font: 700 40px/1 var(--font); margin: 14px 0 10px; }
.box .ans { font: 700 36px/50px var(--font); min-height: 56px; margin: 0 50px 16px; border: solid var(--ink); border-width: 2.5px 3px 3.5px 3px; border-radius: var(--r-sm); background: var(--milk); box-shadow: inset 0 4px 0 rgba(0, 0, 0, .05); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; }
.keys .k { min-width: 0; width: 100%; font-size: 26px; }

/* ---------- painel dos pais ---------- */
.pp { flex: 1; overflow-y: auto; font-weight: 500; margin: 0 -16px; padding: 4px 16px 24px; }
.pp h2 { font: 600 18px/1 var(--font); color: var(--ink-2); margin: 10px 0 12px; }
.pp table { width: 100%; border-collapse: collapse; font-size: 16px; }
.pp th, .pp td { padding: 8px 4px; text-align: right; border-bottom: 1.5px dashed var(--graphite); } .pp th:first-child, .pp td:first-child { text-align: left; }
.pp tr:last-child td { border-bottom: 0; }
.pp td:not(:first-child) { white-space: nowrap; }
.pp td .muted { display: block; margin: 0; font-size: 13px; }
.pp th { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.pp .days { display: flex; gap: 8px; align-items: flex-end; height: 120px; }
.pp .days div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; font-size: 13px; color: var(--ink-2); }
.pp .days div span { font-weight: 700; color: var(--ink); }
.pp .days b { width: 100%; min-height: 3px; background: var(--tx-hatch), var(--milk-2); border: solid var(--ink); border-width: 2.5px 2.5px 0; border-radius: 8px 8px 0 0; }
.pp .days div.today b { background: var(--tx-cross), var(--milk-2); }
.pp .days div.today { color: var(--ink); font-weight: 700; }
.pp .line { display: flex; align-items: center; gap: 14px; padding: 8px 0; font-size: 20px; font-weight: 600; }
.pp .field { margin-bottom: 6px; }
.pp .row { display: flex; gap: 4px 10px; flex-wrap: wrap; margin-top: 12px; }
.pp .row .k { font-size: 18px; }
.pp .muted { color: var(--ink-2); font-size: 14px; margin-top: 8px; }
.pp .card { margin-bottom: 22px; }

@media (min-width: 600px) {
  .path .node { width: 100px; height: 100px; margin: -50px 0 0 -50px; font-size: 44px; }
  .opt { min-height: 130px; } .opt .em { font-size: 64px; } .opt.k-txt { font-size: 42px; } .opt.k-num { font-size: 76px; }
  .bigtext { font-size: 170px; } .objs { font-size: 64px; max-width: 520px; }
  .worlds .k .emo { font-size: 34px; } .worlds .k { min-height: 76px; }
  .qtext, .word { font-size: 56px; }
}
@media (max-height: 640px) { .bigtext { font-size: 90px; } .opt { min-height: 80px; } .objs { font-size: 38px; } }

/* ---------- tablet e computador: não esticar o telemóvel ---------- */
@media (min-width: 768px) {
  #app.is-play, #app.is-parents { max-width: 900px; }
  #app.is-result { max-width: 640px; }
  .opts.n4 { grid-template-columns: repeat(4, 1fr); }      /* respostas em fila */
  .opts.long { grid-template-columns: 1fr 1fr; }
  .prompt > .card { width: 100%; max-width: 760px; align-self: center; }
}
/* computador e tablet deitado: classes e disciplinas numa barra lateral, o caminho usa a largura */
@media (min-width: 1024px) {
  #app.is-map { max-width: 1240px; display: grid; grid-template-columns: 300px 1fr; grid-template-rows: auto repeat(4, auto) 1fr auto; column-gap: 32px; align-content: stretch; }
  #app.is-map > .top { grid-column: 1 / -1; }
  #app.is-map > :not(.top):not(.pathwrap):not(.skillwrap):not(.go):not(.wmenu) { grid-column: 1; margin-top: 12px; }
  #app.is-map > .skillwrap { grid-column: 2; grid-row: 2 / 7; margin: 6px 0 0; }
  #app.is-map > .pathwrap { grid-column: 2; grid-row: 2 / 7; margin: 6px 0 0; }
  #app.is-map > .go { grid-column: 2; grid-row: 7; justify-self: center; max-width: 520px; }
  .is-map .subjects { flex-direction: column; }
  .is-map .subjects .k { flex-direction: row; gap: 10px; justify-content: flex-start; padding: 0 16px; font-size: 18px; min-height: 58px; }
  .path { max-width: 820px; margin-left: auto; margin-right: auto; }
}

/* rato: levanta um pouco ao passar; teclado: foco bem visível */
@media (hover: hover) { .k:hover:not(:active):not(.is-down):not(.is-locked):not(:disabled) { --z: calc(var(--d) + 2px); } }
.k:focus-visible, .tg:focus-visible, .list li:focus-visible, .trophy:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.keyhint { display: none; }
@media (hover: hover) and (min-width: 768px) {
  .opt .keyhint { display: block; position: absolute; top: 8px; left: 12px; font: 700 16px/1 var(--font); color: var(--ink-2); }
}
@media (min-width: 768px) and (min-height: 700px) {
  .qtext, .word { font-size: 68px; } .caption { font-size: 26px; } .objs { font-size: 76px; max-width: 640px; }
  .opt { min-height: 160px; } .opt.k-num { font-size: 88px; } .opt.k-txt { font-size: 46px; } .opt .em { font-size: 76px; }
}
@media (min-width: 768px) { #app.is-map > .go { width: 100%; max-width: 520px; align-self: center; } }

/* fotos recortadas (fundo transparente) com uma sombra leve por baixo */
.pic { display: block; width: 220px; height: 220px; object-fit: contain; pointer-events: none; user-select: none; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .16)); }
.opt .pic { width: 110px; height: 110px; filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .14)); }
@media (min-width: 768px) and (min-height: 700px) { .qcard .pic { width: 320px; height: 320px; } .opt .pic { width: 150px; height: 150px; } }

/* ---------- progressão: caminho do nível, meta, chama ---------- */
.wname b .stars.lvl { font-size: 28px; letter-spacing: 1px; }
.todo { margin: 8px 2px 0; font: 700 18px/1.2 var(--font); color: var(--ink); }
.goal { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; font: 700 34px/1 var(--font); }
.goal .stars { font-size: 30px; }
.goal .emo { font-size: 52px; filter: grayscale(.4); }
.flame { font-size: 18px; padding: 6px 10px; }

/* ---------- resultado, subida de nível e de classe ---------- */
.bigemo { font-size: 72px; line-height: 1; }
.bigstars.lvlup span { color: var(--ink); }
.sticker { display: inline-flex; width: 120px; height: 120px; border-radius: 50%; background: #fff; border: 2.5px solid var(--ink); box-shadow: 0 5px 0 var(--milk-base), .5px 5.5px 0 2px var(--ink); align-items: center; justify-content: center; overflow: hidden; }
.sticker img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .15)); }
.sticker.new { animation: pop .7s var(--spring) .5s both; rotate: -6deg; }
@keyframes pop { from { scale: .2; opacity: 0; } }
.trip { display: flex; align-items: center; gap: 8px; font-size: 56px; width: 100%; justify-content: center; }
.trip .road { position: relative; flex: 1; max-width: 200px; height: 4px; background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 16px); }
.trip .road .me { position: absolute; top: -48px; font-size: 40px; animation: travel 2.4s ease-in-out infinite; }
@keyframes travel { from { left: -10%; } to { left: 85%; } }

/* ---------- caderneta ---------- */
.bookpage { flex: 1; overflow-y: auto; padding: 4px 2px 24px; }
.bookpage h2 { font: 700 18px/1 var(--font); margin: 16px 0 10px; }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.slot { aspect-ratio: 1; border: 2px dashed #9a9a98; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--ink-2); }
.slot.has { border: 0; }
.slot .sticker { width: 100%; height: 100%; box-shadow: none; }
.slot .stars { font-size: 11px; letter-spacing: -1px; color: var(--ink-2); }

/* ---------- mini-explicação ---------- */
.explain { text-align: center; padding: 20px 18px 8px; animation: pop .5s var(--spring); }
.ex-q { font: 700 30px/1.2 var(--font); margin: 16px 0 10px; }
.ex-a { display: flex; flex-direction: column; align-items: center; gap: 8px; font: 600 18px var(--font); margin-bottom: 16px; }
.ex-ans { width: auto; min-width: 140px; pointer-events: none; animation: respira 1.6s ease-in-out infinite; }
@keyframes respira { 50% { --z: calc(var(--d) + 4px); } }

/* ---------- relatório ---------- */
.notice { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 12px 14px; margin: 4px 0 14px; border: 2px solid var(--ink); border-radius: 16px; font: 700 17px/1.3 var(--font); background: #fff; }
.sum-line { font: 700 22px/1.3 var(--font); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 4px; font-size: 17px; }
.facts .stars { font-size: 16px; }
.pp .row .k--go { font-size: 19px; }
.chart { width: 100%; height: auto; display: block; }
.chart text { font: 700 14px var(--font); fill: var(--ink-2); }
.chart .lbl-ln { font: 700 14px var(--font); fill: var(--ink); }
.chart .grid { stroke: #dcdcda; stroke-width: 1.5; }
.chart .grid.pass, .legend .grid.pass { stroke: #8a8a88; stroke-dasharray: 6 5; }
.ln { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 10px; font-size: 15px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.pp table.cmp td { font-size: 17px; }
.pp table.cmp td.tr { font: 700 20px var(--font); width: 40px; text-align: center; }
.timeline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.timeline span { display: inline-flex; flex-direction: column; padding: 6px 10px; border: 1.5px solid var(--ink); border-radius: 12px; font: 700 15px var(--font); }
.timeline small { font-weight: 600; color: var(--ink-2); }
.pts { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 17px; line-height: 1.35; }
.pts .tip { margin-top: 4px; font-weight: 600; }
.say { margin-top: 12px; padding-top: 10px; border-top: 1.5px dashed #c9c9c7; font: 700 17px/1.35 var(--font); }
.pp .line b { font-size: 22px; min-width: 28px; text-align: center; }
.is-map .wname b { overflow: visible; text-overflow: clip; }
.is-map .wname b .stars.lvl { font-size: 24px; letter-spacing: 0; }
.is-map .top .k--icon { width: 50px; min-width: 50px; min-height: 50px; font-size: 22px; }

/* ---------- aula (cada erro) e demonstração ---------- */
.lesson { min-height: 280px; justify-content: center; gap: 18px; }
.lrow { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 12px; font-size: 46px; max-width: 520px; }
.lrow.small { font-size: 22px; gap: 6px; }
.lrow .op { font-size: 40px; margin: 0 4px; }
.lo { position: relative; display: inline-block; opacity: .35; transition: opacity .25s, scale .35s var(--spring), translate .6s ease; }
.lo.lit { opacity: 1; scale: 1.12; }
.lo.lit::after { content: attr(data-c); position: absolute; left: 50%; top: 100%; translate: -50% 2px; font: 700 18px/1 var(--font); color: var(--ink); }
.lrow.small .lo.lit::after { font-size: 12px; }
.lo.out { opacity: 1; }
.lo.out.gone { opacity: .12; translate: 0 -24px; scale: .7; }
.lo.add { color: var(--ink); }
.lsum { font: 700 44px/1 var(--font); margin-top: 18px; }
.lsum b { border-bottom: 5px solid var(--ink); padding: 0 6px; }
.lbig { font: 700 120px/1 var(--font); }
.ldraw { width: 150px; height: 175px; }
.ldraw text { font: 700 120px var(--font); fill: none; stroke: var(--ink); stroke-width: 3; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s ease forwards, fillin .6s ease 2.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill: var(--ink); } }
.lword { font: 600 44px/1 var(--font); letter-spacing: 2px; }
.lword b { font-weight: 700; border-bottom: 5px solid var(--ink); }
.lsyl { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lsyl span { font: 600 46px/1 var(--font); padding: 12px 16px; border: 2px dashed #b5b5b3; border-radius: 16px; opacity: .45; transition: opacity .3s, scale .35s var(--spring); }
.lsyl span.lit { opacity: 1; }
.lsyl span.hit.lit { font-weight: 700; border: 3px solid var(--ink); scale: 1.12; }
.lshape svg { width: 180px; height: 180px; }
.lshape svg * { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.6s ease forwards; }
.lsay { font: 700 26px/1.2 var(--font); }
.lseq { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lseq span { min-width: 64px; padding: 6px 12px; font-size: 40px; text-align: center; border: 2px solid var(--ink); border-radius: 14px; opacity: .35; transition: opacity .3s, scale .35s var(--spring); }
.lseq span.lit { opacity: 1; }
.lseq span.hit { border-width: 4px; font-weight: 700; }
.lseq.cmp span { opacity: 1; } .lseq.cmp span.hit { scale: 1.15; }
.lq { font: 700 30px/1.2 var(--font); }
.lans { width: auto; min-width: 140px; }
.lgo { padding: 6px 0 calc(16px + var(--d)); }
.lgo .k:disabled { opacity: .35; }
.lgo .k.ready { animation: respira 1.6s ease-in-out infinite; }
.tag.retry { font-size: 18px; }

/* ---------- ponto de treino no caminho ---------- */
.path .train { position: absolute; width: 70px; height: 70px; min-width: 0; margin: -35px 0 0 -35px; padding: 0; font-size: 30px; border-style: dashed; }
.path .train .cnt { position: absolute; top: -10px; right: -10px; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; background: var(--ink); color: #fff; font: 700 15px/28px var(--font); }
.path .train-lbl { position: absolute; transform: translate(-50%, 46px); font: 700 16px/1 var(--font); pointer-events: none; }
.lo.out.gone { opacity: .3; }
.lo.out.gone::before { content: '✕'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .9em; color: var(--ink); opacity: 1; }
.lo.lit::after { font-size: 20px; }
.lgo .k:disabled { border-style: solid; }
.lo.out.gone { opacity: 1; color: #d6d6d4; }
.lo.out.gone::before { font-size: .8em; font-weight: 700; color: var(--ink); }
/* barra do exercício: os pontos encolhem para caberem os botões 💡 e som, mesmo com exercícios que voltam */
.is-play .top .dots { flex: 1 1 auto; min-width: 0; gap: 4px; overflow: hidden; }
.is-play .top .dots i { flex: none; width: 13px; height: 13px; }
.is-play .top .dots i.now { scale: 1.25; }
.is-play .top .k--icon { width: 48px; min-width: 48px; min-height: 48px; }
.is-play .top .dots { justify-content: flex-start; }
.lemo { font-size: 90px; line-height: 1; } .lesson .pic { width: 160px; height: 160px; }
.is-play .top .dots { padding: 4px 6px; }

/* ---------- nível da criança (alinhado com a classe) ---------- */
.lvlbadge { flex: 1; min-width: 0; display: grid; gap: 3px; }
.lvlbadge b { font: 700 24px/1 var(--font); white-space: nowrap; }
.lvlbadge .lbar { display: block; height: 7px; max-width: 150px; border: 1.5px solid var(--ink); border-radius: 99px; overflow: hidden; background: #fff; }
.lvlbadge .lbar i { display: block; height: 100%; background: var(--ink); border-radius: 99px; }
.lvlbadge small { font: 600 13px/1 var(--font); color: var(--ink-2); }
.todo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.todo .stars.lvl { font-size: 20px; }
.lvlup-line { font: 700 22px/1.2 var(--font); margin-top: 6px; }
.bigbadge { display: inline-block; font: 700 34px/1 var(--font); padding: 10px 18px; border: 3px solid var(--ink); border-radius: 16px; }

/* ---------- configuração e troca de currículo ---------- */
.currs { display: grid; gap: 10px; margin: 6px 0 12px; }
.currc { width: 100%; flex-direction: column; align-items: flex-start; text-align: left; white-space: normal; min-height: 74px; padding: 10px 16px; font-size: 20px; }
.currc small { font: 500 15px/1.25 var(--font); color: var(--ink-2); }
.currc.is-on small { color: inherit; }
.starts { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 6px 0 12px; }
.startc { font-size: 17px; }
.startc small { font-size: 12px; }
.box.switch { max-width: 460px; text-align: left; }
.warnline { font: 600 17px/1.35 var(--font); margin: 8px 0 12px; }
.mastery { margin: 8px 0 4px; font-size: 17px; }
.notice span { flex: 1; }
.pt { font: 700 16px/1 var(--font); }

/* ---------- pictograma (dados, Stage 1) ---------- */
.pictogram { display: grid; gap: 6px; text-align: left; }
.pict { display: flex; align-items: center; gap: 6px; font-size: 26px; }
.pict b { width: 44px; } .pict i { font-style: normal; font-size: 22px; }
/* exercício: os pontos de progresso ficam numa linha própria, por baixo dos botões */
.is-play > .top { flex-wrap: wrap; row-gap: 2px; }
.is-play > .top .dots { order: 9; flex: 1 1 100%; justify-content: center; overflow: visible; padding: 2px 0 4px; }
.is-play > .top .wname { flex: 1; }
.is-play > .top #quit { margin-right: auto; }

/* tutor: crianças até 6 anos têm botões maiores; botões em espera depois de adivinhar; pista e ajuda a piscar */
.young .opt { min-height: 132px; }
.young .opt.k-num { font-size: 64px; } .young .opt.k-txt { font-size: 38px; } .young .opts.long .opt { font-size: 32px; } .young .opt .em { font-size: 60px; }
.young .opts { gap: 16px; }
.young .opt .pic { width: 136px; height: 136px; }
.opts.wait { opacity: .45; pointer-events: none; transition: opacity .3s; }
.qcard.hint { animation: hintp 1.2s ease 2; }
@keyframes hintp { 40% { scale: 1.04; box-shadow: 0 0 0 6px rgba(0, 0, 0, .08); } }
#help.blink { animation: blinkh 1s ease-in-out 6; }
@keyframes blinkh { 50% { scale: 1.18; } }
@media (prefers-reduced-motion: reduce) { .qcard.hint, #help.blink { animation: none; outline: 3px solid var(--ink); } }
/* configuração: idade, género, variantes do nome */
.pick, .say-vars { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 6px 0 12px; }
#sages .k { min-width: 46px; padding-inline: 10px; font-size: 18px; }
.kidline { font: 600 17px/1.3 var(--font); color: var(--ink-2, #3d3d3d); margin-bottom: 4px; }
.card h3 { margin: 14px 0 4px; font-size: 17px; }
[hidden] { display: none !important; }
.pick .k, .say-vars .k { flex: 0 0 auto; width: auto; white-space: nowrap; }
/* aparelhos da família: QR e código para juntar outro aparelho */
.pair { text-align: center; }
.qr { width: min(260px, 70vw); margin: 8px auto; background: #fff; padding: 6px; border-radius: 12px; }
.qr svg { display: block; width: 100%; height: auto; }
.paircode { font: 700 34px/1.2 var(--font); letter-spacing: 4px; margin: 4px 0; }
.syncline { color: var(--ink-2); }
.linkish { margin-top: 10px; }
.box.pair, .box.pair p, .box.pair .paircode { text-align: center; } .box.pair .row { justify-content: center; }
/* explicação: a frase ensina (grande e escura), a palavra-chave acende quando é dita; a resposta certa pulsa e a criança toca nela */
.lline { font: 700 26px/1.25 var(--font); color: var(--ink); text-align: center; max-width: 28ch; }
.lline .kw { padding: 0 .15em; border-radius: 8px; }
.lline .kw.lit { background: #fff1a8; box-shadow: 0 0 0 3px #fff1a8; animation: kwpop .5s ease; }
@keyframes kwpop { 40% { scale: 1.12; } }
.lwhy { font: 600 17px/1.3 var(--font); color: var(--ink-2); }
.lgo { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lhint { font: 700 19px/1.2 var(--font); color: var(--ink); display: flex; align-items: center; gap: 8px; min-height: 26px; }
.lhint .eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.lhint .eq i { width: 4px; height: 6px; border-radius: 2px; background: var(--ink); animation: eq .9s ease-in-out infinite; }
.lhint .eq i:nth-child(2) { animation-delay: .15s; } .lhint .eq i:nth-child(3) { animation-delay: .3s; }
@keyframes eq { 50% { height: 18px; } }
.lgo .lans { min-height: 96px; }
.lgo .lans > * { position: relative; z-index: 2; }
.lgo .lans .pic { width: 96px; height: 96px; }
.lgo .lans.pulse { animation: tapme 1.1s ease-in-out infinite; }
@keyframes tapme { 50% { scale: 1.08; box-shadow: 0 0 0 6px rgba(26, 26, 26, .12); } }
.lactor { animation: bob .7s ease-in-out 2 alternate; }   /* um gesto, sem ficar sempre a mexer */
/* cenas (Science): o olho pisca e «vê» a flor; ondas do objecto para o sentido */
.scene { display: flex; align-items: center; justify-content: center; gap: 6px; }
.scene .pic { width: 120px; height: 120px; }
.scene .obj .pic { width: 84px; height: 84px; }
.scene .waves { display: flex; gap: 4px; flex-direction: row-reverse; }
.scene .waves i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); opacity: .15; animation: wave 1.2s ease-in-out infinite; }
.scene .waves i:nth-child(2) { animation-delay: .2s; } .scene .waves i:nth-child(3) { animation-delay: .4s; }
@keyframes wave { 40% { opacity: .8; scale: 1.3; } }
.s-see .actor { animation: blink 2.6s ease-in-out infinite; transform-origin: 50% 55%; }
@keyframes blink { 0%, 44%, 52%, 100% { scale: 1 1; } 48% { scale: 1 .1; } }
.s-hear .actor, .s-smell .actor, .s-taste .actor, .s-touch .actor { animation: bob 1.2s ease-in-out infinite alternate; }
.s-grow .actor { animation: grow 2.4s ease-in-out infinite; }
@keyframes grow { 0% { scale: .8; } 60%, 100% { scale: 1.05; } }
@media (max-width: 420px) { .scene .pic { width: 96px; height: 96px; } .scene .obj .pic { width: 64px; height: 64px; } .lline { font-size: 23px; } }
@media (prefers-reduced-motion: reduce) { .scene *, .lactor, .lgo .lans.pulse, .lhint .eq i { animation: none !important; } }
.opt .pic, .young .opt .pic { max-width: 100%; height: auto; aspect-ratio: 1; }
.lgo .lans .t, .lgo .lans .n { font: 700 40px/1 var(--font); color: var(--ink); }
.pictogram .pic.mini { width: 36px; height: 36px; vertical-align: middle; } .seq .pic, .lseq .pic { width: 56px; height: 56px; }
.seq:has(.pic) { flex-wrap: nowrap; gap: 5px; } .seq span:has(> .pic) { padding: 3px; min-width: 0; min-height: 0; } .seq .pic { width: 46px; height: 46px; }

/* ---------- competências: 🟢 Simple · 🔵 Adept · 🟡 Advanced, cada nível com 3 mapas ---------- */
.skillwrap { flex: 1; overflow-y: auto; margin: 8px -4px 0; padding: 4px 4px 12px; -webkit-overflow-scrolling: touch; }
.skills { display: grid; grid-template-columns: 1fr; gap: 12px; }
.skill { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; text-align: left; min-height: 0; }
.skill .sk-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.skill .sk-name { font: 700 20px/1.2 var(--font); color: var(--ink); }
.skill.is-rec { outline: 3px solid var(--ink); outline-offset: 2px; }
.skill .me { position: absolute; right: -6px; top: -14px; font-size: 26px; }
.skb { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font: 700 14px/1.2 var(--font); white-space: nowrap; background: var(--milk-2, #f5f5f4); color: var(--ink); }
.skb.l0 { background: #e3f6e8; } .skb.l1 { background: #e3eefc; } .skb.l2 { background: #fff4cc; } .skb.gold { background: #ffe9a3; }
.sk-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sk-track .lv { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 12px; background: var(--milk-2, #f5f5f4); }
.sk-track .lv b { font-size: 18px; line-height: 1; }
.sk-track .lv.next { opacity: .45; }
.sk-track .lv.now { box-shadow: inset 0 0 0 2px var(--ink); }
.sk-track .dd { display: flex; gap: 4px; }
.sk-track .dd i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink-2, #3d3d3d); }
.sk-track .dd i.on { background: var(--ink); border-color: var(--ink); }
.skill.gold .sk-track .lv { background: #fff4cc; }
.place { margin: 0 0 12px; }
.place .row { display: flex; gap: 10px; margin-top: 10px; }
.place .row .k { flex: 1; min-width: 0; font-size: 20px; padding-inline: 10px; }
.train-row { margin-top: 12px; width: 100%; justify-content: center; font: 700 18px/1.2 var(--font); }
.train-row .cnt { margin-left: 6px; }
.tag.lv { background: none; padding: 0; }
.skline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 15px; }
.skline span { display: inline-flex; align-items: center; gap: 6px; }
.skline .tip { flex-basis: 100%; }
.bigbadge.sk { font-size: 64px; line-height: 1; background: none; border: 0; }
/* responder a escrever: visor grande e teclado de números (letra das teclas nunca abaixo de 28 px) */
.typein { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 420px; align-self: center; }
.typein.wait { opacity: .55; pointer-events: none; }
.typein .typed { min-width: 160px; min-height: 72px; padding: 6px 18px; border-radius: 18px; border: 3px solid var(--ink); background: var(--milk); font: 700 52px/1.2 var(--font); text-align: center; color: var(--ink); }
.typein .typed.is-right { border-color: #1f8a46; }
.typein .typed.is-wrong { border-color: #c0392b; }
.tkeys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.tkeys .tk { min-height: 64px; font: 700 34px/1 var(--font); }
@media (min-width: 768px) { .skills { grid-template-columns: 1fr 1fr; } }

/* ---------- movimento das interacções (só transform e opacity) ---------- */
#app.enter > * { animation: scr-in .28s cubic-bezier(.2, .8, .3, 1) both; }
#app.enter > *:nth-child(2) { animation-delay: .03s; } #app.enter > *:nth-child(3) { animation-delay: .06s; } #app.enter > *:nth-child(4) { animation-delay: .09s; }
@keyframes scr-in { from { opacity: 0; transform: translateX(14px); } }
.qcard.flip { animation: card-flip .45s cubic-bezier(.2, .8, .3, 1.2) both; transform-origin: 50% 50%; }
@keyframes card-flip { from { opacity: 0; transform: perspective(900px) rotateY(-70deg) scale(.96); } }
.xpgain { margin: 4px 0 2px; font: 700 28px/1.2 var(--font); color: var(--ink); }
.xpgain b { display: inline-block; min-width: 2.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.field.slider input[type="range"] { width: 100%; accent-color: var(--ink); }
/* errado: abanar suave com um tom coral, sem vermelho agressivo */
.k.is-wrong { --top: #ffd9cf; --bot: #f2a593; --base: #c9786a; --text: #5a2018; }
.typein .typed.is-wrong { border-color: #e29a88; }
/* Menos movimento (pais) e prefers-reduced-motion: sem animações decorativas; o premir das teclas fica */
html.menos *, html.menos *::before, html.menos *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; } }

/* ---------- repouso: um gesto curto de cada vez (≤ 3 px, escala ≤ 1.03), só transform e opacity ---------- */
.idle-hop { animation: idle-hop .7s cubic-bezier(.3, 1.6, .5, 1) 1; }
@keyframes idle-hop { 40% { transform: translateY(-3px); } }
.idle-tilt { animation: idle-tilt .8s ease-in-out 1; }
@keyframes idle-tilt { 30% { transform: rotate(-2.5deg); } 70% { transform: rotate(2deg); } }
.idle-pop { animation: idle-pop .6s ease-out 1; }
@keyframes idle-pop { 45% { transform: scale(1.03); } }
.idle-glow { position: relative; }
.idle-shine { position: absolute; inset: 0; z-index: 3; border-radius: inherit; overflow: hidden; pointer-events: none; }
.idle-shine::before { content: ''; position: absolute; top: -20%; bottom: -20%; left: -30%; width: 45%; background: linear-gradient(100deg, transparent, rgba(120, 170, 255, .18) 35%, rgba(255, 255, 255, .95) 50%, rgba(120, 170, 255, .18) 65%, transparent); transform: skewX(-18deg); animation: idle-glow .9s ease-out 1 both; }
@keyframes idle-glow { from { opacity: 0; transform: translateX(0) skewX(-18deg); } 30% { opacity: 1; } to { opacity: 0; transform: translateX(300%) skewX(-18deg); } }
