/* ==========================================================
   Desafio "Do Zero à Primeira Música no Violão"
   Estilo app, mobile-first
   ========================================================== */

:root {
  --fundo: #120e0b;
  --fundo-2: #1b1511;
  --cartao: #221a15;
  --cartao-2: #2b211b;
  --borda: rgba(255, 228, 196, .09);
  --texto: #f7efe5;
  --texto-2: #b9a998;
  --texto-3: #7d6f62;
  --ambar: #f5a524;
  --laranja: #ff7a3d;
  --verde: #3ddc97;
  --vermelho: #ff6b6b;
  --grad: linear-gradient(135deg, #ffbe3d 0%, #f5a524 40%, #ff7a3d 100%);
  --raio: 20px;
  --raio-p: 14px;
  --sombra: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --fonte-titulo: 'Bricolage Grotesque', system-ui, sans-serif;
  --fonte: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mola: cubic-bezier(.34, 1.56, .64, 1);
  --suave: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fonte);
  background: var(--fundo);
  color: var(--texto);
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  transition: opacity .35s;
}
body::before { /* brilho quente de palco */
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(60% 40% at 50% -5%, rgba(245, 165, 36, .22), transparent 70%),
    radial-gradient(50% 35% at 100% 100%, rgba(255, 122, 61, .08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after { /* cordas do violão ao fundo */
  content: '';
  position: fixed; top: 0; bottom: 0; left: 50%;
  width: min(300px, 70vw);
  transform: translateX(-50%);
  background: repeating-linear-gradient(90deg, transparent 0 calc(16.66% - 1px), rgba(255, 228, 196, .035) calc(16.66% - 1px) 16.66%);
  pointer-events: none;
  z-index: 0;
}
body.saindo { opacity: 0; }
body.modal-aberto { overflow: hidden; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
em { font-style: normal; }

.app {
  position: relative; z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 18px calc(32px + env(safe-area-inset-bottom));
}

/* ---------------- Topo ---------------- */
.topo {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 64px;
  padding-top: env(safe-area-inset-top);
  margin: 0 -18px; padding-left: 18px; padding-right: 18px;
  background: linear-gradient(var(--fundo) 60%, transparent);
}
.topo-marca { display: flex; align-items: center; gap: 8px; font-family: var(--fonte-titulo); font-weight: 600; font-size: 15px; letter-spacing: .01em; margin-right: auto; }
.marca-icone { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--cartao); border: 1px solid var(--borda); font-size: 17px; }
.topo-voltar, .topo-som {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--cartao); border: 1px solid var(--borda);
  color: var(--texto-2);
  transition: transform .2s var(--mola), color .2s;
}
.topo-voltar:active, .topo-som:active { transform: scale(.9); }
.topo-voltar[hidden] { display: none; }
.topo-som .icone-som-off { display: none; }
.topo-som.mudo .icone-som-on { display: none; }
.topo-som.mudo .icone-som-off { display: block; }
.topo-som svg { width: 20px; height: 20px; }

/* ---------------- Telas ---------------- */
.tela { display: none; }
.tela.ativa { display: block; animation: entrar .5s var(--suave) both; }
.tela.ativa.voltando { animation-name: entrar-volta; }
@keyframes entrar { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes entrar-volta { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

.entra { animation: subir .7s var(--suave) both; animation-delay: var(--atraso, 0s); }
@keyframes subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------------- Tipografia ---------------- */
.titulo-grande {
  font-family: var(--fonte-titulo); font-weight: 800;
  font-size: clamp(32px, 9vw, 44px); line-height: 1.02; letter-spacing: -.025em;
  margin: 14px 0 12px;
}
.titulo-grande em, .titulo-medio em {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.titulo-medio { font-family: var(--fonte-titulo); font-weight: 800; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.sub { color: var(--texto-2); font-size: 16px; }

.selo {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 99px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  color: var(--ambar); background: rgba(245, 165, 36, .12); border: 1px solid rgba(245, 165, 36, .25);
}
.selo-verde { color: var(--verde); background: rgba(61, 220, 151, .12); border-color: rgba(61, 220, 151, .3); }

/* ---------------- Início ---------------- */
.inicio-cabecalho { padding-top: 10px; }
.video-card {
  /* Largura calculada para o vídeo caber na tela sem rolar (vale para 9:16 e 16:9) */
  /* Sempre a maior largura possível, até 420px (não muda ao rolar a página) */
  width: min(100%, 420px);
  margin: 22px auto;
  padding: 6px;
  border-radius: calc(var(--raio) + 6px);
  background: linear-gradient(160deg, rgba(245, 165, 36, .35), rgba(255, 255, 255, .04) 40%, rgba(255, 122, 61, .2));
  box-shadow: var(--sombra), 0 0 60px -20px rgba(245, 165, 36, .35);
}

.video {
  position: relative; width: 100%;
  aspect-ratio: var(--proporcao, .5625);
  border-radius: var(--raio); overflow: hidden; background: #000;
  isolation: isolate;
  -webkit-user-select: none; user-select: none;
}
/* O iframe fica maior que a moldura: título, logo e botões do YouTube ficam escondidos fora da área visível */
.video-palco { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.video-palco iframe, .video-palco > div {
  position: absolute; left: 0; width: 100%; border: 0;
  top: -70px; height: calc(100% + 140px);
  pointer-events: none;
}
.video-palco video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* Shorts: faixa escura no rodapé cobre o botão "curtir" que o YouTube coloca dentro do vídeo */
.video.e-shorts::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  height: 24%;
  background: linear-gradient(rgba(10, 8, 6, 0), rgba(10, 8, 6, .75) 30%, rgba(10, 8, 6, .97) 55%, #0a0806);
  pointer-events: none;
}
.video-capa {
  position: absolute; inset: 0; z-index: 1;
  background: #000 center / cover no-repeat;
  transition: opacity .4s;
}
.video:not([data-estado="inicio"]) .video-capa { opacity: 0; pointer-events: none; }

.video-camada { position: absolute; inset: 0; z-index: 2; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.video-painel {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(circle at 50% 45%, rgba(24, 18, 14, .9), rgba(12, 9, 7, .97));
  transition: opacity .3s;
  will-change: opacity;
}
.video[data-estado="inicio"] .video-painel { background: linear-gradient(transparent 30%, rgba(18, 14, 11, .85)); }
.video[data-estado="tocando"] .video-painel { opacity: 0; pointer-events: none; }
.vp-play {
  display: grid; place-items: center;
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--grad); color: #241404;
  box-shadow: 0 6px 0 #b8611c, 0 16px 40px rgba(255, 122, 61, .5);
  transition: transform .25s var(--mola);
}
.vp-play svg { width: 36px; height: 36px; fill: currentColor; stroke: none; margin-left: 4px; }
.vp-play:active { transform: scale(.9); }
.video[data-estado="inicio"] .vp-play { animation: quicar 2s var(--mola) infinite; }
.video[data-estado="fim"] .vp-play svg { display: none; }
.video[data-estado="fim"] .vp-play::before { content: '↺'; font-size: 38px; font-weight: 800; line-height: 1; }
.vp-rotulo { font-family: var(--fonte-titulo); font-weight: 800; font-size: 19px; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.vp-tempo { font-size: 13px; color: var(--texto-2); min-height: 1em; font-variant-numeric: tabular-nums; }
.vp-recomecar {
  display: none; align-items: center; gap: 6px; margin-top: 6px;
  padding: 9px 16px; border-radius: 99px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15);
  font-size: 14px; font-weight: 700; color: var(--texto);
}
.vp-recomecar svg { width: 16px; height: 16px; }
.video[data-estado="pausado"] .vp-recomecar { display: inline-flex; }

.video-barra { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 4px; background: rgba(255, 255, 255, .15); pointer-events: none; }
.video-barra i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .4s linear; }
.video[data-estado="inicio"] .video-barra { opacity: 0; }

/* Plano B: se o celular bloquear o play, deixa tocar direto no vídeo (sem o painel por cima) */
.video.toque-direto .video-camada, .video.toque-direto .video-painel, .video.toque-direto .video-capa { pointer-events: none; }
.video.toque-direto .video-palco iframe, .video.toque-direto .video-palco > div { pointer-events: auto; }
.video.toque-direto .video-painel { background: transparent; justify-content: flex-end; padding-bottom: 18px; }
.video.toque-direto .vp-play, .video.toque-direto .video-capa { display: none; }

.video.carregando .vp-play { animation: none; }
.video.carregando .vp-play svg { display: none; }
.video.carregando .vp-play::after { content: ''; width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(36, 20, 4, .25); border-top-color: #241404; animation: girar .7s linear infinite; }
.video.sem-video { display: grid; place-items: center; color: var(--texto-3); font-size: 14px; }

.cta-area { text-align: center; }
.beneficios { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; color: var(--texto-2); font-size: 14px; }
.beneficios li { display: flex; align-items: center; gap: 6px; }

/* ---------------- Botões ---------------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 60px; padding: 16px 22px;
  border-radius: 18px;
  font-family: var(--fonte-titulo); font-weight: 800; font-size: 18px; letter-spacing: -.005em;
  transition: transform .25s var(--mola), box-shadow .25s, opacity .2s, filter .2s;
  user-select: none;
  text-decoration: none;
}
.btn:active:not(:disabled) { transform: scale(.96); }
.btn-principal {
  color: #241404;
  background: var(--grad);
  box-shadow: 0 6px 0 #b8611c, 0 18px 30px -10px rgba(255, 122, 61, .55);
}
.btn-principal:active:not(:disabled) { box-shadow: 0 2px 0 #b8611c, 0 8px 16px -8px rgba(255, 122, 61, .5); transform: translateY(4px) scale(.98); }
.btn-principal:disabled { filter: grayscale(.85) brightness(.55); box-shadow: 0 6px 0 #3a2d24; cursor: not-allowed; }
.btn svg { width: 22px; height: 22px; stroke-width: 2.6; transition: transform .25s var(--mola); }
.btn:hover svg { transform: translateX(3px); }

.btn-pulso:not(:disabled)::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(245, 165, 36, .6);
  animation: pulso 2.2s infinite;
}
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(245, 165, 36, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(245, 165, 36, 0); } }

.btn.carregando { pointer-events: none; }
.btn.carregando > * { visibility: hidden; }
.btn.carregando::after {
  content: ''; position: absolute; width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid rgba(36, 20, 4, .25); border-top-color: #241404;
  animation: girar .7s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

.link-discreto { display: block; margin: 18px auto 0; color: var(--texto-2); font-size: 15px; font-weight: 500; padding: 8px 12px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--texto-3); }

/* ---------------- Trilha ---------------- */
.trilha-topo { padding-top: 8px; margin-bottom: 26px; }
.saudacao { color: var(--texto-2); margin-bottom: 4px; }
.saudacao strong { color: var(--texto); }
.progresso { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.progresso-corda { flex: 1; height: 10px; border-radius: 99px; background: var(--cartao-2); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.5); }
.progresso-preenchido {
  height: 100%; width: 0; border-radius: inherit; background: var(--grad);
  transition: width 1s var(--suave);
  box-shadow: 0 0 14px rgba(245, 165, 36, .6);
}
.progresso-texto { font-family: var(--fonte-titulo); font-size: 18px; color: var(--texto-2); }
.progresso-texto b { color: var(--texto); font-size: 22px; }

.trilha { list-style: none; position: relative; padding-left: 0; }
.trilha::before { /* a "corda" que liga as etapas */
  content: ''; position: absolute; left: 31px; top: 30px; bottom: 30px; width: 2px;
  background: repeating-linear-gradient(var(--texto-3) 0 6px, transparent 6px 12px);
  opacity: .5;
}
.etapa-item { position: relative; margin-bottom: 12px; animation: subir .55s var(--suave) both; animation-delay: var(--atraso); }
.etapa-botao {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  padding: 10px 14px 10px 6px; border-radius: var(--raio);
  transition: background .2s, transform .25s var(--mola);
}
.etapa-botao:active { transform: scale(.97); }
.etapa-no {
  flex: none; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  font-family: var(--fonte-titulo); font-weight: 800; font-size: 20px;
  background: var(--cartao-2); border: 2px solid var(--borda); color: var(--texto-3);
  position: relative; z-index: 1;
  transition: transform .3s var(--mola);
}
.etapa-info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.etapa-info small { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-3); }
.etapa-chip {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: none; white-space: nowrap;
  color: var(--ambar); background: rgba(245, 165, 36, .12); border: 1px solid rgba(245, 165, 36, .28);
}
.etapa-chip[hidden] { display: none; }
.etapa-item.feita .etapa-chip { color: var(--verde); background: rgba(61, 220, 151, .1); border-color: rgba(61, 220, 151, .25); }
.etapa-item.bloqueada .etapa-chip { color: var(--texto-3); background: rgba(255, 255, 255, .04); border-color: var(--borda); }
.etapa-rotulo .etapa-chip { margin-left: 8px; vertical-align: 1px; }
.etapa-info strong { font-size: 17px; font-weight: 700; line-height: 1.25; }
.etapa-info em { font-size: 13px; color: var(--texto-3); margin-top: 2px; }
.seta { color: var(--texto-3); flex: none; }

.etapa-item.feita .etapa-no { background: rgba(61, 220, 151, .15); border-color: var(--verde); color: var(--verde); }
.etapa-item.feita .etapa-info em { color: var(--verde); }
.etapa-item.atual .etapa-botao { background: var(--cartao); border: 1px solid rgba(245, 165, 36, .35); box-shadow: var(--sombra), 0 0 40px -16px rgba(245, 165, 36, .5); padding-top: 14px; padding-bottom: 14px; }
.etapa-item.atual .etapa-no { background: var(--grad); border-color: transparent; color: #241404; box-shadow: 0 4px 0 #b8611c; animation: quicar 2s var(--mola) infinite; }
.etapa-item.atual .etapa-info em { color: var(--ambar); font-weight: 700; }
.etapa-item.atual .seta { color: var(--ambar); }
.etapa-item.bloqueada { opacity: .55; }
.etapa-item.bloqueada .etapa-no { font-size: 16px; }
.etapa-item.premio .etapa-no { background: var(--grad); border-color: transparent; font-size: 22px; animation: quicar 2s var(--mola) infinite; }
.etapa-item.premio .etapa-botao { background: var(--cartao); border: 1px solid rgba(245, 165, 36, .35); }
@keyframes quicar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.tremer { animation: tremer .4s both !important; }
@keyframes tremer { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.trilha-rodape { text-align: center; margin-top: 10px; }

/* ---------------- Etapa ---------------- */
.etapa-rotulo { color: var(--ambar); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding-top: 8px; margin-bottom: 6px; }
.etapa-descricao { color: var(--texto-2); font-size: 16px; margin: -4px 0 26px; }
.concluir-area { position: sticky; bottom: calc(14px + env(safe-area-inset-bottom)); padding-top: 10px; transition: opacity .45s ease; }
/* Enquanto o vídeo roda, o botão fica quase transparente para não atrapalhar a aula */
.concluir-area.discreto { opacity: .14; }
.concluir-area.discreto .btn { box-shadow: none; pointer-events: none; } /* o toque vai para a área e só revela o botão */
.btn-concluir { gap: 12px; }
.btn-anel { width: 30px; height: 30px; flex: none; }
.btn-anel svg { width: 30px; height: 30px; transform: rotate(-90deg); }
.btn-anel circle { fill: none; stroke-width: 4; stroke: rgba(36, 20, 4, .2); }
.btn-anel .anel-progresso { stroke: #241404; stroke-linecap: round; transition: stroke-dashoffset .5s var(--suave); }
.btn-concluir:disabled .btn-anel circle { stroke: rgba(255, 255, 255, .15); }
.btn-concluir:disabled .btn-anel .anel-progresso { stroke: #fff; }
.btn-concluir.liberado { animation: estourar .6s var(--mola); }
.btn-concluir.ja-feita .btn-anel { display: none; }
@keyframes estourar { 0% { transform: scale(.9); } 50% { transform: scale(1.06); } 100% { transform: scale(1); } }
.dica { text-align: center; font-size: 13px; color: var(--texto-3); margin-top: 12px; }

/* ---------------- Final ---------------- */
.final-conteudo { text-align: center; padding-top: 24px; }
.trofeu {
  font-size: 92px; line-height: 1; margin-bottom: 16px;
  filter: drop-shadow(0 10px 30px rgba(245, 165, 36, .5));
  animation: trofeu 1s var(--mola) both, quicar 2.4s 1s ease-in-out infinite;
}
@keyframes trofeu { from { transform: scale(0) rotate(-20deg); } to { transform: scale(1) rotate(0); } }
.final-conteudo .sub { max-width: 400px; margin: 0 auto; }
.selos-etapas { display: flex; justify-content: center; gap: 8px; margin: 26px 0 30px; }
.selos-etapas span {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(61, 220, 151, .15); border: 2px solid var(--verde); color: var(--verde);
  font-weight: 800; font-size: 15px;
  animation: trofeu .5s var(--mola) both; animation-delay: var(--atraso);
}
.btn-presente { font-size: 20px; min-height: 66px; }

/* ---------------- Modais ---------------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; visibility: hidden; }
.modal.aberto { visibility: visible; }
.modal-fundo { position: absolute; inset: 0; background: rgba(8, 6, 4, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.modal.aberto .modal-fundo { opacity: 1; }
.modal-caixa {
  position: relative; width: 100%; max-width: 520px;
  max-height: 92dvh; overflow-y: auto;
  background: var(--fundo-2); border: 1px solid var(--borda); border-bottom: 0;
  border-radius: 28px 28px 0 0;
  padding: 14px 22px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .5s var(--suave);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
}
.modal.aberto .modal-caixa { transform: none; }
.modal-alca { width: 44px; height: 5px; border-radius: 9px; background: var(--cartao-2); margin: 0 auto 18px; }
.modal-fechar { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--cartao); font-size: 22px; line-height: 1; color: var(--texto-2); }
.modal h3 { font-family: var(--fonte-titulo); font-weight: 800; font-size: 26px; letter-spacing: -.02em; margin-bottom: 4px; }
.modal .sub { font-size: 15px; margin-bottom: 20px; }

.campo { display: block; margin-bottom: 14px; }
.campo span { display: block; font-size: 14px; font-weight: 700; color: var(--texto-2); margin-bottom: 6px; }
.campo input {
  width: 100%; height: 56px; padding: 0 16px;
  font: inherit; font-size: 17px; color: var(--texto);
  background: var(--cartao); border: 2px solid var(--borda); border-radius: var(--raio-p);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.campo input::placeholder { color: var(--texto-3); }
.campo input:focus { border-color: var(--ambar); box-shadow: 0 0 0 4px rgba(245, 165, 36, .15); }
.campo.invalido input { border-color: var(--vermelho); box-shadow: 0 0 0 4px rgba(255, 107, 107, .12); }
.isca { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.erro-form { min-height: 22px; color: var(--vermelho); font-size: 14px; font-weight: 500; margin: -2px 0 10px; }
.privacidade { text-align: center; color: var(--texto-3); font-size: 13px; margin-top: 14px; }

.modal-centro { align-items: center; padding: 20px; }
.modal-centro .modal-caixa {
  border-radius: 28px; border-bottom: 1px solid var(--borda); text-align: center;
  padding: 30px 24px 22px; max-width: 400px;
  transform: scale(.8); opacity: 0; transition: transform .45s var(--mola), opacity .25s;
}
.modal-centro.aberto .modal-caixa { transform: none; opacity: 1; }
.conquista-icone {
  width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 42px; font-weight: 800; color: #0d2b1e;
  background: var(--verde); box-shadow: 0 6px 0 #22a56c, 0 0 50px rgba(61, 220, 151, .5);
}
.modal.aberto .conquista-icone { animation: trofeu .6s .1s var(--mola) both; }
.caixa-conquista .sub { margin-bottom: 22px; }
.caixa-conquista .link-discreto { margin-top: 10px; }

.tremer.modal-caixa { animation: tremer .4s both; }

/* ---------------- Toast e confete ---------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 140%);
  max-width: calc(100% - 32px); width: max-content;
  padding: 14px 18px; border-radius: 14px;
  background: #fff1dc; color: #241404; font-weight: 700; font-size: 15px; text-align: center;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .45);
  transition: transform .45s var(--mola);
}
.toast.visivel { transform: translate(-50%, 0); }
#confete { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* ---------------- Página do presente ---------------- */
.presente-pagina { text-align: center; padding-top: 18px; }
.presente-icone { font-size: 84px; line-height: 1; animation: trofeu .9s var(--mola) both, quicar 2.4s 1s ease-in-out infinite; filter: drop-shadow(0 10px 30px rgba(61, 220, 151, .45)); }
.passos { list-style: none; text-align: left; margin: 28px 0; display: grid; gap: 12px; counter-reset: passo; }
.passos li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border-radius: var(--raio); background: var(--cartao); border: 1px solid var(--borda);
  animation: subir .6s var(--suave) both; animation-delay: var(--atraso);
}
.passos li::before {
  counter-increment: passo; content: counter(passo);
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad); color: #241404; font-family: var(--fonte-titulo); font-weight: 800;
}
.passos strong { display: block; font-size: 16px; }
.passos span { color: var(--texto-2); font-size: 14px; }
.btn-whatsapp { color: #fff; background: linear-gradient(135deg, #2fe07a, #1fa855); box-shadow: 0 6px 0 #137a3c, 0 18px 30px -10px rgba(37, 211, 102, .55); }
.btn-whatsapp:active { box-shadow: 0 2px 0 #137a3c; transform: translateY(4px) scale(.98); }
.btn-whatsapp svg { fill: currentColor; stroke: none; width: 26px; height: 26px; }
.btn-whatsapp.btn-pulso::before { animation-name: pulso-verde; }
@keyframes pulso-verde { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); } }
.aviso { margin-top: 16px; font-size: 13px; color: var(--texto-3); }

/* ---------------- Telas maiores ---------------- */
@media (min-width: 700px) {
  .app { padding-top: 12px; }
  .modal { align-items: center; padding: 20px; }
  .modal-caixa { border-radius: 28px; border-bottom: 1px solid var(--borda); transform: translateY(30px) scale(.96); opacity: 0; transition: transform .45s var(--suave), opacity .3s; }
  .modal.aberto .modal-caixa { opacity: 1; }
  .modal-alca { display: none; }
  .etapa-botao:hover { background: rgba(255, 255, 255, .03); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.btn-whatsapp.carregando::after { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }

/* ---------------- Sair da conta ---------------- */
.link-sair {
  display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
  margin: 14px auto 0; padding: 8px 12px; border-radius: 10px;
  color: var(--texto-3); font-size: 14px; font-weight: 500;
  transition: color .2s, background .2s;
}
.link-sair svg { width: 17px; height: 17px; }
.link-sair:hover, .link-sair:active { color: var(--vermelho); background: rgba(255, 107, 107, .08); }
.conta-email { font-size: 12px; opacity: .8; word-break: break-all; }
.final-conteudo .link-sair { display: flex; }
.trilha-rodape { display: flex; flex-direction: column; align-items: center; }
.sair-icone { font-size: 46px; line-height: 1; margin-bottom: 12px; }
.caixa-sair .sub { margin-bottom: 22px; }
.caixa-sair .sub strong { color: var(--texto); }
.caixa-sair .link-discreto { margin-top: 10px; }

/* Contagem automática ao fim do vídeo: o anel do botão esvazia em 3 s */
.btn-concluir.contando { animation: estourar .6s var(--mola); }
.btn-concluir.contando .anel-progresso { animation: esvaziar-anel var(--contagem, 3s) linear forwards; }
@keyframes esvaziar-anel { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 94.25; } }

/* Aviso "Toque para assistir com som" (autoplay mudo no celular) — no meio do vídeo */
.vp-som {
  position: absolute; z-index: 5; inset: 0;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle at 50% 50%, rgba(12, 9, 7, .55), rgba(12, 9, 7, .15) 70%);
  color: var(--texto); text-align: center; cursor: pointer;
}
.vp-som-icone {
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; margin-bottom: 6px;
  background: var(--grad); color: #241404;
  box-shadow: 0 6px 0 #b8611c, 0 16px 40px rgba(255, 122, 61, .5);
  animation: pulsar-som 1.8s ease-in-out infinite;
}
.vp-som-icone svg { width: 38px; height: 38px; }
.vp-som strong { font-family: var(--fonte-titulo); font-weight: 800; font-size: 19px; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.vp-som small { font-size: 13px; color: var(--texto); opacity: .85; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.video.sem-som[data-estado="tocando"] .vp-som { display: flex; }
@keyframes pulsar-som { 0%, 100% { box-shadow: 0 6px 0 #b8611c, 0 0 0 0 rgba(245,165,36,.5); } 60% { box-shadow: 0 6px 0 #b8611c, 0 0 0 16px rgba(245,165,36,0); } }
