/* ═══════════════════════════════════════════════════════════════════════════
   Voice Lobby — оболочка «друзья и чаты», направление «Голос» (светлая и тёмная темы).

   Панели парят над тёмным фоном, как плитки в звонке: слева «Чаты», справа
   переписка или звонок. Один акцент — синий из style.css; зелёный только у
   «в сети / звонок», красный только у «положить / удалить». Аватары нейтральные.
   Кнопки круглые, при наведении чуть поднимаются. Анимации короткие, по одной
   заметной на экран: пузырь «вспрыгивает», капсула звонка, волна входящего.
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 400; src: url('/static/fonts/golos/golos-text-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 400; src: url('/static/fonts/golos/golos-text-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 500; src: url('/static/fonts/golos/golos-text-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 500; src: url('/static/fonts/golos/golos-text-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 600; src: url('/static/fonts/golos/golos-text-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 600; src: url('/static/fonts/golos/golos-text-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 700; src: url('/static/fonts/golos/golos-text-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-display: swap; font-weight: 700; src: url('/static/fonts/golos/golos-text-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 500; src: url('/static/fonts/unbounded/unbounded-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 500; src: url('/static/fonts/unbounded/unbounded-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 600; src: url('/static/fonts/unbounded/unbounded-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 600; src: url('/static/fonts/unbounded/unbounded-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 700; src: url('/static/fonts/unbounded/unbounded-cyrillic-700-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 700; src: url('/static/fonts/unbounded/unbounded-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --vl-font: 'Golos Text', var(--font);
  /* Заголовки и имена — широкий Unbounded, как «Чаты» и «Макс» в макете «Голос» */
  --vl-display: 'Unbounded', 'Golos Text', var(--font);
  --vl-stage: #0a0c0f;       /* фон под панелями */
  --vl-panel: #13161b;       /* панели */
  --vl-raised: #1a1e25;      /* плитки, карточки, меню */
  --vl-raised-2: #1e232c;    /* выбранная личка */
  --vl-field: #1f242d;       /* поля ввода и чужие пузыри */
  --vl-hover: rgba(var(--ink-rgb), 0.05);
  --vl-soft: rgba(var(--ink-rgb), 0.07);
  --vl-soft-2: rgba(var(--ink-rgb), 0.12);
  --vl-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --vl-gap: 10px;
  --vl-r-panel: 22px;
  --vl-r-card: 16px;
  --vl-side-w: 300px;
  --vl-dock-h: clamp(200px, 38vh, 400px);
  --vl-online: #3aa86e;
  --vl-idle: #e0a23a;
  --vl-dnd: #d94a3d;
  --vl-offline: #5b6270;
  --vl-ava-0: #2a303b; --vl-ava-1: #2a303b; --vl-ava-2: #2a303b; --vl-ava-3: #2a303b; --vl-ava-4: #2a303b; --vl-ava-5: #2a303b;
  --vl-ava-ink: #f2f5f9;
}
html[data-theme="light"] {
  --vl-stage: #eef1f4;
  --vl-panel: #ffffff;
  --vl-raised: #ffffff;
  --vl-raised-2: #eef1f4;
  --vl-field: #eef1f4;
  --vl-highlight: 0 1px 0 rgba(21, 32, 43, 0.06);
  --vl-online: #1f9d6b;
  --vl-idle: #d99a22;
  --vl-dnd: #d33a2c;
  --vl-offline: #9aa4ae;
  --vl-ava-0: #ffd9b8; --vl-ava-1: #cfe3ff; --vl-ava-2: #d6efdf; --vl-ava-3: #e4e0f7; --vl-ava-4: #fde0e3; --vl-ava-5: #fbecb8;
  --vl-ava-ink: #15202b;
}

/* Шрифт оболочки — Golos Text; экран звонка и лобби остаются на системном, как были */
#vl-sidebar, #vl-view, .vl-island, .vl-dock__tools, .vl-menu, .vl-modal-overlay, .vl-incoming-wrap, .vl-fab-menu {
  font-family: var(--vl-font);
}
.vl-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─────────── Каркас: две парящие панели ─────────── */
#vl-shell { height: 100%; display: flex; min-height: 0; }
#vl-sidebar { display: none; }
#vl-main { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; flex-direction: column; position: relative; }
#vl-view { display: none; }

body.vl-ready { background: var(--vl-stage); }
body.vl-ready #vl-shell { gap: var(--vl-gap); padding: var(--vl-gap); box-sizing: border-box; background: var(--vl-stage); }
body.vl-ready #vl-sidebar {
  display: flex; flex-direction: column; flex: 0 0 var(--vl-side-w); width: var(--vl-side-w); min-height: 0;
  background: var(--vl-panel); border-radius: var(--vl-r-panel); box-shadow: var(--vl-highlight);
  padding: 16px 12px 12px; box-sizing: border-box;
}
body.vl-ready #vl-main { height: auto; background: var(--vl-panel); border-radius: var(--vl-r-panel); box-shadow: var(--vl-highlight); overflow: hidden; }
body.vl-ready #app-root { height: auto; }
body.vl-ready:not(.vl-show-app):not(.vl-call-docked) #app-root { display: none; }
body.vl-ready.vl-show-app #app-root { flex: 1 1 auto; min-height: 0; }
body.vl-ready:not(.vl-show-app) #vl-view { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; }
/* «Друзья» — две отдельные панели: правая колонка сама становится сценой */
body.vl-ready.vl-route-friends:not(.vl-show-app):not(.vl-dock-open) #vl-main { background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }

/* Звонок с видео — панель над чатом (по кнопке «Показать видео» в капсуле) */
body.vl-call-docked #app-root { flex: 0 0 var(--vl-dock-h); height: var(--vl-dock-h); }
body.vl-dock-open #app-root { border-bottom: 1px solid var(--vl-soft); animation: vl-dock-in 0.3s var(--ease) both; }
/* Свёрнут в капсулу: звонок остаётся в документе того же размера, но невидим и не мешает */
body.vl-call-docked:not(.vl-dock-open) #app-root {
  position: absolute; left: 0; right: 0; top: 0; visibility: hidden; pointer-events: none;
}
@keyframes vl-dock-in { from { opacity: 0; transform: translateY(-8px); } }
.vl-dock__tools { position: absolute; top: 10px; right: 12px; z-index: 6; display: flex; gap: 6px; }

/* Лобби внутри оболочки: профиль и выход уже есть слева */
body.vl-ready .lobby-userbar { display: none; }

/* ─────────── Кнопки ─────────── */
.vl-round {
  --s: 40px;
  width: var(--s); height: var(--s); flex: 0 0 auto; padding: 0; border: 0; border-radius: 50%;
  background: var(--vl-soft); color: rgba(var(--ink-rgb), 0.85);
  display: inline-grid; place-items: center; cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s;
}
.vl-round .vl-ico { width: calc(var(--s) * 0.42); height: calc(var(--s) * 0.42); }
.vl-round:hover { transform: translateY(-1px); background: rgba(var(--ink-rgb), 0.14); color: var(--text); }
.vl-round:active { transform: scale(0.94); }
.vl-round:disabled { opacity: 0.45; cursor: default; transform: none; }
.vl-round.is-lg { --s: 42px; }
.vl-round.is-sm { --s: 34px; }
.vl-round.is-xs { --s: 30px; }
.vl-round.is-accent { background: var(--accent); color: #fff; }
.vl-round.is-accent:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }
.vl-round.is-accent:disabled { background: var(--vl-soft); color: var(--text-faint); }
.vl-round.is-danger { background: var(--danger); color: #fff; }
.vl-round.is-danger:hover { background: #e25a4d; color: #fff; }
.vl-round.is-danger:hover .vl-ico { animation: vl-swing 0.55s var(--ease); }
.vl-round.is-dark { background: rgba(var(--ink-rgb), 0.10); color: var(--text); }
.vl-round.is-ghost { background: transparent; color: var(--text-dim); }
.vl-round.is-ghost:hover { background: var(--vl-soft); }
.vl-round.is-glass { background: rgba(10, 12, 15, 0.7); color: #f2f5f9; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vl-round.is-off { color: var(--danger-soft); }
.vl-round.is-live { background: var(--success-wash); color: var(--success-soft); }
.vl-round.is-on { color: var(--accent-soft); }
.vl-round.is-danger-hover:hover { background: var(--danger); color: #fff; }
@keyframes vl-swing { 35% { transform: rotate(-18deg); } 70% { transform: rotate(6deg); } }

.vl-btn {
  height: 38px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 14px/1 var(--vl-font); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  background: var(--vl-soft); color: rgba(var(--ink-rgb), 0.9);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s;
}
.vl-btn:hover:not(:disabled) { transform: translateY(-1px); background: rgba(var(--ink-rgb), 0.14); }
.vl-btn:active:not(:disabled) { transform: scale(0.97); }
.vl-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.vl-btn--pill { border-radius: 999px; }
.vl-btn--sm { height: 32px; padding: 0 14px; font-size: 13px; }
.vl-btn--primary { background: var(--accent); color: #fff; }
.vl-btn--primary:hover:not(:disabled) { background: var(--accent-hover); }
.vl-btn--danger { background: var(--danger); color: #fff; }
.vl-btn--danger:hover:not(:disabled) { background: #e25a4d; }
.vl-btn--ghost, .vl-btn--soft { background: var(--vl-soft); }
.vl-linkbtn { border: 0; background: none; padding: 0; color: var(--accent-soft); cursor: pointer; font: inherit; }
.vl-linkbtn:hover { text-decoration: underline; }

.vl-badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; box-sizing: border-box;
  background: var(--accent); color: #fff; font: 600 12px/22px var(--vl-font); text-align: center;
  font-variant-numeric: tabular-nums; flex: 0 0 auto;
}
.vl-badge[hidden], .vl-dot-badge[hidden] { display: none; }
.vl-dot-badge { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-soft); flex: 0 0 auto; }
/* В «таблетке» «Друзья» — число заявок, а не просто точка */
.vl-pill .vl-dot-badge { width: auto; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: var(--accent); color: #fff; font: 600 11px/18px var(--vl-font); text-align: center; }

/* Аватар: инициалы на нейтральной подложке, синий — только у вас */
.vl-avatar {
  --size: 32px;
  position: relative; flex: 0 0 auto; width: var(--size); height: var(--size); border-radius: 50%;
  display: inline-grid; place-items: center; color: var(--vl-ava-ink);
  font: 600 calc(var(--size) * 0.34) / 1 var(--vl-font); letter-spacing: 0.01em;
}
.vl-avatar__txt { pointer-events: none; }
.vl-avatar.is-ringed { box-shadow: 0 0 0 3px rgba(58, 168, 110, 0.6); }
.vl-presence {
  position: absolute; right: 0; bottom: 0;
  width: max(9px, calc(var(--size) * 0.25)); height: max(9px, calc(var(--size) * 0.25));
  border-radius: 50%; border: 3px solid var(--vl-ring, var(--vl-panel)); background: var(--vl-offline);
  box-sizing: content-box; transform: translate(2px, 2px); transition: background 0.2s;
}
.vl-presence[data-status="online"] { background: var(--vl-online); }
.vl-presence[data-status="idle"] { background: var(--vl-idle); }
.vl-presence[data-status="dnd"] { background: var(--vl-dnd); }
.vl-presence[data-status="offline"] { background: var(--vl-offline); }
.vl-presence[data-call="1"] { background: var(--vl-online); }

/* Живые полоски «идёт звонок» */
.vl-wave { display: inline-flex; align-items: center; gap: 2px; height: 12px; flex: 0 0 auto; }
.vl-wave i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; animation: vl-wave 1.1s ease-in-out infinite; transform-origin: center; }
.vl-wave i:nth-child(2) { animation-delay: 0.12s; }
.vl-wave i:nth-child(3) { animation-delay: 0.24s; }
.vl-wave i:nth-child(4) { animation-delay: 0.36s; }
@keyframes vl-wave { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

/* Заглушки загрузки: неподвижные, мягко проявляются (без мерцания) */
.vl-skel { display: block; background: var(--vl-soft); border-radius: 10px; animation: vl-fade-in 0.4s ease both; }
.vl-skel--circle { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; }
.vl-skel--lg { width: 52px; height: 52px; }
.vl-skel--line { height: 12px; width: 55%; }
.vl-skel--bubble { height: 40px; border-radius: 20px; max-width: 70%; }
@keyframes vl-fade-in { from { opacity: 0; } }
.vl-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--vl-soft-2); border-top-color: var(--accent-soft); display: inline-block; animation: vl-spin 0.8s linear infinite; }
@keyframes vl-spin { to { transform: rotate(360deg); } }

/* ─────────── Левая панель ─────────── */
.vl-side__head { display: flex; align-items: center; gap: 6px; padding: 2px 4px 12px 10px; }
.vl-side__title { flex: 1; margin: 0; font: 700 20px/1.2 var(--vl-font); letter-spacing: -0.02em; }
.vl-side__nav { display: flex; gap: 6px; padding: 0 4px 12px; }
.vl-pill {
  flex: 1; height: 40px; border-radius: 999px; background: var(--vl-hover); color: rgba(var(--ink-rgb), 0.8);
  display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font: 500 14px var(--vl-font);
  transition: background 0.2s var(--ease), color 0.2s;
}
.vl-pill .vl-ico { width: 16px; height: 16px; }
.vl-pill:hover { background: var(--vl-soft-2); color: var(--text); }
.vl-pill.is-active { background: var(--accent); color: #fff; font-weight: 600; }
.vl-pill.is-active .vl-dot-badge { background: #fff; color: var(--accent); }
.vl-side__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--vl-soft-2) transparent; margin: 0 -4px; padding: 0 4px; }
.vl-side__empty { padding: 14px 10px; color: var(--text-faint); font-size: 13px; line-height: 1.5; }
.vl-dm-list { display: flex; flex-direction: column; gap: 4px; }
.vl-dm {
  --vl-ring: var(--vl-panel);
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--vl-r-card);
  color: var(--text); text-decoration: none; transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.vl-dm:hover { background: var(--vl-raised); --vl-ring: var(--vl-raised); }
.vl-dm.is-active { background: var(--vl-raised-2); --vl-ring: var(--vl-raised-2); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.vl-dm.is-muted { opacity: 0.6; }
.vl-dm__text { flex: 1; min-width: 0; }
.vl-dm__row { display: flex; align-items: baseline; gap: 8px; }
.vl-dm__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 15px/1.35 var(--vl-font); }
.vl-dm.is-unread .vl-dm__name, .vl-dm.is-active .vl-dm__name { font-weight: 600; }
.vl-dm__time { font-size: 12px; color: var(--text-faint); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.vl-dm.is-unread .vl-dm__time { color: var(--accent-soft); font-weight: 500; }
.vl-dm__sub { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(var(--ink-rgb), 0.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vl-dm.is-unread .vl-dm__sub { color: var(--text); }
.vl-dm__sub.is-typing { color: var(--accent-soft); }
.vl-dm__sub.is-call { color: var(--success-soft); }
.vl-dm .vl-badge { align-self: flex-end; margin-bottom: 2px; }
.vl-dm.is-skeleton { pointer-events: none; }

.vl-notif-banner {
  margin: 8px 0 0; padding: 12px; border-radius: var(--vl-r-card); background: var(--accent-wash);
  display: grid; grid-template-columns: auto 1fr auto; gap: 8px 10px; align-items: center; font-size: 13px; color: var(--text-dim);
}
.vl-notif-banner[hidden] { display: none; }
.vl-notif-banner > .vl-ico { width: 16px; height: 16px; color: var(--accent-soft); }
.vl-notif-banner > .vl-btn { grid-column: 1 / 3; justify-self: start; }
.vl-notif-banner > .vl-round { grid-row: 1; grid-column: 3; }
.vl-notif-banner > .vl-btn[hidden] { display: none; }

.vl-me { display: flex; align-items: center; margin-top: 8px; flex: 0 0 auto; }
.vl-me__btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: 0; border-radius: 999px; background: rgba(var(--ink-rgb), 0.05); color: var(--text); cursor: pointer; text-align: left; font-family: var(--vl-font); --vl-ring: #181b20; }
.vl-me__btn:hover { background: rgba(var(--ink-rgb), 0.09); }
.vl-me__ava { display: inline-flex; }
.vl-me__text { min-width: 0; }
.vl-me__name { font: 600 14px/1.25 var(--vl-font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-me__sub { font-size: 12px; color: rgba(var(--ink-rgb), 0.55); }
body.vl-offline .vl-me__sub { color: var(--vl-idle); }

/* ─────────── Капсула звонка над чатом ─────────── */
.vl-island {
  position: absolute; top: 16px; left: 50%; z-index: 7; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 16px; box-sizing: border-box;
  border-radius: 999px; background: #050607; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(var(--ink-rgb), 0.06);
  color: var(--vl-idle); animation: vl-island-in 0.4s var(--ease) both; white-space: nowrap;
}
.vl-island.is-live { color: var(--success-soft); }
.vl-island__label { color: var(--text); font-size: 13px; padding-right: 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.vl-island__label b { font-weight: 600; }
.vl-island__time { color: rgba(var(--ink-rgb), 0.55); font-variant-numeric: tabular-nums; }
@keyframes vl-island-in { from { opacity: 0; transform: translate(-50%, -12px) scale(0.96); } }

/* ─────────── Правая часть: шапки ─────────── */
.vl-view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.vl-view-enter { animation: vl-view-in 0.24s var(--ease) both; }
@keyframes vl-view-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes vl-rise { from { opacity: 0; transform: translateY(6px); } }
.vl-view__head { flex: 0 0 auto; height: 76px; display: flex; align-items: center; gap: 14px; padding: 0 20px 0 24px; min-width: 0; }
.vl-view__center { flex: 1; display: grid; place-items: center; }
.vl-view--loading { background: var(--vl-panel); }
.vl-menu-btn { display: none !important; }

/* ─────────── Чат ─────────── */
.vl-chat__head { --vl-ring: var(--vl-panel); }
.vl-chat__head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.vl-chat__head-name { font: 700 20px/1.2 var(--vl-font); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl-chat__head-sub { font-size: 13px; color: rgba(var(--ink-rgb), 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl-chat__head-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.vl-chat__main { flex: 1 1 auto; min-height: 0; position: relative; display: flex; flex-direction: column; }
.vl-chat__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--vl-soft-2) transparent; }
.vl-chat__list { display: flex; flex-direction: column; justify-content: flex-end; min-height: 100%; padding: 12px 28px 10px; box-sizing: border-box; }
.vl-chat__loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; color: var(--text-faint); font-size: 13px; }
.vl-chat__intro { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 16px 28px; animation: vl-rise 0.3s var(--ease) both; }
.vl-chat__intro h2 { margin: 14px 0 2px; font: 700 24px/1.2 var(--vl-font); letter-spacing: -0.02em; }
.vl-chat__intro-user { color: var(--text-faint); font-size: 14px; margin-bottom: 10px; }
.vl-chat__intro p { margin: 0; color: var(--text-dim); font-size: 14px; max-width: 360px; }
.vl-chat__skeleton { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }

.vl-day { align-self: center; margin: 16px 0 10px; font: 500 12px/1 var(--vl-font); color: rgba(var(--ink-rgb), 0.5); }
.vl-unread-divider { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.vl-unread-divider::before, .vl-unread-divider::after { content: ""; flex: 1; height: 1px; background: rgba(110, 168, 245, 0.3); }
.vl-unread-divider span { padding: 5px 12px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-soft); font: 600 12px/1 var(--vl-font); }

/* Пузыри. «Рендер только видимого»: браузер не считает раскладку сообщений вне экрана,
   auto запоминает реальную высоту после показа — прокрутка не прыгает */
.vl-msg { display: flex; flex-direction: column; margin-top: 14px; content-visibility: auto; contain-intrinsic-size: auto 48px; }
.vl-msg.pos-middle, .vl-msg.pos-last { margin-top: 3px; }
.vl-msg.is-mine { align-items: flex-end; }
.vl-msg.is-theirs { align-items: flex-start; }
.vl-msg__wrap { position: relative; display: flex; align-items: center; gap: 8px; max-width: min(72%, 640px); }
.vl-msg.is-mine .vl-msg__wrap { flex-direction: row-reverse; }
.vl-bubble {
  position: relative; min-width: 0; padding: 9px 14px; font: var(--vl-msg-size, 15px)/1.45 var(--vl-font);
  background: var(--vl-field); color: var(--text); border-radius: 20px 20px 20px 6px;
}
.vl-msg.is-theirs.pos-middle .vl-bubble, .vl-msg.is-theirs.pos-last .vl-bubble { border-radius: 6px 20px 20px 6px; }
.vl-msg.is-mine .vl-bubble { background: var(--accent); color: #fff; border-radius: 20px 20px 6px 20px; }
.vl-msg.is-mine.pos-middle .vl-bubble, .vl-msg.is-mine.pos-last .vl-bubble { border-radius: 20px 6px 6px 20px; }
.vl-msg.is-new .vl-bubble { animation: vl-pop 0.32s var(--ease) both; }
.vl-msg.is-mine.is-new .vl-bubble { transform-origin: bottom right; }
.vl-msg.is-theirs.is-new .vl-bubble { transform-origin: bottom left; }
@keyframes vl-pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } }
.vl-msg.is-flash .vl-bubble { animation: vl-flash 1.2s var(--ease); }
@keyframes vl-flash { 0%, 35% { box-shadow: 0 0 0 3px var(--accent-soft); } }
.vl-bubble__text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.vl-bubble__meta {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 10px; float: right; position: relative; top: 5px;
  font-size: 11px; line-height: 1; color: rgba(var(--ink-rgb), 0.45); font-variant-numeric: tabular-nums; user-select: none;
}
.vl-msg.is-mine .vl-bubble__meta { color: rgba(255, 255, 255, 0.72); }
.vl-bubble__meta .vl-ico { width: 11px; height: 11px; }
.vl-bubble .vl-link { color: var(--accent-soft); text-decoration: none; }
.vl-bubble .vl-link:hover { text-decoration: underline; }
.vl-msg.is-mine .vl-bubble .vl-link { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.5); }
.vl-quote {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; margin: 0 0 6px; padding: 6px 10px;
  border: 0; border-radius: 12px; background: rgba(var(--ink-rgb), 0.06); color: inherit; cursor: pointer; text-align: left;
  font: 13px/1.35 var(--vl-font); box-sizing: border-box; transition: background 0.2s;
}
.vl-quote:hover { background: rgba(var(--ink-rgb), 0.1); }
.vl-quote b { color: var(--accent-soft); font-weight: 600; }
.vl-quote span { color: rgba(var(--ink-rgb), 0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.vl-quote .is-muted { font-style: italic; color: rgba(var(--ink-rgb), 0.5); }
.vl-msg.is-mine .vl-quote { background: rgba(255, 255, 255, 0.14); }
.vl-msg.is-mine .vl-quote:hover { background: rgba(255, 255, 255, 0.2); }
.vl-msg.is-mine .vl-quote b { color: #fff; }
.vl-msg.is-mine .vl-quote span { color: rgba(255, 255, 255, 0.8); }
.vl-msg.is-pending .vl-bubble { opacity: 0.6; }
.vl-msg.is-failed .vl-bubble { box-shadow: 0 0 0 1.5px var(--danger); }
.vl-msg__failed { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--danger-soft); }
.vl-msg__failed .vl-ico { width: 14px; height: 14px; }
/* Галочки: ✓ отправлено, ✓✓ доставлено, синие ✓✓ прочитано.
   Вторая галочка дорисовывается, цвет плавно синеет; у нового сообщения первая «рисуется». */
.vl-ticks { --tick: rgba(255, 255, 255, 0.6); --tick-read: #62e6ff; display: inline-flex; align-items: center; color: var(--tick); transition: color 0.35s var(--ease); }
.vl-ticks svg { width: 17px; height: 11px; overflow: visible; }
.vl-ticks path { fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.vl-ticks .t1 { stroke-dasharray: 14; stroke-dashoffset: 0; }
.vl-ticks .t2 { stroke-dasharray: 11; stroke-dashoffset: 11; transition: stroke-dashoffset 0.4s var(--ease) 0.05s; }
.vl-ticks[data-st="delivered"] .t2, .vl-ticks[data-st="read"] .t2 { stroke-dashoffset: 0; }
.vl-ticks[data-st="read"] { color: var(--tick-read); }
.vl-ticks.is-bump svg { animation: vl-tick-bump 0.45s var(--ease); }
@keyframes vl-tick-bump { 40% { transform: scale(1.22); } }
.vl-msg.is-new .vl-ticks .t1 { animation: vl-tick-draw 0.35s var(--ease) 0.1s both; }
@keyframes vl-tick-draw { from { stroke-dashoffset: 14; } }
.vl-bubble__meta.is-over-media .vl-ticks { --tick: rgba(255, 255, 255, 0.8); --tick-read: #62e6ff; }
.vl-ticks.is-still, .vl-ticks.is-still .t2 { transition: none; }
/* В списке чатов — у последнего своего сообщения, серые/синие на тёмной панели */
.vl-dm__row .vl-ticks { --tick: rgba(var(--ink-rgb), 0.5); --tick-read: #4fb4ff; flex: 0 0 auto; align-self: center; margin-right: -4px; }
.vl-dm__row .vl-ticks svg { width: 16px; height: 10px; }
/* Действия у пузыря: маленькая капсула рядом, проявляется при наведении */
.vl-msg__tools {
  display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--vl-raised); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: scale(0.94); pointer-events: none; transition: opacity 0.15s ease-out, transform 0.2s var(--ease); flex: 0 0 auto;
}
.vl-msg__wrap:hover .vl-msg__tools, .vl-msg__wrap:focus-within .vl-msg__tools { opacity: 1; transform: none; pointer-events: auto; }
.vl-msg__tools .vl-round { background: transparent; }
.vl-msg__tools .vl-round:hover { background: rgba(var(--ink-rgb), 0.12); }
.vl-msg__editor { min-width: min(420px, 60vw); }
.vl-msg__edit {
  width: 100%; resize: none; box-sizing: border-box; border: 1px solid rgba(110, 168, 245, 0.55); border-radius: 18px;
  background: var(--vl-field); color: var(--text); font: 15px/1.45 var(--vl-font); padding: 9px 14px; outline: none;
  box-shadow: 0 0 0 4px var(--accent-wash);
}
.vl-msg__edit-hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; padding: 0 6px; }
.vl-msg.is-skeleton { pointer-events: none; content-visibility: visible; }

/* Звонок в ленте — пилюля по центру */
.vl-msg--call { align-items: center; margin: 14px 0 4px; }
.vl-callpill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 7px 7px 14px; border-radius: 999px;
  background: var(--success-wash); color: var(--success-soft); font: 600 13px/1.2 var(--vl-font); max-width: 100%;
}
.vl-callpill:not(:has(.vl-btn)) { padding-right: 14px; }
.vl-callpill .vl-ico { width: 14px; height: 14px; flex: 0 0 auto; }
.vl-callpill.is-bad { background: var(--danger-wash); color: var(--danger-soft); }
.vl-callpill__time { font-weight: 500; opacity: 0.7; font-variant-numeric: tabular-nums; }
.vl-msg--call.is-new .vl-callpill { animation: vl-pop 0.32s var(--ease) both; }

/* «Печатает…» — пузырь с точками */
.vl-bubble.is-typing { display: inline-flex; align-items: center; gap: 4px; padding: 14px 16px; animation: vl-pop 0.3s var(--ease) both; }
.vl-bubble.is-typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(var(--ink-rgb), 0.6); animation: vl-dot 1.2s infinite ease-in-out; }
.vl-bubble.is-typing i:nth-child(2) { animation-delay: 0.15s; }
.vl-bubble.is-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes vl-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-3px); opacity: 1; } }

.vl-jump {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px; border: 0;
  background: var(--accent); color: #fff; font: 600 13px var(--vl-font); cursor: pointer; box-shadow: 0 10px 26px rgba(4, 88, 207, 0.35);
  animation: vl-rise 0.2s var(--ease) both;
}
.vl-jump .vl-ico { width: 15px; height: 15px; }
.vl-jump[hidden] { display: none; }

/* Поле ввода: «таблетка» и отдельная круглая кнопка отправки */
.vl-composer { flex: 0 0 auto; padding: 0 20px 18px; }
.vl-reply-bar {
  display: flex; align-items: center; gap: 10px; margin: 0 62px 8px 0; padding: 8px 8px 8px 16px; border-radius: 18px;
  background: var(--vl-raised); font-size: 13px; color: var(--text-dim); animation: vl-rise 0.18s var(--ease) both;
}
.vl-reply-bar[hidden] { display: none; }
.vl-reply-bar > .vl-ico { width: 16px; height: 16px; color: var(--accent-soft); flex: 0 0 auto; }
.vl-reply-bar__body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.vl-reply-bar__body b { color: var(--accent-soft); font-weight: 600; }
.vl-reply-bar__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-faint); }
.vl-composer__box { display: flex; align-items: flex-end; gap: 10px; }
.vl-composer__box[hidden] { display: none; }
.vl-composer__field {
  flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 8px; min-height: 52px; padding: 0 20px; box-sizing: border-box;
  border-radius: 26px; background: var(--vl-field); border: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s;
}
.vl-composer__field:focus-within { border-color: transparent; box-shadow: none; }
.vl-composer__input {
  flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; color: var(--text);
  font: 15px/1.45 var(--vl-font); padding: 14px 0; max-height: 40vh; overflow-y: auto;
}
.vl-composer__input::placeholder { color: var(--text-faint); }
.vl-composer__counter { font-size: 12px; color: var(--text-faint); padding-bottom: 17px; font-variant-numeric: tabular-nums; }
.vl-composer__counter.is-over { color: var(--danger-soft); font-weight: 700; }
.vl-composer__counter[hidden] { display: none; }
.vl-composer__send {
  width: 52px; height: 52px; flex: 0 0 auto; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(4, 88, 207, 0.35);
  transition: transform 0.25s var(--ease), background 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.vl-composer__send .vl-ico { width: 20px; height: 20px; }
.vl-composer__send:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
.vl-composer__send:active:not(:disabled) { transform: scale(0.94); }
.vl-composer__send:disabled { background: var(--vl-field); color: var(--text-faint); box-shadow: none; cursor: default; }
.vl-composer__blocked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 20px; border-radius: 26px; background: var(--vl-field); color: var(--text-dim); font-size: 14px; }
.vl-composer__blocked[hidden] { display: none; }

/* ─────────── Друзья ─────────── */
.vl-friends { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--vl-gap); }
.vl-panel { background: var(--vl-panel); border-radius: var(--vl-r-panel); box-shadow: var(--vl-highlight); }
.vl-friends__top { flex: 0 0 auto; padding: 22px 24px 24px; }
.vl-friends__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.vl-friends__title { margin: 0; font: 700 28px/1.15 var(--vl-font); letter-spacing: -0.02em; }
.vl-friends__count { font: 600 14px var(--vl-font); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.vl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.vl-tiles__empty { margin: 0; color: var(--text-faint); font-size: 14px; }
.vl-tile {
  --vl-ring: var(--vl-raised);
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: var(--vl-raised); cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease); animation: vl-fade-in 0.3s ease both; min-width: 0;
}
.vl-tile:hover { transform: translateY(-3px); background: var(--vl-raised-2); --vl-ring: var(--vl-raised-2); }
.vl-tile.is-featured { grid-column: span 2; }
.vl-tile.is-skeleton { cursor: default; }
.vl-tile__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.vl-tile__name { font: 600 16px var(--vl-font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-tile.is-featured .vl-tile__name { font-size: 17px; font-weight: 700; }
.vl-tile__sub { font-size: 13px; color: rgba(var(--ink-rgb), 0.55); }
.vl-tile__sub.is-call { color: var(--success-soft); }
.vl-tile__acts { display: flex; gap: 6px; opacity: 0; transform: scale(0.85); transition: opacity 0.2s ease-out, transform 0.25s var(--ease); }
.vl-tile:hover .vl-tile__acts, .vl-tile:focus-within .vl-tile__acts { opacity: 1; transform: none; }
.vl-tile--more { justify-content: center; border: 0; color: var(--text-dim); font: 600 14px var(--vl-font); }

.vl-friends__bottom { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 18px 16px 12px; }
.vl-friends__bar { display: flex; align-items: center; gap: 12px; padding: 4px 8px 12px; flex-wrap: wrap; }
.vl-chips { display: flex; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; }
.vl-chip {
  position: relative; height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--vl-soft); color: rgba(var(--ink-rgb), 0.8);
  font: 500 14px var(--vl-font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.2s var(--ease), color 0.2s, transform 0.2s var(--ease);
}
.vl-chip:hover { background: var(--vl-soft-2); color: var(--text); }
.vl-chip.is-active { background: #f2f5f9; color: #0f1115; font-weight: 600; }
html[data-theme="light"] .vl-chip.is-active { background: #15202b; color: #fff; }
.vl-chip__count { font-variant-numeric: tabular-nums; opacity: 0.65; }
.vl-chip.has-new::after { content: ""; position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-soft); }
/* Добавить в друзья: поле как на входе (anker.js) и круглая кнопка на уровне «таблетки» */
.vl-add { display: flex; align-items: flex-start; gap: 10px; padding: 0 8px; }
.vl-add .vl-fld-host { flex: 1; min-width: 0; }
.vl-add .vl-round { --s: 52px; margin-top: 22px; }
.vl-friend-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--vl-soft-2) transparent; }
.vl-friend {
  --vl-ring: var(--vl-panel);
  display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; cursor: pointer;
  transition: background 0.2s var(--ease);
}
.vl-friend:hover { background: var(--vl-raised); --vl-ring: var(--vl-raised); }
.vl-friend.is-incoming { background: rgba(4, 88, 207, 0.1); cursor: default; }
.vl-friend.is-skeleton { cursor: default; }
.vl-friend__text { flex: 1; min-width: 0; line-height: 1.3; }
.vl-friend__name { display: flex; align-items: baseline; gap: 8px; min-width: 0; font: 600 15px var(--vl-font); }
.vl-friend__name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-friend__user { font-weight: 400; font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.vl-friend__sub { font-size: 13px; color: rgba(var(--ink-rgb), 0.55); }
.vl-friend.is-incoming .vl-friend__sub { color: var(--accent-soft); }
.vl-friend__sub.is-call { color: var(--success-soft); }
.vl-friend__actions { display: flex; gap: 8px; flex: 0 0 auto; }
.vl-empty { padding: 40px 16px; text-align: center; color: var(--text-faint); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vl-empty__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--vl-soft); display: grid; place-items: center; color: var(--text-faint); }
.vl-empty__icon .vl-ico { width: 26px; height: 26px; }
.vl-empty p { margin: 0; max-width: 360px; font-size: 14px; }

/* ─────────── Поля оболочки: та же анимация, что на входе и регистрации ───────────
   Поле собирает anker.js (подпись внутри «таблетки» всплывает над ней, под строкой
   печатается подсказка); здесь только подгонка под панели. */
.vl-fld-host .fld { margin-bottom: 14px; }
.vl-fld-host .fld input { font-family: var(--vl-font); background: var(--vl-stage); }
.vl-fld-host .fld input:hover { background: #07080b; }
.vl-fld-host .fld__lbl, .vl-fld-host .fld__msg { font-family: var(--vl-font); }
.vl-fld-status { min-height: 0; margin: -2px 20px 12px; font: 500 13px/1.35 var(--vl-font); color: var(--text-faint); }
.vl-fld-status:empty { display: none; }
.vl-fld-status.is-ok { color: var(--success-soft); }
.vl-fld-status.is-err { color: var(--danger-soft); }
.vl-picker .vl-fld-host .fld { margin-bottom: 12px; }

/* ─────────── Быстрый звонок по ссылке: экран после выхода ─────────── */
body.vl-solo #vl-sidebar, body.vl-solo #vl-view, body.vl-solo .vl-fab-menu { display: none !important; }
.vl-btn--ghost-text { margin-top: 10px; background: transparent; color: var(--text-dim); font-weight: 500; }
.vl-btn--ghost-text:hover:not(:disabled) { background: var(--vl-hover); color: var(--text); }

/* ─────────── Профиль (классы settings-* — общие с настройками звонка, см. style.css) ─────────── */
.vl-profile { font-family: var(--vl-font); }
.vl-profile-card { display: flex; align-items: center; gap: 16px; --vl-ring: var(--vl-raised); }
.vl-profile-card__name { font: 700 19px/1.25 var(--vl-font); }
.vl-profile-card__user { font-size: 14px; color: var(--text-dim); margin-top: 2px; }

/* ─────────── Меню и окна ─────────── */
.vl-menu {
  position: fixed; z-index: 3000; min-width: 220px; padding: 6px; border-radius: 16px; background: var(--vl-raised);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05); animation: vl-menu-in 0.14s var(--ease) both;
}
@keyframes vl-menu-in { from { opacity: 0; transform: scale(0.97); } }
.vl-menu__item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: rgba(var(--ink-rgb), 0.85); font: 14px var(--vl-font); cursor: pointer; text-align: left;
}
.vl-menu__item .vl-ico { width: 16px; height: 16px; opacity: 0.8; }
.vl-menu__item:hover { background: var(--vl-soft-2); color: var(--text); outline: none; }
.vl-menu__item.is-danger { color: var(--danger-soft); }
.vl-menu__item.is-danger:hover { background: var(--danger); color: #fff; }
.vl-menu__sep { height: 1px; background: var(--vl-soft); margin: 4px 8px; }

.vl-modal-overlay { position: fixed; inset: 0; z-index: 2700; background: rgba(5, 6, 8, 0.6); display: grid; place-items: center; padding: 16px; animation: vl-fade-in 0.15s ease both; }
.vl-modal-overlay.is-leaving { animation: vl-fade-in 0.15s ease reverse both; }
.vl-modal {
  width: min(420px, 100%); background: var(--vl-raised); border-radius: 24px; padding: 22px; box-sizing: border-box;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05); animation: vl-pop 0.22s var(--ease) both;
}
.vl-modal__title { margin: 0 0 8px; font: 700 19px/1.25 var(--vl-font); letter-spacing: -0.01em; }
.vl-modal__text { margin: 0 0 20px; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.vl-modal__actions { display: flex; justify-content: flex-end; gap: 8px; }
.vl-modal__actions .vl-btn { border-radius: 999px; }
.vl-picker { display: flex; flex-direction: column; gap: 14px; max-height: min(560px, 90dvh); }
.vl-picker__head { display: flex; align-items: center; justify-content: space-between; }
.vl-picker__head .vl-modal__title { margin: 0; }
.vl-picker__list { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 2px; }
.vl-picker__row {
  --vl-ring: var(--vl-raised);
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 14px; background: transparent;
  color: var(--text); cursor: pointer; text-align: left; font: 15px var(--vl-font);
}
.vl-picker__row:hover, .vl-picker__row.is-first { background: var(--vl-soft); }
.vl-picker__name { font-weight: 600; }
.vl-picker__user { color: var(--text-faint); font-size: 13px; }

/* ─────────── Входящий звонок (сайт) ─────────── */
.vl-incoming-wrap { position: fixed; inset: 0; z-index: 2800; display: grid; place-items: center; background: rgba(5, 6, 8, 0.6); animation: vl-fade-in 0.2s ease both; padding: 16px; }
.vl-incoming-wrap.is-leaving { animation: vl-fade-in 0.2s ease reverse both; }
.vl-incoming {
  --vl-ring: var(--vl-raised);
  width: min(340px, 100%); padding: 28px 24px 24px; box-sizing: border-box; border-radius: 28px; background: var(--vl-raised);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex; flex-direction: column; align-items: center; text-align: center; animation: vl-pop 0.4s var(--ease) both;
}
.vl-incoming__ava { position: relative; display: grid; place-items: center; }
.vl-incoming__wave { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--vl-online); animation: vl-ring 2.2s ease-out infinite; }
@keyframes vl-ring { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.6); opacity: 0; } }
.vl-incoming__name { margin-top: 16px; font: 700 22px/1.2 var(--vl-font); letter-spacing: -0.02em; }
.vl-incoming__sub { color: var(--text-dim); font-size: 14px; margin-top: 2px; }
.vl-incoming__actions { display: flex; justify-content: center; gap: 40px; margin-top: 24px; }
.vl-incoming__act { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.vl-call-btn {
  width: 62px; height: 62px; border-radius: 50%; border: 0; color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: transform 0.2s var(--ease), filter 0.2s;
}
.vl-call-btn .vl-ico { width: 24px; height: 24px; }
.vl-call-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.vl-call-btn:active { transform: scale(0.94); }
.vl-call-btn.is-accept { background: var(--success); box-shadow: 0 10px 26px rgba(58, 168, 110, 0.35); }
.vl-call-btn.is-decline { background: var(--danger); box-shadow: 0 10px 26px rgba(217, 74, 61, 0.35); }

/* ─────────── Аватарки-картинки, «Избранное» ─────────── */
.vl-avatar.has-img { background: var(--vl-ava-0) !important; }
.vl-avatar__img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.vl-avatar.has-img .vl-avatar__txt { visibility: hidden; }
.vl-avatar.is-saved, .vl-avatar.is-self { color: #fff; }
.vl-avatar.is-saved .vl-ico { width: 44%; height: 44%; }
.vl-avatar.is-clickable { cursor: pointer; transition: transform 0.2s var(--ease), filter 0.2s; }
.vl-avatar.is-clickable:hover { transform: scale(1.05); filter: brightness(1.08); }
.vl-dm__flag { display: inline-flex; color: var(--text-faint); flex: 0 0 auto; }
.vl-dm__flag .vl-ico { width: 13px; height: 13px; }
.vl-dm__pin { align-self: flex-end; margin-bottom: 3px; color: var(--text-faint); display: inline-flex; }
.vl-dm__pin .vl-ico { width: 14px; height: 14px; transform: rotate(35deg); }
.vl-dm.is-muted { opacity: 1; }
.vl-dm.is-muted .vl-badge { background: var(--vl-soft-2); color: var(--text-dim); }

/* ─────────── Шапка чата: кто, поиск, закреп ─────────── */
.vl-chat__head-who {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; margin-left: -8px; padding: 6px 12px 6px 8px; border: 0; border-radius: 18px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background 0.2s var(--ease);
}
/* Имя в шапке — просто нажимается (открывает профиль), без подсветки и заливки */
.vl-chat__head-who:hover { background: transparent; }
.vl-chat__head-who .vl-chat__head-text { flex: 1; }
.vl-round[hidden] { display: none; }

.vl-pinbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px; margin: -8px 20px 8px; padding: 6px 6px 6px 14px; border-radius: 16px;
  background: var(--vl-raised); color: var(--accent-soft); animation: vl-rise 0.2s var(--ease) both;
}
.vl-pinbar[hidden] { display: none; }
.vl-pinbar > .vl-ico { width: 16px; height: 16px; transform: rotate(35deg); flex: 0 0 auto; }
.vl-pinbar__body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 2px 0; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.vl-pinbar__marks { display: flex; flex-direction: column; gap: 2px; align-self: stretch; justify-content: center; }
.vl-pinbar__marks i { width: 2px; height: 6px; border-radius: 1px; background: rgba(110, 168, 245, 0.3); }
.vl-pinbar__marks i.is-on { background: var(--accent-soft); }
.vl-pinbar__text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.vl-pinbar__text b { font: 600 13px var(--vl-font); }
.vl-pinbar__text span { color: var(--text-dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vl-search { flex: 0 0 auto; position: relative; margin: -8px 20px 8px; z-index: 5; animation: vl-rise 0.18s var(--ease) both; }
.vl-search[hidden] { display: none; }
.vl-search__field {
  display: flex; align-items: center; gap: 4px; height: 46px; padding: 0 6px 0 16px; border-radius: 23px; background: var(--vl-field);
}
.vl-search__field > .vl-ico { width: 17px; height: 17px; color: var(--text-faint); flex: 0 0 auto; }
.vl-search__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--text); font: 15px var(--vl-font); padding: 0 8px; }
.vl-search__input::-webkit-search-cancel-button { display: none; }
.vl-search__count { font: 500 13px var(--vl-font); color: var(--text-faint); padding: 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vl-search__results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: min(360px, 50vh); overflow-y: auto; padding: 6px; border-radius: 18px;
  background: var(--vl-raised); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); scrollbar-width: thin;
}
.vl-search__results[hidden] { display: none; }
.vl-search__row {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 12px; background: transparent;
  color: var(--text); text-align: left; cursor: pointer; font: 14px var(--vl-font); --vl-ring: var(--vl-raised);
}
.vl-search__row:hover, .vl-search__row.is-active { background: var(--vl-soft-2); }
.vl-search__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.vl-search__top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.vl-search__top time { color: var(--text-faint); white-space: nowrap; }
.vl-search__snip { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-search__snip mark, .vl-hit { background: rgba(224, 162, 58, 0.35); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Обои: слой под лентой, слегка притемнён ради читаемости */
.vl-view--chat { position: relative; isolation: isolate; }
.vl-view--chat.has-wall::before { content: ""; position: absolute; inset: 0; background: var(--vl-wall); z-index: -1; pointer-events: none; }
.vl-view--chat.wall-in::before { animation: vl-fade-in 0.35s ease both; }
.vl-view--chat.has-wall::after { content: ""; position: absolute; inset: 0; background: rgba(10, 12, 15, 0.18); z-index: -1; pointer-events: none; }
/* С обоями: шапка — стеклянная полоса, поле ввода лежит прямо на обоях, без подложки */
.vl-view--chat.has-wall .vl-chat__head { background: rgba(19, 22, 27, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: 3; }
.vl-view--chat.has-wall .vl-composer { background: transparent; }
.vl-view--chat.has-wall .vl-composer__field, .vl-view--chat.has-wall .vl-reply-bar, .vl-view--chat.has-wall .vl-tray { background: rgba(31, 36, 45, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.vl-view--chat.has-wall .vl-composer__send.is-mic { background: rgba(31, 36, 45, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.vl-chat__main > * { position: relative; z-index: 1; }
.vl-chat__main > .vl-jump { position: absolute; z-index: 3; }
.vl-view--chat.has-wall .vl-day span { padding: 5px 12px; border-radius: 999px; background: rgba(10, 12, 15, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vl-view--chat.has-wall .vl-chat__intro { background: rgba(10, 12, 15, 0.45); border-radius: 24px; margin: 12px auto; padding: 24px 28px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

.vl-dropzone { position: absolute !important; inset: 10px; z-index: 6 !important; display: grid; place-items: center; border-radius: 22px; border: 2px dashed rgba(110, 168, 245, 0.6); background: rgba(10, 12, 15, 0.82); pointer-events: none; animation: vl-fade-in 0.15s ease both; }
.vl-dropzone[hidden] { display: none; }
.vl-dropzone__card { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-dim); font-size: 14px; }
.vl-dropzone__card .vl-ico { width: 34px; height: 34px; color: var(--accent-soft); margin-bottom: 6px; animation: vl-swing 0.9s var(--ease) infinite alternate; }
.vl-dropzone__card b { color: var(--text); font: 600 17px var(--vl-font); }

/* ─────────── Вложения в пузыре ─────────── */
.vl-bubble.has-files { display: flex; flex-direction: column; gap: 6px; }
.vl-bubble.has-media { padding: 4px 4px 9px; }
.vl-bubble.has-media > .vl-bubble__text, .vl-bubble.has-media > .vl-quote, .vl-bubble.has-media > .vl-fwd { margin-left: 10px; margin-right: 10px; width: auto; }
.vl-bubble.has-media > .vl-quote { margin-top: 6px; }
.vl-bubble.is-media-only { padding: 0; background: transparent !important; }
.vl-media-grid { display: grid; gap: 3px; border-radius: 16px; overflow: hidden; }
.vl-media-grid.n-2 { grid-template-columns: 1fr 1fr; width: min(380px, 62vw); }
.vl-media-grid.n-3 { grid-template-columns: 1fr 1fr; width: min(380px, 62vw); }
.vl-media-grid.n-3 .vl-media-cell:first-child { grid-column: 1 / 3; aspect-ratio: 2 / 1; }
.vl-media-grid.n-4 { grid-template-columns: 1fr 1fr; width: min(380px, 62vw); }
.vl-media-cell {
  position: relative; display: block; padding: 0; border: 0; background: #0d1016; cursor: pointer; overflow: hidden; aspect-ratio: 1; max-width: 100%;
}
.vl-media-grid.n-1 .vl-media-cell { max-width: min(360px, 62vw); min-height: 90px; }
.vl-media-cell[hidden] { display: none; }
.vl-media-cell img, .vl-media-cell video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s var(--ease), filter 0.2s; }
.vl-media-cell:hover img, .vl-media-cell:hover video { transform: scale(1.03); filter: brightness(1.06); }
.vl-media-cell__play {
  position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 12, 15, 0.6); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: transform 0.2s var(--ease);
}
.vl-media-cell__play .vl-ico { width: 20px; height: 20px; margin-left: 3px; }
.vl-media-cell:hover .vl-media-cell__play { transform: scale(1.08); }
.vl-media-cell__dur { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; background: rgba(10, 12, 15, 0.6); color: #fff; font: 500 11px var(--vl-font); font-variant-numeric: tabular-nums; }
.vl-media-cell__dur .vl-ico { width: 10px; height: 10px; }
.vl-media-cell__more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 12, 15, 0.55); color: #fff; font: 700 22px var(--vl-font); }
.vl-bubble__meta.is-over-media {
  position: absolute; right: 8px; bottom: 8px; top: auto; float: none; margin: 0; padding: 4px 8px; border-radius: 999px;
  background: rgba(10, 12, 15, 0.55); color: #fff !important; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vl-upload-progress { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); overflow: hidden; margin: 2px 8px 0; }
.vl-upload-progress i { display: block; height: 100%; background: currentColor; border-radius: 2px; transition: width 0.2s linear; }
.vl-bubble.is-media-only .vl-upload-progress { position: absolute; left: 10px; right: 10px; bottom: 10px; margin: 0; background: rgba(10, 12, 15, 0.5); color: #fff; }
.vl-msg.is-pending .vl-bubble.has-files { opacity: 0.85; }

.vl-fwd { display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; color: var(--accent-soft); font: 13px var(--vl-font); cursor: pointer; text-align: left; }
.vl-fwd .vl-ico { width: 14px; height: 14px; flex: 0 0 auto; }
.vl-fwd b { font-weight: 600; }
.vl-msg.is-mine .vl-fwd { color: rgba(255, 255, 255, 0.85); }
.vl-fwd:hover b { text-decoration: underline; }

.vl-filecard {
  display: flex; align-items: center; gap: 12px; min-width: 220px; max-width: 340px; padding: 6px 10px 6px 6px; border-radius: 14px;
  background: rgba(var(--ink-rgb), 0.06); color: inherit; text-decoration: none; transition: background 0.2s var(--ease);
}
.vl-filecard:hover { background: rgba(var(--ink-rgb), 0.1); }
.vl-msg.is-mine .vl-filecard { background: rgba(255, 255, 255, 0.14); }
.vl-msg.is-mine .vl-filecard:hover { background: rgba(255, 255, 255, 0.2); }
.vl-filecard__ico { position: relative; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.vl-msg.is-mine .vl-filecard__ico { background: #fff; color: var(--accent); }
.vl-filecard__ico .vl-ico { width: 20px; height: 20px; }
.vl-filecard__ico b { position: absolute; bottom: 5px; font: 700 8px/1 var(--vl-font); letter-spacing: 0.02em; }
.vl-filecard__ico:has(b) .vl-ico { transform: translateY(-3px); }
.vl-filecard__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.vl-filecard__name { font: 500 14px var(--vl-font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-filecard__size { font-size: 12px; opacity: 0.65; }
.vl-filecard__dl { display: inline-flex; opacity: 0.55; transition: opacity 0.2s, transform 0.25s var(--ease); }
.vl-filecard__dl .vl-ico { width: 16px; height: 16px; }
.vl-filecard:hover .vl-filecard__dl { opacity: 1; transform: translateY(2px); }
.vl-filecard.is-pending { opacity: 0.8; }

.vl-voice { --p: 0; display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 320px; }
.vl-voice__btn {
  width: 40px; height: 40px; flex: 0 0 auto; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--accent); color: #fff; transition: transform 0.2s var(--ease), background 0.2s;
}
.vl-voice__btn:hover { transform: scale(1.06); }
.vl-voice__btn:active { transform: scale(0.94); }
.vl-voice__btn .vl-ico { width: 16px; height: 16px; }
.vl-voice:not(.is-playing) .vl-voice__btn .vl-ico { margin-left: 2px; }
.vl-voice.is-mine .vl-voice__btn { background: #fff; color: var(--accent); }
.vl-voice__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vl-voice__wave {
  height: 26px; display: flex; align-items: center; gap: 2px; cursor: pointer; outline: none;
  -webkit-mask: linear-gradient(90deg, #000 calc(var(--p) * 100%), rgba(0, 0, 0, 0.35) calc(var(--p) * 100%));
          mask: linear-gradient(90deg, #000 calc(var(--p) * 100%), rgba(0, 0, 0, 0.35) calc(var(--p) * 100%));
}
.vl-voice__wave i { flex: 1; min-width: 2px; max-width: 3px; border-radius: 2px; background: var(--accent-soft); }
.vl-voice.is-mine .vl-voice__wave i { background: #fff; }
.vl-voice.is-playing .vl-voice__wave i { transition: height 0.2s; }
.vl-voice__time { font-size: 12px; opacity: 0.7; font-variant-numeric: tabular-nums; }
.vl-audiocard { display: flex; flex-direction: column; gap: 4px; }
.vl-audiocard__name { font-size: 12.5px; opacity: 0.8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }

/* Смахнуть влево — ответить: пузырь едет, справа проявляется стрелка */
.vl-msg { --swipe: 0px; }
.vl-msg__wrap { transition: transform 0.25s var(--ease); }
.vl-msg.is-swiping .vl-msg__wrap { transform: translateX(var(--swipe)); transition: none; }
.vl-msg__swipe {
  position: absolute; right: -44px; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%; display: grid; place-items: center;
  background: var(--vl-soft-2); color: var(--text); opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.2s var(--ease), background 0.2s;
  pointer-events: none;
}
.vl-msg.is-mine .vl-msg__swipe { right: auto; left: calc(100% + 12px); }
.vl-msg__swipe .vl-ico { width: 15px; height: 15px; }
.vl-msg.is-swiping .vl-msg__swipe { opacity: 0.7; transform: scale(0.85); }
.vl-msg.is-swipe-ready .vl-msg__swipe { opacity: 1; transform: scale(1); background: var(--accent); color: #fff; }

/* ─────────── Поле ввода: скрепка, лоток файлов, голосовое ─────────── */
.vl-composer__field { padding-left: 6px; }
.vl-composer__attach {
  width: 40px; height: 40px; margin: 6px 0; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: var(--text-dim);
  display: grid; place-items: center; cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.25s var(--ease);
}
.vl-composer__attach .vl-ico { width: 20px; height: 20px; transition: transform 0.35s var(--ease); }
.vl-composer__attach:hover { background: var(--vl-soft); color: var(--text); }
.vl-composer__attach:hover .vl-ico { transform: rotate(-20deg); }
.vl-composer__field[hidden] { display: none; }
.vl-composer__send.is-mic { background: var(--vl-field); color: var(--text); box-shadow: none; }
.vl-composer__send.is-mic:hover { background: rgba(var(--ink-rgb), 0.14); }
.vl-composer__send.is-swap .vl-ico { animation: vl-swap 0.25s var(--ease) both; }
@keyframes vl-swap { from { opacity: 0; transform: scale(0.5) rotate(-30deg); } }
.vl-composer__box.is-recording .vl-composer__send { background: var(--danger); color: #fff; box-shadow: 0 8px 24px rgba(217, 74, 61, 0.35); }
.vl-rec { align-items: center !important; gap: 12px !important; padding: 0 8px 0 20px !important; }
.vl-rec__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: vl-blink 1s ease-in-out infinite; }
@keyframes vl-blink { 50% { opacity: 0.25; } }
.vl-rec__time { font: 600 15px var(--vl-font); font-variant-numeric: tabular-nums; min-width: 44px; }
.vl-rec__hint { flex: 1; color: var(--text-faint); font-size: 14px; }
.vl-rec .vl-btn--ghost-text { margin: 0; }

.vl-tray { display: flex; gap: 8px; margin: 0 62px 8px 0; padding: 8px; border-radius: 20px; background: var(--vl-raised); overflow-x: auto; scrollbar-width: thin; animation: vl-rise 0.18s var(--ease) both; }
.vl-tray[hidden] { display: none; }
.vl-tray__item { position: relative; flex: 0 0 auto; width: 72px; height: 72px; border-radius: 14px; overflow: hidden; background: var(--vl-field); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.vl-tray__item.is-file, .vl-tray__item.is-audio { width: 150px; flex-direction: row; justify-content: flex-start; padding: 0 30px 0 10px; box-sizing: border-box; }
.vl-tray__item img, .vl-tray__item video { width: 100%; height: 100%; object-fit: cover; }
.vl-tray__ico { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; }
.vl-tray__ico .vl-ico { width: 17px; height: 17px; }
.vl-tray__name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vl-tray__x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 12, 15, 0.7); color: #fff; cursor: pointer; transition: transform 0.2s var(--ease), background 0.2s;
}
.vl-tray__x:hover { background: var(--danger); transform: scale(1.1); }
.vl-tray__x .vl-ico { width: 11px; height: 11px; }

/* Галочка «удалить и у собеседника» */
.vl-check { display: flex; align-items: center; gap: 10px; margin: -6px 0 20px; font-size: 14px; cursor: pointer; user-select: none; }
.vl-check input { position: absolute; opacity: 0; pointer-events: none; }
.vl-check__box { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 6px; border: 1.5px solid var(--vl-soft-2); display: grid; place-items: center; color: transparent; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.vl-check__box .vl-ico { width: 13px; height: 13px; stroke-width: 3; }
.vl-check input:checked + .vl-check__box { background: var(--danger); border-color: var(--danger); color: #fff; }
.vl-check.is-accent input:checked + .vl-check__box { background: var(--accent); border-color: var(--accent); }
.vl-wall .vl-check { margin: 4px 0 16px; }

/* ─────────── Просмотрщик фото и видео ─────────── */
.vl-lightbox { position: fixed; inset: 0; z-index: 3200; background: rgba(5, 6, 8, 0.94); display: flex; flex-direction: column; animation: vl-fade-in 0.16s ease both; font-family: var(--vl-font); }
.vl-lightbox.is-leaving { animation: vl-fade-in 0.16s ease reverse both; }
.vl-lightbox__bar { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 12px) 14px 12px 20px; }
.vl-lightbox__count { color: var(--text-dim); font-size: 14px; font-variant-numeric: tabular-nums; }
.vl-lightbox__spacer { flex: 1; }
/* Фото целиком в окне: в grid высота «100%» не считалась, и высокое фото вылезало вниз —
   теперь flex с явной высотой, картинка вписывается (contain) */
.vl-lightbox__stage { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 64px 20px; overflow: hidden; }
.vl-lightbox__stage img, .vl-lightbox__stage video {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; min-height: 0; object-fit: contain;
  border-radius: 12px; animation: vl-pop 0.22s var(--ease) both;
}
.vl-lightbox__nav { position: absolute; top: 50%; margin-top: -21px; --s: 42px; }
.vl-lightbox__nav.is-prev { left: 14px; }
.vl-lightbox__nav.is-next { right: 14px; }
.vl-lightbox__caption { padding: 0 20px calc(env(safe-area-inset-bottom) + 18px); text-align: center; color: var(--text-dim); font-size: 14px; white-space: pre-wrap; max-height: 20vh; overflow: auto; }

/* ─────────── Профиль собеседника ─────────── */
.vl-ucard-overlay { align-items: center; }
.vl-ucard {
  --vl-ring: var(--vl-raised);
  position: relative; width: min(480px, 100%); max-height: min(760px, 92dvh); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 28px; background: var(--vl-raised); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: vl-pop 0.26s var(--ease) both; font-family: var(--vl-font);
}
.vl-ucard__banner { flex: 0 0 auto; aspect-ratio: 3 / 1; background: linear-gradient(135deg, #1b2a44, #0458cf 60%, #2a3b63); position: relative; overflow: hidden; }
.vl-ucard.is-saved .vl-ucard__banner { background: linear-gradient(135deg, #0a3a86, #0458cf 55%, #3d7fe0); }
.vl-ucard__banner.has-media { background: #0d1016; }
.vl-ucard__banner img, .vl-ucard__banner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: vl-fade-in 0.4s ease both; }
.vl-ucard__banner::after { content: ""; position: absolute; inset: auto 0 0; height: 50%; background: linear-gradient(transparent, rgba(26, 30, 37, 0.5)); }
.vl-ucard__close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.vl-ucard__head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px 14px; padding: 0 20px 16px; margin-top: -48px; flex-wrap: wrap; }
.vl-ucard__head .vl-ucard__who { order: 3; flex: 1 1 100%; }
.vl-ucard__head .vl-ucard__actions { order: 2; }
.vl-ucard__ava .vl-avatar { box-shadow: 0 0 0 6px var(--vl-raised); }
.vl-ucard__ava .vl-presence { --vl-ring: var(--vl-raised); }
.vl-ucard__who { min-width: 0; padding-top: 4px; }
.vl-ucard__name { margin: 0; font: 700 22px/1.2 var(--vl-font); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; }
.vl-ucard__user { color: var(--text-dim); font-size: 14px; margin-top: 2px; }
.vl-ucard__status, .vl-ucard__since { color: var(--text-faint); font-size: 13px; margin-top: 4px; }
.vl-ucard__since[hidden], .vl-ucard__status[hidden] { display: none; }
.vl-ucard__actions { display: flex; gap: 8px; align-items: center; padding-bottom: 4px; }
.vl-ucard__actions .vl-ico { width: 15px; height: 15px; }
.vl-ucard__tabs { display: flex; gap: 6px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none; flex: 0 0 auto; border-bottom: 1px solid var(--vl-soft); }
.vl-ucard__tabs .vl-chip { flex: 0 0 auto; height: 34px; font-size: 13.5px; }
.vl-ucard__tabs .vl-chip .vl-ico { width: 15px; height: 15px; }
.vl-ucard__pane { flex: 1 1 auto; min-height: 200px; overflow-y: auto; padding: 12px 12px 16px; scrollbar-width: thin; }
.vl-ucard__loading, .vl-ucard__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 180px; color: var(--text-faint); text-align: center; font-size: 14px; }
.vl-ucard__empty p { margin: 0; max-width: 260px; }
.vl-ucard__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 14px; overflow: hidden; }
.vl-ucard__cell { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: #0d1016; cursor: pointer; overflow: hidden; }
.vl-ucard__cell img, .vl-ucard__cell video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s var(--ease); }
.vl-ucard__cell:hover img, .vl-ucard__cell:hover video { transform: scale(1.05); }
.vl-ucard__list { display: flex; flex-direction: column; gap: 4px; }
.vl-ucard__row { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 14px; }
.vl-ucard__row > :first-child { flex: 1; min-width: 0; max-width: none; }
.vl-ucard__row .vl-filecard { background: transparent; }
.vl-ucard__row .vl-filecard:hover { background: var(--vl-soft); }
.vl-ucard__voice { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; }
.vl-ucard__voice .vl-voice { max-width: none; }
.vl-ucard__by { font: 600 13px var(--vl-font); }
.vl-ucard__when { flex: 0 0 auto; border: 0; background: none; color: var(--text-faint); font: 12px var(--vl-font); cursor: pointer; padding: 6px 8px; border-radius: 10px; }
.vl-ucard__when:hover { background: var(--vl-soft); color: var(--text); }
.vl-ucard__link { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 12px; color: inherit; text-decoration: none; min-width: 0; }
.vl-ucard__link:hover { background: var(--vl-soft); }
.vl-ucard__link-ico { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; background: var(--accent-wash); color: var(--accent-soft); display: grid; place-items: center; font: 700 17px var(--vl-font); }
.vl-ucard__link-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.vl-ucard__link-text b { font: 600 14px var(--vl-font); }
.vl-ucard__link-text span { color: var(--accent-soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-ucard__more { display: flex; margin: 12px auto 0; }

/* Аватарку и фон можно открыть целиком */
.vl-ucard__ava.is-openable, .vl-pcard__ava.is-openable, .vl-ucard__banner.is-openable, .vl-pcard__banner.has-media { cursor: pointer; }
.vl-ucard__ava.is-openable .vl-avatar, .vl-pcard__ava.is-openable .vl-avatar { transition: transform 0.25s var(--ease), filter 0.2s; }
.vl-ucard__ava.is-openable:hover .vl-avatar, .vl-pcard__ava.is-openable:hover .vl-avatar { transform: scale(1.04); filter: brightness(1.08); }

/* ─────────── Выбор области аватарки ─────────── */
.vl-crop { width: auto; max-width: calc(100vw - 32px); }
.vl-crop .vl-modal__text { margin-bottom: 14px; }
.vl-crop__stage {
  position: relative; margin: 0 auto; max-width: 100%; border-radius: 18px; overflow: hidden; background: #07080b;
  cursor: grab; touch-action: none; user-select: none; outline: none;
}
.vl-crop__stage.is-dragging { cursor: grabbing; }
.vl-crop__img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; pointer-events: none; will-change: transform; }
/* Круглая рамка: всё вокруг затемнено */
.vl-crop__ring { position: absolute; border-radius: 50%; box-sizing: border-box; box-shadow: 0 0 0 400px rgba(10, 12, 15, 0.62); outline: 2px solid rgba(255, 255, 255, 0.85); pointer-events: none; }
.vl-crop__ring.is-rect { border-radius: 12px; }
/* Фон с выбранной рамкой: размеры и сдвиг ставит bannerMedia (ui.js) */
.vl-ucard__banner .is-cropped, .vl-pcard__banner .is-cropped { object-fit: fill; max-width: none; }
.vl-crop__bar { display: flex; align-items: center; gap: 12px; margin: 16px 4px 20px; color: var(--text-faint); }
.vl-crop__bar .vl-ico { width: 18px; height: 18px; flex: 0 0 auto; }
.vl-crop__bar .vl-ico.is-small { width: 13px; height: 13px; }
.vl-crop__zoom { flex: 1; accent-color: var(--accent); cursor: pointer; }

/* Уведомления на этом устройстве: кнопки нет, когда включать нечего */
.settings-card-actions[hidden] { display: none; }

/* ─────────── Контакт: своё имя для человека ─────────── */
.vl-contact { display: flex; flex-direction: column; gap: 14px; }
.vl-contact__who { --vl-ring: var(--vl-raised); display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--vl-soft); }
.vl-contact__text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.vl-contact__text b { font: 600 15px var(--vl-font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vl-contact__text span { color: var(--text-faint); font-size: 13px; }
.vl-contact .vl-fld-host .fld { margin-bottom: 14px; }
.vl-contact__note { margin: -14px 0 0; font-size: 13px; }
.vl-contact .vl-modal__actions { align-items: center; }
.vl-contact__spacer { flex: 1; }
.vl-contact__remove { margin: 0; color: var(--danger-soft); padding: 0 10px; }
.vl-contact__remove:hover:not(:disabled) { background: var(--danger-wash); color: var(--danger-soft); }

/* ─────────── Обои: выбор ─────────── */
.vl-wall { width: min(520px, 100%); }
.vl-wall-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.vl-wall-tile { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; color: var(--text-dim); font: 12.5px var(--vl-font); cursor: pointer; text-align: center; }
.vl-wall-tile__bg {
  aspect-ratio: 3 / 4; border-radius: 14px; display: grid; place-items: center; color: var(--text-faint); border: 2px solid transparent;
  background: var(--vl-field); transition: transform 0.25s var(--ease), border-color 0.2s;
}
.vl-wall-tile__bg .vl-ico { width: 22px; height: 22px; }
.vl-wall-tile:hover .vl-wall-tile__bg { transform: translateY(-3px); }
.vl-wall-tile.is-active .vl-wall-tile__bg { border-color: var(--accent-soft); }
.vl-wall-tile.is-active { color: var(--text); }
.vl-wall-tile.is-upload .vl-wall-tile__bg { border: 2px dashed var(--vl-soft-2); }
.vl-wall .vl-fld-status { margin: 12px 0 0; }

/* ─────────── Свой профиль: превью фона и аватарки ─────────── */
.vl-pcard { padding: 0 !important; overflow: hidden; flex-shrink: 0; --vl-ring: var(--vl-raised); }
.vl-pcard__banner { aspect-ratio: 3 / 1; background: linear-gradient(135deg, #1b2a44, #0458cf 60%, #2a3b63); position: relative; overflow: hidden; }
.vl-pcard__banner.has-media { background: #0d1016; }
.vl-pcard__banner img, .vl-pcard__banner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vl-pcard__row { display: flex; align-items: flex-start; gap: 14px; padding: 0 18px 16px; margin-top: -34px; position: relative; }
.vl-pcard__row .vl-profile-card__text { padding-top: 42px; min-width: 0; }
.vl-pcard__ava .vl-avatar { box-shadow: 0 0 0 5px var(--vl-raised); }
.vl-pcard__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vl-pcard__actions .vl-btn { display: inline-flex; align-items: center; gap: 8px; }
.vl-pcard__actions .vl-ico { width: 15px; height: 15px; }
.vl-pcard__actions .vl-btn--ghost-text { margin: 0; }
.vl-pcard ~ .settings-card .vl-fld-status { margin: 10px 0 0; }

/* ─────────── Быстрый звонок: кнопка «Чаты» в углу после выхода ─────────── */
.vl-solo-chats {
  position: fixed; z-index: 1500; top: calc(env(safe-area-inset-top) + 14px); left: 14px;
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px 0 8px; border: 0; border-radius: 999px;
  background: rgba(19, 22, 27, 0.85); color: var(--text); font: 600 15px var(--vl-font); cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: vl-rise 0.3s var(--ease) both; transition: transform 0.25s var(--ease), background 0.2s;
}
.vl-solo-chats:hover { transform: translateY(-1px); background: rgba(30, 35, 44, 0.92); }
.vl-solo-chats:active { transform: scale(0.97); }
.vl-solo-chats__ico { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; overflow: hidden; }
.vl-solo-chats__ico .vl-ico { width: 15px; height: 15px; transform-origin: 30% 80%; }
/* Облачко чата один раз легко качается при наведении — как значки на других кнопках */
.vl-solo-chats:hover .vl-solo-chats__ico .vl-ico { animation: vl-chat-nudge 0.5s var(--ease) 1; }
@keyframes vl-chat-nudge { 30% { transform: rotate(-12deg) scale(1.06); } 65% { transform: rotate(5deg); } 100% { transform: none; } }
body.in-call .vl-solo-chats, body:not(.vl-solo) .vl-solo-chats { display: none; }
body.vl-solo .lobby-screen { padding-top: 64px; }

/* Слои: окно профиля и уведомления — поверх списка чатов (на телефоне он на весь экран) */
body.vl-shell .settings-overlay { z-index: 2600; } /* окна (обрезка аватарки, подтверждения) — 2700, выше него */
body.vl-shell .toast-container { z-index: 3300; }

/* «Идёт звонок — вернуться»: только на телефоне, на экране списка чатов */
.vl-side__call {
  display: none; align-items: center; gap: 10px; margin: 0 4px 12px; padding: 12px 16px; border: 0; border-radius: var(--vl-r-card);
  background: var(--success-wash); color: var(--success-soft); font: 500 14px var(--vl-font); cursor: pointer; text-align: left;
  animation: vl-rise 0.2s var(--ease) both;
}
.vl-side__call span { flex: 1; }
.vl-side__call b { font-weight: 600; }

/* Пальцем: долгое нажатие открывает меню — без системного выделения текста и «лупы» iPhone */
@media (hover: none) {
  .vl-bubble, .vl-dm, .vl-friend, .vl-tile { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  .vl-msg__edit { -webkit-user-select: text; user-select: text; }
}

/* Профиль на телефоне: разделы и «Выйти» переносятся на вторую строку, а не уезжают за край */
@media (max-width: 600px) {
  .vl-profile .settings-nav { flex-wrap: wrap; gap: 4px; border-radius: 20px; overflow: visible; }
  .vl-profile .settings-nav__group { display: none; }
  .vl-profile .settings-nav__item { flex: 1 1 auto; justify-content: center; }
}

/* ─────────── Заливка от курсора (как у кнопок звонка): цвет круга = цвет наведения ─────────── */
.has-fill-keep { isolation: isolate; }
@media (hover: hover) {
  .has-fill-keep:hover {
    transition-property: background, background-color, color, border-color, box-shadow, transform;
    transition-duration: 0s, 0s, 0.3s, 0.3s, 0.3s, 0.18s;
    transition-delay: 99999s, 99999s, 0s, 0s, 0s, 0s;
  }
}
.vl-round, .vl-btn, .vl-btn--ghost, .vl-btn--soft, .vl-composer__send.is-mic { --ank-fill: rgba(var(--ink-rgb), 0.14); }
.vl-round.is-ghost, .vl-composer__attach, .vl-picker__row, .vl-quote, .vl-filecard, .vl-ucard__when, .vl-ucard__link, .vl-fwd { --ank-fill: var(--vl-soft-2); }
.vl-round.is-accent, .vl-btn--primary, .vl-composer__send, .vl-jump, .vl-voice__btn, .vl-pill.is-active { --ank-fill: var(--accent-hover); }
.vl-round.is-danger, .vl-btn--danger, .vl-menu__item.is-danger, .vl-tray__x { --ank-fill: var(--danger); }
.vl-round.is-glass { --ank-fill: rgba(40, 45, 55, 0.95); }
.vl-round.is-danger-hover { --ank-fill: var(--danger); }
.vl-btn--ghost-text, .vl-me__btn, .vl-chat__head-who, .vl-pinbar__body { --ank-fill: rgba(var(--ink-rgb), 0.07); }
.vl-pill, .vl-chip, .vl-menu__item, .vl-search__row { --ank-fill: var(--vl-soft-2); }
.vl-chip.is-active { --ank-fill: #ffffff; }
.vl-dm, .vl-friend { --ank-fill: var(--vl-raised); }
.vl-dm.is-active, .vl-tile { --ank-fill: var(--vl-raised-2); }
.settings-nav__item { --ank-fill: rgba(var(--ink-rgb), 0.06); }
.settings-nav__item.active { --ank-fill: var(--accent-hover); }
.vl-call-btn.is-accept { --ank-fill: #46c283; }
.vl-call-btn.is-decline { --ank-fill: #e25a4d; }
.vl-solo-chats { --ank-fill: rgba(30, 35, 44, 0.95); }
.vl-side__call { --ank-fill: rgba(58, 168, 110, 0.28); }
.vl-msg.is-mine .vl-quote, .vl-msg.is-mine .vl-filecard { --ank-fill: rgba(255, 255, 255, 0.22); }
.vl-msg.is-mine .vl-voice__btn { --ank-fill: #e8f0ff; }
.vl-wall-tile__bg { --ank-fill: rgba(var(--ink-rgb), 0.08); }
/* Профиль в настройках — разделы таблетками, как кнопки звонка */
.vl-profile .settings-nav__item { border-radius: 999px; }

/* ─────────── Телефон и узкие окна: без отступов, список — выезжающая панель ─────────── */
.vl-fab-menu { display: none; }
@media (max-width: 860px) {
  body.vl-ready #vl-shell { padding: 0; gap: 0; }
  body.vl-ready #vl-main { border-radius: 0; }
  body.vl-ready.vl-route-friends:not(.vl-show-app) #vl-main { padding: 0; }
  /* Телефон: список чатов — отдельный главный экран (/chats) на всю ширину, как в Телеграме.
     Чат, друзья и звонок открываются поверх, стрелка «назад» возвращает к списку. */
  body.vl-ready #vl-sidebar {
    position: fixed; z-index: 2000; top: 0; bottom: 0; left: 0; width: 100%; border-radius: 0;
    padding: calc(env(safe-area-inset-top) + 14px) 10px calc(env(safe-area-inset-bottom) + 10px);
    transform: translateX(-100%); visibility: hidden; transition: transform 0.28s var(--ease), visibility 0s linear 0.28s;
  }
  body.vl-ready.vl-route-chats #vl-sidebar { transform: none; visibility: visible; transition: transform 0.28s var(--ease); }
  .vl-side__call:not([hidden]) { display: flex; }
  .vl-side__head { padding-left: 8px; }
  .vl-dm { padding: 10px 8px; }
  .vl-menu-btn { display: inline-grid !important; }
  .vl-view__head { height: 64px; padding: 0 10px; gap: 10px; }
  .vl-chat__head-name { font-size: 17px; }
  .vl-chat__list { padding: 10px 12px; }
  .vl-msg__wrap { max-width: 86%; }
  .vl-msg__tools { display: none; }
  .vl-composer { padding: 0 10px 10px; }
  /* 16px — иначе iPhone приближает страницу при нажатии на поле */
  .vl-composer__input, .vl-search__input, .vl-fld-host .fld input, .vl-msg__edit { font-size: 16px; }
  .vl-composer__field { min-height: 48px; }
  .vl-composer__send { width: 48px; height: 48px; }
  .vl-composer__attach { margin: 4px 0; }
  .vl-chat__head-who .vl-avatar { --size: 40px !important; }
  body.vl-show-app .lobby-screen { padding-top: calc(env(safe-area-inset-top) + 58px); }
  .vl-menu { min-width: min(240px, calc(100vw - 16px)); }
  .vl-menu__item { height: 44px; font-size: 15px; }
  .vl-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; padding: 0 8px; }
  .vl-chips::-webkit-scrollbar { display: none; }
  .vl-chip { flex: 0 0 auto; }
  .vl-reply-bar, .vl-tray { margin-right: 0; }
  .vl-pinbar, .vl-search { margin: 0 10px 8px; }
  .vl-chat__head-who { gap: 10px; padding: 4px 8px 4px 4px; margin-left: 0; }
  .vl-chat__head-actions { gap: 4px; }
  .vl-chat__head-actions .vl-round { --s: 38px; }
  .vl-lightbox__stage { padding: 0 0 12px; }
  .vl-lightbox__nav { display: none; }
  .vl-ucard-overlay { padding: 0; align-items: end; }
  .vl-ucard { width: 100%; max-height: 92dvh; border-radius: 28px 28px 0 0; }
  .vl-wall-grid { grid-template-columns: repeat(3, 1fr); }
  .vl-media-grid.n-1 .vl-media-cell { max-width: 70vw; }
  .vl-friends { gap: 0; }
  .vl-panel { border-radius: 0; }
  .vl-friends__top { padding: 12px 12px 16px; }
  .vl-friends__head { margin-bottom: 12px; }
  .vl-friends__title { font-size: 22px; }
  .vl-tiles { grid-template-columns: 1fr; }
  .vl-tile.is-featured { grid-column: auto; }
  .vl-tile__acts { opacity: 1; transform: none; }
  .vl-friends__bottom { padding: 12px 8px; border-top: 1px solid var(--vl-soft); }
  .vl-add { flex: 0 0 auto; min-width: 0; padding: 0 4px; }
  .vl-friend__user { display: none; }
  .vl-island { top: 72px; max-width: calc(100% - 20px); }
  .vl-island__label { max-width: 36vw; }
  body.vl-show-app .vl-fab-menu {
    display: grid; position: fixed; z-index: 1500; top: calc(env(safe-area-inset-top) + 10px); left: 10px;
    width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(10, 12, 15, 0.8); color: var(--text);
    place-items: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer;
  }
  body.vl-show-app .vl-fab-menu .vl-ico { width: 18px; height: 18px; }
  body.vl-show-app .room-topbar { padding-left: 58px; }
  body.vl-show-app:has(.room-screen.is-compact) .vl-fab-menu { display: none; }
  :root { --vl-dock-h: clamp(170px, 32vh, 300px); }
}
/* Совсем маленькое окно (мини-режим .exe 440×340): без оболочки, только звонок */
@media (max-width: 520px) and (max-height: 420px) {
  body.vl-show-app .vl-fab-menu { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vl-view-enter, .vl-msg.is-new .vl-bubble, .vl-msg--call.is-new .vl-callpill, .vl-bubble.is-typing, .vl-incoming, .vl-incoming__wave,
  .vl-island, .vl-wave i, .vl-tile, .vl-solo-chats, .vl-solo-chats:hover .vl-solo-chats__ico .vl-ico, .vl-skel, body.vl-dock-open #app-root, .vl-bubble.is-typing i, .vl-ticks svg, .vl-ticks path { animation: none; }
  .vl-round, .vl-btn, .vl-tile, .vl-tile__acts, .vl-msg__tools, .vl-composer__send { transition: none; }
}

/* Выбор темы в профиле */
.vl-theme-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.vl-chip .vl-ico { width: 16px; height: 16px; flex-shrink: 0; }
.vl-theme-pick .vl-chip { white-space: nowrap; }

/* ═══════════════ Направление «Голос»: крупные имена, поиск слева, тёмная «Позвонить» ═══════════════
   Заголовки и имена — Unbounded; остальной текст — Golos Text. В светлой теме колонка «Чаты»
   лежит прямо на фоне, а переписка — белая панель; в тёмной всё как раньше, на панелях. */
.vl-side__title { font: 700 26px/1.1 var(--vl-display); letter-spacing: -0.02em; }
.vl-side__head { gap: 10px; padding: 4px 4px 14px 10px; }
.vl-side__new-call { height: 40px; padding: 0 16px 0 12px; gap: 6px; font-size: 14px; font-weight: 600; }
.vl-side__new-call .vl-ico { width: 18px; height: 18px; }
.vl-side__search {
  display: flex; align-items: center; gap: 10px; height: 44px; margin: 0 4px 12px; padding: 0 8px 0 16px;
  border-radius: 22px; background: var(--vl-field); color: var(--text-faint); cursor: text;
}
.vl-side__search > .vl-ico { width: 18px; height: 18px; flex-shrink: 0; }
.vl-side__search-input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text);
  font: 400 14px var(--vl-font); -webkit-appearance: none; appearance: none;
}
.vl-side__search-input::placeholder { color: var(--text-faint); }
.vl-side__search-input::-webkit-search-cancel-button { display: none; }
.vl-side__search-x {
  width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--text-faint);
  display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.vl-side__search-x[hidden] { display: none; }
.vl-side__search-x:hover { background: var(--vl-soft); color: var(--text); }
.vl-side__search-x .vl-ico { width: 16px; height: 16px; }
.vl-side__label { padding: 12px 12px 6px; font-size: 13px; font-weight: 500; color: var(--text-faint); }
button.vl-dm { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.vl-dm--hit .vl-dm__sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl-picker__code { margin: 8px auto 0; }

/* Имена — Unbounded */
.vl-dm__name, .vl-me__name, .vl-picker__name, .vl-tile__name, .vl-friend__name > span:first-child {
  font-family: var(--vl-display); font-weight: 600; letter-spacing: -0.01em;
}
.vl-dm__name { font-size: 14px; }
.vl-me__name { font-size: 13.5px; }
.vl-friends__title, .vl-chat__intro h2, .vl-ucard__name, .vl-profile-card__name, .vl-incoming__name, .vl-modal__title, .settings-sheet .settings-head h3, .settings-section-title {
  font-family: var(--vl-display); font-weight: 700; letter-spacing: -0.02em;
}

/* Шапка переписки: крупное имя и статус, справа поиск и «Позвонить» */
.vl-chat__head-name { font: 700 34px/1.05 var(--vl-display); letter-spacing: -0.03em; }
.vl-chat__head-sub { margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--text-faint); }
.vl-chat__head-sub.is-online { color: var(--success-soft); }
.vl-btn--ink { background: var(--text); color: var(--vl-panel); --ank-fill: rgba(var(--ink-rgb), 0.82); }
.vl-btn--ink:hover:not(:disabled) { background: var(--text); }
.vl-chat__call { height: 44px; padding: 0 20px 0 16px; gap: 8px; font-size: 14px; font-weight: 600; }
.vl-chat__call .vl-ico { width: 18px; height: 18px; }
.vl-chat__call.is-live { background: var(--success); color: #fff; --ank-fill: var(--success-soft); }
@media (min-width: 861px) {
  .vl-chat__head { height: auto; min-height: 96px; align-items: flex-end; padding: 22px 24px 18px 22px; border-bottom: 1px solid var(--border); }
  .vl-chat__head-who .vl-avatar { display: none; }
  .vl-chat__head-who { padding: 4px 12px 4px 6px; }
  .vl-chat__head-actions { align-self: center; margin-top: 10px; }
  .vl-chat__head-actions .vl-round.is-lg { --s: 44px; }
}
@media (max-width: 860px) {
  .vl-side__title { font-size: 24px; }
  .vl-chat__head-name { font-size: 20px; }
  .vl-chat__head-sub { margin-top: 2px; font-size: 13px; }
  .vl-chat__call { width: 38px; height: 38px; padding: 0; justify-content: center; }
  .vl-chat__call-label { display: none; }
  .vl-side__search { margin: 0 2px 10px; }
  .vl-side__search-input { font-size: 16px; }
}

/* Светлая тема: колонка «Чаты» на фоне, белая переписка, выбранный чат — белая карточка */
html[data-theme="light"] { --vl-r-panel: 28px; }
/* Только на ПК: на телефоне список чатов — отдельный слой поверх переписки, ему нужен свой фон */
@media (min-width: 861px) {
  html[data-theme="light"] body.vl-ready #vl-sidebar { background: transparent; box-shadow: none; }
  html[data-theme="light"] .vl-side__search { background: #ffffff; }
  html[data-theme="light"] .vl-dm:hover { background: rgba(21, 32, 43, 0.05); --vl-ring: #e7ebef; }
  html[data-theme="light"] .vl-dm.is-active { background: #ffffff; --vl-ring: #ffffff; box-shadow: 0 1px 0 #dde3e9; --ank-fill: #ffffff; }
  html[data-theme="light"] .vl-me__btn { background: #ffffff; }
}
html[data-theme="light"] .vl-pill { background: rgba(21, 32, 43, 0.06); }
html[data-theme="light"] .vl-pill.is-active { background: var(--accent); }
/* Обои в светлой теме: шапка, поле ввода и подписи — белое «стекло» */
html[data-theme="light"] .vl-view--chat.has-wall .vl-chat__head { background: rgba(255, 255, 255, 0.86); border-bottom-color: transparent; }
html[data-theme="light"] .vl-view--chat.has-wall .vl-composer__field,
html[data-theme="light"] .vl-view--chat.has-wall .vl-reply-bar,
html[data-theme="light"] .vl-view--chat.has-wall .vl-tray,
html[data-theme="light"] .vl-view--chat.has-wall .vl-composer__send.is-mic { background: rgba(255, 255, 255, 0.92); }
html[data-theme="light"] .vl-view--chat.has-wall .vl-day span { background: rgba(255, 255, 255, 0.8); color: var(--text-dim); }
html[data-theme="light"] .vl-view--chat.has-wall .vl-chat__intro { background: rgba(255, 255, 255, 0.82); }
html[data-theme="light"] .vl-chip.is-active { --ank-fill: #33414f; }
html[data-theme="light"] .vl-friend, html[data-theme="light"] .vl-tile { --ank-fill: rgba(21, 32, 43, 0.05); }
html[data-theme="light"] .vl-solo-chats { --ank-fill: #ffffff; }
html[data-theme="light"] .vl-solo-chats { background: rgba(255, 255, 255, 0.92); box-shadow: 0 10px 30px rgba(21, 32, 43, 0.14); }
html[data-theme="light"] .vl-solo-chats:hover { background: #ffffff; }
/* Всегда тёмные элементы (просмотр фото, капсула звонка, кнопка «назад» поверх звонка):
   в светлой теме им возвращаются светлые «чернила» */
html[data-theme="light"] .vl-lightbox,
html[data-theme="light"] .vl-island,
html[data-theme="light"] .vl-fab-menu { --ink-rgb: 242, 245, 249; --text: #f2f5f9; --text-dim: rgba(242, 245, 249, 0.7); --text-faint: rgba(242, 245, 249, 0.5); --vl-soft: rgba(242, 245, 249, 0.07); --vl-soft-2: rgba(242, 245, 249, 0.12); }
html[data-theme="light"] .vl-fld-host .fld input:hover { background: #ffffff; }
html[data-theme="light"] .vl-modal-overlay,
html[data-theme="light"] .vl-incoming-wrap { background: rgba(21, 32, 43, 0.32); }
.vl-side__search-x { --ank-fill: var(--vl-soft-2); }

/* «Друзья» в шапке колонки: круглая кнопка с числом заявок */
.vl-side__friends { --s: 40px; position: relative; margin-left: auto; }
.vl-side__friends.is-active { background: var(--accent-wash); color: var(--accent-soft); }
.vl-side__friends-badge {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 9px; background: var(--danger); color: #fff; font: 700 11px/18px var(--vl-font); text-align: center;
  box-shadow: 0 0 0 2px var(--vl-panel); pointer-events: none;
}
.vl-side__friends-badge[hidden] { display: none; }
.vl-side__title { flex: 0 1 auto; }
/* «Комната по коду» — первая строка меню «Звонок» */
.vl-picker__code { margin: 4px 0 14px; width: 100%; }
.vl-picker__code-ico { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.vl-picker__code-ico .vl-ico { width: 18px; height: 18px; }

/* История сверху: заглушки «дышат», подгруженные сообщения проявляются */
.vl-chat__history { padding: 6px 0 4px; }
.vl-chat__history .vl-skel { animation: vl-history-breathe 1.6s ease-in-out infinite; }
.vl-chat__history .vl-msg:nth-child(2) .vl-skel { animation-delay: 0.2s; }
.vl-chat__history .vl-msg:nth-child(3) .vl-skel { animation-delay: 0.4s; }
@keyframes vl-history-breathe { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.vl-msg.is-history-in { content-visibility: visible; animation: vl-history-in 0.5s var(--ease) both; }
@keyframes vl-history-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .vl-chat__history .vl-skel, .vl-msg.is-history-in { animation: none; }
}
.vl-chip > i { font-size: 14px; width: 16px; text-align: center; }

/* Телефон: стрелка «к чатам» не ложится поверх открытых панелей звонка */
body:has(.panel-overlay) .vl-fab-menu,
body:has(.settings-overlay) .vl-fab-menu,
body:has(.vl-modal-overlay) .vl-fab-menu { display: none !important; }
/* «Комната по коду»: подпись одной строкой; на узком экране пояснение прячем */
.vl-picker__code .vl-picker__name { white-space: nowrap; }
@media (max-width: 480px) { .vl-picker__code .vl-picker__user { display: none; } }
/* Кнопка «Чаты» не лежит поверх логотипа, пока идёт подключение к звонку */
body:has(.room-screen) .vl-solo-chats { display: none !important; }
