#abefukuo-chatbot-root {
  --abefukuo-bg: #ffffff;
  --abefukuo-text: #1f2937;
  --abefukuo-muted: #6b7280;
  --abefukuo-line: #06c755;
  --abefukuo-border: #e5e7eb;
  --abefukuo-shadow: 0 18px 48px rgba(17, 24, 39, 0.18);
  position: relative;
  z-index: 99999;
}

.abefukuo-chatbot__launcher {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--abefukuo-line);
  color: #fff;
  font: inherit;
  font-weight: 700;
  box-shadow: var(--abefukuo-shadow);
  cursor: pointer;
}

.abefukuo-chatbot__launcher-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  font-size: 12px;
}

.abefukuo-chatbot__panel {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 66px);
  width: min(390px, calc(100vw - 24px));
  max-height: min(680px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid var(--abefukuo-border);
  border-radius: 18px;
  background: var(--abefukuo-bg);
  color: var(--abefukuo-text);
  box-shadow: var(--abefukuo-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.abefukuo-chatbot__panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.abefukuo-chatbot__header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--abefukuo-border);
}

.abefukuo-chatbot__header h2 {
  margin: 2px 0 6px;
  font-size: 20px;
  line-height: 1.35;
}

.abefukuo-chatbot__header p {
  margin: 0;
  color: var(--abefukuo-muted);
  font-size: 14px;
  line-height: 1.6;
}

.abefukuo-chatbot__eyebrow {
  color: var(--abefukuo-line) !important;
  font-size: 12px !important;
  font-weight: 700;
}

.abefukuo-chatbot__close {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--abefukuo-border);
  border-radius: 50%;
  background: #fff;
  color: var(--abefukuo-text);
  font-size: 22px;
  cursor: pointer;
}

.abefukuo-chatbot__body {
  max-height: calc(min(680px, calc(100vh - 110px)) - 142px);
  overflow-y: auto;
  padding: 18px;
}

.abefukuo-chatbot__message {
  width: fit-content;
  max-width: 90%;
  margin: 0 0 12px;
  padding: 11px 13px;
  border-radius: 14px;
  background: #f3f4f6;
  line-height: 1.55;
}

.abefukuo-chatbot__message--user {
  margin-left: auto;
  background: #dcfce7;
}

.abefukuo-chatbot__choices,
.abefukuo-chatbot__actions {
  display: grid;
  gap: 9px;
}

.abefukuo-chatbot__choice,
.abefukuo-chatbot__primary-link,
.abefukuo-chatbot__contact-link {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.abefukuo-chatbot__choice {
  border: 1px solid var(--abefukuo-border);
  background: #fff;
  color: var(--abefukuo-text);
}

.abefukuo-chatbot__choice:hover,
.abefukuo-chatbot__choice:focus-visible {
  border-color: var(--abefukuo-line);
  outline: none;
}

.abefukuo-chatbot__primary-link {
  border: 0;
  background: var(--abefukuo-line);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.abefukuo-chatbot__contact-link {
  color: var(--abefukuo-text);
  text-align: center;
  text-decoration: underline;
}

.abefukuo-chatbot__choice--secondary {
  text-align: center;
}

.abefukuo-chatbot__choice--text {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--abefukuo-muted);
  text-align: center;
  text-decoration: underline;
}

.abefukuo-chatbot__summary {
  width: 100%;
  min-height: 132px;
  box-sizing: border-box;
  margin: 0 0 10px;
  padding: 12px;
  border: 1px solid var(--abefukuo-border);
  border-radius: 12px;
  background: #f9fafb;
  color: var(--abefukuo-text);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

.abefukuo-chatbot__status {
  min-height: 1.5em;
  margin: 0 0 10px;
  color: var(--abefukuo-muted);
  font-size: 13px;
}

@media (max-width: 600px) {
  .abefukuo-chatbot__panel {
    right: 12px;
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 64px);
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 96px);
  }

  .abefukuo-chatbot__body {
    max-height: calc(100dvh - 245px);
  }

  .abefukuo-chatbot__launcher {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .abefukuo-chatbot__panel {
    transition: none;
  }
}
