/* Home sobre a cena original da entrada da aguia. */
body:has(#screen-auth .home-auth-dialog[open]) { overflow: hidden; }
/* A fonte da home num lugar so. O Georgia nao tem os caracteres compostos do
   vietnamita (ế, ồ, ộ): o navegador desenha a letra numa fonte e o acento
   noutra, e ele desgruda da letra. Com lang="vi" a home troca por uma serifada
   que cobre tudo. */
:root { --fonte-home: Georgia, serif; }
html:lang(vi) { --fonte-home: 'Times New Roman', 'Noto Serif', Georgia, serif; }
#screen-auth { position: relative; min-height: 100dvh; padding: 0; background: #041721; color: #e8dfca; }
#screen-auth.active { display: block; }
#screen-auth main { display: block; }
#screen-auth .home-nav {
  position: fixed; z-index: 40; top: 12px; left: 50%; width: min(1360px, calc(100% - 32px));
  min-height: 94px; padding: 7px 24px; border: 1px solid #d4ae61; transform: translateX(-50%);
  background: linear-gradient(110deg, #061e29f5, #071d27ed 50%, #061e29f5);
  box-shadow: inset 0 0 0 2px #17404a, inset 0 0 0 3px #856637, 0 10px 32px #0009;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}
#screen-auth .home-nav::before, #screen-auth .home-nav::after {
  content: ''; position: absolute; top: 50%; width: 10px; height: 10px;
  border: 1px solid #b99a54; background: #3cdae5; transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 10px #59e5ec;
}
#screen-auth .home-nav::before { left: 3px; }
#screen-auth .home-nav::after { right: 3px; }
#screen-auth .home-nav-links {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  gap: clamp(12px, 1.6vw, 24px); min-height: 78px; padding: 0 24px;
}
#screen-auth .home-nav-left, #screen-auth .home-nav-right { display: flex; align-items: center; gap: clamp(10px, 1.4vw, 22px); }
#screen-auth .home-nav-left { justify-content: flex-end; }
#screen-auth .home-nav-right { justify-content: flex-start; }
#screen-auth .home-nav-links a:not(.home-brand) {
  position: relative; padding: 5px 6px; color: #d4b577; border-bottom: 2px solid transparent;
  font: bold 12px var(--fonte-home); letter-spacing: 1.5px; text-decoration: none; text-transform: uppercase;
  white-space: nowrap; transition: color .2s, border-color .2s;
}
#screen-auth .home-nav-links a:not(.home-brand):hover, #screen-auth .home-nav-links a:not(.home-brand):focus-visible { color: #61e3ec; border-bottom-color: #45dce9; }
#screen-auth .home-nav-links a:not(.home-brand)[aria-current] { color: #79e8ee; border-bottom-color: #57dfe9; text-shadow: 0 0 9px #5ce9ed8c; }
#screen-auth .home-nav-links a:not(.home-brand)[aria-current]::before { content: ''; position: absolute; left: -12px; top: 50%; width: 7px; height: 7px; background: #60e7eb; border: 1px solid #e6c479; transform: translateY(-50%) rotate(45deg); box-shadow: 0 0 8px #6be9ed; }
#screen-auth .home-nav-links a:focus-visible { outline: 2px solid #77e5ec; outline-offset: 5px; }
#screen-auth .home-brand { position: relative; isolation: isolate; display: flex; align-items: center; justify-self: center; line-height: 0; }
#screen-auth .home-brand::before {
  content: ''; position: absolute; inset: 12% 4%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse, #4acaff66, #236db542 38%, transparent 72%);
  filter: blur(13px); animation: home-play-halo 3.8s ease-in-out infinite;
}
#screen-auth .home-brand::after {
  content: ''; position: absolute; top: 17%; left: 14%; width: 5px; height: 5px; pointer-events: none;
  background: #e2fcff; transform: rotate(45deg); box-shadow: 0 0 9px 3px #70eaff;
  animation: home-play-glint 3.5s ease-in-out infinite;
}
#screen-auth .home-brand img { position: relative; display: block; width: 230px; height: auto; filter: drop-shadow(0 3px 7px #000a) drop-shadow(0 0 8px #4aaaff66); }
/* O som fica fora da barra, no canto de cima a direita, so com o icone.
   A barra ocupa quase toda a largura, entao nao sobra canto ao lado dela:
   ele desce para logo abaixo dela, do lado oposto as redes. */
#screen-auth .login-sound {
  position: fixed; z-index: 41; top: 120px; right: 18px;
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 1px solid #ab8a4b; border-radius: 0; color: #e7d29c;
  background: #09232df0; cursor: var(--cur-default), pointer;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}
#screen-auth .login-sound .ic { width: 20px; height: 20px; fill: currentColor; }
#screen-auth .login-sound[aria-pressed='true'] { border-color: #65dce7; color: #67e2e9; box-shadow: 0 0 12px #3fd3e04a; }
#screen-auth .login-sound:hover { border-color: #60dce8; color: #fff0c3; }
/* Mudo: o icone apaga e ganha o corte, como o alto-falante cortado. */
#screen-auth .login-sound[aria-pressed='false'] { color: #7e8f93; }
#screen-auth .login-sound[aria-pressed='false']::after {
  content: ''; position: absolute; left: 7px; right: 7px; top: 50%; height: 2px;
  background: #c98a8a; transform: rotate(-45deg); box-shadow: 0 0 5px #0009;
}
/* Idioma: fica na ponta direita da barra. `margin-left: auto` empurra ele
   para o fim da coluna da direita, sem posicao absoluta — assim ele
   acompanha a barra quando ela quebra em duas linhas. */
#screen-auth .home-lang { position: relative; margin-left: auto; }
#screen-auth .home-lang-botao {
  display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 4px 9px;
  border: 1px solid #ab8a4b; border-radius: 0; color: #e7d29c; background: #09232d;
  cursor: var(--cur-default), pointer; font: bold 11px var(--fonte-home); letter-spacing: 1px;
}
#screen-auth .home-lang-botao:hover, #screen-auth .home-lang-botao[aria-expanded="true"] {
  border-color: #60dce8; color: #fff0c3;
}
#screen-auth .home-lang-botao:focus-visible { outline: 2px solid #77e5ec; outline-offset: 3px; }
#screen-auth .home-lang .bandeira, #screen-auth .home-lang-lista .bandeira {
  flex: none; display: block; width: 21px; height: 14px; border: 1px solid #00000066;
}
/* `fixed`, e nao `absolute`: a barra do menu tem clip-path, e o recorte
   cortaria a lista que desce para fora dela. O lugar vem do JavaScript,
   medido a partir do botao. */
#screen-auth .home-lang-lista {
  position: fixed; z-index: 42; min-width: 160px;
  margin: 0; padding: 5px; list-style: none; border: 1px solid #d4ae61;
  background: linear-gradient(170deg, #061e29fa, #071d27f5);
  box-shadow: inset 0 0 0 2px #17404a, 0 10px 26px #000a;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
#screen-auth .home-lang-lista button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px;
  border: 0; color: #d4b577; background: none; cursor: var(--cur-default), pointer;
  font: bold 12px var(--fonte-home); text-align: left; white-space: nowrap;
}
#screen-auth .home-lang-lista button:hover, #screen-auth .home-lang-lista button:focus-visible {
  color: #fff0c3; background: #0e2f3b; outline: none;
}
#screen-auth .home-lang-lista [aria-selected="true"] button { color: #67e2e9; }
/* O losango de cristal marca o idioma em uso, como no item ativo do menu. */
#screen-auth .home-lang-lista [aria-selected="true"] button::after {
  content: ''; width: 7px; height: 7px; margin-left: auto; background: #60e7eb;
  border: 1px solid #e6c479; transform: rotate(45deg); box-shadow: 0 0 8px #6be9ed;
}

/* Redes do servidor: coluna presa no meio da borda esquerda, com a mesma
   moldura da barra do menu — canto cortado, fio dourado e os losangos de
   cristal nas duas pontas. */
#screen-auth .home-social {
  position: fixed; z-index: 41; top: 50%; left: 18px; transform: translateY(-50%);
  display: grid; gap: 14px; padding: 22px 9px; border: 1px solid #d4ae61;
  background: linear-gradient(170deg, #061e29f2, #071d27e8 50%, #061e29f2);
  box-shadow: inset 0 0 0 2px #17404a, inset 0 0 0 3px #856637, 0 8px 26px #0009;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
}
#screen-auth .home-social::before, #screen-auth .home-social::after {
  content: ''; position: absolute; left: 50%; width: 10px; height: 10px;
  border: 1px solid #b99a54; background: #3cdae5; transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 10px #59e5ec;
}
#screen-auth .home-social::before { top: 6px; }
#screen-auth .home-social::after { bottom: 6px; }
#screen-auth .home-social a {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; cursor: var(--cur-default), pointer;
}
#screen-auth .home-social .ic { width: 26px; height: 26px; }
/* Sem endereco ainda: o icone fica igual, so o cursor nao vira de clique. */
#screen-auth .home-social a:not([href]) { cursor: var(--cur-default), default; }
#screen-auth .home-social a[href]:hover, #screen-auth .home-social a[href]:focus-visible {
  background: #0e2f3b; box-shadow: 0 0 13px #54dce566;
}
#screen-auth .home-social a:focus-visible { outline: 2px solid #77e5ec; outline-offset: 3px; }

#screen-auth .home-hero {
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  min-height: max(720px, 100dvh); padding: 145px 24px 28px; overflow: hidden;
}
#login-scene { position: absolute; inset: 0; z-index: -2; background: #071b36; }
#login-scene canvas { display: block; width: 100%; height: 100%; }
#screen-auth .home-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #03131d52 0%, #03131d1a 30%, #03131d8c 57%, #04151ee8 81%, #04151e 100%),
    linear-gradient(90deg, #03131d85, transparent 24% 76%, #03131d85);
}
#screen-auth .home-hero-copy { width: min(760px, 100%); margin: auto auto 58px; text-align: center; text-shadow: 0 2px 7px #000; }
#screen-auth .home-eyebrow, #screen-auth .home-section-heading > span, #screen-auth .home-auth-eyebrow { color: #69dde5; font: bold 11px var(--fonte-home); letter-spacing: 4px; text-transform: uppercase; }
#screen-auth .home-hero-copy h1 { margin: 13px 0 11px; color: #ffe2a1; font: bold clamp(46px, 6vw, 82px)/1 var(--fonte-home); letter-spacing: 4px; }
#screen-auth .home-hero-copy h1 span { color: #8de8ed; }
#screen-auth .home-hero-copy p { max-width: 610px; margin: 0 auto; color: #f0efe7; font-size: clamp(14px, 1.4vw, 17px); line-height: 1.6; }
#screen-auth .home-play-button {
  position: relative; display: block; width: min(345px, 76vw); margin: 5px auto -4px; padding: 0;
  border: 0; background: none; cursor: var(--cur-default), pointer;
  transition: transform .25s ease, filter .25s ease;
}
#screen-auth .home-play-button::before {
  content: ''; position: absolute; inset: 18% 9% 9%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, #49c6ff8c 0%, #267ee167 35%, transparent 72%);
  filter: blur(18px); animation: home-play-halo 3.8s ease-in-out infinite;
}
#screen-auth .home-play-button::after {
  content: ''; position: absolute; top: 34%; left: 17%; width: 7px; height: 7px; pointer-events: none;
  background: #d6fcff; transform: rotate(45deg); box-shadow: 0 0 10px 3px #79eaff;
  animation: home-play-glint 3.5s ease-in-out infinite;
}
#screen-auth .home-play-button img {
  position: relative; display: block; width: 100%; height: auto;
  filter: drop-shadow(0 8px 10px #000b) drop-shadow(0 0 11px #4aafff91);
  animation: home-play-float 4s ease-in-out infinite;
}
#screen-auth .home-play-button:hover, #screen-auth .home-play-button:focus-visible { transform: translateY(-5px) scale(1.07); filter: brightness(1.18); }
#screen-auth .home-play-button:focus-visible { outline: 2px solid #86eff7; outline-offset: 3px; }
#screen-auth .home-play-button:active { transform: translateY(1px) scale(.98); }
#screen-auth .home-button {
  min-width: 170px; min-height: 47px; padding: 9px 22px; border: 1px solid #d4ae61; border-radius: 0;
  color: #ffe0a0; background: linear-gradient(145deg, #184550, #071e29 65%, #0d303b);
  box-shadow: inset 0 0 0 2px #1e5260, 0 5px 18px #0008;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  cursor: var(--cur-default), pointer; font: bold 15px var(--fonte-home); letter-spacing: .5px;
}
#screen-auth .home-button.primary { border-color: #ffe399; color: #fff2c5; background: linear-gradient(135deg, #9a7735, #514525 65%, #1f3c3e); box-shadow: inset 0 0 0 2px #e7bf68, 0 0 18px #e0b45d66; }
#screen-auth .home-button:hover, #screen-auth .home-button:focus-visible { border-color: #56e2ee; filter: brightness(1.15); }
#screen-auth .home-highlights {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(910px, 100%); margin: 0 auto;
  border: 1px solid #b69855; background: #041923e8;
  box-shadow: inset 0 0 0 2px #123d49, 0 9px 26px #0008;
}
#screen-auth .home-highlights > div { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 13px 18px; }
#screen-auth .home-highlights > div + div { border-left: 1px solid #54737a; }
#screen-auth .home-highlights svg, #screen-auth .home-feature-grid svg { flex: none; width: 29px; height: 29px; fill: #dfb65e; filter: drop-shadow(0 0 6px #d2a34b66); }
#screen-auth .home-highlights span { display: block; min-width: 0; }
#screen-auth .home-highlights b { display: block; color: #ffe3a1; font: bold 17px var(--fonte-home); }
#screen-auth .home-highlights small { display: block; margin-top: 3px; color: #a8c5c8; font-size: 11px; }
#login-scene-status { position: absolute; bottom: 4px; left: 12px; right: 12px; margin: 0; color: #ffe4ab; font-size: 11px; text-align: center; text-shadow: 0 1px 3px #000; }
#screen-auth .home-section { padding: 90px max(24px, calc((100vw - 1120px) / 2)); scroll-margin-top: 92px; }
#screen-auth .home-about { background: linear-gradient(180deg, #04151e, #0a2731); }
#screen-auth .home-ranking { background: linear-gradient(180deg, #0a2731, #061a25); }
#screen-auth .home-help { background: linear-gradient(180deg, #061a25, #04131c); text-align: center; }
#screen-auth .home-section-heading { max-width: 670px; margin: 0 auto 34px; text-align: center; }
#screen-auth .home-section-heading h2 { margin: 9px 0; color: #ffe1a1; font: bold clamp(28px, 3.5vw, 42px) var(--fonte-home); }
#screen-auth .home-section-heading p { margin: 0; color: #afc9cb; font-size: 15px; }
#screen-auth .home-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
#screen-auth .home-feature-grid article {
  min-height: 176px; padding: 24px; border: 1px solid #a8874a;
  background: linear-gradient(145deg, #103643, #061b27);
  box-shadow: inset 0 0 0 2px #164551, 0 8px 23px #0006;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}
#screen-auth .home-feature-grid h3 { margin: 14px 0 8px; color: #ffe0a0; font: bold 19px var(--fonte-home); letter-spacing: 0; text-transform: none; }
#screen-auth .home-feature-grid p { margin: 0; color: #bbd0d0; font-size: 13px; }
#screen-auth .home-ranking-list { width: min(760px, 100%); margin: 0 auto; padding: 12px 30px 12px 54px; border: 1px solid #b69454; background: #051b27; box-shadow: inset 0 0 0 2px #174653; }
#screen-auth .home-ranking-list li { padding: 10px 8px; color: #bdd2d1; border-bottom: 1px solid #28505b; font-size: 14px; }
#screen-auth .home-ranking-list li:last-child { border-bottom: 0; }
#screen-auth .home-ranking-list li::marker { color: #e7bf6a; font: bold 16px var(--fonte-home); }
#screen-auth .home-ranking-list b { color: #ffe0a0; }
#screen-auth .home-steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin: 0 auto 30px; }
#screen-auth .home-steps > div { display: flex; align-items: center; gap: 10px; min-width: 205px; padding: 13px 17px; border: 1px solid #816d41; background: #09232e; color: #d8e2db; }
#screen-auth .home-steps b { color: #ffe09a; font: bold 22px var(--fonte-home); }
#screen-auth .home-steps span { font: 15px var(--fonte-home); }
#screen-auth .home-auth-dialog { width: min(470px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; background: transparent; color: #e8dfca; overflow: auto; }
#screen-auth .home-auth-dialog::backdrop { background: #02121ce8; backdrop-filter: blur(8px); }
#screen-auth .auth-box {
  position: relative; width: 100%; padding: 20px 38px 27px; border: 1px solid #dcb567; border-radius: 0;
  background: radial-gradient(ellipse at 50% 4%, #1a5262 0, #0b2e3b 35%, transparent 67%), linear-gradient(145deg, #102e39, #041923 64%, #0b2d38);
  box-shadow: inset 0 0 0 2px #1d5260, inset 0 0 0 3px #795b31, 0 22px 58px #000c, 0 0 28px #57ddea24;
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}
#screen-auth .home-auth-close { position: absolute; z-index: 2; top: 13px; right: 16px; width: 34px; height: 34px; border: 1px solid #b99955; color: #ffe3a1; background: #071d28; cursor: var(--cur-default), pointer; font: 24px/1 var(--fonte-home); }
#screen-auth .home-auth-brand { position: relative; isolation: isolate; width: min(290px, 80%); margin: -3px auto 8px; }
#screen-auth .home-auth-brand::before { content: ''; position: absolute; z-index: -1; inset: 20% 1%; border-radius: 50%; background: radial-gradient(ellipse, #55e7ff9c, #1b8bc553 48%, transparent 72%); filter: blur(18px); animation: home-play-halo 3.8s ease-in-out infinite; }
#screen-auth .home-auth-brand::after { content: '✦'; position: absolute; top: 3%; right: 5%; color: #b4faff; font: 25px var(--fonte-home); text-shadow: 0 0 8px #5ceeff, 0 0 18px #7df8ff; animation: home-play-glint 4s ease-in-out infinite; }
#screen-auth .home-auth-brand img { display: block; width: 100%; height: auto; animation: home-play-float 4s ease-in-out infinite; }
#screen-auth .home-auth-eyebrow { display: block; margin-bottom: 5px; text-align: center; font-size: 10px; letter-spacing: 3px; }
#screen-auth .auth-box h2 { margin: 0; color: #ffe4a1; text-align: center; font: bold 27px var(--fonte-home); text-shadow: 0 0 16px #deae5740; }
#screen-auth .home-auth-intro { margin: 7px 0 20px; color: #afc6c7; text-align: center; font-size: 12px; }
#screen-auth .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 20px; padding: 4px; border: 1px solid #44616a; background: #041924; }
#screen-auth .tab { min-height: 39px; border: 1px solid transparent; border-radius: 0; color: #b5cbcc; background: transparent; font: bold 14px var(--fonte-home); }
#screen-auth .tab.active { border-color: #e1bd6b; color: #ffe4a1; background: linear-gradient(145deg, #6d5e30, #123a42); box-shadow: inset 0 0 0 1px #d7ae60, 0 0 15px #5de2eb27; }
#screen-auth label { margin-bottom: 13px; color: #d0d8d1; font-size: 12px; letter-spacing: .3px; }
#screen-auth input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid #806e49; border-radius: 0; color: #fce9bf; background: #041721; font-size: 14px; }
#screen-auth input::placeholder { color: #82989b; }
#screen-auth input:focus { border-color: #5ae0e9; box-shadow: 0 0 0 2px #4ddce65d, inset 0 0 15px #4ddce61e; outline: none; }
#screen-auth input:-webkit-autofill { -webkit-box-shadow: 0 0 0 50px #061c27 inset; -webkit-text-fill-color: #fce9bf; caret-color: #fce9bf; }
#screen-auth .auth-box .btn.primary { position: relative; overflow: hidden; width: 100%; min-height: 47px; margin-top: 8px; border-color: #f0cb7c; border-radius: 0; color: #fff0bb; background: linear-gradient(115deg, #6a552e, #9b7939 48%, #163943); box-shadow: inset 0 0 0 1px #dbb363, 0 0 18px #5bd8e439; font: bold 16px var(--fonte-home); }
#screen-auth .auth-box .btn.primary::after { content: ''; position: absolute; top: -60%; left: -65%; width: 42%; height: 220%; transform: rotate(24deg); background: linear-gradient(90deg, transparent, #fff9d58a, transparent); animation: home-button-sheen 5s ease-in-out infinite; }
#screen-auth .auth-box .btn.primary:hover { filter: brightness(1.15); box-shadow: inset 0 0 0 1px #dbb363, 0 0 24px #6de8f778; }
#screen-auth .auth-box .error { margin-bottom: 0; }
#screen-auth .home-auth-separator { display: flex; align-items: center; gap: 12px; margin: 17px 0 13px; color: #8cabb1; font: 12px var(--fonte-home); }
#screen-auth .home-auth-separator::before, #screen-auth .home-auth-separator::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #8e7848, transparent); }
#screen-auth .home-google-auth { text-align: center; }
#screen-auth #google-signin-button { display: flex; justify-content: center; width: 100%; }
#screen-auth .home-google-unavailable { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; border: 1px solid #8e918f; border-radius: 4px; color: #e3e3e3; background: #131314; font: 500 14px Arial, sans-serif; opacity: .72; }
#screen-auth .home-google-unavailable img { display: block; width: 20px; height: 20px; padding: 2px; border-radius: 2px; background: #fff; object-fit: contain; }
#screen-auth #google-auth-status { min-height: 14px; margin: 7px 0 0; color: #a8c9cc; font-size: 11px; }
#screen-auth [hidden] { display: none !important; }

#screen-auth.portal-entering #login-scene canvas { transform: scale(1.55); transform-origin: 50% 43%; filter: brightness(1.35); transition: transform .65s ease-in, filter .65s ease-in; }
#screen-auth.portal-entering .home-hero-copy, #screen-auth.portal-entering .home-highlights { opacity: 0; transition: opacity .3s ease-in; }
#portal-transition { position: fixed; inset: 0; z-index: 10000; visibility: hidden; pointer-events: none; }
#portal-transition.active { visibility: visible; }
#portal-transition canvas { display: block; width: 100%; height: 100%; }

/* Luzes e respostas da home. Os efeitos ficam restritos a esta tela. */
#screen-auth { scroll-behavior: smooth; }
#screen-auth .home-nav { animation: home-frame-glow 5.5s ease-in-out infinite; }
#screen-auth .home-nav::before, #screen-auth .home-nav::after { animation: home-gem-pulse 2.6s ease-in-out infinite; }
#screen-auth .home-nav::after { animation-delay: 1.3s; }
#screen-auth .home-brand img { animation: home-play-float 4s ease-in-out infinite; }
#screen-auth .home-nav-links a:not(.home-brand) { transition: color .2s ease, border-color .2s ease, text-shadow .2s ease; }
#screen-auth .home-nav-links a:not(.home-brand)[aria-current='location'] { color: #68e9ee; border-bottom-color: #54e1e9; text-shadow: 0 0 10px #46dfe97a; }
#screen-auth .login-sound { transition: transform .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease; }
#screen-auth .login-sound:hover, #screen-auth .login-sound:focus-visible { transform: translateY(-2px); box-shadow: 0 0 15px #57dfe65c; }
#screen-auth .home-motes { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
#screen-auth .home-motes span {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #7ceaf0; box-shadow: 0 0 5px 2px #43dce6a8, 0 0 17px 5px #43dce66b;
  opacity: 0; animation: home-mote-rise 15s linear infinite;
}
#screen-auth .home-motes span:nth-child(1) { left: 7%; top: 86%; animation-delay: -2s; }
#screen-auth .home-motes span:nth-child(2) { left: 14%; top: 70%; animation-delay: -8s; animation-duration: 19s; }
#screen-auth .home-motes span:nth-child(3) { left: 25%; top: 91%; animation-delay: -5s; animation-duration: 13s; }
#screen-auth .home-motes span:nth-child(4) { left: 34%; top: 74%; animation-delay: -12s; animation-duration: 21s; }
#screen-auth .home-motes span:nth-child(5) { left: 43%; top: 89%; animation-delay: -10s; animation-duration: 16s; }
#screen-auth .home-motes span:nth-child(6) { left: 53%; top: 78%; animation-delay: -4s; animation-duration: 18s; }
#screen-auth .home-motes span:nth-child(7) { left: 62%; top: 91%; animation-delay: -13s; animation-duration: 14s; }
#screen-auth .home-motes span:nth-child(8) { left: 73%; top: 69%; animation-delay: -7s; animation-duration: 20s; }
#screen-auth .home-motes span:nth-child(9) { left: 81%; top: 88%; animation-delay: -3s; animation-duration: 12.5s; }
#screen-auth .home-motes span:nth-child(10) { left: 91%; top: 72%; animation-delay: -11s; animation-duration: 17s; }
#screen-auth .home-motes span:nth-child(11) { left: 18%; top: 96%; animation-delay: -15s; animation-duration: 15.5s; }
#screen-auth .home-motes span:nth-child(12) { left: 86%; top: 97%; animation-delay: -1s; animation-duration: 18.5s; }
#screen-auth .home-motes span:nth-child(3n) { width: 2px; height: 2px; background: #ffe2a0; box-shadow: 0 0 8px 3px #efc8709c; }
#screen-auth .home-hero-copy, #screen-auth .home-highlights { position: relative; z-index: 1; }
#screen-auth .home-hero-copy h1 { text-shadow: 0 2px 7px #000, 0 0 22px #e2b96769; }
#screen-auth .home-eyebrow::before, #screen-auth .home-eyebrow::after {
  content: '◆'; display: inline-block; margin: 0 14px; color: #6beaf0; font-size: 9px;
  text-shadow: 0 0 9px #4de2ec; animation: home-gem-fade 2.6s ease-in-out infinite;
}
#screen-auth .home-eyebrow::after { animation-delay: 1.3s; }
#screen-auth .home-button { position: relative; overflow: hidden; transition: transform .2s ease, filter .2s ease, box-shadow .2s ease; }
#screen-auth .home-button::after {
  content: ''; position: absolute; inset: -40% auto -40% -65%; width: 40%; pointer-events: none;
  background: linear-gradient(90deg, transparent, #fff4c771, transparent); transform: skewX(-25deg);
}
#screen-auth .home-button.primary::after { animation: home-button-sheen 4.2s ease-in-out infinite; }
#screen-auth .home-button:hover, #screen-auth .home-button:focus-visible { transform: translateY(-3px); box-shadow: inset 0 0 0 2px #6ddce5, 0 0 20px #48dbe672; }
#screen-auth .home-button:active { transform: translateY(1px); }
#screen-auth .home-highlights { transition: box-shadow .3s ease; }
#screen-auth .home-highlights::before, #screen-auth .home-highlights::after {
  content: ''; position: absolute; top: 50%; width: 8px; height: 8px; border: 1px solid #e2c77e;
  background: #62e3ec; transform: translateY(-50%) rotate(45deg); box-shadow: 0 0 12px #4ce4ef;
  animation: home-gem-pulse 2.6s ease-in-out infinite;
}
#screen-auth .home-highlights::before { left: -5px; }
#screen-auth .home-highlights::after { right: -5px; animation-delay: 1.3s; }
#screen-auth .home-section-heading h2::after {
  content: ''; display: block; width: min(180px, 50%); height: 1px; margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, #d8b96a 40%, #73e2e8 50%, #d8b96a 60%, transparent);
  box-shadow: 0 0 9px #57dce77a;
}
#screen-auth .home-feature-grid article, #screen-auth .home-steps > div {
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
#screen-auth .home-feature-grid article:hover, #screen-auth .home-feature-grid article:focus-within,
#screen-auth .home-steps > div:hover { transform: translateY(-5px); border-color: #6de2e9; box-shadow: inset 0 0 0 2px #1c5963, 0 10px 28px #0008, 0 0 18px #4bdce238; }
#screen-auth .home-feature-grid article:hover svg { filter: drop-shadow(0 0 10px #65e9ee); }
#screen-auth .home-ranking-list { transition: border-color .25s ease, box-shadow .25s ease; }
#screen-auth .home-ranking-list:hover { border-color: #6ddde5; box-shadow: inset 0 0 0 2px #174653, 0 0 20px #4ddce22e; }
#screen-auth .home-auth-dialog[open] .auth-box { animation: home-dialog-enter .25s ease-out both; }
#screen-auth .home-auth-close, #screen-auth .tab, #screen-auth .auth-box .btn.primary { transition: filter .2s ease, border-color .2s ease, box-shadow .2s ease; }
#screen-auth .home-auth-close:hover, #screen-auth .home-auth-close:focus-visible,
#screen-auth .tab:hover, #screen-auth .tab:focus-visible { border-color: #60e0e9; box-shadow: 0 0 11px #4cdce65c; }
#screen-auth .home-reveal { opacity: 0; transform: translateY(18px); }
#screen-auth .home-reveal.is-visible { opacity: 1; transform: translateY(0); transition: opacity .55s ease, transform .55s ease; }

@keyframes home-frame-glow { 50% { box-shadow: inset 0 0 0 2px #236573, inset 0 0 0 3px #b78e4b, 0 10px 32px #0009, 0 0 22px #54dce638; } }
@keyframes home-gem-pulse { 50% { opacity: .65; filter: brightness(1.7); box-shadow: 0 0 17px #66f3f7, 0 0 7px #55dfe9; } }
@keyframes home-gem-fade { 50% { opacity: .45; text-shadow: 0 0 15px #71f6f8; } }
@keyframes home-mote-rise { 0% { opacity: 0; transform: translate3d(0, 12px, 0) scale(.5); } 16% { opacity: .8; } 74% { opacity: .65; } 100% { opacity: 0; transform: translate3d(28px, -105px, 0) scale(1.3); } }
@keyframes home-button-sheen { 0%, 62% { left: -65%; opacity: 0; } 68% { opacity: .65; } 86%, 100% { left: 130%; opacity: 0; } }
@keyframes home-dialog-enter { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes home-play-halo { 50% { opacity: .55; transform: scale(1.13); } }
@keyframes home-play-glint { 0%, 45%, 100% { opacity: 0; transform: rotate(45deg) scale(.4); } 55% { opacity: 1; transform: rotate(45deg) scale(1.3); } 65% { opacity: 0; transform: rotate(45deg) scale(.5); } }
@keyframes home-play-float { 50% { transform: translateY(-4px); filter: drop-shadow(0 12px 14px #000c) drop-shadow(0 0 20px #54caffb5); } }

@media (prefers-reduced-motion: reduce) {
  #portal-transition { display: none; }
  #screen-auth *, #screen-auth *::before, #screen-auth *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  #screen-auth .home-reveal { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  #screen-auth .home-nav { min-height: 108px; padding: 7px 17px; }
  #screen-auth .home-nav-links { grid-template-columns: 1fr 1fr; grid-template-rows: 68px auto; gap: 0 14px; min-height: 0; padding: 0; }
  #screen-auth .home-brand { grid-column: 1 / -1; grid-row: 1; }
  #screen-auth .home-brand img { width: 195px; }
  #screen-auth .home-nav-left { grid-column: 1; grid-row: 2; }
  #screen-auth .home-nav-right { grid-column: 2; grid-row: 2; }
  #screen-auth .home-nav-left, #screen-auth .home-nav-right { gap: 14px; }
  #screen-auth .home-nav-links a:not(.home-brand) { padding: 3px 0; }
  #screen-auth .login-sound { top: 134px; right: 17px; }
  #screen-auth .home-hero { padding-top: 160px; }
}
@media (max-width: 700px) {
  #screen-auth .home-nav { top: 7px; left: 7px; right: 7px; width: auto; padding: 8px 13px; transform: none; }
  #screen-auth .home-brand img { width: 190px; }
  #screen-auth .home-nav-links { column-gap: 8px; }
  #screen-auth .home-nav-left, #screen-auth .home-nav-right { gap: clamp(6px, 2vw, 12px); }
  #screen-auth .home-nav-links a:not(.home-brand) { font-size: 10px; letter-spacing: .8px; }
  #screen-auth .login-sound { top: 126px; right: 11px; width: 34px; height: 34px; }
  /* Tela estreita: a coluna encolhe e cola na borda, senao ela passa por
     cima do texto do heroi, que e centralizado. */
  #screen-auth .home-social { left: 6px; gap: 10px; padding: 16px 5px; }
  #screen-auth .home-social a { width: 26px; height: 26px; }
  #screen-auth .home-social .ic { width: 21px; height: 21px; }
  #screen-auth .login-sound .ic { width: 17px; height: 17px; }
  #screen-auth .home-hero { min-height: max(740px, 100dvh); padding: 160px 16px 20px; }
  #screen-auth .home-hero-copy { margin-bottom: 38px; }
  #screen-auth .home-hero-copy h1 { font-size: clamp(39px, 10vw, 56px); letter-spacing: 2px; }
  #screen-auth .home-hero-copy p { font-size: 13px; }
  #screen-auth .home-play-button { width: min(280px, 72vw); margin-bottom: 0; }
  #screen-auth .home-button { min-width: 140px; min-height: 42px; padding: 8px 12px; font-size: 13px; }
  #screen-auth .home-highlights > div { flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px; }
  #screen-auth .home-highlights svg { width: 20px; height: 20px; }
  #screen-auth .home-highlights b { font-size: 11px; }
  #screen-auth .home-highlights small { display: none; }
  #screen-auth .home-section { padding: 60px 18px; scroll-margin-top: 118px; }
  #screen-auth .home-feature-grid { grid-template-columns: 1fr; }
  #screen-auth .home-feature-grid article { min-height: 140px; }
  #screen-auth .home-ranking-list { padding-left: 42px; }
  #screen-auth .home-steps { display: grid; grid-template-columns: 1fr; gap: 8px; }
  #screen-auth .home-auth-dialog { width: calc(100% - 24px); }
  #screen-auth .auth-box { padding: 17px 22px 21px; }
  #screen-auth .home-auth-brand { width: min(245px, 78%); margin-bottom: 4px; }
  #screen-auth .auth-box h2 { font-size: 25px; }
  #screen-auth .home-auth-intro { margin-bottom: 14px; }
  #screen-auth .tabs { margin-bottom: 15px; }
  #screen-auth label { margin-bottom: 10px; }
  #screen-auth .home-auth-separator { margin: 12px 0 10px; }
}
@media (max-width: 380px) {
  #screen-auth .home-brand img { width: 145px; }
  #screen-auth .home-nav-left, #screen-auth .home-nav-right { gap: 4px; }
  #screen-auth .home-nav-links a:not(.home-brand) { font-size: 9px; letter-spacing: .4px; }
  #screen-auth .login-sound { width: 30px; height: 30px; }
  #screen-auth .login-sound .ic { width: 15px; height: 15px; }
  #screen-auth .home-hero-copy h1 { font-size: 35px; letter-spacing: 1px; white-space: nowrap; }
}
