diff --git a/style.css b/style.css index a2aaafc..262cdc7 100644 --- a/style.css +++ b/style.css @@ -266,40 +266,6 @@ } -/* =============== LINE風チャット =============== */ - -.chat-bubble { - max-width: 75%; - padding: 10px 14px; - margin: 6px 0; - border-radius: 16px; - font-size: 15px; - line-height: 1.4; - display: inline-block; - box-shadow: 0 2px 6px rgba(0,0,0,0.15); -} - -/* 他人のメッセージ(左) */ -.chat-left { - background: #fff; - border: 1px solid #ddd; - margin-left: 6px; -} - -/* 自分のメッセージ(右) */ -.chat-right { - background: #c8f7c5; - color: #333; - margin-left: auto; - margin-right: 6px; - text-align: left; -} - -/* 吹き出しコンテナ */ -.chat-line { - display: flex; - width: 100%; -} /* ====================================== ピンのレイアウト(安定版) @@ -354,10 +320,59 @@ justify-content: center; } -/* チャット1行全体 */ +/* ============================== + チャット欄(全体) +============================== */ + +#chatBox { + margin: 20px; +} + +#chatList { + height: 230px; + background: linear-gradient(135deg, #fff7fc, #f3faff); /* パステル */ + border: 1px solid #f0dcec; + border-radius: 20px; + padding: 12px; + overflow-y: auto; + box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.05); + font-size: 15px; +} + +/* 入力エリア */ +#chatInputArea { + display: flex; + gap: 10px; +} + +#chatInput { + flex: 1; + padding: 14px; + font-size: 16px; + border: 2px solid #ccc; + border-radius: 12px; +} + +#chatSend { + padding: 12px 16px; + background: #4caf50; + border: none; + border-radius: 14px; + color: white; + font-size: 15px; + font-weight: bold; + cursor: pointer; +} + +/* ============================== + LINE風チャット部分(安定版) +============================== */ + +/* 1行のコンテナ */ .chat-line { display: flex; align-items: flex-end; + width: 100%; margin: 6px 0; } @@ -371,25 +386,28 @@ justify-content: flex-end; } -/* 吹き出し */ +/* 吹き出し共通 */ .chat-bubble { max-width: 70%; padding: 10px 14px; - border-radius: 14px; + border-radius: 16px; font-size: 15px; line-height: 1.4; - box-shadow: 0 2px 4px rgba(0,0,0,0.15); + box-shadow: 0 2px 6px rgba(0,0,0,0.15); + word-break: break-word; } -/* 他人 */ +/* 他人の吹き出し */ .chat-left .chat-bubble { - background: #fff; + background: #ffffff; border: 1px solid #ddd; + border-radius: 16px 16px 16px 6px; } -/* 自分 */ +/* 自分の吹き出し */ .chat-right .chat-bubble { background: #c8f7c5; + border-radius: 16px 16px 6px 16px; } /* 時間(吹き出しの外) */ @@ -399,14 +417,3 @@ margin: 0 6px; white-space: nowrap; } - -#chatList { - height: 230px; - background: linear-gradient(135deg, #fff7fc, #f3faff); /* パステルピンク×薄水色 */ - border: 1px solid #f0dcec; /* ほんのりピンクの枠 */ - border-radius: 20px; - padding: 12px; - overflow-y: auto; - box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.05); - font-size: 15px; -}