/* =========================================================================
   DR ABC 2026 · Fábrica dos Sonhos — Plataforma de Jogos
   Design system: "Steampunk Celestial" (navy + ouro + creme + carmim)
   ========================================================================= */

/* ------------------------------- tokens ------------------------------- */
:root {
  --navy-950: #04091b;
  --navy-900: #071026;
  --navy-850: #0a1533;
  --navy-800: #0d1c42;
  --navy-700: #142a5e;
  --navy-600: #1c3777;

  --gold-050: #fdf6e6;
  --gold-100: #f9e8c4;
  --gold-200: #f2d79b;
  --gold-300: #e8c179;
  --gold-400: #dcab55;
  --gold-500: #cf9a3f;
  --gold-600: #b07d2a;
  --gold-700: #8b5f1d;

  --cream: #fcf5e6;
  --crimson: #c01a45;
  --crimson-dark: #8f0f31;
  --teal: #1aa3ac;
  --teal-dark: #0d737b;

  --ok: #3ecf8e;
  --warn: #f0b429;
  --err: #ec5a6b;

  --fonte-titulo: "Cinzel", "Playfair Display", Georgia, serif;
  --fonte-corpo: "Outfit", "Segoe UI", system-ui, sans-serif;
  --fonte-italico: "Playfair Display", Georgia, serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 34px;
  --r-full: 999px;

  --sombra-1: 0 2px 8px rgba(2, 6, 20, .35);
  --sombra-2: 0 10px 30px -8px rgba(2, 6, 20, .65);
  --sombra-3: 0 26px 70px -20px rgba(2, 6, 20, .85);
  --brilho-ouro: 0 0 0 1px rgba(232, 193, 121, .35), 0 0 28px -6px rgba(232, 193, 121, .45);

  --max: 1180px;
  --header-h: 68px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--fonte-corpo);
  font-weight: 400;
  color: var(--cream);
  background: var(--navy-950);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--gold-200); }
h1, h2, h3, h4 { font-family: var(--fonte-titulo); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: .01em; }
p { margin: 0 0 .8em; }
::selection { background: var(--gold-300); color: var(--navy-900); }

/* tamanho padrão dos ícones inline (especificidade zero: qualquer regra vence) */
:where(svg.icone) { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.16em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------- atmosfera ------------------------------- */
.atmosfera {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -10%, #1b3a7e 0%, transparent 62%),
    radial-gradient(900px 600px at 8% 8%, rgba(26, 163, 172, .22) 0%, transparent 60%),
    radial-gradient(900px 700px at 92% 20%, rgba(192, 26, 69, .2) 0%, transparent 62%),
    linear-gradient(180deg, #0a1533 0%, #04091b 45%, #050d21 100%);
}

.atmosfera::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 20% 22%, rgba(255, 245, 220, .85), transparent),
    radial-gradient(1.4px 1.4px at 76% 14%, rgba(255, 245, 220, .7), transparent),
    radial-gradient(1.8px 1.8px at 44% 62%, rgba(255, 235, 190, .55), transparent),
    radial-gradient(1.2px 1.2px at 88% 72%, rgba(255, 245, 220, .65), transparent),
    radial-gradient(1.5px 1.5px at 12% 82%, rgba(255, 245, 220, .5), transparent),
    radial-gradient(1.3px 1.3px at 62% 34%, rgba(255, 245, 220, .6), transparent),
    radial-gradient(1.1px 1.1px at 34% 8%, rgba(255, 245, 220, .5), transparent),
    radial-gradient(1.6px 1.6px at 70% 90%, rgba(255, 235, 190, .4), transparent);
  opacity: .8;
  animation: cintilar 7s ease-in-out infinite alternate;
}

@keyframes cintilar {
  from { opacity: .45; }
  to { opacity: .95; }
}

/* poeira dourada (canvas injetado pelo JS) */
#poeira {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .55;
}

.grao {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------ layout -------------------------------- */
.app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.wrap--estreito { width: min(100% - 2rem, 760px); }

/* ------------------------------- header ------------------------------- */
.topo {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(12px, 3vw, 26px);
  background: linear-gradient(180deg, rgba(6, 13, 34, .94), rgba(6, 13, 34, .62));
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(232, 193, 121, .18);
}

.topo__marcas {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 18px);
  min-width: 0;
}

.topo__escola { height: 30px; width: auto; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .5)); }
.topo__combo { height: 30px; width: auto; }

.topo__div {
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, rgba(232, 193, 121, .55), transparent);
}

.topo__voltar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border-radius: var(--r-full);
  border: 1px solid rgba(232, 193, 121, .28);
  background: rgba(255, 255, 255, .04);
  color: var(--gold-100);
  font-size: .86rem;
  font-weight: 500;
  transition: .25s var(--ease);
  white-space: nowrap;
}
.topo__voltar:hover { background: rgba(232, 193, 121, .14); border-color: rgba(232, 193, 121, .6); transform: translateX(-2px); }
.topo__voltar svg { width: 15px; height: 15px; }

.topo__dir { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.pilula-moeda {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px 6px 8px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, rgba(232, 193, 121, .2), rgba(232, 193, 121, .06));
  border: 1px solid rgba(232, 193, 121, .4);
  font-weight: 600;
  font-size: .85rem;
  color: var(--gold-100);
  font-variant-numeric: tabular-nums;
}
.pilula-moeda img, .pilula-moeda svg { width: 18px; height: 18px; }

.avatar-topo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(232, 193, 121, .75);
  background: var(--navy-700);
  box-shadow: 0 0 18px -4px rgba(232, 193, 121, .65);
}

/* ------------------------------ tipografia ---------------------------- */
.titulo-secao {
  font-size: clamp(1.35rem, 3.6vw, 2rem);
  color: var(--gold-100);
}
.titulo-secao small {
  display: block;
  font-family: var(--fonte-corpo);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 8px;
}

.texto-ouro {
  background: linear-gradient(100deg, #fdf1d0 0%, #e8c179 38%, #b07d2a 62%, #f7e2b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: ouro-correndo 9s linear infinite;
}
@keyframes ouro-correndo {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ------------------------------- botões ------------------------------- */
.btn {
  --bg: linear-gradient(135deg, #e8c179, #cf9a3f 55%, #b07d2a);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 0;
  border-radius: var(--r-full);
  background: var(--bg);
  color: #241505;
  font-family: var(--fonte-corpo);
  font-weight: 600;
  font-size: .96rem;
  letter-spacing: .01em;
  text-decoration: none;
  box-shadow: 0 10px 26px -12px rgba(232, 193, 121, .9), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), filter .2s;
  overflow: hidden;
  isolation: isolate;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
  z-index: -1;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px rgba(232, 193, 121, 1), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.btn svg { width: 19px; height: 19px; flex: none; }

.btn--fantasma {
  background: rgba(255, 255, 255, .05);
  color: var(--gold-100);
  border: 1px solid rgba(232, 193, 121, .38);
  box-shadow: none;
}
.btn--fantasma:hover { background: rgba(232, 193, 121, .14); box-shadow: 0 10px 26px -16px rgba(232, 193, 121, .8); }

.btn--escuro {
  background: linear-gradient(135deg, #142a5e, #0a1533);
  color: var(--gold-100);
  border: 1px solid rgba(232, 193, 121, .3);
  box-shadow: 0 12px 30px -18px #000;
}

.btn--grande { padding: 17px 34px; font-size: 1.05rem; }
.btn--bloco { width: 100%; }
.btn--pequeno { padding: 9px 17px; font-size: .84rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn-icone {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(232, 193, 121, .32);
  background: rgba(255, 255, 255, .05);
  color: var(--gold-100);
  transition: .22s var(--ease);
}
.btn-icone:hover { background: rgba(232, 193, 121, .16); transform: scale(1.06); }
.btn-icone svg { width: 20px; height: 20px; }
.btn-icone[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(232, 193, 121, .3), rgba(232, 193, 121, .1));
  border-color: var(--gold-400);
  color: var(--gold-050);
  box-shadow: 0 0 18px -6px rgba(232, 193, 121, .8);
}
/* botão de narração desligado fica discretamente apagado */
.btn-icone[aria-pressed="false"] { color: #8b9ac0; }

/* ------------------------------- cartões ------------------------------ */
.cartao {
  position: relative;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015)),
    linear-gradient(180deg, rgba(13, 28, 66, .92), rgba(7, 16, 38, .96));
  border: 1px solid rgba(232, 193, 121, .22);
  border-radius: var(--r-lg);
  box-shadow: var(--sombra-2), inset 0 1px 0 rgba(255, 255, 255, .07);
  padding: clamp(16px, 3vw, 26px);
}

.cartao--ouro {
  border-color: rgba(232, 193, 121, .5);
  box-shadow: var(--brilho-ouro), var(--sombra-2);
}

/* cantos ornamentados */
.canto {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(232, 193, 121, .55);
  pointer-events: none;
}
.canto--tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.canto--tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.canto--bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.canto--br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }

/* ------------------------------- HOME -------------------------------- */
.hero {
  position: relative;
  padding: clamp(28px, 6vw, 64px) 0 clamp(18px, 3vw, 30px);
  text-align: center;
}

.hero__marca {
  width: clamp(180px, 42vw, 320px);
  margin: 0 auto clamp(10px, 2vw, 18px);
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, .6));
  animation: flutuar 6s ease-in-out infinite;
}
@keyframes flutuar {
  0%, 100% { transform: translateY(0) rotate(-.4deg); }
  50% { transform: translateY(-10px) rotate(.4deg); }
}

.hero__selo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: var(--r-full);
  border: 1px solid rgba(232, 193, 121, .45);
  background: rgba(232, 193, 121, .1);
  color: var(--gold-200);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 3.5rem);
  margin-bottom: 10px;
}

.hero__sub {
  font-family: var(--fonte-italico);
  font-style: italic;
  font-size: clamp(1rem, 2.6vw, 1.28rem);
  color: #cfd8ee;
  max-width: 34ch;
  margin: 0 auto 6px;
}
.hero__sub b { color: var(--gold-200); font-style: normal; font-weight: 600; }

.hero__linha {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px auto 0;
  color: var(--gold-400);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.hero__linha::before,
.hero__linha::after {
  content: "";
  height: 1px;
  width: clamp(28px, 12vw, 90px);
  background: linear-gradient(90deg, transparent, rgba(232, 193, 121, .7));
}
.hero__linha::after { background: linear-gradient(90deg, rgba(232, 193, 121, .7), transparent); }

/* seletor de formando */
.seletor {
  padding: clamp(16px, 3vw, 30px) 0 60px;
}

.seletor__topo {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.busca {
  position: relative;
  flex: 1 1 240px;
  max-width: 330px;
}
.busca input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: var(--r-full);
  border: 1px solid rgba(232, 193, 121, .3);
  background: rgba(4, 9, 27, .6);
  color: var(--cream);
  font-family: var(--fonte-corpo);
  font-size: .92rem;
  transition: .25s;
}
.busca input::placeholder { color: #7f8db3; }
.busca input:focus { outline: none; border-color: var(--gold-400); box-shadow: 0 0 0 4px rgba(232, 193, 121, .12); }
.busca svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--gold-400); }

.grade-alunos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: clamp(10px, 1.8vw, 18px);
}

.aluno-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 10px 14px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(232, 193, 121, .18);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(232, 193, 121, .14), transparent 62%),
    linear-gradient(180deg, rgba(18, 38, 90, .7), rgba(7, 16, 38, .9));
  color: var(--cream);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  overflow: hidden;
  text-align: center;
}
.aluno-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
  pointer-events: none;
}
.aluno-card:hover,
.aluno-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(232, 193, 121, .65);
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .9), 0 0 0 1px rgba(232, 193, 121, .3);
  outline: none;
}

.aluno-card__moldura {
  position: relative;
  width: clamp(74px, 20vw, 96px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 210deg, #b07d2a, #f9e8c4 25%, #cf9a3f 50%, #fdf6e6 70%, #b07d2a);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .9);
}
.aluno-card__moldura img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--navy-800);
  object-position: center 22%;
}

.aluno-card__nome {
  font-family: var(--fonte-corpo);
  font-weight: 600;
  font-size: .88rem;
  line-height: 1.25;
  color: var(--gold-050);
  max-width: 14ch;
}
.aluno-card__nome small {
  display: block;
  font-weight: 400;
  font-size: .7rem;
  color: #8b9ac0;
  letter-spacing: .08em;
  margin-top: 3px;
  text-transform: uppercase;
}

.aluno-card__mini {
  position: absolute;
  top: 8px;
  right: 9px;
  font-size: .62rem;
  font-weight: 700;
  color: var(--gold-500);
  opacity: .9;
  letter-spacing: .06em;
}

.aluno-card--semfoto .aluno-card__moldura {
  background: conic-gradient(from 210deg, #2a3a63, #4a5c8c 40%, #2a3a63 70%, #4a5c8c);
}
.aluno-card--semfoto .aluno-card__moldura img { filter: grayscale(.3) opacity(.65); }

/* ------------------------------- HUB --------------------------------- */
.hero-aluno {
  position: relative;
  padding: clamp(22px, 4vw, 40px) 0 clamp(8px, 2vw, 16px);
  overflow: hidden;
}
.hero-aluno__brilho {
  position: absolute;
  width: 620px; height: 620px;
  left: 50%;
  top: -320px;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--cor-aluno, #e8c179) 0%, transparent 66%);
  opacity: .3;
  filter: blur(30px);
  pointer-events: none;
}

.hero-aluno__grade {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
}

.retrato {
  position: relative;
  width: clamp(112px, 26vw, 178px);
  aspect-ratio: 3 / 4;
  border-radius: 100px 100px var(--r-lg) var(--r-lg);
  overflow: hidden;
  border: 2px solid rgba(232, 193, 121, .55);
  background:
    radial-gradient(80% 60% at 50% 10%, rgba(232, 193, 121, .26), transparent 70%),
    linear-gradient(180deg, #16295c, #08122e);
  box-shadow: 0 24px 60px -26px #000, inset 0 0 40px -12px rgba(232, 193, 121, .4);
  flex: none;
}
.retrato img { width: 100%; height: 100%; object-fit: contain; object-position: bottom center; }
.retrato::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  pointer-events: none;
}

.hero-aluno__txt h1 {
  font-size: clamp(1.5rem, 5vw, 2.7rem);
  color: var(--gold-050);
  text-shadow: 0 2px 24px rgba(232, 193, 121, .25);
}
.hero-aluno__txt h1 span { display: block; }
.hero-aluno__eyebrow {
  font-size: .7rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold-500);
  font-weight: 600;
  margin-bottom: 6px;
}
.hero-aluno__frase {
  font-family: var(--fonte-italico);
  font-style: italic;
  color: #c9d3ec;
  font-size: clamp(.92rem, 2.3vw, 1.06rem);
  margin: 8px 0 14px;
  max-width: 42ch;
}

.hero-aluno__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.stat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(232, 193, 121, .22);
  font-size: .8rem;
  font-weight: 500;
  color: var(--gold-100);
}
.stat b { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.stat svg { width: 15px; height: 15px; color: var(--gold-400); }

/* trilha de progresso */
.trilha {
  margin: clamp(16px, 3vw, 26px) 0 clamp(10px, 2vw, 18px);
  padding: 14px 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(90deg, rgba(232, 193, 121, .1), rgba(255, 255, 255, .02));
  border: 1px solid rgba(232, 193, 121, .2);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.trilha__barra {
  flex: 1 1 180px;
  height: 10px;
  border-radius: var(--r-full);
  background: rgba(4, 9, 27, .7);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6);
  min-width: 120px;
}
.trilha__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #cf9a3f, #f9e8c4 60%, #e8c179);
  box-shadow: 0 0 14px rgba(232, 193, 121, .8);
  transition: width .8s var(--ease);
  background-size: 200% 100%;
  animation: ouro-correndo 4s linear infinite;
}
.trilha__txt { font-size: .82rem; color: var(--gold-200); white-space: nowrap; }
.trilha__txt b { color: #fff; }

/* grade de jogos */
.jogos {
  padding: clamp(14px, 2.5vw, 24px) 0 70px;
}
.jogos__cab {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.filtros { display: flex; gap: 7px; flex-wrap: wrap; margin-left: auto; }
.filtro {
  padding: 7px 15px;
  border-radius: var(--r-full);
  border: 1px solid rgba(232, 193, 121, .22);
  background: transparent;
  color: #a8b5d6;
  font-size: .78rem;
  font-weight: 500;
  transition: .2s;
}
.filtro:hover { border-color: rgba(232, 193, 121, .5); color: var(--gold-100); }
.filtro[aria-pressed="true"] {
  background: linear-gradient(135deg, #e8c179, #cf9a3f);
  border-color: transparent;
  color: #241505;
  font-weight: 700;
}

.grade-jogos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: clamp(12px, 2vw, 20px);
}

.jogo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 214px;
  padding: 20px 20px 18px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(232, 193, 121, .2);
  background:
    radial-gradient(130% 90% at 50% 0%, rgba(232, 193, 121, .16), transparent 60%),
    linear-gradient(180deg, rgba(20, 42, 94, .82), rgba(7, 16, 38, .95));
  color: var(--cream);
  text-align: left;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  overflow: hidden;
}
.jogo-card:hover,
.jogo-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(232, 193, 121, .6);
  box-shadow: 0 26px 50px -26px #000, 0 0 36px -14px rgba(232, 193, 121, .5);
  outline: none;
}
.jogo-card__topo { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.jogo-card__icone {
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  background: linear-gradient(140deg, rgba(232, 193, 121, .24), rgba(232, 193, 121, .05));
  border: 1px solid rgba(232, 193, 121, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.jogo-card__tag {
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-500);
  font-weight: 700;
  margin-bottom: 4px;
  padding-right: 44px;
}
.jogo-card h3 { font-family: var(--fonte-corpo); font-weight: 600; font-size: 1.12rem; color: var(--gold-050); line-height: 1.2; }
.jogo-card p { font-size: .84rem; color: #a9b6d6; margin: 0; line-height: 1.45; }
.jogo-card__pe {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .74rem;
  color: var(--gold-400);
  font-weight: 600;
}
.jogo-card__pe svg { width: 14px; height: 14px; }
.jogo-card__jogar {
  margin-left: auto;
  color: #fff;
  font-weight: 700;
  font-size: .78rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform .2s var(--ease);
}
.jogo-card:hover .jogo-card__jogar { transform: translateX(3px); }
.jogo-card__novo {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 3px 8px;
  border-radius: var(--r-full);
  background: var(--crimson);
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(192, 26, 69, .9);
}
.jogo-card__feito {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #3ecf8e, #1c9e64);
  color: #04120b;
  font-size: .8rem;
  font-weight: 900;
  box-shadow: 0 0 16px -2px rgba(62, 207, 142, .8);
}
.jogo-card--destaque { border-color: rgba(232, 193, 121, .55); }
.jogo-card--destaque::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(249, 232, 196, .9), transparent 40%, rgba(249, 232, 196, .5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ----------------------------- TELA JOGO ----------------------------- */
.tela-jogo {
  flex: 1;
  padding: clamp(12px, 2.4vw, 24px) 0 80px;
}
.jogo-cab {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(12px, 2.5vw, 20px);
  flex-wrap: wrap;
}
.jogo-cab h2 {
  font-size: clamp(1.15rem, 3.4vw, 1.6rem);
  color: var(--gold-100);
  flex: 1 1 auto;
}
.jogo-cab__acoes { display: flex; gap: 8px; align-items: center; }

.painel {
  background: rgba(4, 9, 27, .5);
  border: 1px solid rgba(232, 193, 121, .18);
  border-radius: var(--r-lg);
  padding: clamp(14px, 2.6vw, 24px);
  backdrop-filter: blur(4px);
}

/* HUD compartilhado */
.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.hud__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(232, 193, 121, .2);
  font-size: .82rem;
  font-weight: 600;
  color: var(--gold-100);
  font-variant-numeric: tabular-nums;
}
.hud__item b { color: #fff; }
.hud__item svg { width: 15px; height: 15px; color: var(--gold-400); }
.hud__item--jogador { border-color: rgba(26, 163, 172, .5); background: rgba(26, 163, 172, .14); }
.hud__dir { margin-left: auto; display: flex; gap: 8px; }

/* barra de progresso simples */
.barra {
  height: 8px;
  border-radius: var(--r-full);
  background: rgba(4, 9, 27, .75);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7);
}
.barra > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #7be0e6);
  box-shadow: 0 0 12px rgba(26, 163, 172, .8);
  transition: width .4s var(--ease);
}

/* ---------------------------- modal / toast --------------------------- */
.modal-fundo {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 5, 15, .78);
  backdrop-filter: blur(8px);
  animation: esmaecer .28s ease;
  overflow-y: auto;
}
@keyframes esmaecer { from { opacity: 0; } }

.modal {
  width: min(100%, 520px);
  max-height: 88dvh;
  overflow-y: auto;
  position: relative;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(232, 193, 121, .2), transparent 60%),
    linear-gradient(180deg, #122251, #071026);
  border: 1px solid rgba(232, 193, 121, .45);
  border-radius: var(--r-xl);
  padding: clamp(22px, 4vw, 34px);
  box-shadow: 0 40px 100px -30px #000, 0 0 60px -20px rgba(232, 193, 121, .4);
  animation: subir .38s var(--ease);
  text-align: center;
}
@keyframes subir { from { transform: translateY(26px) scale(.96); opacity: 0; } }
.modal h3 { font-size: clamp(1.2rem, 3.4vw, 1.6rem); color: var(--gold-100); margin-bottom: 10px; }
.modal p { color: #c2cde8; font-size: .94rem; }
.modal__emoji { font-size: 3rem; line-height: 1; margin-bottom: 10px; display: block; }
.modal__acoes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.modal__acoes .btn { flex: 1 1 140px; }
.modal__fechar {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(232, 193, 121, .3);
  background: rgba(255, 255, 255, .06);
  color: var(--gold-100);
  display: grid; place-items: center;
}
.modal__fechar:hover { background: rgba(232, 193, 121, .2); }

.toasts {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(94vw, 440px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, rgba(20, 42, 94, .97), rgba(7, 16, 38, .97));
  border: 1px solid rgba(232, 193, 121, .45);
  color: var(--gold-050);
  font-size: .86rem;
  font-weight: 500;
  box-shadow: var(--sombra-3);
  animation: toast-in .4s var(--ease);
  max-width: 100%;
}
.toast--ouro { border-color: var(--gold-300); box-shadow: 0 0 30px -8px rgba(232, 193, 121, .8), var(--sombra-3); }
.toast--ok { border-color: rgba(62, 207, 142, .7); }
.toast--err { border-color: rgba(236, 90, 107, .8); }
.toast__emoji { font-size: 1.1rem; }
@keyframes toast-in { from { transform: translateY(16px) scale(.94); opacity: 0; } }
.toast--sair { animation: toast-out .35s ease forwards; }
@keyframes toast-out { to { transform: translateY(-10px); opacity: 0; } }

/* ------------------------- boas-vindas (1ª vez) ----------------------- */
.bv {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center; padding: 18px;
  background: radial-gradient(120% 80% at 50% 0%, #16295c 0%, #071026 55%, #04091b 100%);
  overflow-y: auto;
}
.bv__caixa {
  width: min(100%, 460px);
  text-align: center;
  padding: clamp(22px, 5vw, 34px) clamp(18px, 4vw, 30px);
  border-radius: var(--r-xl);
  border: 1px solid rgba(232, 193, 121, .45);
  background: linear-gradient(180deg, rgba(20, 42, 94, .75), rgba(7, 16, 38, .92));
  box-shadow: 0 40px 90px -30px #000, 0 0 70px -25px rgba(232, 193, 121, .55);
  animation: bv-sobe .5s var(--ease);
}
@keyframes bv-sobe {
  from { transform: translateY(26px) scale(.96); }
  to { transform: none; }
}
.bv__emoji { font-size: clamp(3.4rem, 13vw, 4.6rem); line-height: 1; display: block; margin-bottom: 12px; animation: flutuar 4s ease-in-out infinite; }
.bv__titulo { font-size: clamp(1.35rem, 5.4vw, 1.85rem); color: var(--gold-100); margin-bottom: 10px; }
.bv__texto { font-size: clamp(.94rem, 3.4vw, 1.02rem); color: #cfd8ee; line-height: 1.5; margin: 0 auto 6px; max-width: 34ch; }
.bv__texto b { color: var(--gold-200); }
.bv__acoes { display: grid; gap: 10px; margin-top: 22px; }
.bv__acoes .btn { width: 100%; padding: 16px 22px; font-size: 1.02rem; }
.bv__passos { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.bv__passo { width: 8px; height: 8px; border-radius: 50%; background: rgba(232, 193, 121, .25); transition: .25s; }
.bv__passo[data-atual="true"] { background: var(--gold-300); width: 22px; border-radius: 4px; }
.bv__pular {
  position: absolute; top: 14px; right: 16px;
  background: transparent; border: 0; color: #8b9ac0;
  font-size: .78rem; padding: 8px 10px; text-decoration: underline;
}
.bv__pular:hover { color: var(--gold-200); }
.bv__exemplos { display: flex; justify-content: center; gap: 10px; margin: 16px 0 4px; flex-wrap: wrap; }
.bv__exemplo {
  display: grid; place-items: center; gap: 5px;
  width: 84px; padding: 12px 6px; border-radius: 16px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(232, 193, 121, .28);
  font-size: .66rem; color: var(--gold-100); text-align: center; line-height: 1.2;
}
.bv__exemplo span:first-child { font-size: 1.6rem; }

@media (prefers-reduced-motion: reduce) {
  .bv__emoji { animation: none; }
}

/* ------------------------------- rodapé ------------------------------- */
.rodape {
  margin-top: auto;
  padding: 26px 0 30px;
  border-top: 1px solid rgba(232, 193, 121, .14);
  text-align: center;
  color: #7f8db3;
  font-size: .76rem;
}
.rodape__marcas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.rodape__marcas img { height: 22px; width: auto; opacity: .8; }
.rodape a { color: var(--gold-400); text-decoration: none; }
.rodape a:hover { text-decoration: underline; }

/* --------------------------- utilidades ------------------------------ */
.oculto { display: none !important; }
.centro { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 26px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-centro { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 10px; }
.entre { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* modo imersivo (roleta, arcade) */
body.tela-cheia .topo { display: none; }
body.tela-cheia .tela-jogo { padding-top: 10px; }
body.tela-cheia .rodape { display: none; }
.area-jogo { min-height: 40vh; }

.escondido-visual {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
}

/* animação de entrada das telas */
.entra { animation: entra .5s var(--ease) both; }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } }

/* ---------------------------- responsivo ----------------------------- */
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .hero-aluno__grade { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero-aluno__frase { margin-inline: auto; }
  .hero-aluno__stats { justify-content: center; }
  .grade-alunos { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); }
  .aluno-card { padding: 12px 6px 10px; border-radius: var(--r-md); }
  .aluno-card__nome { font-size: .78rem; }
  .jogos__cab { gap: 8px; }
  .filtros { margin-left: 0; width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .filtro { white-space: nowrap; font-size: .72rem; padding: 6px 12px; }
  .grade-jogos { grid-template-columns: 1fr; }
  .jogo-card { min-height: 0; padding: 16px; }
}

@media (max-width: 560px) {
  .topo { gap: 8px; padding: 0 10px; }
  .topo__marcas { gap: 8px; flex: 0 1 auto; overflow: hidden; }
  .topo__escola { height: 24px; }
  .topo__combo, .topo__div { display: none; }
  .topo__voltar { padding: 7px 10px 7px 8px; gap: 2px; }
  .topo__rotulo { display: none; }
  .topo__dir { gap: 6px; flex: none; }
  .btn-icone { width: 36px; height: 36px; }
  .btn-icone svg { width: 18px; height: 18px; }
  .pilula-moeda { padding: 5px 10px 5px 7px; font-size: .78rem; gap: 5px; }
  .pilula-moeda svg { width: 15px; height: 15px; }
  .avatar-topo { width: 32px; height: 32px; }
  .trilha { padding: 12px 14px; gap: 10px; }
  .trilha__txt { font-size: .74rem; }
  .retrato { border-radius: 80px 80px var(--r-md) var(--r-md); }
}

@media (max-width: 400px) {
  .topo { gap: 5px; padding: 0 8px; }
  .topo__dir { gap: 4px; }
  .btn-icone { width: 33px; height: 33px; }
  .btn-icone svg { width: 16px; height: 16px; }
  .pilula-moeda { padding: 4px 8px 4px 6px; font-size: .72rem; }
  .avatar-topo { width: 29px; height: 29px; }
  .topo__escola { height: 21px; }
}

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

/* ------------------------------ impressão ----------------------------- */
@media print {
  .atmosfera, #poeira, .grao, .topo, .rodape, .jogo-cab__acoes { display: none !important; }
  body { background: #fff; color: #111; }
}
