.fusenbar-wrap {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  font-family: "Helvetica", "Arial", sans-serif;
  font-size: 12px;
  overflow: visible;
}

.fusen-scroll {
  height: 108px;
  overflow-y: auto;
  overflow-x: hidden;
  display: block;
  margin-top: 6px;
  padding-right: 4px;
  border-top: 1px solid #e9b8c3;
  position: relative;
}

/* 各メッセージ */
.fusen-message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 4px 0;
  padding: 0;
  position: relative;
}
.fusen-message.reply {
  align-items: flex-end;
}

/* 吹き出し本体 */
.fusen-bubble {
  position: relative;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 14px;
  background: #fff4f6;
  border: 1.5px solid #e3a3b5;
  color: #333;
  max-width: 90%;
  overflow: visible;
  margin-top: 2px;
}

/* 親・子どちらも左上にしっぽ */
.fusen-message .fusen-bubble::after,
.fusen-message.reply .fusen-bubble::after {
  content: "";
  position: absolute;
  left: 13px;
  top: -8px;
  border-width: 0 0 10px 14px;
  border-style: solid;
  border-color: transparent transparent #fff4f6 transparent;
  transform: skew(12deg);
  z-index: 2;
}

/* 枠線だけのしっぽ（底辺は透明） */
.fusen-message .fusen-bubble::before,
.fusen-message.reply .fusen-bubble::before {
  content: "";
  position: absolute;
  left: 12px;
  top: -9px;
  border-width: 0 0 11px 15px;
  border-style: solid;
  border-color: transparent transparent #e3a3b5 transparent;
  transform: skew(12deg);
  z-index: 1;
  pointer-events: none;
}

/* 名前と吹き出しの間の余白を最小限に */
.fusen-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #888;
  margin-left: 4px;
  margin-bottom: 2px;
}
.fusen-name { font-weight: bold; }
.fusen-time { color: #aaa; }

/* 吹き出し＋返信ボタン */
.fusen-bubble-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  overflow: visible !important;
}
.fusen-message.reply .fusen-bubble-wrap {
  flex-direction: row-reverse;
}

/* 入力フォーム共通 */
.fusen-form,
.fusen-reply-form {
  display: flex;
  gap: 2px;
  width: 100%;
}

.fusen-form input[type="text"],
.fusen-reply-form input[type="text"] {
  font-size: 12px;
  line-height: 1;
  padding: 2px 6px;
  border: 1px solid #e9b8c3;
  border-radius: 12px;
  box-sizing: border-box;
  background: #fff8fa;
}

/* 名前欄：固定幅 */
.fusen-form input[name="fusen_name"],
.fusen-reply-form input[name="fusen_name"] {
  width: 80px;
  flex: 0 0 auto;
  max-width: 90px;
}

/* 本文欄：柔軟に伸縮 */
.fusen-form input[name="fusen_text"],
.fusen-reply-form input[name="fusen_text"] {
  flex: 1 1 auto;
  min-width: 0;
}

/* 送信・返信ボタン */
.fusen-send-btn,
.fusen-reply-form button {
  background: #e48bab;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.fusen-send-btn:hover,
.fusen-reply-form button:hover {
  background: #d16b90;
}

/* 返信リンク */
.fusen-reply-btn {
  font-size: 10px;
  color: #d07094;
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 2px;
  padding: 2px 4px;
  align-self: flex-end;
  transition: color 0.2s;
}
.fusen-reply-btn:hover {
  color: #a85174;
}
