.ghc-root {
  --ghc-gold: #f2c200;
  --ghc-gold-dark: #d4a900;
  --ghc-ink: #17171a;
  --ghc-ink-2: #232329;
  --ghc-text: #ffffff;
  --ghc-muted: #b9b9c2;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99990;
  font-family: inherit, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
.ghc-root *, .ghc-root *::before, .ghc-root *::after { box-sizing: border-box; }

.ghc-launcher {
  width: 60px; height: 60px; border-radius: 50%;
  border: 0; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--ghc-gold); color: var(--ghc-ink);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: transform .15s ease, background .15s ease;
}
.ghc-launcher:hover { background: var(--ghc-gold-dark); transform: scale(1.06); }
.ghc-launcher:focus-visible, .ghc-chip:focus-visible, .ghc-send:focus-visible,
.ghc-close:focus-visible, .ghc-input:focus-visible, .ghc-link:focus-visible {
  outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--ghc-ink);
}

.ghc-panel {
  position: absolute; right: 0; bottom: 76px;
  width: 360px; max-width: calc(100vw - 32px);
  height: 520px; max-height: calc(100vh - 120px);
  display: none; flex-direction: column;
  background: var(--ghc-ink); color: var(--ghc-text);
  border: 1px solid #34343c; border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
}
.ghc-open .ghc-panel { display: flex; animation: ghc-in .18s ease-out; }
@keyframes ghc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ghc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--ghc-ink-2);
  border-bottom: 2px solid var(--ghc-gold);
}
.ghc-title { display: flex; flex-direction: column; }
.ghc-title strong { color: var(--ghc-gold); font-size: 17px; letter-spacing: .02em; }
.ghc-title span { color: var(--ghc-muted); font-size: 12.5px; }
.ghc-close {
  background: none; border: 0; color: var(--ghc-text); cursor: pointer;
  font-size: 28px; line-height: 1; padding: 0 6px; border-radius: 6px;
}
.ghc-close:hover { color: var(--ghc-gold); }

.ghc-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ghc-msg { display: flex; }
.ghc-user { justify-content: flex-end; }
.ghc-bubble { max-width: 86%; padding: 10px 13px; border-radius: 14px; word-wrap: break-word; }
.ghc-bubble p { margin: 0; }
.ghc-bot .ghc-bubble { background: var(--ghc-ink-2); border: 1px solid #34343c; border-bottom-left-radius: 4px; }
.ghc-user .ghc-bubble { background: var(--ghc-gold); color: var(--ghc-ink); border-bottom-right-radius: 4px; font-weight: 500; }

.ghc-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ghc-link {
  display: inline-block; padding: 5px 11px; border-radius: 999px;
  background: transparent; color: var(--ghc-gold) !important; border: 1px solid var(--ghc-gold);
  font-size: 13px; text-decoration: none !important;
}
.ghc-link:hover { background: var(--ghc-gold); color: var(--ghc-ink) !important; }

.ghc-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ghc-chip {
  cursor: pointer; padding: 7px 12px; border-radius: 999px; font: inherit; font-size: 13.5px;
  background: transparent; color: var(--ghc-text); border: 1px solid #55555f;
}
.ghc-chip:hover { border-color: var(--ghc-gold); color: var(--ghc-gold); }

.ghc-typing { display: flex; gap: 4px; align-items: center; padding: 13px 14px; }
.ghc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ghc-muted); animation: ghc-dot 1s infinite ease-in-out; }
.ghc-typing span:nth-child(2) { animation-delay: .15s; }
.ghc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ghc-dot { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.ghc-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #34343c; background: var(--ghc-ink-2); }
.ghc-input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 16px;
  background: var(--ghc-ink); color: var(--ghc-text); border: 1px solid #55555f;
}
.ghc-input::placeholder { color: var(--ghc-muted); }
.ghc-send {
  padding: 0 16px; border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600;
  background: var(--ghc-gold); color: var(--ghc-ink);
}
.ghc-send:hover { background: var(--ghc-gold-dark); }
.ghc-note { margin: 0; padding: 0 12px 9px; background: var(--ghc-ink-2); color: var(--ghc-muted); font-size: 11.5px; text-align: center; }

@media (max-width: 480px) {
  .ghc-root { right: 12px; bottom: 12px; }
  .ghc-panel { position: fixed; right: 8px; left: 8px; bottom: 84px; width: auto; max-width: none; height: calc(100vh - 110px); }
}
@media (prefers-reduced-motion: reduce) {
  .ghc-open .ghc-panel, .ghc-typing span, .ghc-launcher { animation: none; transition: none; }
}
