@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@600;700;800;900&display=swap');
/*
  VOICE: terno e encorajador, para criança e adulto lerem juntos.
  IDEA: o livreto da Dora ganha vida: cena ilustrada, friozinho que muda de tamanho e a sementinha que cresce.
  PICTURE: as ilustrações originais do livreto, trocando conforme a história avança.
  COLOUR/TYPE: terra quente, verde-broto, céu e amarelo-sol; Fredoka nos títulos, Nunito no texto.
  LAYOUT: cena à esquerda, painel à direita; no celular a cena fica fixa no topo.
*/
:root {
  color-scheme: light;
  --ink: #2f2418; --muted: #5d4b3a; --terra: #8a4f26; --terra-2: #6b3a1c;
  --broto: #5bb54a; --broto-esc: #2f7a2c; --sol: #ffc23d; --ceu: #7fd0ff; --coral: #ff6b57; --lilas: #9b7be0;
  --pare: #ff8fa0; --pense: #ffd35c; --siga: #7fd08a; --avalie: #b9a2f0;
  --good: #2f7a2c; --bad: #c43d2f;
  --border: 3px solid var(--ink);
}
* { box-sizing: border-box; min-width: 0; }
body {
  margin: 0; color: var(--ink); font: 700 1rem/1.5 Nunito, system-ui, sans-serif; overflow-x: clip;
  background:
    radial-gradient(circle at 96% 4%, #ffe08a 0 120px, transparent 121px),
    radial-gradient(circle at -3% 60%, #d6f0c4 0 160px, transparent 161px),
    radial-gradient(#f3dcb8 1.5px, transparent 1.6px) 0 0 / 26px 26px,
    #fff6e6;
}
button, input, select, textarea { font: inherit; color: var(--ink); }
input, textarea { background-color: #fff; -webkit-text-fill-color: var(--ink); }
input::placeholder { color: #8f7d6b; -webkit-text-fill-color: #8f7d6b; }
:focus-visible { outline: 4px solid var(--lilas); outline-offset: 3px; }
h1, h2, h3, .ending-title, .plano-titulo { font-family: Fredoka, Nunito, system-ui, sans-serif; }
.shell { width: min(1220px, calc(100% - 40px)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: 0; transform: translateY(-150%); background: #fff; padding: .5rem; z-index: 60; }
.skip:focus { transform: none; }
.lk-back { position: fixed; z-index: 50; left: 12px; bottom: 12px; background: var(--ink); color: #fff; font-weight: 900; font-size: 14px; padding: 11px 16px; border-radius: 99px; text-decoration: none; box-shadow: 0 4px 0 #0005; }

.masthead { display: flex; justify-content: space-between; align-items: center; padding-block: 10px; }
.masthead img { width: 76px; height: auto; display: block; background: #fff; border-radius: 18px; padding: 4px 6px; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.masthead a { color: var(--ink); background: #fff; border: var(--border); border-radius: 99px; padding: 8px 16px; text-decoration: none; font-weight: 900; box-shadow: 0 4px 0 var(--ink); }

.titlebar { padding-block: 6px 18px; }
h1 { margin: 0; font-size: clamp(2.3rem, 5.2vw, 3.8rem); line-height: 1; font-weight: 700; text-shadow: 0 4px 0 #fff; }
h1 span { color: var(--broto-esc); }
.titlebar p { margin: 8px 0 0; color: var(--muted); font-size: 1.08rem; max-width: 56ch; }

.game-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.theatre, .conversation { border: var(--border); border-radius: 28px; box-shadow: 0 8px 0 var(--ink); }
.theatre { padding: 12px; background: var(--terra); }
.stage { position: relative; border-radius: 18px; overflow: hidden; background: #c98a52; aspect-ratio: 651 / 425; }
.stage > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.frio { position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 14px; border-radius: 99px; background: #ffffffeb; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.frio-label { font: 700 .95rem/1 Fredoka, Nunito, sans-serif; }
.flocos { display: flex; gap: 2px; }
.flocos i { width: 22px; height: 22px; color: #c9d6dd; transition: color .3s, transform .3s; }
.flocos i.on { color: #3f9ee6; transform: scale(1.08); }
.flocos svg, .mini svg { width: 100%; height: 100%; display: block; }
.caption { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 99px; background: #fff; border: 2.5px solid var(--ink); font-weight: 900; font-size: .88rem; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
.confete { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confete i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; }
.confete .estrela { position: absolute; width: 22px; height: 22px; background: var(--sol); clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%); }

.cresce-wrap { padding: 12px 4px 2px; color: #fff; }
.cresce-wrap p { margin: 0 0 8px; font: 700 1.15rem/1.2 Fredoka, Nunito, sans-serif; }
.cresce { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
.cresce li { display: grid; justify-items: center; gap: 4px; font-size: .72rem; font-weight: 900; color: #f3d9bd; text-align: center; }
.cresce img { width: 100%; max-width: 74px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid #5a3218; filter: grayscale(.85) brightness(.75); transition: filter .4s, transform .4s, border-color .4s; }
.cresce li.feito img { filter: none; border-color: #fff; }
.cresce li.agora img { filter: none; border-color: var(--sol); transform: scale(1.12); box-shadow: 0 0 0 4px #ffc23d66; }
.cresce li.agora { color: #fff; }

.conversation { padding: clamp(18px, 2.6vw, 28px); background: #fff; }
.conversation h2 { margin: 0 0 6px; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.05; font-weight: 700; }
.story { margin: 6px 0 14px; color: var(--muted); font-weight: 700; }
.pergunta { margin: 14px 0 10px; font: 600 1.25rem/1.25 Fredoka, Nunito, sans-serif; }
.reply { position: relative; margin: 0 0 14px 6px; padding: 10px 16px; border: var(--border); border-radius: 20px; background: #eaf7dc; }
.reply::before { content: ""; position: absolute; left: -15px; top: 18px; border: 9px solid transparent; border-right: 12px solid var(--ink); }
.reply::after { content: ""; position: absolute; left: -9px; top: 20px; border: 7px solid transparent; border-right: 9px solid #eaf7dc; }
.reply strong { font-size: .8rem; color: var(--broto-esc); }
.reply p { margin: 2px 0 0; font-weight: 800; font-size: 1.05rem; }

.steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0 0 16px; }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 900; font-size: .68rem; color: var(--muted); white-space: nowrap; }
.steps li::before { content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 5px; background: #eadcc6; border-radius: 4px; }
.steps li:first-child::before { display: none; }
.steps li span { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2.5px solid #d4c2a6; font-size: .82rem; }
.steps li.now { color: var(--ink); }
.steps li.now span { border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); transform: scale(1.12); }
.steps li.now.pare span { background: var(--pare); } .steps li.now.pense span { background: var(--pense); } .steps li.now.siga span { background: var(--siga); } .steps li.now.avalie span { background: var(--avalie); }
.steps li.done::before, .steps li.now::before { background: var(--broto); }
.steps li.done { color: var(--good); }
.steps li.done span { background: var(--broto); border-color: var(--broto-esc); color: #fff; }

.primary, .ghost { min-height: 48px; padding: 10px 20px; border-radius: 99px; font-weight: 900; cursor: pointer; border: var(--border); box-shadow: 0 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.primary { background: var(--broto); color: #fff; text-shadow: 0 1px 0 #0003; }
.ghost { background: #fff; }
.primary:active, .ghost:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.primary.big { min-height: 56px; font-size: 1.1rem; padding-inline: 26px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 46px; padding: 8px 14px; border: var(--border); border-radius: 99px; background: #fff; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: #fff1c2; }
.chip[aria-pressed="true"]::before, .chip[aria-checked="true"]::before { content: "✓ "; color: var(--broto-esc); }
.chip.nao { animation: nao .4s; }
@keyframes nao { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
#outra-wrap { margin-top: 12px; }
.campo-label, #outra-wrap label { display: block; font-weight: 900; margin: 12px 0 6px; }
input[type="text"], .minha-escada input, #outra-pessoa { width: 100%; font-size: 16px; padding: 10px 14px; border: var(--border); border-radius: 14px; font-weight: 800; }

.choices { display: grid; gap: 10px; counter-reset: op; }
.choice { counter-increment: op; position: relative; text-align: left; min-height: 54px; padding: 12px 16px 12px 52px; border: var(--border); border-radius: 18px; background: #fff; font-weight: 800; font-size: 1.02rem; cursor: pointer; box-shadow: 0 5px 0 var(--ink); transition: transform .12s, box-shadow .12s, background .15s; }
.choice::before { content: counter(op, upper-alpha); position: absolute; left: 12px; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--sol); display: grid; place-items: center; font: 700 .9rem/1 Fredoka, Nunito, sans-serif; }
.choice:hover { background: #fff7e0; transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.choice:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }

.escala { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.nivel { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; min-height: 92px; border: var(--border); border-radius: 18px; background: #eaf5ff; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.nivel:nth-child(n+4) { background: #d6ebff; }
.nivel b { font: 700 1.3rem/1 Fredoka, Nunito, sans-serif; }
.nivel small { font-size: .7rem; font-weight: 900; color: var(--muted); }
.mini { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px; color: #3f9ee6; min-height: 30px; align-items: center; }
.mini svg { width: 13px; height: 13px; }

.ajudantes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ajudante { display: grid; gap: 2px; text-align: left; padding: 10px 12px; min-height: 64px; border: var(--border); border-radius: 16px; background: #fff; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.ajudante strong { font: 700 1.05rem/1.1 Fredoka, Nunito, sans-serif; }
.ajudante span { font-size: .85rem; color: var(--muted); }
.ajudante[aria-pressed="true"] { background: #eaf7dc; }
.ajudante[aria-pressed="true"] strong::after { content: " ✓"; color: var(--broto-esc); }

.dica { margin: 0 0 12px; color: var(--muted); }
.respira-linha { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.respira-btn { --p: 0; position: relative; width: 148px; height: 148px; border-radius: 50%; border: var(--border); background: #eaf7dc; box-shadow: 0 6px 0 var(--ink); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; font-weight: 900; }
.respira-btn .anel { position: absolute; inset: 8px; border-radius: 50%; background: conic-gradient(var(--broto) calc(var(--p) * 360deg), #fff calc(var(--p) * 360deg)); }
.respira-btn .anel::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: #fff; }
.respira-txt { position: relative; z-index: 1; font-size: .95rem; line-height: 1.25; }
.respira-txt b { font: 700 2rem/1 Fredoka, Nunito, sans-serif; }
.respira-btn.ativo { transform: translateY(3px) scale(1.04); box-shadow: 0 3px 0 var(--ink); }
.respira-btn.cheio { background: #fff1c2; animation: pulsa .8s ease-in-out infinite; }
@keyframes pulsa { 50% { transform: translateY(3px) scale(1.09); } }
.respiros { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; }
.respiros li { width: 34px; height: 34px; border-radius: 50%; border: 3px dashed #c9b597; }
.respiros li.feito { border: 3px solid var(--ink); background: #fff radial-gradient(circle, #9be07f 0 40%, transparent 41%); }

.contar { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.contar li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: #fff7e0; border: 2.5px solid var(--ink); font-weight: 800; }
.contar li b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sol); border: 2.5px solid var(--ink); font: 700 1.2rem/1 Fredoka, Nunito, sans-serif; }

.escada { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.escada li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; border: 2.5px solid #e0d0b6; color: var(--muted); font-weight: 800; background: #fffaf1; }
.escada li span { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: #fff; border: 2.5px solid #d4c2a6; font-size: .8rem; }
.escada li.feito { color: var(--good); background: #eaf7dc; border-color: #b8dca2; }
.escada li.feito span { background: var(--broto); border-color: var(--broto-esc); color: #fff; }
.escada li.agora { color: var(--ink); border-color: var(--ink); background: #fff1c2; box-shadow: 0 3px 0 var(--ink); }
.escada li.agora span { background: var(--sol); border-color: var(--ink); }
.minha-escada { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }

.message { margin: 0 0 12px; padding: 10px 14px 10px 42px; border-radius: 16px; font-weight: 900; position: relative; border: 2.5px solid currentColor; }
.message:empty { display: none; }
.message::before { position: absolute; left: 12px; top: 9px; font-size: 1.15rem; line-height: 1; }
.message.good { color: var(--good); background: #e8f7df; } .message.good::before { content: "★"; color: var(--sol); text-shadow: 0 0 1px var(--good); }
.message.bad { color: var(--bad); background: #ffe6e1; } .message.bad::before { content: "!"; }
.message.same { color: var(--muted); background: #f4ecdf; } .message.same::before { content: "…"; }

.ending { padding: 4px 0 0; }
.ending-title { margin: 0 0 10px; font-size: 1.7rem; font-weight: 700; }
.frase { margin: 0 0 14px; padding: 14px 18px; border-radius: 20px; background: #eaf7dc; border: var(--border); font: 600 1.1rem/1.4 Fredoka, Nunito, sans-serif; }
.frase cite { display: block; margin-top: 4px; font-style: normal; font-weight: 900; color: var(--broto-esc); }
.plano { padding: 14px 16px; border-radius: 20px; border: 3px dashed var(--terra); background: #fffaf1; }
.plano-titulo { margin: 0 0 8px; font-size: 1.3rem; font-weight: 700; }
.plano dl { margin: 0; display: grid; gap: 6px; }
.plano dl div { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid #eadcc6; }
.plano dt { font-weight: 900; color: var(--terra-2); }
.plano dd { margin: 0; font-weight: 700; white-space: pre-line; }
.ending-talk { margin: 14px 0 0; }

.guide { margin: 26px 0 10px; border-radius: 22px; background: #fff; border: var(--border); box-shadow: 0 6px 0 var(--ink); padding: 14px 20px; font-weight: 600; }
.guide summary { cursor: pointer; font-weight: 900; font-size: 1.05rem; font-family: Fredoka, Nunito, sans-serif; }
.guide ol { padding-left: 1.2rem; } .guide li { margin-bottom: 6px; }
.guide-ref { font-size: .85rem; color: var(--muted); }
.footer { padding-block: 14px 74px; color: var(--muted); font-size: .88rem; font-weight: 700; }

@media (max-width: 860px) {
  .game-grid { grid-template-columns: 1fr; gap: 16px; }
  .theatre { position: sticky; top: 0; z-index: 20; padding: 6px; border-radius: 0 0 22px 22px; box-shadow: 0 6px 0 var(--ink); }
  .cresce-wrap { padding: 8px 2px 2px; }
  .cresce-wrap p { display: none; }
  .cresce { gap: 4px; }
  .cresce li span { display: none; }
  .cresce img { max-width: 40px; border-width: 2px; }
  .caption { font-size: .78rem; bottom: 6px; }
  .frio { padding: 4px 8px; } .flocos i { width: 16px; height: 16px; }
  .conversation h2 { scroll-margin-top: calc(65vw + 70px); }
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 24px); }
  .steps li { font-size: .56rem; } .steps li span { width: 26px; height: 26px; } .steps li::before { top: 12px; }
  .escala { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plano dl div { grid-template-columns: 1fr; gap: 0; }
  .frio-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .respira-btn.cheio, .chip.nao { animation: none; }
  .flocos i, .cresce img, .choice, .primary, .ghost { transition: none; }
}
@media print {
  body { background: #fff; }
  .lk-back, .masthead, .titlebar, .theatre, .guide, .footer, .row-actions, .ending-talk, #painel, #intro { display: none !important; }
  .game-grid { display: block; } .conversation { border: 0; box-shadow: none; padding: 0; }
}

.caption { font-size: .8rem; padding: 4px 12px; }
@media (max-width: 560px) { .caption { display: none; } }

/* Faixa do friozinho fora da ilustração */
.barra-frio { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.barra-frio .frio { position: static; }
.barra-frio .caption { position: static; transform: none; margin: 0; background: transparent; border: 0; box-shadow: none; color: #fff; padding: 0; font-size: .95rem; white-space: normal; }
@media (max-width: 560px) { .barra-frio { margin-top: 6px; } .barra-frio .caption { display: block; font-size: .8rem; } .frio-label { display: inline; } }
