.speech-bubble-container {
    display: flex;
    align-items: center; /* 吹き出しとアイコンの垂直位置を揃える */
    position: relative;
    max-width: 600px; /* 吹き出し全体の最大幅を設定 */
}

.speech-icon {
    width: 50px; /* アイコンのサイズを調整 */
    height: 50px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2; /* アイコンを吹き出しの前面に表示 */
    position: relative;
    align-self: flex-start; /* アイコンを吹き出しの上端に揃える */
}

.speech-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.speech-bubble {
    background-color: #f0f0f0; /* 吹き出しの背景色 */
    border-radius: 20px; /* 吹き出しの角の丸み */
    padding: 15px 20px; /* 吹き出しのパディング */
    position: relative;
    max-width: 1500px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 吹き出しの影 */
}




/* 尻尾の共通スタイル */
.speech-bubble-tail {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* 左側の尻尾 */
.speech-bubble-container[data-tail-position="left"] .speech-bubble-tail {
    left: -10px;
    top: 50%; /* オフセットはインラインスタイルで設定 */
    transform: translateY(-50%);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--bubble-bg-color, #f0f0f0) transparent transparent;
}

/* 右側の尻尾 */
.speech-bubble-container[data-tail-position="right"] .speech-bubble-tail {
    right: -10px;
    top: 50%; /* オフセットはインラインスタイルで設定 */
    transform: translateY(-50%);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--bubble-bg-color, #f0f0f0);
}

/* 上側の尻尾 */
.speech-bubble-container[data-tail-position="top"] .speech-bubble-tail {
    top: -10px;
    left: 50%; /* オフセットはインラインスタイルで設定 */
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-color: transparent transparent var(--bubble-bg-color, #f0f0f0) transparent;
}

/* 下側の尻尾 */
.speech-bubble-container[data-tail-position="bottom"] .speech-bubble-tail {
    bottom: -10px;
    left: 50%; /* オフセットはインラインスタイルで設定 */
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-color: var(--bubble-bg-color, #f0f0f0) transparent transparent transparent;
}
