@font-face { font-family: "Onest"; font-weight: 100 900; font-display: swap; src: url("/static/fonts/onest-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Onest"; font-weight: 100 900; font-display: swap; src: url("/static/fonts/onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap; src: url("/static/fonts/unbounded-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap; src: url("/static/fonts/unbounded-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/jbmono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/jbmono-cyrillic.woff2") format("woff2"); unicode-range: U+0400-045F; }

/* Панель поддержки (desk.*): тёмная палитра студии, плотно, без стекла и свечений. Шрифты лежат рядом (static/fonts), CSP запрещает инлайн-стили. */
:root {
  --bg: #0A0A0E; --panel: #101016; --raise: #16161E; --hover: #1D1D27;
  --line: rgba(236, 232, 255, .07); --line-2: rgba(236, 232, 255, .13);
  --ink: #F3F1FA; --ink-2: #AEABBE; --mute: #75738C;
  --acc: #8D6BFF; --acc-soft: rgba(141, 107, 255, .14); --acc-line: rgba(141, 107, 255, .45);
  --ok: #43D99B; --ok-soft: rgba(67, 217, 155, .13);
  --warn: #FFBF47; --warn-soft: rgba(255, 191, 71, .13);
  --bad: #FF5F73; --bad-soft: rgba(255, 95, 115, .13);
  --gold: #D4AF5A; --gold-soft: rgba(212, 175, 90, .14);
  --f-ui: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;   /* моноширинный убран: смотрелся как ICQ-2001 */
  --f-code: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --f-brand: "Unbounded", "Onest", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--f-ui); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(141, 107, 255, .38); }
.mono { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.mute { color: var(--mute); }
.ink2 { color: var(--ink-2); }
.gold { color: var(--gold); }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.small { font-size: 12px; }
.hide, [hidden] { display: none !important; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* оболочка */
.dk { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.dk-top { height: 48px; flex: 0 0 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.dk-brand { font-family: var(--f-brand); font-weight: 700; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; margin-right: 12px; white-space: nowrap; }
.dk-nav { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dk-nav::-webkit-scrollbar { display: none; }
.dk-nav a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.dk-nav a:hover { background: var(--hover); color: var(--ink); }
.dk-nav a.is-on { background: var(--acc-soft); color: var(--ink); font-weight: 600; }
.dk-presence { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); padding: 0 10px; height: 32px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; }
.dot.off { background: var(--mute); }
.dot.bad { background: var(--bad); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); font-size: 13px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.btn-acc { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 600; }
.btn-acc:hover { background: #9d80ff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-bad { background: var(--bad-soft); border-color: rgba(255, 95, 115, .35); color: var(--bad); }
.btn-ok { background: var(--ok-soft); border-color: rgba(67, 217, 155, .35); color: var(--ok); }
.btn-warn { background: var(--warn-soft); border-color: rgba(255, 191, 71, .4); color: var(--warn); }
.btn-mute { height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 600; }
.btn-mute.is-off { background: var(--bad-soft); border-color: rgba(255, 95, 115, .4); color: var(--bad); }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
.btn-icon { width: 32px; padding: 0; }
.dk-strip { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 36px; padding: 4px 16px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 500; border-bottom: 1px solid rgba(255, 191, 71, .25); }
.dk-strip.bad { background: var(--bad-soft); color: var(--bad); border-color: rgba(255, 95, 115, .3); }
.dk-strip .btn { height: 26px; font-size: 12px; }
.dk-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 320px minmax(480px, 1fr) 340px; gap: 8px; padding: 8px; height: calc(100vh - 48px); }
.dk.has-strip .dk-main { height: calc(100vh - 84px); }
.col { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--raise); color: var(--ink-2); white-space: nowrap; }
.pill.acc { background: var(--acc-soft); color: #c4b1ff; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.gold { background: var(--gold-soft); color: var(--gold); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--acc); color: #fff; font-size: 11px; font-weight: 700; }
.av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--raise); flex: 0 0 auto; }
.av-sm { width: 22px; height: 22px; }
.av-lg { width: 48px; height: 48px; }
.av-wrap { position: relative; flex: 0 0 auto; }
.av-wrap .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border: 2px solid var(--panel); }
.av-sg { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--raise); border: 1px solid var(--line-2); font-family: var(--f-brand); font-size: 9px; font-weight: 700; color: var(--ink-2); flex: 0 0 auto; }
.kbd { display: inline-block; font: 600 10.5px/1 var(--f-ui); color: var(--mute); padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); }

/* левая колонка */
.tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); }
.tab { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 0; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 500; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; }
.tab:hover { color: var(--ink); background: var(--hover); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--acc); font-weight: 600; }
.tab .n { font-size: 11px; color: var(--mute); font-weight: 600; }
.tab.is-on .n { color: var(--acc); }
.chips { display: flex; gap: 4px; padding: 8px 8px 0; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.chip:hover { background: var(--hover); }
.chip.is-on { background: var(--acc-soft); border-color: var(--acc-line); color: var(--ink); }
.chip img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.search { position: relative; margin: 8px; }
.search input { width: 100%; height: 34px; padding: 0 60px 0 32px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); color: var(--ink); font-size: 13px; }
.search input::placeholder { color: var(--mute); }
.search input:focus { border-color: var(--acc-line); outline: none; }
.search svg { position: absolute; left: 10px; top: 10px; width: 14px; height: 14px; color: var(--mute); }
.search .kbd { position: absolute; right: 8px; top: 8px; }
.rows { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; width: 100%; min-height: 64px; padding: 8px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; }
.row:hover { background: var(--hover); }
.row.is-sel { background: var(--acc-soft); }
.row-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-name { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; min-width: 0; }
.row-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.is-unread .row-name b, .row.is-unread .row-sub { font-weight: 600; color: var(--ink); }
.row-sub { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub.typing { color: var(--acc); font-style: italic; }
.row-meta { font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row-right .t { font-family: var(--f-mono); font-size: 11px; color: var(--mute); }
.empty { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; color: var(--mute); font-size: 13px; }
.empty b { color: var(--ink-2); font-weight: 600; font-size: 14px; }
.empty svg { width: 36px; height: 36px; color: var(--line-2); }

/* центр */
.th-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); min-height: 56px; }
.th-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.th-name b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-name span { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-as { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--raise); font-size: 12.5px; color: var(--ink-2); position: relative; }
.th-as b { color: var(--ink); font-weight: 600; }
.th-as:hover { background: var(--hover); }
.th-tools { display: flex; gap: 4px; align-items: center; }
.toggle { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 8px; border-radius: 8px; border: 0; background: transparent; color: var(--mute); font-size: 12px; }
.toggle:hover { background: var(--hover); color: var(--ink-2); }
.toggle .sw { width: 26px; height: 15px; border-radius: 999px; background: var(--line-2); position: relative; }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--ink-2); transition: left .15s; }
.toggle.is-on .sw { background: var(--acc); }
.toggle.is-on .sw::after { left: 13px; background: #fff; }
.th-body { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.th-msgs { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 72%; padding: 8px 12px; border-radius: 14px; display: flex; flex-direction: column; gap: 3px; }
.msg .big { font-size: 14px; line-height: 1.4; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .sm { font-size: 11.5px; color: var(--mute); line-height: 1.35; overflow-wrap: anywhere; }
.msg .sm i { font-style: normal; font-family: var(--f-mono); font-size: 10px; text-transform: uppercase; color: var(--ink-2); margin-right: 5px; }
.msg .t { font-family: var(--f-mono); font-size: 10px; color: var(--mute); align-self: flex-end; margin-top: 1px; }
.msg-in { align-self: flex-start; background: var(--raise); border-bottom-left-radius: 5px; }
.msg-out { align-self: flex-end; background: var(--acc-soft); border: 1px solid rgba(141, 107, 255, .22); border-bottom-right-radius: 5px; }
.msg-out .sm { color: var(--ink-2); }
.msg-fail { border: 1px solid rgba(255, 191, 71, .4); }
.msg-fail .fail { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--warn); }
.msg-fail .fail button { height: 22px; font-size: 11px; padding: 0 8px; }
.msg-mail { border-color: rgba(255, 191, 71, .35); }
.ev { align-self: center; display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--mute); padding: 2px 10px; }
.ev svg { width: 12px; height: 12px; }
.ev.click { color: var(--gold); }
.ev.buy { color: var(--gold); font-weight: 600; }
.ev .t { font-family: var(--f-mono); font-size: 10px; }
.day { align-self: center; font-family: var(--f-mono); font-size: 10px; color: var(--mute); letter-spacing: .08em; text-transform: uppercase; padding: 6px 0 2px; }
.typing-row { display: flex; align-items: center; gap: 8px; padding: 0 14px 8px; font-size: 12.5px; color: var(--ink-2); font-style: italic; min-height: 26px; }
.typing-row .q { color: var(--mute); font-style: normal; font-size: 11px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--acc); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.newmsg { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); height: 30px; padding: 0 14px; border-radius: 999px; background: var(--acc); color: #fff; border: 0; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.newmsg svg { width: 13px; height: 13px; }
.th-banner { display: flex; align-items: center; gap: 10px; margin: 0 14px 8px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; background: var(--raise); border: 1px solid var(--line-2); color: var(--ink-2); }
.th-banner svg { width: 15px; height: 15px; flex: 0 0 auto; }
.th-banner.warn { background: var(--warn-soft); border-color: rgba(255, 191, 71, .3); color: var(--warn); }
.th-banner.bad { background: var(--bad-soft); border-color: rgba(255, 95, 115, .3); color: var(--bad); }
.th-banner.ok { background: var(--ok-soft); border-color: rgba(67, 217, 155, .3); color: var(--ok); }
.th-banner b { font-weight: 600; }
.th-banner .btn { margin-left: auto; }

/* кубики */
.binds { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); grid-auto-rows: 60px; gap: 8px; padding: 8px 14px; max-height: 144px; overflow-y: auto; }
.tile { position: relative; width: auto; height: 60px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); padding: 14px 8px 8px; display: flex; align-items: center; justify-content: center; text-align: center; transition: background .12s, transform .12s, opacity .2s; user-select: none; }
.tile:hover { background: var(--hover); border-color: var(--acc-line); }
.tile:active { transform: scale(.97); }
.tile .nm { font-size: 12px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile .k { position: absolute; top: 4px; right: 7px; font-family: var(--f-mono); font-size: 9.5px; color: var(--mute); line-height: 1; }
.tile .sc { position: absolute; top: 6px; left: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--acc); }
.tile.is-cool { opacity: .4; pointer-events: none; }
.tile.is-cool::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--acc); border-radius: 0 0 12px 12px; animation: cool 1.5s linear forwards; }
@keyframes cool { from { right: 0; } to { right: 100%; } }
.tile.is-add { border-style: dashed; background: transparent; color: var(--mute); padding: 0; font-size: 22px; font-weight: 300; }
.tile.is-add:hover { color: var(--ink); }
.tile.is-drag { opacity: .35; }
.tile.is-over { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
.compose { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 12px; }
.compose-box { display: flex; align-items: flex-end; gap: 8px; }
.compose textarea { flex: 1 1 auto; min-height: 44px; max-height: 140px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); resize: none; line-height: 1.4; font-size: 14px; }
.compose textarea::placeholder { color: var(--mute); }
.compose textarea:focus { border-color: var(--acc-line); outline: none; }
.compose textarea:disabled { opacity: .5; }
.compose-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--mute); flex-wrap: wrap; }
.lang { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-size: 12px; position: relative; }
.lang b { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink); }
.lang:hover { background: var(--hover); }
.lang.is-manual { border-color: var(--acc-line); }
.compose-foot .hint { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }
.pop { position: absolute; z-index: 30; min-width: 200px; padding: 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 2px; }
.pop button, .pop a { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 13px; text-align: left; }
.pop button:hover, .pop a:hover, .pop .is-on { background: var(--hover); }
.pop .is-sel { background: var(--acc-soft); }
.pop .why { margin-left: auto; font-size: 11px; color: var(--mute); }
.pop b.code { font-family: var(--f-mono); font-size: 11.5px; width: 24px; }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.pop .ttl { font-size: 11px; color: var(--mute); padding: 6px 10px 2px; text-transform: uppercase; letter-spacing: .06em; }
.pop.bad button { color: var(--bad); }
.tip { position: fixed; z-index: 40; max-width: 300px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.tip .l { font-size: 10.5px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.tip .l i { font-style: normal; color: var(--acc); }
.tip .r { color: var(--ink); }
.tip .s { color: var(--ink-2); }
.tip .k { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.slash { position: absolute; left: 14px; right: 14px; bottom: 100%; margin-bottom: 6px; z-index: 30; }
.slash .q { font-size: 12px; color: var(--mute); padding: 4px 10px; }
.slash button { height: 36px; }
.slash button span { color: var(--mute); font-size: 12px; margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(4, 4, 8, .62); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: 100%; max-width: 440px; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.modal.wide { max-width: 640px; }
.modal h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.modal-row { display: flex; gap: 8px; justify-content: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--mute); }
.field > span { display: flex; justify-content: space-between; }
.field input, .field textarea, .field select { width: 100%; height: 36px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); font-size: 13.5px; }
.field textarea { height: auto; min-height: 72px; padding: 9px 11px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--acc-line); outline: none; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); }
.seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 12.5px; }
.seg button.is-on { background: var(--acc-soft); color: var(--ink); font-weight: 600; }
.mtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.mtabs button { height: 34px; padding: 0 12px; border: 0; background: transparent; color: var(--ink-2); font-size: 13px; border-bottom: 2px solid transparent; }
.mtabs button.is-on { color: var(--ink); border-bottom-color: var(--acc); font-weight: 600; }
.tr-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tr-row .code { font-family: var(--f-mono); font-size: 11.5px; color: var(--mute); }
.tr-row input { height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); padding: 0 8px; width: 100%; font-size: 13px; }
.tr-row input:hover { border-color: var(--line-2); background: var(--raise); }
.tr-row .st { font-size: 11px; color: var(--mute); }
.tr-row .st.hand { color: var(--acc); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; padding: 8px 14px; border-radius: 999px; background: var(--raise); border: 1px solid var(--line-2); color: var(--ink); font-size: 12.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* карточка клиента */
.cd { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.cd-block { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.cd-h { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.cd-h .r { margin-left: auto; letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 11px; }
.cd-h .r:empty { display: none; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 3px 10px; font-size: 12.5px; align-items: baseline; }
.kv .k { color: var(--mute); white-space: nowrap; }
.kv .v { color: var(--ink); min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.kv .v.mono { font-size: 12px; }
.cp { position: relative; display: inline-block; max-width: 100%; cursor: copy; border-radius: 5px; padding: 1px 20px 1px 4px; margin: -1px -4px; transition: background .12s; }
.cp::after { content: ""; position: absolute; right: 4px; top: 50%; width: 12px; height: 12px; margin-top: -6px; opacity: 0; background: var(--ink-2); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E") center / contain no-repeat; transition: opacity .12s; }
.cp:hover { background: var(--hover); }
.cp:hover::after { opacity: 1; }
.cp.mono { font-size: 11.5px; }
.cd-who { display: flex; align-items: center; gap: 10px; }
.cd-who input { flex: 1 1 auto; height: 32px; padding: 0 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--raise); color: var(--ink); font-size: 14px; font-weight: 600; min-width: 0; }
.cd-who input::placeholder { color: var(--mute); font-weight: 400; }
.cd-note { width: 100%; min-height: 34px; padding: 7px 9px; border-radius: 9px; border: 1px dashed var(--line-2); background: transparent; color: var(--ink-2); font-size: 12.5px; resize: none; }
.cd-note::placeholder { color: var(--mute); }
.from { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--raise); }
.from .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 12.5px; }
.from .t b { font-weight: 600; }
.from .t span { font-family: var(--f-mono); font-size: 11px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.from .net { margin-left: auto; }
.buyflag { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--gold-soft); border: 1px solid rgba(212, 175, 90, .35); color: var(--gold); font-size: 12.5px; font-weight: 600; }
.buyflag svg { width: 14px; height: 14px; }
/* путь по сайту: лента по заходам */
.path { display: flex; flex-direction: column; }
.path .vh { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); margin: 10px 0 4px; }
.path .vh:first-child { margin-top: 0; }
.path .vh .pill { font-weight: 600; color: var(--ink); }
.path .pr { display: grid; grid-template-columns: 38px 16px 1fr; gap: 0 8px; align-items: center; min-height: 26px; font-size: 12.5px; }
.path .pr .t { font-family: var(--f-mono); font-size: 11px; color: var(--mute); }
.path .pr .i { position: relative; width: 16px; height: 26px; display: flex; align-items: center; justify-content: center; }
.path .pr .i::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--line-2); }
.path .pr.is-first .i::before { top: 50%; }
.path .pr.is-last .i::before { bottom: 50%; }
.path .pr.is-first.is-last .i::before { display: none; }
.path .pr .i i { position: relative; z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: var(--mute); box-shadow: 0 0 0 2px var(--panel); }
.path .pr.click .i i { background: var(--ink-2); }
.path .pr.chat .i i { background: var(--acc); }
.path .pr.buy .i i { background: var(--gold); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--gold-soft); }
.path .pr .w { color: var(--ink-2); overflow-wrap: anywhere; }
.path .pr.page .w { font-family: var(--f-mono); font-size: 11.5px; }
.path .pr.click .w { color: var(--ink); }
.path .pr.chat .w { color: var(--ink); }
.path .pr.buy .w { color: var(--gold); font-weight: 600; }
.cd-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.contact-add { display: flex; gap: 6px; }
.contact-add input { flex: 1 1 auto; height: 30px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--raise); color: var(--ink); font-size: 12.5px; min-width: 0; }
.live { color: var(--ok); font-family: var(--f-mono); }

/* служебные страницы */
.pg-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px 24px 40px; max-width: 1280px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.page-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-h h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.page-h p { margin: 0; color: var(--mute); font-size: 13px; width: 100%; }
.page-h .btn { margin-left: auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.card-h span { color: var(--mute); font-weight: 400; font-size: 12.5px; }
.card-h .btn { margin-left: auto; }
.card-b { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.tbl .who { display: flex; align-items: center; gap: 10px; }
.tbl .who b { font-weight: 600; display: block; }
.tbl .who span { font-size: 12px; color: var(--mute); }
.tbl .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.tbl-wrap { overflow-x: auto; }
.th-as .av-sg, .pop .av-sg { width: 22px; height: 22px; font-size: 7px; }
.avs { display: flex; }
.avs img, .avs .av-sg { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--panel); margin-left: -6px; object-fit: cover; }
.avs img:first-child, .avs .av-sg:first-child { margin-left: 0; }
.sw-btn { display: inline-flex; align-items: center; width: 34px; height: 20px; border-radius: 999px; background: var(--line-2); border: 0; position: relative; padding: 0; }
.sw-btn::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink-2); transition: left .15s; }
.sw-btn.is-on { background: var(--acc); }
.sw-btn.is-on::after { left: 17px; background: #fff; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.srow { display: grid; grid-template-columns: 1.3fr 60px 1.2fr 150px 100px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.srow:last-child { border-bottom: 0; }
.srow .ev-n b { font-weight: 600; display: block; }
.srow .ev-n span { color: var(--mute); font-size: 12px; }
.srow select { height: 32px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); padding: 0 8px; font-size: 13px; width: 100%; }
.srow input[type=range] { width: 100%; accent-color: var(--acc); }
.srow .btn { justify-self: end; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--mute); font-size: 12.5px; text-align: center; }
.drop b { color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.lib { display: flex; flex-direction: column; }
.lib-row { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.lib-row:last-child { border-bottom: 0; }
.lib-row .nm b { font-weight: 500; display: block; }
.lib-row .nm span { font-size: 11.5px; color: var(--mute); font-family: var(--f-mono); }
.play { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--raise); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.play svg { width: 12px; height: 12px; color: var(--ink); }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--acc); margin: 0; }
.num { width: 64px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); text-align: center; font-family: var(--f-mono); font-size: 12.5px; }
.log { display: flex; flex-direction: column; }
.log-row { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.log-row:last-child { border-bottom: 0; }
.log-row .t { font-family: var(--f-mono); font-size: 11px; color: var(--mute); }
.log-row .w b { font-weight: 600; }
.log-row .w span { color: var(--mute); font-family: var(--f-mono); font-size: 11px; margin-left: 6px; }
.radio-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise); cursor: pointer; }
.radio-card.is-on { border-color: var(--acc-line); background: var(--acc-soft); }
.radio-card input { accent-color: var(--acc); }
.radio-card b { font-weight: 600; display: block; font-size: 13.5px; }
.radio-card span { color: var(--mute); font-size: 12px; }
.pages-sel { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-tile { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--raise); }
.agent-tile .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.agent-tile .t b { font-weight: 600; font-size: 14px; }
.agent-tile .t span { font-size: 12px; color: var(--mute); }
.agent-tile .t .pg { font-family: var(--f-mono); font-size: 11px; color: var(--ink-2); }

/* вход */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.login-box { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.login-brand { font-family: var(--f-brand); font-weight: 700; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; text-align: center; margin-bottom: 6px; }
.login-brand span { display: block; margin-top: 6px; font-family: var(--f-ui); font-weight: 400; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--mute); }
.login .field input { height: 42px; font-size: 15px; }
.login .btn { height: 42px; font-size: 14px; border-radius: 10px; }
.login .err { font-size: 12.5px; color: var(--bad); display: flex; gap: 8px; align-items: center; }
.login .err svg { width: 14px; height: 14px; }
.login .code { letter-spacing: .4em; text-align: center; font-family: var(--f-mono); font-size: 20px; }
.login .foot { text-align: center; font-size: 11.5px; color: var(--mute); }

/* телефон */
.dkp { width: 390px; height: 844px; background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
.dkp .dk-top { padding: 0 10px 0 14px; height: 52px; flex-basis: 52px; }
.dkp .col { border-radius: 0; border: 0; border-top: 1px solid var(--line); flex: 1 1 auto; }
.dkp .binds { max-height: 136px; padding: 8px 12px 0; }
.dkp .msg { max-width: 84%; }
.dkp .th-head { padding: 8px 10px; }
.dkp .th-head .back { width: 32px; padding: 0; }
.dkp .cd-block { padding: 12px 14px; }
.dkp-nav { display: flex; border-top: 1px solid var(--line); background: var(--panel); height: 64px; flex: 0 0 64px; padding-bottom: 12px; }
.dkp-nav button { flex: 1 1 0; border: 0; background: transparent; color: var(--mute); font-size: 10.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.dkp-nav button svg { width: 20px; height: 20px; }
.dkp-nav button.is-on { color: var(--acc); }
.dkp-nav .count { position: absolute; margin-left: 20px; margin-top: -26px; }
.dkp .tile { width: auto; }
.dkp .binds { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dkp .compose { padding: 8px 12px 10px; }
.dkp .th-name b { font-size: 14px; }

/* --- добавки панели (вне макета) ------------------------------------------ */
.dk-me { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.15; font-size: 12.5px; color: var(--ink-2); padding: 0 6px; white-space: nowrap; }
.dk-me small { font-size: 10.5px; color: var(--mute); }
.dk-top form { display: inline; }
.dk-main-1 { grid-template-columns: 1fr; }
.login-in { min-height: auto; padding: 48px 24px; }
.login-box.wide { max-width: 520px; }
.login h1 { margin: 0; font-size: 18px; font-weight: 700; }
.login .lead { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.totp-row { display: flex; gap: 16px; align-items: flex-start; }
.totp-row .qr { flex: 0 0 168px; width: 168px; height: 168px; border-radius: 12px; overflow: hidden; background: #fff; }
.totp-row .qr svg { width: 100%; height: 100%; display: block; }
.totp-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.secret { font-family: var(--f-code); font-size: 13px; letter-spacing: .06em; color: var(--ink); background: var(--raise); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; overflow-wrap: anywhere; }
.temp-card { border-color: var(--acc-line); }
.temp-row { display: grid; grid-template-columns: 150px 1fr; gap: 8px; align-items: center; font-size: 13px; }
.temp-row .k { color: var(--mute); }
.temp-row code { font-family: var(--f-mono); font-size: 13px; }
.seg-opt { display: inline-flex; }
.seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg-opt span { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.seg-opt input:checked + span { background: var(--acc-soft); color: var(--ink); font-weight: 600; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--acc); }
.card-b.tight { gap: 0; }
.kv.kv-wide { grid-template-columns: 130px 1fr; }
.toast.error { border-color: rgba(255, 95, 115, .4); color: var(--bad); }
.scrim[hidden] { display: none; }
@media (max-width: 760px) {
  .dk-top { padding: 0 8px 0 12px; gap: 4px; }
  .dk-me { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .pg-main { padding: 14px 12px 32px; }
  .totp-row { flex-direction: column; }
  .temp-row { grid-template-columns: 1fr; gap: 2px; }
}
.grid-agents { grid-template-columns: 1.1fr 1fr; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.agent-tile.is-off { opacity: .55; }
.agent-tile .acts { display: flex; gap: 6px; }
.av-sg.av-lg { width: 48px; height: 48px; font-size: 11px; }
@media (max-width: 760px) { .grid-agents { grid-template-columns: 1fr; } }
.field input[type=file] { height: auto; padding: 7px 10px; font-size: 12.5px; color: var(--ink-2); }

/* --- экран «Разговоры» ---------------------------------------------------------------- */
.th { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.th-head .th-name { background: none; border: 0; padding: 0; text-align: left; flex: 1 1 auto; min-width: 0; cursor: default; color: inherit; }
.th-as-wrap { margin-left: auto; position: relative; flex: 0 0 auto; }
.th-as-wrap .pop { right: 0; top: 36px; min-width: 280px; }
.pop .ttl-note { text-transform: none; letter-spacing: 0; padding-bottom: 6px; }
.th-head .back, .card-head .back { display: none; width: 32px; }
.card-head { border-bottom: 1px solid var(--line); }
.lang { position: relative; cursor: pointer; }
.lang select { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.lang span { color: var(--mute); }
.av-36 { width: 36px; height: 36px; }
.r-btn { margin-left: auto; height: 22px; }
.contacts-form { display: flex; flex-direction: column; gap: 6px; }
.contacts-form input { height: 30px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--raise); color: var(--ink); font-size: 12.5px; }
.contacts-form .modal-row { justify-content: flex-start; }
.ev[hidden] { display: none; }
.dk-main-1 { grid-template-columns: 1fr; }
@media (max-width: 1100px) {
  .dk-main { grid-template-columns: 280px minmax(360px, 1fr) 300px; }
}
@media (max-width: 860px) {
  /* телефон: одна колонка за раз — список, затем переписка, карточка по нажатию на имя */
  .dk-main { grid-template-columns: 1fr; height: calc(100vh - 48px); }
  #col-thread, #col-card { display: none; }
  .dk.has-thread #col-list, .dk .has-thread #col-list { display: none; }
  .has-thread #col-list { display: none; }
  .has-thread #col-thread { display: flex; }
  .has-card #col-thread { display: none; }
  .has-card #col-card { display: flex; }
  .th-head .back, .card-head .back { display: inline-flex; }
  .th-head .th-name { cursor: pointer; }
  .th-tools { display: none; }
  .compose-foot .hint { display: none; }
  .msg { max-width: 86%; }
}

@media (max-width: 860px) {
  .dk-nav a { padding: 0 9px; font-size: 12.5px; }
  .th-head { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .th-as-wrap { margin-left: 0; order: 5; width: 100%; }
  .th-as { width: 100%; justify-content: flex-start; }
  .th-as-wrap .pop { left: 0; right: auto; }
}
.pop.menu { position: fixed; z-index: 45; min-width: 190px; }
.tip { z-index: 44; }
.tile .nm { pointer-events: none; }
.binds .tile { cursor: pointer; }
.grid-sounds { grid-template-columns: 1.5fr 1fr; align-items: start; }
.sw-lab { display: inline-flex; cursor: pointer; }
.sw-lab input { position: absolute; opacity: 0; width: 0; height: 0; }
.num.wide { width: 100%; text-align: left; font-family: var(--f-ui); padding: 0 8px; }
.drop .grid2 { width: 100%; gap: 8px; }
@media (max-width: 860px) { .grid-sounds { grid-template-columns: 1fr; } .srow { grid-template-columns: 1fr 50px; } .srow select, .srow input[type=range] { grid-column: 1 / -1; } }
.check input.num { width: 64px; height: 30px; margin: 0 4px; }
.msg .t .st { color: var(--mute); }
.msg .t .st.is-delivered { color: var(--ink-2); }
.msg .t .st.is-read { color: var(--ok); }

/* --- лента: строка под сообщением, статусы, события ------------------------------------ */
.msg .t { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-ui); font-size: 11px; color: var(--mute); margin-top: 2px; }
.msg .t b { font-weight: 600; color: var(--ink-2); }
.msg-out .t b { color: #c4b1ff; }
.msg .t .st { display: inline-flex; width: 14px; height: 14px; color: var(--mute); position: relative; cursor: help; }
.msg .t .st svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.msg .t .st.is-delivered { color: var(--ink-2); }
.msg .t .st.is-read { color: var(--ok); }
.msg .sm i { font-family: var(--f-ui); font-size: 10px; letter-spacing: .04em; }
.ev { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: transparent; }
.ev svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.ev.window { color: var(--ink-2); }
.ev .t { font-family: var(--f-ui); font-size: 10.5px; color: var(--mute); }
.day { font-family: var(--f-ui); }
.row-right .t, .path .pr .t, .log-row .t, .cd-h .r, .live { font-family: var(--f-ui); font-variant-numeric: tabular-nums; }
.path .pr.window .i i { background: var(--acc); }
.path .pr.window .w { color: var(--ink-2); }

/* --- кубики: одна компактная полоса, листается без видимого ползунка ------------------- */
.binds { display: flex; flex-wrap: nowrap; gap: 6px; padding: 10px 14px 2px; max-height: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
         -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.binds::-webkit-scrollbar { display: none; }
.tile { flex: 0 0 auto; width: auto; min-width: 0; height: 36px; padding: 0 12px 0 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; text-align: left; border-color: var(--line); }
.tile .k { position: static; width: 18px; height: 18px; border-radius: 50%; background: rgba(141, 107, 255, .14); color: #c4b1ff; font: 600 10px/18px var(--f-ui); text-align: center; flex: 0 0 auto; }
.tile .nm { display: block; -webkit-line-clamp: 1; white-space: nowrap; font-size: 12.5px; font-weight: 500; }
.tile .sc { position: static; width: 6px; height: 6px; margin-left: -2px; }
.tile.is-add { padding: 0 12px; font-size: 18px; font-weight: 400; }
.tile.is-cool::after { border-radius: 0 0 999px 999px; }

/* --- галочки как в мессенджерах: одна — отправлено, две — прочитано ---------------------- */
.msg .t .st { width: 20px; height: 14px; }
.msg .t .st svg { width: 20px; height: 14px; stroke-width: 2.4; }
.msg .t .st .c2 { display: none; }
.msg .t .st.is-read .c2 { display: block; }
.msg .t .st.is-read .c1 { opacity: .9; }
.msg .t .st.is-read { color: #4fd08a; }
.msg .t > span { font-weight: 500; font-size: 11.5px; letter-spacing: .01em; color: var(--ink-2); opacity: .75; }
.msg .t b { font-size: 11.5px; }
.row-right .t { font-weight: 500; color: var(--ink-2); opacity: .7; }
.day { font-weight: 600; font-size: 10.5px; color: var(--ink-2); opacity: .7; letter-spacing: .1em; }

/* --- кубики: цифра не проваливается, пилюля приподнята ----------------------------------- */
.tile { background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset; }
.tile:hover { border-color: var(--acc); background: var(--hover); }
.tile .k { width: 20px; height: 20px; background: linear-gradient(160deg, #a58cff, #7c5cff); color: #fff; font: 700 11px/20px var(--f-ui); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.tile .nm { font-weight: 600; color: var(--ink); }
.tile.is-add { border-style: dashed; color: var(--ink-2); background: transparent; }

/* --- карточка клиента: заголовки с иконкой, разная плотность шрифта ------------------------ */
.cd-block { padding: 12px 14px 13px; gap: 8px; }
.cd-h { font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); }
.cd-h .r { font-size: 11.5px; font-weight: 500; }
.cd-h .r.ok { color: var(--ok); }
.cd-h .r.mute { color: var(--mute); }
.cd-h .r.gold { color: var(--gold); }
.kv { grid-template-columns: 128px 1fr; gap: 6px 10px; }
.kv .k { font-size: 12.5px; font-weight: 500; color: var(--mute); }
.kv .v { font-size: 13px; font-weight: 400; color: var(--ink); line-height: 1.35; }
.kv .v .strong { font-weight: 600; font-size: 13.5px; }
.kv .v .digits { font-weight: 500; letter-spacing: .02em; }
.kv .v .ok { color: var(--ok); font-weight: 500; }
.kv .v .gold { color: var(--gold); font-weight: 600; }
.kv .v .mono { font-size: 13px; }
.live { font-weight: 600; font-size: 13.5px; }
.cd-who input { font-weight: 600; }
.cd-note { font-size: 12.5px; }
.from { padding: 9px 10px; gap: 11px; border: 1px solid var(--line); }
.from .t b { font-size: 13.5px; font-weight: 700; }
.from .t span { font-family: var(--f-ui); font-size: 11.5px; font-weight: 500; color: var(--ink-2); opacity: .8; }
.path .vh { font-weight: 500; }
.path .pr .t { font-weight: 500; }
.path .pr.page .w { font-family: var(--f-ui); font-size: 12px; font-weight: 400; color: var(--ink-2); }
.path .pr.click .w, .path .pr.chat .w { font-weight: 500; }
/* цифры обычной ширины: табличные делали «1 7:12» с дырой после единицы */
body, .row-right .t, .path .pr .t, .log-row .t, .cd-h .r, .live, .mono, .msg .t { font-variant-numeric: proportional-nums; }

/* --- карточка: разделы сворачиваются, эмодзи Noto (анимация по наведению) --------------- */
.em { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: -5px; object-fit: contain; image-rendering: auto; }
.cd-h { cursor: pointer; user-select: none; margin: -4px -6px; padding: 4px 6px; border-radius: 9px; }
.cd-h:hover { background: var(--hover); }
.cd-h:focus-visible { outline: 2px solid var(--acc-line); outline-offset: 0; }
.cd-h .em { width: 24px; height: 24px; margin-right: 2px; }
.cd-h .tt { font-weight: 700; }
.cd-h .r { margin-left: auto; }
.cd-h .chev { width: 16px; height: 16px; flex: 0 0 auto; color: var(--mute); transition: transform .18s; margin-left: 6px; }
.cd-h .r:empty + .chev, .cd-h .tt + .chev { margin-left: auto; }
.cd-h .r-btn { margin-left: auto; }
.cd-h .r-btn + .chev { margin-left: 6px; }
#card .cd-block.is-closed > :not(.cd-h) { display: none; }   /* #card в селекторе: перебивает #device { display: inline-flex } */
.cd-block.is-closed .cd-h .chev { transform: rotate(-90deg); }
.cd-block.is-closed { padding-bottom: 12px; }
.kv .k { display: inline-flex; align-items: center; gap: 7px; }
.kv .k .em { width: 18px; height: 18px; }
#device { display: inline-flex; align-items: center; gap: 7px; }

/* кубики не обрезаются снизу: полоса не сжимается вместе с лентой */
.binds { flex: 0 0 auto; height: 50px; box-sizing: border-box; padding: 8px 14px 6px; align-items: center; }
.compose { flex: 0 0 auto; }
.dkp .binds { max-height: none; padding: 8px 12px 6px; }
