/* ================= AveChat · единый стиль ================= */
:root {
  --bg: #edeef0;
  --card: #ffffff;
  --text: #222222;
  --text-soft: #555555;
  --muted: #76787a;
  --border: #d7d8db;
  --border-soft: #e2e3e8;
  --border-faint: #f0f0f2;
  --link: #2a5885;
  --link-dark: #2c4a6b;
  --accent: #4a76a8;
  --accent-strong: #2b5d86;
  --accent-soft: #eef3f9;
  --focus: #6f8fb3;
  --focus-ring: rgba(58, 92, 139, .12);
  --topbar-grad: linear-gradient(to bottom, #4a6e95, #3b5d83);
  --primary-grad: linear-gradient(to bottom, #5c7f9f, #416287);
  --primary-grad-hover: linear-gradient(to bottom, #55789a, #3a5a7c);
  --danger: #a12622;
  --danger-strong: #b02a37;
  --danger-bg: #fdeaea;
  --danger-border: #e0b3b6;
  --ok: #2e6b32;
  --ok-bg: #ddf0dd;
  --ok-border: #bfe0bf;
  --info-bg: #eaf3fb;
  --info-border: #9cc3e8;
  --badge: #e64646;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-pop: 0 6px 20px rgba(0, 0, 0, .12);
  --radius: 3px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Атрибут hidden должен всегда гасить элемент, даже если у него display проставлен отдельным правилом */
[hidden] { display: none !important; }

body {
  font-family: -apple-system, "Segoe UI", Verdana, "Trebuchet MS", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- верхняя панель ---------- */
.topbar {
  background: var(--topbar-grad);
  border-bottom: 1px solid var(--link-dark);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  position: sticky; top: 0; z-index: 20;
}
.topbar-inner {
  max-width: 1024px; margin: 0 auto;
  display: flex; align-items: center; gap: 22px;
  padding: 0 12px; height: 52px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  color: #fff; font-size: 19px; font-weight: 700; letter-spacing: .3px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}
.logo-img { height: 28px; width: auto; display: block; }
.logo:hover { text-decoration: none; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a {
  color: #e7edf5; padding: 7px 12px; border-radius: var(--radius); font-size: 13px;
}
.main-nav a:hover { background: rgba(255, 255, 255, .14); text-decoration: none; color: #fff; }
.main-nav a.active {
  background: var(--accent-strong); color: #fff;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .3), 0 1px 0 rgba(255, 255, 255, .12);
}
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-right .me { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; }
.topbar-right .me:hover { text-decoration: none; }
.logout { color: #d3dcea; font-size: 13px; }
.logout:hover { color: #fff; }
.notif-bell { position: relative; text-decoration: none; color: #fff; padding: 4px 6px; }
.notif-bell svg { width: 17px; height: 19px; display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.notif-badge {
  position: absolute; top: -2px; right: -4px; background: var(--badge); color: #fff;
  font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 9px; font-weight: 700;
}

/* ---------- контейнер ---------- */
.container { max-width: 1024px; margin: 0 auto; padding: 16px 12px 20px; flex: 1; width: 100%; }
.page-title { font-size: 20px; color: var(--link-dark); margin: 4px 0 16px; }
.page-title-sm { font-size: 18px; }

/* ---------- флэш-сообщения ---------- */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px; font-size: 13px; }
.flash-success { background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok); }
.flash-error { background: var(--danger-bg); border: 1px solid var(--danger-border); color: var(--danger); }
.flash-info { background: var(--info-bg); border-color: var(--info-border); color: var(--link); }

/* ---------- карточки ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 13px 15px; margin-bottom: 11px; box-shadow: var(--shadow-card);
}
.empty { text-align: center; color: var(--muted); padding: 30px 16px; font-size: 13px; }
.empty a { color: var(--link); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-block; background: #e7e8ec; border: 1px solid #c6c8cb;
  border-radius: var(--radius); color: var(--text); padding: 7px 16px; font-size: 13px;
  cursor: pointer; text-align: center; font-family: inherit;
}
.btn:hover { background: #dfe1e5; text-decoration: none; }
.btn-primary {
  color: #fff; border-color: var(--accent-strong); background: var(--accent);
  box-shadow: none;
  text-shadow: none;
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-link { color: var(--link); background: none; border: none; padding: 0; box-shadow: none; }
.btn-link:hover { text-decoration: underline; background: none; }
.btn-block { display: block; width: 100%; }
.btn-small { padding: 4px 12px; font-size: 12px; }
.btn-danger { color: var(--danger-strong); background: var(--danger-bg); border-color: var(--danger-border); }
.btn-file { position: relative; overflow: hidden; }
.btn-file input[type="file"] {
  position: absolute; left: 0; top: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer;
}
.btn-group-inline { display: inline-flex; }
.hidden-input { display: none; }

/* ---------- аватары ---------- */
.avatar {
  width: 46px; height: 46px; border-radius: 50%; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0; overflow: hidden;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.avatar-img { background-size: cover; background-position: center; text-shadow: none; box-shadow: none; }
.avatar-sm { width: 30px; height: 30px; font-size: 13px; box-shadow: none; }
.avatar-lg { width: 84px; height: 84px; font-size: 34px; }
.avatar-xl { width: 110px; height: 110px; font-size: 46px; }
.avatar.avatar-ch { background: var(--accent); color: #fff; }

.avatar-wrap {
  position: relative; display: inline-block; line-height: 0;
  vertical-align: middle;
}
.avatar-wrap > .avatar { display: inline-flex; }
.btn.btn-small { padding: 5px 10px; font-size: 12px; }
.muted { color: var(--muted); font-size: 12px; }
.muted-soft { color: var(--text-soft); }
.muted-more { font-size: 14px; }
.mb-10 { margin-bottom: 10px; }
.small { font-size: 12px; }

/* ---------- две колонки ---------- */
.two-col { display: flex; gap: 16px; align-items: flex-start; }
.two-col .column { flex: 1; min-width: 0; }
.sidebar { width: 280px; flex-shrink: 0; }

/* ---------- композер ---------- */
.composer { display: flex; gap: 12px; }
.composer textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius); resize: vertical;
  font: inherit; padding: 10px; min-height: 58px; outline: none;
}
.composer textarea:focus { border-color: var(--focus); box-shadow: 0 0 0 2px var(--focus-ring); }
.composer-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.composer-bar.compact { margin: 8px 0; }
.composer-bar .at-sign { padding: 8px 0; }

/* ---------- сайдбар ---------- */
.side-title {
  font-weight: 700; color: var(--link-dark); text-transform: uppercase;
  font-size: 11px; letter-spacing: .6px; margin-bottom: 10px;
}
.side-me { display: flex; gap: 10px; align-items: center; }
.side-me .avatar { width: 40px; height: 40px; font-size: 16px; }
.side-hello { color: var(--text-soft); font-size: 12.5px; margin-bottom: 4px; }
.side-link { display: block; padding: 6px 8px; color: var(--link); border-radius: var(--radius); }
.side-link:hover { background: var(--border-faint); text-decoration: none; }
.side-search input { width: 100%; margin-bottom: 8px; }
.side-mood .side-phrase { color: var(--text-soft); }
.side-phrase { font-size: 13px; margin: 6px 0 8px; }
.side-online { font-size: 12px; }
.side-pod-author { font-size: 12px; }

/* ---------- посты ---------- */
.post .post-head { display: flex; gap: 10px; align-items: center; }
.post-name { font-weight: 600; color: var(--link); }
.post-name:hover { text-decoration: underline; }
.ch-name { color: var(--link); }
.post-user { color: var(--muted); font-size: 12px; }
.post-meta { line-height: 1.3; }
.post-text { margin: 8px 0 6px 56px; white-space: pre-wrap; word-wrap: break-word; }
.post-foot {
  margin-left: 56px; display: flex; align-items: center;
  gap: 14px; border-top: 1px solid var(--border-faint); padding-top: 8px;
}
.post-time { color: var(--muted); font-size: 11.5px; }
.post-del { margin-left: auto; }
.post-del button {
  background: none; border: none; color: #b5b6ba; font-size: 17px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.post-del button:hover { color: var(--danger); }
.post-gear-wrap { margin-left: auto; }
.post-del + .post-gear-wrap, .post-gear-wrap + .post-del { margin-left: 0; }
.post-gear {
  width: 26px; height: 26px; display: inline-flex; align-items: center;
  justify-content: center; background: none; border: none; color: #b5b6ba;
  font-size: 15px; cursor: pointer; border-radius: 50%;
}
.post-gear:hover { color: var(--link); background: var(--info-bg); }
.vis-panel { margin-top: 8px; }
.vis-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.vis-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.vis-opt-btn {
  border: 1px solid var(--border-soft); background: var(--card);
  color: var(--muted); border-radius: var(--radius); padding: 4px 10px;
  font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.vis-opt-btn:hover { border-color: var(--info-border); color: var(--link); }
.vis-opt-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.like-btn {
  border: 1px solid #d8d9dd; background: var(--card); border-radius: var(--radius);
  color: var(--muted); cursor: pointer; font-size: 12.5px; font-family: inherit;
  padding: 3px 8px; display: flex; align-items: center; gap: 4px;
}
.like-btn:hover { border-color: var(--danger-border); color: var(--danger-strong); background: var(--danger-bg); }
.like-btn.liked { color: var(--badge); border-color: var(--danger-border); background: var(--danger-bg); }
.like-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.like-btn > svg[fill="currentColor"] { fill: #fff; stroke: var(--link-dark); stroke-width: 1.4; }
.like-btn.liked > svg[fill="currentColor"] { fill: var(--badge); stroke: var(--badge); }
.act-btn svg { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; }
.post-del button svg, .cmt-del button svg { width: 15px; height: 15px; display: block; }
.post-gear svg { width: 15px; height: 15px; }
.ic-inline { width: 13px; height: 13px; vertical-align: -2px; flex-shrink: 0; }

/* ---------- репосты / комментарии ---------- */
.repost-banner {
  display: block; color: var(--muted); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; margin: 0 0 6px;
}
.repost-src {
  margin: 10px 0 8px 56px; padding: 10px; border: 1px solid var(--border-soft);
  border-radius: 6px; background: #fafbfc;
}
.repost-src .post-head { margin-bottom: 6px; }
.repost-src .post-text, .repost-src .post-media { margin-left: 0; }
.repost-src .repost-src { margin-left: 0; }
.repost-src .repost-banner { margin-bottom: 6px; }
.repost-src .post-del, .repost-src .post-foot { display: none; }
.wall-note { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.post-actions { display: flex; gap: 8px; align-items: center; margin: 8px 0 0 56px; }
.act-btn.on { border-color: var(--info-border); color: var(--link); background: var(--info-bg); }
.action-panel {
  margin: 8px 0 0 56px; padding: 10px;
  background: #fafbfc; border: 1px solid var(--border-soft); border-radius: 6px;
}
.cmt { display: flex; gap: 8px; margin-bottom: 9px; }
.cmt .avatar { width: 30px; height: 30px; font-size: 12px; }
.cmt-body { flex: 1; background: var(--border-faint); border-radius: 4px; padding: 6px 8px; }
.cmt-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmt-top a { font-weight: 600; color: var(--link); }
.cmt-del { margin-left: auto; }
.cmt-del button {
  background: none; border: none; color: #b5b6ba; font-size: 15px; cursor: pointer; padding: 0 2px;
}
.cmt-del button:hover { color: var(--danger); }
.cmt-text { color: var(--text); white-space: pre-wrap; word-wrap: break-word; }
.cmt-none { color: #999; font-size: 12.5px; margin: 6px 0; }
.cmt-form { display: flex; gap: 6px; margin-top: 8px; }
.cmt-form input { flex: 1; font-size: 13px; padding: 7px 9px; }
.rp-hint { color: var(--muted); font-size: 12px; margin-bottom: 4px; }

/* ---------- медиа в постах ---------- */
.post-media { margin: 6px 0 8px 56px; }
.post-media .pm-img {
  max-width: 100%; max-height: 420px; border-radius: 4px; display: block;
  margin-bottom: 6px; cursor: zoom-in; border: 1px solid var(--border-soft);
}
.post-media .pm-video {
  width: 100%; max-height: 420px; border-radius: 4px; background: #000;
  display: block; margin-bottom: 6px; border: 1px solid var(--border);
}
.post-media .pm-audio {
  display: flex; align-items: center; gap: 10px; background: var(--border-faint);
  border: 1px solid var(--border-soft); border-radius: 4px; padding: 8px 10px; margin-bottom: 6px;
}
.pm-audio-icon {
  font-size: 20px; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff; display: inline-flex; align-items: center;
  justify-content: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.pm-audio audio { flex: 1; height: 36px; }
.pm-audio-icon svg { width: 19px; height: 19px; }

/* ---------- лайтбокс ---------- */
.lb-overlay {
  position: fixed; inset: 0; background: rgba(15, 20, 28, .92); z-index: 50;
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lb-overlay img { max-width: 92vw; max-height: 92vh; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }

/* ---------- профиль ---------- */
.profile-card .profile-head { display: flex; gap: 18px; align-items: center; }
.profile-card h1 { font-size: 21px; margin-bottom: 2px; color: var(--text); }
.profile-bio { margin: 10px 0; color: var(--text-soft); white-space: pre-wrap; }
.profile-stats { display: flex; gap: 20px; color: var(--text-soft); font-size: 13px; }
.profile-stats strong { color: var(--link); }
.profile-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.dot-online {
  display: inline-block; width: 8px; height: 8px; margin-left: 4px;
  border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--ok-bg);
}

/* ---------- поиск ---------- */
.search-row { display: flex; gap: 10px; }
.search-row input { flex: 1; }
input[type="text"], input[type="password"] {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 11px;
  font: inherit; width: 100%; outline: none;
}
input[type="text"]:focus, input[type="password"]:focus {
  border-color: var(--focus); box-shadow: 0 0 0 2px var(--focus-ring);
}
.user-row { display: flex; align-items: center; gap: 12px; }
.user-row-info { flex: 1; line-height: 1.3; }

/* ---------- авторизация ---------- */
.auth-wrap { max-width: 380px; margin: 54px auto 0; }
.auth-brand {
  text-align: center; font-size: 30px; font-weight: 700; color: var(--link-dark);
  letter-spacing: .5px; margin-bottom: 3px; text-shadow: 0 1px 0 #fff;
}
.auth-brand img { height: 46px; width: auto; }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 18px; font-size: 13.5px; }
.auth-card { padding: 22px; }
.auth-card input {
  margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 12px; font: inherit; width: 100%; outline: none;
}
.auth-card input:focus { border-color: var(--focus); box-shadow: 0 0 0 2px var(--focus-ring); }
.auth-card label { display: block; font-size: 12px; color: var(--text-soft); margin: 10px 0 4px; }
.auth-card textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 12px; font: inherit; resize: vertical; min-height: 80px; outline: none;
}
.auth-card .btn { font-size: 14px; }
.auth-switch { text-align: center; margin-top: 14px; color: var(--muted); font-size: 13px; }

/* вкладки входа + SMS */
.auth-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 12px; }
.auth-tab {
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  padding: 7px 18px; border-radius: 20px; cursor: pointer; font-size: 13px;
}
.auth-tab.on { background: var(--link); border-color: var(--link); color: #fff; }
.sms-note {
  background: var(--info-bg); border: 1px solid var(--info-border); color: var(--link);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px;
}
.sms-note.sms-ok { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); }
.sms-note.sms-dev {
  background: #fff7e6; border-color: #f2cf8a; color: #7a4f00; font-size: 14px; font-weight: 600;
}
.sms-note.sms-dev strong { font-size: 16px; letter-spacing: 1px; }
.sms-hint { margin-top: 8px; text-align: center; }
.sms-resend {
  display: block; width: 100%; margin-top: 8px; border: 0; background: none;
  cursor: pointer; color: var(--link); font-size: 13px; text-decoration: underline;
}

/* ---------- сообщения / чат ---------- */
.chat-layout {
  display: flex; gap: 16px; align-items: stretch;
  height: calc(100vh - 170px); min-height: 420px;
}
.chat-list {
  width: 300px; flex-shrink: 0; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow-y: auto;
}
.chat-list-title {
  padding: 12px 14px; font-weight: 700; color: var(--link-dark); font-size: 12px;
  letter-spacing: .5px; text-transform: uppercase;
  border-bottom: 1px solid #e7e8ec; position: sticky; top: 0; background: var(--card);
}
.chat-dialog {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--border-faint); color: inherit;
}
.chat-dialog:hover { background: var(--border-faint); text-decoration: none; }
.chat-dialog.active { background: var(--accent-soft); border-left: 3px solid var(--accent); }
.chat-dialog .avatar { width: 40px; height: 40px; font-size: 16px; }
.dialog-row { display: flex; align-items: center; gap: 12px; }
.dialog-row.unread { border-left: 3px solid var(--accent); }
.dialog-main { flex: 1; min-width: 0; }
.dialog-top { display: flex; justify-content: space-between; gap: 8px; }
.dialog-preview {
  color: var(--muted); font-size: 12.5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.dialog-preview.small { font-size: 12px; }
.badge {
  background: var(--accent); color: #fff; border-radius: 9px; padding: 1px 7px;
  font-size: 11px; flex-shrink: 0; min-width: 17px; text-align: center;
}
.chat-window {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid #e7e8ec; background: #fafbfc;
}
.chat-head .avatar { width: 40px; height: 40px; font-size: 16px; }
.chat-head-actions { margin-left: auto; display: flex; gap: 8px; }
.chat-body {
  flex: 1; overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.chat-scroll {
  flex: 1; overflow-y: auto; padding: 16px; display: flex;
  flex-direction: column; gap: 6px; position: relative; z-index: 1;
}
.msg { max-width: 68%; border-radius: 8px; padding: 7px 11px; position: relative; }
.msg .msg-time { font-size: 10px; opacity: .6; margin-top: 3px; text-align: right; }
.msg.mine {
  align-self: flex-end; background: var(--info-bg);
  border: 1px solid #cbdbf0; border-top-right-radius: 2px;
}
.msg.theirs {
  align-self: flex-start; background: var(--card); border: 1px solid var(--border-soft); border-top-left-radius: 2px;
}
.msg-text { white-space: pre-wrap; word-wrap: break-word; }
.chat-input { display: flex; gap: 10px; padding: 12px; border-top: 1px solid #e7e8ec; }
.chat-input input { flex: 1; border-radius: var(--radius); }
.chat-input .btn { flex-shrink: 0; }
.ctl-mini {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); color: var(--link); cursor: pointer; font-size: 15px; line-height: 1;
}
.ctl-mini:hover { background: var(--border-faint); }
.ctl-soon {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 12px; background: var(--border-faint);
  color: var(--muted); font-size: 12px; white-space: nowrap;
}
.typing-hint { font-size: 12px; color: var(--link); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.4; } }
.online-line { font-size: 12px; }

/* ---------- чат: поиск / реакции / пересылка / черновики ---------- */
.chat-search { margin-left: auto; }
.chat-search input {
  width: 150px; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 12px; font-size: 13px; background: var(--card);
  transition: width .2s;
}
.chat-search input:focus { width: 200px; }
.search-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--accent); border-radius: 8px; padding: 8px 12px;
  font-size: 13px; margin-bottom: 8px;
}
.search-x {
  border: 0; background: none; color: var(--accent); font-size: 18px;
  cursor: pointer; line-height: 1; padding: 0 2px;
}
.search-x:hover { opacity: .7; }

.msg-reactions {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px; margin-top: 4px; min-height: 18px;
}
.rg-chip {
  border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  padding: 1px 7px; font-size: 12px; cursor: pointer; line-height: 1.5;
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--muted);
}
.rg-chip:hover { background: var(--border-faint); }
.rg-chip.mine { background: var(--accent-soft); border-color: var(--accent); }
.rg-cnt { font-size: 11px; min-width: 9px; text-align: left; }
.rg-add {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); color: var(--muted); cursor: pointer; font-size: 12px;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.rg-add:hover { background: var(--border-faint); color: var(--link); }
.rg-picker {
  position: fixed; z-index: 60; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px;
  box-shadow: var(--shadow-pop); display: flex; gap: 2px;
}
.rg-opt {
  border: 0; background: none; cursor: pointer; font-size: 21px;
  padding: 4px 6px; border-radius: 8px; line-height: 1;
}
.rg-opt:hover { background: var(--border-faint); }

.msg-fwd-btn { margin-left: 6px; }
.msg-fwd {
  display: flex; align-items: center; gap: 5px; font-size: 11px;
  color: var(--muted); margin: 1px 0 2px;
}
.msg-fwd-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; background: var(--border-faint);
  font-size: 11px; color: var(--link);
}

.fwd-overlay {
  position: fixed; inset: 0; z-index: 70; background: rgba(20, 24, 30, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.fwd-modal {
  width: 340px; max-width: 100%; max-height: 70vh; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.fwd-head { font-weight: 600; }
.fwd-modal > input { border-radius: var(--radius); padding: 8px 12px; border: 1px solid var(--border); }
.fwd-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.fwd-item {
  display: flex; align-items: center; gap: 10px; padding: 8px; border: 0;
  background: none; cursor: pointer; border-radius: 10px; font: inherit; text-align: left;
}
.fwd-item:hover { background: var(--border-faint); }
.fwd-item[hidden] { display: none; }
.fwd-av { width: 36px; height: 36px; flex-shrink: 0; }
.fwd-av .avatar { width: 36px; height: 36px; font-size: 14px; }
.fwd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chat-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: #23272d; color: #fff; padding: 9px 16px; border-radius: 20px;
  font-size: 13px; opacity: 0; transition: all .25s; z-index: 80; pointer-events: none;
}
.chat-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.dialog-search-wrap { margin-bottom: 12px; }
.dialog-search-wrap input {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 14px; font-size: 14px;
}
.draft-label { color: var(--accent); font-weight: 600; }

/* ---------- настройки ---------- */
.settings-ava { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.settings-ava-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* ---------- реакции ---------- */
.react-bar {
  display: flex; align-items: center; border-top: 1px solid var(--border-faint);
  padding-top: 8px; margin-top: 8px; gap: 6px; flex-wrap: wrap;
}
.react-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.react-chip {
  border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  padding: 3px 9px; font-size: 13px; cursor: pointer; line-height: 1.3;
}
.react-chip b { color: var(--muted); font-weight: 500; margin-left: 2px; }
.react-chip:hover { background: var(--border-faint); }
.react-chip.on {
  background: var(--accent-soft); border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.react-add { position: relative; }
.react-plus {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); color: var(--muted); cursor: pointer; font-size: 14px;
  line-height: 1; display: flex; align-items: center; justify-content: center;
}
.react-plus:hover { background: var(--border-faint); color: var(--link); }
.react-plus svg { width: 16px; height: 16px; }
.react-palette {
  display: none; position: absolute; bottom: 34px; left: 0; z-index: 30;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 6px; box-shadow: var(--shadow-pop);
  grid-template-columns: repeat(7, auto); gap: 2px;
}
.react-add.open .react-palette { display: grid; }
.react-palette button {
  border: 0; background: none; cursor: pointer; font-size: 20px;
  padding: 4px 6px; border-radius: 8px; line-height: 1;
}
.react-palette button:hover { background: var(--border-faint); }

/* ---------- друзья / уведомления ---------- */
.friend-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 2px;
  border-bottom: 1px solid var(--border-faint);
}
.friend-row:last-child { border-bottom: none; }
.friend-link { display: flex; align-items: center; gap: 10px; flex: 1; color: inherit; }
.friend-link .avatar { width: 44px; height: 44px; font-size: 17px; }
.friend-actions { display: flex; gap: 8px; }
.note-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 2px;
  border-bottom: 1px solid var(--border-faint); color: inherit;
}
.note-row:hover { background: #f7f9fc; text-decoration: none; }
.note-row .avatar { width: 42px; height: 42px; font-size: 16px; }
.note-text { color: var(--text); margin: 2px 0; }

/* ---------- звонки ---------- */
.call-wrap {
  position: fixed; inset: 0; z-index: 60;
  background: radial-gradient(circle at 50% 25%, #2b4057, #131b28 75%);
  display: flex; flex-direction: column; color: #fff; overflow: hidden;
}
.call-stage {
  flex: 1; position: relative; display: flex; align-items: center;
  justify-content: center; min-height: 0;
}
.call-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; display: none; }
.call-voice-view { text-align: center; padding: 16px; pointer-events: none; }
.call-avatar-wrap { display: inline-block; margin-bottom: 14px; }
.call-avatar { width: 150px; height: 150px; font-size: 64px; }
.call-name { font-size: 26px; font-weight: 700; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.call-status { color: #c6cfd9; margin-top: 8px; font-size: 14px; }
.call-timer {
  font-size: 30px; letter-spacing: 1px; margin-top: 6px;
  font-variant-numeric: tabular-nums; text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
.call-self {
  position: absolute; top: 14px; right: 14px; width: 160px; height: 120px;
  z-index: 8; display: none; border: 2px solid rgba(255, 255, 255, .4);
  border-radius: 10px; background: #000; overflow: hidden; box-shadow: 0 4px 18px rgba(0, 0, 0, .5);
}
.call-local { width: 100%; height: 100%; object-fit: cover; }
.call-controls { display: flex; justify-content: center; gap: 18px; padding: 18px 0 28px; position: relative; z-index: 9; }
.ctl {
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; background: rgba(255, 255, 255, .15); color: #fff;
  transition: background .15s, transform .1s;
}
.ctl:hover { background: rgba(255, 255, 255, .28); }
.ctl:active { transform: scale(.94); }
.ctl svg { width: 22px; height: 22px; display: block; margin: 0 auto; fill: #fff; stroke: none; }
.ctl.off { background: var(--danger-strong); box-shadow: 0 0 0 3px rgba(176, 42, 55, .30); }
.ctl-end { background: var(--danger-strong); }
.ctl-end:hover { background: #a12622; }
.call-start {
  position: absolute; inset: 0; z-index: 12; display: flex; align-items: center;
  justify-content: center; text-align: center;
  background: rgba(15, 22, 32, .55); backdrop-filter: blur(3px); padding: 20px;
}
.call-start-card {
  max-width: 340px; width: 100%; background: var(--card); color: var(--text);
  border-radius: 12px; padding: 26px 24px; box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
}
.call-start-avatar { font-size: 42px; margin-bottom: 10px; color: var(--accent-strong); }
.call-start-avatar svg { width: 52px; height: 52px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.call-start-card h3 { font-size: 19px; color: var(--link-dark); margin-bottom: 6px; }
.call-start-card .muted { font-size: 13px; }
.call-start-card .btn { margin-top: 16px; font-size: 14px; padding: 10px 16px; }
.call-sound-hint {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 11; background: rgba(20, 30, 45, .85); color: #fff; font-size: 13px;
  padding: 8px 16px; border-radius: 20px; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4); pointer-events: none;
}
.call-banner {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 90; width: 100%; max-width: 460px; padding: 0 12px;
}
.call-banner-in {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .4); padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--border);
}
.cb-info { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.cb-info strong { color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-info span { color: var(--muted); font-size: 12px; }
.cb-btn { border: none; border-radius: var(--radius-md); padding: 8px 14px; color: #fff; font-size: 13px; cursor: pointer; }
.cb-btn:hover { filter: brightness(1.08); }
.cb-answer { background: var(--ok); }
.cb-decline { background: var(--danger-strong); }

/* ---------- быстрый вход ---------- */
.ql-card { margin-bottom: 16px; }
.ql-card .side-title { margin-bottom: 12px; }
.ql-code {
  font-size: 46px; font-weight: 700; letter-spacing: 10px; text-align: center;
  color: var(--link-dark); font-variant-numeric: tabular-nums; line-height: 1;
}
.ql-hint { margin-top: 12px; }
.ql-input-row { display: flex; gap: 8px; }
.ql-input-row input { flex: 1; min-width: 0; }
.ql-req { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--border-faint); }
.ql-req:last-child { border-bottom: none; }
.ql-req-info { flex: 1; min-width: 0; line-height: 1.4; }
.ql-req-actions { display: flex; gap: 6px; }

/* ---------- стена: свободное расположение постов ---------- */
.wall { position: static; min-height: 120px; }
.wall-post {
  position: relative; padding: 0 2px 1px;
}
.wall-post.dragged {
  position: absolute; transition: none; z-index: 30;
  cursor: grabbing; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: .95;
}
.wall-post.snap {
  transition: left .18s ease, top .18s ease, transform .18s ease, opacity .2s ease;
}
.wall-rot {
  position: absolute; right: 10px; top: 44px; z-index: 5;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .96);
  color: var(--muted); cursor: pointer; display: none; align-items: center;
  justify-content: center; font-size: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.wall-reset-post {
  position: absolute; right: 10px; top: 74px; z-index: 5;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255, 255, 255, .96);
  color: var(--muted); cursor: pointer; display: none; align-items: center;
  justify-content: center; font-size: 14px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.wall-post:hover .wall-rot, .wall-post:hover .wall-reset-post { display: inline-flex; }
body.wall-editing .wall-rot, body.wall-editing .wall-reset-post { display: inline-flex; }
.wall-rot:hover, .wall-reset-post:hover { color: var(--link); border-color: var(--link); }
.wall-rot svg, .wall-reset-post svg { width: 14px; height: 14px; }
.wall-rot.spinning { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.wall-tip { margin: 14px 0 4px; text-align: center; display: none; max-width: 640px; margin-left: auto; margin-right: auto; }
.wall-ctrl { display: flex; flex-direction: column; align-items: center; gap: 10px; }
#wall-reset { font-size: 12.5px; padding: 5px 12px; }

.wall-edit-toggle { text-align: center; margin: 12px 0 2px; }

/* ---------- админ-панель / бан ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-faint);
  vertical-align: middle;
}
.admin-table th { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; }
.admin-table tr:hover td { background: var(--border-faint); }
.admin-row-master td { background: #f4f4f5; }
.admin-badge {
  display: inline-block; padding: 2px 8px; border-radius: 0;
  font-size: 11px; font-weight: 700; background: var(--border-faint);
  color: var(--text-soft); border: 1px solid var(--border-soft);
}
.admin-badge-master { background: #2f2f2f; border-color: #2f2f2f; color: #fff; }
.admin-badge-ban { background: var(--card); border-color: var(--border); color: var(--danger-strong); }
.admin-badge-ok { background: var(--card); border-color: var(--border); color: var(--text-soft); }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-actions form { margin: 0; }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.admin-ban-form { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.admin-ban-form input[type="text"] { width: 150px; padding: 5px 8px; font-size: 12px; }
.admin-ban-form select {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  padding: 5px 8px; font-size: 12px; font-family: inherit; color: var(--text);
}
.admin-ban-reason { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.admin-ban-cell { min-width: 150px; }
.banned-card { text-align: center; padding: 48px 24px; }
.banned-icon { font-size: 56px; margin-bottom: 12px; }
.banned-card h1 { margin-bottom: 8px; font-size: 24px; }
.banned-card p { margin: 6px 0; color: var(--muted); }
.banned-text { color: var(--text); font-size: 15px; margin: 12px 0 !important; }
.admin-section-title { font-size: 15px; color: var(--link-dark); margin-bottom: 8px; }
.admin-post-prev { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.admin-chk input { width: 14px; height: 14px; accent-color: var(--accent); }
.settings-check {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 0;
  border-bottom: 1px solid var(--border-faint); cursor: pointer;
}
.settings-check:last-child { border-bottom: none; }
.settings-check > input { width: 18px; height: 18px; accent-color: var(--accent); }
.settings-check > span { line-height: 1.4; }
.wall-edit-toggle-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  background: var(--accent-soft); border: 1px solid var(--info-border);
  color: var(--link-dark); font-size: 14px; font-weight: 600;
  user-select: none; -webkit-user-select: none;
}
.wall-edit-toggle-label input { width: 18px; height: 18px; accent-color: var(--accent); }
body.wall-editing .wall-edit-toggle-label { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- адаптивность ---------- */
@media (max-width: 820px) {
  .two-col { flex-direction: column; }
  .sidebar { width: 100%; }
  .chat-layout { flex-direction: column; height: auto; }
  .chat-list { width: 100%; max-height: 240px; }
  .chat-window { height: 68vh; }
  .topbar-inner { gap: 10px; }
  .main-nav { overflow-x: auto; }
}
/* ================= TG-апгрейд: чат, лента, поиск ================= */

/* Подсказка хоткеев */
.hotkey-help { padding: 14px 18px; margin-bottom: 12px; background: var(--card); }
.hk-table { border-collapse: collapse; font-size: 13px; }
.hk-table td { padding: 4px 14px 4px 0; color: var(--text-soft); }
.hk-table b { color: var(--link); background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; }

/* Вкладки поиска */
.search-tabs { display: flex; gap: 4px; margin: 12px 0; flex-wrap: wrap; }
.search-tab {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-soft);
  background: var(--card); color: var(--link-dark); font-size: 13px; text-decoration: none;
}
.search-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; }

/* Карточка поста: кнопки */
.post-gear-wrap { display: flex; gap: 4px; }
.edit-ta {
  width: 100%; min-height: 70px; resize: vertical; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; font-family: inherit;
}

/* Статистика профиля кликом */
.profile-stats a.pstat { color: var(--link); cursor: pointer; text-decoration: none; }
.profile-stats a.pstat:hover { text-decoration: underline; }
.count-badge {
  display: inline-block; min-width: 18px; text-align: center; font-size: 12px;
  background: var(--accent-soft); border: 1px solid var(--info-border); color: var(--link-dark);
  border-radius: 9px; padding: 0 6px; margin-left: 6px; vertical-align: middle;
}
.friend-row { border-bottom: 1px solid var(--border-faint); border-radius: 0; }
.friend-row:last-child { border-bottom: none; }
.friend-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* Контейнер бесконечной ленты */
.stream { min-height: 200px; }
.stream-sentinel { text-align: center; padding: 14px 0; }
.stream-done { color: var(--muted); }
.stream-done:empty { display: none; }

/* Чат: разделители дней */
.msg-day {
  align-self: center; font-size: 11px; color: var(--muted); background: var(--border-faint);
  padding: 3px 12px; border-radius: 999px; margin: 6px 0;
}
.msg-start { opacity: .9; }

/* Чат: quotes и вложения */
.msg-reply {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 4px 8px; border-radius: 4px; margin-bottom: 5px; font-size: 12px;
  display: flex; flex-direction: column; gap: 1px; max-width: 100%;
}
.msg-reply b { color: var(--link-dark); font-weight: 600; }
.msg-reply span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-attach { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; max-width: 280px; }
.msg-attach img { max-width: 100%; border-radius: 8px; display: block; cursor: zoom-in; }
.msg-attach video { max-width: 100%; border-radius: 8px; }
.msg-file { color: var(--link); font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.msg-audio { display: flex; align-items: center; gap: 8px; background: var(--border-faint); border-radius: 8px; padding: 6px 10px; }
.msg-audio audio { height: 34px; flex: 1; min-width: 0; }

/* Чат: галочки прочитано */
.msg-tick { font-size: 11px; margin-left: 4px; color: var(--muted); font-style: normal; }
.msg.mine .msg-tick { color: var(--accent); }
.msg-tick.read { color: var(--ok); }
.dialog-preview .msg-tick { margin-right: 4px; }

/* Чат: кнопка ответа на сообщении */
.msg-reply-btn {
  position: absolute; top: -9px; right: -9px; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--card);
  color: var(--link); font-size: 12px; line-height: 1; cursor: pointer;
  display: none; align-items: center; justify-content: center; padding: 0;
  box-shadow: var(--shadow-card);
}
.msg:hover .msg-reply-btn, .msg-reply-btn:focus { display: flex; }
.msg-reply-btn svg { width: 13px; height: 13px; }

/* Чат: панель ответа */
.reply-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  border-top: 1px solid var(--border-faint); background: var(--accent-soft); font-size: 12px;
}
.reply-bar .reply-name { color: var(--link-dark); font-weight: 600; white-space: nowrap; }
.reply-bar .reply-text { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.reply-x { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; display: flex; align-items: center; }
.reply-x svg { width: 14px; height: 14px; }

/* Чат: поле ввода */
.chat-input { flex-wrap: wrap; }
.chat-input textarea {
  flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 11px; font-family: inherit; font-size: 14px; resize: none; max-height: 140px;
  line-height: 1.35;
}
.chat-input textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.chat-file { position: relative; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.chat-file svg { width: 18px; height: 18px; }
.chat-file input[type="file"] { display: none; }
.chat-file-hint { flex: 1 1 100%; margin: 0 0 4px; }
.msg .msg-text a, .post-text a, .cmt-text a, .side-phrase a { color: var(--link); text-decoration: none; }
.msg .msg-text a:hover, .post-text a:hover, .cmt-text a:hover { text-decoration: underline; }

.typing-hint { text-align: right; }

/* Приватность, блокировки, жалобы */
.profile-actions-second { margin-top: 8px; }
.profile-privacy-tag { margin-top: 6px; }
.check-line { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: 13px; cursor: pointer; }
.check-line input { width: 16px; height: 16px; }
.blocked-list { display: flex; flex-direction: column; }
.blocked-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border-faint); }
.blocked-row:last-child { border-bottom: none; }
.blocked-link { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.blocked-link:hover { color: var(--link-dark); }
.pin-form { display: inline; }
.mt-10 { margin-top: 10px; }
#notes-more { margin-top: 10px; }

/* ---------- мини-игры ---------- */
.games-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px; margin-top: 14px;
}
.game-card { display: flex; flex-direction: column; position: relative; }
.game-upload { display: flex; flex-direction: column; gap: 10px; }
.game-upload input[type="text"] {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px;
  font: inherit; width: 100%; outline: none;
}
.game-upload input[type="text"]:focus { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.game-upload-files { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.game-card-body {
  display: flex; gap: 12px; align-items: center; color: var(--text);
  text-decoration: none; flex: 1;
}
.game-card-body:hover { color: var(--link-dark); }
.game-thumb {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: var(--radius);
  background: var(--accent-strong); color: #fff; display: flex; align-items: center;
  justify-content: center;
}
.game-thumb svg { width: 30px; height: 30px; }
.game-meta { min-width: 0; }
.game-name { font-weight: 600; font-size: 14.5px; }
.game-desc { color: var(--muted); font-size: 12.5px; margin: 2px 0 4px; word-break: break-word; }
.game-del { position: absolute; top: 8px; right: 8px; }
.game-del button {
  background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px;
  border-radius: 50%;
}
.game-del button:hover { color: var(--danger); background: var(--danger-bg); }
.game-del svg { width: 15px; height: 15px; display: block; }

.game-play-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap;
}
.game-play-name { font-weight: 700; font-size: 16px; }
.game-play-desc { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.game-frame-wrap { position: relative; padding-top: 66.7%; }
.game-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff;
}

/* --- новые элементы фич (старые цвета и скругления не меняются) --- */
.msg-deleted { opacity: .55; font-style: italic; }
.msg-edited { margin-left: 4px; opacity: .8; }
.post-edited { margin-left: 6px; font-size: 11px; color: var(--muted); }
.profile-status {
  margin-top: 6px; color: var(--accent-strong); font-size: 13px;
  border: 1px dashed var(--accent-strong); border-radius: var(--radius);
  padding: 4px 10px; display: inline-block; background: var(--accent-soft);
}
.msg-edit-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.msg-edit-form .edit-ta { min-height: 52px; }
/* --- рекомендации --- */
.side-rec {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 2px; border-bottom: 1px solid var(--border-faint);
}
.side-rec:last-child { border-bottom: none; }
.side-rec .avatar { width: 32px; height: 32px; font-size: 13px; }
.side-rec a.rec-main { flex: 1; min-width: 0; color: var(--text); }
.side-rec a.rec-main:hover { text-decoration: none; }
.side-rec .rec-name { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-rec .rec-why { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-rec form { margin: 0; }
.side-rec .btn { padding: 2px 9px; font-size: 12px; }

/* --- футер и соглашение --- */
.page-footer {
  margin-top: auto; padding: 14px 0 26px; text-align: center;
  color: var(--muted); font-size: 12px;
}
.page-footer a { color: var(--muted); }
.page-footer a:hover { color: var(--link); }
.auth-terms { margin: 6px 0 12px; line-height: 1.4; }
.terms-card h2 { font-size: 15px; margin: 16px 0 6px; color: var(--text); }
.terms-card p { margin: 4px 0; color: var(--text-soft); }
.terms-admin { margin-top: 20px; }

/* --- редкости магазина --- */
.chip-rarity {
  display: inline-block; padding: 2px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 700; margin-left: 6px; vertical-align: 2px;
}
.chip-rarity.lvl1 { background: #e8ecf1; color: #5b6575; }
.chip-rarity.lvl2 { background: #dceefa; color: #1f6ea8; }
.chip-rarity.lvl3 { background: var(--accent-soft); color: var(--accent-strong); }
.chip-rarity.lvl4 { background: #ffe9b0; color: #9a6a00; }
.chip-soldout { display: inline-block; padding: 3px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 700; background: var(--danger-bg); color: var(--danger-strong); }
.shop-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mb-10 { margin-bottom: 10px; }
.mt-10 { margin-top: 10px; }
.custom-sticker-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sticker-name {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 10px; font: inherit; flex: 1; min-width: 160px; font-size: 13px;
}
.btn-file input[type="file"] { display: none; }
.btn-group-inline { display: inline-flex; }

/* --- устройства и сессии --- */
.device-list { display: flex; flex-direction: column; gap: 4px; }
.device-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1px solid var(--border-faint);
}
.device-row:last-child { border-bottom: none; }
.device-row form { margin: 0; }
.device-info { flex: 1; min-width: 0; }
.device-name { font-weight: 600; font-size: 13px; }
.device-name .chip-ok { margin-left: 6px; }

/* --- подарки --- */
.pf-gift-date { font-size: 10px; color: var(--muted); font-style: normal; }

/* --- группы --- */
.group-av {
  width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft);
  color: var(--accent); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.chat-head .group-av { font-size: 18px; }
.group-new { display: flex; gap: 10px; flex-wrap: wrap; }
.group-new input { flex: 1; min-width: 200px; }
.page-title-btn { vertical-align: middle; margin-left: 10px; }
.msg-author { font-size: 11.5px; margin-bottom: 2px; font-weight: 600; }
.msg-author a.ht { color: var(--accent); }
.chat-members {
  width: 250px; flex-shrink: 0; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; max-height: 75vh; overflow-y: auto;
}
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-right: 10px; }
.member-link { padding-top: 6px; padding-bottom: 6px; }
.member-link .avatar { width: 34px; height: 34px; font-size: 14px; }
.ok-text { color: var(--ok); }
.mb-10 { margin-bottom: 10px; }
.mt-10 { margin-top: 10px; }
.ml-10 { margin-bottom: 0; }
@media (max-width: 1024px) {
  .chat-members { width: 210px; }
}
@media (max-width: 860px) {
  .chat-members { display: none; }
  .chat-list { width: 230px; }
}

/* ---------- аудит стилей: отсутствовавшие/выровненные классы ---------- */
.btn-outline {
  background: var(--card); border-color: var(--border); color: var(--link);
  font-weight: 500;
}
.btn-outline:hover { background: var(--border-faint); }
.btn-outline.btn-danger {
  color: var(--danger-strong);
  background: var(--card); border-color: var(--danger-border);
}
.btn-outline.btn-danger:hover { background: var(--danger-bg); }

.fwd-x {
  border: 1px solid var(--border); background: var(--border-faint);
  border-radius: var(--radius); color: var(--text);
  font: inherit; font-size: 13px; padding: 9px 12px; cursor: pointer;
  text-align: center;
}
.fwd-x:hover { background: #eceef1; }

.dialog-time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.back-link { color: var(--link); font-size: 13px; }
.back-link:hover { text-decoration: underline; }
.priv-badge {
  display: inline-block; padding: 1px 8px; border-radius: 12px;
  background: var(--border-faint); color: var(--muted); font-size: 11px;
  vertical-align: 2px;
}
.profile-info { flex: 1; min-width: 0; }
.profile-info h1 { font-size: 20px; color: var(--link-dark); margin-bottom: 2px; }
.profile-info .profile-bio { margin-top: 6px; color: var(--text-soft); }
.side-card { padding: 12px 14px; }
.side-card .side-title { font-weight: 700; color: var(--link-dark); font-size: 14px; margin-bottom: 8px; }
.note-body { overflow: hidden; }
.note-body .note-text { color: var(--text-soft); font-size: 13px; margin-top: 1px; }
.ql-how { margin-top: 10px; line-height: 1.5; }
.vis-form { display: inline; margin: 0; }
.cmt-ava { display: inline-flex; align-self: flex-start; }

/* альбомы и фото */
.album-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.album-tile {
  display: block; overflow: hidden; color: inherit;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-card);
}
.album-tile:hover { text-decoration: none; border-color: var(--link); }
.album-tile img, .album-tile-empty {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: flex;
  align-items: center; justify-content: center;
  background: var(--border-faint); color: var(--muted); font-size: 12px;
}
.album-tile-meta { padding: 8px 10px; }
.album-tile-meta strong {
  display: block; font-size: 13px; color: var(--link-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.album-tile-meta .muted { display: block; margin-top: 2px; font-size: 12px; }
.photo-card {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-card);
}
.photo-card:hover { border-color: var(--link); }
.photo-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-card-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}
.photo-card-likes { color: #fff; font-size: 12px; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.photo-card-likes.is-liked { color: #ff9b9b; }
.photo-card-caption {
  color: #fff; font-size: 11px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.album-abilities-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.album-abilities-title { flex: 1; min-width: 0; }
.album-abilities-title h1 { font-size: 20px; color: var(--link-dark); margin: 2px 0; }
.album-abilities-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.album-abilities-tools .btn-group-inline { margin-top: 2px; }
.album-photo-owns { margin-top: 8px; }
.album-owns-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 2px; border-bottom: 1px solid var(--border-faint); font-size: 13px;
}
.album-owns-row:last-child { border-bottom: none; }


/* ================= UI-апгрейд 2014–2016 (простой флэт): палитра НЕ менялась ================= */
:root {
  --radius: 5px;
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .07);
  --shadow-pop: 0 6px 20px rgba(0, 0, 0, .14);
}

/* ---- шапка: плоский синий, без градиента, отделена бордером ---- */
.topbar {
  background: #4674a8;
  background-image: none;
  box-shadow: none;
  border-bottom: 1px solid #32567e;
}
.main-nav a { font-weight: 500; }
.main-nav a.active { box-shadow: none; border-radius: 3px; }
.notif-badge { border-radius: 6px; }

/* ---- карточки: тонкая рамка, ноль театра ---- */
.card { border-radius: var(--radius-md); border-color: #dfe2e7; box-shadow: var(--shadow-card); }
.card:hover, .side-card:hover, .album-tile:hover { transform: none; box-shadow: var(--shadow-card); }
.album-tile:hover { border-color: var(--link); }

/* ---- кнопки: простые прямоугольные ---- */
.btn { border-radius: var(--radius); padding: 7px 16px; }
.btn:hover { background: #dfe2e6; }
.btn-primary { border-radius: var(--radius); box-shadow: none; text-shadow: none; }
.btn-small { padding: 4px 12px; }
.btn.btn-outline, .btn-outline { border-radius: var(--radius); }

/* ---- инпуты: простые, акцентный фокус ---- */
input[type="text"], input[type="search"], input[type="password"], input[type="email"],
input[type="number"], textarea, select { border-radius: 3px; }
input[type="text"]:focus, input[type="search"]:focus, input[type="password"]:focus,
input[type="email"]:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--focus-ring);
}

/* ---- типографика: аккуратно, без раздувания ---- */
.page-title { font-size: 21px; font-weight: 700; letter-spacing: 0; margin-bottom: 16px; }
.page-title-sm { font-size: 18px; }
.profile-info h1, .album-abilities-title h1 { font-size: 21px; }

/* ---- аватары: без колец ---- */
.avatar { box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .15), inset 0 1px 0 rgba(255, 255, 255, .25); }
.avatar-img { box-shadow: none; }

/* ---- чат: компактно, как в 2014 ---- */
.chat-list, .chat-window { border-radius: var(--radius-md); border-color: #dfe2e7; }
.chat-dialog.active { border-left: 3px solid var(--accent); border-radius: 0; margin: 0; padding: 10px 14px; }
.chat-dialog:hover { border-radius: 0; }
.chat-head { border-bottom: 1px solid #e7e8ec; }
.chat-body { background: #f7f8fa; }
.msg { border-radius: var(--radius-md); box-shadow: none; }
.msg.mine { border-radius: var(--radius-md) var(--radius-md) 3px var(--radius-md); }
.chat-input input, .chat-input textarea { border-radius: 4px; }
.chat-input input:focus, .chat-input textarea:focus { box-shadow: 0 0 0 2px var(--focus-ring); }
.rg-chip, .react-chip { border-radius: 4px; }
.rg-picker, .react-palette, .fwd-modal { border-radius: var(--radius-lg); }
.fwd-item { border-radius: 3px; }
.chat-toast { border-radius: var(--radius-lg); }

/* ---- лента/контент ---- */
.pm-img, .pm-video, .pm-audio, .cmt-body { border-radius: var(--radius-md); }
.vis-opt-btn, .search-tab { border-radius: 4px; }
.badge, .priv-badge, .rg-cnt, .draft-label, .search-banner { border-radius: var(--radius); }
.chip-ok { border-radius: var(--radius-md); }

/* ---- попапы/контролы ---- */
.cb-btn { border-radius: 4px; }
.quick-login { border-radius: var(--radius-lg); }
.ctl-soon { border-radius: 4px; }

/* ---- фотоальбомы ---- */
.album-tile, .photo-card { border-radius: var(--radius-md); }
.photo-card img { border-radius: var(--radius-md); }

/* ================= кнопки: как на панели, радиус как у "Фото · Видео · Музыка" (--radius-md), без плавности ================= */
.btn, .btn-outline, .btn-primary, .btn-danger, .btn-small,
.vis-opt-btn, .like-btn, .act-btn, .auth-tab, .search-tab, .cb-btn,
.fwd-x, .msg-fwd-btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: none;
}
.search-tab { display: inline-block; }
.like-btn, .act-btn, .vis-opt-btn { padding: 4px 10px; font-size: 12.5px; }
.auth-tab { font-size: 13px; }

.vis-opt-btn:hover, .auth-tab:hover, .search-tab:hover {
  background: var(--accent-soft); color: var(--link); border-color: var(--info-border);
}
.rg-opt { border-radius: var(--radius); }
.cb-btn { padding: 8px 14px; }

.btn:focus-visible, .like-btn:focus-visible, .vis-opt-btn:focus-visible,
.auth-tab:focus-visible, .search-tab:focus-visible, .cb-btn:focus-visible,
.fwd-x:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
/* кнопка "Фото · Видео · Музыка" в композере — исключение, стиль не трогаем */
.btn-file { border-radius: var(--radius-md); transition: none; }

/* ================= чат: стиль и расположение как в Telegram ================= */
.chat-body {
  gap: 0;
  background-color: #e9edf2;
  background-image: radial-gradient(rgba(74, 118, 168, .05) 1.1px, transparent 1.3px);
  background-size: 26px 26px;
}
.chat-scroll { gap: 0; padding: 14px 12px 18px; }
.msg { margin: 3px 0; }
.msg-day {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(30, 55, 90, .08);
  box-shadow: 0 1px 2px rgba(20, 40, 65, .06);
  font-size: 12px; color: #5a6b7e;
  padding: 3px 13px; border-radius: 999px;
  margin: 4px 0 6px;
}

/* пузыри: входящие белые, исходящие синие, хвост-угол у первого в группе */
.msg {
  max-width: 70%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  color: #161c22;
  border-radius: 14px;
  padding: 6px 11px 5px;
}
.msg.theirs { border-top-left-radius: 3px; }
.msg.theirs.gb { border-bottom-left-radius: 3px; }
.msg.mine {
  background: #e7f2fb;
  border-color: rgba(74, 118, 168, .22);
  border-top-right-radius: 3px;
}
.msg.mine.gb { border-bottom-right-radius: 3px; }
.msg.gm { margin-top: -1px; }

/* шапка чата: светлая, как в ТГ */
.chat-head { background: #fff; border-bottom: 1px solid #d8dee6; padding: 8px 12px; }
.chat-head .post-name { font-size: 14px; }
.chat-search input {
  border-radius: 999px; background: #f0f3f6;
  border: 1px solid transparent; transition: none;
}

/* поле ввода: пилюля + круглые кнопки как в ТГ */
.chat-input { background: #fff; border-top: 1px solid #d8dee6; padding: 9px 12px; }
.chat-input textarea {
  background: #f0f3f6; border: 1px solid transparent;
  border-radius: 999px; padding: 10px 16px;
}
.chat-input textarea:focus {
  border-color: transparent; box-shadow: 0 0 0 2px var(--focus-ring);
}
.chat-file {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%; border: none; background: none;
  color: var(--link-dark); padding: 0;
  box-shadow: none;
}
.chat-file:hover { background: var(--border-faint); color: var(--link); }
.chat-send {
  width: 44px; height: 44px; flex-shrink: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: none;
  background: var(--accent); color: #fff;
}
.chat-send:hover { background: var(--accent-strong); color: #fff; }
.chat-send svg { width: 19px; height: 19px; }

body.chat-full .chat-window,
body.chat-full .chat-members { border-left: none; }

/* ================= чат: чуть шире (маленькое окошко) ================= */
body.chat-wide .container { max-width: 1200px; }

/* ================= фон чата (кастомизация) ================= */
.chat-body { background-color: var(--cbg, #f7f8fa); position: relative; }
.chat-body::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: var(--cbg-img, none); background-size: cover; background-position: center;
  filter: blur(var(--cbg-blur, 0px));
}
.chat-scroll > .msg, .chat-scroll > .msg-day { position: relative; z-index: 1; }
.bg-current { display: flex; gap: 10px; align-items: center; }
.bg-current img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; }
.bg-sep { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.bg-sep::before, .bg-sep::after { content: ''; flex: 1; height: 1px; background: var(--border-soft, #e2e3e8); }
.bg-file { justify-content: center; }
.bg-file svg { width: 16px; height: 16px; }
.bg-blur { margin-top: 9px; }
.theme-color-row { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.theme-color-row input[type="color"] { width: 44px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); cursor: pointer; flex-shrink: 0; }
.theme-color-row input[type="text"] { flex: 1; min-width: 90px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.theme-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.theme-form .btn { flex: 1; min-width: 120px; }
.theme-pick-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--muted); }
.theme-pick-btn:hover { background: var(--border-soft, #e2e3e8); color: var(--text); }
.theme-pick-btn svg { width: 19px; height: 19px; }
.fwd-x { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); float: right; }

.app-ver { color: var(--muted); }
.app-ver-mob { display: none; }

.terms-meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

/* pinned message */
.chat-pin{display:flex;align-items:center;gap:8px;padding:8px 12px;margin:6px 8px 0;border-left:3px solid var(--accent,#7c4dff);background:var(--border-faint,rgba(124,77,255,.08));border-radius:8px;font-size:13px}
.chat-pin[hidden]{display:none}
.chat-pin-body{flex:1;min-width:0}
.chat-pin-body b{display:block;font-size:12px;color:var(--accent,#7c4dff)}
.chat-pin-text{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-soft,#555)}
.chat-pin-x{background:none;border:none;font-size:18px;line-height:1;cursor:pointer;color:var(--muted,#888);padding:0 4px}

/* ===== calls (rewritten UI) ===== */
.call-banner{position:sticky;top:0;z-index:50;margin:8px 0}
.call-banner-in{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--card,#fff);border:1px solid var(--border,#d7d8db);border-radius:8px;box-shadow:var(--shadow-pop,0 6px 20px rgba(0,0,0,.12))}
.cb-info{flex:1;min-width:0}
.cb-info strong{display:block;font-size:14px}
.cb-info span{display:block;font-size:12px;color:var(--muted,#777)}
.cb-btn{border:1px solid var(--border,#d7d8db);background:var(--bg,#f2f3f5);color:var(--text,#222);padding:6px 10px;border-radius:6px;cursor:pointer;text-decoration:none;font-size:13px}
.cb-btn.cb-answer{background:var(--accent,#4a76a8);color:#fff;border-color:var(--accent-strong,#2b5d86)}
.cb-btn.cb-decline{background:#a12622;color:#fff;border-color:#7f1d1d}
.call-wrap{position:relative;min-height:420px;background:#111;border-radius:10px;overflow:hidden;color:#fff}
.call-stage{position:relative;min-height:420px;display:flex;align-items:center;justify-content:center;background:linear-gradient(180deg,#243349,#141922)}
.call-remote{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:none;background:#000}
.call-voice-view{position:relative;z-index:2;text-align:center;padding:24px}
.call-voice-view .call-name{margin:10px 0 4px;font-size:22px;color:#fff}
.call-status{color:#d7e4f5;font-size:14px;min-height:20px}
.call-timer{color:#9fc1e8;font-size:13px;margin-top:4px;min-height:18px}
.call-self{position:absolute;right:12px;bottom:76px;width:140px;height:100px;border-radius:8px;overflow:hidden;border:2px solid rgba(255,255,255,.4);background:#000;z-index:3}
.call-local{width:100%;height:100%;object-fit:cover}
.call-controls{position:absolute;left:0;right:0;bottom:12px;display:flex;justify-content:center;gap:12px;z-index:4}
.call-controls .ctl{width:46px;height:46px;border-radius:50%;border:none;background:rgba(255,255,255,.18);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center}
.call-controls .ctl svg{width:22px;height:22px}
.call-controls .ctl.ctl-end{background:#c0392b}
.call-controls .ctl.off{background:rgba(0,0,0,.45);color:#ffb4ab}
.call-overlay{position:absolute;inset:0;background:rgba(8,12,18,.72);display:flex;align-items:center;justify-content:center;z-index:5;padding:16px}
.call-overlay[hidden]{display:none}
.call-start-card{width:100%;max-width:360px;background:var(--card,#fff);color:var(--text,#222);border-radius:10px;padding:18px;text-align:center;box-shadow:var(--shadow-pop,0 10px 30px rgba(0,0,0,.35))}
.call-start-card h3{margin:8px 0 4px}
.call-ov-actions{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.call-start-avatar .avatar{width:72px;height:72px;font-size:28px;line-height:72px}
.mobchat-call-actions{display:flex;gap:4px;align-items:center}
.mobchat-call-btn{padding:4px 8px;min-width:0}
.chat-head-actions{display:flex;gap:6px;align-items:center}
