/* Layout refinements for the existing WhatsApp workspace. */
.context > :not(.context-tabs) { margin-inline: 18px; }
.context > .section { margin-inline: 0; padding-inline: 18px; }
.context .summary-text { line-height: 1.8; overflow-wrap: anywhere; }
.context .summary-points { padding-left: 20px; line-height: 1.75; }
.context .summary-points li + li { margin-top: 6px; }
.context h3 { margin-block: 16px 8px; font-size: 13px; }
.context-tabs { flex-wrap: nowrap; min-height: 52px; }
.context-tabs button { flex: 1; white-space: nowrap; }
.context > .context-tabs { margin-inline: 0; }
.conv { min-height: 80px; align-items: center; }
.conv-name { font-weight: 600; }
.conv-bot { gap: 5px; }
.conv time, .stamp { color: #746e65; }
.bubble { line-height: 1.65; overflow-wrap: anywhere; }
.messages { scrollbar-gutter: stable; }
.composer .box { min-width: 0; }
.compose-row { min-width: 0; }
.summary-text, .summary-points, .kv { min-width: 0; }
button:disabled { cursor: not-allowed; }
@media (min-width: 1241px) {
  .shell { grid-template-columns: 200px 320px minmax(0, 1fr) 304px; }
  .shell.page-mode { grid-template-columns: 200px minmax(0, 1fr); }
  .messages { padding-inline: max(24px, calc((100% - 800px) / 2)); }
  .thread-head { padding-inline: 24px; }
  .composer { padding: 14px 24px 16px; }
}
@media (min-width: 761px) and (max-width: 1240px) {
  .shell { grid-template-columns: 184px 280px minmax(0, 1fr); }
  .shell.page-mode { grid-template-columns: 184px minmax(0, 1fr); }
  .thread-head { flex-wrap: wrap; }
  .msg { max-width: 92%; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .thread-head { flex-wrap: wrap; padding: 10px 12px; }
  .messages { padding: 16px 12px; }
  .msg { max-width: 94%; }
  .composer { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
  .compose-row { flex-wrap: wrap; }
  .context-tabs button { min-height: 44px; }
}
/* Second pass: clearer workspace hierarchy and bounded reading area. */
.app .list { background: #fff; }
.app .list-head { padding: 20px 16px 14px; gap: 12px; border-bottom: 1px solid var(--line); }
.app .list-title h2 { font-size: 18px; font-weight: 700; }
.app .search { min-height: 40px; background: #f7f8f6; }
.app .list-filters { gap: 8px; }
.app .conv { min-height: 88px; padding: 16px; border-bottom: 1px solid #edf0eb; }
.app .conv.on { background-color: #e8f2ec; background-size: 3px 100%; }
.app .conv-preview { margin-top: 3px; }
.app .thread { background: #f3f5f1; }
.app .thread-head { min-height: 88px; background: #fff; padding: 16px 24px; }
.app .who-line h1 { font-size: 18px; font-weight: 650; }
.app .messages { background: #f3f5f1; gap: 20px; }
.app .bubble { padding: 12px 16px; font-size: 14px; line-height: 1.75; border-radius: 16px; }
.app .msg.in .bubble { border-color: #e0e6df; box-shadow: 0 2px 4px #18352405; }
.app .msg.out .bubble { background: #dceee3; color: #183f30; }
.app .stamp { margin-top: 6px; font-size: 11px; }
.app .context { background: #fff; overflow-x: hidden; }
.app .context-tabs { min-height: 62px; padding-inline: 12px; background: #fff; align-items: stretch; }
.app .context-tabs button { padding: 16px 6px; font-size: 12px; }
.app .context .section { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 20px; min-width: 0; }
.app .context .section h3 { margin: 0 0 12px; font-size: 14px; }
.app .context .section h3:not(:first-child) { margin-top: 24px; }
.app .summary-text { padding: 14px; border: 1px solid #e0e9e1; border-radius: 12px; background: #f3f7f2; font-size: 13px; line-height: 1.85; }
.app .summary-points { margin: 0; padding-left: 18px; font-size: 13px; overflow-wrap: anywhere; }
.app .context p, .app .context li { max-width: 100%; overflow-wrap: anywhere; }
.app .composer { background: #fff; padding: 16px 24px; }
.app .composer .box { background: #f7f8f5; min-height: 48px; border-radius: 12px; }
.app .send { min-height: 42px; padding-inline: 18px; border-radius: 10px; }
.app .nav-item { min-height: 40px; margin-bottom: 3px; }
.app .nav-item.on { background: #2b493b; }
.app .brand { min-height: 82px; }
@media (min-width: 1241px) {
 .app .shell:not(.page-mode) { grid-template-columns: 184px 320px minmax(0,1fr) 320px; }
 .app .messages { padding: 24px max(24px, calc((100% - 760px) / 2)); }
 .app .msg { max-width: min(88%, 540px); }
}
@media (min-width: 761px) and (max-width: 1240px) {
 .app .shell:not(.page-mode) { grid-template-columns: 176px 280px minmax(0,1fr); }
 .app .messages { padding: 20px 16px; }
 .app .thread-head { padding: 12px 16px; }
}
@media (max-width: 760px) {
 .app .shell:not(.page-mode) { grid-template-columns: 1fr; }
 .app .messages { padding: 16px 12px; gap: 16px; }
 .app .thread-head { padding: 12px; min-height: 76px; }
 .app .composer { padding: 12px 12px max(12px, env(safe-area-inset-bottom)); }
 .app .bubble { padding: 10px 12px; }
}
