:root {
  --bg: #0e1014;
  --bg-elev: #181b22;
  --bg-card: #1c2029;
  --bg-hover: #232834;
  --line: #2a2f3a;
  --txt: #e7eaf0;
  --txt-dim: #9aa3b2;
  --txt-faint: #6b7385;
  --accent: #5b8cff;
  --wa: #25d366;
  --tg: #2aabee;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --maxw: 1400px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* beat CSS display: on .grid etc. */
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--txt);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- scrollbars (match dark theme) ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--txt-faint);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- login ---------- */
.login-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(110% 80% at 50% -10%, #1b2436 0%, var(--bg) 55%);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 340px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 26px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
  text-align: center;
}
.login-logo { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.login-logo span { color: var(--accent); }
.login-sub { margin: -6px 0 8px; color: var(--txt-dim); font-size: 14px; }
.login-input, .login-btn { width: 100%; padding: 13px 14px; border-radius: 11px; font-size: 15px; }
.login-input {
  background: var(--bg-card); border: 1px solid var(--line); color: var(--txt);
}
.login-input:focus { outline: none; border-color: var(--accent); }
.login-btn {
  background: var(--accent); border: none; color: #fff; font-weight: 600;
  cursor: pointer; transition: filter .15s;
}
.login-btn:hover { filter: brightness(1.08); }
.login-error {
  background: rgba(255,80,80,.12); color: #ff8a8a;
  border: 1px solid rgba(255,80,80,.3); border-radius: 9px;
  padding: 9px; font-size: 13px;
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14,16,20,.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  display: flex; align-items: center; gap: 14px;
  max-width: var(--maxw); margin: 0 auto;
  padding: 12px 18px;
  padding-top: max(12px, env(safe-area-inset-top));
}
.brand { font-size: 19px; font-weight: 800; letter-spacing: -.4px; white-space: nowrap;
  cursor: pointer; user-select: none; transition: opacity .12s; }
.brand:hover { opacity: .75; }
.brand span { color: var(--accent); }
.search-wrap { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; }
.search {
  width: 100%; padding: 10px 14px; border-radius: 11px;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--txt);
  font-size: 15px;
}
.search:focus { outline: none; border-color: var(--accent); }
.search::placeholder { color: var(--txt-faint); }
.meta { color: var(--txt-faint); font-size: 12px; white-space: nowrap; }
.logout {
  color: var(--txt-dim); text-decoration: none; font-size: 18px;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--line); flex-shrink: 0;
}
.logout:hover { color: #ff8a8a; border-color: rgba(255,80,80,.4); }

/* ---------- AI prompt bar ---------- */
.search-mode { display: inline-flex; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 9px; padding: 2px; flex-shrink: 0; }
.sm-btn { border: none; background: transparent; color: var(--txt-dim); font-size: 12px;
  font-weight: 600; padding: 6px 9px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.sm-btn.active { background: var(--accent); color: #fff; }
.sm-btn[data-sm="ai"].active { background: linear-gradient(135deg, #7a5bff, #5b8cff); }
.ai-go { flex-shrink: 0; padding: 9px 14px; border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #7a5bff, #5b8cff); color: #fff; font-weight: 600;
  font-size: 13px; white-space: nowrap; }
.ai-go:disabled { opacity: .55; cursor: default; }
.ai-answer { background: rgba(123,91,255,.10); border: 1px solid rgba(123,91,255,.35);
  border-radius: 12px; padding: 12px 30px 12px 14px; margin: 12px; color: var(--txt);
  font-size: 14px; line-height: 1.5; white-space: normal; position: relative; }
.ai-answer .md-p { margin: 0 0 8px; }
.ai-answer .md-p:last-child { margin-bottom: 0; }
.ai-answer .md-h { font-weight: 700; margin: 12px 0 6px; }
.ai-answer .md-list { margin: 4px 0 10px; padding-left: 18px; }
.ai-answer .md-list:last-child { margin-bottom: 0; }
.ai-answer .md-list li { margin: 2px 0; }
.ai-answer strong { font-weight: 700; }
.ai-answer code { background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 5px;
  font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ai-answer .ai-tag { font-size: 11px; font-weight: 700; color: #b79bff;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px; }
.ai-answer .ai-clear { position: absolute; top: 7px; right: 9px; cursor: pointer;
  color: var(--txt-dim); background: none; border: none; font-size: 16px; }
.ai-answer .ai-clear:hover { color: var(--txt); }
.grid .ai-answer { grid-column: 1 / -1; margin: 0 0 6px; }
.ai-hit { display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin: 2px 8px;
  border-radius: 11px; cursor: pointer; }
.ai-hit:hover { background: var(--bg-hover); }
.ai-hit-dot { position: static; width: 12px; height: 12px; border: none; flex-shrink: 0; border-radius: 50%; }
.ai-hit-body { min-width: 0; }
.ai-hit-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-hit-sub { color: var(--txt-dim); font-size: 12px; margin-top: 2px; }

/* AI gear popup */
.ai-cfg-wrap { position: relative; flex-shrink: 0; }
.ai-cfg { background: var(--bg-card); border: 1px solid var(--line); color: var(--txt-dim);
  border-radius: 9px; width: 38px; height: 38px; cursor: pointer; font-size: 16px; }
.ai-cfg:hover { color: var(--txt); border-color: var(--accent); }
.ai-cfg-pop { position: absolute; right: 0; top: 46px; z-index: 30; width: 264px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.ai-cfg-pop label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--txt-dim); }
.ai-cfg-pop select { padding: 8px 10px; border-radius: 8px; background: var(--bg-card); color: var(--txt);
  border: 1px solid var(--line); font-size: 13px; cursor: pointer; }

/* AI chat panel (right pane) */
.ai-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ai-chat-head { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ai-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px; }
.ai-msg.user { align-self: flex-end; max-width: 88%; background: #2b5278; color: #fff;
  padding: 8px 12px; border-radius: 14px; border-bottom-right-radius: 5px; font-size: 14px; white-space: pre-wrap; }
.ai-msg.ai { align-self: stretch; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 14px; border-bottom-left-radius: 5px; padding: 10px 14px; }
.ai-steps { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.ai-step { font-size: 12px; color: var(--txt-faint); }
.ai-step.err { color: #ff6b6b; }
.ai-answer-md { font-size: 14px; line-height: 1.5; }
.ai-answer-md .md-p { margin: 0 0 8px; } .ai-answer-md .md-p:last-child { margin-bottom: 0; }
.ai-answer-md .md-h { font-weight: 700; margin: 10px 0 5px; }
.ai-answer-md .md-list { margin: 4px 0 8px; padding-left: 18px; } .ai-answer-md .md-list li { margin: 2px 0; }
.ai-answer-md strong { font-weight: 700; }
.chat-link { color: #9ec1ff; text-decoration: none; cursor: pointer; font-weight: 600;
  border-bottom: 1px dashed rgba(158,193,255,.5); }
.chat-link:hover { color: #cfe0ff; border-bottom-color: var(--accent); }
.ai-hits { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.ai-hits:empty { display: none; }
.ai-chat-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); flex-shrink: 0; }
.ai-followup { flex: 1; padding: 10px 12px; border-radius: 10px; background: var(--bg-card);
  border: 1px solid var(--line); color: var(--txt); font-size: 14px; }
.ai-followup:focus { outline: none; border-color: var(--accent); }
.ai-followup-go { width: 42px; border-radius: 10px; border: none; background: var(--accent);
  color: #fff; font-size: 18px; cursor: pointer; }

/* topbar fits narrow screens: search drops to its own row, brand shrinks */
@media (max-width: 600px) {
  .bar-inner { flex-wrap: wrap; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
  .brand span { display: none; }
  .meta { display: none; }
  .seg { flex: 1; }
  .seg-btn { flex: 1; }
  .search-wrap { order: 10; flex-basis: 100%; }
  /* topbar is two rows here → more vertical space taken */
  .msgview { height: calc(100dvh - 112px - env(safe-area-inset-top)); }
  .grid { padding: 12px; gap: 10px; }
}

/* ---------- grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 16px 18px 40px;
  max-width: var(--maxw); margin: 0 auto;
}
.card {
  display: flex; align-items: center; gap: 13px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; cursor: pointer;
  transition: background .14s, border-color .14s, transform .05s;
}
.card:hover { background: var(--bg-hover); border-color: #36405a; }
.card:active { transform: scale(.99); }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; background: var(--bg-elev);
  display: grid; place-items: center; font-weight: 700; font-size: 17px; color: #fff;
}
.card-body { min-width: 0; flex: 1; }
.card-name {
  font-weight: 600; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-sub {
  color: var(--txt-dim); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badges { display: flex; gap: 6px; margin-top: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 20px;
}
.badge.wa { background: rgba(37,211,102,.14); color: var(--wa); }
.badge.tg { background: rgba(42,171,238,.14); color: var(--tg); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.sentinel { height: 1px; }
.empty { text-align: center; color: var(--txt-faint); padding: 60px 20px; }

/* list element counts (above + below) */
.list-head, .list-foot { color: var(--txt-faint); font-size: 12px; text-align: center; padding: 8px 6px; }
.list-foot { padding-bottom: 18px; }
.grid .list-head, .grid .list-foot { grid-column: 1 / -1; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; width: 100%; max-width: 420px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow);
  padding: 26px 24px; max-height: 85dvh; overflow: auto;
}
.modal-card.wide { max-width: 540px; }
.m-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.m-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; font-size: 30px; }
.m-name { font-size: 20px; font-weight: 700; }
.m-org { color: var(--txt-dim); font-size: 14px; }
.m-badges { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.m-section { margin-top: 22px; }
.m-label { color: var(--txt-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }
.m-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 7px;
}
.m-phone { font-variant-numeric: tabular-nums; font-size: 15px; }
.m-row a { color: var(--accent); text-decoration: none; font-size: 13px; }
.m-note { color: var(--txt-dim); font-size: 14px; white-space: pre-wrap; line-height: 1.5; }
.m-xref { font-size: 13px; color: var(--txt-dim); line-height: 1.6; }
.m-xref b { color: var(--txt); font-weight: 600; }
.m-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--bg-card);
  color: var(--txt-dim); cursor: pointer; font-size: 17px; z-index: 2;
}
.m-close:hover { color: var(--txt); }

/* ---------- segmented mode toggle ---------- */
.seg { display: inline-flex; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 10px; padding: 2px; flex-shrink: 0; }
.seg-btn {
  border: none; background: transparent; color: var(--txt-dim);
  font-size: 13px; font-weight: 600; padding: 7px 11px; border-radius: 8px;
  cursor: pointer; white-space: nowrap;
}
.seg-btn.active { background: var(--accent); color: #fff; }

/* ---------- message search results ---------- */
/* ---------- messenger two-pane (messages mode) ---------- */
.msgview { display: flex; height: calc(100dvh - 61px); max-width: var(--maxw); margin: 0 auto; }
.chatside { width: 360px; flex-shrink: 0; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0; }
.acct-bar { padding: 8px 8px 0; flex-shrink: 0; }
.acct-sel { width: 100%; padding: 9px 10px; border-radius: 9px; background: var(--bg-card);
  color: var(--txt); border: 1px solid var(--line); font-size: 13px; font-weight: 600; cursor: pointer; }
.acct-sel:focus { outline: none; border-color: var(--accent); }
.cl-filter { display: flex; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.flt-btn { flex: 1; padding: 7px 4px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-card); color: var(--txt-dim); font-size: 12px; font-weight: 600; cursor: pointer; }
.flt-btn:hover { color: var(--txt); }
.flt-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.chatlist { flex: 1; overflow-y: auto; padding: 8px 8px 40px; }
.chatpane { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.pane-empty { margin: auto; color: var(--txt-faint); padding: 40px; text-align: center; }
.cl-label { color: var(--txt-faint); font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; margin: 12px 8px 4px; }
.cl-item { display: flex; gap: 11px; align-items: center; padding: 9px 10px; border-radius: 11px; cursor: pointer; }
.cl-item:hover { background: var(--bg-hover); }
.cl-item.active { background: var(--bg-card); }
.cl-av { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: grid;
  place-items: center; font-weight: 700; color: #fff; font-size: 16px; position: relative; }
.cl-src { position: absolute; right: -1px; bottom: -1px; width: 15px; height: 15px;
  border-radius: 50%; border: 2px solid var(--bg); }
.cl-src.tg { background: var(--tg); } .cl-src.wa { background: var(--wa); }
.cl-body { min-width: 0; flex: 1; }
.cl-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cl-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-date { color: var(--txt-faint); font-size: 11px; flex-shrink: 0; }
.cl-prev { color: var(--txt-dim); font-size: 13px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; margin-top: 2px; }
.cl-prev mark { background: rgba(91,140,255,.28); color: var(--txt); border-radius: 3px; padding: 0 1px; }

/* ---------- conversation view ---------- */
.conv-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px;
  padding: 2px 36px 8px 0; position: sticky; top: 0; z-index: 5; background: var(--bg);
  border-bottom: 1px solid var(--line); }
.conv-titlewrap { min-width: 0; flex: 1; }
.conv-titlerow { display: flex; align-items: center; gap: 10px; }
.conv-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.meta-chip { font-size: 12px; color: var(--txt-dim); background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 7px; padding: 2px 8px; cursor: pointer; white-space: nowrap; }
.meta-chip:hover { color: var(--txt); border-color: var(--accent); }
.modal-card .conv-head { background: var(--bg-elev); }
.conv-back {
  border: 1px solid var(--line); background: var(--bg-card); color: var(--txt-dim);
  border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 16px; flex-shrink: 0;
}
.conv-back:hover { color: var(--txt); }
.conv-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-src { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; flex-shrink: 0; }
.conv-src.tg { background: rgba(42,171,238,.16); color: var(--tg); }
.conv-src.wa { background: rgba(37,211,102,.16); color: var(--wa); }
.chat-log { display: flex; flex-direction: column; gap: 3px; max-height: 64dvh; overflow-y: auto;
  padding: 2px 4px; }
.chat-more { align-self: center; background: var(--bg-card); border: 1px solid var(--line);
  color: var(--txt-dim); border-radius: 8px; padding: 6px 14px; font-size: 12px; cursor: pointer; margin: 4px 0 8px; }
.chat-more:hover { color: var(--txt); }
.chat-day { align-self: center; font-size: 11px; color: var(--txt-dim); background: rgba(255,255,255,.06);
  border-radius: 20px; padding: 3px 12px; margin: 10px 0 4px; }
.bubble { max-width: 86%; padding: 7px 10px 5px; border-radius: 14px; font-size: 14px;
  line-height: 1.38; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; position: relative; }
.bubble.in  { align-self: flex-start; background: #1a212d; border-bottom-left-radius: 5px; }
.bubble.out { align-self: flex-end; background: #2b5278; border-bottom-right-radius: 5px; }
/* tighter corners when grouped with same-direction neighbour */
.bubble.in.grp  { border-bottom-left-radius: 14px; border-top-left-radius: 5px; }
.bubble.out.grp { border-bottom-right-radius: 14px; border-top-right-radius: 5px; }
.bubble .b-media { color: var(--txt-faint); font-style: italic; }
.b-photo-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid var(--line); color: var(--txt);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.b-photo-btn:hover { border-color: var(--accent); }
.b-photo { display: block; max-width: min(340px, 72vw); max-height: 380px;
  border-radius: 10px; margin: 2px 0; cursor: zoom-in; object-fit: cover; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; cursor: zoom-out; }
.lightbox.zoomed { display: block; text-align: center; cursor: default; }
.lightbox-img { max-width: 96vw; max-height: 94vh; object-fit: contain; border-radius: 8px;
  cursor: zoom-in; box-shadow: 0 12px 48px rgba(0,0,0,.6); }
.lightbox.zoomed .lightbox-img { cursor: zoom-out; border-radius: 0; }
.lightbox-close { position: fixed; top: 14px; right: 18px; z-index: 101; width: 40px; height: 40px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.16); color: #fff;
  font-size: 26px; line-height: 38px; cursor: pointer; }
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.b-file { display: inline-flex; align-items: center; gap: 6px; color: #9ec1ff; text-decoration: none;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; font-size: 13px; }
.bubble.out .b-file { color: #cfe0ff; }
.b-file:hover { border-color: var(--accent); }
.bubble .b-link { color: #9ec1ff; text-decoration: underline; }
.bubble.out .b-link { color: #cfe0ff; }
.bubble .b-time { display: inline-block; font-size: 10px; color: rgba(255,255,255,.45);
  margin-left: 8px; float: right; position: relative; top: 5px; }
.conv-empty { text-align: center; color: var(--txt-faint); padding: 40px 10px; }

/* conversation inside the pane fills available height; only .chat-log scrolls,
   the head (with the back button) stays fixed. min-height:0 lets the flex child
   shrink so the scroll stays inside .chat-log instead of growing the whole pane. */
.chatpane .conv { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 12px 16px 0; }
.chatpane .conv-head { flex-shrink: 0; }
.chatpane .chat-log { flex: 1; min-height: 0; max-height: none; padding-bottom: 14px; }
.conv-back.pane-back { display: none; }
@media (max-width: 820px) {
  .msgview { height: calc(100dvh - 57px); }
  .chatside { width: 100%; border-right: none; }
  .chatpane { display: none; }
  .msgview.show-pane .chatside { display: none; }
  .msgview.show-pane .chatpane { display: flex; }
  .conv-back.pane-back { display: grid; place-items: center; }
}
