@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/assets/vendor/fontes/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('/assets/vendor/fontes/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/assets/vendor/fontes/dm-sans-latin-700-normal.woff2') format('woff2'); }

:root {
  --roxo: #57307E;
  --roxo-escuro: #3B1F57;
  --roxo-suave: #F3EEF8;
  --preto: #111111;
  --cinza: #5E5A66;
  --borda: #E4DFEA;
  --branco: #FFFFFF;
  --erro: #9A2B1F;
  --erro-fundo: #FCEDEA;
  --raio: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--preto); background: var(--branco);
  line-height: 1.45;
}
main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 24px; }
[hidden] { display: none !important; }

.topo { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px 4px; }
.etapas { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; justify-content: center; width: 100%; max-width: 528px; }
.etapas li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--cinza); padding: 6px 4px 8px; border-bottom: 3px solid var(--borda); white-space: nowrap; }
.etapas li span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; background: var(--borda); color: var(--cinza); }
.etapas li.atual { color: var(--roxo); border-bottom-color: var(--roxo); }
.etapas li.atual span { background: var(--roxo); color: var(--branco); }
.etapas li.feita { color: var(--preto); border-bottom-color: #B89AD6; }
.etapas li.feita span { background: #B89AD6; color: var(--branco); }
.marca img { height: 30px; width: auto; display: block; }
.marca .marca-texto { font-weight: 700; font-size: 22px; letter-spacing: .02em; color: var(--roxo); }

.tela { display: flex; flex-direction: column; align-items: stretch; }
#tela-inicio { text-align: center; padding-top: 10px; }
#tela-foto { text-align: center; }
#tela-foto .dicas { margin: 4px 0 18px; }
.identificacao { display: inline-block; margin: 6px auto 0; padding: 5px 12px; border-radius: 999px; background: var(--roxo-suave); color: var(--roxo); font-size: 13px; font-weight: 700; letter-spacing: .01em; }
h1 { font-size: 26px; line-height: 1.2; margin: 10px 0 8px; font-weight: 700; }
h2 { font-size: 20px; margin: 6px 0 12px; text-align: center; }
.sub { color: var(--cinza); margin: 0 0 22px; font-size: 16px; }

.botao {
  font: inherit; font-weight: 500; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 20px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.botao:focus-visible, .link:focus-within, .chip:focus-visible, input[type=range]:focus-visible { outline: 3px solid #B89AD6; outline-offset: 2px; }
.botao.principal { background: var(--roxo); color: var(--branco); }
.botao.principal:hover { background: var(--roxo-escuro); }
.botao.secundario { background: var(--branco); color: var(--roxo); border-color: var(--roxo); }
.botao.claro { background: rgba(255,255,255,.95); color: var(--roxo); min-height: 42px; padding: 8px 16px; }
.botao.grande { width: 100%; min-height: 58px; font-size: 18px; font-weight: 700; }
.botao.pequeno { min-height: 40px; font-size: 14px; padding: 8px 16px; align-self: center; }
.botao svg { width: 24px; height: 24px; }
.botao:disabled { opacity: .5; cursor: default; }

.link { display: inline-block; margin: 16px auto 0; color: var(--roxo); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 10px; }
.dica-arrastar { display: none; color: var(--cinza); font-size: 13px; margin: 12px 0 0; }
@media (hover: hover) and (pointer: fine) { .dica-arrastar { display: block; } }
body.arrastando main { outline: 3px dashed var(--roxo); outline-offset: -8px; border-radius: var(--raio); }

.dicas { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 8px; text-align: left; }
.dicas li { background: var(--roxo-suave); border-radius: 10px; padding: 10px 14px 10px 38px; position: relative; font-size: 15px; }
.dicas li::before { content: ''; position: absolute; left: 14px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--roxo); }
.privacidade { color: var(--cinza); font-size: 13px; margin: 20px 0 0; }

.aviso-erro { background: var(--erro-fundo); color: var(--erro); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; font-size: 15px; text-align: left; }

/* câmera */
.visor { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 70vh; max-height: 70dvh; background: #000; border-radius: var(--raio); overflow: hidden; margin: 0 auto; }
.visor video { width: 100%; height: 100%; object-fit: cover; display: block; }
.visor video.espelhado { transform: scaleX(-1); }
.visor .guia { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.instrucao { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; color: #fff; font-size: 15px; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.acoes { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.acoes > .botao { flex: 1; }
.acoes.coluna { flex-direction: column; }

/* confirmação */
.foto-confirmar { position: relative; border-radius: var(--raio); overflow: hidden; background: #000; }
.foto-confirmar { display: flex; justify-content: center; }
.foto-confirmar canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 62vh; max-height: 62dvh; }
.processando { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(43, 20, 64, .72); color: #fff; text-align: center; padding: 16px; }
.processando p { margin: 0; font-size: 18px; font-weight: 500; }
.processando .acoes { margin-top: 6px; }
.girando { width: 40px; height: 40px; border-radius: 50%; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; animation: girar .9s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .girando { animation-duration: 3s; } }
#tela-confirmar .aviso-erro { margin-top: 12px; }

/* comparador */
.comparador { display: flex; flex-direction: column; gap: 10px; }
.vistas { display: flex; gap: 8px; justify-content: center; }
.chip { font: inherit; font-size: 14px; font-weight: 500; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--borda); background: var(--branco); color: var(--preto); cursor: pointer; min-height: 36px; }
.chip[aria-pressed="true"] { background: var(--roxo); border-color: var(--roxo); color: var(--branco); }
.quadro { position: relative; width: 100%; border-radius: var(--raio); overflow: hidden; background: #000; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.quadro canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.camada { position: absolute; inset: 0; }
.rotulo { position: absolute; top: 10px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(17,17,17,.62); color: #fff; pointer-events: none; }
.rotulo.esq { left: 10px; }
.rotulo.dir { right: 10px; background: rgba(87, 48, 126, .9); }
.alca { position: absolute; top: 0; bottom: 0; width: 0; left: 50%; pointer-events: none; }
.alca::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,.45); }
.alca span { position: absolute; bottom: 14px; left: -20px; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.35); }
.alca span::before, .alca span::after { content: ''; position: absolute; top: 50%; margin-top: -6px; border: 6px solid transparent; }
.alca span::before { left: 5px; border-right-color: var(--roxo); }
.alca span::after { right: 5px; border-left-color: var(--roxo); }

.aviso-simulacao { margin: 0; font-size: 15px; font-weight: 500; text-align: center; color: var(--preto); background: var(--roxo-suave); border-radius: 10px; padding: 10px 12px; }
.aviso-tonalidade { margin: 0; font-size: 14px; text-align: center; color: #6B4A00; background: #FFF4D6; border-radius: 10px; padding: 8px 12px; }
.barra-rotulo { font-size: 13px; color: var(--cinza); text-align: center; margin-bottom: -6px; }
input[type=range] { width: 100%; accent-color: var(--roxo); height: 32px; margin: 0; }

.depuracao { margin-top: 18px; font-size: 12px; }
.depuracao canvas { width: 100%; height: auto; display: block; margin: 8px 0; }
.depuracao pre { white-space: pre-wrap; word-break: break-all; }

.rodape { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px 16px 18px; color: var(--cinza); font-size: 12px; }
.rodape-logo { height: 14px; width: auto; }

@media (min-width: 700px) {
  h1 { font-size: 32px; }
  main { padding-top: 20px; }
}

/* etapa 3: chamada e ações */
.chamada { margin: 22px 0 4px; font-size: 17px; font-weight: 500; text-align: center; line-height: 1.4; }
.nota { margin: -2px 0 0; font-size: 14px; color: var(--cinza); text-align: center; }
.nota.ok { background: var(--roxo-suave); color: var(--preto); border-radius: 10px; padding: 10px 12px; margin: 0; }
.nota.erro { background: var(--erro-fundo); color: var(--erro); }
.botao.texto { background: none; color: var(--roxo); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
label.botao { -webkit-user-select: none; user-select: none; }
label.botao:focus-visible, label.link:focus-visible { outline: 3px solid #B89AD6; outline-offset: 2px; }
.botao[disabled].principal { background: #A893BD; opacity: 1; }

/* ================= tema escuro MALB (fundo roxo do site malbagency.com, "m" como marca d'água) ================= */
body.tema-escuro {
  --fundo-escuro: #240332; --fundo-escuro-2: #2E0D3D; --texto-claro: #F5F3F8; --texto-claro-2: #C9BFD4;
  --menta: #70E9B9; --linha-clara: rgba(255, 255, 255, .14);
  background: var(--fundo-escuro); color: var(--texto-claro);
}
.tema-escuro .app { position: relative; overflow-x: clip; }
.tema-escuro .app::before {
  content: ''; position: absolute; top: -40px; right: -90px; width: 420px; height: 290px;
  background: url('/assets/malb-m.svg') no-repeat center / contain; opacity: .09; pointer-events: none;
}
.tema-escuro .app > * { position: relative; }
.tema-escuro .etapas li { color: var(--texto-claro-2); border-bottom-color: var(--linha-clara); }
.tema-escuro .etapas li span { background: rgba(255, 255, 255, .12); color: var(--texto-claro-2); }
.tema-escuro .etapas li.atual { color: var(--menta); border-bottom-color: var(--menta); }
.tema-escuro .etapas li.atual span { background: var(--menta); color: var(--fundo-escuro); }
.tema-escuro .etapas li.feita { color: var(--texto-claro); border-bottom-color: rgba(112, 233, 185, .45); }
.tema-escuro .etapas li.feita span { background: rgba(112, 233, 185, .45); color: var(--fundo-escuro); }
.tema-escuro .identificacao { background: rgba(112, 233, 185, .14); color: var(--menta); }
.tema-escuro h1, .tema-escuro h2 { color: var(--texto-claro); }
.tema-escuro .sub, .tema-escuro .privacidade, .tema-escuro .dica-arrastar, .tema-escuro .barra-rotulo, .tema-escuro .nota { color: var(--texto-claro-2); }
.tema-escuro .botao.principal { background: var(--menta); color: var(--fundo-escuro); }
.tema-escuro .botao.principal:hover { background: #8DF0C9; }
.tema-escuro .botao[disabled].principal { background: rgba(112, 233, 185, .35); color: rgba(36, 3, 50, .75); }
.tema-escuro .botao.secundario { background: transparent; color: var(--texto-claro); border-color: rgba(255, 255, 255, .4); }
.tema-escuro .botao.secundario:hover { border-color: var(--menta); }
.tema-escuro .botao.texto, .tema-escuro .link { color: var(--menta); }
.tema-escuro .botao:focus-visible, .tema-escuro .link:focus-visible, .tema-escuro label.botao:focus-visible, .tema-escuro .chip:focus-visible { outline-color: var(--menta); }
.tema-escuro .dicas li { background: rgba(255, 255, 255, .06); color: var(--texto-claro); }
.tema-escuro .dicas li::before { background: var(--menta); }
.tema-escuro .aviso-erro { background: rgba(255, 140, 120, .14); color: #FFC7BC; }
.tema-escuro .chip { background: transparent; color: var(--texto-claro); border-color: rgba(255, 255, 255, .3); }
.tema-escuro .chip[aria-pressed="true"] { background: var(--menta); border-color: var(--menta); color: var(--fundo-escuro); }
/* fotos: moldura neutra (preta), para o roxo não mudar a percepção da cor dos dentes */
.tema-escuro .quadro, .tema-escuro .foto-confirmar, .tema-escuro .visor { background: #0E0E10; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.tema-escuro .rotulo.dir { background: rgba(36, 3, 50, .88); }
.tema-escuro .aviso-simulacao { background: rgba(255, 255, 255, .08); color: var(--texto-claro); }
.tema-escuro input[type=range] { accent-color: var(--menta); }
.tema-escuro .chamada { color: var(--texto-claro); }
.tema-escuro .nota.ok { background: rgba(112, 233, 185, .12); color: var(--texto-claro); }
.tema-escuro .nota.erro { background: rgba(255, 140, 120, .14); color: #FFC7BC; }
.tema-escuro .depuracao { color: var(--texto-claro-2); }
.tema-escuro .rodape { color: var(--texto-claro-2); }

/* ================= landing page (só na apresentação) ================= */
.landing { margin-top: 34px; display: grid; gap: 14px; text-align: left; }
.bloco { border-radius: var(--raio); padding: 18px 16px; background: var(--roxo-suave); }
.tema-escuro .bloco { background: rgba(255, 255, 255, .05); border: 1px solid var(--linha-clara); }
.bloco h2 { text-align: left; font-size: 19px; margin: 0 0 12px; }
.bloco p { margin: 0 0 10px; line-height: 1.5; }
.bloco p:last-child { margin-bottom: 0; }
.tema-escuro .bloco p { color: var(--texto-claro-2); }
.passos { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.passos li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: start; }
.passos .num { grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--roxo); color: #fff; font-weight: 700; }
.tema-escuro .passos .num { background: var(--menta); color: var(--fundo-escuro); }
.passos strong { font-size: 16px; }
.passos p { margin: 2px 0 0; font-size: 15px; }
.nota-clara { font-size: 14px; font-style: italic; }
.selos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.selos li { position: relative; padding: 10px 10px 10px 30px; border-radius: 10px; font-size: 14px; background: var(--branco); }
.tema-escuro .selos li { background: rgba(255, 255, 255, .06); color: var(--texto-claro); }
.selos li::before { content: '✓'; position: absolute; left: 11px; top: 9px; font-weight: 700; color: var(--roxo); }
.tema-escuro .selos li::before { color: var(--menta); }
.bloco details { border-top: 1px solid var(--linha-clara, var(--borda)); padding: 12px 0; }
.bloco details:last-child { padding-bottom: 0; }
.bloco summary { cursor: pointer; font-weight: 500; list-style-position: outside; padding-right: 8px; }
.bloco details p { margin-top: 8px; font-size: 15px; }
.cta-final { text-align: center; padding: 24px 16px; }
.cta-final h2 { text-align: center; }
.cta-final .link { margin-top: 12px; }
@media (min-width: 700px) {
  .passos { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .passos li { grid-template-columns: 1fr; }
  .passos .num { grid-row: auto; margin-bottom: 8px; }
}
