.eebot-chat {
  --eebot-radius: 16px;
  --eebot-icon-size: 22px;
  --eebot-offset-x: 24px;
  --eebot-offset-y: 24px;
  position: fixed;
  bottom: var(--eebot-offset-y);
  z-index: 2147483600;
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.6;
}
.eebot-chat.eebot-pos-right { right: var(--eebot-offset-x); }
.eebot-chat.eebot-pos-left { left: var(--eebot-offset-x); }

.eebot-ti, .eebot-icon-img {
  display: inline-block;
  width: 22px;
  height: 22px;
  vertical-align: middle;
}
.eebot-ti {
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.eebot-icon-img { object-fit: contain; }

.eebot-ti-message,
.eebot-ti-message-circle { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4a2 2 0 0 0-2 2v18l4-4h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4a2 2 0 0 0-2 2v18l4-4h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2z'/%3E%3C/svg%3E"); }
.eebot-ti-send { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 21l21-9L2 3v7l15 2-15 2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 21l21-9L2 3v7l15 2-15 2z'/%3E%3C/svg%3E"); }
.eebot-ti-arrow-up { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l7 7h-4v8h-6v-8H5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3l7 7h-4v8h-6v-8H5z'/%3E%3C/svg%3E"); }
.eebot-ti-arrow-right { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 11h12.2l-5.6-5.6L12 4l8 8-8 8-1.4-1.4 5.6-5.6H4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 11h12.2l-5.6-5.6L12 4l8 8-8 8-1.4-1.4 5.6-5.6H4z'/%3E%3C/svg%3E"); }
.eebot-ti-mail { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4l-8 5-8-5V6l8 5 8-5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4l-8 5-8-5V6l8 5 8-5z'/%3E%3C/svg%3E"); }

.eebot-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border: 0;
  border-radius: 50px;
  background-color: var(--eebot-color);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.eebot-launch:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(0, 0, 0, 0.24); }
.eebot-chat.is-open .eebot-launch { opacity: 0; visibility: hidden; }
@media (max-width: 600px) {
  .eebot-launch { padding: 16px; }
  .eebot-launch-label { display: none; }
}

.eebot-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 360px;
  height: 520px;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: var(--eebot-radius);
  background-color: #fff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  animation: eebot-in 0.3s ease;
}
.eebot-chat.eebot-pos-left .eebot-panel { right: auto; left: 0; }
.eebot-panel[hidden] { display: none; }
@media (max-width: 600px) {
  .eebot-panel {
    position: fixed;
    right: 16px;
    left: 16px;
    bottom: 16px;
    width: auto;
    height: min(560px, calc(100vh - 32px));
  }
}

.eebot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background-color: var(--eebot-color);
  color: #fff;
}
.eebot-title { font-weight: 700; font-size: 16px; }
.eebot-close { position: relative; width: 24px; height: 24px; border: 0; background: transparent; cursor: pointer; }
.eebot-close::before, .eebot-close::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 18px; height: 2px; background-color: #fff;
}
.eebot-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.eebot-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.eebot-close:hover { opacity: 0.75; }

.eebot-log {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 20px;
  overflow-y: auto;
  background-color: #f5f5f3;
}
.eebot-msg { max-width: 85%; }
.eebot-text {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.eebot-msg.bot { justify-self: start; }
.eebot-msg.bot .eebot-text { border-top-left-radius: 3px; background-color: #fff; color: #222; border: 1px solid #ececec; }
.eebot-msg.user { justify-self: end; }
.eebot-msg.user .eebot-text { border-top-right-radius: 3px; background-color: var(--eebot-color); color: #fff; }

.eebot-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.eebot-chip {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 13px;
  border-radius: 18px;
  border: 1px solid var(--eebot-color);
  background-color: #fff;
  color: var(--eebot-color);
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.eebot-chip:hover { background-color: var(--eebot-color); color: #fff; }

.eebot-dots { display: inline-flex; gap: 4px; }
.eebot-dots i { width: 7px; height: 7px; border-radius: 50%; background-color: #c1b499; animation: eebot-blink 1.2s infinite both; }
.eebot-dots i:nth-child(2) { animation-delay: 0.2s; }
.eebot-dots i:nth-child(3) { animation-delay: 0.4s; }

.eebot-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #fff;
}
.eebot-foot textarea {
  width: 100%;
  max-height: 120px;
  padding: 10px 12px;
  border: 1px solid #c1b499;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: none;
  box-sizing: border-box;
}
.eebot-foot textarea:focus { outline: none; border-color: var(--eebot-color); }
.eebot-send {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background-color: var(--eebot-color);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.eebot-send:hover { opacity: 0.85; }
.eebot-send .eebot-ti { width: var(--eebot-icon-size); height: var(--eebot-icon-size); }
.eebot-send .eebot-send-img { position: absolute; display: block; max-width: none; pointer-events: none; }

@keyframes eebot-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes eebot-blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
