/* BrickPlan.AI Kern · Chat-Korrektur (chat.js). Nutzt nur die Tokens aus app.css. */
#chat-card .chat-hint { margin: 0 0 8px; }
.chat-log { list-style: none; margin: 0; padding: 4px 2px; display: flex; flex-direction: column; gap: 8px;
  max-height: min(48vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.chat-log:empty { display: none; }
.chat-msg { display: flex; animation: chat-in .18s ease-out; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.sys { justify-content: center; color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.chat-msg .bubble { max-width: min(92%, 640px); padding: 8px 11px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); overflow-wrap: anywhere; }
.chat-msg.user .bubble { background: var(--accent); border-color: var(--accent); color: var(--accent-text); border-bottom-right-radius: 4px; }
.chat-msg.bot .bubble { border-bottom-left-radius: 4px; }
.chat-msg .bubble p { margin: 0 0 4px; } .chat-msg .bubble p:last-child { margin-bottom: 0; }
.chat-ph { font-weight: 650; margin-bottom: 4px; }
.chat-src { font-weight: 400; color: var(--muted); font-size: var(--fs-sm); }
.chat-changes { margin: 0 0 6px; padding-left: 18px; }
.chat-changes li { margin: 2px 0; }
.chat-notes { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 6px; }
.chat-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 0; }
.chat-chips:empty { display: none; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 3px 10px;
  font-size: var(--fs-sm); cursor: pointer; transition: border-color .15s, background .15s, transform .05s; }
.chip:hover { border-color: var(--accent); } .chip:active { transform: translateY(1px); }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; }
.chat-input { flex: 1; min-width: 0; resize: vertical; min-height: 42px; max-height: 160px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.chat-input:disabled { opacity: .6; }
.typing { color: var(--muted); animation: pulse 1.6s infinite; }
@keyframes chat-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) { .chat-form { flex-direction: column; align-items: stretch; } .chat-msg .bubble { max-width: 100%; } }
@media (prefers-reduced-motion: reduce) { .chat-msg, .typing { animation: none; } }
