/* Estratégia → Galaxy Connections. Um universo escuro próprio, igual nos temas
   claro e escuro: é um espaço de observação, não uma tela de formulário. */
.gx-root {
  --gx-ink: #e8eeff; --gx-mute: rgba(214, 224, 255, 0.62); --gx-line: rgba(150, 180, 255, 0.16);
  --gx-glass: rgba(9, 13, 30, 0.58); --gx-accent: #ffc861;
  position: relative; height: calc(100vh - 190px); min-height: 560px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, #0a0d22 0%, #04050b 70%); color: var(--gx-ink);
  isolation: isolate; box-shadow: 0 30px 80px -40px rgba(20, 40, 120, 0.6), inset 0 0 0 1px rgba(120, 150, 255, 0.08);
  font-feature-settings: 'tnum' 1;
}
.gx-stage { position: absolute; inset: 0; }
.gx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.gx-canvas:active { cursor: grabbing; }

/* vidro */
.gx-title, .gx-panel, .gx-toolbar, .gx-legend, .gx-caption, .gx-route, .gx-results, .gx-hover, .gx-search {
  background: var(--gx-glass); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--gx-line); box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.8);
}

.gx-title { position: absolute; top: 16px; left: 16px; padding: 12px 16px 11px; border-radius: 14px; z-index: 3; max-width: min(560px, calc(100% - 32px)); }
.gx-title h2 {
  margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase;
  background: linear-gradient(90deg, #fff 0%, #ffd9a0 35%, #c79bff 70%, #7cf0c8 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gx-title p { margin: 5px 0 0; font-size: 12px; color: var(--gx-mute); letter-spacing: 0.02em; }

.gx-find { position: absolute; top: 16px; right: 16px; width: min(340px, calc(100% - 32px)); z-index: 4; }
.gx-search { width: 100%; height: 38px; border-radius: 12px; padding: 0 14px; color: var(--gx-ink); font: inherit; font-size: 13px; outline: none; }
.gx-search::placeholder { color: var(--gx-mute); }
.gx-search:focus { border-color: rgba(255, 200, 97, 0.55); box-shadow: 0 0 0 3px rgba(255, 200, 97, 0.12); }
.gx-results { margin-top: 6px; border-radius: 12px; max-height: 320px; overflow: auto; padding: 4px; }
.gx-result { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: none; color: var(--gx-ink); text-align: left; font: inherit; font-size: 13px; border-radius: 8px; cursor: pointer; }
.gx-result:hover, .gx-result:focus-visible { background: rgba(150, 180, 255, 0.12); outline: none; }
.gx-result small { color: var(--gx-mute); }

.gx-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #9cc8ff; box-shadow: 0 0 8px currentColor; color: #9cc8ff; }
.gx-dot--area { background: #ffd9a0; color: #ffd9a0; }
.gx-dot--external { background: #fff; color: #9fd2ff; }
.gx-dot--tool { width: 6px; height: 6px; background: #bfe3ff; }
.gx-dot--core { background: #ffcf8a; color: #ffcf8a; }

.gx-hover { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; font-size: 12.5px; display: flex; gap: 8px; align-items: center; z-index: 3; pointer-events: none; white-space: nowrap; }
.gx-hover small { color: var(--gx-mute); }

/* rótulos que acompanham os astros */
.gx-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.gx-label {
  position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; background: none; padding: 2px 6px; margin: 0; cursor: pointer;
  color: rgba(232, 238, 255, 0.86); font: inherit; font-size: 11.5px; line-height: 1.2; white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  display: flex; flex-direction: column; align-items: center; will-change: transform; transition: color 0.2s, opacity 0.2s;
}
.gx-label:hover, .gx-label.is-hot { color: #fff; }
.gx-label--area .gx-label-main { font-size: 12.5px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gx-c, #ffd9a0); text-shadow: 0 0 18px var(--gx-c, #ffd9a0), 0 1px 6px #000; }
.gx-label-sub { font-size: 10px; letter-spacing: 0.08em; color: var(--gx-mute); margin-top: 2px; }
.gx-label--core .gx-label-main { font-size: 13px; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; color: #ffe2b8; text-shadow: 0 0 20px #ffb35c; }
.gx-label--module .gx-label-main { font-weight: 600; }
.gx-label--ext .gx-label-main::before { content: '✦ '; color: #fff; }
.gx-label--ext { color: rgba(220, 236, 255, 0.8); font-size: 11px; }
.gx-label--tool { font-size: 10.5px; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; color: #bfe3ff; }
.gx-label--tool.is-write { color: #ffc48a; }
.gx-label--stop { font-size: 11.5px; color: #fff; background: rgba(255, 120, 190, 0.18); border: 1px solid rgba(255, 150, 210, 0.45); border-radius: 8px; padding: 3px 8px; }
.gx-label--stop .gx-label-sub { color: rgba(255, 230, 245, 0.8); }

/* painel do astro escolhido */
.gx-panel {
  position: absolute; top: 66px; right: 16px; bottom: 76px; width: min(380px, calc(100% - 32px)); border-radius: 16px; z-index: 4;
  display: flex; flex-direction: column; overflow: hidden; animation: gx-in 0.35s cubic-bezier(.2, .8, .2, 1);
  border-top: 2px solid var(--gx-c, #9cc8ff);
}
@keyframes gx-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.gx-panel-head { position: relative; padding: 14px 16px 10px; border-bottom: 1px solid var(--gx-line); }
.gx-panel-head h2 { margin: 6px 0 0; font-size: 19px; line-height: 1.25; font-weight: 700; }
.gx-sub { margin: 4px 0 0; color: var(--gx-mute); font-size: 12.5px; }
.gx-kind { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gx-c, #9cc8ff); font-weight: 700; }
.gx-x { position: absolute; top: 10px; right: 10px; border: 0; background: rgba(255, 255, 255, 0.06); color: var(--gx-ink); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.gx-x:hover { background: rgba(255, 255, 255, 0.14); }
.gx-panel-body { padding: 12px 16px 16px; overflow: auto; font-size: 13px; line-height: 1.5; }
.gx-panel-body h3 { margin: 16px 0 6px; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gx-mute); font-weight: 700; }
.gx-desc { margin: 0; color: rgba(232, 238, 255, 0.9); }
.gx-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 12px; }
.gx-stats--tight { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gx-stat { background: rgba(150, 180, 255, 0.07); border: 1px solid var(--gx-line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.gx-stat b { font-size: 17px; font-weight: 700; color: #fff; }
.gx-stat span { font-size: 11px; color: var(--gx-mute); line-height: 1.3; }
.gx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-chip { border: 1px solid var(--gx-line); background: rgba(150, 180, 255, 0.06); color: var(--gx-ink); border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.gx-chip:hover { border-color: var(--gx-c, #9cc8ff); }
.gx-open { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 7px 12px; border-radius: 10px; background: rgba(255, 200, 97, 0.12); border: 1px solid rgba(255, 200, 97, 0.35); color: #ffe0a8; text-decoration: none; font: inherit; font-size: 12.5px; cursor: pointer; }
.gx-open:hover { background: rgba(255, 200, 97, 0.2); }
.gx-flows, .gx-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gx-flow, .gx-tool { width: 100%; text-align: left; border: 0; background: rgba(150, 180, 255, 0.05); color: var(--gx-ink); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 12.5px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.gx-flow:hover, .gx-tool:hover { background: rgba(150, 180, 255, 0.13); }
.gx-flow span, .gx-tool span { color: var(--gx-mute); font-size: 11.5px; }
.gx-tool code { font-size: 11.5px; color: #bfe3ff; }
.gx-tool.is-write code { color: #ffc48a; }
.gx-tool.is-write code::after { content: ' · age'; color: rgba(255, 196, 138, 0.7); font-family: inherit; }

/* barra de controles */
.gx-toolbar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; display: flex; gap: 4px; padding: 5px; border-radius: 14px; z-index: 4; max-width: calc(100% - 32px); flex-wrap: wrap; justify-content: center; }
.gx-btn { height: 34px; min-width: 34px; padding: 0 10px; border-radius: 10px; border: 0; background: transparent; color: var(--gx-ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 12.5px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.gx-btn:hover { background: rgba(150, 180, 255, 0.14); }
.gx-btn:focus-visible { outline: 2px solid rgba(255, 200, 97, 0.7); outline-offset: 1px; }
.gx-btn.is-on { background: rgba(255, 200, 97, 0.16); color: #ffe0a8; }
.gx-btn--accent { background: linear-gradient(135deg, rgba(255, 200, 97, 0.28), rgba(255, 110, 190, 0.24)); color: #fff; font-weight: 600; }
.gx-btn--accent:hover { background: linear-gradient(135deg, rgba(255, 200, 97, 0.4), rgba(255, 110, 190, 0.36)); }

.gx-legend { position: absolute; left: 16px; bottom: 16px; z-index: 3; border-radius: 12px; padding: 9px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--gx-mute); }
.gx-legend span { display: flex; align-items: center; gap: 8px; }
.gx-lg { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.gx-lg--core { background: radial-gradient(circle, #000 35%, #ffcf8a 40%, transparent 72%); box-shadow: 0 0 8px #ffb35c; }
.gx-lg--area { background: radial-gradient(circle, #ffe2b8, #c79bff 60%, transparent 72%); }
.gx-lg--module { background: radial-gradient(circle at 35% 35%, #9de7ff, #2d5a8a); box-shadow: 0 0 6px #5fb7ff; }
.gx-lg--tool { width: 6px; height: 6px; margin: 0 2px; background: #ffc48a; box-shadow: 0 0 5px #ffc48a; }
.gx-lg--ext { background: #fff; box-shadow: 0 0 9px 2px #9fd2ff; }
.gx-lg--flow { width: 16px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #9cc8ff, #fff); }

.gx-hint { position: absolute; bottom: 62px; left: 50%; transform: translateX(-50%); margin: 0; font-size: 11px; color: rgba(214, 224, 255, 0.4); z-index: 2; pointer-events: none; white-space: nowrap; }

/* tour */
.gx-caption { position: absolute; left: 50%; bottom: 86px; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); border-radius: 14px; padding: 12px 16px; z-index: 4; animation: gx-up 0.4s cubic-bezier(.2, .8, .2, 1); }
@keyframes gx-up { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.gx-caption small { color: var(--gx-mute); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; }
.gx-caption b { display: block; font-size: 16px; margin-top: 2px; }
.gx-caption p { margin: 4px 0 0; font-size: 13px; color: rgba(232, 238, 255, 0.86); line-height: 1.45; }

/* rota do comprador */
.gx-route { position: absolute; top: 66px; left: 16px; bottom: 76px; width: min(400px, calc(100% - 32px)); border-radius: 16px; padding: 12px; z-index: 4; display: flex; flex-direction: column; gap: 10px; border-top: 2px solid #ff7ac0; }
.gx-route-row { display: flex; gap: 6px; }
.gx-route-row .gx-search { flex: 1; }
.gx-route-out { overflow: auto; flex: 1; font-size: 13px; }
.gx-route-head { display: flex; flex-direction: column; gap: 2px; }
.gx-route-head small { color: #ffb3dc; font-size: 11.5px; }
.gx-route-actions { display: flex; gap: 6px; margin: 10px 0; }
.gx-steps { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid rgba(255, 150, 210, 0.3); display: flex; flex-direction: column; gap: 6px; }
.gx-step { position: relative; padding: 6px 8px; border-radius: 8px; transition: background 0.3s; display: flex; flex-direction: column; gap: 1px; }
.gx-step::before { content: ''; position: absolute; left: -19px; top: 11px; width: 9px; height: 9px; border-radius: 50%; background: #2a2440; border: 1px solid rgba(255, 150, 210, 0.6); }
.gx-step.is-on { background: rgba(255, 120, 190, 0.12); }
.gx-step.is-on::before { background: #ff7ac0; box-shadow: 0 0 10px #ff7ac0; }
.gx-step time { font-size: 10.5px; color: var(--gx-mute); }
.gx-step span { font-size: 12px; color: rgba(232, 238, 255, 0.75); }
.gx-step--compra b, .gx-step--pagamento b { color: #ffd98a; }
.gx-step--reembolso b { color: #ff9a9a; }
.gx-gaps { margin-top: 12px; font-size: 12px; color: var(--gx-mute); }
.gx-gaps summary { cursor: pointer; color: #ffc48a; }
.gx-gaps ul { margin: 6px 0 0; padding-left: 18px; }
.gx-err { color: #ff9a9a; }

.gx-fallback { padding: 16px; }
.gx-fb-area h3 { margin: 16px 0 4px; }

@media (max-width: 760px) {
  .gx-root { height: calc(100vh - 150px); border-radius: 12px; }
  .gx-title { top: 10px; left: 10px; padding: 9px 12px; }
  .gx-title p { font-size: 11px; }
  .gx-find { top: 96px; right: 10px; left: 10px; width: auto; }
  .gx-find .gx-search { height: 34px; }
  .gx-legend, .gx-hint, .gx-hover { display: none; }
  .gx-panel, .gx-route { top: auto; left: 10px; right: 10px; bottom: 62px; width: auto; max-height: 56%; }
  .gx-caption { bottom: 62px; }
  .gx-toolbar { bottom: 10px; }
  .gx-btn span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .gx-panel, .gx-caption { animation: none; } }
