/* МОСТ: полоса сетей, список чатов и переписка на компьютере; один экран и нижняя панель сетей на телефоне. */
:root {
  --rail: #f6f0e6; --bg: #f6f0e6; --panel: #fbf8f3; --hover: #f0e8db; --active: #efe2d4; --chat: #fbf8f3;
  --in: #f8f3ea; --out: #f0e6d6; --bubble-line: #e6dccc; --out-ink: #3f3a33; --out-soft: rgba(63, 58, 51, .09); --out-ink2: #6b6155; --out-strong: #7d5a2a; --out-read: #0b6fb8; --out-seen: #0b7a2f; --out-err: #b3261e; --in-ink2: #6b6155;
  --ink: #3f3a33; --ink2: #6b6155; --line: #e6dccc;
  --accent: #986e35; --accent-ink: #ffffff; --accent-text: #7d5a2a; --unread: #986e35; --read: #986e35; --danger: #b3261e; --hl: #f6e0d6; --hl-ink: #3f3a33;
  --wa: #1fa855; --tg: #229ed9; --ig: #d62976; --li: #0a66c2; --mail: #a9834a; --fb: #1877f2; --shadow: rgba(63, 58, 51, .16); --wordmark: url(/logo-wide.png);
  --login-logo: url(/logo-login.png); --login-top: #fbf7ee; --login-mid: #f6e3d5; --login-bot: #f1d0bc; --login-sky: #dfc4b1; --login-ink: #3f3a33; --login-ink2: #665c50; --login-gold: #c8a878; --login-tag: #8f6a30; --login-place: #76695c;
  --login-field: rgba(255, 252, 247, .6); --login-fill: #fbf0e6; --login-line: rgba(143, 106, 48, .36); --login-focus: #8f6a30; --login-ring: rgba(143, 106, 48, .2); --login-btn: #3f3a33; --login-btn-ink: #fbf8f3; --login-err: #a32a1c;
  --font: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji";
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --rail: #1c1916; --bg: #1c1916; --panel: #25211c; --hover: #322c25; --active: #453726; --chat: #25211c;
  --in: #75695a; --out: #986e35; --bubble-line: transparent; --out-ink: #ffffff; --out-soft: rgba(255, 255, 255, .18); --out-ink2: rgba(255, 255, 255, .82); --out-strong: #ffffff; --out-read: #a8e0ff; --out-seen: #c6ff9e; --out-err: #ffd2cc; --in-ink2: #ece4d8; --ink: #f5efe6; --ink2: #b5aa9a; --line: #38322a;
  --accent: #986e35; --accent-ink: #ffffff; --accent-text: #cbb89a; --unread: #986e35; --read: #cbb89a; --danger: #f28b82; --hl: #6b5d4a; --hl-ink: #fff4d0;
  --wa: #25c265; --tg: #2aabee; --ig: #e4407f; --li: #2f86dc; --mail: #cfa868; --fb: #4a93f5; --shadow: rgba(0, 0, 0, .5); --wordmark: url(/logo-wide-dark.png); color-scheme: dark;
  --login-logo: url(/logo-login-dark.png); --login-top: #1c1916; --login-mid: #271f19; --login-bot: #3a2b20; --login-sky: #241b15; --login-ink: #f5efe6; --login-ink2: #b9ad9d; --login-gold: #c8a878; --login-tag: #d0b184; --login-place: #a1968a;
  --login-field: rgba(255, 244, 230, .06); --login-fill: #2c241d; --login-line: rgba(200, 168, 120, .34); --login-focus: #c8a878; --login-ring: rgba(200, 168, 120, .22); --login-btn: #c8a878; --login-btn-ink: #241c14; --login-err: #f19a86;
} }
:root[data-theme="dark"] {
  --rail: #1c1916; --bg: #1c1916; --panel: #25211c; --hover: #322c25; --active: #453726; --chat: #25211c;
  --in: #75695a; --out: #986e35; --bubble-line: transparent; --out-ink: #ffffff; --out-soft: rgba(255, 255, 255, .18); --out-ink2: rgba(255, 255, 255, .82); --out-strong: #ffffff; --out-read: #a8e0ff; --out-seen: #c6ff9e; --out-err: #ffd2cc; --in-ink2: #ece4d8; --ink: #f5efe6; --ink2: #b5aa9a; --line: #38322a;
  --accent: #986e35; --accent-ink: #ffffff; --accent-text: #cbb89a; --unread: #986e35; --read: #cbb89a; --danger: #f28b82; --hl: #6b5d4a; --hl-ink: #fff4d0;
  --wa: #25c265; --tg: #2aabee; --ig: #e4407f; --li: #2f86dc; --mail: #cfa868; --fb: #4a93f5; --shadow: rgba(0, 0, 0, .5); --wordmark: url(/logo-wide-dark.png); color-scheme: dark;
  --login-logo: url(/logo-login-dark.png); --login-top: #1c1916; --login-mid: #271f19; --login-bot: #3a2b20; --login-sky: #241b15; --login-ink: #f5efe6; --login-ink2: #b9ad9d; --login-gold: #c8a878; --login-tag: #d0b184; --login-place: #a1968a;
  --login-field: rgba(255, 244, 230, .06); --login-fill: #2c241d; --login-line: rgba(200, 168, 120, .34); --login-focus: #c8a878; --login-ring: rgba(200, 168, 120, .22); --login-btn: #c8a878; --login-btn-ink: #241c14; --login-err: #f19a86;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14.5px/1.4 var(--font); overflow: hidden; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#root { height: 100%; }
.app { height: 100%; display: grid; grid-template-columns: 68px var(--side-w, minmax(300px, 380px)) minmax(0, 1fr); }

/* полоса сетей */
.rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; padding-top: max(12px, env(safe-area-inset-top, 0px)); background: var(--rail); min-height: 0; }
.logo { width: 40px; height: 40px; border-radius: 12px; display: block; flex: none; }
.side-logo { display: none; }
.tabs { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 4px 4px 2px; margin: -4px -4px 0; }   /* Стас 11.11: счётчик не обрезается верхним краем */
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--ink2); flex: none; }
.tab:hover { background: var(--hover); }
.tab-ico svg { display: block; width: 23px; height: 23px; fill: currentColor; fill-rule: evenodd; }
.tab-label { display: none; }
.tab.whatsapp { color: var(--wa); } .tab.telegram { color: var(--tg); } .tab.instagram { color: var(--ig); } .tab.linkedin { color: var(--li); } .tab.mail { color: var(--mail); } .tab.facebook { color: var(--fb); }
.tab.on { background: var(--active); }
.tab.all.on { color: var(--accent-text); }
.tab b { position: absolute; top: -2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--unread); color: #fff; font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--rail); }

/* список чатов */
.side { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.side-top { display: flex; align-items: center; gap: 4px; padding: 12px 10px 6px 18px; padding-top: max(12px, env(safe-area-inset-top, 0px)); }
.brand { font-size: 21px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink2); flex: none; }
.icon-btn:hover { background: var(--hover); }
.icon-btn svg { width: 21px; height: 21px; fill: currentColor; fill-rule: evenodd; }
.search { padding: 4px 14px 8px; }
.search input { width: 100%; height: 38px; border: 0; border-radius: 12px; background: var(--hover); padding: 0 14px; }
.search input::placeholder { color: var(--ink2); }
.chips { display: flex; gap: 6px; padding: 0 14px 8px; }
.chip-btn { height: 28px; padding: 0 12px; border-radius: 14px; background: var(--hover); color: var(--ink2); font-size: 13px; font-weight: 500; }
.chip-btn.on { background: var(--active); color: var(--accent-text); }
.banner { margin: 0 14px 8px; padding: 8px 12px; border-radius: 10px; background: var(--hover); color: var(--danger); font-size: 12.5px; }
.banner.info { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.banner.info span { flex: 1; min-width: 0; }
.banner.info .link { color: var(--accent-text); font-weight: 600; flex: none; }
.banner.info .icon-btn { width: 24px; height: 24px; }
.banner.info .icon-btn svg { width: 15px; height: 15px; }
.list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 8px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.modal .list, .finder .list { padding: 0; }
.section { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; color: var(--ink2); }
.empty { padding: 28px 24px; text-align: center; color: var(--ink2); }
.row { display: flex; gap: 12px; padding: 9px 10px; width: 100%; text-align: left; align-items: center; border-radius: 12px; }
.row:hover { background: var(--hover); }
.row.on { background: var(--active); }
.ava { position: relative; width: 48px; height: 48px; flex: none; }
.ava-in { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--ink2); font-weight: 600; font-size: 16px; overflow: hidden; }
.row:hover .ava-in { background: var(--line); }
.ava-in img { width: 100%; height: 100%; object-fit: cover; display: block; }
.net { position: absolute; right: -3px; bottom: -3px; width: 19px; height: 19px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel); color: #fff; display: grid; place-items: center; }
.net svg { width: 12px; height: 12px; fill: currentColor; fill-rule: evenodd; }
.net.whatsapp { background: var(--wa); } .net.telegram { background: var(--tg); }
.net.instagram { background: var(--ig); } .net.linkedin { background: var(--li); } .net.mail { background: var(--mail); } .net.facebook { background: var(--fb); } .net.salesnav { background: var(--li); }
.row-mid { flex: 1; min-width: 0; }
.row-1, .row-2 { display: flex; gap: 8px; align-items: baseline; }
.row-title { flex: 1; min-width: 0; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.unread .row-title { font-weight: 700; }
.row-time { flex: none; font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.row-time.new { color: var(--accent-text); font-weight: 600; }
.row-text { flex: 1; min-width: 0; color: var(--ink2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.unread .row-text { color: var(--ink); }
.badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--unread); color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
mark { background: var(--hl); color: var(--hl-ink); border-radius: 2px; }

/* переписка */
.main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--chat); position: relative; }
.none { flex: 1; display: grid; place-items: center; color: var(--ink2); text-align: center; padding: 24px; }
.none .logo { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; }
.none strong { display: block; font-size: 20px; color: var(--ink); margin-bottom: 6px; font-weight: 600; }
.head { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 10px 8px 18px; padding-top: max(8px, env(safe-area-inset-top, 0px)); background: var(--panel); border-bottom: 1px solid var(--line); }
.head .ava { width: 40px; height: 40px; }
.head .ava-in { font-size: 14px; }
.head-mid { flex: 1; min-width: 0; }
.head-title { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-sub { font-size: 12.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: text; }
.back { display: none; }
.finder { display: flex; flex-direction: column; background: var(--panel); border-bottom: 1px solid var(--line); max-height: 45%; min-height: 0; }
.finder input { margin: 8px 16px; height: 34px; border: 0; border-radius: 10px; background: var(--hover); padding: 0 14px; flex: none; }
.finder .list { max-height: 260px; }
.hit { display: block; width: 100%; text-align: left; padding: 7px 16px; border-radius: 10px; }
.hit:hover { background: var(--hover); }
.hit small { display: block; color: var(--ink2); font-size: 11.5px; }
.hit span { display: block; font-size: 13.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px max(18px, 5%) 8px; display: flex; flex-direction: column; gap: 2px; background: var(--chat); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.day { align-self: center; margin: 12px 0 8px; color: var(--ink2); font-size: 12px; font-weight: 500; }
.notice { align-self: center; max-width: 90%; margin: 4px 0; color: var(--ink2); font-size: 12.5px; text-align: center; overflow-wrap: anywhere; }
.msg { display: flex; flex-direction: column; max-width: min(72%, 620px); position: relative; }
.msg.in { align-self: flex-start; } .msg.out { align-self: flex-end; }
.msg.first { margin-top: 8px; }
.bubble { box-shadow: 0 0 0 1px var(--bubble-line); position: relative; padding: 7px 12px 6px; border-radius: 18px; background: var(--in); min-width: 74px; overflow-wrap: anywhere; }
.msg.in .bubble { border-bottom-left-radius: 6px; --ink2: var(--in-ink2); }
.msg.out .bubble { background: var(--out); color: var(--out-ink); border-bottom-right-radius: 6px; }
.msg.flash .bubble { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.who { font-size: 12.5px; font-weight: 600; color: var(--accent-text); margin-bottom: 1px; }
.text { white-space: pre-wrap; }
.text a { color: var(--accent-text); }
.msg.out .text a { color: inherit; text-decoration: underline; }
.text.deleted { color: var(--ink2); font-style: italic; }
.msg.out .text.deleted { color: var(--out-ink2); }
.foot { float: right; display: flex; gap: 3px; align-items: center; margin: 6px 0 -1px 10px; font-size: 11px; color: var(--ink2); font-variant-numeric: tabular-nums; line-height: 1; }
.msg.out .foot { color: var(--out-ink2); }
.foot svg { width: 15px; height: 11px; fill: currentColor; }
.msg.out .foot.read svg { color: var(--out-read); }
.foot.err, .msg.out .foot.err { color: var(--out-err); }
.msg.in .foot.err { color: var(--danger); }
.foot.err { cursor: pointer; }
.quote { display: block; width: 100%; text-align: left; border-left: 3px solid var(--accent-text); background: var(--hover); border-radius: 8px; padding: 3px 8px; margin-bottom: 4px; font-size: 13px; }
.quote b { display: block; font-weight: 600; color: var(--accent-text); font-size: 12px; }
.quote span { display: block; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg.in .quote { background: var(--panel); }
.msg.out .quote { background: var(--out-soft); border-left-color: var(--out-strong); }
.msg.out .quote b { color: var(--out-strong); } .msg.out .quote span { color: var(--out-ink2); }
/* 12.11: у фото и видео постоянная высота с первой отрисовки: догрузка картинки не сдвигает переписку (сообщения "скакали") */
.pic { display: block; width: 100%; max-width: 320px; height: 260px; object-fit: cover; border-radius: 12px; cursor: zoom-in; background: var(--hover); }
video.pic { cursor: default; object-fit: contain; background: #000; }
audio { width: 260px; max-width: 100%; height: 38px; display: block; }
.file { display: flex; gap: 10px; align-items: center; padding: 7px 9px; border-radius: 12px; background: var(--panel); color: inherit; text-decoration: none; min-width: 190px; }
.msg.out .file { background: var(--out-soft); }
.file-ext { width: 34px; height: 40px; flex: none; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; display: grid; place-items: center; text-transform: uppercase; overflow: hidden; }
.msg.out .file-ext { background: #fff; color: var(--accent); }
.file-mid { min-width: 0; flex: 1; }
.file-name { font-weight: 500; font-size: 13.5px; overflow-wrap: anywhere; }
.file-size { font-size: 12px; color: var(--ink2); }
.msg.out .file-size { color: var(--out-ink2); }
.has-media .text { margin-top: 5px; }
.reacts { display: flex; gap: 3px; flex-wrap: wrap; margin: -3px 6px 2px; position: relative; }
.react { padding: 1px 6px; border-radius: 10px; background: var(--panel); box-shadow: 0 1px 2px var(--shadow); font-size: 12px; color: var(--ink); }
.more { position: absolute; top: 3px; right: 3px; width: 24px; height: 22px; border-radius: 8px; background: inherit; color: inherit; display: none; place-items: center; }
.more svg { width: 16px; height: 16px; fill: currentColor; }
.bubble:hover .more { display: grid; }
.loading { align-self: center; color: var(--ink2); font-size: 12.5px; padding: 6px; }
.down { position: absolute; right: 18px; bottom: 76px; width: 40px; height: 40px; border-radius: 50%; background: var(--panel); box-shadow: 0 2px 8px var(--shadow); display: grid; place-items: center; color: var(--ink2); }
.down svg { width: 20px; height: 20px; fill: currentColor; }

/* поле ввода */
.composer { background: var(--panel); padding: 8px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)); }
.reply-bar, .file-bar { display: flex; gap: 8px; align-items: center; padding: 2px 4px 7px; }
.reply-bar .quote { flex: 1; min-width: 0; margin: 0; }
.chip { display: flex; align-items: center; gap: 6px; background: var(--hover); border-radius: 10px; padding: 5px 8px; font-size: 12.5px; flex: 1; min-width: 0; }
.chip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip em { font-style: normal; color: var(--ink2); font-variant-numeric: tabular-nums; flex: none; }
.input-row { display: flex; align-items: flex-end; gap: 4px; }
.input-row textarea { flex: 1; min-width: 0; resize: none; border: 0; border-radius: 19px; background: var(--hover); padding: 9px 14px; max-height: 140px; line-height: 1.35; height: 38px; }
.input-row textarea::placeholder { color: var(--ink2); }
.send { background: var(--accent); color: var(--accent-ink); margin-left: 4px; }
.send:hover { background: var(--accent); }
.drop { position: absolute; inset: 0; background: var(--active); opacity: .95; display: grid; place-items: center; font-size: 18px; color: var(--accent-text); z-index: 5; pointer-events: none; }

/* меню, окна */
.menu { position: fixed; z-index: 30; min-width: 170px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px var(--shadow); padding: 5px; }
.menu button, .menu a { display: block; width: 100%; padding: 8px 12px; text-align: left; color: inherit; text-decoration: none; border-radius: 8px; }
.menu button:hover, .menu a:hover { background: var(--hover); }
.modal-bg { position: fixed; inset: 0; z-index: 20; background: rgba(30, 25, 18, .5); display: grid; place-items: center; padding: 16px; }
.modal { width: min(440px, 100%); max-height: min(620px, 100%); display: flex; flex-direction: column; background: var(--panel); border-radius: 16px; overflow: hidden; }
.modal h2 { margin: 0; padding: 16px 16px 8px; font-size: 17px; font-weight: 600; }
.modal .search { padding-top: 0; }
.modal .list { min-height: 180px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.modal-foot span { flex: 1; color: var(--ink2); font-size: 13px; }
.btn { height: 36px; padding: 0 16px; border-radius: 12px; background: var(--hover); flex: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: flex; flex-direction: column; gap: 4px; padding: 4px 16px 10px; font-size: 13px; color: var(--ink2); }
.field input, .field select { height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); padding: 0 10px; font: inherit; }
.check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.row.sel .check { background: var(--accent); border-color: var(--accent); }
.set { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.set-mid { flex: 1; min-width: 0; }
.set-mid b { display: block; font-weight: 500; }
.set-mid small { display: block; color: var(--ink2); font-size: 12.5px; }
.set select { height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); padding: 0 8px; font: inherit; flex: none; }
.viewer { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .9); display: flex; flex-direction: column; }
.viewer-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top, 0px)); color: #fff; }
.viewer-top span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-top .icon-btn { color: #fff; }
.viewer-top .icon-btn:hover { background: rgba(255, 255, 255, .15); }
.viewer img { flex: 1; min-height: 0; object-fit: contain; width: 100%; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 40; max-width: calc(100% - 32px); background: var(--ink); color: var(--panel); padding: 8px 14px; border-radius: 10px; font-size: 13.5px; }
.demo-note { padding: 5px 16px; background: var(--hl); color: var(--hl-ink); font-size: 12px; text-align: center; }

/* вход: как фирменная картинка TLNT.ae. Цвета только из --login-* (в :root и двух тёмных блоках), поэтому схемы WhatsApp и Telegram на вход не влияют. */
@font-face { font-family: 'TLNT Caps'; font-style: normal; font-weight: 600; font-display: swap; src: url(/login-nunito-600.woff2) format('woff2'); }
@font-face { font-family: 'TLNT Caps'; font-style: normal; font-weight: 700; font-display: swap; src: url(/login-nunito-700.woff2) format('woff2'); }
.login { --lw: min(78vw, 500px, 46vh); --sky: clamp(96px, 26vh, 320px); height: 100%; overflow: hidden auto; overscroll-behavior: contain; background: var(--login-bot); color: var(--login-ink); }
.login-page { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: max(24px, env(safe-area-inset-top)) 20px calc(var(--sky) * .8 + max(12px, env(safe-area-inset-bottom))); background: linear-gradient(180deg, var(--login-top), var(--login-mid) 68%, var(--login-bot)); }
.login-sky { position: absolute; left: 0; right: 0; bottom: 0; height: var(--sky); background: var(--login-sky); -webkit-mask: url(/login-skyline.svg) center bottom / auto 100% repeat-x; mask: url(/login-skyline.svg) center bottom / auto 100% repeat-x; pointer-events: none; }
.login-brand { position: relative; flex: none; display: flex; flex-direction: column; align-items: center; font-family: 'TLNT Caps', var(--font); }
.wordmark { width: var(--lw); aspect-ratio: 1322 / 273; background: var(--login-logo) center / contain no-repeat; }
.login-rule { flex: none; width: calc(var(--lw) * .148); height: 1px; margin: calc(var(--lw) * .09) 0 calc(var(--lw) * .05); background: var(--login-gold); }
@media (min-resolution: 2dppx) { .login-rule { height: 1.5px; } }
@media (min-height: 1000px) { .login-rule { height: 2px; } }
.login-tag { font-size: max(11.5px, calc(var(--lw) * .0565)); font-weight: 700; line-height: 1.2; letter-spacing: .22em; margin-right: -.22em; color: var(--login-tag); white-space: nowrap; }
.login-place { margin-top: calc(var(--lw) * .03); font-size: max(10px, calc(var(--lw) * .045)); font-weight: 600; line-height: 1.2; letter-spacing: .28em; margin-right: -.28em; color: var(--login-place); white-space: nowrap; }
.login form { position: relative; flex: none; width: min(max(320px, calc(var(--lw) * .84)), 100%); margin-top: clamp(20px, 4.4vh, 44px); }
.login h1 { margin: 0 0 14px; font: 600 12.5px/1.2 'TLNT Caps', var(--font); letter-spacing: .5em; text-indent: .5em; text-align: center; color: var(--login-place); }
.login .field { padding: 0 0 12px; gap: 5px; font-size: 12.5px; color: var(--login-ink2); }
.login .field input { height: 44px; padding: 0 12px; border: 1px solid var(--login-line); border-radius: 8px; background: var(--login-field); color: var(--login-ink); font-size: 16px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.login .field input:focus { border-color: var(--login-focus); box-shadow: 0 0 0 3px var(--login-ring); }
.login .field input:-webkit-autofill, .login .field input:-webkit-autofill:hover { -webkit-text-fill-color: var(--login-ink); caret-color: var(--login-ink); -webkit-box-shadow: 0 0 0 60px var(--login-fill) inset; box-shadow: 0 0 0 60px var(--login-fill) inset; transition: background-color 99999s; }
.login .field input:-webkit-autofill:focus { -webkit-text-fill-color: var(--login-ink); caret-color: var(--login-ink); -webkit-box-shadow: 0 0 0 60px var(--login-fill) inset, 0 0 0 3px var(--login-ring); box-shadow: 0 0 0 60px var(--login-fill) inset, 0 0 0 3px var(--login-ring); transition: background-color 99999s; }
.login .btn { display: block; width: 100%; height: 44px; margin: 4px 0 0; padding: 0 16px; border-radius: 8px; background: var(--login-btn); color: var(--login-btn-ink); font-size: 12.5px; font-weight: 600; letter-spacing: .2em; text-indent: .2em; text-transform: uppercase; transition: opacity .15s; }
.login .btn:hover:not(:disabled) { opacity: .88; }
.login :focus-visible { outline-color: var(--login-focus); outline-offset: 2px; }
.login .err { margin: 8px 0 0; min-height: 18px; color: var(--login-err); font-size: 13px; text-align: center; }
.lang-link { display: block; margin: 2px auto 0; padding: 6px 10px; color: var(--login-ink2); font-size: 13px; text-decoration: underline; text-decoration-color: var(--login-line); text-underline-offset: 3px; }
.lang-link:hover { color: var(--login-ink); text-decoration-color: currentColor; }
@media (max-height: 560px) {
  .login-page { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: calc(var(--sky) * .94 + max(8px, env(safe-area-inset-bottom))); }
  .login-rule { margin: calc(var(--lw) * .065) 0 calc(var(--lw) * .04); }
  .login h1 { margin-bottom: 10px; }
  .login .field { padding-bottom: 8px; }
  .login .field input, .login .btn { height: 42px; }
}

@media (max-width: 760px) {
  .app { display: flex; flex-direction: column; }
  .side { flex: 1; border: 0; }
  .main { flex: 1; }
  .app.open .side, .app.open .rail { display: none; }
  .app:not(.open) .main { display: none; }
  .rail { order: 2; flex-direction: row; padding: 4px 6px; padding-bottom: max(4px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--panel); }
  .rail .logo { display: none; }
  .side-logo { display: block; width: 32px; height: 32px; border-radius: 9px; margin-right: 8px; }
  .tabs { flex-direction: row; flex: 1; justify-content: space-around; overflow: visible; padding: 0; margin: 0; }
  .tab { width: auto; flex: 1; max-width: 76px; height: 52px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
  .tab-label { display: block; font-size: 10.5px; color: var(--ink2); }
  .tab.on .tab-label { color: var(--ink); font-weight: 600; }
  .tab b { top: 1px; right: auto; left: calc(50% + 7px); box-shadow: 0 0 0 2px var(--panel); }
  .head { padding-left: 4px; }
  .back { display: grid; }
  .msg { max-width: 86%; }
  .scroll { padding-left: 14px; padding-right: 14px; }
  .more { display: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  .row, .icon-btn, .tab, .chip-btn { transition: background-color .12s; }
  .msg.fresh { animation: rise .18s ease-out; }
  @keyframes rise { from { transform: translateY(6px); opacity: .4; } }
}
.author { font-weight: 700; }
.marks { display: inline-flex; align-items: center; gap: 5px; margin-left: 2px; white-space: nowrap; }
.mark { display: inline-flex; align-items: center; gap: 1px; }
.mark b { font-weight: 700; }
.foot .mark svg { width: 11px; }
.foot .mark.dbl svg { width: 15px; }
.msg.out .foot .mark.seen svg, .msg.in .foot .mark.seen svg { color: var(--out-seen); }
.marks:empty { display: none; }
.tr { margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(127, 127, 127, .28); font-size: .92em; color: var(--ink2); white-space: pre-wrap; }
.msg.out .tr { color: var(--out-ink2); border-top-color: var(--out-soft); }
.tr-btn { display: block; margin-top: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: .85em; color: var(--accent-text); cursor: pointer; }
.msg.out .tr-btn { color: var(--out-ink2); text-decoration: underline; }

/* индикаторы сетей, папки, избранное */
.tab i.dot { position: absolute; left: 3px; bottom: 3px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px var(--rail); }
.dot.green { background: #2e9e5b; } .dot.yellow { background: #d9a400; } .dot.red { background: #d33a2c; }
.chips { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; white-space: nowrap; }
.fav-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fav-btn.on { color: var(--accent); } .fav-btn.on svg { fill: currentColor; }

/* зачёркнутые правки и удаления, расшифровка */
.text.old { text-decoration: line-through; opacity: .62; white-space: pre-wrap; }
.stt { margin-top: 5px; white-space: pre-wrap; font-style: italic; }

/* что уйдёт собеседнику, голосовые */
.input-row[hidden] { display: none; }
.lang-btn { flex: none; align-self: center; min-width: 32px; height: 26px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--line); color: var(--accent-text); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.lang-btn:hover { background: var(--hover); }
.out-pv, .rec { display: flex; flex-direction: column; gap: 7px; padding: 9px 10px; margin-bottom: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--hover); }
.out-pv.err, .rec.err { border-color: var(--danger); }
.out-pv small, .rec small { color: var(--ink2); }
.pv-text { width: 100%; resize: vertical; min-height: 62px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.pv-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.pv-ru { min-height: 48px; }
.pv-text { field-sizing: content; max-height: 30vh; }
.out-pv small.pv-warn { color: var(--danger); }
.pv-info:empty { display: none; }
.ai-btn { position: absolute; left: 100%; bottom: 3px; margin-left: 5px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; font-size: 10px; font-weight: 700; line-height: 1; color: var(--accent-text); background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.ai-btn::before { content: ''; position: absolute; left: -6px; top: 0; bottom: 0; width: 6px; }
.ai-btn:hover { background: var(--hover); }
.msg:hover .ai-btn, .msg.last-in .ai-btn { display: grid; }
.rec audio { width: 100%; height: 38px; }
.rec-row { display: flex; align-items: center; gap: 8px; }
.rec-gap { flex: 1; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #d33a2c; animation: rec-blink 1.1s infinite; }
@keyframes rec-blink { 50% { opacity: .25; } }
.rec-time { font-variant-numeric: tabular-nums; }
.rec-text { white-space: pre-wrap; padding: 6px 9px; border-radius: 9px; background: var(--panel); }
.rec-text small { display: block; font-weight: 600; margin-bottom: 2px; }

/* черновики на согласование и поиск по описанию */
.msg.draft .bubble { box-shadow: none; background: transparent; color: var(--ink); border: 1.5px dashed var(--accent); opacity: .92; }
.draft-tag { font-size: 11.5px; font-weight: 600; color: var(--accent-text); margin-bottom: 4px; }
.msg.draft .tr { color: var(--ink2); }
.draft-why { display: block; margin-top: 5px; color: var(--ink2); font-size: 11.5px; }
.msg.draft .pv-btns { margin-top: 7px; }
.smart-go { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--accent-text); font-weight: 600; text-align: left; width: 100%; }
.smart-go svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* цветовые схемы из настроек: без атрибута data-scheme остаётся TLNT */
:root[data-scheme="whatsapp"] { --rail: #f0f2f5; --bg: #f0f2f5; --panel: #ffffff; --hover: #f5f6f6; --active: #e9edef; --chat: #efeae2; --in: #ffffff; --out: #d9fdd3; --bubble-line: transparent; --out-ink: #111b21; --out-soft: rgba(17, 27, 33, .07); --out-ink2: #54656f; --out-strong: #008069; --out-read: #027eb5; --out-seen: #0b7a2f; --out-err: #b3261e; --in-ink2: #667781; --ink: #111b21; --ink2: #54656f; --line: #e9edef; --accent: #008069; --accent-ink: #ffffff; --accent-text: #008069; --unread: #008069; --read: #027eb5; --hl: #fff3b0; --hl-ink: #111b21; --shadow: rgba(17, 27, 33, .16); }
@media (prefers-color-scheme: dark) { :root[data-scheme="whatsapp"]:not([data-theme="light"]) { --rail: #111b21; --bg: #111b21; --panel: #111b21; --hover: #202c33; --active: #2a3942; --chat: #0b141a; --in: #202c33; --out: #005c4b; --bubble-line: transparent; --out-ink: #e9edef; --out-soft: rgba(255, 255, 255, .12); --out-ink2: rgba(233, 237, 239, .72); --out-strong: #53bdeb; --out-read: #53bdeb; --out-seen: #7dff9e; --out-err: #ffd2cc; --in-ink2: #aebac1; --ink: #e9edef; --ink2: #8696a0; --line: #222d34; --accent: #008069; --accent-ink: #ffffff; --accent-text: #00c29a; --unread: #008069; --read: #53bdeb; --hl: #5c4f12; --hl-ink: #fff4d0; --shadow: rgba(0, 0, 0, .5); color-scheme: dark; } }
:root[data-scheme="whatsapp"][data-theme="dark"] { --rail: #111b21; --bg: #111b21; --panel: #111b21; --hover: #202c33; --active: #2a3942; --chat: #0b141a; --in: #202c33; --out: #005c4b; --bubble-line: transparent; --out-ink: #e9edef; --out-soft: rgba(255, 255, 255, .12); --out-ink2: rgba(233, 237, 239, .72); --out-strong: #53bdeb; --out-read: #53bdeb; --out-seen: #7dff9e; --out-err: #ffd2cc; --in-ink2: #aebac1; --ink: #e9edef; --ink2: #8696a0; --line: #222d34; --accent: #008069; --accent-ink: #ffffff; --accent-text: #00c29a; --unread: #008069; --read: #53bdeb; --hl: #5c4f12; --hl-ink: #fff4d0; --shadow: rgba(0, 0, 0, .5); color-scheme: dark; }
:root[data-scheme="telegram"] { --rail: #f1f4f7; --bg: #f1f4f7; --panel: #ffffff; --hover: #f1f4f7; --active: #dcecfb; --chat: #e7eef4; --in: #ffffff; --out: #d6eafc; --bubble-line: transparent; --out-ink: #0f1419; --out-soft: rgba(15, 20, 25, .07); --out-ink2: #4f6475; --out-strong: #1f74b8; --out-read: #1f74b8; --out-seen: #0b7a2f; --out-err: #b3261e; --in-ink2: #5b6b78; --ink: #0f1419; --ink2: #5b6b78; --line: #e4e9ee; --accent: #2481cc; --accent-ink: #ffffff; --accent-text: #1f74b8; --unread: #2481cc; --read: #2481cc; --hl: #fff3b0; --hl-ink: #0f1419; --shadow: rgba(15, 20, 25, .16); }
@media (prefers-color-scheme: dark) { :root[data-scheme="telegram"]:not([data-theme="light"]) { --rail: #17212b; --bg: #17212b; --panel: #17212b; --hover: #202b36; --active: #2b5278; --chat: #0e1621; --in: #182533; --out: #2b5278; --bubble-line: transparent; --out-ink: #f5f5f5; --out-soft: rgba(255, 255, 255, .14); --out-ink2: rgba(245, 245, 245, .72); --out-strong: #8fc7f7; --out-read: #8fc7f7; --out-seen: #7dff9e; --out-err: #ffd2cc; --in-ink2: #9fb0bf; --ink: #f5f5f5; --ink2: #8a9aa9; --line: #232e3c; --accent: #2f7fc9; --accent-ink: #ffffff; --accent-text: #6ab3f3; --unread: #2f7fc9; --read: #6ab3f3; --hl: #5c4f12; --hl-ink: #fff4d0; --shadow: rgba(0, 0, 0, .5); color-scheme: dark; } }
:root[data-scheme="telegram"][data-theme="dark"] { --rail: #17212b; --bg: #17212b; --panel: #17212b; --hover: #202b36; --active: #2b5278; --chat: #0e1621; --in: #182533; --out: #2b5278; --bubble-line: transparent; --out-ink: #f5f5f5; --out-soft: rgba(255, 255, 255, .14); --out-ink2: rgba(245, 245, 245, .72); --out-strong: #8fc7f7; --out-read: #8fc7f7; --out-seen: #7dff9e; --out-err: #ffd2cc; --in-ink2: #9fb0bf; --ink: #f5f5f5; --ink2: #8a9aa9; --line: #232e3c; --accent: #2f7fc9; --accent-ink: #ffffff; --accent-text: #6ab3f3; --unread: #2f7fc9; --read: #6ab3f3; --hl: #5c4f12; --hl-ink: #fff4d0; --shadow: rgba(0, 0, 0, .5); color-scheme: dark; }

/* значки в поле поиска и карточка контакта (Стас 05.11) */
.search-box { position: relative; }
.search-box input { padding-right: 42px; text-overflow: ellipsis; }
.search-box.has-text input { padding-right: 76px; }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.search-acts { position: absolute; top: 2px; right: 3px; bottom: 2px; display: flex; align-items: center; }
.search-acts .icon-btn { width: 34px; height: 34px; }
.search-acts .icon-btn svg { width: 19px; height: 19px; }
.search-box .search-x { display: none; }
.search-box.has-text .search-x { display: grid; }
.head-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; border-radius: 10px; padding: 3px 8px 3px 3px; }
.head-who:hover { background: var(--hover); }
.row.still { cursor: default; }
.row.still:hover { background: none; }
.card-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 8px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.card-top { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 8px 12px; text-align: center; }
.card-top .ava { width: 88px; height: 88px; margin-bottom: 8px; }
.card-top .ava-in { font-size: 30px; }
.card-top .net { width: 26px; height: 26px; right: 1px; bottom: 1px; }
.card-top .net svg { width: 16px; height: 16px; }
.card-name { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.card-net { font-size: 13px; color: var(--ink2); }
.card-fields { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; max-width: 100%; }
.card-copy { padding: 3px 8px; border-radius: 8px; color: var(--accent-text); font-size: 14.5px; overflow-wrap: anywhere; }
.card-copy:hover { background: var(--hover); }
.card-rows .loading { display: block; text-align: center; padding: 16px; }
.card-rows .empty { padding: 16px; }

/* партия 05.11: граница списка, папки, контакт первым, шапка MSG */
.ava-in { position: relative; }
.ava-in img { position: absolute; inset: 0; }
.side-grip { position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; z-index: 6; cursor: col-resize; touch-action: none; }
.side-grip:hover, .side-grip.drag { background: var(--line); }
body.dragging { cursor: col-resize; user-select: none; }
.brand-mark { display: inline-block; width: 106px; height: 20px; margin-left: 8px; vertical-align: -3px; background: var(--wordmark) left center / contain no-repeat; }
.brand-acc { margin-left: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink2); }
.row-name { margin-left: 7px; font-weight: 400; color: var(--ink2); }
.chip-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.folder-btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.folder-btn.on { color: var(--accent); }
.folder-btn.on svg { fill: currentColor; }
.menu.folder-menu { width: min(300px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto; }
.folder-row { display: flex; align-items: center; gap: 2px; }
.folder-menu .folder-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.folder-check { flex: none; width: 14px; height: 14px; display: grid; place-items: center; color: var(--accent-text); }
.folder-check svg { width: 13px; height: 12px; fill: currentColor; }
.folder-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-menu .folder-act { display: grid; flex: none; width: 30px; height: 30px; padding: 0; border-radius: 50%; }
.folder-menu .folder-act svg { width: 16px; height: 16px; }
.folder-menu .folder-new { display: flex; align-items: center; gap: 8px; }
.folder-new svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.folder-name { width: 100%; height: 34px; margin-bottom: 4px; border: 0; border-radius: 8px; background: var(--hover); padding: 0 10px; }
@media (min-width: 761px) {
  .chips { flex-wrap: wrap; overflow: visible; }
}
@media (max-width: 760px) {
  .side-grip { display: none; }
  .chips { touch-action: pan-x; overscroll-behavior-x: contain; }
  .tab i.dot { left: calc(50% - 17px); bottom: auto; top: 21px; }
}

/* Стас 05.11: просмотр файлов, правка, реакции, крупные смайлы, управление папками */
.file { padding: 4px; gap: 4px; }
.file-open { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 0; padding: 3px 5px; text-align: left; color: inherit; background: none; border-radius: 9px; cursor: pointer; }
.file-open:hover { background: var(--hover); }
.file-dl { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: inherit; }
.file-dl svg { width: 19px; height: 19px; fill: currentColor; }
.file-dl:hover { background: var(--hover); }
.viewer-body { flex: 1; min-height: 0; overflow: auto; color: #fff; }
.viewer-body.center { display: flex; align-items: center; justify-content: center; }
.viewer-body > img { width: 100%; height: 100%; object-fit: contain; }
.viewer-body > video { max-width: 100%; max-height: 100%; }
.viewer-tools { flex: none; display: flex; align-items: center; gap: 2px; }
.pdf-count { font-size: 13px; color: #fff; white-space: nowrap; padding: 0 6px; }
.viewer-dl { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; background: rgba(255, 255, 255, .16); color: #fff; text-decoration: none; font-size: 13.5px; }
.viewer-dl b { font-weight: 500; }
.viewer-dl svg { width: 18px; height: 18px; fill: currentColor; }
.viewer-dl:hover { background: rgba(255, 255, 255, .26); }
.viewer .loading { color: #fff; }
.viewer-note { max-width: 420px; padding: 24px; text-align: center; color: #fff; }
.viewer-note p { margin: 0 0 16px; line-height: 1.45; }
.viewer-note .btn { display: inline-flex; text-decoration: none; }
.viewer-warn { max-width: 860px; margin: 8px auto 0; padding: 6px 12px; font-size: 12.5px; color: rgba(255, 255, 255, .78); text-align: center; }
.viewer-text { box-sizing: border-box; max-width: 980px; margin: 8px auto 16px; padding: 16px; background: #fff; color: #222; border-radius: 8px; font: 13px/1.5 Consolas, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.viewer-doc { box-sizing: border-box; max-width: 860px; margin: 8px auto 16px; padding: 28px 32px; background: #fff; color: #222; border-radius: 8px; line-height: 1.5; overflow-wrap: anywhere; }
.viewer-doc img { flex: none; width: auto; max-width: 100%; height: auto; object-fit: initial; }
.viewer-doc table { border-collapse: collapse; max-width: 100%; }
.viewer-doc td, .viewer-doc th { border: 1px solid #ccc; padding: 4px 8px; vertical-align: top; }
.viewer-doc a { color: #1a5fb4; }
.pdf-pages { padding: 8px; min-width: fit-content; }
.pdf-page { position: relative; margin: 0 auto 10px; background: #fff; overflow: hidden; }
.pdf-page canvas { display: block; }
.textLayer { position: absolute; inset: 0; overflow: clip; opacity: 1; line-height: 1; text-align: initial; transform-origin: 0 0; z-index: 0; forced-color-adjust: none; -webkit-text-size-adjust: none; text-size-adjust: none; }
.textLayer span, .textLayer br { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; }
.textLayer span.markedContent { top: 0; height: 0; }
.textLayer ::selection { background: rgba(0, 90, 220, .3); color: transparent; }
.textLayer br::selection { background: transparent; }
.textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: 0; cursor: default; user-select: none; }
.text.big-emoji { font-size: 40px; line-height: 1.2; }
.react { cursor: pointer; line-height: 1.45; border: 0; }
.react.mine { box-shadow: 0 0 0 1.5px var(--accent-text); }
.menu .react-bar { display: flex; flex-wrap: nowrap; gap: 1px; padding: 1px 1px 5px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.menu .react-bar button, .menu .emoji-grid button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; font-size: 20px; line-height: 1; text-align: center; border-radius: 50%; }
.menu .react-bar button.on { background: var(--active); }
.menu .react-more svg { width: 18px; height: 18px; fill: currentColor; }
.emoji-grid { display: grid; grid-template-columns: repeat(7, 34px); gap: 2px; max-height: 250px; overflow-y: auto; }
.menu button.danger { color: #c0392b; }
.edit-bar b { color: var(--accent-text); }
.input-row .icon-btn:disabled { opacity: .5; }
.fm-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 8px; }
.fm-row { display: flex; align-items: center; gap: 2px; padding: 7px 6px; border-radius: 10px; border: 1px solid transparent; }
.fm-row:hover { background: var(--hover); }
.fm-row.off .fm-mid { opacity: .55; }
.fm-row.drag { opacity: .4; }
.fm-row.over { border-color: var(--accent-text); }
.fm-grip { flex: none; display: grid; place-items: center; width: 22px; color: var(--ink2); cursor: grab; }
.fm-grip svg { width: 18px; height: 18px; fill: currentColor; }
.fm-mid { flex: 1; min-width: 0; padding: 0 4px; }
.fm-mid b { display: block; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.fm-mid small { display: block; font-size: 12px; line-height: 1.3; color: var(--ink2); }
.fm-act { flex: none; width: 30px; height: 30px; }
.fm-act:disabled { opacity: .3; }
.fm-row .folder-name { flex: 1; min-width: 0; margin-right: 4px; }
.fm-row > .btn { flex: none; margin-left: 4px; }

/* ui8: на телефоне все кнопки строки ввода (в том числе микрофон) помещаются */
@media (max-width: 760px) {
  .composer { padding-left: 6px; padding-right: 6px; }
  .input-row { gap: 1px; }
  .input-row .icon-btn { width: 34px; height: 36px; }
  .input-row .icon-btn svg { width: 20px; height: 20px; }
  .input-row .send { margin-left: 2px; }
  .input-row textarea { min-width: 60px; padding: 9px 10px; }
  .input-row .mic { display: grid !important; }
}
/* ui11: MOST тем же шрифтом, что и логотип TLNT.ae */
.brand.most b { font-family: "TLNT Serif", Georgia, serif; font-weight: 600; font-size: 31px; line-height: 1; letter-spacing: .05em; vertical-align: -2px; }
.brand-mark { vertical-align: -2px; margin-left: 10px; }
/* ui12: MOST легче и по размеру как буквы в логотипе */
.brand.most b { font-weight: 500; font-size: 25px; letter-spacing: .06em; vertical-align: -1px; }
/* ui13: высота заглавных MOST = высоте заглавных в логотипе (20px / 0.625 = 32px), начертание лёгкое */
.brand.most b { font-weight: 500; font-size: 32px; letter-spacing: .03em; vertical-align: -3px; }
/* ui15: на телефоне всё помещается по ширине, без сдвига вбок */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 760px) {
  .composer { box-sizing: border-box; width: 100%; max-width: 100vw; overflow: hidden; }
  .input-row { box-sizing: border-box; width: 100%; flex-wrap: nowrap; min-width: 0; }
  .input-row .icon-btn { flex: 0 1 34px; min-width: 26px; }
  .input-row .lang-btn { flex: 0 1 auto; min-width: 26px; padding: 0 4px; }
  .input-row textarea { flex: 1 1 0; min-width: 40px; }
}

/* ui16: заглавные MOST = заглавным логотипа: 150/155 высоты картинки 20px = 19.3px, 19.3 / 0.625 = 30.9px */
.brand.most b { font-size: 30.9px; vertical-align: 0; }
.brand.most .brand-mark { vertical-align: -.6px; }
/* ui16: три строки текста в списке */
.row { align-items: flex-start; }
.row-2 { align-items: flex-start; }
.row-text { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; line-height: 1.3; overflow-wrap: anywhere; }
/* ui16: папки */
.folder-head { padding: 8px 12px 6px; font-size: 12.5px; color: var(--ink2); max-width: 280px; }
.folder-pick { width: 100%; }
.folder-state { margin-left: auto; padding-left: 12px; font-size: 12px; color: var(--ink2); }

/* ui18: явная кнопка удаления папки */
.fm-del { flex: none; display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 5px 10px; color: var(--danger); border-color: var(--danger); font-size: 13px; }
.fm-del svg { width: 15px; height: 15px; fill: currentColor; }

/* ui19: название сети не жирное */
.brand:not(.most) b { font-weight: 500; }
.brand:not(.most) b { font-size: 18px; }
.brand:not(.most) .brand-acc { font-size: 18px; font-weight: 500; color: inherit; opacity: 1; }
/* ui24: два окна перевода и тумблер */
.fm-grip { touch-action: none; }
.pair-top { padding: 0 0 6px 38px; display: flex; align-items: flex-start; gap: 6px; }
.pair-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pair-send { width: 100%; box-sizing: border-box; resize: none; border: 1px solid var(--line); border-radius: 19px; background: var(--panel); padding: 8px 14px; max-height: 140px; line-height: 1.35; font: inherit; color: inherit; }
.pair-send::placeholder { color: var(--ink2); }
.pair-info { padding-left: 14px; color: var(--ink2); font-size: 12px; }
.pair-info:empty { display: none; }
.pair-info.pv-warn { color: var(--danger); }
.lang-sw { position: relative; flex: none; align-self: center; width: 54px; height: 30px; margin: 0 3px; padding: 0; border: 0; border-radius: 15px; background: var(--line); cursor: pointer; transition: background .2s; }
.lang-sw.on { background: var(--accent); }
.lang-sw i { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.lang-sw.on i { transform: translateX(24px); }
.lang-sw-text { position: absolute; top: 0; right: 6px; line-height: 30px; font-size: 10.5px; font-weight: 700; color: var(--ink); }
.lang-sw.on .lang-sw-text { right: auto; left: 6px; color: #fff; }
@media (max-width: 480px) {
  .lang-sw { width: 42px; height: 24px; margin: 0 2px; border-radius: 12px; }
  .lang-sw i { width: 20px; height: 20px; }
  .lang-sw.on i { transform: translateX(18px); }
  .lang-sw-text { right: 3px; line-height: 24px; font-size: 9px; }
  .lang-sw.on .lang-sw-text { left: 4px; }
  .pair-top { padding-left: 0; }
}

.forward-tabs { display: flex; gap: 4px; padding: 0 0 8px; }
.forward-tab { flex: 1; min-height: 40px; border: 0; border-bottom: 2px solid transparent; background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; opacity: .65; }
.forward-tab.on { border-bottom-color: var(--accent); color: var(--accent); opacity: 1; }

.row-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag-chip { display: inline-block; max-width: 100%; padding: 1px 8px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-btn.on { color: var(--accent); }
.tag-swatches { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
.menu .tag-swatch { display: block; flex: none; width: 28px; height: 28px; padding: 0; border-radius: 50%; }
.menu .tag-swatch.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.tag-btn svg, .tag-menu .folder-new svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.tag-menu .folder-pick .tag-chip { flex: none; max-width: 200px; }

.card-photo { cursor: zoom-in; }
.card-field { display: flex; align-items: center; gap: 2px; }
.card-value { user-select: text; overflow-wrap: anywhere; }
.card-act { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); }
.card-act:hover { background: var(--hover); }
.card-act svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.card-others { display: flex; flex-direction: column; gap: 6px; }
.card-start { width: 100%; }
.viewer { z-index: 200; }

.fm-tag { display: flex; align-items: center; gap: 8px; }
.fm-tag .tag-chip { flex: 0 1 auto; min-width: 0; }
.fm-tag-count { flex: 1; font-size: 12px; color: var(--ink2); white-space: nowrap; }
.fm-tag-gap { flex: none; width: 40px; }
.fm-tag-form { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fm-tag-btns { display: flex; gap: 8px; justify-content: flex-end; }
.fm-tag-form .tag-swatch { display: block; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 0; }
.fm-tag-form .tag-swatch.on { outline: 2px solid var(--accent); outline-offset: 2px; }

/* упоминания @ (08.11) */
.composer { position: relative; }
.mention-box { margin: 0 0 6px; max-height: 240px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.18); z-index: 30; padding: 4px 0; }
.mention-row { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 7px 12px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.mention-row small { opacity: .65; font-size: 12px; }
.mention-row.on, .mention-row:hover { background: rgba(127,127,127,.14); }
.text .mention { color: var(--accent-text); font-weight: 600; }
.msg.out .text .mention { color: inherit; text-decoration: underline; }

/* Две кнопки отправки RU / EN (Стас 09.11): самолетик с подписью языка, ровно по высоте поля */
.send-lang { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 38px; margin: 0 0 0 2px; padding: 0 12px 0 10px; border: 0; border-radius: 19px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12.5px; line-height: 1; cursor: pointer; }
.send-lang svg { width: 18px; height: 18px; fill: currentColor; }
.send-lang:not(.tr) { background: transparent; color: var(--accent-text, var(--accent)); box-shadow: inset 0 0 0 1.5px var(--accent); }
.send-lang:disabled { opacity: .45; cursor: default; }
.send-lang .spin { display: none; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: sendspin .7s linear infinite; }
.send-lang.busy { opacity: 1; }
.send-lang.busy svg, .send-lang.busy .send-lang-t { visibility: hidden; }
.send-lang.busy .spin { display: block; }
@keyframes sendspin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .send-lang { padding: 0 9px 0 8px; gap: 3px; } .send-lang svg { width: 16px; height: 16px; } }

/* Настройки кнопками (Стас 09.11): выбранная нажата */
.modal { position: relative; }
.modal-x { position: absolute; top: 10px; right: 10px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 12px; background: var(--hover); }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink2); font: inherit; font-size: 13.5px; cursor: pointer; }
.seg-btn svg { width: 17px; height: 17px; fill: currentColor; }
.seg-btn[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px var(--shadow), inset 0 0 0 1.5px var(--accent); }
.seg-btn.wide { flex-direction: column; align-items: stretch; gap: 5px; height: auto; min-width: 104px; padding: 7px 9px; }
.seg-btn .sw { display: flex; height: 22px; border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.seg-btn .sw i { flex: 1; }
.seg-btn .sw i:last-child { flex: .8; }
.set.col { flex-wrap: wrap; }
.set.col .seg { width: 100%; }
.set.col .seg-btn { flex: 1; justify-content: center; }
.sw-tlnt i:nth-child(1) { background: #fbf8f3; }
.sw-tlnt i:nth-child(2) { background: #f0e6d6; }
.sw-tlnt i:nth-child(3) { background: #986e35; }
.sw-whatsapp i:nth-child(1) { background: #efeae2; }
.sw-whatsapp i:nth-child(2) { background: #d9fdd3; }
.sw-whatsapp i:nth-child(3) { background: #008069; }
.sw-telegram i:nth-child(1) { background: #e7eef4; }
.sw-telegram i:nth-child(2) { background: #d6eafc; }
.sw-telegram i:nth-child(3) { background: #2481cc; }
.seg-btn > span:last-child { white-space: nowrap; }

/* Настройки 09.11 вечер: компактнее, образцы цветов кружками с обводкой, место снизу окна */
.set.col .seg { width: auto; }
.set.col .seg-btn { flex: none; }
.seg-btn.wide { flex-direction: row; align-items: center; min-width: 0; height: 38px; padding: 0 12px 0 8px; gap: 8px; }
.seg-btn .sw { height: auto; border-radius: 0; overflow: visible; box-shadow: none; gap: 0; }
.seg-btn .sw i, .seg-btn .sw i:last-child { flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px rgba(0, 0, 0, .18); }
.seg-btn .sw i + i { margin-left: -5px; }
.modal { padding-bottom: 18px; }
.set.col { flex-direction: column; align-items: flex-start; gap: 8px; } .set.col .set-mid { width: 100%; }

/* Настройки 09.11: кнопки слева, название справа, крестик крупнее, низ окна не режется */
.set.col { flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap-reverse; }
.set.col .set-mid { width: auto; flex: 1 1 90px; text-align: right; }
.modal-x { width: 44px; height: 44px; top: 6px; right: 6px; }
.modal-x svg { width: 28px; height: 28px; }
.modal::after { content: ''; display: block; height: 16px; flex: none; }
.set.col { flex-wrap: nowrap; }
.set.col .set-mid { flex: 0 1 auto; max-width: 120px; }
#set-scheme { flex-direction: column; align-items: stretch; }
#set-theme .seg-btn { flex-direction: column; justify-content: center; gap: 2px; height: 50px; padding: 0 10px; font-size: 12px; }
#set-lang .seg-btn { padding: 0 10px; }
.modal { overflow-y: auto; }
.logo-ph { display: grid; place-items: center; box-sizing: border-box; border: 1.5px dashed var(--ink2); border-radius: 8px; color: var(--ink2); font-size: 9.5px; font-weight: 800; letter-spacing: .06em; background: transparent; }
.demo-note { position: fixed; z-index: 50; top: 6px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 24px); padding: 4px 14px; border-radius: 14px; background: color-mix(in srgb, var(--hl) 72%, transparent); backdrop-filter: blur(6px); box-shadow: 0 2px 8px var(--shadow); pointer-events: none; font-size: 11.5px; }
.demo-note { top: auto; bottom: 92px; }
.demo-note { bottom: 10px; left: 10px; transform: none; max-width: min(300px, calc(100vw - 20px)); text-align: left; }
.logo-ph { font-size: 8.5px; line-height: 1.05; text-align: center; padding: 2px; }

/* 09.11: подпись слева, кнопки справа, схемы в одну линию */
.set.col { flex-direction: row; justify-content: space-between; }
.set.col .set-mid { text-align: left; }
#set-scheme { flex-direction: row; flex-wrap: nowrap; }
#set-scheme .seg-btn.wide { padding: 0 10px 0 7px; gap: 6px; }
.set.col .set-mid { flex: 0 0 auto; min-width: 70px; max-width: 110px; } #set-scheme .seg-btn .sw i { width: 15px; height: 15px; } #set-scheme .seg-btn .sw i + i { margin-left: -6px; } #set-scheme .seg-btn.wide { padding: 0 8px 0 6px; gap: 5px; font-size: 12.5px; }

/* Ожидание перевода: палочки по кругу, как в Apple (Стас 09.11) */
.send-lang .spin { border: 0; border-radius: 0; width: 18px; height: 18px; animation: none; }
.send-lang .spin b { position: absolute; left: 50%; top: 0; width: 2px; height: 5px; margin-left: -1px; border-radius: 1px; background: currentColor; transform-origin: 1px 9px; animation: sendbars .8s linear infinite; opacity: .2; }
.send-lang .spin b:nth-child(1) { transform: rotate(0deg); animation-delay: -0.80s; }
.send-lang .spin b:nth-child(2) { transform: rotate(45deg); animation-delay: -0.70s; }
.send-lang .spin b:nth-child(3) { transform: rotate(90deg); animation-delay: -0.60s; }
.send-lang .spin b:nth-child(4) { transform: rotate(135deg); animation-delay: -0.50s; }
.send-lang .spin b:nth-child(5) { transform: rotate(180deg); animation-delay: -0.40s; }
.send-lang .spin b:nth-child(6) { transform: rotate(225deg); animation-delay: -0.30s; }
.send-lang .spin b:nth-child(7) { transform: rotate(270deg); animation-delay: -0.20s; }
.send-lang .spin b:nth-child(8) { transform: rotate(315deg); animation-delay: -0.10s; }
@keyframes sendbars { 0% { opacity: 1; } 100% { opacity: .2; } }
.pv-btns .send-lang { margin-left: 6px; }

.pv-btns .pv-gap { flex: 1; }
.pv-btns .icon-btn { flex: none; }
.pv-mic.rec-on { color: #c62828; animation: pvrec 1s ease-in-out infinite; }
.pv-mic.busy { opacity: .5; }
@keyframes pvrec { 50% { opacity: .4; } }

.pv-line { display: flex; align-items: flex-start; gap: 6px; }
.pv-line .pv-text { flex: 1; min-width: 0; }
.pv-line .send-lang { margin-top: 2px; }

.pair-top .send-lang svg + svg { margin-left: -2px; }
.input-row .send-lang:not(.tr) { padding: 0 11px; }

/* Stas 09.11: both send buttons the same round shape */
.pair-top .send-lang, .input-row .send-lang:not(.tr) { width: 38px; height: 38px; padding: 0; border-radius: 50%; gap: 0; }
.pair-top .send-lang .tr-badge { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; background: var(--panel); color: var(--accent); display: grid; place-items: center; box-shadow: 0 0 0 1.5px var(--accent); }
.pair-top .send-lang .tr-badge svg { width: 12px; height: 12px; fill: currentColor; }
.pair-top .send-lang.busy .tr-badge { visibility: hidden; }

/* 11.11 Стас: 'Все' стоит на месте, сети прокручиваются - новые каналы не сжимают иконки */
.tabs-nets { display: contents; }
.tab.salesnav { color: var(--li); }
@media (max-width: 760px) {
  .tabs { justify-content: flex-start; min-width: 0; }
  .tabs > .tab.all { flex: none; width: 64px; }
  .tabs-nets { display: flex; flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; gap: 2px; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; padding-top: 4px; }
  .tabs-nets::-webkit-scrollbar { display: none; }
  .tabs-nets .tab { flex: none; width: 70px; max-width: none; scroll-snap-align: start; }
}
.pair-send { overflow-y: hidden; }   /* Стас 11.11: стрелки прокрутки в поле перевода */
.ro-bar { padding: 12px 16px; text-align: center; color: var(--ink2); font-size: 13px; }   /* только чтение */
@media (pointer: coarse) { input, textarea, select { font-size: 16px; } }   /* Стас 11.11: iPhone не увеличивает экран при вводе, блок отправки не сдвигается */

/* 13.11: строка "Переслано от" - кнопка перехода в чат автора */
.fwd-from { display: block; background: none; border: 0; padding: 0 0 4px; font: inherit; font-size: 13px; font-style: italic; color: var(--accent, #8a6d3b); cursor: pointer; text-align: left; }
.fwd-from:disabled { cursor: default; color: var(--muted, #888); }
.fwd-from:not(:disabled):hover { text-decoration: underline; }
/* nfg-fallback start */
html.nfg /* полоса сетей */
.rail > * + * { margin-top: 10px; }
html.nfg .tabs > * + * { margin-top: 6px; }
html.nfg .side-top > * + * { margin-left: 4px; }
html.nfg .chips > * + * { margin-left: 6px; }
html.nfg .banner.info > * + * { margin-left: 8px; }
html.nfg .row > * + * { margin-left: 12px; }
html.nfg .row-1 > * + *, html.nfg .row-2 > * + * { margin-left: 8px; }
html.nfg .head > * + * { margin-left: 10px; }
html.nfg .scroll > * + * { margin-top: 2px; }
html.nfg .foot > * + * { margin-left: 3px; }
html.nfg .file > * + * { margin-left: 10px; }
html.nfg .reacts > * + * { margin-left: 3px; }
html.nfg .reacts > * { margin-bottom: 3px; }
html.nfg .reply-bar > * + *, html.nfg .file-bar > * + * { margin-left: 8px; }
html.nfg .chip > * + * { margin-left: 6px; }
html.nfg .input-row > * + * { margin-left: 4px; }
html.nfg .modal-foot > * + * { margin-left: 8px; }
html.nfg .field > * + * { margin-top: 4px; }
html.nfg .set > * + * { margin-left: 12px; }
html.nfg .viewer-top > * + * { margin-left: 8px; }
html.nfg .tab > * + * { margin-top: 2px; }
html.nfg .marks > * + * { margin-left: 5px; }
html.nfg .mark > * + * { margin-left: 1px; }
html.nfg .out-pv > * + *, html.nfg .rec > * + * { margin-top: 7px; }
html.nfg .pv-btns > * + * { margin-left: 7px; }
html.nfg .pv-btns > * { margin-bottom: 7px; }
html.nfg .rec-row > * + * { margin-left: 8px; }
html.nfg .smart-go > * + * { margin-left: 8px; }
html.nfg .head-who > * + * { margin-left: 10px; }
html.nfg .card-top > * + * { margin-top: 3px; }
html.nfg .card-fields > * + * { margin-left: 6px; }
html.nfg .card-fields > * { margin-bottom: 2px; }
html.nfg .folder-row > * + * { margin-left: 2px; }
html.nfg .folder-menu .folder-pick > * + * { margin-left: 8px; }
html.nfg .folder-menu .folder-new > * + * { margin-left: 8px; }
html.nfg .file-open > * + * { margin-left: 10px; }
html.nfg .viewer-tools > * + * { margin-left: 2px; }
html.nfg .viewer-dl > * + * { margin-left: 6px; }
html.nfg .menu .react-bar > * + * { margin-left: 1px; }
html.nfg .fm-row > * + * { margin-left: 2px; }
html.nfg /* ui18: явная кнопка удаления папки */
.fm-del > * + * { margin-left: 4px; }
html.nfg .pair-top > * + * { margin-left: 6px; }
html.nfg .pair-col > * + * { margin-top: 3px; }
html.nfg .forward-tabs > * + * { margin-left: 4px; }
html.nfg .row-tags > * + * { margin-left: 4px; }
html.nfg .row-tags > * { margin-bottom: 4px; }
html.nfg .tag-swatches > * + * { margin-left: 8px; }
html.nfg .tag-swatches > * { margin-bottom: 8px; }
html.nfg .card-field > * + * { margin-left: 2px; }
html.nfg .card-others > * + * { margin-top: 6px; }
html.nfg .fm-tag > * + * { margin-left: 8px; }
html.nfg .fm-tag-form > * + * { margin-top: 6px; }
html.nfg .fm-tag-btns > * + * { margin-left: 8px; }
html.nfg /* Две кнопки отправки RU / EN (Стас 09.11): самолетик с подписью языка > * + *, html.nfg ровно по высоте поля */
.send-lang > * + * { margin-left: 4px; }
html.nfg .seg > * + * { margin-left: 4px; }
html.nfg .seg > * { margin-bottom: 4px; }
html.nfg .seg-btn > * + * { margin-left: 6px; }
html.nfg .pv-line > * + * { margin-left: 6px; }
html.nfg .tabs-nets > * + * { margin-left: 2px; }
html.nfg .drop, html.nfg .modal-bg, html.nfg .viewer, html.nfg .ava-in img, html.nfg .textLayer, html.nfg .send-lang .spin { top: 0; right: 0; bottom: 0; left: 0; }
/* nfg-fallback end */

/* меню сообщения листом внизу и окно выделения текста (Стас 15.11) */
.menu.sheet { left: 8px !important; right: 8px; bottom: max(8px, env(safe-area-inset-bottom, 0px)); top: auto !important; }
.sel-text { width: 100%; box-sizing: border-box; min-height: 120px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; line-height: 1.4; color: inherit; background: var(--panel); -webkit-user-select: text; user-select: text; }
.msg .text { -webkit-user-select: text; user-select: text; }

/* AVANTA: без переключателя языка отправки и второй строки перевода (Стас 16.11) */
.lang-sw, .send-lang.tr, .pair-top, .tr-line, .msg-tr { display: none !important; }
