/* ═══════════════════════════════════════════════════════════════
   MoviXPress · Recarga

   O sistema visual sai da própria marca: o monograma X é feito de
   faixas vazadas a 45°. Daí vêm os chanfros dos painéis, os chevrons
   da trilha e a malha diagonal do fundo. Cores amostradas do PNG
   oficial: azul #005277, laranja #E85F18.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Marca */
  --azul-marca: #005277;
  --laranja: #E85F18;
  --laranja-claro: #FF7E3C;
  --laranja-escuro: #B8410A;

  /* Superfícies, derivadas do azul da marca */
  --fundo: #001523;
  --fundo-2: #001E30;
  --painel: #002A41;
  --painel-alto: #00364F;

  /* Linhas e texto */
  --linha: rgba(120, 190, 225, .17);
  --linha-forte: rgba(120, 190, 225, .36);
  --texto: #EAF3F9;
  --texto-2: #97BBD1;
  --texto-3: #6A94AE;

  /* Estados */
  --ok: #27C08A;
  --alerta: #F5B93B;
  --erro: #F4685C;

  /* Geometria da marca */
  --corte: 22px;
  --chanfro: polygon(
    var(--corte) 0,
    100% 0,
    100% calc(100% - var(--corte)),
    calc(100% - var(--corte)) 100%,
    0 100%,
    0 var(--corte)
  );

  /* Movimento */
  --curva: cubic-bezier(.22, 1, .36, 1);
  --rapido: .18s;
  --medio: .32s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  padding: 0 18px 52px;
  font-family: Poppins, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, dl, dd, figure, fieldset, legend { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
button { font: inherit; color: inherit; }
svg { display: block; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

::selection { background: var(--laranja); color: #fff; }

:focus-visible {
  outline: 2px solid var(--laranja-claro);
  outline-offset: 3px;
}

/* ── Cenário: malha a 45°, monograma e luz ─────────────────────── */

.cenario {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.cenario__malha {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(120, 190, 225, .05) 0 1px,
    transparent 1px 26px
  );
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

.cenario__x {
  position: absolute;
  top: -60px;
  right: -110px;
  width: 420px;
  opacity: .05;
}

.cenario__luz {
  position: absolute;
  inset: -25% -20% auto -20%;
  height: 62vh;
  background:
    radial-gradient(48% 60% at 50% 0%, rgba(232, 95, 24, .20), transparent 68%),
    radial-gradient(50% 60% at 12% 8%, rgba(0, 82, 119, .70), transparent 72%);
}

/* ── Cabeçalho ─────────────────────────────────────────────────── */

.cabecalho {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 0 32px;
  text-align: center;
  animation: surgir .55s var(--curva) both;
}

.marca {
  width: 216px;
  margin: 0 auto 26px;
}

.cabecalho__faixa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.cabecalho__risco {
  flex: 1;
  max-width: 84px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--laranja));
  transform: skewX(-30deg);
}
.cabecalho__risco:last-child {
  background: linear-gradient(90deg, var(--laranja), transparent);
}

.cabecalho__titulo {
  font-size: clamp(2rem, 9vw, 2.7rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .14em;
  text-indent: .14em;
  text-transform: uppercase;
  color: var(--laranja);
  text-shadow: 0 0 34px rgba(232, 95, 24, .45);
}

.cabecalho__sub {
  max-width: 26ch;
  margin: 14px auto 0;
  color: var(--texto-2);
  font-size: .91rem;
}

/* ── Trilha em chevrons ────────────────────────────────────────── */

.palco {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
}

.trilha {
  display: flex;
  gap: 3px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.trilha__item {
  flex: 1;
  padding: 9px 4px 9px 16px;
  background: rgba(0, 42, 65, .8);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%, 11px 50%);
  color: var(--texto-3);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  transition: background var(--medio) var(--curva), color var(--medio) var(--curva);
}

.trilha__item:first-child {
  padding-left: 8px;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%);
}

.trilha__item[data-estado="feito"] {
  background: rgba(232, 95, 24, .26);
  color: var(--texto-2);
}

.trilha__item[data-estado="ativo"] {
  background: var(--laranja);
  color: #fff;
}

/* ── Painel chanfrado ──────────────────────────────────────────── */

.painel, .bilhete {
  position: relative;
  isolation: isolate;
  background: var(--linha-forte);          /* esta camada faz as vezes de borda */
  box-shadow: 0 24px 50px -26px rgba(0, 0, 0, .9);
  clip-path: var(--chanfro);
}

/* Preenchimento recuado 1px: dá uma borda contínua que acompanha o
   chanfro — clip-path sozinho não desenha borda nenhuma. */
.painel::after, .bilhete::after {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: linear-gradient(168deg, var(--painel-alto), var(--painel) 62%);
  clip-path: var(--chanfro);
}

/* Faixa laranja assentada sobre o chanfro — o detalhe que amarra os
   painéis ao ângulo de 45° do X da marca. */
.painel::before, .bilhete::before {
  content: "";
  position: absolute;
  top: var(--corte);
  left: 0;
  width: calc(var(--corte) * 1.4143);
  height: 6px;
  background: var(--laranja);
  transform-origin: 0 0;
  transform: rotate(-45deg);
}

.painel { padding: 28px 24px 26px; }

.etapa { animation: entrar .45s var(--curva) both; }
.etapa--saindo { animation: sair .2s ease-in both; }

.sobretitulo {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
  color: var(--texto-3);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.sobretitulo::before {
  content: "";
  width: 16px;
  height: 2px;
  background: var(--laranja);
}

.painel__titulo {
  font-size: 1.34rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

.painel__ajuda {
  margin-top: 6px;
  color: var(--texto-2);
  font-size: .9rem;
}

/* ── Voltar ────────────────────────────────────────────────────── */

.voltar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px 14px 6px 9px;
  border: 1px solid var(--linha);
  border-radius: 2px;
  background: none;
  color: var(--texto-2);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color var(--rapido), border-color var(--rapido), transform var(--rapido);
}
.voltar:hover { color: var(--texto); border-color: var(--linha-forte); transform: translateX(-3px); }
.voltar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ── Etapa 1 · Cidades ─────────────────────────────────────────── */

.cidades {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.cidade {
  --atraso: 0ms;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 66px;
  padding: 14px 14px 16px;
  border: 0;
  background: rgba(0, 14, 24, .55);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  text-align: left;
  cursor: pointer;
  animation: entrar .45s var(--curva) both;
  animation-delay: var(--atraso);
  transition: border-color var(--rapido), background var(--rapido), transform var(--rapido);
}

.cidade:hover {
  background: rgba(232, 95, 24, .16);
  transform: translate(2px, -2px);
}
.cidade:hover .cidade__nome { color: #fff; }
.cidade:active { transform: translate(0, 0); }

.cidade__nome {
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.25;
}

.cidade__seta {
  flex: 0 0 auto;
  color: var(--texto-3);
  transition: color var(--rapido), transform var(--medio) var(--curva);
}
.cidade__seta svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cidade:hover .cidade__seta { color: var(--laranja); transform: translateX(5px); }

/* ── Campos ────────────────────────────────────────────────────── */

.campo { position: relative; margin-top: 24px; }

.campo__rotulo {
  display: block;
  margin-bottom: 9px;
  color: var(--texto-2);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.campo__dica { margin-top: 8px; font-size: .76rem; color: var(--texto-3); }

.campo__erro {
  margin-top: 8px;
  font-size: .79rem;
  font-weight: 500;
  color: var(--erro);
  animation: tremer .3s var(--curva);
}

.entrada {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--linha);
  border-radius: 2px;
  background: rgba(0, 12, 20, .55);
  color: var(--texto);
  font: inherit;
  transition: border-color var(--rapido), background var(--rapido);
}

.entrada::placeholder { color: var(--texto-3); }
.entrada:hover { border-color: var(--linha-forte); }
.entrada:focus { outline: none; border-color: var(--linha-forte); background: rgba(0, 12, 20, .82); }

.campo[data-invalido] .entrada { border-color: var(--erro); }

/* Risco laranja que corre sob o campo em foco — em vez do halo padrão. */
.combo, .moeda { position: relative; display: flex; align-items: center; }
.combo::after, .moeda::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--laranja);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--medio) var(--curva);
}
.combo:focus-within::after, .moeda:focus-within::after { transform: scaleX(1); }

/* ── Combobox ──────────────────────────────────────────────────── */

.combo .entrada { padding-left: 44px; padding-right: 44px; }

.combo__icone {
  position: absolute;
  left: 15px;
  width: 18px; height: 18px;
  fill: none;
  stroke: var(--texto-3);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
  transition: stroke var(--rapido);
}
.combo:focus-within .combo__icone { stroke: var(--laranja); }

.combo__girando, .botao__girando {
  position: absolute;
  right: 15px;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .2);
  border-top-color: var(--laranja);
  border-radius: 50%;
  animation: girar .7s linear infinite;
}

.combo__limpar {
  position: absolute;
  right: 11px;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, .07);
  color: var(--texto-3);
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
  transition: color var(--rapido), background var(--rapido);
}
.combo__limpar:hover { color: var(--texto); background: rgba(255, 255, 255, .16); }
.combo__limpar svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

.sugestoes {
  position: absolute;
  z-index: 20;
  left: 0; right: 0;
  margin: 5px 0 0;
  padding: 5px;
  max-height: 232px;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--linha-forte);
  background: #00243A;
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, .95);
  animation: abrir .2s var(--curva) both;
  scrollbar-width: thin;
}

.sugestao {
  --atraso: 0ms;
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: .92rem;
  animation: entrar .26s var(--curva) both;
  animation-delay: var(--atraso);
  transition: background var(--rapido);
}

.sugestao::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--laranja);
  transform: scaleY(0);
  transition: transform var(--rapido) var(--curva);
}

.sugestao:hover, .sugestao[aria-selected="true"] { background: rgba(232, 95, 24, .14); }
.sugestao:hover::before, .sugestao[aria-selected="true"]::before { transform: scaleY(1); }
.sugestao mark { background: none; color: var(--laranja-claro); font-weight: 600; }

.sugestao__inicial {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  background: rgba(0, 82, 119, .65);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
  font-size: .76rem;
  font-weight: 700;
  color: var(--texto-2);
}

.sugestoes__vazio {
  padding: 14px 12px;
  color: var(--texto-3);
  font-size: .87rem;
  text-align: center;
}

/* ── Valor ─────────────────────────────────────────────────────── */

.moeda__simbolo {
  position: absolute;
  left: 16px;
  color: var(--texto-3);
  font-weight: 600;
  pointer-events: none;
}

.entrada--valor {
  padding-left: 47px;
  font-size: 1.42rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fichas { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }

.ficha {
  padding: 7px 13px;
  border: 1px solid var(--linha);
  border-radius: 2px;
  background: none;
  color: var(--texto-2);
  font-size: .82rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color var(--rapido), border-color var(--rapido), background var(--rapido), transform var(--rapido);
}

.ficha:hover { color: var(--texto); border-color: var(--linha-forte); transform: translateY(-2px); }
.ficha[aria-pressed="true"] {
  color: #fff;
  border-color: var(--laranja);
  background: var(--laranja);
}

.resumo {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 13px;
  padding: 11px 14px;
  border-left: 2px solid var(--laranja);
  background: rgba(0, 12, 20, .5);
  font-size: .82rem;
  color: var(--texto-2);
  animation: abrir .26s var(--curva);
}
.resumo strong { color: var(--texto); font-weight: 600; font-variant-numeric: tabular-nums; }
.resumo:empty { display: none; }

/* ── Métodos de pagamento ──────────────────────────────────────── */

.metodos { display: grid; gap: 8px; }

.metodo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 0;
  background: rgba(0, 14, 24, .5);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--rapido), background var(--rapido);
}

.metodo::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--laranja);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--medio) var(--curva);
}

.metodo:not([disabled]):hover { background: rgba(0, 30, 48, .75); }
.metodo[aria-pressed="true"] { background: rgba(232, 95, 24, .13); }
.metodo[aria-pressed="true"]::before { transform: scaleY(1); }
.metodo[disabled] { cursor: not-allowed; opacity: .45; }

.metodo__icone {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  background: rgba(0, 82, 119, .6);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  color: var(--texto-2);
  transition: color var(--rapido), background var(--rapido);
}
.metodo__icone svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.metodo[aria-pressed="true"] .metodo__icone { color: #fff; background: var(--laranja); }

.metodo__corpo { flex: 1; min-width: 0; }
.metodo__nome { display: block; font-weight: 600; font-size: .94rem; }
.metodo__desc { display: block; font-size: .78rem; color: var(--texto-3); }

.metodo__selo {
  padding: 4px 9px;
  background: rgba(245, 185, 59, .18);
  color: #FFCE68;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.metodo__marca {
  flex: 0 0 9px;
  height: 9px;
  background: var(--linha-forte);
  transform: rotate(45deg) scale(.7);
  transition: background var(--rapido), transform var(--medio) var(--curva);
}
.metodo[aria-pressed="true"] .metodo__marca { background: var(--laranja); transform: rotate(45deg) scale(1); }

/* ── Botões ────────────────────────────────────────────────────── */

.botao {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 26px;
  padding: 16px 22px;
  border: 0;
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  transition: transform var(--rapido) var(--curva), box-shadow var(--medio), filter var(--rapido);
}

.botao__conteudo { display: flex; align-items: center; gap: 10px; }

.botao--primario {
  color: #fff;
  background: linear-gradient(118deg, var(--laranja-claro), var(--laranja) 58%, var(--laranja-escuro));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
  box-shadow: 0 14px 32px -16px rgba(232, 95, 24, .95);
  overflow: hidden;
}

.botao--primario::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(108deg, transparent 28%, rgba(255, 255, 255, .3), transparent 72%);
  transform: translateX(-120%);
}
.botao--primario:not([disabled]):hover::before { animation: reluzir .85s var(--curva); }
.botao--primario:not([disabled]):hover { transform: translateY(-2px); box-shadow: 0 20px 40px -16px rgba(232, 95, 24, 1); }
.botao--primario:not([disabled]):active { transform: translateY(0); }

.botao__seta { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--medio) var(--curva); }
.botao--primario:not([disabled]):hover .botao__seta { transform: translateX(5px); }

.botao[disabled] { cursor: not-allowed; filter: grayscale(.3) brightness(.82); }
.botao[data-carregando] .botao__conteudo { opacity: 0; }
.botao__girando { display: none; }
.botao[data-carregando] .botao__girando { display: block; right: auto; border-top-color: #fff; }

.botao--copiar {
  gap: 9px;
  border: 0;
  background: rgba(0, 82, 119, .5);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  color: var(--texto);
}
.botao--copiar:hover { background: rgba(0, 106, 153, .62); transform: translateY(-1px); }
.botao--copiar[data-copiado] { color: var(--ok); background: rgba(39, 192, 138, .18); }
.botao__icone { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.botao--fantasma {
  margin-top: 14px;
  padding: 10px;
  color: var(--texto-3);
  background: none;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .04em;
}
.botao--fantasma:hover { color: var(--texto-2); }

/* ── Etapa 3 · Comprovante ─────────────────────────────────────── */

.bilhete__topo { padding: 28px 24px 24px; }
.bilhete__base { padding: 20px 24px 24px; }

.bilhete__cabecalho {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

/* Linha de picote com os furos nas laterais. O clip-path do bilhete
   corta a metade externa dos círculos, formando a mordida. */
.bilhete__perfuracao {
  position: relative;
  height: 1px;
  margin: 0 24px;
  border-top: 2px dashed rgba(120, 190, 225, .28);
}
.bilhete__perfuracao::before,
.bilhete__perfuracao::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--fundo);
  transform: translateY(-50%);
}
.bilhete__perfuracao::before { left: -36px; }
.bilhete__perfuracao::after { right: -36px; }

.cronometro { position: relative; flex: 0 0 58px; height: 58px; }
.cronometro svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cronometro circle { fill: none; stroke-width: 3; }
.cronometro__trilho { stroke: rgba(120, 190, 225, .16); }
.cronometro__arco {
  stroke: var(--laranja);
  stroke-dasharray: 119.38;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke var(--medio);
}
.cronometro[data-urgente] .cronometro__arco { stroke: var(--erro); }
.cronometro[data-urgente] .cronometro__texto { color: var(--erro); }

.cronometro__texto {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .84rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* QR com marcas de enquadramento, como um visor de leitura. */
.qr {
  position: relative;
  display: grid;
  place-items: center;
  margin: 24px auto 0;
  padding: 15px;
  width: fit-content;
}
.qr::before, .qr::after {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  border: 2px solid var(--laranja);
}
.qr::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.qr::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }

.qr__moldura {
  padding: 12px;
  background: #fff;
  animation: aparecerQR .5s var(--curva) both;
}
.qr__moldura svg { width: min(216px, 58vw); height: auto; }

.codigo { margin-top: 16px; }

.codigo summary {
  color: var(--texto-3);
  font-size: .8rem;
  letter-spacing: .04em;
  cursor: pointer;
  list-style: none;
  transition: color var(--rapido);
}
.codigo summary::-webkit-details-marker { display: none; }
.codigo summary::before {
  content: "";
  display: inline-block;
  margin-right: 8px;
  border: 4px solid transparent;
  border-left-color: currentColor;
  vertical-align: 1px;
  transition: transform var(--rapido) var(--curva);
}
.codigo[open] summary::before { transform: rotate(90deg) translateX(-1px); }
.codigo summary:hover { color: var(--texto-2); }

.codigo code {
  display: block;
  margin-top: 9px;
  padding: 12px;
  max-height: 108px;
  overflow-y: auto;
  border-left: 2px solid var(--linha-forte);
  background: rgba(0, 12, 20, .6);
  color: var(--texto-2);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .7rem;
  line-height: 1.7;
  word-break: break-all;
}

/* ── Recibo ────────────────────────────────────────────────────── */

.recibo { display: grid; gap: 10px; font-size: .87rem; }

.recibo__linha { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.recibo__linha dt {
  color: var(--texto-3);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.recibo__linha dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.recibo__linha--destaque {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--linha);
  align-items: center;
}
.recibo__linha--destaque dd {
  color: var(--laranja-claro);
  font-size: 1.24rem;
  font-weight: 700;
}

/* ── Estado do pagamento ───────────────────────────────────────── */

.estado {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--linha);
  font-size: .86rem;
  color: var(--texto-2);
}

.pulso {
  position: relative;
  flex: 0 0 8px;
  height: 8px;
  background: var(--alerta);
  transform: rotate(45deg);
}
.pulso::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  animation: pulsar 1.9s ease-out infinite;
}
.estado[data-estado="pago"] { color: var(--ok); }
.estado[data-estado="pago"] .pulso { background: var(--ok); }
.estado[data-estado="erro"] { color: var(--erro); }
.estado[data-estado="erro"] .pulso { background: var(--erro); }

/* ── Etapa 4 · Resultado ───────────────────────────────────────── */

.etapa--fim { text-align: center; }

.selo {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px; height: 104px;
  margin: 4px auto 22px;
}

.selo__x {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: .3;
  animation: girarSelo .8s var(--curva) both;
}

.selo__ok, .selo__alerta {
  position: relative;
  width: 64px; height: 64px;
  filter: drop-shadow(0 3px 8px rgba(0, 12, 20, .85));
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.selo__risco { stroke: currentColor; stroke-width: 4; stroke-dasharray: 62; animation: desenharRisco .5s var(--curva) .25s both; }

.etapa--fim[data-variante="sucesso"] .selo__alerta,
.etapa--fim:not([data-variante="sucesso"]) .selo__ok { display: none; }

.etapa--fim[data-variante="sucesso"] .selo { color: var(--ok); }
.etapa--fim[data-variante="expirado"] .selo,
.etapa--fim[data-variante="conciliacao"] .selo { color: var(--alerta); }
.etapa--fim[data-variante="erro"] .selo { color: var(--erro); }

.etapa--fim .recibo {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--linha);
  background: rgba(0, 12, 20, .4);
  text-align: left;
}

/* ── Aviso flutuante ───────────────────────────────────────────── */

.aviso {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  padding: 12px 20px;
  border: 0;
  background: #00304C;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, .95);
  font-size: .85rem;
  font-weight: 500;
  transform: translateX(-50%);
  animation: subir .3s var(--curva) both;
}
.aviso[data-tipo="ok"] { color: var(--ok); }
.aviso[data-tipo="erro"] { color: var(--erro); }

/* ── Rodapé ────────────────────────────────────────────────────── */

.rodape {
  position: relative;
  z-index: 1;
  margin: 32px auto 0;
  max-width: 560px;
  text-align: center;
  font-size: .74rem;
  letter-spacing: .03em;
  color: var(--texto-3);
  opacity: .78;
}

/* ── Esqueletos ────────────────────────────────────────────────── */

.esqueleto {
  background: linear-gradient(100deg, rgba(120, 190, 225, .06) 30%, rgba(120, 190, 225, .16) 50%, rgba(120, 190, 225, .06) 70%);
  background-size: 220% 100%;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
  animation: brilhar 1.4s ease-in-out infinite;
}
.esqueleto--cidade { height: 66px; }

/* ── Animações ─────────────────────────────────────────────────── */

@keyframes surgir      { from { opacity: 0; transform: translateY(-12px); } }
@keyframes entrar      { from { opacity: 0; transform: translateY(14px); } }
@keyframes sair        { to   { opacity: 0; transform: translateY(-10px); } }
@keyframes abrir       { from { opacity: 0; transform: translateY(-6px); } }
@keyframes subir       { from { opacity: 0; transform: translate(-50%, 16px); } }
@keyframes girar       { to   { transform: rotate(1turn); } }
@keyframes reluzir     { to   { transform: translateX(120%); } }
@keyframes brilhar     { to   { background-position: -120% 0; } }
@keyframes aparecerQR  { from { opacity: 0; transform: scale(.92); } }
@keyframes pulsar      { to   { transform: scale(2.8); opacity: 0; } }
@keyframes girarSelo   { from { opacity: 0; transform: rotate(-25deg) scale(.7); } }
@keyframes desenharRisco { from { stroke-dashoffset: 62; } }
@keyframes tremer {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* ── Telas maiores ─────────────────────────────────────────────── */

@media (min-width: 620px) {
  :root { --corte: 26px; }
  .cabecalho__sub { max-width: none; }
  .painel { padding: 32px 30px 30px; }
  .bilhete__topo { padding: 32px 30px 26px; }
  .bilhete__base { padding: 22px 30px 28px; }
  .bilhete__perfuracao { margin: 0 30px; }
  .bilhete__perfuracao::before { left: -42px; }
  .bilhete__perfuracao::after { right: -42px; }
  .cabecalho { padding-top: 64px; }
  .marca { width: 240px; }
}

@media (max-width: 400px) {
  .cidades { grid-template-columns: 1fr; }
  .esqueleto--cidade { height: 62px; }
  .cidade { min-height: 62px; }
  .bilhete__cabecalho { flex-direction: column-reverse; align-items: flex-start; }
}

/* ── Preferência por menos movimento ───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .cronometro__arco { transition: none; }
}
