/* Alibry Web 0.3 — собственное оформление Alibry. Основной цвет — синий колибри #096BB4. */
:root {
  --brand: #096bb4;
  --brand-2: #0a5a96;
  --brand-ink: #ffffff;
  --brand-soft: #e3f0fb;
  --bg: #ffffff;
  --bg-2: #f4f6f9;
  --bg-3: #e9edf2;
  --chat-bg: #eef3f8;
  --ink: #14181d;
  --ink-2: #5b6573;
  --ink-3: #8a94a1;
  --line: #e1e6ec;
  --own: #d6e9fa;
  --other: #ffffff;
  --tick-read: #0b7fd6;
  --danger: #c62828;
  --ok: #2e9d57;
  --shadow: 0 6px 24px rgba(16, 32, 56, 0.14);
  --fs: 15px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #6fb3ea;
    --brand-2: #8cc4f0;
    --brand-ink: #062a4a;
    --brand-soft: #14324d;
    --bg: #11151a;
    --bg-2: #171c22;
    --bg-3: #212831;
    --chat-bg: #0c1117;
    --ink: #e4e8ed;
    --ink-2: #a3adb9;
    --ink-3: #78828e;
    --line: #262d36;
    --own: #164067;
    --other: #1e252d;
    --tick-read: #7cc3ff;
    --danger: #ef8a8a;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #6fb3ea;
  --brand-2: #8cc4f0;
  --brand-ink: #062a4a;
  --brand-soft: #14324d;
  --bg: #11151a;
  --bg-2: #171c22;
  --bg-3: #212831;
  --chat-bg: #0c1117;
  --ink: #e4e8ed;
  --ink-2: #a3adb9;
  --ink-3: #78828e;
  --line: #262d36;
  --own: #164067;
  --other: #1e252d;
  --tick-read: #7cc3ff;
  --danger: #ef8a8a;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
:root[data-font="s"] { --fs: 14px; }
:root[data-font="l"] { --fs: 17px; }

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: var(--fs)/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .45; cursor: default; }
a { color: var(--brand); }
input, textarea {
  font: inherit; color: var(--ink); background: var(--bg); width: 100%;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none;
}
input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.ic { flex: none; display: block; }
.row { display: flex; align-items: center; min-width: 0; }
.col { display: flex; flex-direction: column; min-width: 0; }
.gap { gap: 10px; }
.wrap { flex-wrap: wrap; }
.end { justify-content: flex-end; }
.center { align-self: center; text-align: center; }
.grow { flex: 1; min-width: 0; }
.pad { padding: 16px; }
.pad-x { padding: 8px 16px; }
.pre { white-space: pre-wrap; }
.small { font-size: 12px; }
.accent { color: var(--brand); }
.danger { color: var(--danger) !important; }
.hint { color: var(--ink-2); font-size: 13px; text-align: center; }
.hint.left, .hint-left { text-align: start; color: var(--ink-2); font-size: 13px; }
.error { color: var(--danger); text-align: center; }
.label { color: var(--ink-2); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.primary { background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 9px 18px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.primary:hover:not(:disabled) { background: var(--brand-2); }
.primary.big { width: 100%; padding: 12px; font-size: 16px; }
.outline { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; flex: none; }
.outline:hover:not(:disabled) { background: var(--bg-2); }
.link { color: var(--brand); padding: 6px 8px; border-radius: 8px; font-weight: 600; }
.link:hover { background: var(--bg-2); }
.link.sm { font-size: 13px; padding: 4px 6px; }
.danger-btn { background: var(--danger); color: #fff; border-radius: 999px; padding: 9px 18px; font-weight: 600; }
.icon { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink-2); flex: none; }
.icon:hover:not(:disabled), .icon.on { background: var(--bg-3); color: var(--ink); }
.icon.sm { width: 30px; height: 30px; }
.icon.light { color: #fff; }
.icon.light:hover { background: rgba(255,255,255,.15); color: #fff; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 13.5px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--ink-2); }
.chip:hover { background: var(--bg-2); }
.chip.on { background: var(--brand-soft); border-color: transparent; color: var(--brand); font-weight: 600; }
.avatar { border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 600; flex: none; overflow: hidden; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.click { cursor: pointer; }
.avatar.ghost { background: var(--bg-3); color: var(--ink-2); }
.avatar.brand { background: var(--brand); color: var(--brand-ink); }
.logo { display: block; }
.spinner { width: 20px; height: 20px; border: 2.5px solid color-mix(in srgb, var(--brand) 25%, transparent); border-top-color: var(--brand); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
.spinner.light { border-color: rgba(255,255,255,.3); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.switch { appearance: none; width: 40px !important; height: 22px !important; border-radius: 999px; background: var(--bg-3); position: relative; cursor: pointer; transition: background .15s; border: 0 !important; box-shadow: none !important; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: inset-inline-start .15s; }
.switch:checked { background: var(--brand); }
.switch:checked::after { inset-inline-start: 21px; }
.toggle-row, .panel label.toggle-row { display: flex; flex-direction: row; align-items: center; gap: 12px; cursor: pointer; padding: 6px 0; width: 100%; color: var(--ink); font-size: inherit; }
.toggle-row small { color: var(--ink-2); font-size: 12px; }

/* заставка и вход */
.splash { height: 100%; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--ink-2); }
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--brand-soft), var(--bg-2)); }
.login-card { width: min(420px, 100%); background: var(--bg); border-radius: 24px; padding: 32px 28px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.login-card h1 { margin: 4px 0 0; color: var(--brand); font-size: 28px; }
.login-card h2 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.login-card label { width: 100%; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.pw { position: relative; }
.pw input { padding-inline-end: 92px; }
.pw .link { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); }

/* каркас */
.app { height: 100%; display: grid; grid-template-columns: 64px minmax(320px, 400px) 1fr; background: var(--bg); }
.app.has-info { grid-template-columns: 64px minmax(320px, 400px) 1fr minmax(320px, 380px); }
.rail { background: var(--bg-2); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; }
.rail-btn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); position: relative; }
.rail-btn:hover { background: var(--bg-3); color: var(--ink); }
.rail-btn.on { background: var(--brand-soft); color: var(--brand); }
.rail-badge { position: absolute; top: 2px; inset-inline-end: 0; background: var(--brand); color: var(--brand-ink); font-size: 10px; font-weight: 700; border-radius: 999px; padding: 0 5px; min-width: 16px; line-height: 16px; text-align: center; }
.rail-me { margin-top: 6px; border-radius: 50%; }
.side { border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); }
.side-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tabs { display: none; }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--chat-bg); }
.info { border-inline-start: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column; background: var(--bg-2); }
.welcome { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; padding: 24px; color: var(--ink-2); border-bottom: 6px solid var(--brand); }
.welcome h2 { margin: 6px 0 0; color: var(--ink); font-weight: 600; font-size: 26px; }
.welcome p { max-width: 460px; margin: 0; }
.welcome small { margin-top: 30px; }

/* панели */
.panel { display: flex; flex-direction: column; min-height: 0; flex: 1; position: relative; }
.panel-head { display: flex; align-items: center; gap: 10px; padding-block: 12px 8px; padding-inline: 16px 12px; min-height: 60px; }
.panel-head h1 { font-size: 20px; margin: 0; font-weight: 700; }
.panel-foot { padding: 12px 16px; border-top: 1px solid var(--line); }
.banner { background: var(--brand-soft); color: var(--ink); font-size: 13px; padding: 6px 16px; }
.search { display: flex; align-items: center; gap: 8px; margin: 2px 12px 8px; padding: 0 10px; background: var(--bg-2); border-radius: 10px; color: var(--ink-3); }
.search input { border: 0; background: transparent; padding: 9px 2px; box-shadow: none !important; }
.filters { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.rooms { overflow-y: auto; flex: 1; padding-bottom: 12px; }
.section-label { color: var(--brand); font-size: 13px; font-weight: 600; padding: 14px 16px 6px; }
.empty { color: var(--ink-2); text-align: center; padding: 40px 24px; white-space: pre-line; display: grid; justify-items: center; gap: 6px; }
.room { width: 100%; display: flex; gap: 12px; align-items: center; padding-block: 9px 9px; padding-inline: 14px 12px; text-align: start; cursor: pointer; position: relative; }
.room:hover { background: var(--bg-2); }
.room.active { background: var(--brand-soft); }
.room > .col { gap: 2px; }
.room .row { gap: 4px; }
.room .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .name.bold { font-weight: 700; }
.room .time { font-size: 12px; color: var(--ink-3); margin-inline-start: 8px; flex: none; }
.room .time.accent { color: var(--brand); font-weight: 600; }
.room .last { color: var(--ink-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.room small { color: var(--ink-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room.pick { cursor: pointer; }
.muted-ic { color: var(--ink-3); }
.count { background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 0 6px; min-width: 20px; line-height: 20px; text-align: center; flex: none; }
.count.grey { background: var(--ink-3); color: var(--bg); }
.count.dot { min-width: 12px; width: 12px; height: 12px; padding: 0; line-height: 12px; }
.at-badge { background: var(--brand); color: var(--brand-ink); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.row-more { width: 0; overflow: hidden; color: var(--ink-3); transition: width .12s; flex: none; }
.room:hover .row-more { width: 22px; }
.archive-row .name { font-weight: 600; }
.action-row .name { font-weight: 600; }
.e2ee-foot { color: var(--ink-3); font-size: 12px; display: flex; gap: 6px; align-items: center; justify-content: center; padding: 18px 16px; }
.invite { margin: 6px 10px; padding: 12px; background: var(--brand-soft); border-radius: 14px; display: flex; flex-direction: column; gap: 10px; }
.tick { color: var(--ink-3); }
.tick.read { color: var(--tick-read); }
.tick.fail { color: var(--danger); }

/* всплывающие меню */
.popup-bg { position: fixed; inset: 0; z-index: 40; }
.popup { position: fixed; z-index: 41; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; min-width: 220px; max-width: calc(100vw - 16px); animation: pop .12s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
.popup > button { text-align: start; padding: 9px 12px; border-radius: 8px; display: flex; align-items: center; gap: 12px; color: var(--ink); }
.popup > button .ic { color: var(--ink-2); }
.popup > button.danger .ic { color: var(--danger); }
.popup > button:hover:not(:disabled) { background: var(--bg-2); }
.popup-title { font-size: 13px; color: var(--ink-2); padding: 6px 12px; }
.msg-menu .quick { display: flex; gap: 2px; padding: 2px 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.msg-menu .quick button { font-size: 22px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; transition: transform .1s; }
.msg-menu .quick button:hover { background: var(--bg-2); transform: scale(1.15); }
.msg-menu .quick .more-react { color: var(--ink-2); background: var(--bg-2); }
.picker-pop { padding: 0; }
.attach-menu > button { gap: 12px; }
.att-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff !important; flex: none; }
.att-ic .ic { color: #fff !important; }
.att-ic.photo { background: #3d7fd6; }
.att-ic.doc { background: #7a59c9; }
.att-ic.poll { background: #c9822a; }
.att-ic.loc { background: #2e9d6b; }
.att-ic.contact { background: #2a8fb5; }

/* эмодзи */
.emoji-picker { width: 352px; max-width: calc(100vw - 24px); display: flex; flex-direction: column; }
.emoji-cats { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.emoji-cats button { font-size: 18px; width: 34px; height: 32px; border-radius: 8px; flex: none; opacity: .65; }
.emoji-cats button.on { background: var(--brand-soft); opacity: 1; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; padding: 6px; max-height: 240px; overflow-y: auto; }
.emoji-grid button { font-size: 24px; height: 40px; border-radius: 8px; }
.emoji-grid button:hover { background: var(--bg-2); }
.emoji-picker.compact .emoji-grid { max-height: 220px; }
.emoji-panel { border-bottom: 1px solid var(--line); margin: 0 -12px 8px; }
.emoji-panel .emoji-picker { width: 100%; }

/* чат */
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; flex: 1; position: relative; }
.chat-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--bg); border-bottom: 1px solid var(--line); min-height: 60px; }
.chat-head .back { display: none; }
.head-who { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: start; padding-block: 4px 4px; padding-inline: 4px 8px; border-radius: 10px; }
.head-who:hover { background: var(--bg-2); }
.head-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-who small { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-who small.accent { color: var(--brand); }
.chat-search { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--bg); border-bottom: 1px solid var(--line); color: var(--ink-3); }
.chat-search input { border: 0; background: var(--bg-2); border-radius: 8px; padding: 7px 10px; box-shadow: none !important; }
.chat-search small { color: var(--ink-2); white-space: nowrap; }
.pinned-bar { display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: var(--bg); border-bottom: 1px solid var(--line); cursor: pointer; color: var(--ink-2); }
.pinned-bar .clip { color: var(--ink); font-size: 14px; }
.pin-marks { display: flex; flex-direction: column; gap: 2px; align-self: stretch; justify-content: center; }
.pin-marks i { width: 3px; height: 8px; border-radius: 2px; background: var(--line); }
.pin-marks i.on { background: var(--brand); }
.chat-body { flex: 1; min-height: 0; position: relative; display: flex; }
.chat-body::before { content: ""; position: absolute; inset: 0; background: url("alibry-logo.svg") 0 0 / 74px auto repeat; opacity: .035; pointer-events: none; }
.timeline { flex: 1; overflow-y: auto; padding: 10px 6% 14px; position: relative; overscroll-behavior: contain; }
.day { text-align: center; margin: 12px 0 8px; position: sticky; top: 4px; z-index: 2; }
.day span { background: var(--bg); color: var(--ink-2); border-radius: 8px; padding: 4px 12px; font-size: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.notice { text-align: center; margin: 8px 24px; }
.notice span { display: inline-block; background: color-mix(in srgb, var(--bg) 85%, transparent); color: var(--ink-2); border-radius: 8px; padding: 4px 12px; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.system-card { margin: 8px auto 14px; max-width: 520px; background: color-mix(in srgb, #f6e7a8 70%, var(--bg)); color: #5d4a12; font-size: 13px; border-radius: 10px; padding: 8px 12px; text-align: center; display: flex; gap: 8px; align-items: flex-start; }
:root[data-theme="dark"] .system-card { background: #2c2a1c; color: #e0cf8a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .system-card { background: #2c2a1c; color: #e0cf8a; } }
.unread-sep { text-align: center; margin: 10px -6%; background: color-mix(in srgb, var(--bg) 70%, transparent); padding: 4px; }
.unread-sep span { color: var(--brand); font-size: 13px; font-weight: 600; }
.msg { display: flex; flex-direction: column; align-items: flex-start; margin-top: 8px; position: relative; }
.msg.grouped { margin-top: 2px; }
.msg.own { align-items: flex-end; }
.msg.flash .bubble { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 45%, transparent); } }
.bubble-row { display: flex; align-items: flex-end; gap: 6px; position: relative; max-width: min(620px, 78%); transition: transform .05s; }
.msg.own .bubble-row { flex-direction: row-reverse; }
.av-gap { width: 30px; flex: none; }
.swipe-reply { position: absolute; inset-inline-start: -30px; top: 50%; transform: translateY(-50%); color: var(--brand); }
.bubble { background: var(--other); border-radius: 10px; padding: 6px 9px 4px; min-width: 70px; box-shadow: 0 1px 1.5px rgba(16, 32, 56, .1); position: relative; max-width: 100%; }
.bubble.tail { border-start-start-radius: 2px; }
.msg.own .bubble { background: var(--own); }
.msg.own .bubble.tail { border-start-start-radius: 10px; border-start-end-radius: 2px; }
.msg.mentioned .bubble { box-shadow: inset 3px 0 0 var(--brand), 0 1px 1.5px rgba(16, 32, 56, .1); }
.bubble.media { padding: 3px 3px 4px; }
.bubble.media .text, .bubble.media .fwd, .bubble.media .sender, .bubble.media .quote { margin-inline-start: 6px; margin-inline-end: 6px; }
.bubble.sticker-b { background: transparent; box-shadow: none; }
.bubble.muted .text { color: var(--ink-2); font-style: italic; display: flex; gap: 6px; align-items: center; }
.sender { font-size: 13px; font-weight: 600; margin-bottom: 1px; }
.fwd { font-size: 12px; color: var(--ink-3); font-style: italic; display: flex; gap: 4px; align-items: center; margin-bottom: 2px; }
.text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.text.big-emoji { font-size: 40px; line-height: 1.2; }
.text.emote { font-style: italic; }
.text code { background: var(--bg-3); border-radius: 4px; padding: 0 4px; font: 0.9em ui-monospace, Consolas, monospace; }
.text pre { background: var(--bg-3); border-radius: 6px; padding: 8px; margin: 4px 0; overflow-x: auto; white-space: pre; }
.text pre code { background: none; padding: 0; }
.text blockquote { border-inline-start: 3px solid var(--ink-3); margin: 2px 0; padding-inline-start: 8px; color: var(--ink-2); }
.text ul, .text ol { margin: 2px 0; padding-inline-start: 22px; }
.text mark { background: #ffe58a; color: inherit; border-radius: 2px; }
.mention { color: var(--brand); font-weight: 600; cursor: pointer; }
.mention.me { background: var(--brand-soft); border-radius: 4px; padding: 0 3px; }
.meta { font-size: 11px; color: var(--ink-3); display: flex; gap: 3px; align-items: center; justify-content: flex-end; margin-block: 1px 0; margin-inline: 12px 0; float: right; position: relative; top: 5px; white-space: nowrap; }
.bubble.media .meta { float: none; position: static; margin: 2px 6px 0; }
.star-ic { color: var(--ink-3); }
.bubble-more { position: absolute; top: 2px; inset-inline-end: 2px; width: 26px; height: 22px; border-start-start-radius: 0; border-start-end-radius: 8px; border-end-end-radius: 0; border-end-start-radius: 10px; display: grid; place-items: center; color: var(--ink-2); background: linear-gradient(to left, var(--other) 60%, transparent); opacity: 0; transition: opacity .12s; }
.msg.own .bubble-more { background: linear-gradient(to left, var(--own) 60%, transparent); }
.bubble:hover .bubble-more { opacity: 1; }
/* 0.5.2: невидимая стрелка меню не перехватывает нажатия; у голосового справа место под стрелку — кнопка скорости не закрыта */
.bubble-more { pointer-events: none; }
.bubble:hover .bubble-more { pointer-events: auto; }
.bubble .voice { padding-inline-end: 28px; }
.react-btn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); background: color-mix(in srgb, var(--bg) 80%, transparent); opacity: 0; transition: opacity .12s; flex: none; }
.bubble-row:hover .react-btn { opacity: 1; }
.quote { display: flex; flex-direction: column; text-align: start; width: 100%; border-inline-start: 3px solid var(--brand); background: color-mix(in srgb, var(--ink) 5%, transparent); border-radius: 6px; padding: 4px 8px; margin: 2px 0 5px; font-size: 13px; }
.quote b { color: var(--brand); font-size: 12.5px; }
.quote span { color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.quote.edit { border-inline-start-color: var(--ok); }
.quote.edit b { color: var(--ok); }
.reactions { display: flex; gap: 4px; flex-wrap: wrap; margin: -6px 10px 0; position: relative; z-index: 1; }
.msg.own .reactions { justify-content: flex-end; }
.reaction { background: var(--bg); border-radius: 999px; padding: 1px 8px; font-size: 14px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.08); display: flex; gap: 3px; align-items: center; }
.reaction span { font-size: 12px; color: var(--ink-2); }
.reaction.mine { background: var(--brand-soft); border-color: var(--brand); }
.media-box { display: block; position: relative; border-radius: 8px; overflow: hidden; background: var(--bg-3); max-width: 100%; }
.media-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); font-size: 13px; }
.play-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; }
.media-dur { position: absolute; inset-inline-start: 6px; bottom: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; border-radius: 6px; padding: 1px 6px; }
.media-video { display: block; border-radius: 8px; max-width: 100%; }
.sticker img { max-width: 180px; max-height: 180px; }
.voice { display: flex; align-items: center; gap: 10px; min-width: 240px; padding: 4px 2px; }
.voice-play { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.wave { flex: 1; height: 30px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.wave span { flex: 1; min-width: 2px; background: var(--ink-3); border-radius: 2px; opacity: .55; }
.wave span.on { background: var(--brand); opacity: 1; }
.voice-side { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.speed { font-size: 11px; font-weight: 700; background: var(--bg-3); border-radius: 999px; padding: 1px 6px; }
.voice-time { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.file-card { display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--ink) 5%, transparent); border-radius: 8px; padding: 8px 10px; min-width: 240px; max-width: 360px; text-align: start; }
.file-card.static { cursor: default; }
.file-ic { position: relative; color: var(--brand); display: grid; place-items: center; }
.file-ic small { position: absolute; bottom: -2px; font-size: 8px; font-weight: 800; background: var(--brand); color: var(--brand-ink); border-radius: 3px; padding: 0 2px; }
.file-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card small { color: var(--ink-2); font-size: 12px; }
.file-dl { color: var(--ink-2); }
.to-bottom { position: absolute; inset-inline-end: 18px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); color: var(--ink-2); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 3; }
.to-bottom .count { position: absolute; top: -6px; inset-inline-end: -4px; }
.drop-zone { position: absolute; inset: 10px; border: 3px dashed var(--brand); border-radius: 16px; background: color-mix(in srgb, var(--brand-soft) 85%, transparent); display: grid; place-items: center; font-size: 18px; color: var(--brand); font-weight: 600; z-index: 5; }
.uploads { padding: 6px 12px; background: var(--bg); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.upload { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.upload .bar { width: 120px; height: 4px; border-radius: 2px; background: var(--bg-3); overflow: hidden; flex: none; }
.upload .bar i { display: block; height: 100%; background: var(--brand); }

/* поле ввода */
.composer { padding: 8px 12px 10px; background: var(--bg-2); border-top: 1px solid var(--line); position: relative; }
.composer.readonly { text-align: center; color: var(--ink-2); padding: 16px; }
.comp-row, .rec-row { gap: 6px; align-items: flex-end; }
.comp-row textarea { resize: none; max-height: 160px; border-radius: 22px; padding: 10px 16px; line-height: 1.35; background: var(--bg); border-color: transparent; }
/* как в WhatsApp: эмодзи, текст, скрепка и камера — в одном округлом поле */
.comp-pill { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 0; background: var(--bg); border-radius: 24px; padding: 2px 4px; box-shadow: 0 1px 1px rgb(0 0 0 / 8%); }
.comp-pill textarea { flex: 1; min-width: 0; padding: 10px 6px; background: transparent; border: 0; box-shadow: none !important; }
.comp-pill .icon { color: var(--ink-2); }
.only-mobile { display: none !important; }
.brand-title { color: var(--brand); font-size: 22px !important; }
.fab { position: absolute; inset-inline-end: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; box-shadow: 0 4px 12px rgb(0 0 0 / 22%); z-index: 3; }
.upd { padding: 4px 16px 16px; }
.upd h3 { font-size: 16px; margin: 16px 0 8px; }
.upd p { color: var(--ink-2); margin: 4px 0 12px; }
.upd-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.comm-new { padding: 12px 16px; cursor: default; }
.upd-ava { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.upd-ava.sq { border-radius: 14px; }
.upd-ava i { position: absolute; inset-inline-end: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-style: normal; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); font-size: 14px; line-height: 1; }
.upd-row .col { display: flex; flex-direction: column; }
.upd-row small { color: var(--ink-2); }
.accent { color: var(--brand); }
button.pill { border-radius: 20px; padding: 8px 18px; }
.send-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.send-btn:hover:not(:disabled) { background: var(--brand-2); }
.rec-row { align-items: center; padding: 2px 0; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e53935; animation: blink 1s infinite; margin-inline-start: 6px; }
@keyframes blink { 50% { opacity: .2; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.context { display: flex; align-items: center; gap: 8px; padding: 0 0 8px; }
.context .quote { margin: 0; background: var(--bg); }
.mention-pop { position: absolute; bottom: 100%; inset-inline-start: 60px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; min-width: 260px; z-index: 6; }
.mention-pop button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; text-align: start; }
.mention-pop button:hover, .mention-pop button:first-child { background: var(--bg-2); }
.mention-pop small { color: var(--ink-3); margin-inline-start: auto; font-size: 12px; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* окна */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 16, 28, .45); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--bg); border-radius: 18px; padding: 20px; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.modal h3 { margin: 0; font-size: 18px; }
.modal p { margin: 0; color: var(--ink-2); }
.modal label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.confirm-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.check-row { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--ink) !important; font-size: 14px !important; }
.send-files .previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; }
.send-files .previews img, .send-files .previews video { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; background: var(--bg-3); }
.send-files .previews .file-card { grid-column: 1 / -1; max-width: none; }
.fwd-modal { width: min(480px, 100%); }
.fwd-preview { background: var(--bg-2); border-radius: 10px; padding: 8px 12px; color: var(--ink-2); font-size: 14px; }
.pick-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; }
.pick-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px !important; padding: 7px 4px; border-radius: 10px; color: var(--ink) !important; font-size: 15px !important; cursor: pointer; }
.pick-row:hover { background: var(--bg-2); }
.pick-row.static { cursor: default; }
.pick-row.static:hover { background: none; }
.pick-row small { color: var(--ink-3); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1f2a36; color: #fff; border-radius: 10px; padding: 10px 18px; z-index: 60; box-shadow: var(--shadow); font-size: 14px; max-width: calc(100vw - 32px); animation: fade .15s; }
.lightbox { position: fixed; inset: 0; background: rgba(6, 10, 16, .94); z-index: 55; display: flex; flex-direction: column; color: #fff; }
.lb-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.lb-head small { color: rgba(255,255,255,.7); }
.lb-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: 10px 24px 24px; }
.lb-body img, .lb-body video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }

/* сведения */
.info-panel .panel-head { background: var(--bg); border-bottom: 1px solid var(--line); }
.info-scroll { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 10px 0 24px; }
.info-card { background: var(--bg); padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.info-card.hero { align-items: center; text-align: center; padding: 22px 18px; }
.info-card.list { padding: 6px 0; gap: 0; }
.info-card .label { font-weight: 500; }
.big-avatar { position: relative; border-radius: 50%; cursor: default; }
.big-avatar .avatar-edit { position: absolute; inset: 0; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; cursor: pointer; }
.big-avatar:hover .avatar-edit { opacity: 1; }
.info-name { margin: 8px 0 0; font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.info-sub { color: var(--ink-2); font-size: 14px; }
.info-actions { display: flex; gap: 10px; margin-top: 12px; }
.info-actions button { width: 92px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--brand); font-size: 13px; }
.info-actions button:hover:not(:disabled) { background: var(--bg-2); }
.info-row { display: flex; align-items: center; gap: 14px; padding: 10px 18px; text-align: start; width: 100%; color: var(--ink); }
.info-row .ic { color: var(--ink-2); }
.info-row.danger .ic { color: var(--danger); }
button.info-row:hover { background: var(--bg-2); }
.info-row.disabled { opacity: .5; }
.info-row small { color: var(--ink-2); font-size: 12px; }
.info-row .toggle-row { padding: 0; }
.info-row.member { padding: 8px 18px; }
.badge-soft { background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 6px; }
.media-thumb { aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--bg-3); position: relative; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.play-mini { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }

/* настройки и прочие панели */
.settings-scroll { overflow-y: auto; flex: 1; }
.set-me { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; text-align: start; border-bottom: 1px solid var(--line); }
.set-me:hover { background: var(--bg-2); }
.set-me small { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; width: 100%; text-align: start; color: var(--ink); }
.set-row .ic { color: var(--ink-2); }
.set-row small { color: var(--ink-2); font-size: 13px; }
button.set-row:hover:not(:disabled), label.set-row:hover { background: var(--bg-2); cursor: pointer; }
.set-row.static { cursor: default; }
.set-row.danger .ic { color: var(--danger); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.panel label small { color: var(--ink-3); }
.licenses { margin: 0; padding-inline-start: 18px; color: var(--ink-2); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.lic-page input[type="search"] { width: 100%; box-sizing: border-box; }
.lic-group { gap: 2px; }
.lic-item { border-bottom: 1px solid var(--line); }
.lic-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 2px; border: 0; background: transparent; color: inherit; text-align: start; font: inherit; cursor: pointer; }
.lic-row small { color: var(--ink-2); }
.lic-body { display: flex; flex-direction: column; gap: 8px; padding: 0 2px 12px; }
.lic-body .link { word-break: break-all; }
.lic-body pre { margin: 0; padding: 10px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.45; background: var(--bg-2); border-radius: 8px; color: var(--ink); }
.group-photo { width: 120px; height: 120px; border-radius: 50%; background: var(--bg-3); color: var(--ink-2); display: grid; place-items: center; align-self: center; overflow: hidden; }
.group-photo img { width: 100%; height: 100%; object-fit: cover; }
.starred-item { position: relative; padding: 10px 16px 10px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.starred-item:hover { background: var(--bg-2); }
.starred-item small { color: var(--ink-2); font-size: 12px; }
.starred-body { background: var(--own); border-radius: 8px; padding: 6px 10px; align-self: flex-start; max-width: 90%; white-space: pre-wrap; overflow-wrap: anywhere; }
.starred-item .icon { position: absolute; inset-inline-end: 8px; bottom: 6px; color: var(--ink-3); }
.call-line { display: flex; align-items: center; gap: 4px; color: var(--ink-2) !important; }
.soon { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 24px; color: var(--ink-2); }
.soon h3 { margin: 6px 0 0; color: var(--ink); }
.soon p { margin: 0; max-width: 300px; }
.soon small { color: var(--brand); font-weight: 600; }

/* звонок */
.call-overlay { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: rgba(6, 30, 52, .55); backdrop-filter: blur(6px); padding: 16px; }
.call-card { width: min(360px, 100%); background: linear-gradient(180deg, #0b5c9b, #073e69); color: #fff; border-radius: 28px; padding: 36px 24px 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.call-avatar { border-radius: 50%; padding: 6px; }
.call-avatar.pulse { animation: callpulse 1.6s ease-out infinite; }
@keyframes callpulse { 0% { box-shadow: 0 0 0 0 rgba(140,196,240,.7); } 100% { box-shadow: 0 0 0 26px rgba(140,196,240,0); } }
.call-name { font-size: 22px; font-weight: 700; margin-top: 8px; text-align: center; }
.call-status { font-size: 15px; opacity: .85; min-height: 20px; font-variant-numeric: tabular-nums; }
.call-hint { font-size: 13px; opacity: .75; max-width: 300px; text-align: center; margin: 4px auto 0; line-height: 1.35; }
.call-actions { display: flex; gap: 28px; margin: 22px 0 18px; }
.call-btn { width: 68px; height: 68px; border-radius: 50%; font-size: 26px; display: grid; place-items: center; position: relative; color: #fff; background: rgba(255,255,255,.18); }
.call-btn span { position: absolute; top: 76px; font-size: 12px; white-space: nowrap; opacity: .9; }
.call-btn.accept { background: #2e9d57; }
.call-btn.decline { background: #d93a3a; }
.call-btn.mute.on { background: #fff; color: #073e69; }
.call-btn.neutral { background: rgba(255,255,255,.25); }

/* средний экран: без сведений сбоку — поверх */
@media (max-width: 1180px) {
  .app.has-info { grid-template-columns: 64px minmax(300px, 360px) 1fr; }
  .app.has-info .info { position: fixed; inset-inline-end: 0; top: 0; bottom: 0; width: min(380px, 100%); z-index: 30; box-shadow: var(--shadow); }
}
/* узкий экран: либо список, либо чат; вкладки внизу */
@media (max-width: 760px) {
  .app, .app.has-info { grid-template-columns: 1fr; }
  .rail { display: none; }
  .tabs { display: flex; border-top: 1px solid var(--line); background: var(--bg); }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 8px; font-size: 12px; color: var(--ink-2); }
  .tab-ic { position: relative; width: 56px; height: 30px; border-radius: 999px; display: grid; place-items: center; }
  .tab.on .tab-ic { background: var(--brand-soft); color: var(--brand); }
  .tab.on { color: var(--ink); font-weight: 600; }
  .app.has-room .side { display: none; }
  .app:not(.has-room) .main { display: none; }
  .chat-head .back { display: inline-grid; }
  .bubble-row { max-width: 88%; }
  .timeline { padding: 8px 10px 12px; }
  .unread-sep { margin: 10px -10px; }
  .row-more { display: none; }
  .bubble-more, .react-btn { display: none; }
  .bubble .voice { padding-inline-end: 2px; }
  .app.has-info .info { width: 100%; }
  .only-mobile { display: revert !important; }
  button.only-mobile.icon { display: inline-grid !important; }
  .fab.only-mobile { display: grid !important; }
  .hide-mobile { display: none !important; }
}

/* ---------- волна 2 (0.4a): опросы, события, контакт, геопозиция, группы, сообщества ---------- */
.att-ic.event { background: #c2456b; }
.poll, .event-card, .contact-card { display: flex; flex-direction: column; gap: 8px; min-width: 260px; max-width: 360px; padding: 2px 0; }
.poll-q { display: flex; gap: 8px; align-items: flex-start; }
.poll-q .ic { color: var(--brand); flex: none; margin-top: 2px; }
.poll-hint { color: var(--ink-2); font-size: 12px; }
.poll-answers { display: flex; flex-direction: column; gap: 6px; }
.poll-answer { display: flex; gap: 10px; align-items: center; text-align: start; padding: 6px 4px; border-radius: 8px; width: 100%; }
.poll-answer:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.poll-answer:disabled { cursor: default; opacity: 1; }
.poll-answer .row { gap: 8px; }
.poll-answer small { color: var(--ink-2); font-size: 12px; }
.poll-mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink-3); display: grid; place-items: center; flex: none; color: var(--brand-ink); }
.poll-mark.sq { border-radius: 5px; }
.poll-answer.mine .poll-mark { background: var(--brand); border-color: var(--brand); }
.poll-bar { display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; margin-top: 4px; }
.poll-bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .25s; }
.poll-foot { display: flex; gap: 4px; flex-wrap: wrap; border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); padding-top: 4px; }
.poll-voters { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.voter { padding: 2px 0; }
.event-date { width: 48px; height: 52px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; align-content: center; flex: none; line-height: 1.1; }
.event-date small { font-size: 11px; text-transform: uppercase; font-weight: 700; }
.event-date b { font-size: 20px; }
.event-title { font-size: 15px; }
.event-card small { color: var(--ink-2); }
.gap4 { gap: 4px; align-items: center; }
.event-rsvp { display: flex; gap: 6px; flex-wrap: wrap; }
.event-rsvp .chip { min-height: 32px; }
.contact-card .contact-act { border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); color: var(--brand); font-weight: 600; padding: 8px 0 2px; }
.contact-card small { color: var(--ink-2); }
.loc-card { display: flex; gap: 12px; align-items: center; min-width: 240px; max-width: 340px; padding: 10px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); text-decoration: none; }
.loc-card small { color: var(--ink-2); display: block; }
.loc-pin { width: 48px; height: 48px; border-radius: 12px; background: #2e9d6b; color: #fff; display: grid; place-items: center; flex: none; }
.rich-modal { width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.rich-modal .pick-list { max-height: 50vh; overflow: auto; }
.rich-modal .pick-row { width: 100%; text-align: start; }
.who { border: 0; margin: 0; padding: 4px 0 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.who legend { font-weight: 600; padding: 0 0 4px; display: flex; flex-direction: column; }
.who legend small { color: var(--ink-2); font-weight: 400; font-size: 12px; }
.who.disabled { opacity: .6; pointer-events: none; }
.radio-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
.requests-bar { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 16px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 14px; text-align: start; }
.join-card { border-top: 1px solid var(--line); }
.break { word-break: break-all; }
.outline.sm, .primary.sm { padding: 5px 12px; font-size: 13px; }
.room.static { cursor: default; }
.room.static:hover { background: transparent; }
.room.sub { padding-block: 6px 6px; padding-inline: 30px 12px; }
.room.sub .name { font-size: 14px; color: var(--ink-2); }
.avatar.sm-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; }
.comm-block { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.comm-row .row { margin-top: 6px; }
.comm-new { cursor: pointer; }
.comm-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 16px 12px; text-align: center; border-bottom: 8px solid var(--bg-2); }
.comm-hero h2 { margin: 6px 0 0; font-size: 20px; }
.comm-hero small { color: var(--ink-2); }
.comm-hero .avatar { border-radius: 22px; }
.group-photo.sq { border-radius: 22px; }
.info-row.accent { color: var(--brand); font-weight: 600; }

/* ---------- 0.4.1: вкладки как в WhatsApp, «Вы», статус, звонки ---------- */
.rail-badge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 6px; inset-inline-end: 6px; }
.rail-me { position: relative; padding: 3px; border-radius: 50%; border: 2px solid transparent; }
.rail-me.on { border-color: var(--brand); }
.rail-me .rail-badge { top: -2px; inset-inline-end: -4px; }
.tab-me { display: grid; place-items: center; border-radius: 50%; border: 2px solid transparent; }
.tab.on .tab-me { border-color: var(--brand); }
.tab-head h1 { font-size: 22px; }
.plus-btn { background: var(--brand); color: var(--brand-ink) !important; }
.plus-btn:hover:not(:disabled) { background: var(--brand-2) !important; }
.round-bg { background: var(--bg-2); }
.add-chip { padding: 4px 8px; }

/* «Вы» */
.you .settings-scroll, .you-scroll { background: var(--bg-2); }
.you-head { background: var(--bg-2); }
.you-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 16px 18px; text-align: center; }
.you-hero h2 { margin: 6px 0 0; font-size: 26px; font-weight: 800; }
.you-hero small { color: var(--ink-3); }
.you-bubble { background: var(--bg); border-radius: 18px; padding: 8px 14px; font-size: 14px; box-shadow: 0 2px 10px rgba(16, 32, 56, .1); max-width: 260px; position: relative; margin-bottom: 8px; color: var(--ink); }
.you-bubble::after { content: ""; position: absolute; inset-inline-start: 40%; bottom: -7px; width: 14px; height: 14px; background: var(--bg); border-radius: 50%; }
.set-card-wrap { margin: 0 12px 14px; }
.set-card-title { color: var(--ink-2); font-size: 13px; font-weight: 700; padding: 10px 4px 6px; }
.set-card { background: var(--bg); border-radius: 16px; overflow: hidden; margin: 0 0 12px; }
.set-card-wrap .set-card { margin: 0; }
.col > .set-card { margin-inline-start: 12px; margin-inline-end: 12px; }
.set-card .set-row + .set-row { border-top: 1px solid var(--line); }
.set-card .set-row { border-radius: 0; }
.set-value { color: var(--ink-3); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.accent-row span { color: var(--brand); font-weight: 600; }
.radio-row { cursor: pointer; }
.set-select { width: auto; max-width: 55%; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.you-foot { text-align: center; color: var(--ink-3); padding: 8px 16px 28px; font-size: 12px; }
.help-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px; }
.help-hero small { color: var(--ink-3); }
.pick-list.tall { max-height: 52vh; }
.center-col { align-items: stretch; }
.steps { margin: 0; padding-inline-start: 20px; color: var(--ink-2); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.warn-box { display: flex; gap: 10px; background: color-mix(in srgb, var(--danger) 10%, var(--bg)); color: var(--ink); border-radius: 12px; padding: 12px; }
.warn-box .ic { color: var(--danger); flex: none; }
.invite-card { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--ink-2); }
.invite-card .ic { color: var(--brand); }
.invite-text { white-space: pre-wrap; text-align: start; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: 14px/1.45 inherit; width: 100%; margin: 0; color: var(--ink); }
.devices-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 8px 16px 16px; background: var(--bg); margin: 0 12px 14px; border-radius: 16px; }
.devices-hero p { margin: 0; color: var(--ink-2); }
.dv-a { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 2; }
.dv-b { fill: var(--bg); }
.dv-l { stroke: var(--brand); stroke-width: 3; stroke-linecap: round; }
.dv-c { fill: var(--brand); }
.faq { background: var(--bg); border-radius: 12px; overflow: hidden; }
.faq-q { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px; text-align: start; font-weight: 600; }
.faq-a { margin: 0; padding: 0 14px 14px; color: var(--ink-2); }
.terms p { margin: 0; }
.terms h3 { margin: 0; }

/* обои чата */
:root[data-wall="sky"] .main { --chat-bg: color-mix(in srgb, #8fc4ef 28%, var(--bg)); }
:root[data-wall="mint"] .main { --chat-bg: color-mix(in srgb, #8ed9bd 26%, var(--bg)); }
:root[data-wall="sand"] .main { --chat-bg: color-mix(in srgb, #e9cf9e 30%, var(--bg)); }
:root[data-wall="dusk"] .main { --chat-bg: color-mix(in srgb, #9b8ccc 26%, var(--bg)); }
:root[data-wall="plain"] .chat-body::before { display: none; }
.main { background: var(--chat-bg); }
.wall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wall-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.wall-sample { width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 8px; border: 2px solid transparent; background: var(--chat-bg); }
.wall-tile[data-wall="sky"] .wall-sample { background: color-mix(in srgb, #8fc4ef 28%, var(--bg)); }
.wall-tile[data-wall="mint"] .wall-sample { background: color-mix(in srgb, #8ed9bd 26%, var(--bg)); }
.wall-tile[data-wall="sand"] .wall-sample { background: color-mix(in srgb, #e9cf9e 30%, var(--bg)); }
.wall-tile[data-wall="dusk"] .wall-sample { background: color-mix(in srgb, #9b8ccc 26%, var(--bg)); }
.wall-tile[data-wall="plain"] .wall-sample { background: var(--bg-2); }
.wall-tile.on .wall-sample { border-color: var(--brand); }
.wall-tile.on { color: var(--brand); font-weight: 600; }
.wall-sample .b1, .wall-sample .b2 { display: block; height: 14px; border-radius: 6px; width: 60%; background: var(--other); }
.wall-sample .b2 { align-self: flex-end; background: var(--own); }
:root[data-noanim] *, :root[data-noanim] *::before, :root[data-noanim] *::after { animation: none !important; transition: none !important; }

/* QR */
.qr-card { background: var(--bg); border-radius: 22px; padding: 44px 18px 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; margin-top: 30px; box-shadow: 0 2px 12px rgba(16, 32, 56, .08); }
.qr-card small { color: var(--ink-3); }
.qr-ava { position: absolute; top: -32px; border: 4px solid var(--bg-2); border-radius: 50%; }
.qr-svg { border-radius: 10px; margin: 10px 0 6px; }
.qr-box { display: grid; place-items: center; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.scan-modal { width: min(420px, 100%); }
.scan-video { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 1; object-fit: cover; }

/* списки и рассылки */
.broadcast-empty p { margin: 0; max-width: 320px; }
.broadcast-view { min-height: 100%; }
.broadcast-head { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; padding-bottom: 8px; }
.broadcast-head small { color: var(--ink-2); }
.broadcast-head .chip { gap: 6px; }
.broadcast-log { flex: 1; padding: 8px 14px; display: flex; flex-direction: column; background: var(--chat-bg); min-height: 160px; }
.broadcast-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; background: var(--bg); border-top: 1px solid var(--line); position: sticky; bottom: 0; }
.broadcast-compose textarea { resize: none; border-radius: 20px; }

/* статус */
.st-ring { display: inline-grid; place-items: center; border-radius: 50%; border: 2.5px solid transparent; flex: none; }
.st-ring.new { border-color: var(--brand); }
.st-ring.seen { border-color: var(--ink-3); border-style: dashed; }
.st-me { cursor: default; gap: 8px; }
.st-me:hover { background: none; }
.st-me-main { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; text-align: start; }
.st-me-ava { position: relative; flex: none; }
.st-me-ava i { position: absolute; inset-inline-end: 0; bottom: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-style: normal; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); font-size: 14px; line-height: 1; }
.st-full, .st-viewer { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; color: #fff; background: #0b1520; }
.st-full.dark { background: #0b1520; }
.st-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.st-top small { color: rgba(255, 255, 255, .75); }
.st-text-input { flex: 1; background: transparent; border: 0; color: #fff; font-size: 28px; text-align: center; resize: none; padding: 20% 24px 0; box-shadow: none !important; }
.st-text-input::placeholder { color: rgba(255, 255, 255, .6); }
.st-bottom { display: flex; align-items: center; gap: 10px; padding: 12px 14px 18px; position: relative; }
.st-bottom.center { justify-content: center; flex-direction: column; }
.st-bottom small { color: rgba(255, 255, 255, .8); flex: 1; }
.send-btn.light { background: #fff; color: var(--brand); }
.st-media { flex: 1; display: grid; place-items: center; min-height: 0; position: relative; }
.st-media img, .st-media video { max-width: 100%; max-height: 100%; object-fit: contain; }
.st-caption { flex: 1; background: rgba(255, 255, 255, .14); border: 0; color: #fff; border-radius: 999px; padding: 10px 16px; }
.st-caption::placeholder { color: rgba(255, 255, 255, .65); }
.st-bars { display: flex; gap: 4px; padding: 10px 12px 0; }
.st-bars span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.st-bars i { display: block; height: 100%; background: #fff; }
.st-stage { flex: 1; position: relative; display: flex; min-height: 0; }
.st-tap { position: absolute; top: 0; bottom: 0; width: 35%; z-index: 2; }
.st-tap.left { inset-inline-start: 0; }
.st-tap.right { inset-inline-end: 0; }
.st-text { flex: 1; display: grid; place-items: center; padding: 24px; font-size: 30px; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; }
.st-cap { position: absolute; inset-inline-start: 0; inset-inline-end: 0; bottom: 12px; text-align: center; background: rgba(0, 0, 0, .45); padding: 8px 16px; }
.st-wait { flex: 1; display: grid; place-items: center; color: rgba(255, 255, 255, .8); }
.st-views { color: #fff; display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.st-views-list { display: flex; flex-direction: column; gap: 8px; background: rgba(0, 0, 0, .35); border-radius: 12px; padding: 12px 16px; max-height: 40vh; overflow-y: auto; min-width: 240px; }

/* звонки */
.rooms .call-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 6px 12px 10px; }
.call-actions button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); padding: 4px 0; }
.ca-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; color: var(--ink); }
.call-actions button:hover .ca-ic { background: var(--brand-soft); color: var(--brand); }
.fav-row { display: flex; gap: 14px; padding: 4px 16px 8px; overflow-x: auto; }
.fav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 64px; flex: none; }
.fav-item small { font-size: 12px; color: var(--ink-2); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-n { color: var(--ink-2); font-weight: 400; }
.call-row .time { margin-inline-end: 2px; }

/* сообщества: пустой экран */
.comm-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 20px 28px; text-align: center; }
.comm-empty h3 { margin: 4px 0 0; font-size: 20px; }
.comm-empty p { margin: 0; color: var(--ink-2); max-width: 340px; }
.ca-1 { fill: var(--brand-soft); stroke: var(--ink); stroke-width: 1.6; }
.ca-2 { fill: var(--brand); }
.ca-3 { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.ca-4 { fill: color-mix(in srgb, #f6e7a8 60%, var(--bg)); stroke: var(--ink); stroke-width: 1.6; }
.ca-5 { fill: color-mix(in srgb, var(--ok) 25%, var(--bg)); stroke: var(--ink); stroke-width: 1.6; }
.ca-6 { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.comm-examples { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; text-align: start; width: 100%; max-width: 360px; }
.comm-examples li { background: var(--bg-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.comm-examples span { color: var(--ink-2); font-size: 14px; }
.comm-new-btn { max-width: 360px; }

/* чат: «назад» с числом, звонок карточкой, ответ на статус, запланированный звонок */
.chat-head .back { position: relative; }
.back-count { position: absolute; top: 2px; inset-inline-end: -4px; background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: 10px; font-weight: 700; min-width: 16px; line-height: 16px; padding: 0 4px; }
.call-rec { margin-top: 8px; }
.call-bubble { display: flex; align-items: center; gap: 10px; min-width: 200px; padding: 8px 10px; text-align: start; }
.call-bubble small { color: var(--ink-2); }
.call-bubble .meta { align-self: flex-end; float: none; position: static; margin-inline-start: auto; }
.call-ic { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 7%, transparent); display: grid; place-items: center; color: var(--ink); flex: none; }
.call-ic.missed { color: var(--danger); }
.status-quote { border-inline-start-color: var(--ok); }
.status-quote b { color: var(--ok); }
.sched-card .event-date { color: var(--brand); }
.dl-chip { background: rgba(0, 0, 0, .55); color: #fff; border-radius: 999px; padding: 6px 12px; display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.send-previews { display: flex; gap: 6px; flex-wrap: wrap; }
.send-previews img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }

@media (max-width: 760px) {
  .tab-head .menu-left { order: 0; }
  .tabs .tab-label { font-size: 11px; }
  .tab-ic { width: 48px; }
  .call-actions { gap: 2px; }
}
@media (min-width: 761px) {
  .tab-head .menu-left { order: 10; }
}

/* 0.4.2 — переписка 0.4b */
:root { --chat-bg-0: var(--chat-bg); }
.chat[data-wall] { background: var(--chat-bg); }
.chat[data-wall="alibry"] { --chat-bg: var(--chat-bg-0); }
.chat[data-wall="sky"] { --chat-bg: color-mix(in srgb, #8fc4ef 28%, var(--bg)); }
.chat[data-wall="mint"] { --chat-bg: color-mix(in srgb, #8ed9bd 26%, var(--bg)); }
.chat[data-wall="sand"] { --chat-bg: color-mix(in srgb, #e9cf9e 30%, var(--bg)); }
.chat[data-wall="dusk"] { --chat-bg: color-mix(in srgb, #9b8ccc 26%, var(--bg)); }
.chat[data-wall="plain"] .chat-body::before { display: none; }
:root[data-wall="plain"] .chat[data-wall]:not([data-wall="plain"]) .chat-body::before { display: block; }
.head-timer { color: var(--ink-3); flex: none; margin-inline-start: 4px; vertical-align: -2px; }
.member-label { font-size: 11.5px; font-weight: 500; color: var(--ink-2); background: color-mix(in srgb, var(--brand) 12%, transparent); border-radius: 6px; padding: 0 6px; margin-inline-start: 6px; white-space: nowrap; }
.dis-hero { display: grid; justify-items: center; gap: 8px; color: var(--brand); text-align: center; }
.dis-hero .hint { color: var(--ink-2); text-align: center; }
.link-like { text-align: start; color: inherit; min-width: 0; }
.info-link { width: 100%; align-items: center; gap: 8px; padding: 4px 0; color: var(--ink); }
.info-link small { color: var(--ink-3); }
.att-ic.vnote { background: #d0534a; }

/* однократный просмотр */
.once-card { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 6px 4px 4px; text-align: start; color: var(--ink); }
.once-card small { color: var(--ink-3); }
.once-card:disabled { cursor: default; opacity: 1; }
.once-ic { width: 34px; height: 34px; border-radius: 50%; border: 2px dashed var(--brand); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; }
.once-card.opened .once-ic { border-style: solid; border-color: var(--ink-3); color: var(--ink-3); }
.once-ic.light { border-color: #fff; color: #fff; }
.once-view img, .once-view video { user-select: none; -webkit-user-drag: none; }

/* кружки */
.bubble.vnote-b { background: transparent; box-shadow: none; padding: 0; }
.bubble.vnote-b .meta { position: absolute; inset-inline-end: 8px; bottom: 8px; background: rgba(0,0,0,.45); color: #fff; border-radius: 8px; padding: 0 6px; }
.vnote { width: 220px; height: 220px; border-radius: 50%; overflow: hidden; position: relative; background: var(--bg-3); }
.vnote video, .vnote-poster, .vnote-poster img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.vnote .media-dur { left: 50%; transform: translateX(-50%); bottom: 10px; }
.vnote-rec { width: min(280px, 70vw); aspect-ratio: 1; border-radius: 50%; overflow: hidden; position: relative; margin: 0 auto; background: #000; }
.vnote-rec video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.vnote-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.vnote-ring circle { fill: none; stroke: #e5484d; stroke-width: 3; }

/* предпросмотр ссылок */
.link-card { display: grid; gap: 2px; margin: 4px 0 2px; padding: 6px 10px; border-inline-start: 3px solid var(--brand); border-radius: 6px; background: color-mix(in srgb, var(--brand) 7%, transparent); color: var(--ink); text-decoration: none; max-width: 360px; }
.link-card b { font-size: 14px; }
.link-card span { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ветки */
.thread-sum { display: inline-flex; align-items: center; gap: 6px; margin: 3px 4px 0; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--brand); font-size: 13px; font-weight: 600; box-shadow: 0 1px 1.5px rgba(16, 32, 56, .1); }
.thread-sum small { color: var(--ink-3); font-weight: 400; }
.msg.own .thread-sum { align-self: flex-end; }
.thread-panel { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--chat-bg); }
.thread-panel .chat-head .back { display: inline-grid; }

/* галерея */
.gallery { display: flex; flex-direction: column; gap: 10px; padding: 8px 12px 16px; }
.gallery-head { align-items: center; }
.seg { display: flex; background: var(--bg-2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; padding: 7px 8px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.seg button.on { background: var(--bg); color: var(--brand); box-shadow: 0 1px 2px rgba(16, 32, 56, .12); }
.thumb-play { position: absolute; inset-inline-end: 5px; bottom: 5px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }

/* заблокированные чаты */
.locked-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px; color: var(--brand); border-bottom: 1px solid var(--line); }
.locked-gate .chat-body { align-items: center; justify-content: center; }
.locked-gate .empty { margin: auto; }
.once-ic.sm { width: 18px; height: 18px; font-size: 11px; border-width: 1.5px; display: inline-grid; vertical-align: middle; }
.msg .bubble.vnote-b, .msg.own .bubble.vnote-b { background: transparent; box-shadow: none; padding: 0; min-width: 0; }
.bubble.vnote-b .meta { float: none; top: auto; margin: 0; z-index: 1; }
.bubble.vnote-b .bubble-more { display: none; }
.once-card[aria-disabled="true"] { cursor: default; }

/* ---------------------------------------------------------------- 0.5a — волна 3 */
.app-lock { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: linear-gradient(160deg, var(--brand-soft), var(--bg-2)); }
.app-lock form { width: min(320px, 100%); }
.app-lock input { text-align: center; letter-spacing: 6px; font-size: 20px; }
.app-lock h2 { margin: 4px 0 0; }
.self-row small { color: var(--ink-3); }
.mention.all { background: var(--brand-soft); border-radius: 4px; padding: 0 3px; cursor: default; }
.priv-quote b { color: var(--ok); }
.priv-quote { border-inline-start-color: var(--ok); }
.once-toggle .once-ic { border-style: dashed; }
.once-toggle.on { background: var(--brand-soft); }
.once-toggle.on .once-ic { border-style: solid; background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.sched-bar small { font-weight: 400; color: var(--ink-2); }
.sched-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.sched-item { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.sched-item .accent { display: inline-flex; align-items: center; gap: 4px; }
.sched-text { white-space: pre-wrap; word-break: break-word; }
.live-card { display: flex; flex-direction: column; gap: 8px; min-width: 240px; max-width: 340px; padding: 6px 4px 2px; }
.live-card small { color: var(--ink-2); }
.loc-pin.live { background: var(--brand); animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.live-point { min-width: 0; }
.live-section { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.live-section .wrap { flex-wrap: wrap; }
.live-bar { background: color-mix(in srgb, var(--ok) 14%, var(--bg)); color: var(--ok); }
.album { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: min(320px, 100%); border-radius: 8px; overflow: hidden; }
.album-tile { position: relative; aspect-ratio: 1 / 1; background: var(--bg-3); display: grid; place-items: center; overflow: hidden; }
.album-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-more { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); color: #fff; font-size: 26px; font-weight: 700; display: grid; place-items: center; }
.play-btn.sm { width: 38px; height: 38px; }
.once-voice .bar { height: 6px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.once-voice .bar i { display: block; height: 100%; background: var(--brand); }
.search-kinds { padding-top: 0; }
.msg-results { display: flex; flex-direction: column; }
.hit-row .last b { color: var(--ink); font-weight: 600; }
.hit-row mark { background: color-mix(in srgb, var(--brand) 25%, transparent); color: inherit; border-radius: 3px; }
.deep-row { padding: 8px 16px 14px; }
.empty.sm { padding: 10px 16px; }
.date-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chat-search { position: relative; }

/* ===== 0.5.1 — волна 3, часть 0.5b: стикеры, каналы, «о себе» с таймером, статусы ===== */
.panel-tabs { display: flex; gap: 4px; padding: 6px 8px 0; border-bottom: 1px solid var(--line); }
.panel-tabs button { padding: 6px 12px; border-radius: 10px 10px 0 0; color: var(--ink-2); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; }
.panel-tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.sticker-panel { display: flex; flex-direction: column; max-height: 300px; }
.sticker-tabs { display: flex; gap: 6px; padding: 6px 8px; overflow-x: auto; scrollbar-width: none; }
.sticker-tabs button { border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sticker-tabs button.on { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; padding: 4px 8px 8px; overflow-y: auto; }
.sticker-cell { position: relative; display: grid; place-items: center; }
.sticker-btn { width: 96px; height: 96px; border-radius: 12px; display: grid; place-items: center; }
.sticker-btn:hover { background: var(--bg-2); }
.sticker-btn img { width: 88px; height: 88px; object-fit: contain; }
.sticker-del { position: absolute; top: 2px; inset-inline-end: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-3); color: var(--ink-2); display: none; place-items: center; }
.sticker-cell:hover .sticker-del, .sticker-del:focus-visible { display: grid; }
.sticker-add { width: 96px; height: 96px; border-radius: 12px; border: 2px dashed var(--line); color: var(--brand); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; text-align: center; padding: 4px; }
.sticker-empty { grid-column: 1 / -1; color: var(--ink-3); font-size: 13.5px; text-align: center; padding: 18px 8px; }
.sticker-note { color: var(--ink-3); font-size: 12px; padding: 0 10px 8px; }
.sticker img, img.sticker-img { max-width: 160px; max-height: 160px; }
@media (hover: none) { .sticker-del { display: grid; } }

.ch-ava .avatar { border-radius: 14px; }
.ch-invite { align-items: center; }
.ch-invite .primary.sm { padding: 5px 12px; font-size: 13px; }
.ch-empty { color: var(--ink-3); font-size: 13.5px; padding: 4px 16px 8px; margin: 0; }
.ch-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 18px; }
.ch-actions .pill { border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-weight: 600; color: var(--brand); }
.ch-dir input { width: 100%; }
.ch-dir-list { max-height: 55vh; overflow-y: auto; margin: 0 -8px; }
.ch-dir-list .room { width: 100%; }
.ch-dir-list img.avatar, .head-who img.avatar { border-radius: 14px; object-fit: cover; flex: none; }
.ch-photo { width: 56px; height: 56px; border-radius: 16px; background: var(--bg-3); color: var(--ink-2); display: grid; place-items: center; overflow: hidden; flex: none; }
.ch-photo img { width: 100%; height: 100%; object-fit: cover; }
.head-who.static { cursor: default; display: flex; align-items: center; gap: 10px; }
.ch-topic { white-space: pre-wrap; text-align: start; max-width: 520px; }
.ch-prev-img { max-width: 280px; max-height: 320px; border-radius: 10px; display: block; }
.ch-follow-bar { display: flex; justify-content: center; padding: 10px; }
.ch-follow-bar .primary { min-width: 180px; }
.ch-footer { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.ch-footer small { color: var(--ink-2); text-align: start; }
.ch-footer .link { display: inline-flex; align-items: center; gap: 6px; }
button.fwd.ch-fwd { display: flex; align-items: center; gap: 4px; color: var(--brand); text-align: start; padding: 0; }
.ch-desc { padding: 2px 0 6px; color: var(--ink); }
.ch-edit { width: 100%; }

.label-block { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.about-editor input.about-emoji { width: 64px; text-align: center; font-size: 18px; flex: none; }
.panel label.about-dur, .about-dur { flex-direction: row !important; align-items: center; gap: 8px; }
.about-dur select { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; background: var(--bg); color: var(--ink); }
.about-line { align-self: center; margin: 8px auto 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; font-size: 13.5px; color: var(--ink-2); max-width: 90%; text-align: center; }
.about-line small { color: var(--ink-3); }

.status-mention { display: flex; align-items: center; gap: 10px; padding: 6px 2px; min-width: 240px; }
.status-mention small { color: var(--ink-2); }
.st-ring.sm { border-width: 2px; }
.st-voice { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; text-align: center; }
.st-voice audio { width: min(320px, 90vw); }
.st-mic { width: 104px; height: 104px; border-radius: 50%; background: rgba(255, 255, 255, .18); color: #fff; display: grid; place-items: center; }
.st-mic.rec { background: #e5484d; animation: stpulse 1.2s ease-in-out infinite; }
@keyframes stpulse { 50% { box-shadow: 0 0 0 12px rgba(229, 72, 77, .28); } }
.st-badge { position: absolute; top: 2px; inset-inline-end: 2px; background: #fff; color: #0b1520; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 16px; line-height: 16px; text-align: center; }
.st-top .icon.light { position: relative; }

.poll-answer.right .poll-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.poll-answer.right { box-shadow: inset 0 0 0 1.5px var(--ok); }
.poll-answer.wrong .poll-mark { background: var(--danger); border-color: var(--danger); color: #fff; }
.poll-answer.wrong { box-shadow: inset 0 0 0 1.5px var(--danger); }
.quiz-radio { width: 18px; height: 18px; accent-color: var(--ok); flex: none; align-self: center; }

/* 0.5.2: экран ошибки вместо белой страницы */
.crash { min-height: 100vh; display: grid; place-content: center; gap: 12px; text-align: center; padding: 24px; background: var(--bg); color: var(--ink); }
.crash h2 { margin: 0; }
.crash p { margin: 0 auto; max-width: 420px; color: var(--ink-2); }
.crash button { justify-self: center; }

/* 0.6 (волна 4): видеозвонок 1:1, групповые звонки, ссылки, гость */
.call-overlay .call-actions.in { display: flex; gap: 28px; margin: 22px 0 18px; }
.call-overlay.video, .call-overlay.gc { padding: 0; place-items: stretch; background: #04121f; }
.cv, .gc-wrap { position: relative; width: 100%; height: 100%; overflow: hidden; color: #fff; display: flex; flex-direction: column; }
.cv-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #04121f; }
.cv-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; opacity: .9; }
.cv-self { position: absolute; inset-inline-end: 16px; top: 76px; width: min(28vw, 220px); aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.45); background: #0a2236; z-index: 2; }
video.mirror { transform: scaleX(-1); }
.cv-top, .gc-top { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 16px 18px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
.cv-top b, .gc-top b { font-size: 19px; }
.cv-top span, .gc-top span { font-size: 14px; opacity: .85; font-variant-numeric: tabular-nums; }
.cv-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.14); border-radius: 999px; padding: 3px 10px; }
.gc-lock { display: inline-flex; align-items: center; gap: 4px; flex-basis: 100%; font-size: 12px !important; opacity: .7 !important; }
.cv-controls { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 4; display: flex; gap: 12px; padding: 10px 14px; border-radius: 999px; background: rgba(12, 35, 56, .82); backdrop-filter: blur(8px); flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px); }
.call-card .cv-controls { position: static; transform: none; margin: 20px 0 6px; background: rgba(255,255,255,.08); }
.cv-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.16); }
.cv-btn:hover { background: rgba(255,255,255,.26); }
.cv-btn.on { background: #fff; color: #073e69; }
.cv-btn.off { background: rgba(255,255,255,.08); opacity: .85; }
.cv-btn.hang { background: #d93a3a; }
.cv-react-pick { position: absolute; bottom: 74px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; background: #fff; border-radius: 999px; padding: 6px 8px; box-shadow: var(--shadow); }
.cv-react-pick button { font-size: 26px; width: 42px; height: 42px; border-radius: 50%; }
.cv-react-pick button:hover { background: var(--bg-2); }
.cv-float { position: absolute; left: 50%; bottom: 120px; font-size: 64px; z-index: 5; animation: cvfloat 3s ease-out forwards; pointer-events: none; }
.cv-float.mine { inset-inline-start: 70%; font-size: 44px; }
.call-card .cv-float { position: static; animation: none; font-size: 44px; }
@keyframes cvfloat { 0% { transform: translate(-50%, 20px); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(-50%, -160px); opacity: 0; } }
.gc-grid { flex: 1; display: grid; gap: 8px; padding: 8px 8px 96px; min-height: 0; grid-auto-rows: minmax(120px, 1fr); overflow-y: auto; }
.gc-tile { position: relative; border-radius: 14px; overflow: hidden; background: #0c2a44; display: grid; place-items: center; border: 3px solid transparent; transition: border-color .15s; min-height: 120px; }
.gc-tile.speaking { border-color: #4fc3f7; }
.gc-tile.screen { grid-column: 1 / -1; }
.gc-video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.gc-tile.screen .gc-video { object-fit: contain; background: #000; }
.gc-name { position: absolute; inset-inline-start: 8px; bottom: 8px; display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,.5); padding: 3px 9px; border-radius: 8px; font-size: 13px; max-width: calc(100% - 16px); }
.gc-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-guest { background: #f5b301; color: #2b1d00; border-radius: 6px; padding: 0 5px; font-size: 11px; }
.gc-hand { position: absolute; top: 8px; inset-inline-start: 8px; font-size: 24px; background: rgba(0,0,0,.45); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; }
.gc-react { position: absolute; top: 8px; inset-inline-end: 10px; font-size: 34px; animation: fade .2s; }
.call-banner { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--brand-soft); color: var(--brand-ink); border-bottom: 1px solid var(--line); font-size: 14px; }
.call-link-card { display: flex; align-items: center; gap: 10px; min-width: min(320px, 70vw); }
.call-link-card .call-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.call-link-card .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 220px; }
.cv-pick { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45); display: grid; place-items: center; padding: 16px; }
.cv-pick-card { width: min(380px, 100%); max-height: 80vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); border-radius: 18px; padding: 12px; gap: 8px; box-shadow: var(--shadow); }
.cv-pick-card header { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; }
.cv-pick-card input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: var(--bg-2); color: var(--ink); }
.cv-pick-list { overflow-y: auto; display: flex; flex-direction: column; }
.cv-pick-list button { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-align: start; }
.cv-pick-list button:hover { background: var(--bg-2); }
.cv-pick-list small { color: var(--ink-3); }
.guest-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(180deg, #0b5c9b, #073e69); padding: 16px; }
.guest-card { width: min(400px, 100%); background: var(--bg); color: var(--ink); border-radius: 22px; padding: 28px 22px; display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.guest-card img { align-self: center; }
.guest-card h1 { font-size: 22px; margin: 0; }
.guest-card .field { display: flex; flex-direction: column; gap: 6px; text-align: start; }
.guest-card .field input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg-2); color: var(--ink); font-size: 16px; }
.guest-card .switch-row { display: flex; align-items: center; gap: 8px; justify-content: center; }
.guest-card .error { color: var(--danger); }
.link-btn.light { color: #fff; opacity: .9; text-decoration: underline; margin-top: 6px; }
@media (max-width: 600px) {
  .cv-btn { width: 46px; height: 46px; }
  .cv-controls { gap: 8px; bottom: 14px; }
  .cv-self { width: 32vw; top: 70px; inset-inline-end: 10px; }
}

/* ---------- волна 5 (0.7): восстановление, проверка, вход по QR, push, аккаунты, перевод, PiP, QR группы */
.recovery-banner { display: flex; align-items: center; gap: 10px; padding-block: 8px 8px; padding-inline: 16px 12px; background: var(--brand-soft); color: var(--ink); font-size: 13px; }
.recovery-banner .link-btn { font-weight: 600; white-space: nowrap; }
.recovery-page .recovery-state { font-size: 14px; }
.recovery-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .04em; line-height: 1.6; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg); word-break: break-word; user-select: all; }
.recovery-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 72px; resize: vertical; }
.warn { color: var(--danger); font-size: 13px; }
.verify-modal { max-width: 420px; }
.sas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; margin: 10px 0; }
.sas-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-2); text-align: center; }
.sas-emoji { font-size: 34px; line-height: 1.1; }
.qr-login { align-items: center; text-align: center; }
.qr-login .qr-box { background: #fff; padding: 8px; border-radius: 12px; display: inline-block; }
.qr-link { width: 100%; font-size: 11px; color: var(--ink-2); text-overflow: ellipsis; }
.cancel-add { margin-top: 8px; }
.account-row.active { font-weight: 600; }
.push-state { font-size: 12px; }
.tr-line { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.tr-head { display: flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 11px; }
.tr-head .link-btn { font-size: 11px; padding: 0; }
.tr-text { white-space: pre-wrap; word-break: break-word; }
.group-qr { align-items: center; border-top: 1px solid var(--line); }
.group-qr .qr-svg { margin: 4px 0; }

/* 0.8: значки в строках-превью («Фото», «Голосовое», «Имя: файл») и мелкие значки в тексте */
.pv-ic { display: inline-block; vertical-align: -3px; margin-inline-end: 1px; opacity: .85; }

/* 0.8: спойлер */
.spoiler { filter: blur(6px); background: rgba(127,127,127,.25); border-radius: 4px; cursor: pointer; user-select: none; transition: filter .15s; }
.spoiler.on { filter: none; background: rgba(127,127,127,.12); cursor: text; user-select: text; }
[data-noanim] .spoiler { transition: none; }

/* 0.8: черновики */
.draft-tag { color: #0a8f5a; font-weight: 600; }
:root[data-theme="dark"] .draft-tag { color: #43c58d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .draft-tag { color: #43c58d; } }

/* 0.8: цвет своих пузырей (на этом устройстве) */
:root[data-bubble="green"] { --own: #d8f2dd; --bubble-swatch: #d8f2dd; }
:root[data-bubble="green"][data-theme="dark"] { --own: #174a2c; }
@media (prefers-color-scheme: dark) { :root[data-bubble="green"]:not([data-theme="light"]) { --own: #174a2c; } }
:root[data-bubble="violet"] { --own: #e6dcfa; --bubble-swatch: #e6dcfa; }
:root[data-bubble="violet"][data-theme="dark"] { --own: #3a2a6b; }
@media (prefers-color-scheme: dark) { :root[data-bubble="violet"]:not([data-theme="light"]) { --own: #3a2a6b; } }
:root[data-bubble="rose"] { --own: #fbdde6; --bubble-swatch: #fbdde6; }
:root[data-bubble="rose"][data-theme="dark"] { --own: #6b2a42; }
@media (prefers-color-scheme: dark) { :root[data-bubble="rose"]:not([data-theme="light"]) { --own: #6b2a42; } }
:root[data-bubble="amber"] { --own: #fbeccb; --bubble-swatch: #fbeccb; }
:root[data-bubble="amber"][data-theme="dark"] { --own: #5e4511; }
@media (prefers-color-scheme: dark) { :root[data-bubble="amber"]:not([data-theme="light"]) { --own: #5e4511; } }
:root[data-bubble="teal"] { --own: #cdeeee; --bubble-swatch: #cdeeee; }
:root[data-bubble="teal"][data-theme="dark"] { --own: #124a4d; }
@media (prefers-color-scheme: dark) { :root[data-bubble="teal"]:not([data-theme="light"]) { --own: #124a4d; } }
:root[data-bubble="slate"] { --own: #dfe3e8; --bubble-swatch: #dfe3e8; }
:root[data-bubble="slate"][data-theme="dark"] { --own: #343c46; }
@media (prefers-color-scheme: dark) { :root[data-bubble="slate"]:not([data-theme="light"]) { --own: #343c46; } }
:root[data-bubble="graphite"] { --own: #c9ced6; --bubble-swatch: #c9ced6; }
:root[data-bubble="graphite"][data-theme="dark"] { --own: #2b3038; }
@media (prefers-color-scheme: dark) { :root[data-bubble="graphite"]:not([data-theme="light"]) { --own: #2b3038; } }
.bubble-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.bubble-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: var(--ink); }
.bubble-dot.on { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.bubble-dot[data-c="alibry"] { background: #d6e9fa; }
:root[data-theme="dark"] .bubble-dot[data-c="alibry"] { background: #164067; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble-dot[data-c="alibry"] { background: #164067; } }
.bubble-dot[data-c="green"] { background: #d8f2dd; }
:root[data-theme="dark"] .bubble-dot[data-c="green"] { background: #174a2c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble-dot[data-c="green"] { background: #174a2c; } }
.bubble-dot[data-c="violet"] { background: #e6dcfa; }
:root[data-theme="dark"] .bubble-dot[data-c="violet"] { background: #3a2a6b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble-dot[data-c="violet"] { background: #3a2a6b; } }
.bubble-dot[data-c="rose"] { background: #fbdde6; }
:root[data-theme="dark"] .bubble-dot[data-c="rose"] { background: #6b2a42; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble-dot[data-c="rose"] { background: #6b2a42; } }
.bubble-dot[data-c="amber"] { background: #fbeccb; }
:root[data-theme="dark"] .bubble-dot[data-c="amber"] { background: #5e4511; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble-dot[data-c="amber"] { background: #5e4511; } }
.bubble-dot[data-c="teal"] { background: #cdeeee; }
:root[data-theme="dark"] .bubble-dot[data-c="teal"] { background: #124a4d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble-dot[data-c="teal"] { background: #124a4d; } }
.bubble-dot[data-c="slate"] { background: #dfe3e8; }
:root[data-theme="dark"] .bubble-dot[data-c="slate"] { background: #343c46; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble-dot[data-c="slate"] { background: #343c46; } }
.bubble-dot[data-c="graphite"] { background: #c9ced6; }
:root[data-theme="dark"] .bubble-dot[data-c="graphite"] { background: #2b3038; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble-dot[data-c="graphite"] { background: #2b3038; } }

/* 0.8: повышенный контраст */
:root[data-contrast="1"] { --ink: #000000; --ink-2: #26303b; --ink-3: #3d4854; --line: #7b8794; --brand: #054f89; --brand-2: #033a66; --own: #b5d6f2; --other: #ffffff; --tick-read: #04569a; --danger: #a31515; --ok: #1d7a40; }
:root[data-contrast="1"][data-theme="dark"] { --ink: #ffffff; --ink-2: #dde3ea; --ink-3: #bfc8d2; --line: #7b8794; --brand: #9bcdf6; --brand-2: #b9dcf9; --own: #1d5a93; --other: #26303b; --tick-read: #9bd0ff; --danger: #ff9b9b; }
@media (prefers-color-scheme: dark) { :root[data-contrast="1"]:not([data-theme="light"]) { --ink: #ffffff; --ink-2: #dde3ea; --ink-3: #bfc8d2; --line: #7b8794; --brand: #9bcdf6; --brand-2: #b9dcf9; --own: #1d5a93; --other: #26303b; --tick-read: #9bd0ff; --danger: #ff9b9b; } }
:root[data-contrast="1"] .bubble, :root[data-contrast="1"] .msg-bubble { border: 1px solid var(--line); }
:root[data-contrast="1"] :focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.fwd .fwd2 { margin-inline-start: -9px; }

/* 0.8.0: заглушённые статусы, проверка конфиденциальности */
.st-muted-head { display: flex; align-items: center; gap: 6px; width: 100%; text-align: start; cursor: pointer; }
.st-muted-head .ic:last-child { margin-inline-start: auto; }
.st-muted-head[aria-expanded="true"] .ic:last-child { transform: rotate(180deg); }
.pc-head { display: flex; align-items: center; gap: 12px; color: var(--brand); }
.pc-head b { color: var(--ink); font-size: 17px; }
.pc-head small { color: var(--ink-2); }
.pc-bars { display: flex; gap: 6px; }
.pc-bars i { flex: 1; height: 4px; border-radius: 2px; background: var(--bg-3); }
.pc-bars i.on { background: var(--brand); }
.pc-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
