/* Pré-lançamento da nova equipe: página única, escura, com o mar ao fundo quase invisível. */

@property --ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  color-scheme: dark;
  --fundo: #04060b;
  --tinta: #f5f5f7;
  --tinta-2: #a1a1a6;
  --borda: rgba(255, 255, 255, 0.08);
  --borda-2: rgba(255, 255, 255, 0.14);
  --vidro: rgba(16, 19, 27, 0.55);
  --amarelo: #ffd60a;
  --rosa: #ff375f;
  --azul: #0a84ff;
  --ciano: #64d2ff;
  --laranja: #ff9f0a;
  --verde: #30d158;
  --roxo: #bf5af2;
  --mola: cubic-bezier(0.32, 0.72, 0, 1);
  --pula: cubic-bezier(0.34, 1.56, 0.64, 1);
  --topo: env(safe-area-inset-top, 0px);
  --base: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--fundo);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--fundo);
  color: var(--tinta);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Fundo de reserva (sem WebGL): escuro com um brilho azul embaixo, como o mar ao longe. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 55% at 50% 112%, rgba(10, 70, 140, 0.38), transparent 62%),
    linear-gradient(180deg, #04060b 0%, #050810 55%, #061224 100%);
}

::selection {
  background: rgba(100, 210, 255, 0.35);
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid rgba(100, 210, 255, 0.85);
  outline-offset: 3px;
}

/* ---------- Fundo ---------- */

#mar {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 2.4s ease;
  pointer-events: none;
}
#mar.vis {
  opacity: 0.28;
}
.sem-gl #mar {
  display: none;
}

.veu {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 38%, transparent 35%, rgba(2, 3, 6, 0.78) 100%);
}
.veu::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#confete {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- HUD ---------- */

.hud {
  position: fixed;
  z-index: 20;
  top: calc(var(--topo) + 10px);
  left: 0;
  right: 0;
  padding: 0 12px;
  pointer-events: none;
}
.hud-in {
  pointer-events: auto;
  position: relative;
  max-width: 1100px;
  height: 52px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 6px 0 14px;
  border-radius: 18px;
  background: rgba(12, 14, 20, 0.55);
  border: 1px solid var(--borda);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.marca {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.emblema {
  width: 28px;
  height: 28px;
  flex: none;
}
.marca-nome {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 400px) {
  .marca-nome {
    display: none;
  }
}
.hud-dir {
  display: flex;
  align-items: center;
  gap: 4px;
}
.placar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 12px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--borda);
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.placar.bate {
  animation: bate 0.5s var(--pula);
}
.nivel {
  display: inline-flex;
  gap: 4px;
  color: var(--tinta-2);
}
.nivel b {
  color: var(--tinta);
}
.nivel.sobe {
  animation: sobe 0.6s var(--pula);
}
.xp {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--amarelo);
}
.xp svg {
  width: 16px;
  height: 16px;
}
.hud-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--tinta-2);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, color 0.2s;
}
.hud-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--tinta);
}
.hud-btn svg {
  width: 20px;
  height: 20px;
}
.hud-btn[aria-pressed="true"] {
  color: var(--ciano);
}
.hud-xp {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
}
.hud-xp i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ciano), var(--azul), var(--amarelo));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.9s var(--mola);
}

/* ---------- Trilha das missões ---------- */

/* Fica fora do main de propósito: o main é uma camada abaixo do topo de vidro,
   e no computador a trilha precisa ficar por cima dele. */
.trilha {
  position: absolute;
  z-index: 3;
  top: calc(var(--topo) + 80px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  width: calc(100% - 32px);
  max-width: 340px;
}
.trilha:not([hidden]) + main {
  padding-top: calc(var(--topo) + 148px);
}
.trilha[hidden] {
  display: none;
}
.no {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--borda-2);
  color: rgba(245, 245, 247, 0.4);
  transition: background 0.4s, border-color 0.4s, color 0.4s, box-shadow 0.4s;
}
.no svg {
  width: 20px;
  height: 20px;
}
.no.atual {
  border-color: rgba(100, 210, 255, 0.7);
  color: var(--ciano);
  box-shadow: 0 0 0 4px rgba(100, 210, 255, 0.12);
}
.no.atual::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 2px solid rgba(100, 210, 255, 0.6);
  animation: radar 1.8s var(--mola) infinite;
}
.no.feito {
  background: var(--amarelo);
  border-color: var(--amarelo);
  color: #1d1d1f;
  box-shadow: 0 0 18px rgba(255, 214, 10, 0.35);
}
.no.estoura {
  animation: estoura 0.6s var(--pula);
}
.trofeu.feito {
  box-shadow: 0 0 0 4px rgba(255, 214, 10, 0.2), 0 0 30px rgba(255, 214, 10, 0.6);
}
.liga {
  flex: 1;
  height: 3px;
  margin: 0 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.liga i {
  display: block;
  height: 100%;
  background: var(--amarelo);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.6s var(--mola) 0.1s;
}
.liga.cheia i {
  transform: scaleX(1);
}

/* ---------- Palco e telas ---------- */

main {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--topo) + 80px) 16px calc(var(--base) + 32px);
}
#palco {
  flex: 1;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
}
#palco.tela-confissao {
  max-width: 900px;
}
.tela {
  width: 100%;
  margin: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.tela.intro {
  margin: auto 0;
}
.tela.sai {
  animation: sai 0.2s var(--mola) forwards;
}
.anim {
  animation: entra 0.7s var(--mola) backwards;
  animation-delay: calc(var(--i, 0) * 65ms + 40ms);
}
.parado .anim,
.parado .pal,
.parado .stat-barra i {
  animation: none;
}
.parado .pal.brilho {
  animation: brilho 6s linear infinite;
}

h1 {
  font-size: clamp(38px, 10.5vw, 64px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(28px, 7.4vw, 42px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
  outline: none;
}
h1:focus,
h2:focus {
  outline: none;
}
.sub {
  max-width: 30em;
  font-size: 17px;
  line-height: 1.5;
  color: var(--tinta-2);
  text-wrap: pretty;
}
.pre {
  font-size: 17px;
  font-weight: 600;
  color: var(--ciano);
}

/* ---------- Abertura ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--borda-2);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  font-weight: 600;
  font-size: 15px;
}
.ponto {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--verde);
  animation: pulso 1.8s ease-out infinite;
}
.pal {
  display: inline-block;
  animation: palavra 0.8s var(--mola) backwards;
  animation-delay: calc(var(--w, 0) * 70ms + 120ms);
}
.pal.brilho {
  padding-bottom: 0.06em;
  background: linear-gradient(90deg, var(--ciano), var(--azul), var(--amarelo), var(--azul), var(--ciano));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: palavra 0.8s var(--mola) backwards, brilho 6s linear infinite;
  animation-delay: calc(var(--w, 0) * 70ms + 120ms), 1.4s;
}
.rotulo {
  font-weight: 600;
  font-size: 15px;
  color: var(--tinta-2);
  margin-bottom: -8px;
}
.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 420px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--borda);
  text-align: left;
}
.tile-ico {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(100, 210, 255, 0.12);
  color: var(--ciano);
}
.tile-ico svg {
  width: 22px;
  height: 22px;
}
.tile-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.tile-nome {
  font-weight: 700;
  font-size: 15px;
}
.tile-xp {
  font-weight: 700;
  font-size: 15px;
  color: var(--amarelo);
}
.meta {
  font-size: 15px;
  color: var(--tinta-2);
}

/* ---------- Botões ---------- */

.btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 28px;
  border: 0;
  border-radius: 980px;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--mola), box-shadow 0.3s, background 0.3s, border-color 0.3s, color 0.3s;
}
.btn:active {
  transform: scale(0.97);
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.btn-p {
  background: var(--amarelo);
  color: #1d1d1f;
  box-shadow: 0 10px 40px rgba(255, 214, 10, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-p:hover {
  box-shadow: 0 14px 50px rgba(255, 214, 10, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-p::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: varre 3.2s var(--mola) 1.5s infinite;
  pointer-events: none;
}
.btn-s {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--borda-2);
  color: var(--tinta);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.btn-s:hover {
  background: rgba(255, 255, 255, 0.12);
}
.btn-s.ok {
  background: rgba(48, 209, 88, 0.16);
  border-color: rgba(48, 209, 88, 0.5);
  color: #7ef0a0;
}
.btn[aria-busy="true"] {
  cursor: progress;
}
.chip-xp {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  border-radius: 980px;
  background: rgba(29, 29, 31, 0.12);
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}
.chip-xp svg {
  width: 15px;
  height: 15px;
}
/* Celular estreito: menos respiro nas laterais para o texto do botão caber numa linha só. */
@media (max-width: 400px) {
  .btn {
    padding: 0 20px;
    gap: 8px;
  }
}
.gira {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 2.5px solid rgba(29, 29, 31, 0.25);
  border-top-color: #1d1d1f;
  animation: gira 0.8s linear infinite;
}

/* ---------- Cabeçalho da missão e campos ---------- */

.cabeca {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.voltar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 0 14px 0 8px;
  border-radius: 980px;
  border: 1px solid var(--borda);
  background: rgba(255, 255, 255, 0.06);
  color: var(--tinta-2);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, background 0.2s;
}
.voltar:hover {
  color: var(--tinta);
  background: rgba(255, 255, 255, 0.1);
}
.voltar svg {
  width: 18px;
  height: 18px;
}
.premio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 980px;
  background: rgba(255, 214, 10, 0.12);
  border: 1px solid rgba(255, 214, 10, 0.35);
  color: var(--amarelo);
  font-weight: 800;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.premio svg {
  width: 15px;
  height: 15px;
}
.premio.ganho {
  background: rgba(48, 209, 88, 0.12);
  border-color: rgba(48, 209, 88, 0.4);
  color: #6ee79a;
}
.tag {
  font-weight: 700;
  font-size: 15px;
  color: var(--ciano);
  margin-bottom: -6px;
}
.linha {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.campo {
  position: relative;
  width: 100%;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--borda-2);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.campo:focus-within {
  border-color: rgba(100, 210, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(100, 210, 255, 0.15), 0 10px 40px rgba(10, 132, 255, 0.2);
}
.campo input {
  display: block;
  width: 100%;
  height: 64px;
  margin: 0;
  padding: 0 48px;
  border: 0;
  border-radius: inherit;
  outline: none;
  background: transparent;
  color: var(--tinta);
  font: 600 22px/1.2 Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  letter-spacing: -0.01em;
  text-align: center;
  caret-color: var(--amarelo);
  -webkit-appearance: none;
  appearance: none;
}
.campo input::placeholder {
  color: rgba(245, 245, 247, 0.32);
}
.campo input:-webkit-autofill,
.campo input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--tinta);
  transition: background-color 600000s 0s, color 600000s 0s;
}
.campo.erro {
  border-color: rgba(255, 55, 95, 0.7);
  box-shadow: 0 0 0 4px rgba(255, 55, 95, 0.15);
  animation: treme 0.45s var(--mola);
}
.pronto {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--verde);
  color: #04210d;
  transform: scale(0);
  transition: transform 0.35s var(--pula);
  pointer-events: none;
}
.pronto svg {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}
.campo.valido .pronto {
  transform: scale(1);
}
.campo.tel input {
  text-align: left;
  padding-left: 88px;
}
.ddi {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 22px;
  color: var(--tinta-2);
  pointer-events: none;
}
.ddi::after {
  content: "";
  width: 1px;
  height: 26px;
  background: var(--borda-2);
}
.erro-txt {
  font-size: 15px;
  line-height: 1.4;
  color: #ff6b86;
}
.erro-txt[hidden] {
  display: none;
}
.aceite {
  max-width: 420px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--tinta-2);
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Avatar e brasão ---------- */

.avatar {
  position: relative;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
}
.avatar::before,
.avatar::after {
  content: "";
  position: absolute;
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}
.avatar::before {
  inset: 0;
  background: conic-gradient(from var(--ang), var(--ciano), var(--azul), var(--amarelo), var(--ciano));
  animation: roda 4s linear infinite;
}
.avatar::after {
  inset: 4px;
  background: radial-gradient(circle at 50% 30%, #1b2233, #0b0e15 70%);
}
.avatar b {
  position: relative;
  z-index: 1;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.avatar.troca {
  animation: troca 0.4s var(--pula);
}
.avatar.peq {
  width: 60px;
  height: 60px;
  flex: none;
}
.avatar.peq::after {
  inset: 3px;
}
.avatar.peq b {
  font-size: 21px;
}
.brasao-vivo {
  width: 112px;
  height: 118px;
  display: grid;
  place-items: center;
}
.brasao-vivo svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 30px rgba(10, 132, 255, 0.35));
}
.brasao-vivo.forja svg {
  animation: forja 0.5s var(--pula);
}

/* ---------- Confissão ---------- */

.cartas {
  width: 100%;
  display: grid;
  gap: 12px;
  margin-top: 4px;
}
.carta {
  --rx: 0deg;
  --ry: 0deg;
  --y: 0px;
  --s: 1;
  --mx: 50%;
  --my: 50%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--borda-2);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: var(--tinta);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform: perspective(900px) translateY(var(--y)) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--s));
  transition: transform 0.3s var(--mola), border-color 0.3s, box-shadow 0.3s, opacity 0.3s, background 0.3s;
}
.carta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.1), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
@media (hover: hover) {
  .carta:hover {
    --y: -4px;
    border-color: color-mix(in srgb, var(--cor) 60%, transparent);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  }
  .carta:hover::before {
    opacity: 1;
  }
}
.carta:active {
  --s: 0.98;
}
.carta.escolhida {
  border-color: var(--rosa);
  background: rgba(255, 55, 95, 0.08);
  box-shadow: 0 0 0 1px var(--rosa), 0 20px 60px rgba(255, 55, 95, 0.3);
}
.carta.outra {
  opacity: 0.42;
  --s: 0.97;
}
.carta-topo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.carta-ico {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--cor);
  background: rgba(255, 255, 255, 0.06);
  background: color-mix(in srgb, var(--cor) 16%, transparent);
}
.carta-ico svg {
  width: 24px;
  height: 24px;
}
.carta-nome {
  flex: 1;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.tecla {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--borda-2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--tinta-2);
  font: 700 15px Inter, system-ui, sans-serif;
}
.carta.escolhida .tecla {
  visibility: hidden;
}
@media (pointer: coarse) {
  .tecla {
    display: none;
  }
}
.carta-frase {
  font-size: 15px;
  line-height: 1.45;
  color: var(--tinta-2);
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.stat-linha {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 15px;
  color: var(--tinta-2);
}
.stat-linha b {
  color: var(--tinta);
  font-variant-numeric: tabular-nums;
}
.stat,
.stat-barra {
  display: block;
}
.stat-barra {
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.stat-barra i {
  display: block;
  height: 100%;
  width: calc(var(--v) * 1%);
  border-radius: inherit;
  transform-origin: left;
  animation: enche 1.1s var(--mola) backwards;
  animation-delay: calc(var(--i, 0) * 65ms + 380ms);
}
.stat-barra .alta {
  background: linear-gradient(90deg, var(--ciano), var(--azul));
}
.stat-barra .baixa {
  background: var(--rosa);
}
.carimbo {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 12px;
  border: 3px solid var(--rosa);
  border-radius: 10px;
  background: rgba(4, 6, 11, 0.6);
  color: var(--rosa);
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-14deg);
  animation: carimba 0.45s var(--pula) both;
  pointer-events: none;
}
.carimbo.fixo {
  animation: none;
}
/* Celular: ícone à esquerda, nome e frase ao lado. Assim as três cartas cabem numa tela. */
@media (max-width: 759.98px) {
  .cartas {
    gap: 10px;
  }
  .carta {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "ico nome tecla" "ico frase frase" "stats stats stats";
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
    padding: 14px;
  }
  .carta-topo {
    display: contents;
  }
  .carta-ico {
    grid-area: ico;
    align-self: start;
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }
  .carta-ico svg {
    width: 22px;
    height: 22px;
  }
  .carta-nome {
    grid-area: nome;
    font-size: 20px;
  }
  .carta .tecla {
    grid-area: tecla;
  }
  .carta-frase {
    grid-area: frase;
    line-height: 1.35;
  }
  .stats {
    grid-area: stats;
    margin-top: 10px;
  }
}
@media (min-width: 760px) {
  .cartas {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .carta {
    padding: 20px;
    gap: 14px;
  }
  .stats {
    grid-template-columns: 1fr;
    margin-top: auto;
  }
}

/* ---------- Chamado (WhatsApp) ---------- */

.notif {
  width: 100%;
  max-width: 420px;
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 20px;
  text-align: left;
  background: rgba(40, 42, 48, 0.55);
  border: 1px solid var(--borda-2);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}
.notif-app {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #0d1018;
}
.notif-app .emblema {
  width: 26px;
  height: 26px;
}
.notif-corpo {
  flex: 1;
  min-width: 0;
}
.notif-topo {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
}
.notif-topo span {
  color: var(--tinta-2);
}
.notif-msg {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.4;
}

/* ---------- Final ---------- */

.status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.status-rot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--tinta-2);
  transition: color 0.3s;
}
.status-rot.ok {
  color: var(--verde);
}
.status-rot svg {
  width: 18px;
  height: 18px;
}
.palavra {
  position: relative;
  display: inline-block;
  font-weight: 900;
  font-size: clamp(44px, 13.5vw, 84px);
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}
.palavra.velha {
  color: var(--rosa);
}
.palavra.velha::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  top: 50%;
  height: 0.09em;
  border-radius: 0.05em;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--mola);
}
.palavra.riscada::after {
  transform: scaleX(1);
}
.palavra.mexe {
  color: var(--tinta);
}
.palavra.nova {
  color: var(--amarelo);
  text-shadow: 0 0 30px rgba(255, 214, 10, 0.45);
  animation: vitoria 0.7s var(--pula) both, respira 3s ease-in-out 0.7s infinite;
}
.parado .palavra.nova {
  animation: respira 3s ease-in-out infinite;
}
.ok-bola {
  display: inline-grid;
  place-items: center;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.25em;
  vertical-align: -0.14em;
  border-radius: 50%;
  background: var(--verde);
  color: #04210d;
}
.ok-bola svg {
  width: 0.62em;
  height: 0.62em;
  stroke-width: 3.2;
}
.cartao {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  padding: 18px;
  border-radius: 24px;
  text-align: left;
  background: linear-gradient(160deg, rgba(30, 36, 52, 0.92), rgba(10, 12, 18, 0.92));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(10, 132, 255, 0.15);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.3s var(--mola);
}
.cartao::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--ciano), var(--azul) 35%, var(--amarelo) 65%, var(--rosa));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.holo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(100, 210, 255, 0.18) 42%, rgba(255, 214, 10, 0.16) 50%, rgba(255, 55, 95, 0.14) 58%, transparent 70%);
  background-size: 250% 100%;
  mix-blend-mode: screen;
  animation: holo 5s linear infinite;
}
.cartao > :not(.holo) {
  position: relative;
  z-index: 1;
}
.cartao-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
}
.marca-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.marca-mini .emblema {
  width: 24px;
  height: 24px;
}
.cartao-num {
  color: var(--amarelo);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cartao-meio {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
}
.cartao-nome {
  font-weight: 800;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.selo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 980px;
  background: rgba(255, 214, 10, 0.14);
  color: var(--amarelo);
  font-weight: 800;
  font-size: 15px;
}
.selo svg {
  width: 14px;
  height: 14px;
}
.cartao-origem {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 15px;
  color: var(--tinta-2);
}
.cartao-origem .brasao {
  width: 28px;
  height: 30px;
  flex: none;
}
.cartao-origem span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cartao-origem b {
  color: var(--tinta);
}
.cartao-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  text-align: center;
}
.cartao-stats div {
  padding: 10px 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}
.cartao-stats b {
  display: block;
  font-weight: 800;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}
.cartao-stats span {
  font-size: 15px;
  color: var(--tinta-2);
}
.acoes {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 10px;
}
@media (min-width: 480px) {
  .acoes {
    grid-template-columns: 1fr 1fr;
  }
  .acoes .btn {
    padding: 0 12px;
    font-size: 16px;
    white-space: nowrap;
  }
}

/* ---------- Conquistas, XP voando e orbes ---------- */

.toasts {
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(var(--topo) + 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}
.toast {
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 20px;
  background: rgba(28, 30, 36, 0.86);
  border: 1px solid rgba(255, 214, 10, 0.3);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 214, 10, 0.12);
  animation: toast-entra 0.5s var(--pula) both;
}
.toast.sai {
  animation: toast-sai 0.36s var(--mola) forwards;
}
.toast-ico {
  position: relative;
  overflow: hidden;
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffe55c, #ffb800);
  color: #3a2a00;
}
.toast-ico::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.7) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: varre 1.4s var(--mola) 0.3s;
}
.toast-ico svg {
  width: 24px;
  height: 24px;
}
.toast-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}
.toast-cab {
  font-weight: 700;
  font-size: 15px;
  color: var(--amarelo);
}
.toast strong {
  font-weight: 800;
  font-size: 17px;
  line-height: 1.25;
}
.toast-desc {
  font-size: 15px;
  color: var(--tinta-2);
}
.xpvoa {
  position: fixed;
  z-index: 45;
  pointer-events: none;
  font-weight: 800;
  font-size: 22px;
  color: var(--amarelo);
  text-shadow: 0 0 20px rgba(255, 214, 10, 0.6);
  white-space: nowrap;
  animation: voa 1.2s var(--mola) forwards;
}
.orbe {
  position: fixed;
  z-index: 45;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #fff 0 20%, var(--amarelo) 45%, rgba(255, 214, 10, 0) 72%);
  box-shadow: 0 0 14px var(--amarelo);
}

.sem-js {
  position: relative;
  z-index: 3;
  max-width: 420px;
  margin: 40vh auto 0;
  padding: 0 16px;
  text-align: center;
  font-size: 17px;
}

/* ---------- Computador ---------- */

@media (min-width: 900px) {
  .trilha {
    position: fixed;
    z-index: 21;
    top: calc(var(--topo) + 36px);
    left: 50%;
    width: 340px;
    transform: translate(-50%, -50%);
  }
  .no {
    width: 36px;
    height: 36px;
  }
  .no svg {
    width: 18px;
    height: 18px;
  }
  main,
  .trilha:not([hidden]) + main {
    padding-top: calc(var(--topo) + 96px);
  }
  .tela {
    margin: auto 0;
  }
  .toasts {
    top: calc(var(--topo) + 76px);
  }
}

/* ---------- Animações ---------- */

@keyframes entra {
  from {
    opacity: 0;
    transform: translateX(calc(var(--dir, 1) * 28px)) translateY(10px) scale(0.98);
    filter: blur(6px);
  }
}
@keyframes sai {
  to {
    opacity: 0;
    transform: translateX(calc(var(--dir, 1) * -24px));
    filter: blur(4px);
  }
}
@keyframes palavra {
  from {
    opacity: 0;
    transform: translateY(0.45em) rotate(2deg);
    filter: blur(8px);
  }
}
@keyframes brilho {
  to {
    background-position: 200% center;
  }
}
@keyframes pulso {
  0% {
    box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.6);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(48, 209, 88, 0);
  }
}
@keyframes varre {
  0% {
    transform: translateX(-120%);
  }
  40%,
  100% {
    transform: translateX(120%);
  }
}
@keyframes radar {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}
@keyframes estoura {
  40% {
    transform: scale(1.35);
  }
}
@keyframes bate {
  40% {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(255, 214, 10, 0.18), 0 0 24px rgba(255, 214, 10, 0.35);
  }
}
@keyframes sobe {
  40% {
    transform: scale(1.3);
    color: var(--amarelo);
  }
}
@keyframes treme {
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(9px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(4px);
  }
}
@keyframes troca {
  40% {
    transform: scale(0.86);
  }
}
@keyframes forja {
  35% {
    transform: scale(0.88) rotate(-4deg);
    filter: brightness(1.6) drop-shadow(0 10px 30px rgba(10, 132, 255, 0.35));
  }
}
@keyframes roda {
  to {
    --ang: 360deg;
  }
}
@keyframes gira {
  to {
    transform: rotate(360deg);
  }
}
@keyframes enche {
  from {
    transform: scaleX(0);
  }
}
@keyframes carimba {
  0% {
    opacity: 0;
    transform: rotate(-14deg) scale(2.4);
  }
  60% {
    opacity: 1;
    transform: rotate(-14deg) scale(0.9);
  }
  100% {
    transform: rotate(-14deg) scale(1);
  }
}
@keyframes vitoria {
  0% {
    opacity: 0;
    transform: scale(0.4);
    filter: blur(10px);
  }
  60% {
    opacity: 1;
    transform: scale(1.12);
    filter: none;
  }
  100% {
    transform: scale(1);
  }
}
@keyframes respira {
  0%,
  100% {
    text-shadow: 0 0 24px rgba(255, 214, 10, 0.35);
  }
  50% {
    text-shadow: 0 0 46px rgba(255, 214, 10, 0.7);
  }
}
@keyframes holo {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}
@keyframes toast-entra {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.94);
  }
}
@keyframes toast-sai {
  to {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
}
@keyframes voa {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.7);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -80%) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -260%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
