/* VetrexTask – support tickets: messenger (list + conversation), table, "create ticket" page with info cards, bubbles,
   and the same pieces on the public contact page and the guest case page. Loaded by the app, the Support-Panel and the
   contact page; colours come from the tokens of app.css (light, dark, accent). Calm: hierarchy by type size, spacing and
   1px lines; status only as a small dot + text; the accent colour only for primary buttons, links and active states;
   no shadows, no gradients, radius 6px. Motion: none except a short colour fade, which is off with "reduce motion". */

:root { --tk-surface: var(--surface); }
.site { --tk-surface: var(--bg); }

/* ------------------------------------------------------------------ shared: status dot, grey meta line, buttons, links */
.tk-status { display: inline-flex; align-items: center; white-space: nowrap; }
.tk-status::before { content: ""; flex: none; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--text-3); }
.tk-status.ok::before { background: var(--success); }
.tk-status.warn::before { background: var(--warning); }
.tk-status.bad::before { background: var(--danger); }
.tk-meta { display: flex; flex-wrap: wrap; align-items: center; row-gap: 1px; min-width: 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.tk-meta > *:not(:last-child)::after { content: "·"; margin: 0 6px; }
.tk-num { color: var(--text-3); }
.tk-partner { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.tk-meta .tk-partner { margin-left: 0; }
.tk-link { color: var(--accent); text-decoration: none; }
.tk-link:hover { text-decoration: underline; }

.tk-page .btn, .tk-card .btn, .tk-composer .btn, .tk-closed .btn, .tk-chat-empty .btn { height: 30px; border-radius: 6px; font-size: 13px; }
.tk-page .btn.sm { height: 26px; font-size: 12.5px; }
.tk-page .btn.primary, .tk-card .btn.primary, .tk-composer .btn.primary, .tk-closed .btn.primary, .tk-chat-empty .btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.tk-page .input, .tk-card .input { height: 32px; border-radius: 6px; font-size: 13px; background: var(--bg); }
.tk-page textarea.input, .tk-card textarea.input { height: auto; }
.site .tk-card .input { background: var(--surface); }

/* ------------------------------------------------------------------ page head */
.tk-head-slot { display: contents; }
.tk-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.tk-head h1 { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.tk-head .sub { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.tk-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.tk-crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: 2px 8px; font-size: 12px; color: var(--text-3); }
.tk-crumbs li + li::before { content: "›"; margin-right: 8px; }
.tk-crumbs a { color: var(--text-3); text-decoration: none; }
.tk-crumbs a:hover { color: var(--text); text-decoration: underline; }
.tk-crumbs [aria-current] { color: var(--text-2); }
.tk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.tk-toggle { padding: 2px; gap: 2px; border-color: var(--border); border-radius: 6px; background: var(--surface); overflow: visible; }
.tk-toggle button { height: 24px; padding: 0 12px; border: 0; border-radius: 4px; background: none; color: var(--text-2); font-size: 12.5px; }
.tk-toggle button.active { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--text); font-weight: 600; }
.tk-toggle button:hover:not(.active) { color: var(--text); }
.tk-toggle button:focus-visible { outline-offset: -2px; }

/* ------------------------------------------------------------------ messenger */
.tk-messenger { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); height: clamp(480px, calc(100dvh - 176px), 880px);
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); overflow: hidden; }
.tk-list { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--border); }
.tk-list-head { padding: 10px 12px 0; border-bottom: 1px solid var(--border); }
.tk-list-head > .input { margin-bottom: 8px; }
.tk-tabs { display: flex; gap: 18px; }
.tk-tabs button { padding: 4px 0 8px; cursor: pointer; font-size: 13px; color: var(--text-2); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tk-tabs button:hover { color: var(--text); }
.tk-tabs button.active { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.tk-tab-count { margin-left: 5px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.tk-items { flex: 1; min-height: 0; overflow-y: auto; }
.tk-items-empty { padding: 28px 14px; text-align: center; color: var(--text-3); font-size: 13px; }
.tk-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 10px 12px; border-bottom: 1px solid var(--border); border-left: 2px solid transparent; color: inherit; text-decoration: none; }
.tk-item:hover { background: var(--hover); }
.tk-item.selected { background: var(--surface-2); border-left-color: var(--accent); }
.tk-item:focus-visible { outline-offset: -2px; }
.tk-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tk-item-subject { font-size: 13.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item.unread .tk-item-subject { font-weight: 700; }
.tk-item-time { flex: none; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.tk-item-preview { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item .tk-meta { margin-top: 1px; }

.tk-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tk-chat-empty { margin: auto; max-width: 340px; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.tk-chat-empty strong { font-size: 14px; }
.tk-chat-empty p { margin: 0; color: var(--text-3); font-size: 13px; }
.tk-chat-empty .btn { margin-top: 10px; }
.tk-chat-top { flex: none; border-bottom: 1px solid var(--border); max-height: 52%; overflow-y: auto; }
.tk-chat-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; }
.tk-back { display: none; padding: 0 8px 0 0; font-size: 24px; line-height: 1; color: var(--text-2); text-decoration: none; }
.tk-chat-title { flex: 1; min-width: 0; }
.tk-chat-title h2 { font-size: 14px; overflow-wrap: anywhere; }
.tk-chat-title h2:focus { outline: none; }
.tk-chat-title h2 .tk-num { margin-right: 6px; font-weight: 400; }
.tk-chat-title .tk-meta { margin-top: 3px; }
.tk-chat-head > .btn, .tk-assigned { flex: none; margin-left: auto; }
.tk-assigned { font-size: 12px; color: var(--text-3); line-height: 30px; }

.tk-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.tk-day { display: flex; align-items: center; gap: 12px; margin: 4px 0; font-size: 12px; color: var(--text-3); }
.tk-day::before, .tk-day::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.tk-msg { display: flex; }
.tk-msg.mine { justify-content: flex-end; }
.tk-bubble { min-width: 0; max-width: min(640px, 84%); padding: 8px 12px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.tk-msg.mine .tk-bubble { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.tk-who { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; margin-bottom: 2px; font-size: 12px; color: var(--text-3); }
.tk-who strong { font-weight: 600; color: var(--text-2); }
.tk-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; font-size: 13.5px; }
.tk-text a { color: var(--accent); }
.tk-time { display: block; margin-top: 3px; text-align: right; font-size: 11px; color: var(--text-3); }

.tk-composer { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.tk-composer textarea { min-height: 38px; max-height: 200px; resize: none; overflow-y: auto; }
.tk-composer-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.tk-composer-row select { width: auto; max-width: 100%; }
.tk-hint { margin-right: auto; font-size: 12px; color: var(--text-3); }
.tk-closed { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.tk-closed p { margin: 0; color: var(--text-2); font-size: 13px; }

/* Support-Panel: controls and customer box above the conversation */
.tk-controls { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; padding: 0 16px 12px; }
.tk-control { display: flex; flex-direction: column; gap: 3px; flex: 1 1 150px; max-width: 220px; min-width: 0; }
.tk-control .field-label { margin: 0; }
.tk-control select { width: 100%; }
.tk-assist { padding: 0 16px 10px; }
.tk-customer { border-top: 1px solid var(--border); padding: 8px 16px; }
.tk-customer summary { cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; list-style-position: inside; }
.tk-customer summary .tk-partner { margin-left: 0; }
.tk-customer-mail { overflow-wrap: anywhere; }
.tk-customer-body { padding: 8px 0 4px; }
.tk-customer-body .case-label { margin-top: 12px; }
.tk-customer-body .case-note { margin-top: 3px; }
.tk-customer-body .case-other .tk-status { margin-left: 8px; color: var(--text-3); }

/* ------------------------------------------------------------------ table */
.tk-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.tk-toolbar > .input { width: 320px; max-width: 100%; }
.tk-table-card { overflow: hidden; }
table.tk-table th { background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 9px 12px; vertical-align: middle; }
table.tk-table td { padding: 8px 12px; vertical-align: middle; font-size: 13px; }
table.tk-table tr.clickable-row { cursor: pointer; }
table.tk-table tr.partner-row > td:first-child { box-shadow: none; }
.tk-table .ticket-subject { font-weight: 600; }
@media (min-width: 641px) { table.tk-table td { height: 42px; } }

/* ------------------------------------------------------------------ create page, info cards, form (app, contact page) */
.tk-create-grid { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tk-aside { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tk-info { padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; background: var(--tk-surface); min-width: 0; }
.tk-info strong { display: block; font-size: 13px; }
.tk-info p { margin: 4px 0 0; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.tk-info .tk-link { display: inline-block; margin-top: 8px; font-size: 12.5px; }
.tk-info.warn { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: color-mix(in srgb, var(--danger) 8%, var(--tk-surface)); }
.tk-info.warn strong { color: var(--danger); }
.tk-info.warn p { color: var(--text-2); }
.tk-big { margin-top: 2px; font-size: 20px; font-weight: 600; line-height: 1.3; }
.tk-card { background: var(--tk-surface); border: 1px solid var(--border); border-radius: 6px; min-width: 0; }
.tk-card-head { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.tk-card-head h2 { font-size: 14px; }
.tk-form-body { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.tk-two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
.tk-two.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tk-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.tk-form .field-error { margin-top: 2px; }
.tk-form .field-error[hidden] { display: none; }
.tk-form .input[aria-invalid="true"] { border-color: var(--danger); }
.tk-form .hint { font-size: 12px; color: var(--text-3); }
.tk-counter { text-align: right; font-size: 12px; color: var(--text-3); }
.tk-form-actions { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 0 16px 16px; }
.tk-form-actions .btn { min-width: 96px; justify-content: center; }
.tk-form-actions .btn:only-child { margin-left: auto; }

/* "Betroffener Bereich": one field that opens a list with check boxes */
.tk-multi { position: relative; }
.tk-multi-sum { display: block; position: relative; padding-right: 30px; line-height: 30px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; list-style: none; color: var(--text-2); }
.tk-multi-sum::-webkit-details-marker { display: none; }
.tk-multi-sum::after { content: ""; position: absolute; right: 12px; top: 10px; width: 6px; height: 6px; border: solid var(--text-3); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.tk-multi[open] .tk-multi-sum { border-color: var(--accent); }
.tk-multi-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 264px; overflow-y: auto; padding: 4px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; }
.tk-multi-opt { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 8px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.tk-multi-opt:hover { background: var(--hover); }
.tk-multi-opt input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.tk-multi-opt:has(input:disabled) { opacity: .5; cursor: default; }

/* ------------------------------------------------------------------ public contact page and guest case */
.site .tk-create-grid { margin-top: 24px; }
.site .tk-card-head h2 { margin: 0; font-size: 15px; line-height: 1.3; letter-spacing: 0; }
.site .tk-info .btn, .site .tk-form-actions .btn, .site .tk-composer .btn { height: 34px; }
.site .tk-privacy { margin: 0; font-size: 13px; color: var(--text-3); }
.site-wrap .tk-sent { max-width: 70ch; margin-top: 24px; }
.tk-guest { margin-top: 24px; max-width: 860px; }
.tk-guest .tk-card { overflow: hidden; }
.tk-guest-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.tk-guest-head h1 { margin: 0 0 6px !important; font-size: 18px !important; line-height: 1.3 !important; letter-spacing: 0 !important; max-width: none !important; }
.tk-guest-head p { margin: 8px 0 0 !important; font-size: 12.5px; color: var(--text-3); }
.tk-conversation { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: color-mix(in srgb, var(--surface-2) 50%, var(--tk-surface)); }
.tk-guest .tk-reply { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); }
.tk-guest .tk-form-actions { padding: 0; }
.tk-notice { margin-top: 16px; max-width: 860px; }

/* ------------------------------------------------------------------ narrow screens */
@media (max-width: 1100px) {
  .tk-messenger { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .tk-create-grid { grid-template-columns: minmax(0, 1fr); }
  .tk-aside { display: contents; } /* night notice first, then the form, then the other cards */
  .tk-aside > .tk-info { order: 2; }
  .tk-aside > .tk-info.warn { order: 0; }
  .tk-create-grid > .tk-form, .tk-create-grid > form { order: 1; }
}
@media (max-width: 820px) {
  .tk-messenger { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 232px); min-height: 400px; }
  .tk-messenger[data-pane="list"] .tk-chat, .tk-messenger[data-pane="chat"] .tk-list { display: none; }
  .tk-back { display: block; }
  /* an open case on a phone: the page head gives way to the case, but its h1 stays for screen readers (one h1 per page) */
  .tk-page:has(.tk-messenger[data-pane="chat"]) .tk-head { margin: 0; }
  .tk-page:has(.tk-messenger[data-pane="chat"]) .tk-head-side, .tk-page:has(.tk-messenger[data-pane="chat"]) .tk-head .sub { display: none; }
  .tk-page:has(.tk-messenger[data-pane="chat"]) .tk-head-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .tk-page:has(.tk-messenger[data-pane="chat"]) .tk-messenger { height: calc(100dvh - 52px - 76px - env(safe-area-inset-bottom) - 8px); }
  .tk-chat-top { max-height: 46%; }
}
@media (max-width: 640px) {
  .tk-head { gap: 10px; }
  .tk-head-side { width: 100%; align-items: flex-start; }
  .tk-actions { width: 100%; justify-content: flex-start; }
  .tk-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 40px; }
  .tk-toggle { flex: 1 1 100%; }
  .tk-toggle button { flex: 1; justify-content: center; min-height: 36px; }
  .tk-two, .tk-two.even { grid-template-columns: minmax(0, 1fr); }
  .tk-form-body { padding: 14px; }
  .tk-card-head { padding: 12px 14px; }
  .tk-form-actions { padding: 0 14px 14px; }
  .tk-thread { padding: 12px; }
  .tk-bubble { max-width: 90%; }
  .tk-composer { padding: 10px 12px; }
  .tk-composer-row { gap: 8px; flex-wrap: nowrap; }
  .tk-hint { display: none; }
  .tk-composer-row select { flex: 1 1 0; min-width: 0; min-height: 40px; }
  .tk-composer-row .btn { flex: 1 1 0; justify-content: center; min-height: 40px; }
  .tk-closed { padding: 10px 12px; }
  .tk-controls { padding: 0 12px 10px; }
  .tk-control { flex: 1 1 calc(50% - 6px); max-width: none; }
  .tk-control select { min-height: 40px; }
  .tk-customer { padding: 8px 12px; }
  .tk-chat-head { padding: 12px; flex-wrap: wrap; }
  .tk-chat-head > :not(.tk-back):not(.tk-chat-title) { order: 3; margin-left: 24px; }
  .tk-form-actions .btn { flex: 1 1 0; min-height: 40px; }
  .tk-multi-opt { min-height: 40px; }
  .tk-toolbar > .input { width: 100%; }
  .tk-conversation, .tk-guest-head, .tk-guest .tk-reply { padding-left: 12px; padding-right: 12px; }
  table.tk-table tr.partner-row { box-shadow: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .tk-item, .tk-tabs button, .tk-toggle button, .tk-multi-opt { transition: background-color .12s, border-color .12s, color .12s; }
}

/* ------------------------------------------------------------------ files on messages (plain lists, no icons or pills) */
.tk-files { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.tk-files li { min-width: 0; overflow-wrap: anywhere; }
.tk-files a { color: var(--accent); }
.tk-file-size { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.tk-attach { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tk-attach-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tk-attach-hint { font-size: 12px; color: var(--text-3); }
.tk-file-pending { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.tk-file-pending[hidden], .tk-attach .field-error[hidden] { display: none; }
.tk-file-pending li { min-width: 0; overflow-wrap: anywhere; }
.tk-file-pending .link-btn { font-size: 12px; }
.tk-dragging { outline: 2px dashed var(--accent); outline-offset: -2px; }
.tk-composer .tk-attach { padding: 0; }
.tk-guest .tk-closed { border-top: 1px solid var(--border); }

/* VertexTask staff inbox: compact queue and a spacious conversation. */
.tk-staff .tk-messenger { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); height: calc(100dvh - 170px); max-height: none; border-radius: 10px; }
.tk-staff .tk-list { background: var(--surface); }
.tk-staff .tk-chat-head { padding: 14px 20px; }
.tk-staff .tk-thread { padding: 24px; gap: 20px; }
.tk-staff .tk-bubble { border-radius: 12px 12px 12px 3px; padding: 12px 16px; }
.tk-staff .tk-msg.mine .tk-bubble { border-radius: 12px 12px 3px 12px; background: color-mix(in srgb, #1687b0 20%, var(--surface)); border-color: color-mix(in srgb, #1687b0 28%, var(--border)); }
.tk-staff .tk-composer { padding: 14px 20px; }
.tk-staff .tk-composer textarea { min-height: 76px; }
.tk-staff .tk-extras { border-top: 1px solid var(--border); }
@media(max-width:640px) {
 .tk-staff .tk-messenger { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 232px); }
 .tk-staff .tk-thread { padding: 12px; gap: 12px; }
 .tk-staff .tk-chat-head, .tk-staff .tk-composer { padding: 12px; }
}

/* Author and timestamp belong to the message, outside its readable text surface. */
.tk-msg { width: 100%; min-width: 0; align-items: flex-start; gap: 10px; }
.tk-msg.mine { flex-direction: row-reverse; justify-content: flex-start; }
.tk-message-avatar { flex: 0 0 32px; width: 32px; height: 32px; margin-top: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 11px; font-weight: 600; }
.tk-message-content { flex: 0 1 auto; width: fit-content; min-width: min(300px, calc(100% - 42px)); max-width: min(680px, calc(100% - 42px)); }
.tk-message-content > .tk-who { min-height: 20px; margin: 0 8px 5px; gap: 8px; line-height: 1.5; }
.tk-message-content > .tk-bubble { width: 100%; min-width: 0; max-width: none; padding: 12px 15px; border-radius: 4px 16px 16px 16px; border: 1px solid var(--border); background: var(--surface-2); }
.tk-msg.mine .tk-message-content > .tk-bubble { border-radius: 16px 4px 16px 16px; border-color: var(--border); background: var(--surface-2); }
.tk-message-content .tk-text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; font-size: 14px; line-height: 1.6; }
.tk-message-content > .tk-time { margin: 5px 8px 0; text-align: left; line-height: 1.5; }
.tk-msg.mine .tk-message-content > .tk-who { justify-content: flex-end; }
.tk-msg.mine .tk-message-content > .tk-time { text-align: right; }
@media (max-width: 640px) {
  .tk-msg { gap: 8px; }
  .tk-message-avatar { flex-basis: 26px; width: 26px; height: 26px; font-size: 10px; }
  .tk-message-content { min-width: min(260px, calc(100% - 34px)); max-width: calc(100% - 34px); }
}
