/* Teclado de pares da segunda senha (js/teclado-pares.js): portão Web/Android e Ajustes do computador.
   Contra quem olha por cima do ombro: o botão tocado NÃO muda de aparência (sem :active, sem ondulação, sem foco);
   o único retorno é o próximo ponto acender — igual para os 5 botões. Medidas em rem (acompanham a fonte grande). */
.tp {
  --tp-ouro: var(--rc-ouro-claro, var(--ouro-claro, #e6cf94));
  --tp-ouro-esc: var(--rc-ouro, var(--ouro, #c9a961));
  --tp-tx: var(--rc-tx, var(--tx, #ece4d0));
  --tp-tx3: var(--rc-tx3, var(--tx3, #a39a85));
  --tp-fio: rgba(201, 169, 97, 0.32);
  display: flex; flex-direction: column; align-items: stretch; gap: 0.85rem; width: 100%; max-width: 20rem; margin: 0 auto;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
.tp *, .tp *::before, .tp *::after { box-sizing: border-box; }
/* linha de cima: vaga | 6 pontos | Apagar (a vaga do mesmo tamanho do Apagar deixa os pontos no centro) */
.tp-topo { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem; align-items: center; gap: 0.25rem; }
.tp-pontos { display: flex; justify-content: center; gap: 0.85rem; }
.tp-pontos i {
  width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 1.5px solid var(--tp-ouro-esc); background: transparent;
  transition: background 0.12s;
}
.tp-pontos i.tp-cheio { background: var(--tp-ouro); border-color: var(--tp-ouro); }
.tp.tp-erro .tp-pontos { animation: tp-treme 0.32s ease; }
@keyframes tp-treme { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
/* o "2 de 6" é só para leitor de tela */
.tp-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 5 botões: 3 em cima e 2 embaixo, a linha de 2 centralizada sob a de 3 (grade de 6 colunas, cada botão ocupa 2) */
.tp-grade { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.55rem; }
.tp-grade > .tp-par { grid-column: span 2; }
.tp-grade > .tp-par:nth-child(4) { grid-column: 2 / span 2; }
.tp-tecla {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: 3.25rem; margin: 0; padding: 0.4rem 0.3rem;
  border: 1px solid var(--tp-fio); border-radius: 0.55rem; background: rgba(255, 255, 255, 0.035); color: var(--tp-tx);
  font: 500 1.25rem/1 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; cursor: pointer; outline: none;
  -webkit-tap-highlight-color: transparent; -webkit-appearance: none; appearance: none;
}
/* nada de estado tocado/pressionado/hover/foco que um observador possa ler */
.tp-tecla:hover, .tp-tecla:active, .tp-tecla:focus, .tp-tecla:focus-visible { background: rgba(255, 255, 255, 0.035); border-color: var(--tp-fio); outline: none; box-shadow: none; }
.tp-tecla small { font-size: 0.72rem; font-weight: 450; letter-spacing: 0.04em; color: var(--tp-tx3); }
.tp-tecla b { font-weight: 550; min-width: 0.75em; text-align: center; }
.tp-tecla:disabled { cursor: default; color: var(--tp-tx); opacity: 0.55; }
/* Apagar: ícone ⌫ no alto, alvo de 44 px, sem fundo nem borda */
.tp-apagar { width: 2.75rem; min-height: 2.75rem; height: 2.75rem; padding: 0; color: var(--tp-tx3); border-color: transparent; background: transparent; }
.tp-apagar:hover, .tp-apagar:active, .tp-apagar:focus, .tp-apagar:focus-visible { background: transparent; border-color: transparent; }
.tp-apagar svg { display: block; }
.tp-apagar:disabled { color: var(--tp-tx3); opacity: 0.3; }

/* conferindo no servidor: volante pequeno e nenhum toque aceito */
.tp-verif { display: flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 1.5rem; color: var(--tp-ouro); font: 500 0.85rem/1.2 'Inter', system-ui, sans-serif; letter-spacing: 0.04em; visibility: hidden; }
.tp.tp-ocupado .tp-verif { visibility: visible; }
.tp.tp-ocupado .tp-grade { pointer-events: none; }
.tp.tp-ocupado .tp-tecla:disabled { opacity: 0.4; }

/* no computador (Ajustes), dentro da linha de configuração */
.aj-sync-tp { width: 100%; min-width: 17rem; max-width: 20rem; }
@media (max-width: 359px) {
  .tp-grade { gap: 0.45rem; }
  .tp-tecla { min-height: 3rem; font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) { .tp.tp-erro .tp-pontos { animation: none; } }
