/* Rascunho de navegação — preto no branco, marcações de posição. Nada aqui é o visual final. */
:root {
  --tinta: #111;
  --apagado: #9a9a9a;
  --linha: 1.5px;
  --fundo: #fff;
  --mesa: #ececec;
  --alvo: 44px; /* alvo de toque mínimo (DESIGN.md §6) */
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--tinta);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fundo); }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }

/* ── a moldura: celular em tela pequena; aparelho desenhado no centro em tela grande ── */
.mesa { min-height: 100%; }
.aparelho { position: relative; width: 100%; height: 100dvh; overflow: hidden; background: var(--fundo); }
.entalhe { display: none; }
.vista { position: absolute; inset: 0; overflow-y: auto; }
@media (min-width: 560px) {
  .aviso { top: 92px; }
  body { background: var(--mesa); }
  .mesa { display: flex; align-items: center; justify-content: center; gap: 32px; min-height: 100dvh; padding: 24px; }
  .aparelho { width: 390px; height: min(844px, calc(100dvh - 48px)); border: 12px solid var(--tinta); border-radius: 52px; box-shadow: 0 0 0 2px #444; }
  .entalhe { display: block; position: absolute; z-index: 30; top: 8px; left: 50%; width: 110px; height: 26px; margin-left: -55px; background: var(--tinta); border-radius: 14px; }
  .vista { padding-top: 26px; }
}

/* ── peças comuns ── */
.tela { min-height: 100%; display: flex; flex-direction: column; }
.topo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 56px; padding: 6px 12px; border-bottom: var(--linha) solid var(--tinta); position: sticky; top: 0; background: var(--fundo); z-index: 5; }
.topo-l { display: flex; align-items: center; gap: 4px; }
.topo-r { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.topo-t { font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-topo { min-height: var(--alvo); padding: 0 6px; font-size: 15px; white-space: nowrap; }
.b-ic { width: var(--alvo); height: var(--alvo); display: inline-flex; align-items: center; justify-content: center; }
.ic svg { width: 24px; height: 24px; fill: none; stroke: var(--tinta); stroke-width: 1.6; display: block; }
.logo-peq { font-weight: 800; letter-spacing: .08em; font-size: 14px; border: var(--linha) solid var(--tinta); padding: 3px 6px; }
.versao { font-size: 11px; margin-left: 6px; border: 1px solid var(--tinta); border-radius: 10px; padding: 1px 6px; }
.chip { white-space: nowrap; min-height: 32px; padding: 0 10px; border: var(--linha) solid var(--tinta); border-radius: 16px; font-size: 13px; font-weight: 700; }
.selo-pro { font-size: 11px; font-weight: 800; letter-spacing: .06em; border: var(--linha) solid var(--tinta); padding: 1px 5px; background: var(--fundo); }
.marca { position: relative; border: var(--linha) solid var(--tinta); min-height: 44px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(to top right, transparent calc(50% - .75px), var(--tinta) calc(50% - .75px), var(--tinta) calc(50% + .75px), transparent calc(50% + .75px)),
              linear-gradient(to bottom right, transparent calc(50% - .75px), var(--tinta) calc(50% - .75px), var(--tinta) calc(50% + .75px), transparent calc(50% + .75px)); }
.marca span { background: var(--fundo); font-size: 11px; padding: 0 4px; }
.b-pri, .b-sec { width: 100%; min-height: 52px; border: var(--linha) solid var(--tinta); font-weight: 700; text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; }
.b-pri { background: var(--tinta); color: var(--fundo); }
.b-sec.mini { width: auto; min-height: var(--alvo); padding: 0 12px; font-size: 14px; }
.b-link { min-height: var(--alvo); text-decoration: underline; text-align: center; width: 100%; font-size: 14px; }
.perigo { color: #b00; }
.b-pri.perigo { background: #b00; color: #fff; border-color: #b00; }
.titulo { font-size: 22px; font-weight: 800; display: block; }
.acoes { padding: 12px 16px 20px; display: grid; gap: 10px; border-top: var(--linha) solid var(--tinta); }

/* ── T01 ── */
.splash { justify-content: center; align-items: center; gap: 28px; cursor: pointer; }
.logo-grande { width: 180px; height: 180px; border: 3px solid var(--tinta); border-radius: 50%; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 900; font-size: 26px; letter-spacing: .1em; line-height: 1.1; }
.dica { font-size: 14px; animation: pulsa 1.6s ease-in-out infinite; }
@keyframes pulsa { 50% { opacity: .3; } }

/* ── T02 ── */
.inicio { flex: 1; display: grid; grid-template-rows: 1fr 1fr; gap: 14px; padding: 16px; }
.bloco-grande { border: 2px solid var(--tinta); padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.bloco-grande .marca { flex: 1; margin-bottom: 10px; }
.bloco-grande b { font-size: 22px; }
.bloco-grande span { font-size: 14px; }
.continuar { margin: 0 16px 16px; min-height: 52px; border: var(--linha) dashed var(--tinta); padding: 0 14px; font-size: 15px; }

/* ── listas (T03, T07, T17, T18) ── */
.abas { display: grid; grid-template-columns: 1fr 1fr; border-bottom: var(--linha) solid var(--tinta); }
.abas button { min-height: 48px; text-align: center; font-weight: 600; }
.abas .on { box-shadow: inset 0 -4px 0 var(--tinta); font-weight: 800; }
.lista { padding: 12px 16px; display: grid; gap: 10px; align-content: start; }
.linha { position: relative; width: 100%; min-height: 64px; border: var(--linha) solid var(--tinta); padding: 10px 12px; display: flex; align-items: center; gap: 12px; }
.linha.estatica, .linha.ajuste { cursor: default; justify-content: space-between; }
.linha .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.linha .txt small { font-size: 13px; color: #555; }
.linha .capa { width: 44px; height: 44px; flex: none; border: var(--linha) solid var(--tinta); display: flex; align-items: center; justify-content: center; }
.linha .capa .marca { width: 100%; height: 100%; min-height: 0; border: 0; }
.linha .nivel { font-size: 11px; letter-spacing: 1px; }
.linha .selo-pro { position: absolute; top: -9px; right: 10px; }
/* PRO para quem não é PRO: tracejado, cinza mais claro, como desabilitado (pedido do operador) */
.linha.travada { border-style: dashed; border-color: var(--apagado); color: var(--apagado); }
.linha.travada .capa { border-color: var(--apagado); border-style: dashed; }
.linha.travada .ic svg { stroke: var(--apagado); }
.linha.travada .txt small { color: var(--apagado); }
.linha.travada .selo-pro { color: var(--tinta); }
.ajuste input[type="checkbox"] { width: 26px; height: 26px; accent-color: var(--tinta); }
.alternador { display: inline-flex; border: var(--linha) solid var(--tinta); }
.alternador button { min-height: 36px; padding: 0 10px; font-size: 12px; font-weight: 700; }
.alternador .on { background: var(--tinta); color: var(--fundo); }
.topo-r .alternador button { min-height: var(--alvo); }

/* ── T08 · mapa de baixo para cima ── */
.faixa-vitrine { margin: 10px 16px 0; min-height: var(--alvo); border: var(--linha) dashed var(--tinta); padding: 8px 10px; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.prog { font-size: 13px; }
.mapa { flex: 1; padding: 24px 16px 40px; }
.caminho { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column-reverse; gap: 30px; position: relative; }
.caminho::before { content: ""; position: absolute; left: 25px; top: 20px; bottom: 20px; border-left: 2px dashed var(--tinta); }
.palco button { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 14px; position: relative; }
.palco:nth-child(even) button { padding-left: 34px; }
.palco:nth-child(even) .bola { margin-left: -34px; }
.bola { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 2px solid var(--tinta); background: var(--fundo); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px; position: relative; z-index: 1; }
.palco .txt { display: flex; flex-direction: column; text-align: left; }
.palco .txt small { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.palco .txt .ic svg { width: 14px; height: 14px; }
.palco.vencido .bola { background: var(--tinta); color: var(--fundo); }
.palco.atual .bola { width: 64px; height: 64px; border-width: 5px; margin-left: -6px; }
.palco.bloqueado .bola { border-style: dashed; border-color: var(--apagado); }
.palco.bloqueado .txt, .palco.vitrine .txt { color: var(--apagado); }
.palco.vitrine .bola { border-style: dashed; border-color: var(--apagado); }

/* ── T04 · palco Hero  e  T10 · relógio ── */
.palco-tela { position: relative; }
.hero { flex: 1; position: relative; display: flex; flex-direction: column; min-height: 520px; }
.pistas { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); border-left: 1px solid var(--tinta); }
.pista { border-right: 1px solid var(--tinta); position: relative; overflow: hidden; }
.pista i { display: none; position: absolute; left: 18%; width: 64%; height: 26px; border: var(--linha) solid var(--tinta); background: var(--fundo); }
.caindo .pista i { display: block; animation: cai 1.9s linear infinite; }
@keyframes cai { from { top: -30px; } to { top: 100%; } }
.teclas { display: grid; grid-template-columns: repeat(5, 1fr); height: 64px; border-top: 3px solid var(--tinta); }
.teclas span { border-right: 1px solid var(--tinta); }
.pronto { position: absolute; inset: 0; background: rgba(255,255,255,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.pronto .nome { font-size: 24px; }
.pronto .meta { font-size: 14px; border: 1px solid var(--tinta); padding: 4px 10px; }
.pronto .b-sec { width: auto; padding: 0 18px; min-height: var(--alvo); }
.b-comecar { flex: none; aspect-ratio: 1; width: 200px; height: 200px; border-radius: 50%; border: 3px solid var(--tinta); font-weight: 800; font-size: 18px; text-align: center; padding: 30px; }
.contagem { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 140px; font-weight: 900; background: rgba(255,255,255,.85); }
.b-pausa { position: absolute; top: 70px; right: 12px; width: var(--alvo); height: var(--alvo); border: var(--linha) solid var(--tinta); border-radius: 50%; background: var(--fundo); display: flex; align-items: center; justify-content: center; z-index: 6; }
.simulador { margin: 10px 16px; padding: 8px; border: 1px dashed #0a58ca; color: #0a58ca; font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.simulador button { border: 1px solid #0a58ca; padding: 6px 8px; min-height: 36px; color: #0a58ca; }
.palco-tela .simulador { position: absolute; left: 0; right: 0; bottom: 70px; background: var(--fundo); z-index: 6; }
.relogio-tela { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 480px; }
.relogio { width: 300px; height: 300px; border: 3px solid var(--tinta); border-radius: 50%; position: relative; }
.relogio span { position: absolute; inset: 0; }
.relogio span i { position: absolute; top: 6px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border: var(--linha) solid var(--tinta); border-radius: 50%; }
.ponteiro { position: absolute; left: 50%; top: 50%; width: 2px; height: 120px; margin-left: -1px; background: var(--tinta); transform-origin: top center; transform: rotate(180deg); }
.girando .ponteiro { animation: gira 6s steps(12) infinite; }
@keyframes gira { from { transform: rotate(180deg); } to { transform: rotate(540deg); } }
.marcar { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; border-top: var(--linha) solid var(--tinta); font-weight: 600; }
.marcar input { width: 26px; height: 26px; accent-color: var(--tinta); }

/* ── T05 ── */
.res { flex: 1; padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.estrelas { font-size: 48px; letter-spacing: 6px; }
.numeros { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.numeros li { border: var(--linha) solid var(--tinta); padding: 10px 4px; display: flex; flex-direction: column; }
.numeros b { font-size: 18px; }
.numeros small { font-size: 12px; }
.abriu { border: var(--linha) dashed var(--tinta); padding: 10px 14px; margin: 0; }

/* ── T11 · T12 · T13 · T14 · T15 · T16 ── */
.pro, .form, .pagamento, .ok { flex: 1; padding: 20px 16px; display: flex; flex-direction: column; gap: 14px; }
.pro > .marca { height: 120px; }
.beneficios { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.planos { display: grid; gap: 10px; }
.plano { display: flex; align-items: center; gap: 12px; border: var(--linha) solid var(--tinta); padding: 12px; min-height: 60px; }
.plano input { width: 22px; height: 22px; accent-color: var(--tinta); }
.plano span { display: flex; flex-direction: column; }
.campo { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.campo input { min-height: 52px; border: var(--linha) solid var(--tinta); padding: 0 12px; font-size: 16px; }
.ou { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ou::before, .ou::after { content: ""; flex: 1; border-top: 1px solid var(--tinta); }
.b-sec .marca { width: 24px; height: 24px; min-height: 0; border-radius: 50%; }
.nota { font-size: 13px; color: #555; }
.codigo { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.codigo span { height: 56px; border: var(--linha) solid var(--tinta); }
.bloco-tracejado { flex: 1; min-height: 260px; border: 2px dashed var(--tinta); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-weight: 700; }
.ok { align-items: center; justify-content: center; text-align: center; }
.bola-ok { width: 110px; height: 110px; border: 3px solid var(--tinta); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 54px; font-weight: 900; }

/* ── camadas, faixa e aviso ── */
.camada { position: absolute; inset: 0; z-index: 20; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; }
.cartao { width: 100%; background: var(--fundo); border-top: 2px solid var(--tinta); padding: 20px 16px 28px; display: grid; gap: 10px; }
.cartao p { margin: 0 0 6px; }
.cartao > .marca { height: 90px; }
.faixa-offline { position: absolute; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--tinta); color: var(--fundo); font-size: 13px; padding: 10px 14px; text-align: center; }
.aviso { position: absolute; left: 16px; right: 16px; top: 64px; z-index: 25; background: var(--tinta); color: var(--fundo); padding: 12px 14px; font-size: 14px; opacity: 0; transform: translateY(-10px); transition: .2s; pointer-events: none; }
.aviso.on { opacity: 1; transform: none; }

/* ── painel de estados: controle do rascunho, fora do celular ── */
/* No celular é uma aba fina na borda direita, no meio da altura: longe do topo (voltar, ícones)
   e da base (ações, "abrir sempre no relógio"), que é onde ficam os toques do app. */
.painel { position: fixed; right: 0; top: 42%; z-index: 50; font-size: 13px; color: #0a58ca; display: flex; align-items: flex-start; flex-direction: row-reverse; }
.painel-abrir { writing-mode: vertical-rl; border: 1px dashed #0a58ca; border-right: 0; background: rgba(255,255,255,.92); padding: 10px 4px; color: #0a58ca; font-size: 11px; opacity: .8; }
.painel-corpo { display: none; background: #fff; border: 1px dashed #0a58ca; padding: 10px; width: 230px; gap: 8px; flex-direction: column; }
.painel.aberto .painel-corpo { display: flex; }
.painel-corpo label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.painel-corpo select, .painel-corpo button { border: 1px solid #0a58ca; padding: 4px 6px; min-height: 32px; background: #fff; color: #0a58ca; }
.painel-corpo small { color: #555; }
@media (min-width: 560px) {
  .painel { position: static; align-self: center; flex-direction: column; align-items: stretch; }
  .painel-abrir { writing-mode: horizontal-tb; border-right: 1px dashed #0a58ca; padding: 6px 10px; font-size: 13px; opacity: 1; }
  .painel.aberto .painel-corpo, .painel .painel-corpo { display: flex; }
  .painel-abrir { pointer-events: none; }
}
