:root {
  --ambar: #ffb13b; --ambar-esc: #b9741a; --tinta: #1b2a5a; --tinta-2: #24376f; --papel: #fff6e6;
  --verde: #6fdc6a; --vermelho: #ff6b5a; --ciano: #9fe8ff; --sombra: rgba(12, 18, 42, .55);
  --kai: #2f6fe0; --vera: #e8a33d; --lupa: #8a4fd6;
  --seg-top: max(10px, env(safe-area-inset-top)); --seg-bot: max(12px, env(safe-area-inset-bottom));
  --seg-esq: max(12px, env(safe-area-inset-left)); --seg-dir: max(12px, env(safe-area-inset-right));
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--tinta); color: var(--papel);
  font-family: 'Baloo 2', system-ui, sans-serif; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; cursor: pointer; }
.escondido { display: none !important; }
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; outline: none; }

#medidor { position: fixed; bottom: 4px; left: 50%; transform: translateX(-50%); z-index: 50; font: 11px/1.2 ui-monospace, Consolas, monospace;
  color: #e8ffe8; background: rgba(0, 0, 0, .45); padding: 3px 8px; border-radius: 6px; pointer-events: none; white-space: nowrap; }
#medidor.ruim { color: #ffb0a0; }

/* ---------- botões base ---------- */
.bt-grande { font: 800 22px 'Baloo 2', sans-serif; color: var(--tinta); background: var(--ambar); border: 0; border-radius: 999px;
  padding: 11px 34px 8px; box-shadow: 0 5px 0 var(--ambar-esc), 0 10px 24px #0006; }
.bt-grande:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ambar-esc); }
.bt-sec { font: 700 17px 'Baloo 2', sans-serif; color: var(--papel); background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.35);
  border-radius: 999px; padding: 8px 22px 6px; }
.bt-perigo { font: 600 14px 'Baloo 2', sans-serif; color: #ffb4a8; background: none; border: 0; text-decoration: underline; opacity: .8; }
.painel { background: linear-gradient(180deg, var(--tinta-2), var(--tinta)); border: 2px solid rgba(255,255,255,.15); border-radius: 22px;
  padding: 22px 26px; box-shadow: 0 20px 60px #0009; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center;
  max-width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
.painel h2 { margin: 0; font-size: 30px; color: var(--ambar); }

/* ---------- joystick ---------- */
#joy { position: fixed; left: 0; top: 0; width: 120px; height: 120px; border-radius: 50%; z-index: 4; pointer-events: none;
  background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.35); opacity: 0; transition: opacity .12s; }
#joy.ativo { opacity: 1; }
#joy i { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.7); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#hud button { pointer-events: auto; }
#topo { position: absolute; top: var(--seg-top); left: var(--seg-esq); right: var(--seg-dir); display: flex; align-items: flex-start; gap: 10px; }
#bt-pausa { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(12,18,42,.55); color: var(--papel); font-size: 14px; flex: none; }
#objetivo { flex: 1; min-width: 0; background: rgba(12,18,42,.55); border-radius: 12px; padding: 4px 12px 3px; line-height: 1.25; }
.obj-nivel { display: block; font-size: 12px; font-weight: 800; color: var(--ambar); letter-spacing: .04em; text-transform: uppercase; }
.obj-texto { display: block; font-size: 15px; font-weight: 600; }
#objetivo.pulsa { animation: pulsa .7s ease 2; }
@keyframes pulsa { 50% { background: rgba(255,177,59,.45); } }
#vidas { display: flex; gap: 2px; font-size: 24px; line-height: 40px; flex: none; filter: drop-shadow(0 2px 2px #0007); }
#vidas .vazio { opacity: .25; filter: grayscale(1); }
#vidas .bate { animation: bate .4s; }
@keyframes bate { 30% { transform: scale(1.5); } }

#chefe { position: absolute; top: calc(var(--seg-top) + 56px); left: 50%; transform: translateX(-50%); width: min(420px, 70vw); text-align: center; }
.chefe-nome { font-weight: 800; font-size: 16px; color: #ffd0c8; text-shadow: 0 2px 4px #000a; }
.chefe-barra { display: flex; gap: 4px; height: 12px; margin-top: 2px; }
.chefe-barra i { flex: 1; border-radius: 6px; background: var(--vermelho); box-shadow: inset 0 -3px 0 #0003; transition: background .3s, opacity .3s; }
.chefe-barra i.foi { background: rgba(255,255,255,.18); }
.chefe-dica { margin-top: 6px; font-size: 15px; font-weight: 700; color: var(--papel); text-shadow: 0 2px 4px #000c; }
.chefe-dica b { color: var(--ambar); }
.chefe-dica.janela { animation: pulsa-txt .8s infinite; }
@keyframes pulsa-txt { 50% { color: var(--ambar); } }

#trio { position: absolute; left: var(--seg-esq); bottom: var(--seg-bot); display: flex; gap: 8px; }
.membro { pointer-events: auto; width: 56px; height: 56px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); position: relative;
  color: #fff; font: 800 20px 'Baloo 2', sans-serif; display: grid; place-items: center; box-shadow: 0 4px 10px #0007; transition: transform .15s, border-color .15s; }
.membro.ativo { border-color: var(--ambar); transform: scale(1.12); }
.membro small { position: absolute; bottom: -6px; right: -4px; background: var(--tinta); border-radius: 6px; font-size: 11px; padding: 0 5px; line-height: 16px; }
.membro.preso { filter: grayscale(.8) brightness(.7); }
.membro.preso::after { content: '🔒'; position: absolute; top: -8px; right: -8px; font-size: 18px; }
.membro.precisa { animation: precisa .7s infinite; }
@keyframes precisa { 50% { box-shadow: 0 0 0 6px var(--ambar), 0 4px 10px #0007; } }
.membro[data-n="kai"] { background: var(--kai); } .membro[data-n="vera"] { background: var(--vera); } .membro[data-n="lupa"] { background: var(--lupa); }

#acoes { position: absolute; right: var(--seg-dir); bottom: var(--seg-bot); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.bt-acao { border: 0; border-radius: 999px; padding: 8px 18px 6px 10px; display: flex; align-items: center; gap: 8px; min-height: 48px;
  font: 800 17px 'Baloo 2', sans-serif; color: var(--tinta); background: var(--papel); box-shadow: 0 4px 0 #b8ab92, 0 8px 18px var(--sombra); }
.bt-acao b { font-size: 11px; background: var(--tinta); color: var(--papel); border-radius: 6px; padding: 1px 6px; }
.bt-acao:active { transform: translateY(2px); }
#bt-poder { background: var(--ambar); box-shadow: 0 4px 0 var(--ambar-esc), 0 8px 18px var(--sombra); }
#bt-poder.pronto { animation: precisa .7s infinite; }
#bt-poder.inativo { filter: grayscale(.9); opacity: .55; }
#bt-esquivar { background: var(--ciano); box-shadow: 0 4px 0 #4aa6c4, 0 8px 18px var(--sombra); }
body.toque .bt-acao b { display: none; }
body.toque .bt-acao { min-width: 64px; min-height: 58px; justify-content: center; padding: 8px 18px 6px; }
body:not(.toque) #trio .membro small { display: block; }

#fala { position: absolute; left: 50%; bottom: calc(var(--seg-bot) + 80px); transform: translateX(-50%); width: min(620px, calc(100vw - 32px));
  background: rgba(255,246,230,.97); color: var(--tinta); border-radius: 18px; padding: 12px 18px 10px; box-shadow: 0 10px 30px var(--sombra);
  pointer-events: auto; border: 3px solid var(--ambar); }
.fala-nome { font-weight: 800; font-size: 15px; color: var(--ambar-esc); text-transform: uppercase; letter-spacing: .05em; }
.fala-texto { font-size: 18px; line-height: 1.35; font-weight: 600; }
.fala-mais { text-align: right; font-size: 12px; opacity: .55; }

#aviso { position: absolute; top: 28%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: calc(100vw - 32px); animation: aviso 2.6s forwards; }
@keyframes aviso { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.9); } 12%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; } }
.aviso-sup { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 14px; color: var(--ciano); text-shadow: 0 2px 6px #000; }
.aviso-titulo { font-weight: 800; font-size: clamp(32px, 7vw, 58px); line-height: 1; color: var(--ambar); text-shadow: 0 4px 0 var(--ambar-esc), 0 10px 24px #000a; }
.aviso-sub { font-weight: 700; font-size: 18px; text-shadow: 0 2px 6px #000; margin-top: 6px; }

#dica-toque { position: absolute; bottom: calc(var(--seg-bot) + 70px); left: 0; right: 0; display: none; justify-content: space-between;
  padding: 0 24px; color: rgba(255,255,255,.75); font-size: 13px; text-shadow: 0 1px 3px #0008; transition: opacity .6s; }
body.toque #dica-toque { display: flex; }
body.andou #dica-toque { opacity: 0; }

/* ---------- desafio ---------- */
#desafio { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 12px; background: rgba(8, 12, 30, .35); }
.des-caixa { width: min(640px, 100%); max-height: calc(100dvh - 24px); overflow: auto; background: var(--papel); color: var(--tinta);
  border-radius: 22px; padding: 16px 18px 14px; box-shadow: 0 24px 70px #000a; border: 4px solid var(--ambar); display: flex; flex-direction: column; gap: 10px; }
.des-topo { display: flex; align-items: center; gap: 10px; }
.des-poder { font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--tinta); border-radius: 8px; padding: 2px 10px; }
.des-tempo { flex: 1; height: 8px; border-radius: 4px; background: #e6dcc8; overflow: hidden; }
.des-tempo i { display: block; height: 100%; width: 100%; background: var(--verde); transform-origin: left; }
.des-tempo.pouco i { background: var(--vermelho); }
.des-pergunta { font-size: 19px; font-weight: 700; line-height: 1.3; }
.des-codigo { margin: 0; font: 600 16px/1.5 'JetBrains Mono', ui-monospace, monospace; background: #1b2238; color: #e8f0ff; border-radius: 12px; padding: 10px 14px; white-space: pre-wrap; }
.des-codigo:empty { display: none; }
.des-codigo .kw { color: #ff9ad5; } .des-codigo .st { color: #b6f09c; } .des-codigo .nu { color: #ffcf6e; } .des-codigo .co { color: #8fa0c8; }
.des-resposta { min-height: 52px; border: 2px dashed #c9bda5; border-radius: 12px; padding: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.des-resposta:empty::before { content: attr(data-vazio); color: #a39880; font-size: 14px; padding-left: 6px; }
.des-resposta.lista { flex-direction: column; align-items: stretch; }
.des-opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.des-opcoes.coluna { flex-direction: column; }
.op { border: 0; border-radius: 12px; background: #fff; color: var(--tinta); font: 700 17px 'Baloo 2', sans-serif; padding: 10px 14px 8px; text-align: left;
  box-shadow: 0 3px 0 #d8ccb3, 0 0 0 2px #e9dfcb inset; min-height: 46px; }
.op.codigo, .ficha.codigo { font: 700 15px 'JetBrains Mono', monospace; }
.op:active { transform: translateY(2px); }
.op.certa { background: var(--verde); } .op.errada { background: var(--vermelho); color: #fff; } .op.usada { opacity: .3; pointer-events: none; }
.op.revela { box-shadow: 0 0 0 4px var(--verde) inset, 0 3px 0 #d8ccb3; }
.ficha { border: 0; border-radius: 10px; background: var(--tinta); color: #fff; font: 700 16px 'Baloo 2', sans-serif; padding: 6px 12px 4px; display: flex; gap: 8px; align-items: center; }
.ficha i { font-style: normal; background: var(--ambar); color: var(--tinta); border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; font-size: 13px; }
.grade { display: grid; gap: 4px; justify-content: center; }
.grade .cel { width: clamp(38px, 10vw, 58px); height: clamp(38px, 10vw, 58px); border: 0; border-radius: 8px; font: 800 17px 'JetBrains Mono', monospace;
  background: #fff; color: var(--tinta); box-shadow: 0 0 0 2px #e2d6bf inset; }
.grade .cel.esc { background: #3a3350; color: #fff; }
.grade .rot { display: grid; place-items: center; font: 800 13px 'JetBrains Mono', monospace; color: #8a7f6a; }
.grade .rot.l { color: #c08a1a; } .grade .rot.c { color: #2f8fb3; }
.grade .cel.certa { background: var(--verde); } .grade .cel.errada { background: var(--vermelho); color: #fff; } .grade .cel.revela { box-shadow: 0 0 0 4px var(--verde) inset; }
.des-rodape { display: flex; align-items: center; gap: 10px; }
.des-dica { flex: 1; font-size: 15px; font-weight: 600; color: #8a5a10; }
.des-dica.certo { color: #2a8a2a; } .des-dica.errado { color: #c0392b; }
.des-ok { font: 800 17px 'Baloo 2', sans-serif; border: 0; border-radius: 999px; background: var(--ambar); color: var(--tinta); padding: 8px 20px 6px; box-shadow: 0 3px 0 var(--ambar-esc); }
.des-limpar { font: 700 14px 'Baloo 2', sans-serif; border: 0; background: none; color: #8a7f6a; }

/* ---------- pausa / inicio / resultado ---------- */
#pausa, #resultado { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(8,12,30,.6); }
.volume { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.pausa-modo { font-size: 14px; opacity: .8; }
.pausa-conta { font-size: 14px; line-height: 1.35; }
.pausa-conta a { color: var(--ambar); font-weight: 700; }
.pausa-conta b { color: var(--verde); }
body.dano::after { content: ''; position: fixed; inset: 0; z-index: 6; pointer-events: none; animation: dano .35s forwards;
  box-shadow: inset 0 0 120px 30px rgba(255, 70, 50, .65); }
@keyframes dano { to { opacity: 0; } }
.chefe-dica { display: inline-block; background: rgba(12,18,42,.62); border-radius: 10px; padding: 2px 12px; }
.chefe-dica:empty { display: none; }

#inicio { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; text-align: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(27,42,90,.5), rgba(27,42,90,.94)); transition: opacity .4s; }
#inicio.fora { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
#inicio.fora * { pointer-events: none !important; }   /* senão o Começar invisível fica clicável no meio da tela (em cima do Kai) */
#inicio h1 { margin: 0; font-size: clamp(44px, 10vw, 100px); font-weight: 800; letter-spacing: .02em; line-height: .9; color: var(--ambar);
  text-shadow: 0 4px 0 var(--ambar-esc), 0 10px 30px #0007; }
#inicio .sub { margin: 8px 0 22px; font-size: clamp(15px, 2.4vw, 20px); opacity: .9; }
#comecar { opacity: .35; pointer-events: none; }
#inicio.pronto #comecar { opacity: 1; pointer-events: auto; }
#inicio.pronto .carregando { visibility: hidden; }
.carregando { font-size: 13px; opacity: .7; }
.pergunta-modo { font-size: 20px; font-weight: 700; margin: 0 0 12px; }
.modos { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.modos button { width: min(260px, 80vw); border: 3px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: var(--papel);
  border-radius: 18px; padding: 14px 16px; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.modos button:hover, .modos button:focus-visible { border-color: var(--ambar); background: rgba(255,177,59,.15); }
.modos b { font-size: 24px; color: var(--ambar); } .modos span { font-size: 15px; line-height: 1.3; opacity: .9; }
.controles { margin-top: 22px; font-size: 14px; opacity: .75; line-height: 1.5; max-width: 640px; margin-inline: auto; }
.controles .t { display: none; }
@media (pointer: coarse) { .controles .d { display: none; } .controles .t { display: block; } }

.res-sup { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 13px; color: var(--ciano); }
.res-estrelas { font-size: 48px; letter-spacing: 6px; }
.res-estrelas span { display: inline-block; opacity: .2; filter: grayscale(1); transform: scale(.6); transition: all .4s cubic-bezier(.3,1.6,.5,1); }
.res-estrelas span.tem { opacity: 1; filter: none; transform: scale(1); }
.res-lista { list-style: none; margin: 0; padding: 0; text-align: left; font-size: 16px; }
.res-lista li { padding: 2px 0; } .res-lista li::before { content: '☆ '; color: #8a95b8; } .res-lista li.tem::before { content: '★ '; color: var(--ambar); }

/* ---------- cenas ---------- */
#cena { position: fixed; inset: 0; z-index: 60; background: #000; display: none; }
#cena.aberto { display: block; }
#cena video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.cena-topo { position: absolute; top: var(--seg-top); left: var(--seg-esq); color: #fff; text-shadow: 0 2px 6px #000; pointer-events: none; }
.cena-titulo { font-size: 20px; font-weight: 800; color: var(--ambar); }
.cena-sub { font-size: 14px; opacity: .85; }
.cena-botoes { position: absolute; right: var(--seg-dir); bottom: calc(var(--seg-bot) + 14px); display: flex; gap: 10px; }
.cena-pular, .cena-2x { font: 800 18px 'Baloo 2', sans-serif; color: #fff; background: rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.7);
  border-radius: 999px; padding: 8px 22px 6px; transition: opacity .2s, background .15s; }
.cena-2x { padding: 8px 16px 6px; min-width: 64px; }
.cena-2x[aria-pressed="true"] { background: var(--ciano); color: var(--tinta); border-color: var(--ciano); }
.cena-pular { opacity: 0; pointer-events: none; }
.cena-pular.visivel { opacity: 1; pointer-events: auto; }
.cena-pular:hover { background: rgba(255,177,59,.9); color: var(--tinta); border-color: var(--ambar); }
.cena-mudo { position: absolute; top: var(--seg-top); right: 16px; color: #fff; font-size: 13px; background: rgba(0,0,0,.55); border-radius: 8px; padding: 4px 10px; display: none; }
#cena.mudo .cena-mudo { display: block; }
.cena-barra { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.15); }
.cena-barra i { display: block; height: 100%; width: 0; background: var(--ambar); }

#fade { position: fixed; inset: 0; z-index: 55; background: #0b1024; opacity: 0; pointer-events: none; transition: opacity .45s; }
#fade.on { opacity: 1; pointer-events: auto; }

@media (max-height: 460px) {
  .obj-texto { font-size: 13px; } .membro { width: 46px; height: 46px; font-size: 17px; }
  #fala { top: calc(var(--seg-top) + 50px); bottom: auto; width: min(560px, calc(100vw - 120px)); } .fala-texto { font-size: 16px; }   /* tela baixa: fala no alto, livre dos botões */
  .des-pergunta { font-size: 17px; } .des-codigo { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ---------- final da Fase 1: créditos, parabéns, certificado ---------- */
#creditos { position: fixed; inset: 0; z-index: 48; background: #0b1024; overflow: hidden; }
.cred-fundo { position: absolute; inset: 0; background: url(final/creditos.jpg) center 30% / cover no-repeat; filter: blur(5px) brightness(.5) saturate(1.1); transform: scale(1.06); }
.cred-janela { position: absolute; inset: 0; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
.cred-rolo { position: absolute; left: 50%; top: 100%; width: min(620px, calc(100vw - 32px)); transform: translateX(-50%); text-align: center;
  text-shadow: 0 2px 8px #000c; padding-bottom: 20px; }
.cred-rolo h1 { margin: 0; font-size: clamp(52px, 11vw, 92px); line-height: .9; color: var(--ambar); text-shadow: 0 4px 0 var(--ambar-esc), 0 10px 30px #0009; }
.cred-sub { margin: 6px 0 40px; font-size: 20px; font-weight: 700; }
.cred-rolo h3 { margin: 36px 0 4px; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--ambar); }
.cred-rolo p { margin: 2px 0; font-size: 21px; font-weight: 600; }
.cred-rolo .k { color: #8fb6ff; } .cred-rolo .v { color: #ffc768; } .cred-rolo .l { color: #c9a2ff; }
.cred-voce { font-size: 34px !important; font-weight: 800 !important; color: var(--verde); }
.cred-fim { margin-top: 60px !important; font-size: 22px !important; line-height: 1.4; }
@keyframes rolar { from { top: 100%; transform: translate(-50%, 0); } to { top: 0; transform: translate(-50%, -100%); } }
.cred-pular { position: absolute; right: var(--seg-dir); bottom: var(--seg-bot); font: 700 16px 'Baloo 2', sans-serif; color: var(--papel);
  background: rgba(12,18,42,.6); border: 2px solid rgba(255,255,255,.35); border-radius: 999px; padding: 7px 18px 5px; }
#parabens { position: fixed; inset: 0; z-index: 48; display: grid; place-items: center; background: rgba(8,12,30,.82); }
.par-painel { max-width: min(620px, calc(100vw - 24px)); gap: 10px; padding: 16px 22px; }
.par-painel h2 { font-size: 28px; line-height: 1; }
.par-texto { margin: 0; font-size: 17px; line-height: 1.35; }
.par-estrelas { font-weight: 800; color: var(--ambar); font-size: 18px; }
.par-nome { display: flex; flex-direction: column; gap: 4px; width: 100%; font-weight: 700; font-size: 15px; text-align: left; }
.par-nome input { font: 700 20px 'Baloo 2', sans-serif; padding: 8px 14px 5px; border-radius: 12px; border: 2px solid rgba(255,255,255,.35);
  background: var(--papel); color: var(--tinta); -webkit-user-select: text; user-select: text; }
.par-nome input[readonly] { opacity: .85; }
.par-nome input.falta { border-color: var(--vermelho); }
.par-conta { margin-top: -8px; opacity: .75; align-self: flex-start; }
.par-cert { width: auto; max-width: 100%; height: auto; max-height: 38dvh; border-radius: 8px; box-shadow: 0 6px 20px #0008; background: var(--papel); flex: none; }
.par-botoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#cert-impressao { display: none; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { background: #fff !important; height: auto; overflow: visible; }
  body > * { display: none !important; }
  body > #cert-impressao { display: block !important; width: 100vw; height: auto; }
}
@media (max-height: 520px) {   /* celular deitado: formulário à esquerda, certificado à direita, sem rolar */
  .par-painel { display: grid; grid-template-columns: 1fr 1.15fr; column-gap: 18px; row-gap: 6px; max-width: min(860px, calc(100vw - 24px));
    align-items: center; justify-items: center; padding: 12px 16px; }
  .par-painel > :not(canvas) { grid-column: 1; }
  .par-painel .par-texto { display: none; }
  .par-painel h2 { font-size: 24px; }
  .par-cert { grid-column: 2; grid-row: 1 / span 8; max-height: calc(100dvh - 60px); }
  .par-painel .bt-grande { font-size: 18px; padding: 8px 24px 6px; }
  .par-painel .bt-sec { font-size: 15px; padding: 6px 14px 4px; }
}
.par-conta a { color: var(--ambar); font-weight: 700; }
.par-conta b { color: var(--papel); }
