/* FUGA · PÁGINA 7 — despedida limpa e focada nos últimos gestos. */
html body #paginaDespedida.container.page-balance{display:flex!important;flex-direction:column!important;width:min(100%,680px)!important;max-width:680px!important;min-height:100svh!important;height:auto!important;max-height:none!important;margin:0 auto!important;padding:clamp(2rem,9svh,5rem) clamp(1rem,5vw,1.75rem) calc(1.75rem + env(safe-area-inset-bottom))!important;overflow:visible!important;background:#fff!important;border:0!important;box-shadow:none!important;color:#000!important;font-family:Montserrat,Arial,sans-serif!important}
html body #paginaDespedida.container.page-balance[style*="display:none"],html body #paginaDespedida.container.page-balance[style*="display: none"]{display:none!important}
#paginaDespedida *,#paginaDespedida *::before,#paginaDespedida *::after{box-sizing:border-box!important}
#paginaDespedida .despedida-brand{display:block!important;width:var(--fuga-marca-w,clamp(118px,34vw,150px))!important;margin:0 auto!important;padding:0!important;order:0!important}
#paginaDespedida .despedida-brand img{display:block!important;width:100%!important;height:auto!important}
/* A despedida é conteúdo da cidade: aparece entre a marca e os últimos gestos. */
#paginaDespedida .despedida-card{display:block!important;position:relative!important;inset:auto!important;order:1!important;width:100%!important;height:auto!important;margin:clamp(1.5rem,6svh,3rem) auto 1.25rem!important;padding:0!important;background:transparent!important;border:0!important;text-align:center!important}
#paginaDespedida #despedidaTitulo{margin:0 0 .8rem!important;color:#000!important;font-family:var(--fuga-btn-font,Montserrat,Arial,sans-serif)!important;font-size:clamp(1.3rem,6vw,1.8rem)!important;font-weight:900!important;line-height:1.1!important}
#paginaDespedida .despedida-card p,#paginaDespedida #despedidaDesafio{margin:.38rem 0!important;color:#000!important;font-family:var(--fuga-btn-font,Montserrat,Arial,sans-serif)!important;font-size:clamp(.92rem,4vw,1.12rem)!important;font-weight:700!important;line-height:1.3!important}
/* A conclusão continua ligada à despedida: sem régua a separá-la do texto. */
#paginaDespedida #despedidaDesafio{border-top:0!important;padding-top:0!important}
#paginaDespedida #googleReviewBtn,#paginaDespedida #btnGift,#paginaDespedida #btnVoltarDiploma,#paginaDespedida #btnExit{position:relative!important;inset:auto!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;color:#000!important;background:#fff!important;border:2px solid #000!important;border-radius:18px!important;box-shadow:none!important;font-family:Montserrat,Arial,sans-serif!important;font-weight:900!important;line-height:1!important;text-decoration:none!important;text-shadow:none!important}
#paginaDespedida #googleReviewBtn{order:2!important;width:100%!important;min-height:112px!important;margin-top:auto!important;padding:1rem!important;font-size:clamp(1.45rem,7vw,2.15rem)!important}
#paginaDespedida #btnGift{order:3!important;width:100%!important;min-height:112px!important;margin-top:1rem!important;padding:1rem!important;font-size:clamp(1.45rem,7vw,2.15rem)!important}
#paginaDespedida #btnVoltarDiploma{order:4!important;align-self:flex-start!important;width:clamp(88px,24vw,132px)!important;min-width:0!important;min-height:82px!important;margin-top:1rem!important;padding:.65rem!important;font-size:0!important}
#paginaDespedida #btnVoltarDiploma::after{content:"‹"!important;display:block!important;color:#000!important;font-family:Arial,sans-serif!important;font-size:clamp(3rem,12vw,4.6rem)!important;font-weight:400!important;line-height:.65!important;text-shadow:none!important}
#paginaDespedida #btnExit{order:5!important;align-self:flex-end!important;width:calc(100% - clamp(100px,27vw,148px))!important;min-height:82px!important;margin-top:-82px!important;padding:.65rem 1rem!important;font-size:clamp(1.35rem,6vw,2rem)!important}

/* Ações finais: a mesma escala compacta dos comandos de desafio. */
#paginaDespedida #googleReviewBtn,#paginaDespedida #btnGift{
  min-height:clamp(46px,7svh,58px)!important;
  padding:.35rem .65rem!important;
  font-size:clamp(1rem,4.8vw,1.35rem)!important;
}
#paginaDespedida #btnGift{margin-top:.75rem!important}

/* Retroceder e Sair recebem exatamente a métrica das ações principais. */
#paginaDespedida #btnVoltarDiploma,
#paginaDespedida #btnExit{
  width:calc(50% - .4rem)!important;
  min-height:clamp(46px,7svh,58px)!important;
  height:clamp(46px,7svh,58px)!important;
  margin-top:.75rem!important;
  padding:.35rem .65rem!important;
  border-radius:14px!important;
  font-size:clamp(1rem,4.8vw,1.35rem)!important;
}
#paginaDespedida #btnVoltarDiploma{align-self:flex-start!important;font-size:0!important}
#paginaDespedida #btnVoltarDiploma::after{font-size:clamp(2.4rem,9vw,3.5rem)!important}
#paginaDespedida #btnExit{align-self:flex-end!important;margin-top:calc(-1 * clamp(46px,7svh,58px))!important}

/* A mesma régua do Review aplica-se também à navegação inferior. */
#paginaDespedida #btnVoltarDiploma,#paginaDespedida #btnExit{
  min-height:clamp(46px,7svh,58px)!important;
  height:clamp(46px,7svh,58px)!important;
  font-family:Montserrat,Arial,sans-serif!important;
  font-weight:900!important;
}
#paginaDespedida #btnExit{margin-top:-76px!important}

/* A seta ganha legenda: regressar ao Manifestum passa a ser inequívoco. */
#paginaDespedida #btnVoltarDiploma{
  font-size:clamp(1.08rem,5vw,1.55rem)!important;
}
#paginaDespedida #btnVoltarDiploma::after{content:none!important;display:none!important;}

/* A saída usa a mesma porta móvel que Ranking e Manifestum. */
html body #paginaDespedida.container.page-balance{
  width:var(--game-safe-width)!important;
  max-width:var(--game-safe-width)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Cabo de aço dos últimos dois comandos: a altura e a metade disponível são
   calculadas uma vez só. Assim «‹ VOLTAR» e «SAIR» ficam rigorosamente na
   mesma linha, independentemente da altura/escala do telemóvel. */
#paginaDespedida{
  --despedida-nav-h:clamp(46px,7svh,58px);
  --despedida-nav-gap:.75rem;
}
#paginaDespedida #btnVoltarDiploma,
#paginaDespedida #btnExit{
  flex:0 0 calc((100% - var(--despedida-nav-gap)) / 2)!important;
  width:calc((100% - var(--despedida-nav-gap)) / 2)!important;
  min-width:0!important;
  height:var(--despedida-nav-h)!important;
  min-height:var(--despedida-nav-h)!important;
  max-height:var(--despedida-nav-h)!important;
  box-sizing:border-box!important;
}
#paginaDespedida #btnVoltarDiploma{
  margin-top:var(--despedida-nav-gap)!important;
}
#paginaDespedida #btnExit{
  margin-top:calc(-1 * var(--despedida-nav-h))!important;
}

/* Lei universal da despedida: todas as ações ocupam uma linha real do fluxo.
   Em qualquer altura de ecrã, a página pode deslizar em vez de sobrepor portas. */
html body #paginaDespedida.container.page-balance{
  display:flex!important;
  flex-direction:column!important;
  height:auto!important;
  min-height:100vh!important;
  min-height:100dvh!important;
  max-height:none!important;
  overflow:visible!important;
}
html body #paginaDespedida .despedida-actions{
  order:2!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-areas:"review review" "gift gift" "back exit"!important;
  gap:clamp(.55rem,1.5svh,.8rem)!important;
  width:100%!important;
  margin:auto 0 0!important;
  padding:0 0 env(safe-area-inset-bottom)!important;
}
html body #paginaDespedida .despedida-actions > *{
  position:static!important;
  inset:auto!important;
  order:initial!important;
  align-self:auto!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:clamp(46px,7svh,58px)!important;
  max-height:none!important;
  margin:0!important;
  padding:.35rem .65rem!important;
  transform:none!important;
  box-sizing:border-box!important;
}
html body #paginaDespedida #googleReviewBtn{grid-area:review!important}
html body #paginaDespedida #btnGift{grid-area:gift!important}
html body #paginaDespedida #btnVoltarDiploma{grid-area:back!important}
html body #paginaDespedida #btnExit{grid-area:exit!important}

/* As regras antigas usavam dois IDs e ainda encolhiam a última linha em
   alguns navegadores. Esta regra tem a mesma força e fixa as quatro portas
   à grelha comum, sem margens ou dimensões herdadas. */
html body #paginaDespedida .despedida-actions #googleReviewBtn,
html body #paginaDespedida .despedida-actions #btnGift,
html body #paginaDespedida .despedida-actions #btnVoltarDiploma,
html body #paginaDespedida .despedida-actions #btnExit{
  position:static!important;
  inset:auto!important;
  width:100%!important;
  min-width:0!important;
  height:auto!important;
  min-height:clamp(46px,7svh,58px)!important;
  max-height:none!important;
  margin:0!important;
  align-self:stretch!important;
  flex:none!important;
  transform:none!important;
}
