/* Keep attachment controls inside narrow message and thread columns. */
.msg .attachments > *, .msg .attachment-wrap, .msg .attachment {
  max-width: 100%; min-width: 0;
}
.msg .attachment { width: 360px; }
.msg .voice-note { width: 338px; }
.msg .voice-note audio { flex: 1; min-width: 0; width: 0; }
.msg .voice-note .vn-icon { flex: none; }

/* Bot cards must retain long titles/URLs instead of clipping their text. */
.msg .bot-embed :is(.be-title, .be-desc) { overflow-wrap: anywhere; }

/* The desktop light-code palette also applies to phones and thread messages. */
.theme-light .msg .code-block .hljs { color: var(--text); background: transparent; }
.theme-light .msg .code-block [class*="hljs-"] { color: var(--text); }
.theme-light .msg .code-block :is(.hljs-keyword, .hljs-selector-tag, .hljs-literal) { color: #803394; }
.theme-light .msg .code-block :is(.hljs-string, .hljs-attr, .hljs-addition) { color: #256636; }
.theme-light .msg .code-block :is(.hljs-title, .hljs-number, .hljs-built_in) { color: #285c9c; }
.theme-light .msg .code-block :is(.hljs-comment, .hljs-quote) { color: #61656f; }
