/* ============ 相談タブ（AI相談チャット、フェーズ3(c)、2026-09-26追加） ============ */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.chat-header-actions { display: flex; gap: 6px; flex-shrink: 0; }
.chat-header-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.chat-messages { display: flex; flex-direction: column; gap: 10px; }
.chat-empty { color: var(--ink-faint); font-size: 13px; line-height: 1.7; padding: 24px 8px; text-align: center; }
.chat-bubble {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.7;
  word-break: break-word;
}
.chat-bubble-user { align-self: flex-end; background: var(--pine); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble-model { align-self: flex-start; background: var(--surface-sunk); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-bubble-loading { color: var(--ink-faint); animation: chat-pulse 1.2s ease-in-out infinite; }
@keyframes chat-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.chat-unavailable { margin-top: 12px; padding: 12px; background: var(--amber-soft); border-radius: var(--radius-md); font-size: 12.5px; color: var(--ink); line-height: 1.6; }
/* 入力欄は画面下（タブバーの上）に貼り付ける */
.chat-input-row {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 0 4px;
  background: var(--bg);
}
.chat-input { flex: 1; resize: none; margin: 0; max-height: 140px; line-height: 1.5; }
.chat-send-btn {
  flex-shrink: 0;
  border: none;
  background: var(--pine);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.chat-send-btn:disabled { opacity: 0.5; cursor: default; }

/* ボトムシート版（2026-09-26）：メッセージ欄だけがスクロールし、入力欄はシート下部に固定する */
.chat-sheet {
  display: flex;
  flex-direction: column;
  height: min(85vh, 680px);
  overflow: hidden;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}
.chat-sheet .chat-header { flex-shrink: 0; }
.chat-sheet .chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 2px; }
.chat-sheet .chat-unavailable { flex-shrink: 0; }
.chat-sheet .chat-input-row { position: static; flex-shrink: 0; background: none; padding: 10px 0 0; }

/* 面談メモの提案チップ（バックログ#30続き、2026-09-27）：AI相談中に、てりーさんが
   「面談でメモしておくね」と提案した時だけ、返答の下に小さく出す。グリーンオーロラと
   世界観をそろえた控えめなカード。追加すると消える。 */
.chat-memo-suggest {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 4px 0 10px 6px; padding: 8px 12px; border-radius: 12px;
  background: var(--pine-soft); border: 1px solid var(--pine-soft); font-size: 12.5px; color: var(--pine-deep); line-height: 1.5;
}
.chat-memo-suggest-add {
  border: 1px solid var(--pine); background: var(--surface); color: var(--pine-deep); border-radius: 999px;
  padding: 3px 12px; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.chat-memo-suggest.added { opacity: 0.6; }
