.chat { margin-top: 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.chat-log { list-style: none; margin: 0; padding: 16px; display: grid; gap: 12px; max-height: 60vh; min-height: 220px; overflow-y: auto; }
.chat-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.chat-msg { padding: 10px 14px; border-radius: 12px; background: #f6f3ee; }
.chat-msg.founder { background: #eaf1fe; border: 1px solid #c9dafb; }
.chat-msg.founder > .chat-meta b::after { content: "Built Fullstop"; margin-left: 8px; font-size: 12px; font-weight: 600;
  color: var(--accent-ink, #1856c0); background: #fff; border: 1px solid #c9dafb; border-radius: 99px; padding: 1px 8px; }
.chat-meta { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.chat-meta time { color: var(--muted); }
.chat-msg p { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-action { margin-left: auto; font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
span.chat-action { text-decoration: none; cursor: default; }
.chat-form { border-top: 1px solid var(--line); padding: 16px; display: grid; gap: 10px; background: #fcfbf8; }
.chat-form label { font-weight: 600; }
.chat-handle { color: var(--muted); font-weight: 400; }
.chat-form textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; resize: vertical; }
.chat-form textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.chat-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.chat-row .btn { width: auto; margin-top: 0; }
.chat-row .btn:disabled { opacity: .6; cursor: default; }
.chat-status { font-size: 15px; margin: 0; }
.chat-status.err { color: #8a1c1c; }
.chat-privacy { font-size: 13px; color: var(--muted); }
.chat .cf-turnstile { min-height: 65px; }
/* --- forum: pinned posts, threads, replies --- */
.chat-pinned { list-style: none; margin: 0; padding: 16px 16px 0; display: grid; gap: 12px; }
.chat-pinned:empty { display: none; }
.chat-msg.pinned { border: 1px solid #c9dafb; }
.chat-pin { font-size: 12px; font-weight: 650; color: var(--accent-ink, #1856c0); }
.chat-actions { display: flex; gap: 16px; margin-top: 8px; }
.chat-actions .chat-action { margin-left: 0; }
.chat-actions .chat-action:first-child { color: var(--ink); font-weight: 600; }
.chat-replies { list-style: none; margin: 10px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.chat-replies:empty { display: none; }
.chat-replies .chat-msg { background: #fff; padding: 8px 12px; }
.chat-context { font-size: 13px; color: var(--muted); margin: 0 0 2px; }
.chat-msg.highlight { outline: 3px solid var(--accent); outline-offset: 2px; }
.chat-replying { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: #eaf1fe; font-size: 15px; }
.chat-replying[hidden] { display: none; }
.chat-replying .chat-action { margin-left: auto; }
/* --- editing and deleting your own posts --- */
.chat-you { font-size: 12px; font-weight: 650; color: #2f6b3f; background: #e5f0e7; border-radius: 99px; padding: 1px 8px; }
.chat-edited { font-size: 12px; color: var(--muted); font-style: italic; }
.chat-edit { margin-top: 6px; display: grid; gap: 8px; }
.chat-edit textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; resize: vertical; }
.chat-edit textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.chat-edit-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn.small { padding: 8px 16px; font-size: 15px; border-radius: 9px; }
.btn.small:disabled { opacity: .6; cursor: default; }
.chat-log { align-content: start; }
