:root {
  --bg-0: #1e1f22;
  --bg-1: #2b2d31;
  --bg-2: #313338;
  --bg-3: #383a40;
  --bg-hover: #35373c;
  --bg-active: #404249;
  --text: #dbdee1;
  --text-strong: #f2f3f5;
  --muted: #949ba4;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --green: #23a559;
  --red: #da373c;
  --yellow: #f0b232;
  --radius: 8px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--bg-0);
  color: var(--text);
  font: 15px/1.375 "Segoe UI", "gg sans", system-ui, sans-serif;
  user-select: none;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; }
.gap { gap: 10px; }
code { font-family: Consolas, monospace; font-size: 0.86em; background: var(--bg-0); padding: 1px 5px; border-radius: 4px; }
svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: var(--text); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

.titlebar {
  height: 30px;
  -webkit-app-region: drag;
  display: flex;
  align-items: center;
  padding-left: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ---------- кнопки и поля ---------- */
.btn {
  border: 0;
  border-radius: 4px;
  padding: 8px 16px;
  background: var(--bg-active);
  color: var(--text-strong);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.15s;
}
.btn:hover { background: #4e5058; }
.btn.primary { background: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.green { background: var(--green); }
.btn.green:hover { background: #1a8b4a; }
.btn.danger { background: transparent; color: #f87171; }
.btn.danger:hover { background: var(--red); color: white; }
.btn.wide { width: 100%; padding: 11px; margin-top: 8px; }
.btn:disabled { opacity: 0.6; cursor: default; }
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn.on { color: var(--text-strong); }
.icon-btn.off { color: var(--red); }
.icon-btn.small { width: 20px; height: 20px; }
.icon-btn.small svg { width: 16px; height: 16px; }

.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.02em; }
.field input, .field select {
  width: 100%;
  background: var(--bg-0);
  border: 0;
  border-radius: 4px;
  padding: 10px;
  outline: none;
  user-select: text;
}
.field input:focus, .field select:focus { box-shadow: 0 0 0 2px var(--accent); }
.hint { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.form-error { background: rgba(218, 55, 60, 0.15); color: #fca5a5; border-radius: 4px; padding: 8px 10px; margin-bottom: 14px; font-size: 14px; }

.tabs { display: flex; gap: 4px; background: var(--bg-0); padding: 4px; border-radius: 6px; margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 7px; border-radius: 4px; cursor: pointer; }
.tabs button.active { background: var(--bg-active); color: var(--text-strong); }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; }
.swatch.active { outline-color: white; }

/* ---------- вход ---------- */
#login {
  position: fixed;
  inset: 30px 0 0 0;
  display: flex;
  /* Карточка по центру, когда помещается; высокая (регистрация) прокручивается с самого верха,
     а не уезжает под рамку окна, как при align-items: center. */
  align-items: flex-start;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 20%, #3b3f9e 0%, transparent 55%), radial-gradient(ellipse at 80% 90%, #7a2f72 0%, transparent 55%), var(--bg-0);
  background-attachment: fixed;
  overflow-y: auto;
}
.login-card { width: 440px; max-width: calc(100% - 32px); background: var(--bg-2); border-radius: var(--radius); padding: 32px; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); margin: auto; flex: none; }
#login { padding: 20px 0; }
.login-logo { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 30px; font-weight: 800; color: var(--text-strong); letter-spacing: 0.06em; }
.login-logo svg { width: 38px; height: 38px; color: var(--accent); }

/* ---------- раскладка ---------- */
#app { height: calc(100% - 30px); display: flex; flex-direction: column; }
#banner { background: var(--yellow); color: #1e1f22; text-align: center; font-size: 13px; font-weight: 600; padding: 4px; }
.layout { flex: 1; display: flex; min-height: 0; }

#rail { width: 72px; background: var(--bg-0); padding: 6px 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none; }
#rail::-webkit-scrollbar { display: none; }
.rail-item { position: relative; width: 72px; display: flex; justify-content: center; cursor: pointer; }
.rail-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px;
  transition: border-radius 0.2s, background 0.2s;
}
.rail-item:hover .rail-icon, .rail-item.active .rail-icon { border-radius: 16px; background: var(--accent); color: white; }
.rail-item.add .rail-icon { color: var(--green); }
.rail-item.add:hover .rail-icon { background: var(--green); color: white; }
.pill { position: absolute; left: 0; top: 50%; width: 4px; height: 0; background: white; border-radius: 0 4px 4px 0; transform: translateY(-50%); transition: height 0.2s; }
.rail-item.unread .pill { height: 8px; }
.rail-item:hover .pill { height: 20px; }
.rail-item.active .pill { height: 40px; }
.rail-voice { position: absolute; right: 10px; bottom: -2px; background: var(--green); border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--bg-0); }
.rail-voice svg { width: 10px; height: 10px; color: white; }
.rail-sep { width: 32px; height: 2px; background: var(--bg-3); border-radius: 1px; }

#sidebar { width: 240px; background: var(--bg-1); display: flex; flex-direction: column; flex: none; border-top-left-radius: var(--radius); }
#net-header {
  height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; color: var(--text-strong); border-bottom: 1px solid var(--bg-0); cursor: pointer; flex: none;
}
#net-header:hover { background: var(--bg-hover); }
#channels { flex: 1; overflow-y: auto; padding: 8px 8px 16px; }
.chan-section { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px 4px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.02em; }
.chan {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin: 1px 0;
  border-radius: 4px; color: var(--muted); cursor: pointer; position: relative;
}
.chan:hover { background: var(--bg-hover); color: var(--text); }
.chan.active { background: var(--bg-active); color: var(--text-strong); }
.chan.unread { color: var(--text-strong); font-weight: 600; }
.chan.unread::before { content: ''; position: absolute; left: -8px; width: 4px; height: 8px; background: white; border-radius: 0 4px 4px 0; }
.chan-icon { display: flex; color: var(--muted); }
.chan .ellipsis { flex: 1; }
.chan-del { display: none; }
.chan:hover .chan-del { display: inline-flex; }
.voice-users { padding: 2px 0 6px 30px; }
.voice-user { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 4px; color: var(--muted); font-size: 14px; }
.voice-user:hover { background: var(--bg-hover); color: var(--text); }
.voice-user .ellipsis { flex: 1; }
.vu-icon svg { width: 14px; height: 14px; color: var(--muted); }
.live { background: var(--red); color: white; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 8px; }

#voice-panel { display: flex; align-items: center; gap: 2px; padding: 8px; border-bottom: 1px solid var(--bg-3); background: #232428; flex: none; }
.vp-info { flex: 1; min-width: 0; }
.vp-status { font-size: 13px; font-weight: 600; }
.vp-status.ok { color: var(--green); }
.vp-status.wait { color: var(--yellow); }
.vp-where { font-size: 12px; color: var(--muted); cursor: pointer; }
.vp-where:hover { text-decoration: underline; }
.vp-route { font-size: 11px; color: var(--muted); }

#user-panel { height: 52px; background: #232428; display: flex; align-items: center; padding: 0 8px; gap: 2px; flex: none; }
.up-user { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 4px; border-radius: 4px; cursor: pointer; }
.up-user:hover { background: var(--bg-hover); }
.up-info { min-width: 0; font-size: 14px; line-height: 1.2; }

.avatar {
  width: var(--size); height: var(--size); min-width: var(--size);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 600; font-size: calc(var(--size) * 0.42);
  transition: box-shadow 0.1s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.avatar.speaking { box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--green); }

/* ---------- основная область ---------- */
#main { flex: 1; display: flex; flex-direction: column; background: var(--bg-2); min-width: 0; }
#main-header { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--bg-0); color: var(--text-strong); flex: none; }
#content { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }

#messages { flex: 1; overflow-y: auto; padding: 16px 0 8px; user-select: text; }
.chan-start { padding: 16px 16px 8px; }
.chan-start h2 { margin: 8px 0 4px; color: var(--text-strong); font-size: 28px; }
.chan-start p { margin: 0; }
.chan-start-icon { width: 68px; height: 68px; border-radius: 50%; background: var(--bg-active); display: flex; align-items: center; justify-content: center; }
.chan-start-icon svg { width: 40px; height: 40px; }
.loading-more { text-align: center; color: var(--muted); padding: 10px; font-size: 13px; }
.day-divider { display: flex; align-items: center; margin: 20px 16px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.day-divider::before, .day-divider::after { content: ''; flex: 1; height: 1px; background: var(--bg-active); }
.day-divider span { padding: 0 8px; }
.msg { display: flex; gap: 16px; padding: 2px 48px 2px 16px; margin-top: 16px; position: relative; }
.msg.grouped { margin-top: 0; padding-left: 72px; }
.msg:hover { background: #2e3035; }
.msg-body { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 8px; }
.msg-author { font-weight: 600; }
.msg-time { font-size: 12px; color: var(--muted); }
.msg-hover-time { position: absolute; left: 0; width: 64px; text-align: right; font-size: 11px; color: var(--muted); top: 5px; display: none; }
.msg.grouped:hover .msg-hover-time { display: block; }
.msg-text { white-space: normal; word-wrap: break-word; overflow-wrap: anywhere; color: var(--text); }
.msg-text a, .att-name { color: #00a8fc; text-decoration: none; }
.msg-text a:hover, .att-name:hover { text-decoration: underline; }
.msg-text code { background: var(--bg-0); }
.msg-text pre { background: var(--bg-1); border: 1px solid var(--bg-0); border-radius: 4px; padding: 8px; margin: 6px 0; overflow-x: auto; max-width: 100%; }
.msg-text pre code { background: none; padding: 0; }
.atts { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; align-items: flex-start; }
.att-img img { max-width: min(420px, 100%); max-height: 320px; border-radius: 6px; display: block; cursor: zoom-in; }
.att-video { max-width: min(480px, 100%); max-height: 320px; border-radius: 6px; background: black; }
.att-file { display: flex; align-items: center; gap: 10px; background: var(--bg-1); border: 1px solid var(--bg-0); border-radius: 6px; padding: 10px 14px; max-width: 420px; }
.att-file svg { width: 32px; height: 32px; color: var(--accent); }
.att-file audio { height: 32px; margin-top: 4px; }

.composer-wrap { padding: 0 16px; flex: none; }
.composer { display: flex; align-items: flex-start; background: var(--bg-3); border-radius: var(--radius); padding: 4px 8px; }
.composer .icon-btn { margin-top: 4px; }
#composer-input {
  flex: 1; background: transparent; border: 0; outline: none; resize: none;
  padding: 10px 6px; max-height: 220px; line-height: 1.375; user-select: text;
}
#typing { height: 24px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
#typing b { color: var(--text); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; background: var(--text); border-radius: 50%; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

#pending { display: flex; gap: 10px; background: var(--bg-3); border-radius: var(--radius) var(--radius) 0 0; padding: 12px; overflow-x: auto; border-bottom: 1px solid var(--bg-2); }
#pending:not(.hidden) + .composer { border-radius: 0 0 var(--radius) var(--radius); }
.pending-file { width: 160px; background: var(--bg-1); border-radius: 6px; padding: 8px; position: relative; flex: none; }
.pending-file img { width: 100%; height: 90px; object-fit: cover; border-radius: 4px; display: block; }
.pending-file.error { outline: 1px solid var(--red); }
.pf-icon { height: 90px; display: flex; align-items: center; justify-content: center; }
.pf-icon svg { width: 44px; height: 44px; color: var(--accent); }
.pf-name { font-size: 12px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-bar { height: 3px; background: var(--bg-0); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.pf-bar div { height: 100%; background: var(--green); transition: width 0.2s; }
.pf-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--red); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pf-x svg { width: 12px; height: 12px; }

.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; }
.empty h2 { color: var(--text-strong); margin: 16px 0 6px; }
.empty p { max-width: 420px; margin: 0 0 20px; }
.empty-icon svg { width: 80px; height: 80px; color: var(--accent); }

/* ---------- голосовая сцена ---------- */
#stage { flex: 1; display: flex; flex-direction: column; background: #000; min-height: 0; }
.stage-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--bg-0); }
.stage-empty h2 { color: var(--text-strong); margin: 16px 0 4px; }
.stage-empty p { margin: 0 0 20px; }
.stage-avatars { display: flex; gap: 8px; }
.stage-body { flex: 1; min-height: 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.stage-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); grid-auto-rows: minmax(120px, 1fr); align-content: center; }
.stage-grid.n1 { grid-template-columns: minmax(0, 900px); justify-content: center; }
.stage-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(120px, 420px); }
.stage-focus { flex: 1; min-height: 0; display: flex; }
.stage-focus .tile { flex: 1; }
.stage-strip { display: flex; gap: 12px; height: 120px; flex: none; justify-content: safe center; overflow-x: auto; }
.stage-strip .tile { width: 200px; flex: none; }
.tile {
  position: relative; border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-1); min-height: 0; cursor: default;
  container-type: size;
}
/* Аватар в плитке подстраивается под её размер. */
.tile .avatar { --size: clamp(32px, 38cqmin, 120px) !important; }
.tile.user { background: color-mix(in srgb, var(--c) 30%, var(--bg-1)); }
.tile.screen { background: #000; cursor: zoom-in; }
.tile.big.screen { cursor: zoom-out; }
.tile video { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile .avatar.speaking { box-shadow: 0 0 0 4px var(--green); }
.tile-label { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.6); color: white; padding: 3px 8px; border-radius: 4px; font-size: 13px; display: flex; align-items: center; gap: 4px; max-width: calc(100% - 16px); }
.tile-label svg { width: 15px; height: 15px; }
.tile-warn { color: var(--yellow); font-size: 11px; margin-left: 4px; }
.tile-actions { position: absolute; right: 8px; top: 8px; display: none; }
.tile:hover .tile-actions { display: block; }
.tile-actions .icon-btn { background: rgba(0, 0, 0, 0.6); color: white; width: 32px; height: 32px; font-size: 18px; }
.stage-controls { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px; flex: none; }
.ctl-group { display: flex; align-items: center; background: var(--bg-1); border-radius: 30px; padding-right: 2px; }
.ctl-caret { width: 26px; height: 40px; border: 0; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 0 20px 20px 0; padding: 0; }
.ctl-caret:hover { color: var(--text-strong); }
.ctl-caret svg { width: 18px; height: 18px; transform: rotate(180deg); }
.dev-pop { position: fixed; z-index: 60; width: 300px; max-width: calc(100vw - 16px); max-height: calc(100vh - 60px); overflow-y: auto; background: #111214; border-radius: 8px; padding: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55); display: flex; flex-direction: column; gap: 8px; animation: pop 0.12s; }
.dev-title { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.02em; }
.dev-list { display: flex; flex-direction: column; gap: 2px; }
.dev-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 4px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; font-size: 14px; min-width: 0; }
.dev-item:hover { background: var(--bg-hover); }
.dev-item.active { color: var(--text-strong); background: var(--bg-active); }
.dev-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); flex: none; }
.dev-item.active .dev-radio { border-color: var(--accent); background: radial-gradient(var(--accent) 45%, transparent 50%); }
.dev-meter { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.dev-meter i { display: block; height: 100%; width: 0; background: var(--green); transition: width 0.06s; }
.dev-pop .link-btn { align-self: flex-start; padding: 0; }
.round { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--bg-3); color: var(--text-strong); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.round:hover { background: #4e5058; }
.round svg { width: 24px; height: 24px; }
.round.off { background: #fff; color: var(--red); }
.round.on { background: var(--green); }
.round.red { background: var(--red); }
.round.red:hover { background: #a12828; }

/* ---------- участники ---------- */
#members { width: 250px; background: var(--bg-1); overflow-y: auto; padding: 8px 8px 16px; flex: none; }
.members-title { padding: 16px 8px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.02em; }
.member { display: flex; align-items: center; gap: 12px; padding: 5px 8px; border-radius: 4px; }
.member:hover { background: var(--bg-hover); }
.member.offline { opacity: 0.4; }
.av-wrap { position: relative; }
.status { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: #80848e; border: 3px solid var(--bg-1); }
.status.on { background: var(--green); }
.member-info { min-width: 0; flex: 1; }
.member-name { font-weight: 500; color: var(--text); }
.crown { color: var(--yellow); }
.member-sub { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.member-sub code { background: none; padding: 0; font-size: 11px; }
.route { font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 3px; white-space: nowrap; }
.route.lan { background: rgba(35, 165, 89, 0.2); color: #4ade80; }
.route.p2p { background: rgba(88, 101, 242, 0.25); color: #a5b4fc; }
.route.relay { background: rgba(240, 178, 50, 0.2); color: var(--yellow); }
.route.wait { color: var(--muted); }
.route.me { background: var(--bg-active); color: var(--muted); }

/* ---------- модалки, тосты ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; z-index: 50; animation: fade 0.12s; }
.modal { background: var(--bg-2); border-radius: var(--radius); padding: 24px; width: 460px; max-width: calc(100vw - 32px); max-height: calc(100vh - 60px); overflow-y: auto; box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); animation: pop 0.15s; }
.modal.wide { width: 760px; }
.modal h2 { margin: 0 0 8px; color: var(--text-strong); font-size: 20px; }
.modal > p { margin: 0 0 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.modal.viewer { background: transparent; box-shadow: none; width: auto; padding: 0; text-align: center; }
.modal.viewer img { max-width: 90vw; max-height: 80vh; border-radius: 4px; display: block; }
.viewer-actions { margin-top: 8px; text-align: left; }
.viewer-actions a { color: var(--muted); font-size: 13px; }
.info-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 16px 0; align-items: center; user-select: text; }
.settings-section { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-strong); margin: 22px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--bg-active); }
.src-section { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.src { background: var(--bg-1); border: 2px solid transparent; border-radius: 6px; padding: 6px; cursor: pointer; text-align: left; }
.src:hover { border-color: var(--accent); }
.src img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: 4px; display: block; }
.src span { display: block; font-size: 12px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } }

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { background: #111214; color: var(--text-strong); padding: 10px 16px; border-radius: 6px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); font-size: 14px; animation: pop 0.15s; transition: opacity 0.4s; }
.toast.out { opacity: 0; }

.popover { position: fixed; z-index: 60; background: #111214; border-radius: 6px; padding: 12px; width: 220px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.popover .muted { width: 100%; }
.popover input { flex: 1; accent-color: var(--accent); }

#drop { position: fixed; inset: 0; background: rgba(88, 101, 242, 0.85); z-index: 90; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#drop div { font-size: 22px; font-weight: 700; color: white; border: 3px dashed white; border-radius: 16px; padding: 40px 60px; }

/* ---------- Radmin VPN и поиск серверов ---------- */
.invite-box { display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--bg-1); border-radius: 8px; padding: 14px 12px; margin-bottom: 10px; }
.invite-code { font-size: 26px; font-weight: 700; letter-spacing: 3px; color: var(--text-strong); user-select: text; font-family: Consolas, 'Courier New', monospace; }
.invite-inline { font-weight: 700; letter-spacing: 1px; user-select: text; }
details.more { margin: 4px 0 12px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #80848e; flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.small-btn { padding: 5px 12px; font-size: 13px; }
.link-btn { background: transparent; color: #00a8fc; padding: 4px 0; font-size: 13px; }
.link-btn:hover { background: transparent; text-decoration: underline; }
.found-list { display: flex; flex-direction: column; gap: 6px; max-height: 160px; overflow-y: auto; }
.found { display: flex; align-items: center; gap: 10px; background: var(--bg-1); border: 1px solid transparent; border-radius: 6px; padding: 8px 10px; cursor: pointer; text-align: left; }
.found:hover { border-color: var(--accent); background: var(--bg-hover); }
.found b { flex: 1; color: var(--text-strong); font-weight: 600; }
.found-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 3px; background: rgba(35, 165, 89, 0.2); color: #4ade80; }
.big-code { font-size: 15px; color: var(--text-strong); user-select: text; }

/* ---------- веб-версия: нет системной рамки окна ---------- */
.web .titlebar { display: none; }
.web #app { height: 100%; }
.web #login { inset: 0; }

/* ---------- регистрация и восстановление пароля ---------- */
.form-ok { background: rgba(35, 165, 89, 0.15); color: #86efac; border-radius: 4px; padding: 8px 10px; margin-bottom: 14px; font-size: 14px; }
.pw-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: -6px 0 14px; font-size: 12px; color: var(--muted); }
.pw-checks .ok { color: #4ade80; }
.q-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.q-row .q-sel, .q-row .q-custom { grid-column: 1 / -1; }
.q-row .q-ans { grid-column: 1 / -1; }
.q-row select, .q-row input {
  width: 100%; background: var(--bg-0); border: 0; border-radius: 4px; padding: 9px 10px; outline: none; color: var(--text); font: inherit;
}
.q-row select:focus, .q-row input:focus { box-shadow: 0 0 0 2px var(--accent); }
.forgot-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; color: var(--text-strong); }
#b-login { margin: -8px 0 10px; }
#b-forgot > .btn { margin-bottom: 14px; }
.field > span.q-label { text-transform: none; font-size: 14px; font-weight: 600; color: var(--text); }

/* ---------- выбор режима ---------- */
.mode-card h2 { color: var(--text-strong); margin: 18px 0 16px; font-size: 20px; }
.mode-choice {
  display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; cursor: pointer;
  background: var(--bg-1); border: 2px solid transparent; border-radius: 8px; padding: 14px; margin-bottom: 10px;
}
.mode-choice:hover { border-color: var(--accent); background: var(--bg-hover); }
.mode-choice b { display: block; color: var(--text-strong); font-size: 16px; margin-bottom: 4px; }
.mode-choice .muted { display: block; font-size: 13px; line-height: 1.4; }
.mode-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: white; display: flex; align-items: center; justify-content: center; flex: none; }
.mode-icon svg { width: 24px; height: 24px; }
.mode-switch { display: block; margin: 12px auto 0; }
.net-server { margin: 4px 0 12px; font-size: 13px; color: var(--muted); }
.net-server summary { cursor: pointer; margin-bottom: 10px; }

/* ---------- адаптивность ---------- */
.nav-btn { display: none; }
#backdrop { display: none; }
#main-header b.ellipsis { min-width: 0; }

/* Средняя ширина: участники — выдвижная панель справа. */
@media (max-width: 1099px) {
  .layout { position: relative; }
  #members { display: none; position: absolute; right: 0; top: 0; bottom: 0; z-index: 30; max-width: 85vw; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45); }
  .layout.members-open #members { display: block; }
  .layout.members-open #backdrop, .layout.nav-open #backdrop { display: block; position: absolute; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.5); }
  .msg { padding-right: 24px; }
}

/* Узкое окно / телефон: сети и каналы — выдвижное меню слева. */
@media (max-width: 759px) {
  .nav-btn { display: inline-flex; margin-left: -6px; }
  #rail, #sidebar { display: none; }
  .layout.nav-open #rail, .layout.nav-open #sidebar { display: flex; position: absolute; top: 0; bottom: 0; z-index: 30; }
  .layout.nav-open #rail { left: 0; }
  .layout.nav-open #sidebar { left: 72px; width: min(260px, calc(100vw - 72px - 32px)); border-radius: 0; box-shadow: 8px 0 24px rgba(0, 0, 0, 0.45); }
  #main-header { padding: 0 8px 0 12px; }
  .msg { gap: 10px; padding: 2px 12px; }
  .msg.grouped { padding-left: 62px; }
  .msg-hover-time { display: none !important; }
  .composer-wrap { padding: 0 8px; }
  .stage-body { padding: 8px; gap: 8px; }
  .stage-grid, .stage-grid.n2 { grid-template-columns: 1fr; gap: 8px; }
  .stage-strip { height: 90px; gap: 8px; }
  .stage-strip .tile { width: 140px; }
  .stage-controls { gap: 8px; padding: 10px 8px; }
  .round { width: 46px; height: 46px; }
  .modal { padding: 18px; }
  .info-grid { grid-template-columns: 1fr; gap: 2px 0; }
  .info-grid > .muted { margin-top: 8px; }
  .login-card { padding: 22px 18px; }
  .q-row { grid-template-columns: 1fr; }
  .att-file { max-width: 100%; }
}

/* Низкое окно: всё компактнее по высоте. */
@media (max-height: 640px) {
  #main-header, #net-header { height: 40px; }
  #user-panel { height: 46px; }
  #voice-panel { padding: 5px 8px; }
  .stage-body { padding: 8px; gap: 8px; }
  .stage-strip { height: 84px; }
  .stage-controls { padding: 8px; gap: 8px; }
  .round { width: 44px; height: 44px; }
  .round svg { width: 20px; height: 20px; }
  .ctl-caret { height: 34px; }
  .stage-empty .stage-avatars .avatar { --size: 44px !important; }
  .stage-empty h2 { margin: 8px 0 2px; }
  .msg { margin-top: 10px; }
  #login { padding: 8px 0; }
  .login-card { padding: 20px 24px; }
  .login-logo { margin-bottom: 6px; }
  .field { margin-bottom: 10px; }
}
@media (max-height: 480px) {
  .stage-strip { display: none; }
  .members-title { padding-top: 8px; }
}

/* =====================================================================
   Liquid glass: полупрозрачные «стеклянные» панели поверх живого фона,
   мягкие блики, пружинящие анимации.
   ===================================================================== */
:root {
  --bg-0: rgba(6, 6, 14, 0.42);
  --bg-1: rgba(255, 255, 255, 0.045);
  --bg-2: rgba(255, 255, 255, 0.03);
  --bg-3: rgba(255, 255, 255, 0.08);
  --bg-hover: rgba(255, 255, 255, 0.07);
  --bg-active: rgba(255, 255, 255, 0.13);
  --text: #e4e3ee;
  --text-strong: #ffffff;
  --muted: #a3a1b8;
  --accent: #7b6cff;
  --accent-hover: #6a5af0;
  --accent-grad: linear-gradient(135deg, #8b7bff 0%, #5d8bff 55%, #47c7ff 100%);
  --green: #2fd17a;
  --red: #ff4d61;
  --radius: 14px;
  --glass: rgba(24, 22, 38, 0.52);
  --glass-strong: rgba(26, 24, 42, 0.8);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --blur: blur(26px) saturate(175%);
  --spring: cubic-bezier(0.2, 1.25, 0.35, 1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

body { background: #08070f; }
code { background: rgba(0, 0, 0, 0.3); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.22); }

/* Живой фон: размытые цветные пятна медленно плывут. */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(120% 90% at 50% 0%, #15122a 0%, #08070f 60%); }
.ambient i { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(70px); opacity: 0.55; will-change: transform; }
.ambient i:nth-child(1) { background: #5b3cff; left: -15vmax; top: -20vmax; animation: drift1 48s ease-in-out infinite alternate; }
.ambient i:nth-child(2) { background: #c0388f; right: -20vmax; bottom: -25vmax; opacity: 0.4; animation: drift2 56s ease-in-out infinite alternate; }
.ambient i:nth-child(3) { background: #1f8fff; left: 35vw; top: 30vh; width: 40vmax; height: 40vmax; opacity: 0.28; animation: drift3 64s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vw, 22vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-22vw, -18vh) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-25vw, 15vh) scale(0.85); } }

/* Стекло */
.glass, #sidebar, #main, #members, .modal, .login-card, .dev-pop, .popover, .toast {
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-hi), var(--glass-shadow);
}
.modal, .dev-pop, .popover, .toast { background: var(--glass-strong); }

/* Раскладка: панели парят с отступами */
#login { background: transparent; }
.titlebar { color: rgba(255, 255, 255, 0.55); }
.layout { gap: 8px; padding: 0 8px 8px; }
#rail { background: transparent; padding-top: 4px; }
#sidebar { border-radius: 18px; overflow: hidden; }
#main { border-radius: 18px; overflow: hidden; background: rgba(20, 18, 32, 0.42); }
#members { border-radius: 18px; }
#net-header, #main-header { border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.02); }
#voice-panel { background: rgba(47, 209, 122, 0.06); border-bottom: 1px solid rgba(255, 255, 255, 0.06); border-top: 1px solid rgba(255, 255, 255, 0.06); }
#user-panel { background: rgba(0, 0, 0, 0.18); }
#stage { background: transparent; }
.stage-empty { background: transparent; }
.msg:hover { background: rgba(255, 255, 255, 0.035); }
.msg { border-radius: 10px; margin-left: 6px; margin-right: 6px; }

/* Кнопки */
.btn { border-radius: 12px; background: rgba(255, 255, 255, 0.09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); transition: transform 0.25s var(--spring), background 0.2s, box-shadow 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: rgba(255, 255, 255, 0.15); transform: translateY(-1px); }
.btn:active { transform: scale(0.96); }
.btn.primary { background: var(--accent-grad); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 20px rgba(110, 100, 255, 0.35); }
.btn.primary:hover { background: var(--accent-grad); filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 26px rgba(110, 100, 255, 0.5); }
.btn.green { background: linear-gradient(135deg, #34d98a, #19a866); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 20px rgba(47, 209, 122, 0.3); }
.btn.danger { background: rgba(255, 77, 97, 0.08); box-shadow: none; }
.btn.danger:hover { background: var(--red); }
.btn.link-btn { background: none; box-shadow: none; }
.btn svg { width: 18px; height: 18px; }
.btn.copied { background: rgba(47, 209, 122, 0.25) !important; }
.icon-btn { border-radius: 10px; transition: background 0.2s, color 0.2s, transform 0.25s var(--spring); }
.icon-btn:active { transform: scale(0.9); }
.field input, .field select, .composer, .inv-link input {
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field select option { background: #1b1928; }
.field input:focus, .field select:focus { box-shadow: 0 0 0 3px rgba(123, 108, 255, 0.35); border-color: rgba(123, 108, 255, 0.7); }
.composer { padding: 6px 10px; }
.composer:focus-within { border-color: rgba(123, 108, 255, 0.55); box-shadow: 0 0 0 3px rgba(123, 108, 255, 0.18); }
.tabs { background: rgba(0, 0, 0, 0.28); border-radius: 14px; padding: 4px; border: 1px solid rgba(255, 255, 255, 0.05); }
.tabs button { border-radius: 10px; transition: background 0.25s, color 0.2s; }
.tabs button.active { background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 10px rgba(0, 0, 0, 0.25); }

/* Список сетей слева */
.rail-icon { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); transition: border-radius 0.35s var(--spring), background 0.25s, transform 0.3s var(--spring); }
.rail-item:hover .rail-icon { transform: translateY(-1px); }
.rail-item:hover .rail-icon, .rail-item.active .rail-icon { border-radius: 16px; background: var(--accent-grad); }
.rail-item.add:hover .rail-icon { background: linear-gradient(135deg, #34d98a, #19a866); }
.rail-voice { border-color: #08070f; }
.pill { transition: height 0.3s var(--spring); }

/* Каналы */
.chan { border-radius: 10px; transition: background 0.18s, color 0.18s, transform 0.25s var(--spring); }
.chan:hover { transform: translateX(2px); }
.chan.active { background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.invite-cta { display: flex; align-items: center; gap: 10px; width: 100%; margin: 4px 0 2px; padding: 9px 12px; border: 1px solid rgba(123, 108, 255, 0.35); border-radius: 12px; background: linear-gradient(135deg, rgba(139, 123, 255, 0.18), rgba(71, 199, 255, 0.1)); color: var(--text-strong); cursor: pointer; font-weight: 600; font-size: 14px; transition: transform 0.25s var(--spring), background 0.2s; }
.invite-cta:hover { transform: translateY(-1px); background: linear-gradient(135deg, rgba(139, 123, 255, 0.3), rgba(71, 199, 255, 0.18)); }
.invite-cta svg { width: 18px; height: 18px; color: #b7adff; }

/* Звонок */
.tile { border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 30px rgba(0, 0, 0, 0.25); transition: transform 0.35s var(--spring), box-shadow 0.3s; }
.tile.user { background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--c) 42%, transparent), color-mix(in srgb, var(--c) 14%, rgba(10, 10, 20, 0.6))); }
.tile.screen { background: #000; }
.tile-label { background: rgba(0, 0, 0, 0.45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.08); }
.tile-top { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; align-items: center; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 77, 97, 0.9); color: white; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 999px; box-shadow: 0 4px 14px rgba(255, 77, 97, 0.4); }
.stream-info { background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; animation: livePulse 1.4s ease-in-out infinite; }
.btn .live-dot { background: #fff; }
@keyframes livePulse { 50% { opacity: 0.35; transform: scale(0.8); } }
.tile-actions .icon-btn { border-radius: 10px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tile .avatar.speaking { animation: speak 1.2s ease-in-out infinite; }
@keyframes speak { 0%, 100% { box-shadow: 0 0 0 3px rgba(47, 209, 122, 0.95), 0 0 0 8px rgba(47, 209, 122, 0.18); } 50% { box-shadow: 0 0 0 3px rgba(47, 209, 122, 0.95), 0 0 0 16px rgba(47, 209, 122, 0); } }
.stage-controls { padding: 12px; }
.ctl-group { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.09); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.round { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15); transition: transform 0.3s var(--spring), background 0.2s; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.round:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }
.round:active { transform: scale(0.9); }
.round.off { background: #fff; color: var(--red); }
.round.on { background: linear-gradient(135deg, #34d98a, #19a866); }
.round.red { background: linear-gradient(135deg, #ff5f72, #e0283f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 20px rgba(255, 77, 97, 0.35); }
.round.red:hover { background: linear-gradient(135deg, #ff7384, #e83a50); }
.ctl-caret { transition: transform 0.25s var(--spring), color 0.2s; }
.ctl-caret:hover { transform: translateY(-2px); }

/* Участники */
.member { border-radius: 10px; transition: background 0.18s, transform 0.25s var(--spring); }
.member:hover { transform: translateX(2px); }
.status { border-color: rgba(20, 18, 32, 0.9); }
.route { border-radius: 6px; }

/* Модальные окна, меню, тосты */
.modal-back { background: rgba(4, 3, 10, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade 0.25s var(--ease); }
.modal { border-radius: 22px; animation: modalIn 0.45s var(--spring); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.94); } }
.dev-pop, .popover { border-radius: 16px; animation: popIn 0.35s var(--spring); transform-origin: 50% 100%; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.92); } }
.toast { border-radius: 14px; animation: toastIn 0.45s var(--spring); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.95); } }
.login-card { border-radius: 26px; background: rgba(24, 22, 40, 0.55); animation: modalIn 0.6s var(--spring); }
.login-logo span { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mode-choice { border-radius: 16px !important; transition: transform 0.3s var(--spring), border-color 0.2s, background 0.2s !important; }
.mode-choice:hover { transform: translateY(-2px); }
.invite-box, .inv-code-box { background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 16px; }
.invite-code { background: none; }

/* Выдвижные панели на узком экране */
@media (max-width: 1099px) {
  #members { border-radius: 18px 0 0 18px; }
  .layout.members-open #members { animation: slideL 0.4s var(--spring); }
  .layout.members-open #backdrop, .layout.nav-open #backdrop { animation: fade 0.25s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); border-radius: 18px; }
}
@media (max-width: 759px) {
  .layout.nav-open #rail, .layout.nav-open #sidebar { animation: slideR 0.4s var(--spring); }
  .layout.nav-open #rail { background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-radius: 0 18px 18px 0; }
  .layout.nav-open #sidebar { background: var(--glass-strong); }
  .layout { padding: 0 6px 6px; }
}
@keyframes slideL { from { transform: translateX(40px); opacity: 0; } }
@keyframes slideR { from { transform: translateX(-40px); opacity: 0; } }

/* ---------- элементы настроек звука и трансляции ---------- */
.seg { display: flex; flex-wrap: wrap; gap: 3px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 12px; padding: 3px; }
.seg button { flex: 1 1 auto; border: 0; background: transparent; color: var(--muted); padding: 6px 10px; border-radius: 9px; cursor: pointer; font-size: 13px; white-space: nowrap; transition: background 0.25s, color 0.2s, transform 0.25s var(--spring); }
.seg button:hover { color: var(--text); }
.seg button:active { transform: scale(0.95); }
.seg button.active { background: var(--accent-grad); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 3px 12px rgba(110, 100, 255, 0.35); }
.ac { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.ac-label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: 0.03em; margin-top: 4px; }
.ac-hint { margin-top: -2px; }
.ac-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; cursor: pointer; }
.ac-meter { position: relative; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ac-level { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 255, 255, 0.35); border-radius: 6px; transition: width 0.06s linear, background 0.15s; }
.ac-level.open { background: linear-gradient(90deg, #2fd17a, #b6f36b); }
.ac-thr { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, 0.8); }
.ac-meter.nogate .ac-thr { display: none; }
.ac-range, .popover input[type=range] { width: 100%; accent-color: var(--accent); }
.switch { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.15); position: relative; cursor: pointer; flex: none; transition: background 0.25s; margin: 0; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.35s var(--spring); }
.switch:checked { background: var(--accent-grad); }
.switch:checked::after { transform: translateX(16px); }
.dev-pop { width: 340px; }
.dev-pop .btn.small { padding: 6px 12px; font-size: 13px; }

.share-modal .src-grid { max-height: 300px; overflow-y: auto; padding: 2px; margin-bottom: 14px; }
.share-opts { display: grid; gap: 12px; margin: 4px 0 8px; }
.share-est { margin-top: -4px; }
.src { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 8px; transition: transform 0.3s var(--spring), border-color 0.2s, background 0.2s; color: var(--text); }
.src:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.2); }
.src.active { border-color: rgba(123, 108, 255, 0.9); background: rgba(123, 108, 255, 0.15); box-shadow: 0 0 0 3px rgba(123, 108, 255, 0.25); }
.src-thumb { display: block; border-radius: 9px; overflow: hidden; background: #000; }
.src img { border-radius: 0; }
.src > span.ellipsis { display: block; font-size: 12px; margin-top: 6px; }

/* Создание сети и приглашения */
.nd-tabs-wrap { margin: -4px 0 4px; }
.nd-hero { display: flex; gap: 12px; align-items: center; padding: 12px; margin-bottom: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(139, 123, 255, 0.16), rgba(71, 199, 255, 0.08)); border: 1px solid rgba(255, 255, 255, 0.07); }
.nd-hero > svg { width: 34px; height: 34px; color: #b7adff; }
.inv-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.inv-head h2 { margin: 0; }
.inv-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-grad); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 8px 24px rgba(110, 100, 255, 0.4); animation: modalIn 0.6s var(--spring); flex: none; }
.inv-icon svg { width: 28px; height: 28px; }
.inv-code-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 12px; margin-bottom: 10px; }
.inv-code-box .invite-code { font-size: 28px; text-align: center; word-break: break-all; }
.inv-link { display: flex; gap: 8px; margin-bottom: 4px; }
.inv-link input { flex: 1; min-width: 0; padding: 8px 10px; color: var(--muted); font-size: 13px; outline: none; user-select: all; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.tile-top { flex-wrap: wrap; right: 10px; }
.stream-warn { background: rgba(240, 178, 50, 0.92); color: #1a1405; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; animation: popIn 0.35s var(--spring); }

/* ---------- хранение и сквозное шифрование ---------- */
.login-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.login-links .btn svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.storage-card p { margin: 8px 0 14px; }
.storage-path { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 14px 0 6px; border-radius: 14px; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.08); }
.storage-path .sp-icon svg { width: 20px; height: 20px; opacity: 0.8; }
.storage-path code { flex: 1; overflow-wrap: anywhere; background: none; font-size: 13px; }
.storage-actions { margin: 10px 0 14px; flex-wrap: wrap; }
.storage-card .link-btn.wide { width: 100%; margin-top: 6px; }
.att-e2e .att-status { font-variant-numeric: tabular-nums; }
.msg-locked { color: var(--muted); font-style: italic; }
.msg-unverified { font-size: 12px; color: #f0b232; margin-top: 2px; }
.e2e-codes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.e2e-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.e2e-row > :first-child { min-width: 120px; }
.e2e-row code { font-size: 13px; letter-spacing: 0.04em; }

/* ---------- кто смотрит демонстрацию ---------- */
.watch-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 999px; background: rgba(10, 8, 20, 0.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; font-size: 12px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); animation: pop-in 0.35s cubic-bezier(0.2, 1.25, 0.35, 1); }
.watch-badge svg { width: 14px; height: 14px; }
.watch-badge .wb-av { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; margin-left: -4px; font: 700 9px/1 inherit; font-style: normal; color: #fff; box-shadow: 0 0 0 2px rgba(10, 8, 20, 0.9); }
.watch-badge .wb-av:first-of-type { margin-left: 0; }
.watch-badge b { margin-right: 4px; }
.tile-watch { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; color: #9fd8ff; font-size: 12px; }
.tile-watch:empty { display: none; }
.tile-watch svg { width: 14px; height: 14px; }
.vu-watch svg { color: #9fd8ff; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.8); } }

/* ---------- громкость участника ---------- */
.vol-pop { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; border-radius: 18px; background: rgba(24, 20, 38, 0.92); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5); animation: pop-in 0.3s cubic-bezier(0.2, 1.25, 0.35, 1); }
.vp-head { display: flex; align-items: center; gap: 10px; }
.vp-head b { flex: 1; min-width: 0; }
.vp-val { font-variant-numeric: tabular-nums; font-weight: 700; color: #ff9fc0; }
.vp-range { width: 100%; height: 6px; -webkit-appearance: none; appearance: none; border-radius: 999px; background: linear-gradient(90deg, #ff4d8d var(--p), rgba(255, 255, 255, 0.14) var(--p)); outline: none; }
.vp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); cursor: pointer; }
.vp-marks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: -4px; }
.vp-btns { display: flex; gap: 8px; }
.vp-btns .btn { flex: 1; padding: 8px 10px; font-size: 13px; }
.vp-btns .btn.on { background: rgba(255, 77, 141, 0.25); }
.vol-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: 11px; color: #ff9fc0; }
.vol-tag svg { width: 13px; height: 13px; }
.vol-tag.off { color: #ff6b81; }
.tile.user, .voice-user { cursor: pointer; }

/* ---------- действия с сообщением, исчезающие сообщения ---------- */
.msg { position: relative; }
.msg-more { position: absolute; right: 10px; top: -10px; width: 30px; height: 26px; border: 0; border-radius: 8px; display: none; align-items: center; justify-content: center; cursor: pointer; color: var(--text); background: rgba(30, 24, 44, 0.9); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.msg-more svg { width: 18px; height: 18px; }
.msg:hover .msg-more, .msg-more:focus-visible { display: flex; }
@media (hover: none) { .msg-more { display: flex; top: 4px; right: 4px; background: transparent; box-shadow: none; opacity: 0.55; } }
.msg-menu { width: 220px; padding: 6px; flex-direction: column; align-items: stretch; gap: 2px; border-radius: 14px; background: rgba(24, 20, 38, 0.95); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); animation: pop-in 0.25s cubic-bezier(0.2, 1.25, 0.35, 1); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; padding: 9px 10px; border-radius: 9px; cursor: pointer; text-align: left; }
.menu-item:hover, .menu-item.active { background: rgba(255, 255, 255, 0.08); }
.menu-item svg { width: 18px; height: 18px; opacity: 0.85; }
.menu-item.danger { color: #ff7a8c; }
.menu-item b { margin-left: auto; color: #ff6fa5; }
.vanish-menu { width: 250px; padding: 8px; flex-direction: column; align-items: stretch; gap: 2px; border-radius: 14px; background: rgba(24, 20, 38, 0.95); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); animation: pop-in 0.25s cubic-bezier(0.2, 1.25, 0.35, 1); }
.vanish-menu .muted svg { width: 14px; height: 14px; vertical-align: -2px; color: #ff6f61; }
.vanish-menu .muted { padding: 4px 6px; }
.vm-hint { margin-top: 4px; line-height: 1.35; }
.vanish-btn { display: inline-flex; align-items: center; gap: 4px; width: auto; padding: 0 6px; }
.vanish-btn.on { color: #ff7a59; background: rgba(255, 90, 80, 0.14); border-radius: 999px; }
.vanish-btn span { font-size: 12px; font-weight: 700; white-space: nowrap; }
.vanish-card { display: inline-flex; align-items: center; gap: 12px; margin-top: 4px; padding: 10px 16px 10px 12px; border: 1px solid rgba(255, 110, 130, 0.3); border-radius: 14px; cursor: pointer; color: var(--text); font: inherit; text-align: left; background: linear-gradient(135deg, rgba(255, 70, 110, 0.18), rgba(255, 140, 90, 0.1)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform 0.25s cubic-bezier(0.2, 1.25, 0.35, 1), background 0.2s; }
.vanish-card:hover { transform: translateY(-1px); background: linear-gradient(135deg, rgba(255, 70, 110, 0.28), rgba(255, 140, 90, 0.16)); }
.vanish-card > span:last-child { display: flex; flex-direction: column; }
.vc-icon svg { width: 22px; height: 22px; color: #ff7a59; filter: drop-shadow(0 0 8px rgba(255, 110, 80, 0.6)); }
.vanish-open { border-left: 2px solid rgba(255, 110, 90, 0.6); padding-left: 10px; animation: pop-in 0.3s ease; }
.vanish-timer { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12px; color: #ff8f73; font-variant-numeric: tabular-nums; }
.vanish-timer svg { width: 13px; height: 13px; }

/* =====================================================================
   Сайт: красно-розовый фон
   ===================================================================== */
.web body { background: #0c0508; }
.web .ambient { background: radial-gradient(120% 90% at 50% 0%, #2a0b16 0%, #0c0508 62%); }
.web .ambient i:nth-child(1) { background: #ff1f4b; opacity: 0.5; }
.web .ambient i:nth-child(2) { background: #ff4fa8; opacity: 0.45; }
.web .ambient i:nth-child(3) { background: #c2185b; opacity: 0.32; }
.web #login { background: transparent; }

/* =====================================================================
   Кнопка «отправить» (на телефоне Enter переносит строку)
   ===================================================================== */
.send-btn { display: none; }
.touch .send-btn { display: inline-flex; color: #fff; background: linear-gradient(135deg, #ff4d8d, #ff2d55); border-radius: 50%; width: 36px; height: 36px; align-self: flex-end; margin: 0 0 1px 4px; flex: none; box-shadow: 0 4px 14px rgba(255, 45, 85, 0.4); }
.touch .send-btn svg { width: 18px; height: 18px; }
.composer { align-items: center; }

/* =====================================================================
   Телефон
   ===================================================================== */
.web body, .web #app { height: 100dvh; }
@media (max-width: 759px) {
  /* Поля ввода от 16px — иначе iOS приближает страницу при фокусе. */
  input, textarea, select { font-size: 16px !important; }
  .layout { padding: 0 0 env(safe-area-inset-bottom); gap: 0; }
  #main { border-radius: 0; border-left: 0; border-right: 0; }
  #main-header { height: 52px; padding-top: env(safe-area-inset-top); box-sizing: content-box; }
  .nav-btn, #main-header .icon-btn { width: 40px; height: 40px; }
  .composer-wrap { padding: 0 8px 8px; }
  .composer { padding: 4px 6px; border-radius: 22px; }
  .composer .icon-btn { width: 36px; height: 36px; }
  #composer-input { padding: 9px 4px; max-height: 40vh; }
  .msg { padding: 4px 40px 4px 10px; }
  .msg .avatar { --size: 34px !important; }
  .msg.grouped { padding-left: 54px; }
  .att-img img, .att-video { max-width: 100%; max-height: 50vh; }
  .chan-start { padding: 12px; }
  .chan-start h2 { font-size: 20px; }
  /* Боковые меню на всю высоту, поверх затемнения */
  .layout.nav-open #rail { padding-top: env(safe-area-inset-top); }
  .layout.nav-open #sidebar { width: min(300px, calc(100vw - 72px - 24px)); }
  #members { width: min(300px, 86vw); }
  .chan { min-height: 40px; }
  .voice-user { min-height: 34px; }
  /* Окна — снизу, как «шторки» */
  .modal-back { align-items: flex-end; }
  .modal { width: 100%; max-width: 100%; max-height: calc(100dvh - 40px); border-radius: 22px 22px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); animation: sheet-up 0.35s cubic-bezier(0.2, 1.1, 0.35, 1); }
  .modal.viewer { border-radius: 0; height: 100dvh; max-height: 100dvh; }
  .modal-actions { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); margin: 16px -16px calc(-16px - env(safe-area-inset-bottom)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(18, 10, 20, 0.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); flex-wrap: wrap; gap: 8px; }
  .modal-actions .btn { flex: 1 1 auto; min-height: 42px; }
  .modal-actions .spacer { display: none; }
  /* Всплывающие меню — снизу на всю ширину */
  .popover.msg-menu, .popover.vanish-menu, .popover.vol-pop, .dev-pop { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto !important; max-width: none; animation: sheet-up 0.3s cubic-bezier(0.2, 1.1, 0.35, 1); }
  .menu-item { padding: 13px 12px; font-size: 15px; }
  #toasts { top: calc(12px + env(safe-area-inset-top)); bottom: auto; width: calc(100% - 24px); }
  /* Голос */
  .stage-controls { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .tile-label { max-width: calc(100% - 16px); flex-wrap: wrap; }
  .watch-badge .wb-av { display: none; }
  .login-card { border-radius: 22px; }
  #login { padding: calc(12px + env(safe-area-inset-top)) 0 calc(12px + env(safe-area-inset-bottom)); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }

/* =====================================================================
   Друзья и личные сообщения
   ===================================================================== */
.rail-item.home .rail-icon { background: linear-gradient(135deg, #ff4d8d, #8b5cff); color: #fff; }
.rail-item.home .rail-icon svg { width: 24px; height: 24px; }
.rail-badge { position: absolute; right: 6px; bottom: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ff2d55; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 3px rgba(12, 6, 14, 0.9); }
.rail-badge.inline { position: static; box-shadow: none; margin-left: auto; }
.home-link { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 600; padding: 9px 10px; border-radius: 10px; cursor: pointer; margin-bottom: 6px; }
.home-link svg { width: 20px; height: 20px; opacity: 0.85; }
.home-link:hover, .home-link.active { background: rgba(255, 255, 255, 0.08); }
.dm-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; color: var(--muted); transition: background 0.15s; }
.dm-row:hover, .dm-row.active { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.dm-row.unread { color: #fff; font-weight: 700; }
.dm-row.unread::before { content: ''; position: absolute; left: -8px; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: #fff; }
.dm-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-call { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #3ddc84; font-weight: 600; }
.dm-call svg { width: 11px; height: 11px; }
.dm-x { opacity: 0; }
.dm-row:hover .dm-x, .touch .dm-x { opacity: 0.7; }
.dm-empty { padding: 4px 10px; line-height: 1.4; }
.av-wrap { position: relative; flex: none; }
.dm-head-av { margin-right: 8px; }
.dm-head-av .status { width: 10px; height: 10px; }
#main-header .btn.small { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; }
#main-header .btn.small svg { width: 16px; height: 16px; }
.btn.green { background: linear-gradient(135deg, #2fd17a, #1aa35c); color: #fff; }
.fr-tabs { display: flex; gap: 4px; margin-left: 14px; overflow-x: auto; scrollbar-width: none; }
.fr-tab { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.fr-tab:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.fr-tab.active { background: rgba(255, 255, 255, 0.12); color: #fff; }
.fr-tab.add { color: #fff; background: linear-gradient(135deg, #ff4d8d, #ff2d55); }
.fr-tab.add.active { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35) inset; }
.fr-tab svg { width: 16px; height: 16px; }
.friends-page { flex: 1; overflow-y: auto; padding: 16px 24px 24px; }
.fr-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border-top: 1px solid rgba(255, 255, 255, 0.05); transition: background 0.15s; }
.fr-row:hover { background: rgba(255, 255, 255, 0.05); }
.fr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-actions { display: flex; gap: 8px; }
.fr-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); background: rgba(255, 255, 255, 0.08); transition: background 0.15s, transform 0.2s cubic-bezier(0.2, 1.25, 0.35, 1); }
.fr-btn svg { width: 19px; height: 19px; }
.fr-btn:hover { background: rgba(255, 255, 255, 0.16); transform: scale(1.06); }
.fr-btn.ok:hover { background: rgba(47, 209, 122, 0.3); color: #3ddc84; }
.fr-btn.danger:hover { background: rgba(255, 77, 97, 0.25); color: #ff7a8c; }
.fr-add h2 { margin: 4px 0 6px; }
.fr-add-row { display: flex; gap: 10px; margin: 14px 0 22px; padding: 6px; border-radius: 16px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.08); }
.fr-add-row input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; padding: 8px 10px; outline: none; }
.fr-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 60px 20px; text-align: center; }
.fr-empty .empty-icon svg { width: 48px; height: 48px; opacity: 0.5; }
.fr-add-btn { opacity: 0.6; vertical-align: middle; }
.fr-add-btn:hover { opacity: 1; }
.fr-add-btn svg { width: 15px; height: 15px; }
.fr-mark { color: #ffb84d; font-size: 12px; }
.call-toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px; border-radius: 22px; background: rgba(24, 14, 30, 0.92); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55); animation: pop-in 0.35s cubic-bezier(0.2, 1.25, 0.35, 1); }
.call-toast .avatar { animation: ring 1.2s ease-in-out infinite; }
.ct-info { display: flex; flex-direction: column; min-width: 120px; }
.call-toast .round.small { width: 44px; height: 44px; }
.call-toast .round.green { background: linear-gradient(135deg, #2fd17a, #1aa35c); color: #fff; }
.call-toast .round svg { width: 20px; height: 20px; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.6); } 50% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } }
.chan-start > .avatar { margin-bottom: 8px; }
@media (max-width: 759px) {
  .fr-tabs { margin-left: 6px; }
  .fr-tab { padding: 6px 9px; font-size: 13px; }
  .fr-tab.add span { display: none; }
  .friends-page { padding: 10px 10px 20px; }
  .fr-row { padding: 10px 6px; }
  .fr-btn { width: 40px; height: 40px; }
  .fr-add-row { flex-direction: column; }
  .call-toast { top: calc(10px + env(safe-area-inset-top)); width: calc(100% - 20px); }
}
