:root {
  --bg: #f6f8f7;
  --panel: #ffffff;
  --panel-soft: #f9fbfa;
  --text: #1f2a2b;
  --muted: #637173;
  --border: #dce4e2;
  --teal: #177d72;
  --teal-dark: #0e5e56;
  --duck: #f2c14e;
  --amber: #b7791f;
  --red: #b7323c;
  --green: #247a45;
  --blue: #2563a7;
  --shadow: 0 18px 45px rgba(23, 42, 46, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  border: 0;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-weight: 750;
  padding: 10px 14px;
  cursor: pointer;
}

button:hover {
  background: var(--teal-dark);
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.secondary-button {
  background: #edf4f3;
  color: var(--teal-dark);
}

.secondary-button:hover {
  background: #dfecea;
}

.danger-button {
  background: #f9e8ea;
  color: var(--red);
}

.danger-button:hover {
  background: #f1d5d9;
}

.compact-button {
  padding: 7px 10px;
  font-size: 13px;
}

.inline-delete-form {
  margin: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(23, 125, 114, 0.12);
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--border);
  background: #111b1d;
  color: #f7fbfa;
  padding: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(242, 193, 78, 0.55);
  background: #fff4ca;
  box-shadow: inset 0 -5px 14px rgba(242, 193, 78, 0.35);
  overflow: hidden;
}

.duck-logo {
  width: 34px;
  height: 34px;
  display: block;
}

.duck-fill,
.duck-bill {
  fill: var(--duck);
  stroke: #101312;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.1;
}

.duck-bill {
  fill: #f8d46a;
}

.duck-mouth,
.duck-eye {
  fill: #101312;
}

.duck-line {
  fill: none;
  stroke: #101312;
  stroke-linecap: round;
  stroke-width: 2.6;
}

.duck-eye-spark {
  fill: #fff6d6;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  border-radius: 7px;
  color: #dce7e5;
  padding: 10px 11px;
  font-weight: 700;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav a.nav-alert {
  animation: nav-alert-flash 0.9s ease-in-out infinite;
  background: #f2c14e;
  color: #101312;
}

@keyframes nav-alert-flash {
  0%, 100% {
    background: #f2c14e;
    box-shadow: 0 0 0 0 rgba(242, 193, 78, 0.34);
  }
  50% {
    background: #ffe08a;
    box-shadow: 0 0 0 4px rgba(242, 193, 78, 0.22);
  }
}

.tenant-card {
  margin-top: auto;
  display: grid;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  padding: 14px;
}

.tenant-card p {
  margin: 0;
  color: #f6d0d3;
  font-size: 13px;
}

.main-shell {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.topbar h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.topbar-actions form {
  margin: 0;
}

.route-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.message-stack {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.notice {
  border-left: 4px solid var(--teal);
  border-radius: 7px;
  background: #edf8f5;
  padding: 10px 12px;
  font-weight: 700;
}

.notice.error {
  border-color: var(--red);
  background: #fff0f1;
}

.queue-alert {
  display: grid;
  gap: 6px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--amber);
  border-radius: var(--radius);
  background: #fffaf0;
  margin-bottom: 14px;
  padding: 13px;
}

.queue-alert.status-failed,
.queue-alert.status-rejected,
.queue-alert.status-undelivered {
  border-left-color: var(--red);
  background: #fff0f1;
}

.queue-alert strong,
.queue-alert p {
  margin: 0;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric-row div,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-row div {
  padding: 13px 15px;
}

.metric-row strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.metric-row span,
.muted,
table span,
.hint {
  color: var(--muted);
  font-size: 13px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(255px, 330px) minmax(380px, 1fr) minmax(260px, 340px);
  gap: 12px;
  align-items: start;
}

.panel {
  min-width: 0;
  padding: 14px;
}

.conversation-rail,
.thread-panel,
.detail-panel {
  height: calc(100vh - 136px);
  min-height: 620px;
}

.conversation-rail,
.detail-panel {
  overflow: auto;
}

.thread-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.search-form,
.stack-form {
  display: grid;
  gap: 9px;
}

.search-form.horizontal {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 12px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checkline input {
  width: auto;
}

.conversation-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.conversation-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 11px;
}

.conversation-item.needs-attention {
  border-color: var(--duck);
  background: #fff9e5;
  box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.28), 0 10px 22px rgba(183, 121, 31, 0.18);
  animation: conversationAttentionPulse 1.15s ease-in-out infinite;
}

.conversation-item.needs-attention strong,
.conversation-item.needs-attention .preview {
  color: #101312;
  font-weight: 850;
}

.conversation-item.active {
  border-color: var(--teal);
  background: #edf8f5;
}

.conversation-item.active.needs-attention {
  animation: none;
  border-color: var(--teal);
  background: #edf8f5;
  box-shadow: none;
}

@keyframes conversationAttentionPulse {
  0%,
  100% {
    transform: translateX(0);
    box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.18), 0 8px 18px rgba(183, 121, 31, 0.12);
  }
  45% {
    transform: translateX(2px);
    box-shadow: 0 0 0 5px rgba(242, 193, 78, 0.42), 0 12px 28px rgba(183, 121, 31, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .conversation-item.needs-attention {
    animation: none;
  }
}

.item-top,
.badge-row,
.thread-header,
.section-head,
.inline-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gateway-action-stack {
  align-items: stretch;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 96px;
}

.gateway-action-stack button {
  width: 100%;
}

.item-top em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.preview {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.status-badge,
.count-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  padding: 4px 8px;
  text-transform: uppercase;
}

.status-active,
.status-replaced,
.status-trialing,
.status-online,
.status-open,
.status-replied,
.status-queued,
.status-claimed,
.status-paired,
.status-opted_in {
  background: #e2f5e8;
  color: var(--green);
}

.status-past_due,
.status-paused,
.status-pending,
.status-delayed,
.status-new {
  background: #fff3d5;
  color: var(--amber);
}

.status-cancelled,
.status-expired,
.status-disabled,
.status-retired,
.status-stale,
.status-revoked,
.status-failed,
.status-undelivered,
.status-rejected,
.status-blocked,
.status-offline,
.status-opt_out,
.status-opted_out {
  background: #ffe4e8;
  color: var(--red);
}

.count-badge {
  background: var(--duck);
  color: #151515;
}

.thread-header {
  border-bottom: 1px solid var(--border);
  padding: 16px;
}

.thread-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.thread-actions form {
  margin: 0;
}

.thread-header h2,
.detail-panel h2,
.panel h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.thread-header p,
.section-head p {
  margin: 0;
  color: var(--muted);
}

.sms-thread {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, #f8fbfa, #eef5f3);
  padding: 18px;
}

.bubble {
  max-width: min(78%, 620px);
  border-radius: 14px;
  padding: 11px 13px;
  box-shadow: 0 6px 18px rgba(31, 42, 43, 0.08);
}

.bubble.inbound {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
}

.bubble.outbound {
  align-self: flex-end;
  background: #dff3ef;
  border: 1px solid #b9ddd8;
}

.bubble-body {
  overflow-wrap: anywhere;
  white-space: normal;
}

.bubble-attachments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.bubble-attachments a {
  display: inline-block;
}

.bubble-attachments img {
  display: block;
  max-width: min(100%, 340px);
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

.attachment-link {
  color: var(--teal-dark);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bubble footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.copy-message-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  border-radius: 6px;
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.copy-message-button:hover,
.copy-message-button.copied {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: #fff;
}

.error-text {
  color: var(--red);
}

.composer {
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 13px;
}

.composer-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.composer-tools span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.composer-tools .warn {
  color: var(--amber);
}

.detail-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.start-card,
.info-card {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.info-card:last-child {
  border-bottom: 0;
}

dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 10px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.audit-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

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

.empty,
.empty-state {
  color: var(--muted);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  text-align: center;
}

.two-panel,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 12px;
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

.signature-settings {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.signature-settings h2,
.signature-settings p {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 11px 9px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.contacts-table th:last-child,
.contacts-table td:last-child {
  width: 92px;
  text-align: right;
}

.settings-list {
  grid-template-columns: 170px 1fr;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 12px;
}

.settings-list.compact {
  grid-template-columns: 110px 1fr;
}

.permission-guide {
  display: grid;
  gap: 12px;
  border-color: #f0d99d;
  background: #fffaf0;
}

.permission-guide h2,
.permission-guide p {
  margin: 0;
}

.permission-steps,
.permission-checklist {
  margin: 0;
  padding-left: 22px;
}

.permission-steps {
  display: grid;
  gap: 7px;
}

.permission-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px 18px;
}

.permission-checklist li {
  font-weight: 750;
}

.file-picker.is-disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.file-picker.is-disabled input {
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .workspace-grid,
  .two-panel,
  .settings-grid,
  .setup-grid {
    grid-template-columns: 1fr;
  }

  .conversation-rail,
  .thread-panel,
  .detail-panel {
    height: auto;
    min-height: 0;
  }

  .permission-checklist {
    grid-template-columns: 1fr;
  }
}

.auth-panel {
  max-width: 460px;
}

code {
  overflow-wrap: anywhere;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  padding: 10px 12px;
}

.button-link:hover {
  background: var(--teal-dark);
}

.help-button {
  min-width: 78px;
}

.page-help-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.vpn-help-link {
  display: inline-block;
  color: var(--teal-dark);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.help-layout {
  max-width: 980px;
}

.help-panel {
  display: grid;
  gap: 18px;
}

.help-section {
  display: grid;
  gap: 8px;
}

.help-section h2,
.help-section ul {
  margin: 0;
}

.help-section ul {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.qr-grid {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(190px, 240px) minmax(280px, 1fr);
  gap: 14px;
  align-items: start;
}

.qr-card,
.pairing-details {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.qr-card h3,
.pairing-details h3 {
  margin: 0;
  font-size: 16px;
}

.qr-card img {
  display: block;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #f7faf9;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.qr-placeholder strong {
  color: var(--text);
  text-transform: uppercase;
}

.qr-card code {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f7faf9;
  color: var(--text);
  font-size: 12px;
  padding: 8px;
}

.terms-link-small {
  font-size: 12px;
  margin-top: 12px;
}

.terms-panel {
  max-width: 980px;
}

.terms-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}

.terms-section h3,
.terms-section h2 {
  font-size: 16px;
  margin: 0 0 8px;
}

.terms-section li {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 7px;
}

.terms-accept-form {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
}

.terms-check {
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.public-terms-shell {
  margin: 0 auto;
  max-width: 1040px;
  padding: 24px;
}

.theme-toggle-button {
  margin-top: 12px;
  width: 100%;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1412;
  --panel: #18231f;
  --panel-soft: #202e29;
  --text: #edf7f2;
  --muted: #a9bbb4;
  --border: #33443f;
  --teal: #31aa9b;
  --teal-dark: #78d7ce;
  --duck: #f2c14e;
  --amber: #efb24a;
  --red: #ff7d8a;
  --green: #6fd48b;
  --blue: #81b8f4;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .public-terms-shell {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .sidebar {
  background: #07110f;
  border-right-color: #243430;
}

html[data-theme="dark"] .brand-mark {
  background: #2f2812;
  border-color: rgba(242, 193, 78, 0.7);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #111a17;
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #81948d;
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .metric-row div,
html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .terms-panel {
  background: var(--panel);
  border-color: var(--border);
}

html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .route-chip {
  background: #22322d;
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="dark"] .secondary-button:hover {
  background: #2d423b;
}

html[data-theme="dark"] .notice {
  background: #17322d;
}

html[data-theme="dark"] .notice.error {
  background: #3a1d23;
}

html[data-theme="dark"] .conversation-item {
  background: var(--panel-soft);
}

html[data-theme="dark"] .conversation-item.active,
html[data-theme="dark"] .selected-row {
  background: #153b35;
}

html[data-theme="dark"] .sms-thread {
  background: linear-gradient(180deg, #121c19, #0e1715);
}

html[data-theme="dark"] .bubble.inbound {
  background: #1c2824;
}

html[data-theme="dark"] .bubble.outbound {
  background: #143d37;
  border-color: #2f6f66;
}

html[data-theme="dark"] .composer {
  background: #141e1b;
}

html[data-theme="dark"] .status-active,
html[data-theme="dark"] .status-replaced,
html[data-theme="dark"] .status-trialing,
html[data-theme="dark"] .status-online,
html[data-theme="dark"] .status-open,
html[data-theme="dark"] .status-replied,
html[data-theme="dark"] .status-queued,
html[data-theme="dark"] .status-claimed,
html[data-theme="dark"] .status-paired,
html[data-theme="dark"] .status-opted_in {
  background: #163422;
}

html[data-theme="dark"] .status-past_due,
html[data-theme="dark"] .status-paused,
html[data-theme="dark"] .status-pending,
html[data-theme="dark"] .status-delayed,
html[data-theme="dark"] .status-new {
  background: #3a2b14;
}

html[data-theme="dark"] .status-cancelled,
html[data-theme="dark"] .status-expired,
html[data-theme="dark"] .status-disabled,
html[data-theme="dark"] .status-retired,
html[data-theme="dark"] .status-stale,
html[data-theme="dark"] .status-revoked,
html[data-theme="dark"] .status-failed,
html[data-theme="dark"] .status-undelivered,
html[data-theme="dark"] .status-rejected,
html[data-theme="dark"] .status-blocked,
html[data-theme="dark"] .status-offline,
html[data-theme="dark"] .status-opt_out,
html[data-theme="dark"] .status-opted_out {
  background: #3c1f27;
}

html[data-theme="dark"] .qr-card img {
  background: #fff;
}

@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  }

  .detail-panel {
    grid-column: 1 / -1;
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-shell {
    padding: 14px;
  }

  .topbar,
  .item-top,
  .thread-header,
  .section-head,
  .inline-action {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-row,
  .workspace-grid,
  .two-panel,
  .settings-grid,
  .setup-grid,
  .qr-grid {
    grid-template-columns: 1fr;
  }

  .conversation-rail,
  .thread-panel {
    height: auto;
    min-height: 0;
  }

  .sms-thread {
    max-height: 520px;
  }

  .bubble {
    max-width: 92%;
  }
}
