:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #eef4f8;
  --line: #d9e2ec;
  --line-strong: #c7d2df;
  --text: #111827;
  --text-soft: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #e4f7f4;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --warn: #a15c07;
  --warn-soft: #fff4d6;
  --ok: #047857;
  --ok-soft: #dff8ec;
  --purple: #6d28d9;
  --purple-soft: #f0e9ff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.10);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
}

body {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: 2px;
}

.icon,
.view-icon,
.meta-icon,
.insight-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.view-icon {
  width: 19px;
  height: 19px;
}

.meta-icon,
.insight-icon {
  width: 15px;
  height: 15px;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(360px, 430px) minmax(0, 1fr);
  height: 100vh;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.05), rgba(37, 99, 235, 0.03) 38%, transparent 68%),
    var(--bg);
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.brand,
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand {
  padding: 5px 6px 18px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0f766e, #2563eb);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}

.brand strong,
.user-card strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand span,
.user-card span,
.sidebar-label,
.thread-kicker {
  color: var(--muted);
  font-size: 12px;
}

.sidebar-label {
  margin: 4px 8px 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.views {
  display: grid;
  gap: 4px;
}

.view-button,
.ghost-button,
.command-button,
.icon-button,
.tab,
.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: var(--radius);
  gap: 8px;
  color: var(--text-soft);
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.view-button {
  justify-content: space-between;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  color: var(--text-soft);
}

.view-main {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.view-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-button:hover,
.view-button.active {
  background: #edf7f5;
  color: var(--accent-strong);
}

.view-button.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.count-pill {
  min-width: 25px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #edf2f7;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

.view-button.active .count-pill {
  background: #d4f2ed;
  color: var(--accent-strong);
}

.count-pill.muted {
  color: transparent;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.user-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.user-avatar,
.row-avatar,
.message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  font-weight: 800;
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
}

.ghost-button {
  justify-content: flex-start;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
}

.ghost-button:hover {
  background: #f1f5f9;
  color: var(--text);
}

.list-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
}

.list-header {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.list-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.list-header h1 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 780;
  line-height: 1.15;
}

.list-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.search-wrap {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  padding: 0 11px;
  box-shadow: var(--shadow-sm);
}

.search {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search::placeholder,
.composer-subject::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

.conversation-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}

.conversation-row {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: 122px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(226, 232, 240, 0.42);
  color: var(--text);
  text-align: left;
}

.conversation-row + .conversation-row {
  margin-top: 4px;
}

.conversation-row:hover {
  border-color: var(--line);
  background: rgba(241, 245, 249, 0.9);
  box-shadow: var(--shadow-sm);
}

.conversation-row.active {
  border-color: rgba(15, 118, 110, 0.30);
  background: #eef3f7;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.09);
}

.conversation-row.unread {
  background: #ffffff;
}

.conversation-row.unread:hover,
.conversation-row.unread.active {
  background: #ffffff;
}

.row-accent {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.conversation-row.active .row-accent {
  background: var(--accent);
}

.conversation-row.unread .row-accent {
  background: var(--blue);
}

.row-avatar {
  width: 36px;
  height: 36px;
  margin-top: 2px;
  background: #dbe3ec;
  color: #526579;
  font-size: 12px;
}

.conversation-row.active .row-avatar {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.conversation-row.unread .row-avatar {
  background: #e7eef7;
  color: #35506b;
}

.row-content,
.row-top,
.row-meta {
  min-width: 0;
}

.row-content {
  display: grid;
  gap: 5px;
}

.row-top,
.row-meta,
.thread-meta,
.message-stamp {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-top,
.row-meta {
  justify-content: space-between;
}

.row-customer,
.row-subject,
.row-preview {
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-customer,
.row-subject {
  white-space: nowrap;
}

.row-customer {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 680;
}

.conversation-row.unread .row-customer {
  color: var(--text);
}

.conversation-row.unread .row-customer,
.conversation-row.unread .row-subject {
  font-weight: 820;
}

.row-top time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.row-subject {
  color: #475569;
  font-size: 14px;
  font-weight: 660;
}

.row-preview {
  display: -webkit-box;
  color: #728096;
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.conversation-row.unread .row-subject {
  color: var(--text-soft);
}

.conversation-row.unread .row-preview {
  color: var(--muted);
}

.row-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 2px;
}

.status-chip,
.meta-token,
.insight,
.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-strong);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.meta-token {
  color: var(--muted);
  font-weight: 600;
}

.status-chip.failed,
.status-chip.deleted,
.insight.failed,
.insight.deleted {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-chip.needs_human,
.status-chip.draft_ready,
.status-chip.waiting_colleague,
.insight.needs_human,
.insight.draft_ready,
.insight.waiting_colleague {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-chip.ai_replied,
.status-chip.waiting_customer,
.status-chip.closed,
.insight.ai_replied,
.insight.waiting_customer,
.insight.closed {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-chip.ai_processing,
.insight.ai_processing {
  background: var(--purple-soft);
  color: var(--purple);
}

.thread-pane {
  min-width: 0;
  overflow: hidden;
  background: var(--bg);
}

.empty-state {
  display: grid;
  align-content: center;
  justify-items: center;
  height: 100%;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.empty-state-icon .icon {
  width: 25px;
  height: 25px;
}

.empty-state h2 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 22px;
}

.empty-state p {
  max-width: 420px;
  margin: 0;
  line-height: 1.5;
}

.thread {
  display: grid;
  position: relative;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  min-width: 0;
}

.thread-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.thread-title {
  min-width: 0;
}

.thread-kicker {
  display: block;
  margin-bottom: 5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.thread-header h2 {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 780;
  line-height: 1.24;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thread-meta {
  flex-wrap: wrap;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.thread-meta span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
}

.thread-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.mail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.command-button {
  min-width: 0;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}

.command-button:hover,
.command-button.active {
  border-color: rgba(15, 118, 110, 0.36);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.command-button.danger {
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--danger);
}

.command-button.danger:hover {
  border-color: rgba(180, 35, 24, 0.20);
  background: #ffd5d2;
}

.thread-selects {
  display: grid;
  grid-template-columns: minmax(180px, 210px);
  gap: 10px;
}

.thread-selects label,
.login-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

select,
.login-form input,
.composer-subject,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: 0;
}

select {
  min-height: 38px;
  padding: 0 10px;
}

.login-form input,
.composer-subject {
  min-height: 40px;
  padding: 0 12px;
}

textarea {
  height: 140px;
  min-height: 110px;
  max-height: 220px;
  padding: 12px;
  line-height: 1.5;
  resize: vertical;
}

select:focus,
.login-form input:focus,
.composer-subject:focus,
textarea:focus,
.search-wrap:focus-within {
  border-color: rgba(15, 118, 110, 0.58);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.insights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 49px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.95);
}

.insight {
  min-height: 32px;
  border-radius: var(--radius);
  padding: 6px 9px;
}

.insight span span,
.insight-label {
  display: block;
  color: currentColor;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0.72;
  text-transform: uppercase;
}

.insight strong {
  display: block;
  max-width: 160px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messages {
  min-height: 0;
  overflow: auto;
  padding: 20px 22px 24px;
}

.message {
  max-width: 860px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.message-inbound {
  margin-right: auto;
}

.message-outbound {
  margin-left: auto;
  border-color: rgba(15, 118, 110, 0.26);
  background: linear-gradient(180deg, #ffffff, #fbfffe);
}

.message-internal {
  margin-right: auto;
  border-color: rgba(161, 92, 7, 0.24);
  background: #fffdf5;
}

.message-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.message-avatar {
  width: 34px;
  height: 34px;
  background: #e7eef7;
  color: #35506b;
  font-size: 12px;
}

.message-outbound .message-avatar {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.message-avatar.small {
  background: var(--warn-soft);
  color: var(--warn);
}

.message-heading {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.message-heading strong,
.message-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-heading strong {
  color: var(--text);
  font-size: 13px;
}

.message-heading span,
.message-stamp {
  color: var(--muted);
  font-size: 12px;
}

.message-stamp {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.message-stamp span {
  color: var(--text-soft);
  font-weight: 700;
}

.message-body {
  overflow-wrap: anywhere;
  padding: 16px;
  color: #172033;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.message-body.html {
  white-space: normal;
}

.message-body.html * {
  max-width: 100%;
}

.message-body p:first-child {
  margin-top: 0;
}

.message-body p:last-child {
  margin-bottom: 0;
}

.activity-log {
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}

.attachment-chip {
  border-radius: var(--radius);
}

.attachment-chip small {
  color: var(--muted);
}

.composer {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 8;
  max-height: min(430px, calc(100% - 32px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
  opacity: 0;
  padding: 14px 18px 16px;
  pointer-events: none;
  transform: translateY(calc(100% + 32px));
  transition: opacity 180ms ease, transform 220ms ease;
  visibility: hidden;
}

.composer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.composer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.composer-header strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.composer-header span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  color: var(--text);
}

.composer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tab {
  min-height: 36px;
  padding: 0 11px;
  background: var(--surface-strong);
  color: var(--text-soft);
}

.tab:hover,
.tab.active {
  background: var(--accent);
  color: #ffffff;
}

.composer-fields {
  display: grid;
  gap: 9px;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

#composer-state {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.send-button {
  min-width: 96px;
  padding: 0 14px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 760;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
}

.send-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.list-empty {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 260px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.list-empty strong {
  color: var(--text);
}

.empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
}

.login-body {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 30% 20%, rgba(15, 118, 110, 0.12), transparent 34%),
    radial-gradient(circle at 70% 30%, rgba(37, 99, 235, 0.10), transparent 34%),
    var(--bg);
  overflow: auto;
}

.login-panel {
  width: min(430px, 100%);
  border: 1px solid rgba(217, 226, 236, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  padding: 26px;
}

.login-brand h1 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 23px;
}

.login-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 15px;
  margin-top: 26px;
}

.login-form .send-button {
  width: 100%;
  min-height: 42px;
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

@media (max-width: 1240px) {
  .app-shell {
    grid-template-columns: 228px minmax(330px, 390px) minmax(0, 1fr);
  }

  .thread-header {
    grid-template-columns: 1fr;
  }

  .thread-actions {
    justify-items: stretch;
  }

  .mail-actions {
    justify-content: flex-start;
  }

  .thread-selects {
    grid-template-columns: minmax(0, 220px);
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 74px minmax(300px, 380px) minmax(0, 1fr);
  }

  .sidebar {
    padding: 14px 9px;
  }

  .brand {
    justify-content: center;
    padding: 4px 0 14px;
  }

  .brand div:not(.brand-mark),
  .sidebar-label,
  .view-label,
  .user-card div:not(.user-avatar),
  .ghost-button span:last-child {
    display: none;
  }

  .view-button,
  .ghost-button {
    justify-content: center;
  }

  .view-main {
    gap: 0;
  }

  .count-pill {
    position: absolute;
    transform: translate(16px, -13px);
  }

  .user-card {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 42vh minmax(58vh, auto);
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand div:not(.brand-mark),
  .sidebar-footer,
  .sidebar-label {
    display: none;
  }

  .views {
    display: flex;
    overflow-x: auto;
  }

  .view-button {
    width: auto;
    min-width: 44px;
  }

  .count-pill {
    position: static;
    transform: none;
  }

  .list-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .thread {
    height: auto;
    min-height: 58vh;
  }

  .thread-header,
  .messages,
  .insights {
    padding-left: 14px;
    padding-right: 14px;
  }

  .thread-selects {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }

  .message-head {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .message-stamp {
    grid-column: 2;
    justify-content: flex-start;
  }

  .composer {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-height: min(78vh, 560px);
  }
}
