.note-body { white-space: normal; min-width: 0; }
.note-body > :first-child { margin-top: 0; }
.note-body > :last-child { margin-bottom: 0; }
.note-body p, .note-body ul, .note-body ol, .note-body blockquote,
.note-body pre, .note-body table { margin: 0.6em 0; }
.note-body ul, .note-body ol { padding-left: 1.6em; }
.note-body li > p { margin: 0.25em 0; }
.note-body h1, .note-body h2, .note-body h3,
.note-body h4, .note-body h5, .note-body h6 { font-size: 1.1em; line-height: 1.5; margin: 0.8em 0 0.4em; }
.note-body a { color: var(--primary); text-decoration: underline; }
.note-body blockquote { border-left: 2px solid var(--border); padding-left: 0.8em; }
.note-body pre { padding: 0.7em; background: var(--bg); border-radius: 6px; white-space: pre; overflow-x: auto; }
.note-body code { font-size: 0.92em; background: var(--bg); border-radius: 3px; }
.note-body pre code { font-size: inherit; }
.note-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.note-body th, .note-body td { border: 1px solid var(--border); padding: 0.35em 0.6em; }
.note-body img { max-width: 100%; height: auto; }
.note-body .katex-display { overflow-x: auto; overflow-y: hidden; padding: 0.2em 0; }
.note-body .katex { font-size: 1.1em; }
.note-body .note-math-error { white-space: pre-wrap; }
.note-format-hint { font-size: 12px; color: var(--text-muted); margin: 0 0 0 8px; min-width: 0; flex: 1; }
.input-action-row .input-send-btn { margin-left: auto; flex: none; }

.note-body.is-collapsed .note-full, .note-body.is-expanded .note-preview { display: none; }
.note-body .note-preview {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden; line-height: 1.5; white-space: normal; word-break: break-word;
}
