/* Solaris Genesis — botão flutuante "Fale com a Genesis" (dourado e preto). */
.gg {
  --gg-fundo: #0a0907;
  --gg-cartao: rgba(255, 255, 255, .035);
  --gg-borda: var(--linha, rgba(200, 147, 43, .24));
  --gg-texto: var(--texto, #ece6d6);
  --gg-texto-2: var(--texto-2, #b9b09b);
  --gg-ouro: var(--gold, #f0c95a);
  --gg-ouro-claro: var(--gold-claro, #f6dc86);
  --gg-foco: #fff1b8;
  font-family: var(--corpo, system-ui, sans-serif);
  color: var(--gg-texto);
}
.gg *, .gg *::before, .gg *::after { box-sizing: border-box; }

/* O aviso de versão de teste vai para o canto esquerdo: o direito é do botão. */
.aviso-teste { right: auto; left: 12px; }

/* ── Lançador ── */
.gg-lancador {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 18px 6px 6px; border-radius: 999px; cursor: pointer;
  color: var(--gg-texto); font: inherit; text-align: left;
  background: linear-gradient(180deg, rgba(22, 18, 10, .96), rgba(7, 7, 7, .96));
  border: 1px solid rgba(240, 201, 90, .55);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .4), 0 0 28px rgba(240, 201, 90, .18);
  transition: transform .2s ease, box-shadow .2s ease;
}
.gg-lancador:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(0, 0, 0, .6), 0 0 36px rgba(240, 201, 90, .3); }
.gg-sol {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #1b1306 0%, #070707 72%);
}
.gg-sol img {
  width: 100%; height: auto; display: block; mix-blend-mode: lighten;
  -webkit-mask-image: radial-gradient(circle, #000 58%, transparent 72%); mask-image: radial-gradient(circle, #000 58%, transparent 72%);
}
.gg-lancador .gg-sol { animation: gg-brilho 4.5s ease-in-out infinite; }
@keyframes gg-brilho { 0%, 100% { box-shadow: 0 0 10px rgba(240, 201, 90, .25); } 50% { box-shadow: 0 0 22px rgba(240, 201, 90, .55); } }
.gg-lancador-txt { display: grid; line-height: 1.2; }
.gg-lancador-txt strong { font-size: 15px; color: var(--gg-ouro-claro); letter-spacing: .02em; }
.gg-lancador-txt small { font-size: 12px; color: var(--gg-texto-2); }
.gg-aberto .gg-lancador { opacity: 0; pointer-events: none; transform: scale(.9); }
/* Com a janela "Pedir pacote" aberta, o botão da Genesis some para não cobrir os botões dela. */
body:has(.modal-pacote:not([hidden])) .gg-lancador { opacity: 0; pointer-events: none; }

/* ── Painel ── */
.gg-painel {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 61;
  width: min(410px, calc(100vw - 32px)); height: min(640px, calc(100vh - 32px)); height: min(640px, calc(100dvh - 32px));
  display: flex; flex-direction: column; overflow: hidden; padding: 0; /* o painel é <section>: não herda o espaço das seções do site */
  background: var(--gg-fundo); border: 1px solid rgba(240, 201, 90, .45); border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7), 0 0 40px rgba(240, 201, 90, .12);
  animation: gg-surge .22s ease-out both;
}
.gg-painel[hidden] { display: none; }
@keyframes gg-surge { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.gg-topo {
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px;
  border-bottom: 1px solid var(--gg-borda);
  background: linear-gradient(180deg, rgba(240, 201, 90, .08), transparent);
}
.gg-sol-p { width: 40px; height: 40px; }
.gg-id { flex: 1; min-width: 0; }
.gg-id h2 {
  margin: 0; font-family: var(--titulo, serif); font-size: 19px; letter-spacing: .12em; line-height: 1.1;
  background: var(--gold-grad, linear-gradient(135deg, #fff1b8, #f0c95a 40%, #c8932b)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gg-id h2:focus { outline: none; }
.gg-id h2:focus-visible { outline: 2px solid var(--gg-foco); outline-offset: 3px; border-radius: 4px; }
.gg-id p { margin: 2px 0 0; font-size: 12px; color: var(--gg-texto-2); }

.gg-icone {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--gg-borda); background: transparent; color: var(--gg-texto);
}
.gg-icone:hover { border-color: var(--gg-ouro); color: var(--gg-ouro-claro); }
.gg svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.gg-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px 6px; overscroll-behavior: contain; }

/* Acessibilidade */
.gg-acess { margin: 0 0 12px; border: 1px solid var(--gg-borda); border-radius: 14px; background: var(--gg-cartao); }
.gg-acess summary { cursor: pointer; padding: 10px 14px; font-size: 14px; color: var(--gg-ouro-claro); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.gg-acess summary::-webkit-details-marker { display: none; }
.gg-acess summary::after { content: "+"; font-size: 18px; line-height: 1; color: var(--gg-ouro); }
.gg-acess[open] summary::after { content: "–"; }
.gg-acess-lista { display: grid; gap: 4px; padding: 0 10px 10px; }
.gg-op { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-radius: 10px; cursor: pointer; }
.gg-op:hover { background: rgba(240, 201, 90, .06); }
.gg-op input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gg-ouro); cursor: pointer; }
.gg-op input:disabled + span { opacity: .55; }
.gg-op span { display: grid; gap: 2px; }
.gg-op strong { font-size: 14px; font-weight: 600; }
.gg-op small { font-size: 12.5px; color: var(--gg-texto-2); line-height: 1.4; }
.gg-acess-nota { margin: 4px 6px 0; font-size: 12px; color: var(--gg-texto-2); }

/* Mensagens */
.gg-msgs { display: grid; gap: 10px; }
.gg-msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.gg-msg p { margin: 0; }
.gg-msg p + p { margin-top: 6px; }
.gg-rotulo { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 3px; color: var(--gg-ouro); }
.gg-msg-ela { justify-self: start; background: var(--gg-cartao); border: 1px solid var(--gg-borda); border-bottom-left-radius: 6px; }
.gg-msg-voce { justify-self: end; background: linear-gradient(135deg, rgba(240, 201, 90, .22), rgba(200, 147, 43, .14)); border: 1px solid rgba(240, 201, 90, .4); border-bottom-right-radius: 6px; }
.gg-msg-voce .gg-rotulo { color: var(--gg-ouro-claro); text-align: right; }
.gg-ver { display: inline-block; margin-top: 8px; font-size: 13.5px; color: var(--gg-ouro-claro); text-decoration: underline; text-underline-offset: 3px; }

.gg-sugestoes { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.gg-sugestoes[hidden] { display: none; }
.gg-sugestoes button {
  font: inherit; font-size: 13.5px; cursor: pointer; padding: 8px 12px; border-radius: 999px;
  color: var(--gg-ouro-claro); background: transparent; border: 1px solid rgba(240, 201, 90, .45);
}
.gg-sugestoes button:hover { background: rgba(240, 201, 90, .1); }

/* Contadores (servidor) e aviso de limite */
.gg-cotas { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between; padding: 6px 14px; border-top: 1px solid var(--gg-borda); }
.gg-cotas[hidden], .gg-esgotou[hidden] { display: none; }
.gg-cotas p { margin: 0; font-size: 13px; color: var(--gg-texto); }
.gg-cotas p:first-child { color: var(--gg-ouro-claro); font-weight: 600; }
.gg-esgotou { margin: 6px 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--gg-ouro); background: rgba(240, 201, 90, .08); }
.gg-esgotou p { margin: 0 0 4px; font-size: 13.5px; line-height: 1.45; color: var(--gg-texto); }
.gg-esgotou p:last-child { margin: 0; }
.gg-esgotou a { color: var(--gg-ouro-claro); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.gg-letras { margin: -4px 14px 4px; font-size: 12px; text-align: right; color: var(--gg-texto-2); }
.gg-letras.gg-letras-fim { color: var(--gg-ouro-claro); font-weight: 600; }
.gg-verif:empty { display: none; }
.gg-form textarea:disabled, .gg-mic:disabled { opacity: .55; cursor: not-allowed; }
html.gg-maior .gg-cotas p, html.gg-maior .gg-esgotou p { font-size: 15.5px; }
html.gg-contraste .gg-esgotou { background: #000; border: 2px solid #ffd84d; }
html.gg-contraste .gg-esgotou a, html.gg-contraste .gg-cotas p { color: #fff; }

.gg-estado { min-height: 0; padding: 0 14px; font-size: 13px; color: var(--gg-texto-2); }
.gg-estado:not(:empty) { padding: 4px 14px 6px; }
.gg-ditado { margin: 0 14px 6px; padding: 8px 10px; font-size: 13.5px; border-radius: 10px; border: 1px dashed var(--gg-borda); color: var(--gg-texto); }

/* Formulário */
.gg-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--gg-borda); }
.gg-form textarea {
  flex: 1; min-width: 0; resize: none; max-height: 140px; padding: 10px 12px; border-radius: 14px;
  font: inherit; font-size: 16px; line-height: 1.4; color: var(--gg-texto);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--gg-borda);
}
.gg-form textarea::placeholder { color: var(--gg-texto-2); opacity: .85; }
.gg-mic {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; cursor: pointer; border-radius: 50%;
  color: var(--gg-ouro-claro); background: transparent; border: 1px solid rgba(240, 201, 90, .5);
}
.gg-mic[hidden] { display: none; }
.gg-mic.gg-ouvindo { color: #070707; background: var(--gg-ouro); animation: gg-ouvir 1.2s ease-in-out infinite; }
@keyframes gg-ouvir { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 201, 90, .55); } 50% { box-shadow: 0 0 0 8px rgba(240, 201, 90, 0); } }
.gg-enviar {
  height: 44px; padding: 0 16px; flex: none; cursor: pointer; border: 0; border-radius: 14px;
  font: inherit; font-weight: 700; font-size: 15px; color: #1a1205;
  background: var(--gold-grad, linear-gradient(135deg, #fff1b8, #f0c95a 40%, #c8932b));
}
.gg-enviar:disabled { opacity: .6; cursor: progress; }

.gg-pe { padding: 0 14px 10px; }
.gg-aviso-mic { margin: 0 0 4px; font-size: 12px; color: var(--gg-texto-2); }
.gg-pe-acoes { display: flex; gap: 14px; justify-content: flex-end; }
.gg-link { font: inherit; font-size: 12.5px; cursor: pointer; padding: 4px 2px; background: none; border: 0; color: var(--gg-texto-2); text-decoration: underline; text-underline-offset: 3px; }
.gg-link:hover { color: var(--gg-ouro-claro); }
.gg-link[hidden] { display: none; }

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

/* Foco visível em tudo que se usa pelo teclado */
.gg :is(button, a, textarea, input, summary):focus-visible { outline: 3px solid var(--gg-foco); outline-offset: 2px; }
.gg-lancador:focus-visible { outline-offset: 4px; }

/* ── Texto maior ── */
/* !important: a escolha de acessibilidade da pessoa vale acima do tamanho fixo de cada seção. */
html.gg-maior main :is(p, li, summary, dd, dt) { font-size: max(1.15em, 18px) !important; line-height: 1.6 !important; }
html.gg-maior .gg-painel { width: min(470px, calc(100vw - 32px)); }
html.gg-maior .gg-msg { font-size: 18px; }
html.gg-maior .gg-op strong, html.gg-maior .gg-acess summary { font-size: 16.5px; }
html.gg-maior .gg-op small, html.gg-maior .gg-estado, html.gg-maior .gg-sugestoes button { font-size: 15px; }
html.gg-maior .gg-form textarea { font-size: 18px; }
html.gg-maior .gg-lancador-txt strong { font-size: 17px; }

/* ── Alto contraste ── */
html.gg-contraste {
  --texto: #ffffff; --texto-2: #f1f1f1; --linha: rgba(255, 220, 110, .85);
  --gold: #ffd84d; --gold-claro: #ffe98a;
}
html.gg-contraste .gg { --gg-fundo: #000; --gg-cartao: #000; --gg-borda: #ffd84d; --gg-texto: #fff; --gg-texto-2: #f1f1f1; --gg-foco: #fff; }
html.gg-contraste .gg-painel, html.gg-contraste .gg-lancador { background: #000; border: 2px solid #ffd84d; }
html.gg-contraste .gg-msg-voce { background: #1c1500; border-color: #ffd84d; }
html.gg-contraste .gg-op input { outline: 2px solid #ffd84d; outline-offset: 1px; border-radius: 3px; }
html.gg-contraste .gg-ver, html.gg-contraste .gg-link { color: #ffe98a; }
html.gg-contraste .gg :is(button, a, textarea, input, summary):focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #000; }

/* ── Celular: painel em folha de baixo ── */
@media (max-width: 560px) {
  .gg-lancador { padding: 5px; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .gg-lancador-txt { display: none; }
  .gg-painel {
    right: 0; left: 0; bottom: 0; width: 100%; border-radius: 22px 22px 0 0; border-bottom: 0;
    height: min(86vh, 680px); height: min(86dvh, 680px); padding-bottom: env(safe-area-inset-bottom);
  }
  html.gg-maior .gg-painel { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .gg-lancador .gg-sol, .gg-mic.gg-ouvindo, .gg-painel { animation: none; }
  .gg-lancador { transition: none; }
}
