:root {
  --navy: #0e1a38;
  --deep: #071024;
  --ink: #152448;
  --gold: #e8c547;
  --gold-dim: #c9a227;
  --green: #1f9d4a;
  --green-deep: #0b6b32;
  --orange: #f5a623;
  --cream: #f7f3e8;
  --mist: rgba(247, 243, 232, 0.72);
  --line: rgba(232, 197, 71, 0.35);
  --safe-b: max(10px, env(safe-area-inset-bottom));
  --safe-t: max(8px, env(safe-area-inset-top));
  --nav-h: 92px;
  --faixa-h: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  height: 100%;
  background: var(--deep);
  color: var(--cream);
  font-family: Manrope, system-ui, sans-serif;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  color: inherit;
}

#app {
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, #1b365d 0%, transparent 55%),
    radial-gradient(80% 50% at 110% 80%, rgba(11, 107, 50, 0.35) 0%, transparent 50%),
    var(--deep);
}

.feltro {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 11px, rgba(232, 197, 71, 0.05) 12px),
    repeating-linear-gradient(0deg, transparent, transparent 11px, rgba(31, 157, 74, 0.04) 12px);
}

.faisca {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  background: radial-gradient(circle at 20% 30%, rgba(232, 197, 71, 0.08), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(31, 157, 74, 0.08), transparent 30%);
  animation: deriva 16s ease-in-out infinite alternate;
}

@keyframes deriva {
  to { transform: translate3d(-3%, 2%, 0) scale(1.04); }
}

.canto {
  position: fixed;
  width: 22px;
  height: 22px;
  pointer-events: none;
  z-index: 50;
  border: 2px solid var(--gold);
}

.canto.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.canto.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.canto.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.canto.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.marca {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 800;
}

h1, h2, h3 {
  font-family: Cinzel, serif;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.lede {
  color: var(--mist);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0.4rem 0 1rem;
}

.rotulo {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 1.2rem 0 0.7rem;
  font-weight: 800;
}

.tela {
  display: none;
  width: 100%;
}

.tela.on {
  display: block;
}

#tela-carga {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--deep);
}

#tela-carga.on {
  display: flex;
}

.poco-carga {
  width: min(86vw, 340px);
  text-align: center;
}

.halo {
  width: 112px;
  height: 112px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  padding: 8px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 32px rgba(232, 197, 71, 0.35);
  overflow: hidden;
}

.halo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.poco-carga h1 {
  font-size: clamp(1.6rem, 7vw, 2.1rem);
  margin: 0.35rem 0;
}

.trilha {
  height: 8px;
  border-radius: 99px;
  background: #1b2f5a;
  overflow: hidden;
  margin-top: 1.2rem;
}

.trilha i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.faixa-coroa {
  position: sticky;
  top: 0;
  z-index: 30;
  display: none;
  align-items: center;
  gap: 10px;
  min-height: var(--faixa-h);
  padding: calc(var(--safe-t) + 6px) 14px 8px;
  background: linear-gradient(180deg, #0e1a38 40%, rgba(7, 16, 36, 0.92));
  border-bottom: 1px solid var(--line);
}

.faixa-coroa.on {
  display: flex;
}

.selo-marca {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
  flex-shrink: 0;
}

.faixa-texto {
  flex: 1;
  min-width: 0;
}

.faixa-texto h1 {
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.placa-capital {
  min-width: 64px;
  padding: 8px 10px;
  border-radius: 999px 12px 999px 12px;
  background: linear-gradient(180deg, #2a1f08, #120e06);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

#palco {
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
  min-height: 100dvh;
}

.rolagem {
  padding: 12px 14px 24px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.hero {
  position: relative;
  border-radius: 22px 6px 22px 6px;
  overflow: hidden;
  min-height: 0;
  border: 1px solid var(--line);
}

.hero-art {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.hero-velo {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 16, 36, 0.15), rgba(7, 16, 36, 0.92) 70%);
}

.hero-copy {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
}

.hero-copy h2 {
  font-size: clamp(1.05rem, 5vw, 1.55rem);
  margin: 0.25rem 0 0.45rem;
  overflow-wrap: anywhere;
}

.hero-copy p {
  color: var(--mist);
  font-size: 0.88rem;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  max-width: 100%;
}

.cta-ouro, .cta-verde {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cta-ouro {
  background: linear-gradient(180deg, #f0d56a, var(--gold-dim));
  color: #1a1204;
  width: 100%;
  font-size: 0.92rem;
}

.cta-ouro img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.cta-verde {
  background: linear-gradient(180deg, #2db85c, var(--green-deep));
  color: #f7fff8;
}

.faixa-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.faixa-stats > div, .hud-item {
  background: rgba(21, 36, 72, 0.7);
  border: 1px solid var(--line);
  padding: 10px 8px;
  border-radius: 14px 4px 14px 4px;
  min-width: 0;
}

.faixa-stats small, .hud-item small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.faixa-stats strong, .hud-item strong {
  display: block;
  font-size: 0.95rem;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.citacao {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(31, 157, 74, 0.12), rgba(232, 197, 71, 0.08));
  border: 1px solid var(--line);
}

.citacao img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.citacao .marca {
  letter-spacing: 0.08em;
  font-size: 9px;
  white-space: normal;
}

.citacao p:last-child {
  font-size: 0.86rem;
  line-height: 1.4;
  margin-top: 4px;
}

.pilares {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.pilares article {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(14, 26, 56, 0.65);
}

.pilares img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.pilares h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.pilares p {
  font-size: 0.82rem;
  color: var(--mist);
  line-height: 1.35;
}

.mesa-preview {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(21, 36, 72, 0.45);
}

.mesa-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
}

.mesa-preview h3 {
  margin: 0.3rem 0 0.4rem;
  font-size: 1.05rem;
}

.mesa-preview p {
  color: var(--mist);
  font-size: 0.88rem;
  line-height: 1.45;
}

.duo-talentos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.duo-talentos figure {
  overflow: hidden;
  border-radius: 16px 4px 16px 4px;
  border: 1px solid var(--line);
}

.duo-talentos img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.duo-talentos figcaption {
  padding: 8px;
  font-size: 0.75rem;
  color: var(--gold);
  text-align: center;
}

.hud-imperio {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 10px 4px;
}

.mesa-wrap {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
  aspect-ratio: 1;
  max-height: min(52dvh, 420px);
}

#mesa-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.pulso-flash {
  position: absolute;
  inset: 12%;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 0.2s;
}

.pulso-flash.on {
  opacity: 0.7;
}

.dica {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--mist);
  pointer-events: none;
  text-shadow: 0 1px 8px #000;
}

.barra-acoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 12px 4px;
  max-width: 560px;
  margin: 0 auto;
}

.barra-acoes button {
  min-height: 42px;
  border-radius: 12px;
  background: #152448;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.85rem;
}

.barra-acoes .cta-verde {
  grid-column: 1 / -1;
}

.ficha-setor {
  margin: 6px 12px 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(14, 26, 56, 0.8);
  font-size: 0.82rem;
  color: var(--mist);
}

.evento {
  min-height: 1.3em;
  margin: 6px 12px 0;
  font-size: 0.8rem;
  color: var(--gold);
  text-align: center;
}

.acordeao-topo {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin-top: 8px;
  background: #152448;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.92rem;
}

.acordeao-topo.aberta {
  border-color: var(--gold);
  color: var(--gold);
}

.acordeao-corpo {
  display: none;
  padding: 10px 4px 14px;
}

.acordeao-corpo.aberta {
  display: block;
}

.acordeao-corpo img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 8px;
}

.acordeao-corpo p {
  color: var(--mist);
  font-size: 0.9rem;
  line-height: 1.5;
}

.mapa-campus {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 16px;
  margin: 8px 0 14px;
  border: 1px solid var(--line);
}

.grade-verticais {
  display: grid;
  gap: 10px;
}

.grade-verticais article {
  padding: 12px;
  border-radius: 16px 6px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(21, 36, 72, 0.8), rgba(11, 107, 50, 0.12));
}

.grade-verticais h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--gold);
}

.grade-verticais p {
  font-size: 0.86rem;
  color: var(--mist);
  line-height: 1.45;
}

.selo-topo {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.selo-topo img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.patentes {
  padding-left: 1.2rem;
  color: var(--mist);
  line-height: 1.8;
}

.rodape-marca {
  margin-top: 18px;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

#btn-limpar {
  width: 100%;
  margin-top: 16px;
}

.trilho-orbital {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  justify-content: center;
  align-items: flex-end;
  gap: 2px;
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 0 6px var(--safe-b);
  background: linear-gradient(180deg, transparent, rgba(7, 16, 36, 0.96) 38%);
}

.trilho-orbital.on {
  display: flex;
}

.selo-nav {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  position: relative;
  background: #0e1a38;
  border: 2px solid var(--gold-dim);
  overflow: visible;
  flex: 0 0 auto;
  transform: translateY(10px) scale(0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
}

.selo-nav:nth-child(1) { transform: translateY(16px) scale(0.88); }
.selo-nav:nth-child(2) { transform: translateY(6px) scale(0.94); }
.selo-nav:nth-child(3) { transform: translateY(-4px) scale(1); }
.selo-nav:nth-child(4) { transform: translateY(6px) scale(0.94); }
.selo-nav:nth-child(5) { transform: translateY(16px) scale(0.88); }

.selo-nav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.selo-nav span {
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0;
  white-space: nowrap;
  font-weight: 800;
}

.selo-nav.on {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 157, 74, 0.35), 0 10px 22px rgba(232, 197, 71, 0.28);
  transform: translateY(-16px) scale(1.12);
}

.selo-nav.on span {
  opacity: 1;
  color: var(--gold);
}

.folha {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(7, 16, 36, 0.72);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.folha.aberta {
  display: flex;
}

.folha-caixa {
  width: min(100%, 520px);
  max-height: 78dvh;
  overflow: auto;
  background: #101c3c;
  border-top: 2px solid var(--gold);
  border-radius: 22px 22px 0 0;
  padding: 16px 14px calc(16px + var(--safe-b));
}

.folha-caixa .cta-ouro {
  margin-top: 12px;
}

.cartao-talento {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.cartao-talento img, .avatar-selo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
}

.avatar-selo {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 40% 30%, var(--gold), var(--green-deep));
  font-family: Cinzel, serif;
  font-weight: 800;
  color: #1a1204;
}

.cartao-talento strong {
  display: block;
  font-size: 0.92rem;
}

.cartao-talento small {
  color: var(--mist);
  font-size: 0.75rem;
  line-height: 1.3;
}

.cartao-talento button {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1204;
  font-weight: 800;
  font-size: 0.75rem;
  white-space: nowrap;
}

@media (min-width: 420px) {
  .pilares {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .pilares article {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .pilares img {
    margin: 0 auto;
  }
  .mesa-preview {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .barra-acoes {
    grid-template-columns: repeat(4, 1fr);
  }
  .barra-acoes .cta-verde {
    grid-column: auto;
  }
  .selo-nav {
    width: 60px;
    height: 60px;
    margin: 0 4px;
  }
}

@media (max-width: 400px) {
  .faixa-stats {
    grid-template-columns: 1fr 1fr;
  }
  .faixa-stats > div:last-child {
    grid-column: 1 / -1;
  }
  .hud-imperio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .selo-nav {
    width: 48px;
    height: 48px;
  }
  .hero {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .hero-art {
    height: 168px;
    min-height: 168px;
  }
  .hero-velo {
    display: none;
  }
  .hero-copy {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    padding: 12px;
  }
  .hero-copy h2 {
    font-size: 1.15rem;
  }
  .faixa-texto h1 {
    font-size: 0.95rem;
  }
  .mesa-wrap {
    max-height: 46dvh;
  }
  .citacao {
    grid-template-columns: 56px 1fr;
  }
  .citacao img {
    width: 56px;
    height: 56px;
  }
  .citacao .marca,
  .marca {
    letter-spacing: 0.14em;
  }
}

@media (max-height: 620px) {
  .mesa-wrap {
    max-height: 42dvh;
  }
  .hud-imperio {
    padding-top: 4px;
  }
}
