#chat-contact-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  font-family: 'Helvetica Neue', sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}

#chat-header {
  background: #2c3e50;
  color: white;
  padding: 14px;
  font-weight: bold;
  font-size: 16px;
}

#chat-body {
  padding: 12px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: none;
}
#chat-body::-webkit-scrollbar {
  display: none;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
  animation: fadeIn 0.4s ease-in;
}

.chat-bot {
  flex-direction: row;
  align-self: flex-start;
}

.chat-user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.chat-bubble {
  background: #ecf0f1;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  max-width: 240px;
  position: relative;
  word-break: break-word;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

.chat-bot .chat-bubble {
  background: #f1f1f1;
  border-bottom-left-radius: 4px;
}

.chat-user .chat-bubble {
  background: #3498db;
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
}

#chat-input {
  border-top: 1px solid #ddd;
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fafafa;
}

#chat-input input {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 14px;
}

#chat-input button {
  background: #2ecc71;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}
#chat-input button:hover {
  background: #27ae60;
}

/* ボタン選択肢 */
.chat-message button {
  background: #2980b9;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 13px;
  margin: 4px 2px 0 0;
  transition: background 0.3s;
}
.chat-message button:hover {
  background: #2471a3;
}

/* アニメーション */
@keyframes fadeIn {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* タイピング風バブル */
.chat-message.typing .chat-bubble::after {
  content: '● ● ●';
  animation: typingDots 1s infinite;
  font-size: 14px;
  color: #888;
}
@keyframes typingDots {
  0% { content: '●'; }
  33% { content: '● ●'; }
  66% { content: '● ● ●'; }
  100% { content: '●'; }
}

/* 📱 モバイル対応 */
@media (max-width: 480px) {
  #chat-contact-container {
    width: 95%;
    right: 2.5%;
    bottom: 10px;
  }

  #chat-body {
    padding: 8px;
  }

  .chat-bubble {
    font-size: 13px;
    max-width: 85%;
  }

  #chat-input input {
    font-size: 13px;
  }

  #chat-input button {
    font-size: 13px;
    padding: 6px 10px;
  }
}
/* 🟢 最小化ボタン（Kobitアイコン 最終版） */
#chat-toggle-button {
  position: fixed;
  bottom: 100px;
  right: 100px;
  width: 60px;
  height: 60px;
  background-color: white;
  background-size: 80%;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 10000;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse-glow 2.5s infinite ease-in-out;
}

#chat-toggle-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(44, 62, 80, 0.4);
  }
  50% {
    box-shadow: 0 0 12px 6px rgba(44, 62, 80, 0.1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(44, 62, 80, 0.05);
  }
}

/* モバイル時の最小化ボタン調整 */
@media (max-width: 480px) {
  #chat-toggle-button {
    bottom: 120px;
    right: 20px;
    width: 56px;
    height: 56px;
  }
}
#chat-header {
  background: #2c3e50;
  color: white;
  padding: 14px;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#chat-close-button {
  background: transparent;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.chat-summary {
  font-size: 14px;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  line-height: 1.7;
  border: 1px solid #eee;
  margin-top: 10px;
  transition: all 0.3s ease;
}

.chat-summary p {
  font-weight: bold;
  margin-bottom: 10px;
  color: #2c3e50;
}

.chat-summary ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chat-summary li {
  margin-bottom: 8px;
  padding-left: 1em;
  position: relative;
}

.chat-summary li::before {
  content: "✔️";
  position: absolute;
  left: 0;
  color: #27ae60;
  font-size: 13px;
}

.chat-summary strong {
  color: #34495e;
}