/* Guga layers keep the hit target stable; motion never changes layout. */
.home-page .chatbot-container {
  position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9999; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; width: 96px;
}
.home-page #chat-toggle-btn,
.home-page #chat-toggle-btn:hover,
.home-page #chat-toggle-btn:active {
  position: relative; display: block; width: 96px; height: 96px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  animation: none; transform: none; box-shadow: none; transition: none; overflow: visible;
  -webkit-tap-highlight-color: transparent;
}
.home-page #chat-toggle-btn::before,
.home-page #chat-toggle-btn::after { content: none; display: none; }
.home-page #chat-toggle-btn:focus-visible { outline: 3px solid #076d5b; outline-offset: 8px; }
.home-page #chat-toggle-btn .guga-float {
  display: block; position: relative; width: 100%; height: 100%;
  pointer-events: none; animation: guga-float 4s ease-in-out infinite;
}
.home-page #chat-toggle-btn .guga-scale {
  display: block; position: relative; width: 100%; height: 100%; border-radius: 50%;
  box-shadow: 0 6px 20px #42bfc866, 0 0 18px #79cde980;
  transform: scale(1); transition: transform 200ms cubic-bezier(.22,1,.36,1);
}
.home-page #chat-toggle-btn .guga-ring {
  position: absolute; inset: -4px; overflow: hidden; border-radius: 50%;
  background: #61d6df; opacity: .85; transition: opacity 200ms ease;
}
.home-page #chat-toggle-btn .guga-ring::before {
  content: ''; position: absolute; inset: -50%;
  background: conic-gradient(#67dfcd, #79d7ef, #b59cec, #79d7ef, #67dfcd);
  animation: guga-orbit 6s linear infinite; animation-play-state: paused;
}
.home-page #chat-toggle-btn .guga-face {
  position: absolute; inset: 0; display: block; overflow: hidden; border-radius: 50%;
  background: #e9f6f9; isolation: isolate;
}
.home-page #chat-toggle-btn img,
.home-page #chat-toggle-btn:hover img {
  /* Zoom the supplied circular artwork slightly; the face clips the white corners. */
  position: absolute; inset: -4%; display: block; width: 108%; height: 108%;
  max-width: none; max-height: none;
  object-fit: contain; border-radius: 0; filter: none; transform: none; z-index: 1;
  opacity: 0; pointer-events: none; transition: opacity 200ms ease-out;
}
.home-page #chat-toggle-btn[data-image="idle"] .guga-idle,
.home-page #chat-toggle-btn[data-image="active"] .guga-active { opacity: 1; }
.home-page .guga-fallback {
  display: grid; place-items: center; height: 100%; color: #076d5b;
  font-family: inherit; font-size: 24px; font-weight: 700; line-height: 1;
}
.home-page #chat-toggle-btn:not([data-image="fallback"]) .guga-fallback { visibility: hidden; }
.home-page #chat-toggle-btn[data-active="true"] .guga-scale { transform: scale(1.06); }
.home-page #chat-toggle-btn[data-active="true"] .guga-ring { opacity: 1; }
.home-page #chat-toggle-btn[data-active="true"] .guga-ring::before { animation-play-state: running; }
.home-page #chat-toggle-btn[data-active="true"] .guga-float { animation-play-state: paused; }
.home-page #chat-toggle-btn .guga-face.is-energizing { animation: guga-energize 220ms ease-out 1; }
.home-page .chat-tip,
.home-page .chatbot-container:hover .chat-tip {
  position: absolute; box-sizing: border-box; display: block;
  bottom: 10px; right: 112px; width: 234px; max-width: calc(100vw - 148px);
  min-height: 76px; padding: 14px 16px; border: 1px solid #9edbd6; border-radius: 20px;
  background: linear-gradient(135deg, #fff 25%, #effbf8); color: #164f46;
  box-shadow: 0 8px 24px #164f461f; cursor: pointer; text-align: left;
  font-family: "Roboto", "Segoe UI", Arial, sans-serif; font-size: 14px; font-weight: 400;
  white-space: normal; overflow-wrap: normal; word-break: normal;
  animation: none; opacity: 0; visibility: hidden; transform: translateX(4px);
  pointer-events: none; transform-origin: right center;
  transition: opacity 120ms ease-out, transform 120ms ease-out, visibility 0s 120ms;
}
/* Transparent hit area connects the bubble to its launcher, even on a slow device. */
.home-page .chat-tip::before {
  content: ''; position: absolute; top: 0; right: -18px; width: 18px; height: 100%;
}
.home-page .chat-tip::after {
  content: ''; position: absolute; width: 10px; height: 10px; right: -6px; bottom: 24px;
  background: #effbf8; border-top: 1px solid #9edbd6; border-right: 1px solid #9edbd6;
  transform: rotate(45deg); pointer-events: none;
}
.home-page .chat-tip-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-page .chat-tip-heading strong { font-size: 16px; font-weight: 700; line-height: 24px; }
.home-page .chat-tip-arrow {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: #def5ef; color: #076d5b; font-size: 16px; line-height: 1;
}
.home-page .chat-tip-copy { display: block; margin-top: 3px; font-size: 13px; line-height: 20px; color: #426459; }
.home-page .chatbot-container[data-preview="true"] .chat-tip {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity 0s, transform 0s, visibility 0s;
}
.home-page .chat-tip:focus-visible { outline: 3px solid #076d5b; outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .home-page .chat-tip:hover { border-color: #34ada4; }
  .home-page .chat-tip:hover .chat-tip-arrow { color: #fff; background: #076d5b; }
}
@media (max-width: 420px), (hover: none) {
  .home-page .chat-tip, .home-page .chatbot-container:hover .chat-tip {
    bottom: 112px; right: 0; width: 234px; max-width: calc(100vw - 36px); transform-origin: bottom right;
  }
  .home-page .chat-tip::after {
    right: 42px; bottom: -6px; border-top: 0; border-right: 1px solid #9edbd6; border-bottom: 1px solid #9edbd6;
  }
  .home-page .chat-tip::before { top: auto; bottom: -18px; right: 0; width: 100%; height: 18px; }
}
.home-page .chat-online-dot { display: none; animation: none; }
.home-page .chat-window {
  bottom: 116px; width: min(360px, calc(100vw - 36px)); max-height: calc(100dvh - 156px);
  visibility: visible; transform-origin: bottom right;
  transition: opacity 200ms ease-out, transform 200ms cubic-bezier(.22,1,.36,1), visibility 0s;
}
.home-page .chat-window.hidden {
  transform: translateY(8px) scale(.96); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 140ms ease-out, transform 140ms ease-out, visibility 0s 140ms;
}
.home-page .chat-header button, .home-page .chat-footer button { min-width: 44px; min-height: 44px; }
.home-page .chat-footer input { min-width: 0; }
.home-page .chat-body { min-height: 0; }
.home-page .chatbot-container[data-quiz-active="true"] { display: none !important; }
.home-page.garden-robot-chat-managed .chat-window { bottom: 90px; max-height: calc(100dvh - 130px); }
.home-page .chatbot-container[data-paused="true"] #chat-toggle-btn *,
.home-page .chatbot-container[data-paused="true"] .guga-ring::before { animation-play-state: paused !important; }
.home-page .chatbot-container[data-input="keyboard"] #chat-toggle-btn *,
.home-page .chatbot-container[data-input="keyboard"] .guga-ring::before {
  animation-play-state: paused !important; transition: none !important;
}
.home-page .chatbot-container[data-input="keyboard"] .guga-scale { transform: none !important; }
.home-page .chatbot-container[data-motion="off"] #chat-toggle-btn *,
.home-page .chatbot-container[data-motion="off"] .guga-ring::before {
  animation: none !important; transition: none !important; transform: none !important;
}
.home-page .chatbot-container[data-motion="off"] .chat-window { transition: none; }
.home-page .chatbot-container[data-input="keyboard"] .chat-tip,
.home-page .chatbot-container[data-motion="off"] .chat-tip { transition: none; }
@keyframes guga-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes guga-orbit { to { transform: rotate(360deg); } }
@keyframes guga-energize {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-1px); }
  50% { transform: translateX(1px); }
  75% { transform: translateX(-.5px); }
}
@media (prefers-reduced-motion: reduce) {
  .home-page .chatbot-container, .home-page .chatbot-container *,
  .home-page .guga-ring::before {
    animation: none !important; transition: none !important; transform: none !important;
  }
}
