/* ── PROGRAMA A LUMI ──
   Estava embutido no próprio HTML, e a página não carregava o style.css:
   mudar uma cor no :root não lhe chegava. A autonomia do layout fica — é
   uma folha para imprimir —; o que sai é a duplicação. */

    /* Estas folhas nao carregam o css/style.css, por isso repetem aqui a rede
       do [hidden]: sem ela, qualquer `display` declarado ganha ao atributo. */
    [hidden] { display: none !important; }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    }

/* A página passa a carregar o css/style.css, e por isso as variáveis da marca
   saíram daqui: --lilas, --lilas-deep, --lilas-soft, --pessego-soft e --texto
   estavam repetidas com os MESMOS valores do :root de lá, e uma mudança de
   cor da marca não chegava cá.

   O comentário anterior dizia que carregar o style.css «arrastava a nav, o
   rodapé e as animações» para uma página que só quer imprimir. Medido a
   2026-11-17, não arrasta: estes elementos não existem no HTML desta folha,
   e o PDF em media=print sai igual ao de antes — 4490px de altura nos dois,
   mesmo fundo e mesmo corpo de letra. A autonomia do LAYOUT fica; o que sai
   é a duplicação. */
:root {
     e por ele que a crianca vai cortar. */
  --lilas-corte:  #9B7FCC;
}

@page { size: A4 portrait; margin: 0; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Nunito', sans-serif; background: #f0ecf8; }

/* BARRA DE ECRA */
.screen-only.bar { background: white; border-bottom: 1.5px solid #EDE6F8; padding: 12px 24px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 200;
  /* A 320px o grupo da direita nao cabia ao lado do titulo e a pagina
     transbordava 3px. Parte para a linha de baixo em vez de empurrar. */
  flex-wrap: wrap; }
.bar-back { font-size: 13px; font-weight: 800; color: #6B4FA6; text-decoration: none; padding: 8px 14px; border: 1.5px solid var(--lilas); border-radius: 10px; }
.bar-back:hover { background: #EDE6F8; }
.bar-title { font-size: 15px; font-weight: 900; color: var(--texto); min-width: 0; }
.bar-title span { color: #6B4FA6; }
.btn-print { background: #6B4FA6; border: none; border-radius: 10px; padding: 8px 20px; font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800; color: white; cursor: pointer; }
.btn-print:hover { background: #7F77DD; }
.lang-toggle { background: none; border: 1.5px solid var(--lilas); border-radius: 8px; padding: 5px 10px; font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 800; color: #6B4FA6; cursor: pointer; }
.lang-toggle.active, .lang-toggle:hover { background: #EDE6F8; }
.pages { display: flex; flex-direction: column; align-items: center; padding: 24px 16px 48px; gap: 28px; }
.pg-label { font-size: 12px; font-weight: 800; color: #6B4FA6; text-transform: uppercase; letter-spacing: .1em; margin-bottom: -18px; }

/* A4 */
.pg { width: 210mm; min-height: 297mm; background: white; overflow: hidden; box-shadow: 0 10px 40px rgba(100,80,180,.15); border-radius: 4px; padding: 14mm 14mm 10mm; display: flex; flex-direction: column; }
.folha-h1 { font-size: 26px; font-weight: 900; color: var(--texto); line-height: 1.15; }
.folha-h1 span { color: #6B4FA6; }
.folha-sub { font-size: 12.5px; color: #6E6080; margin-top: 3mm; line-height: 1.5; }
.folha-h2 { font-size: 18px; font-weight: 900; color: var(--texto); margin-bottom: 3mm; }
/* O --lilas-corte e para linhas, nao para texto: a 3.33:1 chumba o AA. */
.marca { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--lilas-deep); }
.rodape { margin-top: auto; padding-top: 5mm; border-top: 1px dashed #D9CEEE; font-size: 9.5px; color: #6E6080; display: flex; justify-content: space-between; }

/* COMO SE JOGA */
.passos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3mm 6mm; margin: 5mm 0; }
.passo { display: flex; gap: 3mm; align-items: flex-start; }
.passo b { flex: none; width: 7mm; height: 7mm; border-radius: 50%; background: #EDE6F8; color: #6B4FA6; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.passo p { font-size: 11.5px; color: #4A3E5C; line-height: 1.45; }
.regra { border: 1.6px solid var(--lilas); border-radius: 10px; padding: 3.5mm 4mm; display: flex; gap: 4mm; align-items: center; margin-bottom: 5mm; }
.regra p { font-size: 11.5px; color: #4A3E5C; line-height: 1.45; }

/* TABULEIRO */
.tab-wrap { display: flex; justify-content: center; }
.tab { display: grid; grid-template-columns: repeat(6, 22mm); grid-auto-rows: 22mm; border: 2.2px solid var(--texto); }
.cl { border: 1px solid #BBB0CC; display: flex; align-items: center; justify-content: center; }
/* As colunas sao fixas mas a grelha e um bloco: esticava ate a largura do
   cartao e a moldura ficava uma mao a direita das celulas. */
.mini { display: grid; grid-template-columns: repeat(6, 7.5mm); grid-auto-rows: 7.5mm;
        width: fit-content; height: fit-content; border: 1.6px solid var(--texto); }
.mini .cl { border: 0.8px solid #C7BED6; }

/* PECAS — desenhadas, nunca emoji do sistema: o emoji muda de maquina para
   maquina e no PDF a preto e branco desaparece. */
.pc { display: block; }
.pc-lumi { width: 62%; height: 62%; border-radius: 26% 26% 30% 30%; border: 1.8px solid var(--texto); background: #EDE6F8; position: relative; }
.pc-lumi::before { content: ''; position: absolute; left: 22%; top: 34%; width: 14%; height: 14%; border-radius: 50%; background: var(--texto); box-shadow: 2.4mm 0 0 var(--texto); }
.pc-lumi::after { content: ''; position: absolute; left: 50%; top: -30%; width: 1.8px; height: 30%; background: var(--texto); }
.pc-star { width: 62%; height: 62%; background: var(--texto); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.pc-pedra { width: 58%; height: 52%; border-radius: 42% 58% 46% 54%; border: 1.8px solid var(--texto); background: #CFC6DD; }
.mini .pc-lumi::after { display: none; }
.pc.grande { width: 13mm; height: 13mm; }
.pc-pedra.grande { height: 11mm; }

.recortes { display: flex; flex-wrap: wrap; gap: 3mm; justify-content: center; margin-top: 4mm; }
.recorte { width: 19mm; height: 19mm; border: 1.4px dashed var(--lilas-corte); border-radius: 6px; display: flex; align-items: center; justify-content: center; }

/* CARTOES */
.cartas { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2.5mm; margin-top: 5mm; }
.carta { border: 1.4px dashed var(--lilas-corte); border-radius: 7px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.carta-rep { border-color: #D98E5A; }
.seta { width: 58%; height: 58%; fill: var(--texto); }
.seta.r { transform: rotate(90deg); }
.seta.d { transform: rotate(180deg); }
.seta.l { transform: rotate(270deg); }
.rep { display: flex; flex-direction: column; align-items: center; gap: 0.5mm; }
.ciclo { width: 9mm; height: 9mm; fill: #9C4F10; stroke: #9C4F10; }
.rep b { font-size: 13px; font-weight: 900; color: #9C4F10; }

/* DESAFIOS */
.desafios { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6mm; margin-top: 5mm; }
.desafio, .erro { border: 1.4px solid #E2D9F2; border-radius: 10px; padding: 4mm; }
.desafio-cab { display: flex; gap: 3mm; align-items: flex-start; margin-bottom: 3mm; }
.num { flex: none; width: 7mm; height: 7mm; border-radius: 50%; background: #6B4FA6; color: white; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.desafio-t { font-size: 12.5px; font-weight: 800; color: var(--texto); }
.desafio-s { font-size: 10.5px; color: #6E6080; margin-top: 1mm; line-height: 1.4; }
.desafio .mini, .erro .mini { margin: 0 auto; }
.linha-prog { margin-top: 3mm; }
.lp-lbl { font-size: 9.5px; font-weight: 800; color: var(--lilas-deep); text-transform: uppercase; letter-spacing: .08em; }
.lp-caixas { display: flex; gap: 1.5mm; margin-top: 1.5mm; }
.lp-caixas i { width: 9mm; height: 9mm; border: 1.2px solid var(--lilas); border-radius: 4px; display: block; }

/* ENCONTRA O ERRO */
.erros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5mm; margin-top: 5mm; }
.prog-errado { display: flex; gap: 2mm; justify-content: center; margin-top: 3mm; }
.mini-carta { width: 11mm; height: 11mm; aspect-ratio: auto; }
.mini-carta .ciclo { width: 5mm; height: 5mm; }
.mini-carta .rep b { font-size: 9px; }
.nota-pais { border: 1.6px solid var(--lilas); background: #F7F3FD; border-radius: 10px; padding: 4.5mm 5mm; margin-top: 6mm; }
.nota-pais h3 { font-size: 12.5px; font-weight: 900; color: #6B4FA6; margin-bottom: 2mm; }
.nota-pais p { font-size: 11px; color: #4A3E5C; line-height: 1.5; }
.solucoes { margin-top: 4mm; font-size: 9.5px; color: #6E6080; line-height: 1.6; }
.solucoes b { color: #6B4FA6; }

@media print {
  html, body { margin: 0; padding: 0; background: white; }
  .screen-only { display: none !important; }
  .pages { display: block; padding: 0; gap: 0; background: white; }
  .pg { height: 297mm; box-shadow: none !important; border-radius: 0 !important; }
  .pg + .pg { page-break-before: always; }
}
/* Ajuste ao ecra: estas folhas tem largura fixa de A4 e transbordavam no
   telemovel, obrigando a fazer zoom out a mao. */
@media screen { .pages { zoom: var(--esc, 1); } }
