/* 💬 チャットバブル */
#chat-bubble {
  position: fixed;
  bottom: 15px;
  right: 15px;
  background-color: #ffd6d6;
  border: 2px solid #999;
  color: #000;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  text-align: center;
  line-height: 56px;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
  transition: all 0.25s ease;
  z-index: 999;
}
#chat-bubble:hover {
  background-color: #ffcaca;
  transform: scale(1.08);
}
#chat-bubble:active {
  transform: scale(0.95);
}

/* 🪞 チャットウィンドウ */
#chat-window {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 15px;
  width: 90%;
  max-width: 320px;
  background: #fffaf0;
  border: 2px solid #999;
  border-radius: 14px;
  box-shadow: 4px 4px 0 #bbb;
  overflow: hidden;
  font-size: 14px;
  z-index: 998;
  animation: popup 0.25s ease;
}

/* 🌼 開くアニメーション */
@keyframes popup {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 🌸 ヘッダー */
#chat-header {
  background: #ffcccc;
  border-bottom: none;
  padding: 10px;
  font-weight: bold;
  text-align: center;
  color: #333;
}

/* 💬 チャット本文 */
#chatbox {
  height: 260px;
  overflow-y: auto;
  padding: 10px;
  text-align: left;
  background: #fffdf8;
}

/* 吹き出し共通 */
#chatbox p {
  display: inline-block;
  padding: 8px 12px;
  margin: 6px 0;
  border-radius: 14px;
  max-width: 85%;
  line-height: 1.6;
  word-wrap: break-word;
  font-size: 14px;
}

/* ユーザー（🐤）の吹き出しを黄緑に */
#chatbox p.user {
  background: #f0ffe8;          /* やさしい黄緑 */
  border: 1px solid #b7d7a8;    /* 落ち着いたオリーブ寄りの枠 */
  text-align: right;
}

/* 🎀 MiikoBot（ピンク） */
#chatbox p.bot {
  background: #ffeaea;
  border: 1px solid #ffbcbc;
}

/* 🧁 入力欄 */
#chat-input {
  display: flex;
  border-top: 2px solid #999;
  background: #fffaf0;
}
#chat-input input {
  flex: 1;
  padding: 10px;
  border: none;
  font-size: 14px;
  background: #fffaf0;
}
#chat-input input:focus {
  outline: none;
  background: #fff;
}
#chat-input button {
  background: #ffcccc;
  border: none;
  width: 70px;
  font-weight: bold;
  cursor: pointer;
  border-left: 2px solid #999;
  transition: background 0.2s ease;
}
#chat-input button:hover {
  background: #ffbebe;
}
#chat-input button:active {
  background: #ffadad;
}

/* 📱 スマホ対応 */
@media screen and (max-width: 600px) {
  #chat-window {
    width: 90%;
    right: 5%;
    bottom: 80px;
  }
}
