:root {
  --gm-green: #123f2d;
  --gm-green-deep: #0b2b20;
  --gm-gold: #c7a45b;
  --gm-cream: #f7f2e8;
  --gm-white: #ffffff;
  --gm-ink: #17201c;
  --gm-muted: #6d756f;
  --gm-shadow: 0 24px 65px rgba(4, 22, 15, .28);
}
#gm-chat, #gm-chat * { box-sizing: border-box; }
#gm-chat {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 2147483000;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gm-ink);
}
.gm-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.gm-chat-launcher {
  border: 1px solid rgba(199,164,91,.75);
  border-radius: 999px;
  background: linear-gradient(145deg, var(--gm-green), var(--gm-green-deep));
  color: var(--gm-white);
  min-height: 58px;
  padding: 8px 19px 8px 9px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 13px 34px rgba(4,22,15,.3);
  cursor: pointer;
  font: inherit; letter-spacing: .01em;
}
.gm-chat-launcher:hover { transform: translateY(-1px); }
.gm-chat-launcher:focus-visible, .gm-chat-panel button:focus-visible,
.gm-chat-panel textarea:focus-visible { outline: 3px solid rgba(199,164,91,.45); outline-offset: 3px; }
.gm-chat-launcher-icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: var(--gm-gold);
  background: rgba(255,255,255,.06);
}
.gm-chat-launcher-icon svg { width: 35px; height: 35px; }
.gm-chat-launcher-label { font-size: 14px; font-weight: 650; }
.gm-chat-open .gm-chat-launcher { display: none; }

.gm-chat-panel {
  width: min(390px, calc(100vw - 28px));
  height: min(650px, calc(100vh - 40px));
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(199,164,91,.55);
  background: var(--gm-cream);
  box-shadow: var(--gm-shadow);
}
.gm-chat-header {
  min-height: 82px;
  padding: 15px 14px 15px 16px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--gm-white);
  background:
    linear-gradient(120deg, rgba(255,255,255,.035), transparent 55%),
    var(--gm-green-deep);
  border-bottom: 2px solid var(--gm-gold);
}
.gm-chat-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.gm-chat-brand strong {
  display: block; font-family: Georgia, "Times New Roman", serif;
  font-size: 17px; font-weight: 500; letter-spacing: .015em;
}
.gm-chat-brand span:not(.gm-chat-mark) {
  display: block; margin-top: 3px; color: rgba(255,255,255,.7); font-size: 11px;
}
.gm-chat-mark { width: 44px; height: 44px; color: var(--gm-gold); flex: 0 0 auto; }
.gm-chat-mark svg { width: 44px; height: 44px; }
.gm-chat-close {
  appearance: none; border: 0; background: transparent; color: rgba(255,255,255,.8);
  width: 38px; height: 38px; border-radius: 50%; font-size: 29px; line-height: 1;
  cursor: pointer;
}
.gm-chat-close:hover { background: rgba(255,255,255,.08); color: white; }

.gm-chat-messages {
  height: calc(100% - 82px - 117px - 33px);
  min-height: 240px;
  padding: 18px 14px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at top right, rgba(199,164,91,.08), transparent 32%),
    var(--gm-cream);
}
.gm-chat-message { display: flex; margin: 0 0 12px; }
.gm-chat-message > div {
  max-width: 86%; padding: 11px 13px; border-radius: 14px;
  font-size: 14px; line-height: 1.48; overflow-wrap: anywhere;
}
.gm-chat-message strong {
  font-weight: 700;
}
.gm-chat-message a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.gm-chat-message a:hover {
  opacity: 0.78;
}
.gm-chat-assistant > div {
  background: white; border: 1px solid rgba(18,63,45,.12);
  border-bottom-left-radius: 4px; box-shadow: 0 4px 13px rgba(18,63,45,.06);
}
.gm-chat-user { justify-content: flex-end; }
.gm-chat-user > div {
  background: var(--gm-green); color: white; border-bottom-right-radius: 4px;
}
.gm-chat-prompts {
  height: 50px; display: flex; gap: 7px; overflow-x: auto;
  padding: 7px 12px 6px; scrollbar-width: none; background: rgba(255,255,255,.58);
  border-top: 1px solid rgba(18,63,45,.08);
}
.gm-chat-prompts::-webkit-scrollbar { display: none; }
.gm-chat-prompts button {
  flex: 0 0 auto; border: 1px solid rgba(18,63,45,.2); border-radius: 999px;
  background: white; color: var(--gm-green-deep); padding: 6px 10px;
  font: 600 11px/1.2 inherit; cursor: pointer;
}
.gm-chat-prompts button:hover { border-color: var(--gm-gold); }

.gm-chat-form {
  min-height: 67px; padding: 9px 10px; display: grid; grid-template-columns: 1fr 44px;
  gap: 8px; align-items: end; background: white; border-top: 1px solid rgba(18,63,45,.1);
}
.gm-chat-form textarea {
  width: 100%; min-height: 44px; max-height: 116px; resize: none;
  border: 1px solid rgba(18,63,45,.22); border-radius: 12px; background: #fff;
  padding: 11px 12px; font: 14px/1.4 inherit; color: var(--gm-ink);
}
.gm-chat-form button {
  width: 44px; height: 44px; border: 0; border-radius: 12px;
  display: grid; place-items: center; background: var(--gm-green); cursor: pointer;
}
.gm-chat-form button svg { width: 20px; fill: white; }
.gm-chat-form button:disabled, .gm-chat-form textarea:disabled { opacity: .55; cursor: wait; }
.gm-chat-footer {
  height: 33px; padding: 8px 12px; text-align: center;
  background: white; color: var(--gm-muted); font-size: 10px;
}
.gm-chat-typing i {
  display: inline-block; width: 6px; height: 6px; margin-right: 4px;
  border-radius: 50%; background: var(--gm-green); opacity: .35;
  animation: gmPulse 1.1s infinite;
}
.gm-chat-typing i:nth-child(2) { animation-delay: .15s; }
.gm-chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gmPulse { 0%, 60%, 100% { transform: translateY(0); opacity: .3; } 30% { transform: translateY(-4px); opacity: .9; } }

@media (max-width: 560px) {
  #gm-chat { right: 10px; bottom: 10px; }
  .gm-chat-panel {
    width: calc(100vw - 20px);
    height: min(720px, calc(100dvh - 20px));
    border-radius: 16px;
  }
  .gm-chat-launcher-label { display: none; }
  .gm-chat-launcher { padding: 7px; min-height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  #gm-chat *, #gm-chat *::before, #gm-chat *::after { animation: none !important; scroll-behavior: auto !important; }
}
