/* Tela de carregamento (só aparece na primeira visita de cada sessão) */
body.carregando { overflow: hidden; }
.carregamento[hidden] { display: none; }
html[data-carregamento="pulado"] .carregamento { display: none; }

  /* =========================================================
     TELA DE CARREGAMENTO
     ========================================================= */
  .carregamento {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background-color: var(--fundo);
    background-image:
      linear-gradient(var(--grade) 1px, transparent 1px),
      linear-gradient(90deg, var(--grade) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: center top;
    padding: env(safe-area-inset-top, 0px) 24px env(safe-area-inset-bottom, 0px);
    opacity: 1;
    transition: opacity .55s ease;
  }
  .carregamento.saindo { opacity: 0; pointer-events: none; }

  .carregamento .topo-carga {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -.01em;
    text-align: center;
  }
  .carregamento .centro {
    flex: 1;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
  }
  .carregamento .topo-carga { margin-bottom: 40px; }   /* distância zatrish → animação */
  .carregamento .barra { margin-top: 28px; }     /* animação → barra */

  /* Constelação */
  .constelacao { display: block; width: 100%; height: auto; overflow: visible; }
  .traco {
    stroke: var(--tinta);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    animation: desenha .7s cubic-bezier(.6, 0, .2, 1) both;
    animation-delay: calc(var(--i) * 110ms);
  }
  @keyframes desenha { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  .halo { fill: var(--fundo); }
  .estrela {
    fill: var(--tinta);
    font-size: 34px;
    transform-box: fill-box;
    transform-origin: center;
    animation: brilho 1.9s cubic-bezier(.3, 1.3, .5, 1) infinite;
    animation-delay: calc(var(--i) * 90ms + .5s);
  }
  @keyframes brilho {
    0%   { transform: scale(1); }
    22%  { transform: scale(1.6); }
    48%  { transform: scale(1); }
    100% { transform: scale(1); }
  }

  /* Barrinha delicada */
  .barra {
    width: min(280px, 62vw);
    height: 2px;
    background: var(--trilho);
    border-radius: 2px;
    overflow: hidden;
  }
  .barra i {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--tinta);
    transform: scaleX(0);
    transform-origin: left center;
  }

  .carregamento .bordao {
    width: 100%;
    margin: 40px 0 0;                            /* mesma distância: barra → frase */
    text-align: center;
    color: var(--tinta);
    font-size: clamp(1.5rem, 1rem + 2.4vw, 2.25rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.025em;
    text-wrap: balance;
  }

