/* ===== 対談コンテンツ共通スタイル ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

.chat-container {
  font-family: 'Noto Sans JP', sans-serif;
}

/*
 * キャラクターカラーのカスタマイズ方法:
 *
 * 各対談HTMLの <head> 内に以下を追加してください:
 *
 * <style>
 *   :root {
 *     --left-bubble-bg:    #d4bee9;   / * 左キャラの吹き出し背景 * /
 *     --left-bubble-text:  #3d2060;   / * 左キャラの文字色 * /
 *     --left-name-color:   #7a4eb0;   / * 左キャラの名前色 * /
 *     --right-bubble-bg:   #9dc4eb;   / * 右キャラの吹き出し背景 * /
 *     --right-bubble-text: #1a3d6a;   / * 右キャラの文字色 * /
 *     --right-name-color:  #2060a0;   / * 右キャラの名前色 * /
 *   }
 * </style>
 */

/* デフォルトカラー（上書きしない場合の初期値） */
:root {
  --left-text-color:  #7a4eb0;
  --right-text-color: #2060a0;
}

/* ===== 対談ページのメタ情報 ===== */
.dialogue-meta {
  background: rgba(255, 255, 255, 0.5);
  border-left: 4px solid #A59EB1;
  padding: 0.8em 1.2em;
  margin-bottom: 1.5em;
  border-radius: 0 8px 8px 0;
  font-size: 0.95em;
  line-height: 1.8;
}

.dialogue-meta .char-label {
  font-weight: bold;
}

/* ===== チャットレイアウト ===== */
.chat-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9em;
}

/* 連続するchat-container間に区切り線と余白を自動挿入 */
.chat-container + .chat-container {
  margin-top: 2.5em;
  padding-top: 2em;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
}

/* ===== 吹き出し ===== */
.bubble {
  max-width: 100%;
  padding: 0.75em 1.1em;
  border-radius: 1.2em;
  line-height: 1.65;
  position: relative;
  word-break: break-word;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.bubble.left {
  background-color: #fff;
  color: var(--left-text-color);
  border-top-left-radius: 1.2em; /* style.css の 0 をリセット */
}

.bubble.right {
  background-color: #fff;
  color: var(--right-text-color);
  border-top-left-radius: 1.2em;
  border-top-right-radius: 1.2em; /* style.css の 0 をリセット */
}

/* ===== キャラクター名 ===== */
.name {
  font-weight: bold;
  display: block;
  margin-bottom: 0.25em;
  font-size: 0.88em;
}

.bubble.left  .name { color: var(--left-text-color); }
.bubble.right .name { color: var(--right-text-color); }

/* ===== 地の文・ト書き（括弧内の行動描写） ===== */
.action {
  font-style: italic;
  opacity: 0.75;
}

/* ===== 場面転換ラベル ===== */
/*
 * 使い方: <div class="scene-label">― 翌日 ―</div>
 * chat-containerの直前に置くと、区切り線の代わりにテキストラベルで場面転換を示せる。
 * ラベルなしの段落区切りはchat-containerを分けるだけでOK。
 */
.scene-label {
  margin: 2.5em 0 1.2em;
  text-align: center;
  color: #999;
  font-size: 0.88em;
  letter-spacing: 0.1em;
  position: relative;
}

.scene-label::before,
.scene-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 5em);
  height: 1px;
  background: rgba(0, 0, 0, 0.15);
}

.scene-label::before { left: 0; }
.scene-label::after  { right: 0; }

/* scene-labelの直後のchat-containerは区切り線を出さない */
.scene-label + .chat-container {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* ===== 区切り・ナレーション ===== */
.narration {
  text-align: center;
  color: #888;
  font-size: 0.9em;
  padding: 0.5em 1em;
  position: relative;
}

.narration::before,
.narration::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: #ccc;
}

.narration::before { left: 0; }
.narration::after  { right: 0; }

/* ===== レスポンシブ ===== */
@media screen and (max-width: 600px) {
  .bubble {
    max-width: 100%;
    font-size: 1.05em;
  }
  .chat-container {
    gap: 0.3em;
  }
}
