/* Сообщения (р0.4а): список разговоров, разговор, справа человек и действия. Только var(--…) токенов пакета, классы rd-inbox-*. Макеты Inbox, TgChat, M_Inbox, M_Chat. */

/* Рама даёт странице свой отступ; экран несёт его сам (§2 пакета) */
/* Поля страницы рама даёт сама; сверху макет ставит панели на 4 от верхней строки. */
.app .rd-shell-col > .page:has(.rd-inbox) { padding-top: 4px; }
.rd-inbox { display: grid; grid-template-columns: 380px minmax(0, 1fr) 320px; gap: 12px; align-items: stretch; height: calc(100dvh - var(--topbar-h) - 40px); min-height: 520px; min-width: 0; box-sizing: border-box; font-family: var(--font); font-size: var(--fs-body); color: var(--text-body); }
.rd-inbox *, .rd-inbox *::before, .rd-inbox *::after { box-sizing: border-box; }
.rd-inbox button, .rd-inbox select, .rd-inbox textarea, .rd-inbox input { font-family: inherit; }
.rd-inbox button:focus-visible, .rd-inbox a:focus-visible, .rd-inbox select:focus-visible, .rd-inbox textarea:focus-visible, .rd-inbox input:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.rd-inbox-note { margin: 8px 0 0; font-size: var(--fs-meta); color: var(--text-muted); }
.rd-inbox-err { margin: 8px 0; color: var(--state-late-text); font-size: var(--fs-body); }
.rd-inbox-err b { margin-right: 4px; }
.rd-inbox-meta { font-size: var(--fs-meta); color: var(--text-muted); }
.rd-inbox-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Кнопки-значки и мягкие кнопки шапки */
.rd-inbox-ic { width: 38px; height: 38px; border: 0; border-radius: var(--r-button); background: var(--bg-page); color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; text-decoration: none; }
.rd-inbox-ic:hover { background: var(--bg-hover); }
a.rd-inbox-ic, a.rd-inbox-ic:hover { color: var(--text-primary); text-decoration: none; }
.rd-inbox-soft { height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-button); background: var(--bg-page); color: var(--text-primary); font-size: var(--fs-body); font-weight: 500; white-space: nowrap; cursor: pointer; }
.rd-inbox-soft:hover { background: var(--bg-hover); }
.rd-inbox-linkbtn { padding: 0; border: 0; background: none; color: var(--brand-blue-text); font-size: inherit; cursor: pointer; }
.rd-inbox-linkbtn:hover { text-decoration: underline; }

/* Монограмма с меткой провода */
.rd-inbox-face { position: relative; display: inline-flex; flex-shrink: 0; align-self: flex-start; }
.rd-inbox-face__wire { display: none; position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-surface); color: var(--brand-blue-text); align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bg-surface); }
.rd-inbox-q { width: 34px; height: 34px; border-radius: var(--r-monogram); background: var(--bg-surface); box-shadow: inset 0 0 0 1.5px var(--text-disabled); color: var(--text-muted); font-size: var(--fs-body); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Список */
.rd-inbox-list { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 20px 10px 12px; }
.rd-inbox-list__head { display: flex; align-items: baseline; gap: 10px; padding: 0 12px; margin-bottom: 14px; }
.rd-inbox-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-primary); }
.rd-inbox-fresh { font-size: var(--fs-meta); color: var(--text-muted); }
.rd-inbox-list__head .rd-inbox-ic { margin-left: auto; align-self: center; width: 32px; height: 32px; border-radius: 16px; }
.rd-inbox-search { display: flex; gap: 8px; padding: 0 12px 10px; }
.rd-inbox-search input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-button); background: var(--bg-page); color: var(--text-primary); font-size: var(--fs-body); }
.rd-inbox-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px; }
.rd-inbox-chip { height: 30px; padding: 0 11px; border: 0; border-radius: 15px; background: var(--bg-page); color: var(--text-secondary); font-size: var(--fs-meta); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
.rd-inbox-chip b { font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.rd-inbox-chip--on { background: var(--brand-black); color: var(--bg-surface); }
.rd-inbox-chip--on b { color: var(--bg-surface); }
.rd-inbox-rows { flex: 1; min-height: 0; overflow-y: auto; }
.rd-inbox-grp { display: none; }
.rd-inbox-grpbox { display: contents; }
.rd-inbox-cv { display: flex; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: var(--text-body); cursor: pointer; font-size: var(--fs-body); height: auto; }
.rd-inbox-cv:hover { background: var(--bg-subtle); }
.rd-inbox-cv--on, .rd-inbox-cv--on:hover { background: var(--brand-blue-soft); }
.rd-inbox-cv__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rd-inbox-cv__l1 { display: flex; align-items: baseline; gap: 8px; }
.rd-inbox-cv__nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.rd-inbox-cv__tm { flex-shrink: 0; font-size: var(--fs-label); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rd-inbox-cv--unr .rd-inbox-cv__nm { font-weight: 700; }
.rd-inbox-cv--unr .rd-inbox-cv__tm { color: var(--brand-blue-text); font-weight: 600; }
.rd-inbox-cv__l2 { display: flex; align-items: center; gap: 6px; margin-top: 2px; min-width: 0; font-size: var(--fs-meta); color: var(--text-secondary); }
.rd-inbox-cv__wire { display: inline-flex; flex-shrink: 0; color: var(--text-faint); }
.rd-inbox-cv__tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-inbox-badge { display: none; margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--brand-blue); color: var(--bg-surface); font-size: var(--fs-label); font-weight: 700; align-items: center; justify-content: center; }
.rd-inbox-cv__l3 { display: flex; align-items: center; gap: 8px; margin-top: 4px; min-width: 0; }
.rd-inbox-cv__l3 .rd-state { font-size: var(--fs-label); white-space: nowrap; }
.rd-inbox-lk { margin-left: auto; min-width: 0; max-width: 60%; height: 22px; padding: 0 8px; border-radius: var(--r-chip); background: var(--bg-page); color: var(--text-secondary); font-size: var(--fs-label); line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-inbox-cv--on .rd-inbox-lk { background: var(--bg-surface); }
.rd-inbox-ud { margin-left: auto; width: 8px; height: 8px; border-radius: 4px; background: var(--brand-blue); flex-shrink: 0; }
.rd-inbox-lk + .rd-inbox-ud { margin-left: 0; }
.rd-inbox-more { display: block; margin: 8px auto 0; height: 36px; padding: 0 16px; border: 0; border-radius: var(--r-button); background: var(--bg-page); color: var(--text-primary); font-size: var(--fs-body); cursor: pointer; }

/* Разговор */
.rd-inbox-conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; padding: 0; }
.rd-inbox-empty { display: flex; align-items: center; justify-content: center; grid-column: 2 / span 2; }
.rd-inbox-ch { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.rd-inbox-ch .rd-mono { width: 40px; height: 40px; }
.rd-inbox-ch__id { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.rd-inbox-ch__who { flex: 1; min-width: 0; }
.rd-inbox-ch .rd-inbox-face__wire { display: inline-flex; width: 16px; height: 16px; right: -3px; bottom: -3px; }
.rd-inbox-ch__nm { margin: 0; font-size: var(--fs-card-title); font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-inbox-ch__sub { margin: 0; font-size: var(--fs-meta); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-inbox-back { display: none; padding: 0; border: 0; background: none; color: var(--brand-blue-text); font-size: 16px; align-items: center; gap: 2px; cursor: pointer; }
.rd-inbox-back svg { transform: scaleX(-1); }
.rd-inbox-anchor { display: none; }
.rd-inbox-flow { flex: 1; min-height: 0; overflow-y: auto; }
.rd-inbox-subj { display: flex; align-items: baseline; gap: 10px; padding: 16px 22px 4px; }
.rd-inbox-subj h3 { flex: 1; min-width: 0; margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-primary); overflow-wrap: anywhere; }
.rd-inbox-subj .rd-inbox-meta { flex-shrink: 0; }
.rd-inbox-old { display: flex; align-items: center; gap: 12px; width: calc(100% - 44px); margin: 10px 22px 0; padding: 10px 14px; border: 0; border-radius: 10px; background: var(--bg-page); color: var(--text-secondary); font-size: var(--fs-meta); text-align: left; cursor: pointer; }
.rd-inbox-old__faces { display: inline-flex; }
.rd-inbox-old__faces .rd-mono { border-radius: 50%; background: var(--brand-black); color: var(--bg-surface); box-shadow: 0 0 0 2px var(--bg-page); }
.rd-inbox-old__faces .rd-mono + .rd-mono { margin-left: -6px; }
.rd-inbox-old__t { font-weight: 600; color: var(--text-primary); }
.rd-inbox-old__r { margin-left: auto; color: var(--text-muted); }
.rd-inbox-mail { padding: 16px 22px 18px; }
.rd-inbox-mail + .rd-inbox-mail { border-top: 1px solid var(--line); }
.rd-inbox-mail__h { display: flex; align-items: flex-start; gap: 12px; }
.rd-inbox-mail__who { flex: 1; min-width: 0; font-size: var(--fs-body); color: var(--text-primary); overflow-wrap: anywhere; }
.rd-inbox-mail__who b { font-weight: 600; font-size: 15px; }
.rd-inbox-mail__addr, .rd-inbox-mail__to { font-size: var(--fs-meta); color: var(--text-muted); }
.rd-inbox-mail__at { flex-shrink: 0; font-size: var(--fs-meta); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rd-inbox-mail__b { margin: 14px 0 0 46px; font-size: 15px; line-height: 1.55; color: var(--text-primary); white-space: pre-wrap; overflow-wrap: anywhere; }
.rd-inbox-file { display: inline-flex; align-items: center; gap: 10px; margin: 12px 0 0 46px; padding: 8px 12px 8px 10px; border-radius: 10px; background: var(--bg-page); font-size: var(--fs-meta); color: var(--text-primary); max-width: calc(100% - 46px); }
.rd-inbox-file__ext { min-width: 34px; height: 34px; padding: 0 4px; border-radius: var(--r-chip); background: var(--bg-surface); display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-label); font-weight: 700; color: var(--text-secondary); flex-shrink: 0; }
.rd-inbox-file__nm { overflow-wrap: anywhere; }
p.rd-inbox-file { margin-top: 12px; }

/* Пузыри Telegram */
.rd-inbox-conv:has(.rd-inbox-chat) .rd-inbox-flow { background: var(--bg-subtle); }
.rd-inbox-chat { display: flex; flex-direction: column; gap: 8px; padding: 16px 22px; }
.rd-inbox-day { display: flex; justify-content: center; margin: 4px 0; }
.rd-inbox-day span { display: inline-block; padding: 3px 12px; border-radius: 12px; background: var(--bg-surface); color: var(--text-muted); font-size: var(--fs-label); }
.rd-inbox-day span::first-letter { text-transform: uppercase; }
.rd-inbox-bub { align-self: flex-start; max-width: min(78%, 520px); padding: 10px 14px 6px; border-radius: var(--r-card); background: var(--bg-surface); color: var(--text-primary); }
.rd-inbox-bub--out { align-self: flex-end; background: var(--brand-blue-soft); }
.rd-inbox-bub__who { font-size: var(--fs-meta); font-weight: 600; color: var(--text-secondary); margin-bottom: 2px; }
.rd-inbox-bub__t { font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.rd-inbox-edited { font-style: italic; color: var(--text-muted); }

/* Выбор сообщений (р0.4а″): отметка при наведении, в режиме выбора и у отмеченного */
.rd-inbox-msg { display: flex; position: relative; padding-left: 28px; border-radius: var(--r-card); }
.rd-inbox-msg--sel, .rd-inbox-mail--sel { background: var(--brand-blue-soft); }
.rd-inbox-msg--sel .rd-inbox-bub { background: var(--bg-surface); box-shadow: inset 0 0 0 1.5px var(--brand-blue); }
.rd-inbox-bub--out { margin-left: auto; }
.rd-inbox-mail { position: relative; }
.rd-inbox-sel { position: absolute; left: 3px; top: 12px; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; opacity: 0; cursor: pointer; }
.rd-inbox-mail .rd-inbox-sel { top: 24px; }
.rd-inbox-sel input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-blue); cursor: pointer; }
.rd-inbox-msg:hover .rd-inbox-sel, .rd-inbox-mail:hover .rd-inbox-sel, .rd-inbox-sel:focus-within, .rd-inbox-sel:has(input:checked), .rd-inbox-flow--sel .rd-inbox-sel { opacity: 1; }
.rd-inbox-selbar, .rd-inbox-made { display: flex; align-items: center; gap: 8px; padding: 8px 22px; border-bottom: 1px solid var(--line); background: var(--bg-surface); font-size: var(--fs-body); color: var(--text-primary); }
.rd-inbox-selbar b { margin-right: auto; font-weight: 600; }
.rd-inbox-made { justify-content: space-between; background: var(--bg-page); }
.rd-inbox-selbar .rd-inbox-qb { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border: 0; border-radius: 16px; background: var(--bg-page); color: var(--brand-blue-text); font-size: var(--fs-body); font-weight: 600; cursor: pointer; }
.rd-inbox-selbar .rd-inbox-qb--pri { background: var(--brand-blue); color: var(--bg-surface); }
.rd-inbox-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rd-inbox-mail .rd-inbox-tags { margin-left: 46px; }
.rd-inbox-tag { height: 22px; padding: 0 8px; border: 0; border-radius: var(--r-chip); background: var(--bg-page); color: var(--brand-blue-text); font-size: var(--fs-label); font-weight: 600; cursor: pointer; }
.rd-inbox-tag:hover { text-decoration: underline; }
.rd-inbox-ch__org { margin: 0; font-size: var(--fs-meta); color: var(--text-secondary); }
.rd-inbox-open__b span.rd-inbox-open__org { color: var(--text-secondary); }

/* Панель обращения: цитата выбранных и компания */
.rd-inbox-cites { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.rd-inbox-cite { margin: 0; padding: 8px 12px; border-left: 3px solid var(--brand-blue); border-radius: 0 var(--r-chip) var(--r-chip) 0; background: var(--bg-page); display: flex; flex-direction: column; gap: 2px; }
.rd-inbox-cite__h { font-size: var(--fs-label); color: var(--text-muted); }
.rd-inbox-cite__t { font-size: var(--fs-body); color: var(--text-primary); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 7.5em; overflow: hidden; }
.rd-inbox-org { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 40px; }
.rd-inbox-org b { font-weight: 600; color: var(--text-primary); }
.rd-inbox-bub__at { display: block; margin-top: 2px; text-align: right; font-size: var(--fs-label); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rd-inbox-bub .rd-inbox-file { margin: 8px 0 0; background: var(--bg-page); max-width: 100%; }
.rd-inbox-bub--out .rd-inbox-file { background: var(--bg-surface); }
.rd-inbox-voice { margin: 0 0 4px; font-size: var(--fs-body); font-weight: 600; color: var(--text-secondary); }

/* Быстрые действия: только на телефоне, на десктопе они в правой колонке */
.rd-inbox-quick { display: none; }

/* Ответ */
.rd-inbox-cmp { padding: 10px 22px 16px; border-top: 1px solid var(--line); }
.rd-inbox-from { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; font-size: var(--fs-meta); color: var(--text-muted); }
.rd-inbox-from__l, .rd-inbox-from__to { display: inline-flex; align-items: center; gap: 8px; }
.rd-inbox-from__to { color: var(--text-primary); }
.rd-inbox-from select { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--bg-page); color: var(--text-primary); font-size: var(--fs-meta); max-width: 300px; }
.rd-inbox-cmp__row { display: flex; align-items: flex-end; gap: 10px; }
.rd-inbox-cmp--mail .rd-inbox-cmp__row { flex-wrap: wrap; justify-content: flex-end; }
.rd-inbox-ta { flex: 1 1 100%; min-width: 0; resize: none; border: 0; border-radius: 10px; background: var(--bg-page); padding: 11px 14px; font-size: var(--fs-body); line-height: 1.45; color: var(--text-primary); }
.rd-inbox-cmp--mail .rd-inbox-ta { height: 72px; }
.rd-inbox-cmp:not(.rd-inbox-cmp--mail) .rd-inbox-ta { flex: 1; height: 40px; min-height: 40px; border-radius: 20px; padding: 10px 16px; }
.rd-inbox-cmp__row .rd-btn-wrap { display: inline-flex; align-items: center; gap: 10px; }
.rd-inbox-cmp__note { margin: 8px 0 0; font-size: var(--fs-label); color: var(--text-muted); }

/* Правая колонка */
.rd-inbox-ctx { display: flex; flex-direction: column; gap: 16px; min-width: 0; min-height: 0; overflow-y: auto; }
.rd-inbox-ctx .rd-card { padding: 18px 20px; }
.rd-inbox-ctx .rd-dl__row { grid-template-columns: 70px minmax(0, 1fr); }
.rd-inbox-person { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.rd-inbox-person b { display: block; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.rd-inbox-open { display: flex; align-items: flex-start; gap: 12px; width: 100%; height: auto; padding: 11px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: var(--text-primary); font-size: var(--fs-body); }
.rd-inbox-open:first-of-type { border-top: 0; }
button.rd-inbox-open { cursor: pointer; }
button.rd-inbox-open:hover b { color: var(--brand-blue-text); }
.rd-inbox-open__ic { width: 28px; height: 28px; border-radius: 8px; background: var(--bg-page); color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rd-inbox-open__b { display: flex; flex-direction: column; min-width: 0; }
.rd-inbox-open__b b { font-weight: 600; overflow-wrap: anywhere; }
.rd-inbox-open__b span { font-size: var(--fs-meta); color: var(--text-muted); overflow-wrap: anywhere; }
.rd-inbox-acts { display: flex; flex-direction: column; gap: 8px; }
.rd-inbox-acts .rd-btn-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.rd-inbox-acts .rd-btn { width: 100%; justify-content: flex-start; }
.rd-inbox-acts .rd-btn__why { font-size: var(--fs-meta); color: var(--text-muted); }

/* Окна выбора */
.rd-inbox-pick { display: flex; flex-direction: column; min-width: 260px; }
.rd-inbox-pick__row { display: flex; align-items: center; gap: 10px; width: 100%; height: auto; min-height: var(--row-min-h); padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: var(--text-primary); font-size: var(--fs-body); cursor: pointer; }
.rd-inbox-pick__row:first-of-type { border-top: 0; }
.rd-inbox-pick__row:hover { color: var(--brand-blue-text); }
.rd-inbox-pick__row small { display: block; font-size: var(--fs-meta); color: var(--text-muted); }

@media (max-width: 1279px) {
  .rd-inbox { grid-template-columns: 320px minmax(0, 1fr); }
  .rd-inbox-ctx { display: none; }
  .rd-inbox-empty { grid-column: 2; }
}

/* Телефон, §4 пакета (M_Inbox, M_Chat): по одной панели, строки не ниже 48 */
@media (max-width: 767px) {
  .rd-inbox { display: block; height: auto; min-height: 0; }
  .rd-inbox-conv, .rd-inbox-ctx, .rd-inbox-empty { display: none; }
  .rd-inbox--chat .rd-inbox-list { display: none; }
  .rd-inbox--chat .rd-inbox-conv { display: flex; }

  /* Список: без карточки, группы белыми плитками */
  .rd-inbox-list { display: block; padding: 0; background: none; border-radius: 0; overflow: visible; }
  .rd-inbox-list__head { padding: 0; margin: 4px 0 12px; align-items: center; }
  .rd-inbox-title { font-size: 26px; letter-spacing: -0.02em; }
  .rd-inbox-fresh { display: none; }
  .rd-inbox-list__head .rd-inbox-ic { width: 44px; height: 44px; border-radius: 22px; background: var(--bg-surface); }
  .rd-inbox-search { padding: 0 0 12px; }
  .rd-inbox-search input { height: 44px; font-size: 16px; }
  .rd-inbox-chips { flex-wrap: nowrap; overflow-x: auto; padding: 0 16px 16px; margin: 0 -16px; scrollbar-width: none; }
  .rd-inbox-chips::-webkit-scrollbar { display: none; }
  .rd-inbox-chip { height: 36px; background: var(--bg-surface); font-size: var(--fs-body); flex-shrink: 0; }
  .rd-inbox-chip b { font-weight: 400; color: var(--text-muted); }
  .rd-inbox-chip--on { background: var(--brand-black); color: var(--bg-surface); }
  .rd-inbox-chip--on b { color: var(--text-disabled); }
  .rd-inbox-rows { overflow: visible; }
  .rd-inbox-grp { display: block; margin: 4px 0 8px 4px; font-size: var(--fs-group); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-faint); }
  .rd-inbox-grpbox { display: block; margin-bottom: 20px; padding: 0 16px; border-radius: 14px; background: var(--bg-surface); }
  .rd-inbox-cv { padding: 14px 0; border-radius: 0; border-top: 1px solid var(--line); gap: 12px; min-height: 48px; }
  .rd-inbox-cv:first-child { border-top: 0; }
  .rd-inbox-cv:hover, .rd-inbox-cv--on, .rd-inbox-cv--on:hover { background: none; }
  .rd-inbox-cv .rd-mono { width: 44px; height: 44px; font-size: var(--fs-card-title); border-radius: 12px; }
  .rd-inbox-cv .rd-inbox-q { width: 44px; height: 44px; border-radius: 12px; }
  .rd-inbox-face__wire { display: inline-flex; }
  .rd-inbox-cv__wire, .rd-inbox-ud { display: none; }
  .rd-inbox-cv__nm { font-size: 16px; font-weight: 600; }
  .rd-inbox-cv--unr .rd-inbox-cv__tm { color: var(--brand-blue-text); }
  .rd-inbox-cv__l2 { font-size: var(--fs-body); }
  .rd-inbox-cv__l3 { flex-wrap: wrap; }
  .rd-inbox-lk { margin-left: 0; height: 26px; line-height: 26px; max-width: 100%; }
  .rd-inbox-badge { display: inline-flex; }

  /* Чат: шапки оболочки и нижней панели нет, ввод закреплён снизу */
  .app .rd-shell:has(.rd-inbox--chat) .rd-shell-top, .app .rd-shell:has(.rd-inbox--chat) .rd-shell-tab { display: none; }
  .app .rd-shell:has(.rd-inbox--chat) .rd-shell-col { padding-bottom: 0; }
  .page:has(.rd-inbox--chat) { padding-top: 0; }
  .rd-inbox-conv { background: none; border-radius: 0; overflow: visible; padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .rd-inbox-ch { flex-wrap: wrap; gap: 0 8px; padding: 0 0 12px; border: 0; }
  .rd-inbox-back { display: inline-flex; flex: 1; height: 56px; order: 1; }
  .rd-inbox-ch > a.rd-inbox-ic { order: 2; background: var(--bg-surface); width: 44px; height: 44px; border-radius: 22px; }
  .rd-inbox-soft { display: none; }
  .rd-inbox-ch__id { order: 3; flex: 1 1 100%; gap: 12px; }
  .rd-inbox-ch .rd-mono, .rd-inbox-ch .rd-inbox-q { width: 52px; height: 52px; font-size: var(--fs-card-title); border-radius: 14px; }
  .rd-inbox-ch__nm { font-size: 20px; font-weight: 700; white-space: normal; }
  .rd-inbox-ch__sub { white-space: normal; }
  .rd-inbox-anchor { display: flex; align-items: center; gap: 8px; width: 100%; height: 56px; margin-bottom: 12px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--bg-surface); color: var(--text-primary); font-size: var(--fs-body); font-weight: 600; text-align: left; cursor: pointer; }
  .rd-inbox-anchor__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rd-inbox-flow { overflow: visible; }
  .rd-inbox-subj { padding: 4px 0; }
  .rd-inbox-old { width: 100%; margin: 8px 0 0; }
  .rd-inbox-mail { margin-top: 8px; padding: 14px 16px; border-radius: 14px; background: var(--bg-surface); border-top: 0; }
  .rd-inbox-mail__b, .rd-inbox-file { margin-left: 0; }
  .rd-inbox-mail__b { margin-top: 12px; }
  .rd-inbox-conv:has(.rd-inbox-chat) .rd-inbox-flow { background: none; }
  .rd-inbox-chat { padding: 0; }
  .rd-inbox-bub { max-width: 86%; }
  .rd-inbox-bub__t { font-size: var(--fs-card-title); }
  .rd-inbox-msg { padding-left: 30px; }
  .rd-inbox-mail { padding-left: 34px; }
  .rd-inbox-sel { left: 4px; width: 24px; height: 24px; }
  .rd-inbox-sel input { width: 20px; height: 20px; }
  .rd-inbox-selbar, .rd-inbox-made { padding: 8px 12px; margin-top: 8px; border-radius: 14px; flex-wrap: wrap; }
  .rd-inbox-selbar .rd-inbox-qb { min-height: 44px; }
  .rd-inbox-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .rd-inbox-qb { min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--bg-surface); color: var(--brand-blue-text); font-size: var(--fs-body); font-weight: 600; cursor: pointer; }
  .rd-inbox-cmp { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); background: var(--bg-surface); border-top: 0; box-shadow: 0 -1px 0 var(--line); }
  .rd-inbox-cmp:not(.rd-inbox-cmp--mail) .rd-inbox-ta { height: 48px; min-height: 48px; border-radius: 22px; font-size: 16px; }
  .rd-inbox-cmp--mail .rd-inbox-ta { height: 96px; font-size: 16px; }
  .rd-inbox-cmp__row .rd-btn { min-height: 48px; }
  .rd-inbox-cmp__row .rd-btn__why { display: none; }
  .rd-inbox-cmp__row { flex-wrap: nowrap; }
  .rd-inbox-cmp--mail .rd-inbox-cmp__row { flex-wrap: wrap; }
  .rd-inbox-from select { height: 36px; font-size: 16px; }
}
