
/* ▼ 吹き出し1セット（左/右）の外側コンテナ */
.chat {
  display: flex;
  align-items: flex-start;
  margin: 20px 0;
  width: 100%;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.chat-wrapper {
  text-align: center;
}

/* ▼ 左側吹き出し（アイコン → 吹き出し） */
.chat.left {
  flex-direction: row;
  justify-content: flex-start;
}

/* ▼ 右側吹き出し（吹き出し → アイコン） */
.chat.right {
  flex-direction: row-reverse;
  justify-content: flex-start;
  text-align: right;
}



/* ▼ アイコン（人物画像） */
.chat .icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 10px;
}

/* ▼ 吹き出し本体共通 */
.chat .balloon {
  position: relative;
  padding: 12px 18px;
  border-radius: 12px;
  max-width: 70%;
  color: #fff;
  line-height: 1.7;
  word-break: break-word;
  box-sizing: border-box;
  font-size: 18px;
}

/* ▼ 色別（必要に応じて追加） */
.balloon.green { background-color: #7dc673; }
.balloon.blue  { background-color: #66b5ff; }
.balloon.red   { background-color: #fc6060; }
.balloon.orange{ background-color: #ffaf38; }
.balloon.purple{ background-color: #9a86ac; }

/* ▼ 左三角（グループ化で共通化） */
.chat.left .balloon::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 15px;
  width: 0;
  height: 0;
  border-right: 10px solid currentColor;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

/* ▼ 右三角 */
.chat.right .balloon::before {
  content: "";
  position: absolute;
  right: -10px;
  top: 15px;
  width: 0;
  height: 0;
  border-left: 10px solid currentColor;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}

/* ===== スマホ対応 ===== */
@media screen and (max-width: 600px) {
  .chat .icon {
    width: 60px;
    height: 60px;
  }
  .chat .balloon {
    max-width: 75%;
    padding: 10px 14px;
  }
}


