/* Programar com a Bina: só o que as brincadeiras de programar precisam além do estilo.css. Tudo começa com pr-. */

/* As telas do tema usam a largura toda da TV (o resto do app fica em 880px). */
.tela[class*="tela-programar-"] .corpo { max-width: 1180px; }

/* ---------- as cores dos blocos (por tipo) ---------- */
.pr-cat-mov { --c: #3b82f6; --e: #1d4ed8; --claro: #dbeafe; }
.pr-cat-giro { --c: #6366f1; --e: #4338ca; --claro: #e0e7ff; }
.pr-cat-rep { --c: #f97316; --e: #c2410c; --claro: #ffedd5; }
.pr-cat-se { --c: #a855f7; --e: #7e22ce; --claro: #f3e8ff; }
.pr-cat-acao { --c: #eab308; --e: #a16207; --claro: #fef9c3; }
.pr-cat-var { --c: #ef4444; --e: #b91c1c; --claro: #fee2e2; }
.pr-cat-func { --c: #ec4899; --e: #be185d; --claro: #fce7f3; }

/* ---------- menu, abertura e peças comuns ---------- */
.pr-apresenta-arte { width: 112px; }
.pr-apresenta-arte svg, .abertura-arte .pr-bina-svg, .abertura-arte .pr-tita-svg { display: block; width: 100%; }
.pr-brincadeira-emoji { background: #ccfbf1; }
.pr-legenda { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; color: var(--branco); font-size: 15px; font-weight: 800; }
.pr-legenda-item { display: inline-flex; align-items: center; gap: 5px; }
.pr-legenda-item i { width: 16px; height: 16px; border-radius: 5px; background: var(--c); box-shadow: 0 2px 0 var(--e); }
.pr-escondido { display: none !important; }
.vez.pr-vez .pr-vez-nome { font-size: 22px; }
.contagem-item.pr-agora-vez { background: var(--cor); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); transform: scale(1.08); }
.pr-janela .janela-arte { width: 110px; }

/* A mãozinha que mostra o gesto. */
.pr-gestos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; }
.pr-gesto {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--tinta); font-size: 15px; line-height: 1.15; box-shadow: 0 3px 0 rgba(42, 26, 94, .2);
}
.pr-mao { display: inline-block; font-size: 26px; line-height: 1; }
.pr-gesto-tocar .pr-mao { animation: pr-mao-toca 1s ease-in-out infinite; }
.pr-gesto-arrastar .pr-mao { animation: pr-mao-arrasta 1.6s ease-in-out infinite; }
.pr-gesto-teclado .pr-mao { animation: pr-mao-toca 1.4s ease-in-out infinite; }
.pr-gesto-corpo .pr-mao { animation: pr-mao-corpo 1.2s ease-in-out infinite; }
@keyframes pr-mao-toca { 0%, 100% { transform: translateY(-4px); } 45% { transform: translateY(3px) scale(.9); } }
@keyframes pr-mao-arrasta { 0% { transform: translate(-8px, 4px) scale(.9); } 60% { transform: translate(10px, -4px) scale(.9); } 100% { transform: translate(-8px, 4px); } }
@keyframes pr-mao-corpo { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-7px) rotate(8deg); } }

/* ---------- o mapa de fases ---------- */
.pr-historia {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 22px;
  background: var(--branco); box-shadow: var(--sombra);
}
.pr-historia-arte { width: 74px; flex: none; animation: balanca 2.4s ease-in-out infinite; }
.pr-historia-arte svg { display: block; width: 100%; }
.pr-historia p { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.pr-historia-conta { display: block; margin-top: 4px; font-size: 15px; font-weight: 800; color: #0f766e; }
.pr-modos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pr-modo {
  padding: 10px 16px; border-radius: 999px; font-size: 16px; font-weight: 800; color: var(--branco);
  background: rgba(255, 255, 255, .22); border: 3px solid transparent;
}
.pr-modo-escolhido { background: var(--branco); color: var(--roxo-escuro); border-color: #fde047; }
.pr-mapa {
  position: relative; width: 100%; border-radius: 28px; overflow: hidden;
  background: radial-gradient(circle at 20% 15%, #ccfbf1 0 18%, transparent 19%), radial-gradient(circle at 85% 80%, #bbf7d0 0 22%, transparent 23%),
    linear-gradient(180deg, #a7f3d0, #6ee7b7);
  box-shadow: var(--sombra);
}
.pr-mapa-linha { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pr-mapa-trilha { fill: none; stroke: #fde68a; stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; }
.pr-mapa-tracos { fill: none; stroke: #f59e0b; stroke-width: 4; stroke-dasharray: 2 14; stroke-linecap: round; }
.pr-mapa-ponto { fill: #22c55e; }
.pr-fase {
  position: absolute; transform: translate(-50%, -50%); width: 86px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 0; z-index: 1;
}
.pr-fase-bola {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--roxo-escuro); font-size: 28px; font-weight: 900;
  border: 5px solid #14b8a6; box-shadow: 0 5px 0 #0f766e;
}
.pr-fase-bola svg { width: 46px; height: 58px; }
.pr-fase-chefao .pr-fase-bola { width: 74px; height: 74px; background: #fde047; border-color: #f59e0b; box-shadow: 0 5px 0 #b45309; font-size: 34px; }
.pr-fase-feita .pr-fase-bola { background: #ccfbf1; }
.pr-fase-trancada .pr-fase-bola { background: #e5e7eb; color: #9ca3af; border-color: #9ca3af; box-shadow: 0 5px 0 #6b7280; }
.pr-fase-trancada .pr-fase-bola svg { filter: grayscale(1); opacity: .6; }
.pr-fase-agora .pr-fase-bola { animation: pr-pulsa 1.1s ease-in-out infinite; border-color: #fde047; }
.pr-fase-estrelas { font-size: 13px; line-height: 1; padding: 2px 6px; border-radius: 999px; background: rgba(255, 255, 255, .85); white-space: nowrap; }
.pr-fase-nome { font-size: 12px; font-weight: 800; color: #134e4a; line-height: 1; }
.pr-fase-bina { position: absolute; top: -50px; width: 44px; pointer-events: none; animation: pr-pula-leve 1.2s ease-in-out infinite; }
.pr-fase-bina svg { display: block; width: 100%; }
.pr-fase:active .pr-fase-bola { transform: scale(.94); }
.pr-fase:focus-visible { outline: none; }
.pr-fase:focus-visible .pr-fase-bola { outline: 5px solid #fde047; outline-offset: 3px; }
.pr-mapa-botoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pr-livre { align-self: center; background: #fdf2f8; color: #be185d; box-shadow: 0 5px 0 #f9a8d4; }
@keyframes pr-pulsa { 50% { transform: scale(1.1); } }
@keyframes pr-pula-leve { 50% { transform: translateY(-6px); } }

/* ---------- a fase: pedido, tabuleiro e editor ---------- */
.pr-pedido {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 4px; margin: 0;
  color: var(--branco); font-size: 20px; font-weight: 800; text-align: center; text-shadow: 0 2px 0 rgba(0, 0, 0, .18);
}
.pr-pedido small { flex-basis: 100%; font-size: 15px; opacity: .92; }
.pr-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; }
.pr-ic svg { width: 100%; height: 100%; display: block; }
.pr-ic-item { width: 34px; height: 34px; vertical-align: middle; }
.pr-jogo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.pr-lado-tab, .pr-lado-ed { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pr-tab-caixa { width: 100%; }
.pr-tabuleiro { display: block; width: 100%; height: auto; max-height: 38vh; filter: drop-shadow(0 6px 0 rgba(42, 26, 94, .2)); }
.pr-abas { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pr-aba {
  padding: 7px 14px; border-radius: 999px; font-size: 16px; font-weight: 800; color: var(--branco);
  background: rgba(255, 255, 255, .22); border: 3px solid transparent;
}
.pr-aba-atual { background: var(--branco); color: var(--roxo-escuro); border-color: #fde047; }
.pr-aba-ok:not(.pr-aba-atual) { background: #dcfce7; color: #15803d; }
.pr-variavel {
  align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 14px;
  background: #fff; border: 3px solid #ef4444; font-size: 19px; font-weight: 800; box-shadow: 0 4px 0 #b91c1c;
}
.pr-variavel b { min-width: 34px; padding: 0 8px; border-radius: 8px; background: #fee2e2; color: #b91c1c; text-align: center; font-size: 24px; }
.pr-retorno {
  padding: 10px 14px; border-radius: 18px; background: var(--branco); box-shadow: var(--sombra);
  border-left: 10px solid #14b8a6; font-size: 17px; font-weight: 700; line-height: 1.3;
}
.pr-retorno p { margin: 0; }
.pr-retorno small { display: block; margin-top: 4px; font-size: 14px; opacity: .8; }
.pr-retorno-erro { border-left-color: #f97316; background: #fff7ed; }
.pr-retorno-ok { border-left-color: #22c55e; background: #f0fdf4; }
.pr-retorno-rodando { border-left-color: #3b82f6; }
.pr-retorno-dica { border-left-color: #eab308; background: #fefce8; }
.pr-retorno .pr-mini { margin-top: 6px; }

/* A fila (o programa) e os blocos. */
.pr-programas { display: flex; flex-direction: column; gap: 8px; }
.pr-programa {
  padding: 8px; border-radius: 20px; background: rgba(255, 255, 255, .95); box-shadow: var(--sombra);
  border: 3px dashed #c4b5fd; min-height: 80px; transition: background .2s, border-color .2s;
}
.pr-programa-func { border-color: #f9a8d4; background: #fff7fb; }
.pr-programa-titulo { display: flex; align-items: center; gap: 6px; margin: 0 0 6px 4px; font-size: 17px; font-weight: 900; color: #be185d; }
.pr-programas.pr-fora .pr-programa { background: #fee2e2; border-color: #f87171; }
.pr-programas.pr-travado .pr-programa { border-style: solid; border-color: #93c5fd; }
.pr-lista { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 58px; }
.pr-bloco {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-width: 60px; min-height: 62px; padding: 5px 7px 4px; border-radius: 15px;
  background: var(--c); color: #fff; box-shadow: 0 5px 0 var(--e); border: 3px solid transparent;
  font-weight: 800; line-height: 1.05; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); touch-action: none;
  transition: transform .1s, box-shadow .1s;
}
.pr-bloco small { font-size: 11px; max-width: 92px; text-align: center; }
.pr-bloco .pr-num { font-size: 17px; line-height: 1; }
.pr-bloco:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--e); }
.pr-bloco:focus-visible, .pr-vaga:focus-visible, .pr-num-botao:focus-visible, .pr-sc-casa:focus-visible { outline: 4px solid #fde047; outline-offset: 2px; }
.pr-paleta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px; border-radius: 20px;
  background: rgba(30, 27, 75, .28);
}
.pr-paleta .pr-bloco { min-width: 66px; min-height: 68px; }
.pr-paleta .pr-bloco .pr-ic { width: 34px; height: 34px; }
.pr-paleta.pr-travado, .pr-programas.pr-travado .pr-vaga { opacity: .5; }
.pr-caixa {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 4px 6px 4px 4px; border-radius: 18px;
  background: var(--claro); border: 3px solid var(--c); max-width: 100%;
}
.pr-caixa > .pr-lista { min-width: 64px; padding: 3px 4px; border-radius: 12px; border: 2px dashed var(--c); background: rgba(255, 255, 255, .7); }
.pr-caixa-cabeca { flex-direction: row; gap: 4px; min-height: 58px; }
.pr-caixa-cabeca small { max-width: 70px; }
.pr-ic-se { width: 26px; height: 26px; }
.pr-ic-par { display: inline-flex; align-items: center; gap: 1px; }
.pr-programa-titulo .pr-ic { width: 30px; height: 30px; padding: 3px; border-radius: 9px; background: #ec4899; box-shadow: 0 3px 0 #be185d; }
.pr-senao { font-size: 14px; font-weight: 900; color: var(--e); padding: 0 2px; }
.pr-vaga {
  min-width: 42px; min-height: 56px; border-radius: 13px; border: 3px dashed #c4b5fd; color: #a78bfa;
  font-size: 22px; font-weight: 900; background: transparent;
}
.pr-vaga-ativa { border-color: #f59e0b; color: #f59e0b; background: #fffbeb; animation: pr-pisca-vaga 1s ease-in-out infinite; }
.pr-cursor { width: 6px; height: 54px; border-radius: 3px; background: #f59e0b; animation: pr-pisca-cursor 1s steps(2) infinite; }
.pr-programas.pr-travado .pr-vaga-ativa, .pr-programas.pr-travado .pr-cursor { animation: none; }
@keyframes pr-pisca-vaga { 50% { background: #fef3c7; transform: scale(1.06); } }
@keyframes pr-pisca-cursor { 50% { opacity: .15; } }
.pr-bloco.pr-foco { border-color: #fde047; box-shadow: 0 5px 0 var(--e), 0 0 0 3px #f59e0b; }
.pr-bloco.pr-agora { border-color: #fff; transform: translateY(-4px) scale(1.12); box-shadow: 0 8px 0 var(--e), 0 0 0 5px #fde047, 0 0 22px #fde047; z-index: 2; }
.pr-bloco.pr-sim { box-shadow: 0 5px 0 var(--e), 0 0 0 5px #22c55e; }
.pr-bloco.pr-nao { box-shadow: 0 5px 0 var(--e), 0 0 0 5px #9ca3af; }
.pr-bloco.pr-sim::before, .pr-bloco.pr-nao::before {
  content: '✔ sim'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 1px 7px; border-radius: 999px;
  background: #22c55e; color: #fff; font-size: 12px; white-space: nowrap;
}
.pr-bloco.pr-nao::before { content: '✖ não'; background: #6b7280; }
.pr-bloco.pr-erro { background: #ef4444; box-shadow: 0 5px 0 #991b1b, 0 0 0 4px #fecaca; animation: treme .12s 4; }
.pr-bloco.pr-erro::after { content: '✖'; position: absolute; top: -10px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #dc2626; font-size: 14px; display: grid; place-items: center; box-shadow: 0 2px 0 #991b1b; }
.pr-bloco.pr-suspeito { box-shadow: 0 5px 0 var(--e), 0 0 0 4px #f97316; }
.pr-bloco.pr-suspeito::after { content: '?'; position: absolute; top: -10px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: #f97316; color: #fff; font-size: 14px; display: grid; place-items: center; }
.pr-bloco[data-volta]::after {
  content: attr(data-volta); position: absolute; bottom: -12px; right: -6px; padding: 1px 6px; border-radius: 999px;
  background: #fff; color: #c2410c; font-size: 12px; border: 2px solid #f97316; text-shadow: none;
}
.pr-bloco.pr-pegou { opacity: .35; }
.pr-fantasma { position: fixed !important; left: 0; top: 0; z-index: 95; pointer-events: none; opacity: .92; transform-origin: center; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .35)); }
.pr-solta { position: fixed; z-index: 94; width: 8px; margin-left: -4px; border-radius: 4px; background: #f59e0b; box-shadow: 0 0 0 3px #fff, 0 0 14px #f59e0b; pointer-events: none; display: none; }
.pr-solta-ativa { display: block; }
.pr-mini { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; vertical-align: middle; }
.pr-mini .pr-bloco { min-width: 40px; min-height: 40px; padding: 2px 4px; border-radius: 10px; box-shadow: 0 3px 0 var(--e); border-width: 2px; }
.pr-mini .pr-bloco small { font-size: 9px; }
.pr-mini .pr-ic { width: 22px; height: 22px; }
.pr-mini .pr-caixa { padding: 2px 4px 2px 2px; border-radius: 12px; border-width: 2px; }
.pr-mini .pr-caixa > .pr-lista { min-height: 40px; min-width: 30px; gap: 3px; }
.pr-mini .pr-lista { min-height: 40px; gap: 3px; }

/* Os botões de baixo e o painel dos números. */
.pr-acoes { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.pr-rodar { font-size: 21px; padding: 14px 24px; }
.pr-acao { padding: 12px 16px; font-size: 20px; }
.pr-contador { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .9); font-size: 16px; font-weight: 900; }
.pr-contador-cheio { background: #fef3c7; color: #b45309; }
.pr-treme { animation: treme .12s 4; }
.pr-numeros {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border-radius: 18px;
  background: #fff7ed; border: 3px solid #fdba74; box-shadow: var(--sombra);
}
.pr-numeros-titulo { flex-basis: 100%; text-align: center; font-size: 16px; color: #9a3412; }
.pr-num-botao {
  min-width: 46px; min-height: 44px; padding: 4px 10px; border-radius: 12px; background: #fff; border: 3px solid #fdba74;
  font-size: 18px; font-weight: 900; color: #9a3412; display: inline-grid; place-items: center;
}
.pr-num-escolhido { background: #f97316; border-color: #c2410c; color: #fff; }
.pr-cor-bola { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); vertical-align: middle; }

/* Na TV e na tela larga: o tabuleiro de um lado e o programa do outro. */
@media (min-width: 760px) and (min-aspect-ratio: 1/1) {
  .pr-jogo { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
  .pr-tabuleiro { max-height: calc(100vh - 250px); }
  .pr-lado-tab { position: sticky; top: 8px; }
  /* Na TV, o ▶ fica logo abaixo do programa (a paleta pode ser comprida). */
  .pr-lado-ed > .pr-retorno { order: 1; }
  .pr-lado-ed > .pr-programas { order: 2; }
  .pr-lado-ed > .pr-acoes { order: 3; }
  .pr-lado-ed > .pr-numeros { order: 4; }
  .pr-lado-ed > .pr-paleta { order: 5; }
  .pr-lado-ed > .pr-gestos { order: 6; }
  .pr-paleta .pr-bloco { min-height: 60px; }
}

/* ---------- o tabuleiro por dentro (SVG) ---------- */
.pr-bina-pos { transition: transform var(--pr-vel, .45s) ease-in-out; }
.pr-bina-pos.pr-sem-anima, .pr-bina-pos.pr-sem-anima .pr-bina-giro { transition: none; }
.pr-bina-giro { transform-box: fill-box; transform-origin: center; transition: transform var(--pr-vel, .45s) ease-in-out; }
.pr-bina-corpo { transform-box: fill-box; transform-origin: 50% 100%; }
.pr-olhos { transition: transform .25s; }
.pr-olha-0 .pr-olhos { transform: translateY(-3px); }
.pr-olha-1 .pr-olhos { transform: translateX(4px); }
.pr-olha-2 .pr-olhos { transform: translateY(3px); }
.pr-olha-3 .pr-olhos { transform: translateX(-4px); }
.pr-pulando { animation: pr-pulo var(--pr-vel, .45s) ease-in-out; }
@keyframes pr-pulo { 50% { transform: translateY(-40px) scale(1.12); } }
.pr-bip .pr-antena { animation: pr-antena .45s ease-in-out 2; }
@keyframes pr-antena { 50% { fill: #fff; filter: drop-shadow(0 0 8px #fde047); } }
.pr-festa .pr-bina-corpo { animation: pr-festa .5s ease-in-out 3; }
@keyframes pr-festa { 50% { transform: translateY(-18px) rotate(-6deg); } }
.pr-rastro { fill: none; stroke: #f59e0b; stroke-width: 7; stroke-dasharray: 3 14; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.pr-marca circle { fill: none; stroke-width: 7; }
.pr-marca text { font-size: 40px; font-weight: 900; }
.pr-marca-erro circle { stroke: #ef4444; fill: rgba(239, 68, 68, .25); animation: brilha .4s 3; }
.pr-marca-sim circle { stroke: #22c55e; fill: rgba(34, 197, 94, .22); }
.pr-marca-sim text { fill: #15803d; }
.pr-marca-nao circle { stroke: #6b7280; stroke-dasharray: 10 8; fill: rgba(107, 114, 128, .15); }
.pr-marca-nao text { fill: #4b5563; }
.pr-pego { transform-box: fill-box; transform-origin: center; animation: pr-pego .6s ease-in forwards; }
@keyframes pr-pego { 40% { transform: scale(1.35); } to { transform: scale(.2) translateY(-60px); opacity: 0; } }
.pr-nota-feita { opacity: .45; }
.pr-item, .pr-moeda { animation: pr-boia 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pr-boia { 50% { transform: translateY(-4px); } }

/* ---------- Leve a Bina: o passo a passo ---------- */
.pr-dpad {
  display: grid; grid-template-columns: repeat(3, 84px); grid-template-rows: repeat(3, 64px); gap: 6px; justify-content: center;
  grid-template-areas: ". c ." "e . d" ". b .";
}
.pr-dpad .pr-bloco { min-width: 0; width: 100%; height: 100%; }
.pr-dpad .pr-ic { width: 40px; height: 40px; }
.pr-dpad-cima { grid-area: c; }
.pr-dpad-esquerda { grid-area: e; }
.pr-dpad-direita { grid-area: d; }
.pr-dpad-baixo { grid-area: b; }
.pr-trilha-cmds { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border-radius: 18px; background: rgba(255, 255, 255, .95); box-shadow: var(--sombra); font-size: 16px; }
.pr-vazio { opacity: .6; font-weight: 700; }

/* ---------- Tartaruga Desenhista ---------- */
.pr-papel-caixa {
  position: relative; width: 100%; max-width: min(100%, 46vh); align-self: center; border-radius: 18px; overflow: hidden;
  box-shadow: 0 0 0 6px #fff, var(--sombra); touch-action: manipulation;
}
.pr-papel { display: block; }
.pr-tita {
  position: absolute; left: 0; top: 0; width: 46px; height: 55px; margin: -27.5px 0 0 -23px; pointer-events: none;
  transform-origin: 23px 27.5px; transition: transform .3s ease-in-out; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3));
}
.pr-tita svg { display: block; width: 100%; height: 100%; }
.pr-tita.pr-tita-anda { transition: none; }
.pr-janela-desenho .janela-arte { width: min(72vw, 340px); }
.pr-janela-desenho .janela-arte img { display: block; width: 100%; border-radius: 14px; box-shadow: 0 0 0 3px #e5e7eb; }
@media (min-width: 760px) and (min-aspect-ratio: 1/1) {
  .pr-papel-caixa { max-width: min(100%, calc(100vh - 250px)); }
}

/* ---------- Siga o Código ---------- */
.pr-sc { display: flex; flex-direction: column; gap: 12px; }
.pr-sc-palco {
  display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 16px; border-radius: 24px;
  background: linear-gradient(180deg, #312e81, #4c1d95); box-shadow: var(--sombra); min-height: 150px;
}
.pr-sc-bina { width: 104px; flex: none; }
.pr-sc-bina svg { display: block; width: 100%; }
.pr-sc-grito { color: #fde047; font-size: clamp(26px, 6vw, 48px); font-weight: 900; text-align: center; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.pr-faz-passo { animation: pr-faz-passo .6s ease-in-out; }
.pr-faz-pulo { animation: pr-faz-pulo .7s cubic-bezier(.3, 1.4, .5, 1); }
.pr-faz-palma { animation: pr-faz-palma .5s ease-in-out; }
.pr-faz-gira { animation: pr-faz-gira .8s ease-in-out; }
.pr-faz-viraE { animation: pr-faz-viraE .7s ease-in-out; }
.pr-faz-viraD { animation: pr-faz-viraD .7s ease-in-out; }
@keyframes pr-faz-passo { 30% { transform: translateX(14px) rotate(4deg); } 60% { transform: translateX(22px); } }
@keyframes pr-faz-pulo { 45% { transform: translateY(-46px) scale(1.08); } 70% { transform: translateY(0) scale(1.05, .92); } }
@keyframes pr-faz-palma { 25%, 75% { transform: scale(1.1, .94); } 50% { transform: scale(.94, 1.06); } }
@keyframes pr-faz-gira { to { transform: rotateY(360deg); } }
@keyframes pr-faz-viraE { 50% { transform: rotate(-25deg); } }
@keyframes pr-faz-viraD { 50% { transform: rotate(25deg); } }
.pr-sc-codigo { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.pr-sc-cartao {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 92px; min-height: 104px; padding: 6px; border-radius: 20px; background: var(--c); box-shadow: 0 6px 0 var(--e);
  color: #fff; font-weight: 900; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); border: 4px solid transparent; transition: transform .15s;
}
.pr-sc-cartao small { font-size: 14px; line-height: 1.05; text-align: center; }
.pr-sc-emoji { font-size: 48px; line-height: 1.1; text-shadow: none; }
.pr-sc-cartao.pr-agora { transform: translateY(-6px) scale(1.12); border-color: #fff; box-shadow: 0 8px 0 var(--e), 0 0 0 6px #fde047, 0 0 26px #fde047; z-index: 1; }
.pr-sc-rep { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 24px; background: var(--claro); border: 4px solid var(--c); }
.pr-sc-rep-n { font-size: 24px; font-weight: 900; color: var(--e); }
.pr-sc-rep-dentro { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-sc-rep[data-volta]::after { content: attr(data-volta); position: absolute; top: -14px; right: 10px; padding: 2px 10px; border-radius: 999px; background: #fff; color: #c2410c; font-weight: 900; border: 3px solid #f97316; }
.pr-sc-botoes { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.pr-sc-area { display: flex; flex-direction: column; gap: 10px; }
.pr-sc-pergunta { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--branco); text-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.pr-sc-pergunta b { font-size: clamp(24px, 5vw, 34px); }
.pr-sc-pergunta small { font-size: 16px; font-weight: 700; }
.pr-sc-trilha { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; max-width: 760px; width: 100%; margin: 0 auto; }
.pr-sc-grade { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 5px; width: min(100%, 420px, 52vh); margin: 0 auto; }
.pr-sc-casa {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 0; border-radius: 12px;
  background: #fef3c7; border: 3px solid #f59e0b; box-shadow: 0 4px 0 #b45309; font-weight: 900; color: #92400e;
}
.pr-sc-trilha .pr-sc-casa { aspect-ratio: .58; align-items: end; padding-bottom: 14px; }
.pr-sc-grade .pr-sc-casa { background: #d1fae5; border-color: #10b981; box-shadow: 0 4px 0 #047857; }
.pr-sc-casa b { position: absolute; top: 2px; left: 0; right: 0; font-size: 15px; text-align: center; }
.pr-sc-casa:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #b45309; }
.pr-sc-casa:disabled { opacity: 1; cursor: default; }
.pr-sc-com-bina { background: #fff; }
.pr-sc-casa.pr-sc-errada { border-color: #ef4444; background: #fee2e2; box-shadow: 0 4px 0 #b91c1c; }
.pr-sc-mini { width: 86%; max-width: 54px; }
.pr-sc-grade .pr-sc-mini { margin-top: 0; }
.pr-sc-mini svg { display: block; width: 100%; }
.pr-sc-seta { position: absolute; bottom: 1px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 14px; line-height: 1; }
.pr-sc-grade .pr-sc-casa { align-items: center; padding-bottom: 0; }
.pr-sc-grade .pr-sc-mini { width: 66%; }
.pr-sc-opcoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pr-sc-opcao { min-width: 90px; font-size: 26px; }
