/* ── 基本レイアウト ─────────────────────────────────────── */
html, body { height: 100%; margin: 0; font-family: 'Hiragino Sans', 'Noto Sans JP', sans-serif; }
#messages { scroll-behavior: smooth; }

/* ── ヘッダー ───────────────────────────────────────────── */
.header-bar {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}
.header-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── ステータスバッジ ────────────────────────────────────── */
.knowledge-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 600;
  background: rgba(255,255,255,.15); color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  padding: 3px 10px; border-radius: 99px;
}
.no-knowledge-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 600;
  background: rgba(251,191,36,.2); color: #fde68a;
  border: 1px solid rgba(251,191,36,.4);
  padding: 3px 10px; border-radius: 99px;
}

/* ── アバター ───────────────────────────────────────────── */
.bot-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  display: flex; align-items: center; justify-content: center;
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #64748b;
  display: flex; align-items: center; justify-content: center;
}

/* ── メッセージバブル ────────────────────────────────────── */
.msg-user {
  background: #0d9488; color: #fff;
  border-radius: 18px 18px 4px 18px;
}
.msg-bot {
  background: #f0fdfa; color: #134e4a;
  border: 1px solid #99f6e4;
  border-radius: 18px 18px 18px 4px;
}
.msg-error {
  background: #fef2f2; color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 18px 18px 18px 4px;
}

/* ── Thinkingアニメーション ─────────────────────────────── */
.thinking::after {
  content: '';
  display: inline-block;
  animation: dots 1.2s steps(3, end) infinite;
}
@keyframes dots {
  0%, 100% { content: '.'; }
  33%       { content: '..'; }
  66%       { content: '...'; }
}

/* ── 規則参照バッジ ─────────────────────────────────────── */
.rule-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.7rem; font-weight: 600;
  background: #f0fdfa; color: #0f766e;
  border: 1px solid #99f6e4;
  padding: 2px 10px; border-radius: 99px;
  margin-bottom: 8px;
}

/* ── 免責注記 ───────────────────────────────────────────── */
.disclaimer-note {
  margin-top: 10px; padding: 6px 10px;
  background: #f8fafc; border-left: 3px solid #cbd5e1;
  border-radius: 0 6px 6px 0;
  font-size: 0.72rem; color: #94a3b8;
}

/* ── よくある質問ボタン ─────────────────────────────────── */
.faq-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.78rem; font-weight: 500;
  background: #fff; color: #0f766e;
  border: 1px solid #99f6e4;
  padding: 5px 12px; border-radius: 99px;
  cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.faq-btn:hover {
  background: #f0fdfa; border-color: #0d9488;
  transform: translateY(-1px); box-shadow: 0 2px 8px rgba(13,148,136,.15);
}

/* ── 送信ボタン ─────────────────────────────────────────── */
.send-btn {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  transition: all .2s;
}
.send-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13,148,136,.35);
}
.send-btn:disabled { background: #e2e8f0; cursor: not-allowed; }

/* ── Prose スタイル ─────────────────────────────────────── */
textarea { resize: none; }
.prose code   { background: #e2e8f0; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.prose pre    { background: #1e293b; color: #e2e8f0; padding: 1rem; border-radius: 8px; overflow-x: auto; font-size: .88em; }
.prose pre code { background: transparent; padding: 0; }
.prose p    { margin: 0.35rem 0; }
.prose ul   { list-style: disc; padding-left: 1.4rem; margin: 0.4rem 0; }
.prose ol   { list-style: decimal; padding-left: 1.4rem; margin: 0.4rem 0; }
.prose li   { margin: 0.2rem 0; }
.prose h1, .prose h2, .prose h3 { font-weight: 700; color: #0f766e; margin: 0.6rem 0 0.3rem; }
.prose h2 { font-size: 1rem; border-bottom: 1px solid #99f6e4; padding-bottom: 2px; }
.prose h3 { font-size: .95rem; }
.prose strong { color: #0f766e; }
