/* ================= Tour guiado (tour.js) ================= */
html.tour-ativo, html.tour-ativo * { scroll-behavior: auto !important; }

.tour-camada { position: fixed; inset: 0; z-index: 10000; pointer-events: none; }
.tour-camada.tour-no-modal { position: absolute; }

.tour-bloqueio { position: absolute; inset: 0; pointer-events: auto; background: transparent; transition: background 0.2s; }
.tour-bloqueio.tour-escuro { background: rgba(0, 0, 0, 0.6); }

.tour-luz {
  position: absolute; border-radius: 12px; border: 2px solid var(--ouro, #b48a4a);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6); pointer-events: none;
  transition: left 0.3s ease, top 0.3s ease, width 0.3s ease, height 0.3s ease;
}
.tour-luz[hidden] { display: none; }

.tour-balao {
  position: absolute; pointer-events: auto; box-sizing: border-box;
  width: min(390px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--painel, #fff); color: var(--texto, #1d1a16);
  border: 1px solid var(--borda, #e7e0d5); border-radius: 16px; padding: 16px 18px 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.12);
  font-family: inherit; font-size: 14px; line-height: 1.5; text-align: left;
  transition: left 0.3s ease, top 0.3s ease;
}
.tour-balao.tour-entra { animation: tour-entrar 0.25s ease both; }
@keyframes tour-entrar { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tour-topo { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--suave, #7a7266); margin-bottom: 6px; }
.tour-secao { color: var(--ouro, #b48a4a); }
.tour-titulo { margin: 0 0 6px; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; color: var(--texto, #1d1a16); }
.tour-texto p { margin: 0 0 8px; }
.tour-texto p:last-child { margin-bottom: 0; }
.tour-balao kbd {
  display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; text-align: center;
  font: 700 12px/1.5 inherit; background: var(--painel-2, #faf7f2); border: 1px solid var(--borda-forte, #d6ccbd);
  box-shadow: 0 1px 0 var(--borda-forte, #d6ccbd);
}
.tour-dica {
  margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13px;
  background: var(--ouro-fundo, rgba(180, 138, 74, 0.1)); border: 1px solid var(--ouro-borda, rgba(180, 138, 74, 0.35));
}
.tour-progresso { height: 3px; border-radius: 3px; background: var(--borda, #e7e0d5); margin: 14px 0 12px; overflow: hidden; }
.tour-progresso span { display: block; height: 100%; background: var(--ouro, #b48a4a); transition: width 0.3s ease; }

.tour-botoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-espaco { flex: 1; }
.tour-btn {
  border-radius: 999px; padding: 8px 14px; font: 700 13px inherit; font-family: inherit; cursor: pointer;
  border: 1px solid var(--borda-forte, #d6ccbd); background: transparent; color: var(--texto, #1d1a16);
}
.tour-btn:hover { border-color: var(--ouro, #b48a4a); }
.tour-btn:focus-visible { outline: 2px solid var(--ouro, #b48a4a); outline-offset: 2px; }
.tour-btn.tour-sair { border-color: transparent; color: var(--suave, #7a7266); padding-left: 4px; padding-right: 4px; }
.tour-btn.tour-proximo { background: var(--ouro, #b48a4a); border-color: var(--ouro, #b48a4a); color: var(--ouro-texto, #fff); }

.tour-carregando { display: flex; align-items: center; gap: 10px; padding: 6px 0 12px; font-weight: 600; }
.tour-spinner {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 2px solid var(--borda, #e7e0d5); border-top-color: var(--ouro, #b48a4a);
  animation: tour-girar 0.8s linear infinite;
}
@keyframes tour-girar { to { transform: rotate(360deg); } }

/* Convite no primeiro acesso */
.tour-convite {
  position: fixed; right: 16px; bottom: 16px; z-index: 9000; width: min(320px, calc(100vw - 32px)); box-sizing: border-box;
  background: var(--painel, #fff); color: var(--texto, #1d1a16); border: 1px solid var(--borda, #e7e0d5);
  border-radius: 16px; padding: 14px 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  animation: tour-entrar 0.3s ease both; font-size: 14px;
}
.tour-convite b { font-size: 16px; }
.tour-convite p { margin: 4px 0 12px; color: var(--suave, #7a7266); }
.tour-convite-botoes { display: flex; justify-content: flex-end; gap: 8px; }

/* Janela "Como funciona" */
.tour-ajuda-bloco { border: 1px solid var(--borda); border-radius: 14px; padding: 14px; }
.tour-ajuda-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tour-ajuda-cab h3 { margin: 0 0 2px; font-size: 16px; }
.tour-ajuda-secoes { display: flex; flex-direction: column; }
.tour-ajuda-sec { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--borda); }
.tour-ajuda-sec .btn { flex: none; }

@media (prefers-reduced-motion: reduce) {
  .tour-luz, .tour-balao, .tour-progresso span { transition: none; }
  .tour-balao.tour-entra, .tour-convite { animation: none; }
}
